github.com/undoio/delve@v1.9.0/pkg/proc/internal/ebpf/bpf/include/vmlinux.h (about) 1 #ifndef __VMLINUX_H__ 2 #define __VMLINUX_H__ 3 4 #ifndef BPF_NO_PRESERVE_ACCESS_INDEX 5 #pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record) 6 #endif 7 8 typedef unsigned char __u8; 9 10 typedef short int __s16; 11 12 typedef short unsigned int __u16; 13 14 typedef int __s32; 15 16 typedef unsigned int __u32; 17 18 typedef long long int __s64; 19 20 typedef long long unsigned int __u64; 21 22 typedef __u8 u8; 23 24 typedef __s16 s16; 25 26 typedef __u16 u16; 27 28 typedef __s32 s32; 29 30 typedef __u32 u32; 31 32 typedef __s64 s64; 33 34 typedef __u64 u64; 35 36 enum { 37 false = 0, 38 true = 1, 39 }; 40 41 typedef long int __kernel_long_t; 42 43 typedef long unsigned int __kernel_ulong_t; 44 45 typedef int __kernel_pid_t; 46 47 typedef unsigned int __kernel_uid32_t; 48 49 typedef unsigned int __kernel_gid32_t; 50 51 typedef __kernel_ulong_t __kernel_size_t; 52 53 typedef __kernel_long_t __kernel_ssize_t; 54 55 typedef long long int __kernel_loff_t; 56 57 typedef long long int __kernel_time64_t; 58 59 typedef __kernel_long_t __kernel_clock_t; 60 61 typedef int __kernel_timer_t; 62 63 typedef int __kernel_clockid_t; 64 65 typedef unsigned int __poll_t; 66 67 typedef u32 __kernel_dev_t; 68 69 typedef __kernel_dev_t dev_t; 70 71 typedef short unsigned int umode_t; 72 73 typedef __kernel_pid_t pid_t; 74 75 typedef __kernel_clockid_t clockid_t; 76 77 typedef _Bool bool; 78 79 typedef __kernel_uid32_t uid_t; 80 81 typedef __kernel_gid32_t gid_t; 82 83 typedef __kernel_loff_t loff_t; 84 85 typedef __kernel_size_t size_t; 86 87 typedef __kernel_ssize_t ssize_t; 88 89 typedef s32 int32_t; 90 91 typedef u32 uint32_t; 92 93 typedef u64 sector_t; 94 95 typedef u64 blkcnt_t; 96 97 typedef u64 dma_addr_t; 98 99 typedef unsigned int gfp_t; 100 101 typedef unsigned int fmode_t; 102 103 typedef u64 phys_addr_t; 104 105 typedef struct { 106 int counter; 107 } atomic_t; 108 109 typedef struct { 110 s64 counter; 111 } atomic64_t; 112 113 struct list_head { 114 struct list_head *next; 115 struct list_head *prev; 116 }; 117 118 struct hlist_node; 119 120 struct hlist_head { 121 struct hlist_node *first; 122 }; 123 124 struct hlist_node { 125 struct hlist_node *next; 126 struct hlist_node **pprev; 127 }; 128 129 struct callback_head { 130 struct callback_head *next; 131 void (*func)(struct callback_head *); 132 }; 133 134 struct lock_class_key {}; 135 136 struct fs_context; 137 138 struct fs_parameter_spec; 139 140 struct dentry; 141 142 struct super_block; 143 144 struct module; 145 146 struct file_system_type { 147 const char *name; 148 int fs_flags; 149 int (*init_fs_context)(struct fs_context *); 150 const struct fs_parameter_spec *parameters; 151 struct dentry * (*mount)(struct file_system_type *, int, const char *, void *); 152 void (*kill_sb)(struct super_block *); 153 struct module *owner; 154 struct file_system_type *next; 155 struct hlist_head fs_supers; 156 struct lock_class_key s_lock_key; 157 struct lock_class_key s_umount_key; 158 struct lock_class_key s_vfs_rename_key; 159 struct lock_class_key s_writers_key[3]; 160 struct lock_class_key i_lock_key; 161 struct lock_class_key i_mutex_key; 162 struct lock_class_key i_mutex_dir_key; 163 }; 164 165 struct qspinlock { 166 union { 167 atomic_t val; 168 struct { 169 u8 locked; 170 u8 pending; 171 }; 172 struct { 173 u16 locked_pending; 174 u16 tail; 175 }; 176 }; 177 }; 178 179 typedef struct qspinlock arch_spinlock_t; 180 181 struct qrwlock { 182 union { 183 atomic_t cnts; 184 struct { 185 u8 wlocked; 186 u8 __lstate[3]; 187 }; 188 }; 189 arch_spinlock_t wait_lock; 190 }; 191 192 typedef struct qrwlock arch_rwlock_t; 193 194 struct raw_spinlock { 195 arch_spinlock_t raw_lock; 196 }; 197 198 typedef struct raw_spinlock raw_spinlock_t; 199 200 struct spinlock { 201 union { 202 struct raw_spinlock rlock; 203 }; 204 }; 205 206 typedef struct spinlock spinlock_t; 207 208 typedef struct { 209 arch_rwlock_t raw_lock; 210 } rwlock_t; 211 212 struct ratelimit_state { 213 raw_spinlock_t lock; 214 int interval; 215 int burst; 216 int printed; 217 int missed; 218 long unsigned int begin; 219 long unsigned int flags; 220 }; 221 222 typedef void *fl_owner_t; 223 224 struct file; 225 226 struct kiocb; 227 228 struct iov_iter; 229 230 struct dir_context; 231 232 struct poll_table_struct; 233 234 struct vm_area_struct; 235 236 struct inode; 237 238 struct file_lock; 239 240 struct page; 241 242 struct pipe_inode_info; 243 244 struct seq_file; 245 246 struct file_operations { 247 struct module *owner; 248 loff_t (*llseek)(struct file *, loff_t, int); 249 ssize_t (*read)(struct file *, char *, size_t, loff_t *); 250 ssize_t (*write)(struct file *, const char *, size_t, loff_t *); 251 ssize_t (*read_iter)(struct kiocb *, struct iov_iter *); 252 ssize_t (*write_iter)(struct kiocb *, struct iov_iter *); 253 int (*iopoll)(struct kiocb *, bool); 254 int (*iterate)(struct file *, struct dir_context *); 255 int (*iterate_shared)(struct file *, struct dir_context *); 256 __poll_t (*poll)(struct file *, struct poll_table_struct *); 257 long int (*unlocked_ioctl)(struct file *, unsigned int, long unsigned int); 258 long int (*compat_ioctl)(struct file *, unsigned int, long unsigned int); 259 int (*mmap)(struct file *, struct vm_area_struct *); 260 long unsigned int mmap_supported_flags; 261 int (*open)(struct inode *, struct file *); 262 int (*flush)(struct file *, fl_owner_t); 263 int (*release)(struct inode *, struct file *); 264 int (*fsync)(struct file *, loff_t, loff_t, int); 265 int (*fasync)(int, struct file *, int); 266 int (*lock)(struct file *, int, struct file_lock *); 267 ssize_t (*sendpage)(struct file *, struct page *, int, size_t, loff_t *, int); 268 long unsigned int (*get_unmapped_area)(struct file *, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 269 int (*check_flags)(int); 270 int (*flock)(struct file *, int, struct file_lock *); 271 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); 272 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); 273 int (*setlease)(struct file *, long int, struct file_lock **, void **); 274 long int (*fallocate)(struct file *, int, loff_t, loff_t); 275 void (*show_fdinfo)(struct seq_file *, struct file *); 276 ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int); 277 loff_t (*remap_file_range)(struct file *, loff_t, struct file *, loff_t, loff_t, unsigned int); 278 int (*fadvise)(struct file *, loff_t, loff_t, int); 279 }; 280 281 typedef __s64 time64_t; 282 283 struct __kernel_timespec { 284 __kernel_time64_t tv_sec; 285 long long int tv_nsec; 286 }; 287 288 struct timespec64 { 289 time64_t tv_sec; 290 long int tv_nsec; 291 }; 292 293 enum timespec_type { 294 TT_NONE = 0, 295 TT_NATIVE = 1, 296 TT_COMPAT = 2, 297 }; 298 299 typedef s32 old_time32_t; 300 301 struct old_timespec32 { 302 old_time32_t tv_sec; 303 s32 tv_nsec; 304 }; 305 306 struct pollfd; 307 308 struct restart_block { 309 long int (*fn)(struct restart_block *); 310 union { 311 struct { 312 u32 *uaddr; 313 u32 val; 314 u32 flags; 315 u32 bitset; 316 u64 time; 317 u32 *uaddr2; 318 } futex; 319 struct { 320 clockid_t clockid; 321 enum timespec_type type; 322 union { 323 struct __kernel_timespec *rmtp; 324 struct old_timespec32 *compat_rmtp; 325 }; 326 u64 expires; 327 } nanosleep; 328 struct { 329 struct pollfd *ufds; 330 int nfds; 331 int has_timeout; 332 long unsigned int tv_sec; 333 long unsigned int tv_nsec; 334 } poll; 335 }; 336 }; 337 338 struct thread_info { 339 long unsigned int flags; 340 long unsigned int syscall_work; 341 u32 status; 342 }; 343 344 struct refcount_struct { 345 atomic_t refs; 346 }; 347 348 typedef struct refcount_struct refcount_t; 349 350 struct llist_node { 351 struct llist_node *next; 352 }; 353 354 struct __call_single_node { 355 struct llist_node llist; 356 union { 357 unsigned int u_flags; 358 atomic_t a_flags; 359 }; 360 u16 src; 361 u16 dst; 362 }; 363 364 struct load_weight { 365 long unsigned int weight; 366 u32 inv_weight; 367 }; 368 369 struct rb_node { 370 long unsigned int __rb_parent_color; 371 struct rb_node *rb_right; 372 struct rb_node *rb_left; 373 }; 374 375 struct sched_statistics { 376 u64 wait_start; 377 u64 wait_max; 378 u64 wait_count; 379 u64 wait_sum; 380 u64 iowait_count; 381 u64 iowait_sum; 382 u64 sleep_start; 383 u64 sleep_max; 384 s64 sum_sleep_runtime; 385 u64 block_start; 386 u64 block_max; 387 u64 exec_max; 388 u64 slice_max; 389 u64 nr_migrations_cold; 390 u64 nr_failed_migrations_affine; 391 u64 nr_failed_migrations_running; 392 u64 nr_failed_migrations_hot; 393 u64 nr_forced_migrations; 394 u64 nr_wakeups; 395 u64 nr_wakeups_sync; 396 u64 nr_wakeups_migrate; 397 u64 nr_wakeups_local; 398 u64 nr_wakeups_remote; 399 u64 nr_wakeups_affine; 400 u64 nr_wakeups_affine_attempts; 401 u64 nr_wakeups_passive; 402 u64 nr_wakeups_idle; 403 }; 404 405 struct util_est { 406 unsigned int enqueued; 407 unsigned int ewma; 408 }; 409 410 struct sched_avg { 411 u64 last_update_time; 412 u64 load_sum; 413 u64 runnable_sum; 414 u32 util_sum; 415 u32 period_contrib; 416 long unsigned int load_avg; 417 long unsigned int runnable_avg; 418 long unsigned int util_avg; 419 struct util_est util_est; 420 }; 421 422 struct cfs_rq; 423 424 struct sched_entity { 425 struct load_weight load; 426 struct rb_node run_node; 427 struct list_head group_node; 428 unsigned int on_rq; 429 u64 exec_start; 430 u64 sum_exec_runtime; 431 u64 vruntime; 432 u64 prev_sum_exec_runtime; 433 u64 nr_migrations; 434 struct sched_statistics statistics; 435 int depth; 436 struct sched_entity *parent; 437 struct cfs_rq *cfs_rq; 438 struct cfs_rq *my_q; 439 long unsigned int runnable_weight; 440 long: 64; 441 long: 64; 442 long: 64; 443 struct sched_avg avg; 444 }; 445 446 struct sched_rt_entity { 447 struct list_head run_list; 448 long unsigned int timeout; 449 long unsigned int watchdog_stamp; 450 unsigned int time_slice; 451 short unsigned int on_rq; 452 short unsigned int on_list; 453 struct sched_rt_entity *back; 454 }; 455 456 typedef s64 ktime_t; 457 458 struct timerqueue_node { 459 struct rb_node node; 460 ktime_t expires; 461 }; 462 463 enum hrtimer_restart { 464 HRTIMER_NORESTART = 0, 465 HRTIMER_RESTART = 1, 466 }; 467 468 struct hrtimer_clock_base; 469 470 struct hrtimer { 471 struct timerqueue_node node; 472 ktime_t _softexpires; 473 enum hrtimer_restart (*function)(struct hrtimer *); 474 struct hrtimer_clock_base *base; 475 u8 state; 476 u8 is_rel; 477 u8 is_soft; 478 u8 is_hard; 479 }; 480 481 struct sched_dl_entity { 482 struct rb_node rb_node; 483 u64 dl_runtime; 484 u64 dl_deadline; 485 u64 dl_period; 486 u64 dl_bw; 487 u64 dl_density; 488 s64 runtime; 489 u64 deadline; 490 unsigned int flags; 491 unsigned int dl_throttled: 1; 492 unsigned int dl_yielded: 1; 493 unsigned int dl_non_contending: 1; 494 unsigned int dl_overrun: 1; 495 struct hrtimer dl_timer; 496 struct hrtimer inactive_timer; 497 struct sched_dl_entity *pi_se; 498 }; 499 500 struct cpumask { 501 long unsigned int bits[128]; 502 }; 503 504 typedef struct cpumask cpumask_t; 505 506 union rcu_special { 507 struct { 508 u8 blocked; 509 u8 need_qs; 510 u8 exp_hint; 511 u8 need_mb; 512 } b; 513 u32 s; 514 }; 515 516 struct sched_info { 517 long unsigned int pcount; 518 long long unsigned int run_delay; 519 long long unsigned int last_arrival; 520 long long unsigned int last_queued; 521 }; 522 523 struct plist_node { 524 int prio; 525 struct list_head prio_list; 526 struct list_head node_list; 527 }; 528 529 struct vmacache { 530 u64 seqnum; 531 struct vm_area_struct *vmas[4]; 532 }; 533 534 struct task_rss_stat { 535 int events; 536 int count[4]; 537 }; 538 539 struct prev_cputime { 540 u64 utime; 541 u64 stime; 542 raw_spinlock_t lock; 543 }; 544 545 struct seqcount { 546 unsigned int sequence; 547 }; 548 549 typedef struct seqcount seqcount_t; 550 551 enum vtime_state { 552 VTIME_INACTIVE = 0, 553 VTIME_IDLE = 1, 554 VTIME_SYS = 2, 555 VTIME_USER = 3, 556 VTIME_GUEST = 4, 557 }; 558 559 struct vtime { 560 seqcount_t seqcount; 561 long long unsigned int starttime; 562 enum vtime_state state; 563 unsigned int cpu; 564 u64 utime; 565 u64 stime; 566 u64 gtime; 567 }; 568 569 struct rb_root { 570 struct rb_node *rb_node; 571 }; 572 573 struct rb_root_cached { 574 struct rb_root rb_root; 575 struct rb_node *rb_leftmost; 576 }; 577 578 struct timerqueue_head { 579 struct rb_root_cached rb_root; 580 }; 581 582 struct posix_cputimer_base { 583 u64 nextevt; 584 struct timerqueue_head tqhead; 585 }; 586 587 struct posix_cputimers { 588 struct posix_cputimer_base bases[3]; 589 unsigned int timers_active; 590 unsigned int expiry_active; 591 }; 592 593 struct posix_cputimers_work { 594 struct callback_head work; 595 unsigned int scheduled; 596 }; 597 598 struct sem_undo_list; 599 600 struct sysv_sem { 601 struct sem_undo_list *undo_list; 602 }; 603 604 struct sysv_shm { 605 struct list_head shm_clist; 606 }; 607 608 typedef struct { 609 long unsigned int sig[1]; 610 } sigset_t; 611 612 struct sigpending { 613 struct list_head list; 614 sigset_t signal; 615 }; 616 617 typedef struct { 618 uid_t val; 619 } kuid_t; 620 621 struct seccomp_filter; 622 623 struct seccomp { 624 int mode; 625 atomic_t filter_count; 626 struct seccomp_filter *filter; 627 }; 628 629 struct syscall_user_dispatch { 630 char *selector; 631 long unsigned int offset; 632 long unsigned int len; 633 bool on_dispatch; 634 }; 635 636 struct wake_q_node { 637 struct wake_q_node *next; 638 }; 639 640 struct task_io_accounting { 641 u64 rchar; 642 u64 wchar; 643 u64 syscr; 644 u64 syscw; 645 u64 read_bytes; 646 u64 write_bytes; 647 u64 cancelled_write_bytes; 648 }; 649 650 typedef struct { 651 long unsigned int bits[16]; 652 } nodemask_t; 653 654 struct seqcount_spinlock { 655 seqcount_t seqcount; 656 }; 657 658 typedef struct seqcount_spinlock seqcount_spinlock_t; 659 660 typedef atomic64_t atomic_long_t; 661 662 struct optimistic_spin_queue { 663 atomic_t tail; 664 }; 665 666 struct mutex { 667 atomic_long_t owner; 668 spinlock_t wait_lock; 669 struct optimistic_spin_queue osq; 670 struct list_head wait_list; 671 }; 672 673 struct arch_tlbflush_unmap_batch { 674 struct cpumask cpumask; 675 }; 676 677 struct tlbflush_unmap_batch { 678 struct arch_tlbflush_unmap_batch arch; 679 bool flush_required; 680 bool writable; 681 }; 682 683 struct page_frag { 684 struct page *page; 685 __u32 offset; 686 __u32 size; 687 }; 688 689 struct latency_record { 690 long unsigned int backtrace[12]; 691 unsigned int count; 692 long unsigned int time; 693 long unsigned int max; 694 }; 695 696 struct kmap_ctrl {}; 697 698 struct llist_head { 699 struct llist_node *first; 700 }; 701 702 struct desc_struct { 703 u16 limit0; 704 u16 base0; 705 u16 base1: 8; 706 u16 type: 4; 707 u16 s: 1; 708 u16 dpl: 2; 709 u16 p: 1; 710 u16 limit1: 4; 711 u16 avl: 1; 712 u16 l: 1; 713 u16 d: 1; 714 u16 g: 1; 715 u16 base2: 8; 716 }; 717 718 struct fregs_state { 719 u32 cwd; 720 u32 swd; 721 u32 twd; 722 u32 fip; 723 u32 fcs; 724 u32 foo; 725 u32 fos; 726 u32 st_space[20]; 727 u32 status; 728 }; 729 730 struct fxregs_state { 731 u16 cwd; 732 u16 swd; 733 u16 twd; 734 u16 fop; 735 union { 736 struct { 737 u64 rip; 738 u64 rdp; 739 }; 740 struct { 741 u32 fip; 742 u32 fcs; 743 u32 foo; 744 u32 fos; 745 }; 746 }; 747 u32 mxcsr; 748 u32 mxcsr_mask; 749 u32 st_space[32]; 750 u32 xmm_space[64]; 751 u32 padding[12]; 752 union { 753 u32 padding1[12]; 754 u32 sw_reserved[12]; 755 }; 756 }; 757 758 struct math_emu_info; 759 760 struct swregs_state { 761 u32 cwd; 762 u32 swd; 763 u32 twd; 764 u32 fip; 765 u32 fcs; 766 u32 foo; 767 u32 fos; 768 u32 st_space[20]; 769 u8 ftop; 770 u8 changed; 771 u8 lookahead; 772 u8 no_update; 773 u8 rm; 774 u8 alimit; 775 struct math_emu_info *info; 776 u32 entry_eip; 777 }; 778 779 struct xstate_header { 780 u64 xfeatures; 781 u64 xcomp_bv; 782 u64 reserved[6]; 783 }; 784 785 struct xregs_state { 786 struct fxregs_state i387; 787 struct xstate_header header; 788 u8 extended_state_area[0]; 789 }; 790 791 union fpregs_state { 792 struct fregs_state fsave; 793 struct fxregs_state fxsave; 794 struct swregs_state soft; 795 struct xregs_state xsave; 796 u8 __padding[4096]; 797 }; 798 799 struct fpu { 800 unsigned int last_cpu; 801 long unsigned int avx512_timestamp; 802 long: 64; 803 long: 64; 804 long: 64; 805 long: 64; 806 long: 64; 807 long: 64; 808 union fpregs_state state; 809 }; 810 811 struct perf_event; 812 813 struct io_bitmap; 814 815 struct thread_struct { 816 struct desc_struct tls_array[3]; 817 long unsigned int sp; 818 short unsigned int es; 819 short unsigned int ds; 820 short unsigned int fsindex; 821 short unsigned int gsindex; 822 long unsigned int fsbase; 823 long unsigned int gsbase; 824 struct perf_event *ptrace_bps[4]; 825 long unsigned int virtual_dr6; 826 long unsigned int ptrace_dr7; 827 long unsigned int cr2; 828 long unsigned int trap_nr; 829 long unsigned int error_code; 830 struct io_bitmap *io_bitmap; 831 long unsigned int iopl_emul; 832 unsigned int sig_on_uaccess_err: 1; 833 long: 63; 834 long: 64; 835 long: 64; 836 long: 64; 837 long: 64; 838 long: 64; 839 struct fpu fpu; 840 }; 841 842 struct sched_class; 843 844 struct task_group; 845 846 struct mm_struct; 847 848 struct pid; 849 850 struct completion; 851 852 struct cred; 853 854 struct key; 855 856 struct nameidata; 857 858 struct fs_struct; 859 860 struct files_struct; 861 862 struct io_uring_task; 863 864 struct nsproxy; 865 866 struct signal_struct; 867 868 struct sighand_struct; 869 870 struct audit_context; 871 872 struct rt_mutex_waiter; 873 874 struct bio_list; 875 876 struct blk_plug; 877 878 struct reclaim_state; 879 880 struct backing_dev_info; 881 882 struct io_context; 883 884 struct capture_control; 885 886 struct kernel_siginfo; 887 888 typedef struct kernel_siginfo kernel_siginfo_t; 889 890 struct css_set; 891 892 struct robust_list_head; 893 894 struct compat_robust_list_head; 895 896 struct futex_pi_state; 897 898 struct perf_event_context; 899 900 struct mempolicy; 901 902 struct numa_group; 903 904 struct rseq; 905 906 struct task_delay_info; 907 908 struct ftrace_ret_stack; 909 910 struct mem_cgroup; 911 912 struct request_queue; 913 914 struct uprobe_task; 915 916 struct vm_struct; 917 918 struct task_struct { 919 struct thread_info thread_info; 920 volatile long int state; 921 void *stack; 922 refcount_t usage; 923 unsigned int flags; 924 unsigned int ptrace; 925 int on_cpu; 926 struct __call_single_node wake_entry; 927 unsigned int cpu; 928 unsigned int wakee_flips; 929 long unsigned int wakee_flip_decay_ts; 930 struct task_struct *last_wakee; 931 int recent_used_cpu; 932 int wake_cpu; 933 int on_rq; 934 int prio; 935 int static_prio; 936 int normal_prio; 937 unsigned int rt_priority; 938 const struct sched_class *sched_class; 939 long: 64; 940 long: 64; 941 long: 64; 942 long: 64; 943 long: 64; 944 long: 64; 945 long: 64; 946 struct sched_entity se; 947 struct sched_rt_entity rt; 948 struct task_group *sched_task_group; 949 struct sched_dl_entity dl; 950 struct hlist_head preempt_notifiers; 951 unsigned int btrace_seq; 952 unsigned int policy; 953 int nr_cpus_allowed; 954 const cpumask_t *cpus_ptr; 955 cpumask_t cpus_mask; 956 void *migration_pending; 957 short unsigned int migration_disabled; 958 short unsigned int migration_flags; 959 long unsigned int rcu_tasks_nvcsw; 960 u8 rcu_tasks_holdout; 961 u8 rcu_tasks_idx; 962 int rcu_tasks_idle_cpu; 963 struct list_head rcu_tasks_holdout_list; 964 int trc_reader_nesting; 965 int trc_ipi_to_cpu; 966 union rcu_special trc_reader_special; 967 bool trc_reader_checked; 968 struct list_head trc_holdout_list; 969 struct sched_info sched_info; 970 struct list_head tasks; 971 struct plist_node pushable_tasks; 972 struct rb_node pushable_dl_tasks; 973 struct mm_struct *mm; 974 struct mm_struct *active_mm; 975 struct vmacache vmacache; 976 struct task_rss_stat rss_stat; 977 int exit_state; 978 int exit_code; 979 int exit_signal; 980 int pdeath_signal; 981 long unsigned int jobctl; 982 unsigned int personality; 983 unsigned int sched_reset_on_fork: 1; 984 unsigned int sched_contributes_to_load: 1; 985 unsigned int sched_migrated: 1; 986 unsigned int sched_psi_wake_requeue: 1; 987 int: 28; 988 unsigned int sched_remote_wakeup: 1; 989 unsigned int in_execve: 1; 990 unsigned int in_iowait: 1; 991 unsigned int restore_sigmask: 1; 992 unsigned int in_user_fault: 1; 993 unsigned int no_cgroup_migration: 1; 994 unsigned int frozen: 1; 995 unsigned int use_memdelay: 1; 996 unsigned int in_memstall: 1; 997 long unsigned int atomic_flags; 998 struct restart_block restart_block; 999 pid_t pid; 1000 pid_t tgid; 1001 long unsigned int stack_canary; 1002 struct task_struct *real_parent; 1003 struct task_struct *parent; 1004 struct list_head children; 1005 struct list_head sibling; 1006 struct task_struct *group_leader; 1007 struct list_head ptraced; 1008 struct list_head ptrace_entry; 1009 struct pid *thread_pid; 1010 struct hlist_node pid_links[4]; 1011 struct list_head thread_group; 1012 struct list_head thread_node; 1013 struct completion *vfork_done; 1014 int *set_child_tid; 1015 int *clear_child_tid; 1016 u64 utime; 1017 u64 stime; 1018 u64 gtime; 1019 struct prev_cputime prev_cputime; 1020 struct vtime vtime; 1021 atomic_t tick_dep_mask; 1022 long unsigned int nvcsw; 1023 long unsigned int nivcsw; 1024 u64 start_time; 1025 u64 start_boottime; 1026 long unsigned int min_flt; 1027 long unsigned int maj_flt; 1028 struct posix_cputimers posix_cputimers; 1029 struct posix_cputimers_work posix_cputimers_work; 1030 const struct cred *ptracer_cred; 1031 const struct cred *real_cred; 1032 const struct cred *cred; 1033 struct key *cached_requested_key; 1034 char comm[16]; 1035 struct nameidata *nameidata; 1036 struct sysv_sem sysvsem; 1037 struct sysv_shm sysvshm; 1038 struct fs_struct *fs; 1039 struct files_struct *files; 1040 struct io_uring_task *io_uring; 1041 struct nsproxy *nsproxy; 1042 struct signal_struct *signal; 1043 struct sighand_struct *sighand; 1044 sigset_t blocked; 1045 sigset_t real_blocked; 1046 sigset_t saved_sigmask; 1047 struct sigpending pending; 1048 long unsigned int sas_ss_sp; 1049 size_t sas_ss_size; 1050 unsigned int sas_ss_flags; 1051 struct callback_head *task_works; 1052 struct audit_context *audit_context; 1053 kuid_t loginuid; 1054 unsigned int sessionid; 1055 struct seccomp seccomp; 1056 struct syscall_user_dispatch syscall_dispatch; 1057 u64 parent_exec_id; 1058 u64 self_exec_id; 1059 spinlock_t alloc_lock; 1060 raw_spinlock_t pi_lock; 1061 struct wake_q_node wake_q; 1062 struct rb_root_cached pi_waiters; 1063 struct task_struct *pi_top_task; 1064 struct rt_mutex_waiter *pi_blocked_on; 1065 void *journal_info; 1066 struct bio_list *bio_list; 1067 struct blk_plug *plug; 1068 struct reclaim_state *reclaim_state; 1069 struct backing_dev_info *backing_dev_info; 1070 struct io_context *io_context; 1071 struct capture_control *capture_control; 1072 long unsigned int ptrace_message; 1073 kernel_siginfo_t *last_siginfo; 1074 struct task_io_accounting ioac; 1075 unsigned int psi_flags; 1076 u64 acct_rss_mem1; 1077 u64 acct_vm_mem1; 1078 u64 acct_timexpd; 1079 nodemask_t mems_allowed; 1080 seqcount_spinlock_t mems_allowed_seq; 1081 int cpuset_mem_spread_rotor; 1082 int cpuset_slab_spread_rotor; 1083 struct css_set *cgroups; 1084 struct list_head cg_list; 1085 u32 closid; 1086 u32 rmid; 1087 struct robust_list_head *robust_list; 1088 struct compat_robust_list_head *compat_robust_list; 1089 struct list_head pi_state_list; 1090 struct futex_pi_state *pi_state_cache; 1091 struct mutex futex_exit_mutex; 1092 unsigned int futex_state; 1093 struct perf_event_context *perf_event_ctxp[2]; 1094 struct mutex perf_event_mutex; 1095 struct list_head perf_event_list; 1096 struct mempolicy *mempolicy; 1097 short int il_prev; 1098 short int pref_node_fork; 1099 int numa_scan_seq; 1100 unsigned int numa_scan_period; 1101 unsigned int numa_scan_period_max; 1102 int numa_preferred_nid; 1103 long unsigned int numa_migrate_retry; 1104 u64 node_stamp; 1105 u64 last_task_numa_placement; 1106 u64 last_sum_exec_runtime; 1107 struct callback_head numa_work; 1108 struct numa_group *numa_group; 1109 long unsigned int *numa_faults; 1110 long unsigned int total_numa_faults; 1111 long unsigned int numa_faults_locality[3]; 1112 long unsigned int numa_pages_migrated; 1113 struct rseq *rseq; 1114 u32 rseq_sig; 1115 long unsigned int rseq_event_mask; 1116 struct tlbflush_unmap_batch tlb_ubc; 1117 union { 1118 refcount_t rcu_users; 1119 struct callback_head rcu; 1120 }; 1121 struct pipe_inode_info *splice_pipe; 1122 struct page_frag task_frag; 1123 struct task_delay_info *delays; 1124 int nr_dirtied; 1125 int nr_dirtied_pause; 1126 long unsigned int dirty_paused_when; 1127 int latency_record_count; 1128 struct latency_record latency_record[32]; 1129 u64 timer_slack_ns; 1130 u64 default_timer_slack_ns; 1131 int curr_ret_stack; 1132 int curr_ret_depth; 1133 struct ftrace_ret_stack *ret_stack; 1134 long long unsigned int ftrace_timestamp; 1135 atomic_t trace_overrun; 1136 atomic_t tracing_graph_pause; 1137 long unsigned int trace; 1138 long unsigned int trace_recursion; 1139 struct mem_cgroup *memcg_in_oom; 1140 gfp_t memcg_oom_gfp_mask; 1141 int memcg_oom_order; 1142 unsigned int memcg_nr_pages_over_high; 1143 struct mem_cgroup *active_memcg; 1144 struct request_queue *throttle_queue; 1145 struct uprobe_task *utask; 1146 unsigned int sequential_io; 1147 unsigned int sequential_io_avg; 1148 struct kmap_ctrl kmap_ctrl; 1149 int pagefault_disabled; 1150 struct task_struct *oom_reaper_list; 1151 struct vm_struct *stack_vm_area; 1152 refcount_t stack_refcount; 1153 int patch_state; 1154 void *security; 1155 void *mce_vaddr; 1156 __u64 mce_kflags; 1157 u64 mce_addr; 1158 __u64 mce_ripv: 1; 1159 __u64 mce_whole_page: 1; 1160 __u64 __mce_reserved: 62; 1161 struct callback_head mce_kill_me; 1162 struct llist_head kretprobe_instances; 1163 long: 64; 1164 long: 64; 1165 long: 64; 1166 long: 64; 1167 long: 64; 1168 long: 64; 1169 long: 64; 1170 struct thread_struct thread; 1171 }; 1172 1173 struct screen_info { 1174 __u8 orig_x; 1175 __u8 orig_y; 1176 __u16 ext_mem_k; 1177 __u16 orig_video_page; 1178 __u8 orig_video_mode; 1179 __u8 orig_video_cols; 1180 __u8 flags; 1181 __u8 unused2; 1182 __u16 orig_video_ega_bx; 1183 __u16 unused3; 1184 __u8 orig_video_lines; 1185 __u8 orig_video_isVGA; 1186 __u16 orig_video_points; 1187 __u16 lfb_width; 1188 __u16 lfb_height; 1189 __u16 lfb_depth; 1190 __u32 lfb_base; 1191 __u32 lfb_size; 1192 __u16 cl_magic; 1193 __u16 cl_offset; 1194 __u16 lfb_linelength; 1195 __u8 red_size; 1196 __u8 red_pos; 1197 __u8 green_size; 1198 __u8 green_pos; 1199 __u8 blue_size; 1200 __u8 blue_pos; 1201 __u8 rsvd_size; 1202 __u8 rsvd_pos; 1203 __u16 vesapm_seg; 1204 __u16 vesapm_off; 1205 __u16 pages; 1206 __u16 vesa_attributes; 1207 __u32 capabilities; 1208 __u32 ext_lfb_base; 1209 __u8 _reserved[2]; 1210 } __attribute__((packed)); 1211 1212 struct apm_bios_info { 1213 __u16 version; 1214 __u16 cseg; 1215 __u32 offset; 1216 __u16 cseg_16; 1217 __u16 dseg; 1218 __u16 flags; 1219 __u16 cseg_len; 1220 __u16 cseg_16_len; 1221 __u16 dseg_len; 1222 }; 1223 1224 struct edd_device_params { 1225 __u16 length; 1226 __u16 info_flags; 1227 __u32 num_default_cylinders; 1228 __u32 num_default_heads; 1229 __u32 sectors_per_track; 1230 __u64 number_of_sectors; 1231 __u16 bytes_per_sector; 1232 __u32 dpte_ptr; 1233 __u16 key; 1234 __u8 device_path_info_length; 1235 __u8 reserved2; 1236 __u16 reserved3; 1237 __u8 host_bus_type[4]; 1238 __u8 interface_type[8]; 1239 union { 1240 struct { 1241 __u16 base_address; 1242 __u16 reserved1; 1243 __u32 reserved2; 1244 } isa; 1245 struct { 1246 __u8 bus; 1247 __u8 slot; 1248 __u8 function; 1249 __u8 channel; 1250 __u32 reserved; 1251 } pci; 1252 struct { 1253 __u64 reserved; 1254 } ibnd; 1255 struct { 1256 __u64 reserved; 1257 } xprs; 1258 struct { 1259 __u64 reserved; 1260 } htpt; 1261 struct { 1262 __u64 reserved; 1263 } unknown; 1264 } interface_path; 1265 union { 1266 struct { 1267 __u8 device; 1268 __u8 reserved1; 1269 __u16 reserved2; 1270 __u32 reserved3; 1271 __u64 reserved4; 1272 } ata; 1273 struct { 1274 __u8 device; 1275 __u8 lun; 1276 __u8 reserved1; 1277 __u8 reserved2; 1278 __u32 reserved3; 1279 __u64 reserved4; 1280 } atapi; 1281 struct { 1282 __u16 id; 1283 __u64 lun; 1284 __u16 reserved1; 1285 __u32 reserved2; 1286 } __attribute__((packed)) scsi; 1287 struct { 1288 __u64 serial_number; 1289 __u64 reserved; 1290 } usb; 1291 struct { 1292 __u64 eui; 1293 __u64 reserved; 1294 } i1394; 1295 struct { 1296 __u64 wwid; 1297 __u64 lun; 1298 } fibre; 1299 struct { 1300 __u64 identity_tag; 1301 __u64 reserved; 1302 } i2o; 1303 struct { 1304 __u32 array_number; 1305 __u32 reserved1; 1306 __u64 reserved2; 1307 } raid; 1308 struct { 1309 __u8 device; 1310 __u8 reserved1; 1311 __u16 reserved2; 1312 __u32 reserved3; 1313 __u64 reserved4; 1314 } sata; 1315 struct { 1316 __u64 reserved1; 1317 __u64 reserved2; 1318 } unknown; 1319 } device_path; 1320 __u8 reserved4; 1321 __u8 checksum; 1322 } __attribute__((packed)); 1323 1324 struct edd_info { 1325 __u8 device; 1326 __u8 version; 1327 __u16 interface_support; 1328 __u16 legacy_max_cylinder; 1329 __u8 legacy_max_head; 1330 __u8 legacy_sectors_per_track; 1331 struct edd_device_params params; 1332 } __attribute__((packed)); 1333 1334 struct ist_info { 1335 __u32 signature; 1336 __u32 command; 1337 __u32 event; 1338 __u32 perf_level; 1339 }; 1340 1341 struct edid_info { 1342 unsigned char dummy[128]; 1343 }; 1344 1345 struct setup_header { 1346 __u8 setup_sects; 1347 __u16 root_flags; 1348 __u32 syssize; 1349 __u16 ram_size; 1350 __u16 vid_mode; 1351 __u16 root_dev; 1352 __u16 boot_flag; 1353 __u16 jump; 1354 __u32 header; 1355 __u16 version; 1356 __u32 realmode_swtch; 1357 __u16 start_sys_seg; 1358 __u16 kernel_version; 1359 __u8 type_of_loader; 1360 __u8 loadflags; 1361 __u16 setup_move_size; 1362 __u32 code32_start; 1363 __u32 ramdisk_image; 1364 __u32 ramdisk_size; 1365 __u32 bootsect_kludge; 1366 __u16 heap_end_ptr; 1367 __u8 ext_loader_ver; 1368 __u8 ext_loader_type; 1369 __u32 cmd_line_ptr; 1370 __u32 initrd_addr_max; 1371 __u32 kernel_alignment; 1372 __u8 relocatable_kernel; 1373 __u8 min_alignment; 1374 __u16 xloadflags; 1375 __u32 cmdline_size; 1376 __u32 hardware_subarch; 1377 __u64 hardware_subarch_data; 1378 __u32 payload_offset; 1379 __u32 payload_length; 1380 __u64 setup_data; 1381 __u64 pref_address; 1382 __u32 init_size; 1383 __u32 handover_offset; 1384 __u32 kernel_info_offset; 1385 } __attribute__((packed)); 1386 1387 struct sys_desc_table { 1388 __u16 length; 1389 __u8 table[14]; 1390 }; 1391 1392 struct olpc_ofw_header { 1393 __u32 ofw_magic; 1394 __u32 ofw_version; 1395 __u32 cif_handler; 1396 __u32 irq_desc_table; 1397 }; 1398 1399 struct efi_info { 1400 __u32 efi_loader_signature; 1401 __u32 efi_systab; 1402 __u32 efi_memdesc_size; 1403 __u32 efi_memdesc_version; 1404 __u32 efi_memmap; 1405 __u32 efi_memmap_size; 1406 __u32 efi_systab_hi; 1407 __u32 efi_memmap_hi; 1408 }; 1409 1410 struct boot_e820_entry { 1411 __u64 addr; 1412 __u64 size; 1413 __u32 type; 1414 } __attribute__((packed)); 1415 1416 struct boot_params { 1417 struct screen_info screen_info; 1418 struct apm_bios_info apm_bios_info; 1419 __u8 _pad2[4]; 1420 __u64 tboot_addr; 1421 struct ist_info ist_info; 1422 __u64 acpi_rsdp_addr; 1423 __u8 _pad3[8]; 1424 __u8 hd0_info[16]; 1425 __u8 hd1_info[16]; 1426 struct sys_desc_table sys_desc_table; 1427 struct olpc_ofw_header olpc_ofw_header; 1428 __u32 ext_ramdisk_image; 1429 __u32 ext_ramdisk_size; 1430 __u32 ext_cmd_line_ptr; 1431 __u8 _pad4[116]; 1432 struct edid_info edid_info; 1433 struct efi_info efi_info; 1434 __u32 alt_mem_k; 1435 __u32 scratch; 1436 __u8 e820_entries; 1437 __u8 eddbuf_entries; 1438 __u8 edd_mbr_sig_buf_entries; 1439 __u8 kbd_status; 1440 __u8 secure_boot; 1441 __u8 _pad5[2]; 1442 __u8 sentinel; 1443 __u8 _pad6[1]; 1444 struct setup_header hdr; 1445 __u8 _pad7[36]; 1446 __u32 edd_mbr_sig_buffer[16]; 1447 struct boot_e820_entry e820_table[128]; 1448 __u8 _pad8[48]; 1449 struct edd_info eddbuf[6]; 1450 __u8 _pad9[276]; 1451 } __attribute__((packed)); 1452 1453 enum x86_hardware_subarch { 1454 X86_SUBARCH_PC = 0, 1455 X86_SUBARCH_LGUEST = 1, 1456 X86_SUBARCH_XEN = 2, 1457 X86_SUBARCH_INTEL_MID = 3, 1458 X86_SUBARCH_CE4100 = 4, 1459 X86_NR_SUBARCHS = 5, 1460 }; 1461 1462 struct range { 1463 u64 start; 1464 u64 end; 1465 }; 1466 1467 struct pt_regs { 1468 long unsigned int r15; 1469 long unsigned int r14; 1470 long unsigned int r13; 1471 long unsigned int r12; 1472 long unsigned int bp; 1473 long unsigned int bx; 1474 long unsigned int r11; 1475 long unsigned int r10; 1476 long unsigned int r9; 1477 long unsigned int r8; 1478 long unsigned int ax; 1479 long unsigned int cx; 1480 long unsigned int dx; 1481 long unsigned int si; 1482 long unsigned int di; 1483 long unsigned int orig_ax; 1484 long unsigned int ip; 1485 long unsigned int cs; 1486 long unsigned int flags; 1487 long unsigned int sp; 1488 long unsigned int ss; 1489 }; 1490 1491 enum { 1492 GATE_INTERRUPT = 14, 1493 GATE_TRAP = 15, 1494 GATE_CALL = 12, 1495 GATE_TASK = 5, 1496 }; 1497 1498 struct idt_bits { 1499 u16 ist: 3; 1500 u16 zero: 5; 1501 u16 type: 5; 1502 u16 dpl: 2; 1503 u16 p: 1; 1504 }; 1505 1506 struct idt_data { 1507 unsigned int vector; 1508 unsigned int segment; 1509 struct idt_bits bits; 1510 const void *addr; 1511 }; 1512 1513 struct gate_struct { 1514 u16 offset_low; 1515 u16 segment; 1516 struct idt_bits bits; 1517 u16 offset_middle; 1518 u32 offset_high; 1519 u32 reserved; 1520 }; 1521 1522 typedef struct gate_struct gate_desc; 1523 1524 struct desc_ptr { 1525 short unsigned int size; 1526 long unsigned int address; 1527 } __attribute__((packed)); 1528 1529 typedef long unsigned int pteval_t; 1530 1531 typedef long unsigned int pmdval_t; 1532 1533 typedef long unsigned int pudval_t; 1534 1535 typedef long unsigned int p4dval_t; 1536 1537 typedef long unsigned int pgdval_t; 1538 1539 typedef long unsigned int pgprotval_t; 1540 1541 typedef struct { 1542 pteval_t pte; 1543 } pte_t; 1544 1545 struct pgprot { 1546 pgprotval_t pgprot; 1547 }; 1548 1549 typedef struct pgprot pgprot_t; 1550 1551 typedef struct { 1552 pgdval_t pgd; 1553 } pgd_t; 1554 1555 typedef struct { 1556 p4dval_t p4d; 1557 } p4d_t; 1558 1559 typedef struct { 1560 pudval_t pud; 1561 } pud_t; 1562 1563 typedef struct { 1564 pmdval_t pmd; 1565 } pmd_t; 1566 1567 typedef struct page *pgtable_t; 1568 1569 struct address_space; 1570 1571 struct kmem_cache; 1572 1573 struct dev_pagemap; 1574 1575 struct page { 1576 long unsigned int flags; 1577 union { 1578 struct { 1579 struct list_head lru; 1580 struct address_space *mapping; 1581 long unsigned int index; 1582 long unsigned int private; 1583 }; 1584 struct { 1585 dma_addr_t dma_addr; 1586 }; 1587 struct { 1588 union { 1589 struct list_head slab_list; 1590 struct { 1591 struct page *next; 1592 int pages; 1593 int pobjects; 1594 }; 1595 }; 1596 struct kmem_cache *slab_cache; 1597 void *freelist; 1598 union { 1599 void *s_mem; 1600 long unsigned int counters; 1601 struct { 1602 unsigned int inuse: 16; 1603 unsigned int objects: 15; 1604 unsigned int frozen: 1; 1605 }; 1606 }; 1607 }; 1608 struct { 1609 long unsigned int compound_head; 1610 unsigned char compound_dtor; 1611 unsigned char compound_order; 1612 atomic_t compound_mapcount; 1613 unsigned int compound_nr; 1614 }; 1615 struct { 1616 long unsigned int _compound_pad_1; 1617 atomic_t hpage_pinned_refcount; 1618 struct list_head deferred_list; 1619 }; 1620 struct { 1621 long unsigned int _pt_pad_1; 1622 pgtable_t pmd_huge_pte; 1623 long unsigned int _pt_pad_2; 1624 union { 1625 struct mm_struct *pt_mm; 1626 atomic_t pt_frag_refcount; 1627 }; 1628 spinlock_t ptl; 1629 }; 1630 struct { 1631 struct dev_pagemap *pgmap; 1632 void *zone_device_data; 1633 }; 1634 struct callback_head callback_head; 1635 }; 1636 union { 1637 atomic_t _mapcount; 1638 unsigned int page_type; 1639 unsigned int active; 1640 int units; 1641 }; 1642 atomic_t _refcount; 1643 long unsigned int memcg_data; 1644 }; 1645 1646 struct paravirt_callee_save { 1647 void *func; 1648 }; 1649 1650 struct pv_init_ops { 1651 unsigned int (*patch)(u8, void *, long unsigned int, unsigned int); 1652 }; 1653 1654 struct pv_lazy_ops { 1655 void (*enter)(); 1656 void (*leave)(); 1657 void (*flush)(); 1658 }; 1659 1660 struct pv_time_ops { 1661 long long unsigned int (*sched_clock)(); 1662 long long unsigned int (*steal_clock)(int); 1663 }; 1664 1665 struct pv_cpu_ops { 1666 void (*io_delay)(); 1667 long unsigned int (*get_debugreg)(int); 1668 void (*set_debugreg)(int, long unsigned int); 1669 long unsigned int (*read_cr0)(); 1670 void (*write_cr0)(long unsigned int); 1671 void (*write_cr4)(long unsigned int); 1672 void (*load_tr_desc)(); 1673 void (*load_gdt)(const struct desc_ptr *); 1674 void (*load_idt)(const struct desc_ptr *); 1675 void (*set_ldt)(const void *, unsigned int); 1676 long unsigned int (*store_tr)(); 1677 void (*load_tls)(struct thread_struct *, unsigned int); 1678 void (*load_gs_index)(unsigned int); 1679 void (*write_ldt_entry)(struct desc_struct *, int, const void *); 1680 void (*write_gdt_entry)(struct desc_struct *, int, const void *, int); 1681 void (*write_idt_entry)(gate_desc *, int, const gate_desc *); 1682 void (*alloc_ldt)(struct desc_struct *, unsigned int); 1683 void (*free_ldt)(struct desc_struct *, unsigned int); 1684 void (*load_sp0)(long unsigned int); 1685 void (*invalidate_io_bitmap)(); 1686 void (*update_io_bitmap)(); 1687 void (*wbinvd)(); 1688 void (*cpuid)(unsigned int *, unsigned int *, unsigned int *, unsigned int *); 1689 u64 (*read_msr)(unsigned int); 1690 void (*write_msr)(unsigned int, unsigned int, unsigned int); 1691 u64 (*read_msr_safe)(unsigned int, int *); 1692 int (*write_msr_safe)(unsigned int, unsigned int, unsigned int); 1693 u64 (*read_pmc)(int); 1694 void (*usergs_sysret64)(); 1695 void (*iret)(); 1696 void (*swapgs)(); 1697 void (*start_context_switch)(struct task_struct *); 1698 void (*end_context_switch)(struct task_struct *); 1699 }; 1700 1701 struct pv_irq_ops { 1702 struct paravirt_callee_save save_fl; 1703 struct paravirt_callee_save restore_fl; 1704 struct paravirt_callee_save irq_disable; 1705 struct paravirt_callee_save irq_enable; 1706 void (*safe_halt)(); 1707 void (*halt)(); 1708 }; 1709 1710 struct flush_tlb_info; 1711 1712 struct mmu_gather; 1713 1714 struct pv_mmu_ops { 1715 void (*flush_tlb_user)(); 1716 void (*flush_tlb_kernel)(); 1717 void (*flush_tlb_one_user)(long unsigned int); 1718 void (*flush_tlb_others)(const struct cpumask *, const struct flush_tlb_info *); 1719 void (*tlb_remove_table)(struct mmu_gather *, void *); 1720 void (*exit_mmap)(struct mm_struct *); 1721 struct paravirt_callee_save read_cr2; 1722 void (*write_cr2)(long unsigned int); 1723 long unsigned int (*read_cr3)(); 1724 void (*write_cr3)(long unsigned int); 1725 void (*activate_mm)(struct mm_struct *, struct mm_struct *); 1726 void (*dup_mmap)(struct mm_struct *, struct mm_struct *); 1727 int (*pgd_alloc)(struct mm_struct *); 1728 void (*pgd_free)(struct mm_struct *, pgd_t *); 1729 void (*alloc_pte)(struct mm_struct *, long unsigned int); 1730 void (*alloc_pmd)(struct mm_struct *, long unsigned int); 1731 void (*alloc_pud)(struct mm_struct *, long unsigned int); 1732 void (*alloc_p4d)(struct mm_struct *, long unsigned int); 1733 void (*release_pte)(long unsigned int); 1734 void (*release_pmd)(long unsigned int); 1735 void (*release_pud)(long unsigned int); 1736 void (*release_p4d)(long unsigned int); 1737 void (*set_pte)(pte_t *, pte_t); 1738 void (*set_pmd)(pmd_t *, pmd_t); 1739 pte_t (*ptep_modify_prot_start)(struct vm_area_struct *, long unsigned int, pte_t *); 1740 void (*ptep_modify_prot_commit)(struct vm_area_struct *, long unsigned int, pte_t *, pte_t); 1741 struct paravirt_callee_save pte_val; 1742 struct paravirt_callee_save make_pte; 1743 struct paravirt_callee_save pgd_val; 1744 struct paravirt_callee_save make_pgd; 1745 void (*set_pud)(pud_t *, pud_t); 1746 struct paravirt_callee_save pmd_val; 1747 struct paravirt_callee_save make_pmd; 1748 struct paravirt_callee_save pud_val; 1749 struct paravirt_callee_save make_pud; 1750 void (*set_p4d)(p4d_t *, p4d_t); 1751 struct paravirt_callee_save p4d_val; 1752 struct paravirt_callee_save make_p4d; 1753 void (*set_pgd)(pgd_t *, pgd_t); 1754 struct pv_lazy_ops lazy_mode; 1755 void (*set_fixmap)(unsigned int, phys_addr_t, pgprot_t); 1756 }; 1757 1758 struct flush_tlb_info { 1759 struct mm_struct *mm; 1760 long unsigned int start; 1761 long unsigned int end; 1762 u64 new_tlb_gen; 1763 unsigned int stride_shift; 1764 bool freed_tables; 1765 }; 1766 1767 struct rw_semaphore { 1768 atomic_long_t count; 1769 atomic_long_t owner; 1770 struct optimistic_spin_queue osq; 1771 raw_spinlock_t wait_lock; 1772 struct list_head wait_list; 1773 }; 1774 1775 struct mm_rss_stat { 1776 atomic_long_t count[4]; 1777 }; 1778 1779 struct ldt_struct; 1780 1781 struct vdso_image; 1782 1783 typedef struct { 1784 u64 ctx_id; 1785 atomic64_t tlb_gen; 1786 struct rw_semaphore ldt_usr_sem; 1787 struct ldt_struct *ldt; 1788 short unsigned int flags; 1789 struct mutex lock; 1790 void *vdso; 1791 const struct vdso_image *vdso_image; 1792 atomic_t perf_rdpmc_allowed; 1793 u16 pkey_allocation_map; 1794 s16 execute_only_pkey; 1795 } mm_context_t; 1796 1797 struct xol_area; 1798 1799 struct uprobes_state { 1800 struct xol_area *xol_area; 1801 }; 1802 1803 struct work_struct; 1804 1805 typedef void (*work_func_t)(struct work_struct *); 1806 1807 struct work_struct { 1808 atomic_long_t data; 1809 struct list_head entry; 1810 work_func_t func; 1811 }; 1812 1813 struct linux_binfmt; 1814 1815 struct core_state; 1816 1817 struct kioctx_table; 1818 1819 struct user_namespace; 1820 1821 struct mmu_notifier_subscriptions; 1822 1823 struct mm_struct { 1824 struct { 1825 struct vm_area_struct *mmap; 1826 struct rb_root mm_rb; 1827 u64 vmacache_seqnum; 1828 long unsigned int (*get_unmapped_area)(struct file *, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 1829 long unsigned int mmap_base; 1830 long unsigned int mmap_legacy_base; 1831 long unsigned int mmap_compat_base; 1832 long unsigned int mmap_compat_legacy_base; 1833 long unsigned int task_size; 1834 long unsigned int highest_vm_end; 1835 pgd_t *pgd; 1836 atomic_t membarrier_state; 1837 atomic_t mm_users; 1838 atomic_t mm_count; 1839 atomic_t has_pinned; 1840 seqcount_t write_protect_seq; 1841 atomic_long_t pgtables_bytes; 1842 int map_count; 1843 spinlock_t page_table_lock; 1844 struct rw_semaphore mmap_lock; 1845 struct list_head mmlist; 1846 long unsigned int hiwater_rss; 1847 long unsigned int hiwater_vm; 1848 long unsigned int total_vm; 1849 long unsigned int locked_vm; 1850 atomic64_t pinned_vm; 1851 long unsigned int data_vm; 1852 long unsigned int exec_vm; 1853 long unsigned int stack_vm; 1854 long unsigned int def_flags; 1855 spinlock_t arg_lock; 1856 long unsigned int start_code; 1857 long unsigned int end_code; 1858 long unsigned int start_data; 1859 long unsigned int end_data; 1860 long unsigned int start_brk; 1861 long unsigned int brk; 1862 long unsigned int start_stack; 1863 long unsigned int arg_start; 1864 long unsigned int arg_end; 1865 long unsigned int env_start; 1866 long unsigned int env_end; 1867 long unsigned int saved_auxv[46]; 1868 struct mm_rss_stat rss_stat; 1869 struct linux_binfmt *binfmt; 1870 mm_context_t context; 1871 long unsigned int flags; 1872 struct core_state *core_state; 1873 spinlock_t ioctx_lock; 1874 struct kioctx_table *ioctx_table; 1875 struct task_struct *owner; 1876 struct user_namespace *user_ns; 1877 struct file *exe_file; 1878 struct mmu_notifier_subscriptions *notifier_subscriptions; 1879 long unsigned int numa_next_scan; 1880 long unsigned int numa_scan_offset; 1881 int numa_scan_seq; 1882 atomic_t tlb_flush_pending; 1883 bool tlb_flush_batched; 1884 struct uprobes_state uprobes_state; 1885 atomic_long_t hugetlb_usage; 1886 struct work_struct async_put_work; 1887 u32 pasid; 1888 }; 1889 long unsigned int cpu_bitmap[0]; 1890 }; 1891 1892 struct userfaultfd_ctx; 1893 1894 struct vm_userfaultfd_ctx { 1895 struct userfaultfd_ctx *ctx; 1896 }; 1897 1898 struct anon_vma; 1899 1900 struct vm_operations_struct; 1901 1902 struct vm_area_struct { 1903 long unsigned int vm_start; 1904 long unsigned int vm_end; 1905 struct vm_area_struct *vm_next; 1906 struct vm_area_struct *vm_prev; 1907 struct rb_node vm_rb; 1908 long unsigned int rb_subtree_gap; 1909 struct mm_struct *vm_mm; 1910 pgprot_t vm_page_prot; 1911 long unsigned int vm_flags; 1912 struct { 1913 struct rb_node rb; 1914 long unsigned int rb_subtree_last; 1915 } shared; 1916 struct list_head anon_vma_chain; 1917 struct anon_vma *anon_vma; 1918 const struct vm_operations_struct *vm_ops; 1919 long unsigned int vm_pgoff; 1920 struct file *vm_file; 1921 void *vm_private_data; 1922 atomic_long_t swap_readahead_info; 1923 struct mempolicy *vm_policy; 1924 struct vm_userfaultfd_ctx vm_userfaultfd_ctx; 1925 }; 1926 1927 struct pv_lock_ops { 1928 void (*queued_spin_lock_slowpath)(struct qspinlock *, u32); 1929 struct paravirt_callee_save queued_spin_unlock; 1930 void (*wait)(u8 *, u8); 1931 void (*kick)(int); 1932 struct paravirt_callee_save vcpu_is_preempted; 1933 }; 1934 1935 struct paravirt_patch_template { 1936 struct pv_init_ops init; 1937 struct pv_time_ops time; 1938 struct pv_cpu_ops cpu; 1939 struct pv_irq_ops irq; 1940 struct pv_mmu_ops mmu; 1941 struct pv_lock_ops lock; 1942 }; 1943 1944 struct math_emu_info { 1945 long int ___orig_eip; 1946 struct pt_regs *regs; 1947 }; 1948 1949 enum { 1950 UNAME26 = 131072, 1951 ADDR_NO_RANDOMIZE = 262144, 1952 FDPIC_FUNCPTRS = 524288, 1953 MMAP_PAGE_ZERO = 1048576, 1954 ADDR_COMPAT_LAYOUT = 2097152, 1955 READ_IMPLIES_EXEC = 4194304, 1956 ADDR_LIMIT_32BIT = 8388608, 1957 SHORT_INODE = 16777216, 1958 WHOLE_SECONDS = 33554432, 1959 STICKY_TIMEOUTS = 67108864, 1960 ADDR_LIMIT_3GB = 134217728, 1961 }; 1962 1963 enum tlb_infos { 1964 ENTRIES = 0, 1965 NR_INFO = 1, 1966 }; 1967 1968 enum pcpu_fc { 1969 PCPU_FC_AUTO = 0, 1970 PCPU_FC_EMBED = 1, 1971 PCPU_FC_PAGE = 2, 1972 PCPU_FC_NR = 3, 1973 }; 1974 1975 struct vm_struct { 1976 struct vm_struct *next; 1977 void *addr; 1978 long unsigned int size; 1979 long unsigned int flags; 1980 struct page **pages; 1981 unsigned int nr_pages; 1982 phys_addr_t phys_addr; 1983 const void *caller; 1984 }; 1985 1986 struct wait_queue_head { 1987 spinlock_t lock; 1988 struct list_head head; 1989 }; 1990 1991 typedef struct wait_queue_head wait_queue_head_t; 1992 1993 struct seqcount_raw_spinlock { 1994 seqcount_t seqcount; 1995 }; 1996 1997 typedef struct seqcount_raw_spinlock seqcount_raw_spinlock_t; 1998 1999 typedef struct { 2000 seqcount_spinlock_t seqcount; 2001 spinlock_t lock; 2002 } seqlock_t; 2003 2004 enum node_states { 2005 N_POSSIBLE = 0, 2006 N_ONLINE = 1, 2007 N_NORMAL_MEMORY = 2, 2008 N_HIGH_MEMORY = 2, 2009 N_MEMORY = 3, 2010 N_CPU = 4, 2011 N_GENERIC_INITIATOR = 5, 2012 NR_NODE_STATES = 6, 2013 }; 2014 2015 enum { 2016 MM_FILEPAGES = 0, 2017 MM_ANONPAGES = 1, 2018 MM_SWAPENTS = 2, 2019 MM_SHMEMPAGES = 3, 2020 NR_MM_COUNTERS = 4, 2021 }; 2022 2023 struct swait_queue_head { 2024 raw_spinlock_t lock; 2025 struct list_head task_list; 2026 }; 2027 2028 struct completion { 2029 unsigned int done; 2030 struct swait_queue_head wait; 2031 }; 2032 2033 struct arch_uprobe_task { 2034 long unsigned int saved_scratch_register; 2035 unsigned int saved_trap_nr; 2036 unsigned int saved_tf; 2037 }; 2038 2039 enum uprobe_task_state { 2040 UTASK_RUNNING = 0, 2041 UTASK_SSTEP = 1, 2042 UTASK_SSTEP_ACK = 2, 2043 UTASK_SSTEP_TRAPPED = 3, 2044 }; 2045 2046 struct uprobe; 2047 2048 struct return_instance; 2049 2050 struct uprobe_task { 2051 enum uprobe_task_state state; 2052 union { 2053 struct { 2054 struct arch_uprobe_task autask; 2055 long unsigned int vaddr; 2056 }; 2057 struct { 2058 struct callback_head dup_xol_work; 2059 long unsigned int dup_xol_addr; 2060 }; 2061 }; 2062 struct uprobe *active_uprobe; 2063 long unsigned int xol_vaddr; 2064 struct return_instance *return_instances; 2065 unsigned int depth; 2066 }; 2067 2068 struct return_instance { 2069 struct uprobe *uprobe; 2070 long unsigned int func; 2071 long unsigned int stack; 2072 long unsigned int orig_ret_vaddr; 2073 bool chained; 2074 struct return_instance *next; 2075 }; 2076 2077 struct vdso_image { 2078 void *data; 2079 long unsigned int size; 2080 long unsigned int alt; 2081 long unsigned int alt_len; 2082 long unsigned int extable_base; 2083 long unsigned int extable_len; 2084 const void *extable; 2085 long int sym_vvar_start; 2086 long int sym_vvar_page; 2087 long int sym_pvclock_page; 2088 long int sym_hvclock_page; 2089 long int sym_timens_page; 2090 long int sym_VDSO32_NOTE_MASK; 2091 long int sym___kernel_sigreturn; 2092 long int sym___kernel_rt_sigreturn; 2093 long int sym___kernel_vsyscall; 2094 long int sym_int80_landing_pad; 2095 long int sym_vdso32_sigreturn_landing_pad; 2096 long int sym_vdso32_rt_sigreturn_landing_pad; 2097 }; 2098 2099 struct xarray { 2100 spinlock_t xa_lock; 2101 gfp_t xa_flags; 2102 void *xa_head; 2103 }; 2104 2105 typedef u32 errseq_t; 2106 2107 struct address_space_operations; 2108 2109 struct address_space { 2110 struct inode *host; 2111 struct xarray i_pages; 2112 gfp_t gfp_mask; 2113 atomic_t i_mmap_writable; 2114 struct rb_root_cached i_mmap; 2115 struct rw_semaphore i_mmap_rwsem; 2116 long unsigned int nrpages; 2117 long unsigned int nrexceptional; 2118 long unsigned int writeback_index; 2119 const struct address_space_operations *a_ops; 2120 long unsigned int flags; 2121 errseq_t wb_err; 2122 spinlock_t private_lock; 2123 struct list_head private_list; 2124 void *private_data; 2125 }; 2126 2127 struct vmem_altmap { 2128 const long unsigned int base_pfn; 2129 const long unsigned int end_pfn; 2130 const long unsigned int reserve; 2131 long unsigned int free; 2132 long unsigned int align; 2133 long unsigned int alloc; 2134 }; 2135 2136 struct percpu_ref_data; 2137 2138 struct percpu_ref { 2139 long unsigned int percpu_count_ptr; 2140 struct percpu_ref_data *data; 2141 }; 2142 2143 enum memory_type { 2144 MEMORY_DEVICE_PRIVATE = 1, 2145 MEMORY_DEVICE_FS_DAX = 2, 2146 MEMORY_DEVICE_GENERIC = 3, 2147 MEMORY_DEVICE_PCI_P2PDMA = 4, 2148 }; 2149 2150 struct dev_pagemap_ops; 2151 2152 struct dev_pagemap { 2153 struct vmem_altmap altmap; 2154 struct percpu_ref *ref; 2155 struct percpu_ref internal_ref; 2156 struct completion done; 2157 enum memory_type type; 2158 unsigned int flags; 2159 const struct dev_pagemap_ops *ops; 2160 void *owner; 2161 int nr_range; 2162 union { 2163 struct range range; 2164 struct range ranges[0]; 2165 }; 2166 }; 2167 2168 struct vfsmount; 2169 2170 struct path { 2171 struct vfsmount *mnt; 2172 struct dentry *dentry; 2173 }; 2174 2175 enum rw_hint { 2176 WRITE_LIFE_NOT_SET = 0, 2177 WRITE_LIFE_NONE = 1, 2178 WRITE_LIFE_SHORT = 2, 2179 WRITE_LIFE_MEDIUM = 3, 2180 WRITE_LIFE_LONG = 4, 2181 WRITE_LIFE_EXTREME = 5, 2182 }; 2183 2184 enum pid_type { 2185 PIDTYPE_PID = 0, 2186 PIDTYPE_TGID = 1, 2187 PIDTYPE_PGID = 2, 2188 PIDTYPE_SID = 3, 2189 PIDTYPE_MAX = 4, 2190 }; 2191 2192 struct fown_struct { 2193 rwlock_t lock; 2194 struct pid *pid; 2195 enum pid_type pid_type; 2196 kuid_t uid; 2197 kuid_t euid; 2198 int signum; 2199 }; 2200 2201 struct file_ra_state { 2202 long unsigned int start; 2203 unsigned int size; 2204 unsigned int async_size; 2205 unsigned int ra_pages; 2206 unsigned int mmap_miss; 2207 loff_t prev_pos; 2208 }; 2209 2210 struct file { 2211 union { 2212 struct llist_node fu_llist; 2213 struct callback_head fu_rcuhead; 2214 } f_u; 2215 struct path f_path; 2216 struct inode *f_inode; 2217 const struct file_operations *f_op; 2218 spinlock_t f_lock; 2219 enum rw_hint f_write_hint; 2220 atomic_long_t f_count; 2221 unsigned int f_flags; 2222 fmode_t f_mode; 2223 struct mutex f_pos_lock; 2224 loff_t f_pos; 2225 struct fown_struct f_owner; 2226 const struct cred *f_cred; 2227 struct file_ra_state f_ra; 2228 u64 f_version; 2229 void *f_security; 2230 void *private_data; 2231 struct hlist_head *f_ep; 2232 struct address_space *f_mapping; 2233 errseq_t f_wb_err; 2234 errseq_t f_sb_err; 2235 }; 2236 2237 typedef unsigned int vm_fault_t; 2238 2239 enum page_entry_size { 2240 PE_SIZE_PTE = 0, 2241 PE_SIZE_PMD = 1, 2242 PE_SIZE_PUD = 2, 2243 }; 2244 2245 struct vm_fault; 2246 2247 struct vm_operations_struct { 2248 void (*open)(struct vm_area_struct *); 2249 void (*close)(struct vm_area_struct *); 2250 int (*may_split)(struct vm_area_struct *, long unsigned int); 2251 int (*mremap)(struct vm_area_struct *, long unsigned int); 2252 int (*mprotect)(struct vm_area_struct *, long unsigned int, long unsigned int, long unsigned int); 2253 vm_fault_t (*fault)(struct vm_fault *); 2254 vm_fault_t (*huge_fault)(struct vm_fault *, enum page_entry_size); 2255 void (*map_pages)(struct vm_fault *, long unsigned int, long unsigned int); 2256 long unsigned int (*pagesize)(struct vm_area_struct *); 2257 vm_fault_t (*page_mkwrite)(struct vm_fault *); 2258 vm_fault_t (*pfn_mkwrite)(struct vm_fault *); 2259 int (*access)(struct vm_area_struct *, long unsigned int, void *, int, int); 2260 const char * (*name)(struct vm_area_struct *); 2261 int (*set_policy)(struct vm_area_struct *, struct mempolicy *); 2262 struct mempolicy * (*get_policy)(struct vm_area_struct *, long unsigned int); 2263 struct page * (*find_special_page)(struct vm_area_struct *, long unsigned int); 2264 }; 2265 2266 struct core_thread { 2267 struct task_struct *task; 2268 struct core_thread *next; 2269 }; 2270 2271 struct core_state { 2272 atomic_t nr_threads; 2273 struct core_thread dumper; 2274 struct completion startup; 2275 }; 2276 2277 struct vm_fault { 2278 struct vm_area_struct *vma; 2279 unsigned int flags; 2280 gfp_t gfp_mask; 2281 long unsigned int pgoff; 2282 long unsigned int address; 2283 pmd_t *pmd; 2284 pud_t *pud; 2285 pte_t orig_pte; 2286 struct page *cow_page; 2287 struct page *page; 2288 pte_t *pte; 2289 spinlock_t *ptl; 2290 pgtable_t prealloc_pte; 2291 }; 2292 2293 enum migratetype { 2294 MIGRATE_UNMOVABLE = 0, 2295 MIGRATE_MOVABLE = 1, 2296 MIGRATE_RECLAIMABLE = 2, 2297 MIGRATE_PCPTYPES = 3, 2298 MIGRATE_HIGHATOMIC = 3, 2299 MIGRATE_CMA = 4, 2300 MIGRATE_ISOLATE = 5, 2301 MIGRATE_TYPES = 6, 2302 }; 2303 2304 enum numa_stat_item { 2305 NUMA_HIT = 0, 2306 NUMA_MISS = 1, 2307 NUMA_FOREIGN = 2, 2308 NUMA_INTERLEAVE_HIT = 3, 2309 NUMA_LOCAL = 4, 2310 NUMA_OTHER = 5, 2311 NR_VM_NUMA_STAT_ITEMS = 6, 2312 }; 2313 2314 enum zone_stat_item { 2315 NR_FREE_PAGES = 0, 2316 NR_ZONE_LRU_BASE = 1, 2317 NR_ZONE_INACTIVE_ANON = 1, 2318 NR_ZONE_ACTIVE_ANON = 2, 2319 NR_ZONE_INACTIVE_FILE = 3, 2320 NR_ZONE_ACTIVE_FILE = 4, 2321 NR_ZONE_UNEVICTABLE = 5, 2322 NR_ZONE_WRITE_PENDING = 6, 2323 NR_MLOCK = 7, 2324 NR_BOUNCE = 8, 2325 NR_ZSPAGES = 9, 2326 NR_FREE_CMA_PAGES = 10, 2327 NR_VM_ZONE_STAT_ITEMS = 11, 2328 }; 2329 2330 enum node_stat_item { 2331 NR_LRU_BASE = 0, 2332 NR_INACTIVE_ANON = 0, 2333 NR_ACTIVE_ANON = 1, 2334 NR_INACTIVE_FILE = 2, 2335 NR_ACTIVE_FILE = 3, 2336 NR_UNEVICTABLE = 4, 2337 NR_SLAB_RECLAIMABLE_B = 5, 2338 NR_SLAB_UNRECLAIMABLE_B = 6, 2339 NR_ISOLATED_ANON = 7, 2340 NR_ISOLATED_FILE = 8, 2341 WORKINGSET_NODES = 9, 2342 WORKINGSET_REFAULT_BASE = 10, 2343 WORKINGSET_REFAULT_ANON = 10, 2344 WORKINGSET_REFAULT_FILE = 11, 2345 WORKINGSET_ACTIVATE_BASE = 12, 2346 WORKINGSET_ACTIVATE_ANON = 12, 2347 WORKINGSET_ACTIVATE_FILE = 13, 2348 WORKINGSET_RESTORE_BASE = 14, 2349 WORKINGSET_RESTORE_ANON = 14, 2350 WORKINGSET_RESTORE_FILE = 15, 2351 WORKINGSET_NODERECLAIM = 16, 2352 NR_ANON_MAPPED = 17, 2353 NR_FILE_MAPPED = 18, 2354 NR_FILE_PAGES = 19, 2355 NR_FILE_DIRTY = 20, 2356 NR_WRITEBACK = 21, 2357 NR_WRITEBACK_TEMP = 22, 2358 NR_SHMEM = 23, 2359 NR_SHMEM_THPS = 24, 2360 NR_SHMEM_PMDMAPPED = 25, 2361 NR_FILE_THPS = 26, 2362 NR_FILE_PMDMAPPED = 27, 2363 NR_ANON_THPS = 28, 2364 NR_VMSCAN_WRITE = 29, 2365 NR_VMSCAN_IMMEDIATE = 30, 2366 NR_DIRTIED = 31, 2367 NR_WRITTEN = 32, 2368 NR_KERNEL_MISC_RECLAIMABLE = 33, 2369 NR_FOLL_PIN_ACQUIRED = 34, 2370 NR_FOLL_PIN_RELEASED = 35, 2371 NR_KERNEL_STACK_KB = 36, 2372 NR_PAGETABLE = 37, 2373 NR_VM_NODE_STAT_ITEMS = 38, 2374 }; 2375 2376 enum lru_list { 2377 LRU_INACTIVE_ANON = 0, 2378 LRU_ACTIVE_ANON = 1, 2379 LRU_INACTIVE_FILE = 2, 2380 LRU_ACTIVE_FILE = 3, 2381 LRU_UNEVICTABLE = 4, 2382 NR_LRU_LISTS = 5, 2383 }; 2384 2385 typedef unsigned int isolate_mode_t; 2386 2387 enum zone_watermarks { 2388 WMARK_MIN = 0, 2389 WMARK_LOW = 1, 2390 WMARK_HIGH = 2, 2391 NR_WMARK = 3, 2392 }; 2393 2394 enum { 2395 ZONELIST_FALLBACK = 0, 2396 ZONELIST_NOFALLBACK = 1, 2397 MAX_ZONELISTS = 2, 2398 }; 2399 2400 typedef void percpu_ref_func_t(struct percpu_ref *); 2401 2402 struct percpu_ref_data { 2403 atomic_long_t count; 2404 percpu_ref_func_t *release; 2405 percpu_ref_func_t *confirm_switch; 2406 bool force_atomic: 1; 2407 bool allow_reinit: 1; 2408 struct callback_head rcu; 2409 struct percpu_ref *ref; 2410 }; 2411 2412 struct shrink_control { 2413 gfp_t gfp_mask; 2414 int nid; 2415 long unsigned int nr_to_scan; 2416 long unsigned int nr_scanned; 2417 struct mem_cgroup *memcg; 2418 }; 2419 2420 struct shrinker { 2421 long unsigned int (*count_objects)(struct shrinker *, struct shrink_control *); 2422 long unsigned int (*scan_objects)(struct shrinker *, struct shrink_control *); 2423 long int batch; 2424 int seeks; 2425 unsigned int flags; 2426 struct list_head list; 2427 int id; 2428 atomic_long_t *nr_deferred; 2429 }; 2430 2431 struct rlimit { 2432 __kernel_ulong_t rlim_cur; 2433 __kernel_ulong_t rlim_max; 2434 }; 2435 2436 struct dev_pagemap_ops { 2437 void (*page_free)(struct page *); 2438 void (*kill)(struct dev_pagemap *); 2439 void (*cleanup)(struct dev_pagemap *); 2440 vm_fault_t (*migrate_to_ram)(struct vm_fault *); 2441 }; 2442 2443 struct pid_namespace; 2444 2445 struct upid { 2446 int nr; 2447 struct pid_namespace *ns; 2448 }; 2449 2450 struct pid { 2451 refcount_t count; 2452 unsigned int level; 2453 spinlock_t lock; 2454 struct hlist_head tasks[4]; 2455 struct hlist_head inodes; 2456 wait_queue_head_t wait_pidfd; 2457 struct callback_head rcu; 2458 struct upid numbers[1]; 2459 }; 2460 2461 typedef struct { 2462 gid_t val; 2463 } kgid_t; 2464 2465 struct hrtimer_cpu_base; 2466 2467 struct hrtimer_clock_base { 2468 struct hrtimer_cpu_base *cpu_base; 2469 unsigned int index; 2470 clockid_t clockid; 2471 seqcount_raw_spinlock_t seq; 2472 struct hrtimer *running; 2473 struct timerqueue_head active; 2474 ktime_t (*get_time)(); 2475 ktime_t offset; 2476 }; 2477 2478 struct hrtimer_cpu_base { 2479 raw_spinlock_t lock; 2480 unsigned int cpu; 2481 unsigned int active_bases; 2482 unsigned int clock_was_set_seq; 2483 unsigned int hres_active: 1; 2484 unsigned int in_hrtirq: 1; 2485 unsigned int hang_detected: 1; 2486 unsigned int softirq_activated: 1; 2487 unsigned int nr_events; 2488 short unsigned int nr_retries; 2489 short unsigned int nr_hangs; 2490 unsigned int max_hang_time; 2491 ktime_t expires_next; 2492 struct hrtimer *next_timer; 2493 ktime_t softirq_expires_next; 2494 struct hrtimer *softirq_next_timer; 2495 struct hrtimer_clock_base clock_base[8]; 2496 }; 2497 2498 enum hrtimer_base_type { 2499 HRTIMER_BASE_MONOTONIC = 0, 2500 HRTIMER_BASE_REALTIME = 1, 2501 HRTIMER_BASE_BOOTTIME = 2, 2502 HRTIMER_BASE_TAI = 3, 2503 HRTIMER_BASE_MONOTONIC_SOFT = 4, 2504 HRTIMER_BASE_REALTIME_SOFT = 5, 2505 HRTIMER_BASE_BOOTTIME_SOFT = 6, 2506 HRTIMER_BASE_TAI_SOFT = 7, 2507 HRTIMER_MAX_CLOCK_BASES = 8, 2508 }; 2509 2510 typedef void __signalfn_t(int); 2511 2512 typedef __signalfn_t *__sighandler_t; 2513 2514 typedef void __restorefn_t(); 2515 2516 typedef __restorefn_t *__sigrestore_t; 2517 2518 union sigval { 2519 int sival_int; 2520 void *sival_ptr; 2521 }; 2522 2523 typedef union sigval sigval_t; 2524 2525 union __sifields { 2526 struct { 2527 __kernel_pid_t _pid; 2528 __kernel_uid32_t _uid; 2529 } _kill; 2530 struct { 2531 __kernel_timer_t _tid; 2532 int _overrun; 2533 sigval_t _sigval; 2534 int _sys_private; 2535 } _timer; 2536 struct { 2537 __kernel_pid_t _pid; 2538 __kernel_uid32_t _uid; 2539 sigval_t _sigval; 2540 } _rt; 2541 struct { 2542 __kernel_pid_t _pid; 2543 __kernel_uid32_t _uid; 2544 int _status; 2545 __kernel_clock_t _utime; 2546 __kernel_clock_t _stime; 2547 } _sigchld; 2548 struct { 2549 void *_addr; 2550 union { 2551 short int _addr_lsb; 2552 struct { 2553 char _dummy_bnd[8]; 2554 void *_lower; 2555 void *_upper; 2556 } _addr_bnd; 2557 struct { 2558 char _dummy_pkey[8]; 2559 __u32 _pkey; 2560 } _addr_pkey; 2561 }; 2562 } _sigfault; 2563 struct { 2564 long int _band; 2565 int _fd; 2566 } _sigpoll; 2567 struct { 2568 void *_call_addr; 2569 int _syscall; 2570 unsigned int _arch; 2571 } _sigsys; 2572 }; 2573 2574 struct kernel_siginfo { 2575 struct { 2576 int si_signo; 2577 int si_errno; 2578 int si_code; 2579 union __sifields _sifields; 2580 }; 2581 }; 2582 2583 struct user_struct { 2584 refcount_t __count; 2585 atomic_t processes; 2586 atomic_t sigpending; 2587 atomic_t fanotify_listeners; 2588 atomic_long_t epoll_watches; 2589 long unsigned int mq_bytes; 2590 long unsigned int locked_shm; 2591 long unsigned int unix_inflight; 2592 atomic_long_t pipe_bufs; 2593 struct hlist_node uidhash_node; 2594 kuid_t uid; 2595 atomic_long_t locked_vm; 2596 atomic_t nr_watches; 2597 struct ratelimit_state ratelimit; 2598 }; 2599 2600 struct sigaction { 2601 __sighandler_t sa_handler; 2602 long unsigned int sa_flags; 2603 __sigrestore_t sa_restorer; 2604 sigset_t sa_mask; 2605 }; 2606 2607 struct k_sigaction { 2608 struct sigaction sa; 2609 }; 2610 2611 struct cpu_itimer { 2612 u64 expires; 2613 u64 incr; 2614 }; 2615 2616 struct task_cputime_atomic { 2617 atomic64_t utime; 2618 atomic64_t stime; 2619 atomic64_t sum_exec_runtime; 2620 }; 2621 2622 struct thread_group_cputimer { 2623 struct task_cputime_atomic cputime_atomic; 2624 }; 2625 2626 struct pacct_struct { 2627 int ac_flag; 2628 long int ac_exitcode; 2629 long unsigned int ac_mem; 2630 u64 ac_utime; 2631 u64 ac_stime; 2632 long unsigned int ac_minflt; 2633 long unsigned int ac_majflt; 2634 }; 2635 2636 struct tty_struct; 2637 2638 struct autogroup; 2639 2640 struct taskstats; 2641 2642 struct tty_audit_buf; 2643 2644 struct signal_struct { 2645 refcount_t sigcnt; 2646 atomic_t live; 2647 int nr_threads; 2648 struct list_head thread_head; 2649 wait_queue_head_t wait_chldexit; 2650 struct task_struct *curr_target; 2651 struct sigpending shared_pending; 2652 struct hlist_head multiprocess; 2653 int group_exit_code; 2654 int notify_count; 2655 struct task_struct *group_exit_task; 2656 int group_stop_count; 2657 unsigned int flags; 2658 unsigned int is_child_subreaper: 1; 2659 unsigned int has_child_subreaper: 1; 2660 int posix_timer_id; 2661 struct list_head posix_timers; 2662 struct hrtimer real_timer; 2663 ktime_t it_real_incr; 2664 struct cpu_itimer it[2]; 2665 struct thread_group_cputimer cputimer; 2666 struct posix_cputimers posix_cputimers; 2667 struct pid *pids[4]; 2668 atomic_t tick_dep_mask; 2669 struct pid *tty_old_pgrp; 2670 int leader; 2671 struct tty_struct *tty; 2672 struct autogroup *autogroup; 2673 seqlock_t stats_lock; 2674 u64 utime; 2675 u64 stime; 2676 u64 cutime; 2677 u64 cstime; 2678 u64 gtime; 2679 u64 cgtime; 2680 struct prev_cputime prev_cputime; 2681 long unsigned int nvcsw; 2682 long unsigned int nivcsw; 2683 long unsigned int cnvcsw; 2684 long unsigned int cnivcsw; 2685 long unsigned int min_flt; 2686 long unsigned int maj_flt; 2687 long unsigned int cmin_flt; 2688 long unsigned int cmaj_flt; 2689 long unsigned int inblock; 2690 long unsigned int oublock; 2691 long unsigned int cinblock; 2692 long unsigned int coublock; 2693 long unsigned int maxrss; 2694 long unsigned int cmaxrss; 2695 struct task_io_accounting ioac; 2696 long long unsigned int sum_sched_runtime; 2697 struct rlimit rlim[16]; 2698 struct pacct_struct pacct; 2699 struct taskstats *stats; 2700 unsigned int audit_tty; 2701 struct tty_audit_buf *tty_audit_buf; 2702 bool oom_flag_origin; 2703 short int oom_score_adj; 2704 short int oom_score_adj_min; 2705 struct mm_struct *oom_mm; 2706 struct mutex cred_guard_mutex; 2707 struct rw_semaphore exec_update_lock; 2708 }; 2709 2710 enum rseq_cs_flags_bit { 2711 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0, 2712 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1, 2713 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2, 2714 }; 2715 2716 struct rseq { 2717 __u32 cpu_id_start; 2718 __u32 cpu_id; 2719 union { 2720 __u64 ptr64; 2721 __u64 ptr; 2722 } rseq_cs; 2723 __u32 flags; 2724 long: 32; 2725 long: 64; 2726 }; 2727 2728 enum perf_event_task_context { 2729 perf_invalid_context = 4294967295, 2730 perf_hw_context = 0, 2731 perf_sw_context = 1, 2732 perf_nr_task_contexts = 2, 2733 }; 2734 2735 struct rq; 2736 2737 struct rq_flags; 2738 2739 struct sched_class { 2740 void (*enqueue_task)(struct rq *, struct task_struct *, int); 2741 void (*dequeue_task)(struct rq *, struct task_struct *, int); 2742 void (*yield_task)(struct rq *); 2743 bool (*yield_to_task)(struct rq *, struct task_struct *); 2744 void (*check_preempt_curr)(struct rq *, struct task_struct *, int); 2745 struct task_struct * (*pick_next_task)(struct rq *); 2746 void (*put_prev_task)(struct rq *, struct task_struct *); 2747 void (*set_next_task)(struct rq *, struct task_struct *, bool); 2748 int (*balance)(struct rq *, struct task_struct *, struct rq_flags *); 2749 int (*select_task_rq)(struct task_struct *, int, int); 2750 void (*migrate_task_rq)(struct task_struct *, int); 2751 void (*task_woken)(struct rq *, struct task_struct *); 2752 void (*set_cpus_allowed)(struct task_struct *, const struct cpumask *, u32); 2753 void (*rq_online)(struct rq *); 2754 void (*rq_offline)(struct rq *); 2755 struct rq * (*find_lock_rq)(struct task_struct *, struct rq *); 2756 void (*task_tick)(struct rq *, struct task_struct *, int); 2757 void (*task_fork)(struct task_struct *); 2758 void (*task_dead)(struct task_struct *); 2759 void (*switched_from)(struct rq *, struct task_struct *); 2760 void (*switched_to)(struct rq *, struct task_struct *); 2761 void (*prio_changed)(struct rq *, struct task_struct *, int); 2762 unsigned int (*get_rr_interval)(struct rq *, struct task_struct *); 2763 void (*update_curr)(struct rq *); 2764 void (*task_change_group)(struct task_struct *, int); 2765 }; 2766 2767 struct kernel_cap_struct { 2768 __u32 cap[2]; 2769 }; 2770 2771 typedef struct kernel_cap_struct kernel_cap_t; 2772 2773 struct group_info; 2774 2775 struct cred { 2776 atomic_t usage; 2777 kuid_t uid; 2778 kgid_t gid; 2779 kuid_t suid; 2780 kgid_t sgid; 2781 kuid_t euid; 2782 kgid_t egid; 2783 kuid_t fsuid; 2784 kgid_t fsgid; 2785 unsigned int securebits; 2786 kernel_cap_t cap_inheritable; 2787 kernel_cap_t cap_permitted; 2788 kernel_cap_t cap_effective; 2789 kernel_cap_t cap_bset; 2790 kernel_cap_t cap_ambient; 2791 unsigned char jit_keyring; 2792 struct key *session_keyring; 2793 struct key *process_keyring; 2794 struct key *thread_keyring; 2795 struct key *request_key_auth; 2796 void *security; 2797 struct user_struct *user; 2798 struct user_namespace *user_ns; 2799 struct group_info *group_info; 2800 union { 2801 int non_rcu; 2802 struct callback_head rcu; 2803 }; 2804 }; 2805 2806 typedef int32_t key_serial_t; 2807 2808 typedef uint32_t key_perm_t; 2809 2810 struct key_type; 2811 2812 struct key_tag; 2813 2814 struct keyring_index_key { 2815 long unsigned int hash; 2816 union { 2817 struct { 2818 u16 desc_len; 2819 char desc[6]; 2820 }; 2821 long unsigned int x; 2822 }; 2823 struct key_type *type; 2824 struct key_tag *domain_tag; 2825 const char *description; 2826 }; 2827 2828 union key_payload { 2829 void *rcu_data0; 2830 void *data[4]; 2831 }; 2832 2833 struct assoc_array_ptr; 2834 2835 struct assoc_array { 2836 struct assoc_array_ptr *root; 2837 long unsigned int nr_leaves_on_tree; 2838 }; 2839 2840 struct watch_list; 2841 2842 struct key_user; 2843 2844 struct key_restriction; 2845 2846 struct key { 2847 refcount_t usage; 2848 key_serial_t serial; 2849 union { 2850 struct list_head graveyard_link; 2851 struct rb_node serial_node; 2852 }; 2853 struct watch_list *watchers; 2854 struct rw_semaphore sem; 2855 struct key_user *user; 2856 void *security; 2857 union { 2858 time64_t expiry; 2859 time64_t revoked_at; 2860 }; 2861 time64_t last_used_at; 2862 kuid_t uid; 2863 kgid_t gid; 2864 key_perm_t perm; 2865 short unsigned int quotalen; 2866 short unsigned int datalen; 2867 short int state; 2868 long unsigned int flags; 2869 union { 2870 struct keyring_index_key index_key; 2871 struct { 2872 long unsigned int hash; 2873 long unsigned int len_desc; 2874 struct key_type *type; 2875 struct key_tag *domain_tag; 2876 char *description; 2877 }; 2878 }; 2879 union { 2880 union key_payload payload; 2881 struct { 2882 struct list_head name_link; 2883 struct assoc_array keys; 2884 }; 2885 }; 2886 struct key_restriction *restrict_link; 2887 }; 2888 2889 struct sighand_struct { 2890 spinlock_t siglock; 2891 refcount_t count; 2892 wait_queue_head_t signalfd_wqh; 2893 struct k_sigaction action[64]; 2894 }; 2895 2896 struct io_cq; 2897 2898 struct io_context { 2899 atomic_long_t refcount; 2900 atomic_t active_ref; 2901 atomic_t nr_tasks; 2902 spinlock_t lock; 2903 short unsigned int ioprio; 2904 struct xarray icq_tree; 2905 struct io_cq *icq_hint; 2906 struct hlist_head icq_list; 2907 struct work_struct release_work; 2908 }; 2909 2910 enum rseq_event_mask_bits { 2911 RSEQ_EVENT_PREEMPT_BIT = 0, 2912 RSEQ_EVENT_SIGNAL_BIT = 1, 2913 RSEQ_EVENT_MIGRATE_BIT = 2, 2914 }; 2915 2916 enum fixed_addresses { 2917 VSYSCALL_PAGE = 511, 2918 FIX_DBGP_BASE = 512, 2919 FIX_EARLYCON_MEM_BASE = 513, 2920 FIX_OHCI1394_BASE = 514, 2921 FIX_APIC_BASE = 515, 2922 FIX_IO_APIC_BASE_0 = 516, 2923 FIX_IO_APIC_BASE_END = 643, 2924 FIX_PARAVIRT_BOOTMAP = 644, 2925 FIX_APEI_GHES_IRQ = 645, 2926 FIX_APEI_GHES_NMI = 646, 2927 __end_of_permanent_fixed_addresses = 647, 2928 FIX_BTMAP_END = 1024, 2929 FIX_BTMAP_BEGIN = 1535, 2930 FIX_TBOOT_BASE = 1536, 2931 __end_of_fixed_addresses = 1537, 2932 }; 2933 2934 struct hlist_bl_node; 2935 2936 struct hlist_bl_head { 2937 struct hlist_bl_node *first; 2938 }; 2939 2940 struct hlist_bl_node { 2941 struct hlist_bl_node *next; 2942 struct hlist_bl_node **pprev; 2943 }; 2944 2945 struct lockref { 2946 union { 2947 __u64 lock_count; 2948 struct { 2949 spinlock_t lock; 2950 int count; 2951 }; 2952 }; 2953 }; 2954 2955 struct qstr { 2956 union { 2957 struct { 2958 u32 hash; 2959 u32 len; 2960 }; 2961 u64 hash_len; 2962 }; 2963 const unsigned char *name; 2964 }; 2965 2966 struct dentry_operations; 2967 2968 struct dentry { 2969 unsigned int d_flags; 2970 seqcount_spinlock_t d_seq; 2971 struct hlist_bl_node d_hash; 2972 struct dentry *d_parent; 2973 struct qstr d_name; 2974 struct inode *d_inode; 2975 unsigned char d_iname[32]; 2976 struct lockref d_lockref; 2977 const struct dentry_operations *d_op; 2978 struct super_block *d_sb; 2979 long unsigned int d_time; 2980 void *d_fsdata; 2981 union { 2982 struct list_head d_lru; 2983 wait_queue_head_t *d_wait; 2984 }; 2985 struct list_head d_child; 2986 struct list_head d_subdirs; 2987 union { 2988 struct hlist_node d_alias; 2989 struct hlist_bl_node d_in_lookup_hash; 2990 struct callback_head d_rcu; 2991 } d_u; 2992 }; 2993 2994 struct posix_acl; 2995 2996 struct inode_operations; 2997 2998 struct bdi_writeback; 2999 3000 struct file_lock_context; 3001 3002 struct cdev; 3003 3004 struct fsnotify_mark_connector; 3005 3006 struct fscrypt_info; 3007 3008 struct fsverity_info; 3009 3010 struct inode { 3011 umode_t i_mode; 3012 short unsigned int i_opflags; 3013 kuid_t i_uid; 3014 kgid_t i_gid; 3015 unsigned int i_flags; 3016 struct posix_acl *i_acl; 3017 struct posix_acl *i_default_acl; 3018 const struct inode_operations *i_op; 3019 struct super_block *i_sb; 3020 struct address_space *i_mapping; 3021 void *i_security; 3022 long unsigned int i_ino; 3023 union { 3024 const unsigned int i_nlink; 3025 unsigned int __i_nlink; 3026 }; 3027 dev_t i_rdev; 3028 loff_t i_size; 3029 struct timespec64 i_atime; 3030 struct timespec64 i_mtime; 3031 struct timespec64 i_ctime; 3032 spinlock_t i_lock; 3033 short unsigned int i_bytes; 3034 u8 i_blkbits; 3035 u8 i_write_hint; 3036 blkcnt_t i_blocks; 3037 long unsigned int i_state; 3038 struct rw_semaphore i_rwsem; 3039 long unsigned int dirtied_when; 3040 long unsigned int dirtied_time_when; 3041 struct hlist_node i_hash; 3042 struct list_head i_io_list; 3043 struct bdi_writeback *i_wb; 3044 int i_wb_frn_winner; 3045 u16 i_wb_frn_avg_time; 3046 u16 i_wb_frn_history; 3047 struct list_head i_lru; 3048 struct list_head i_sb_list; 3049 struct list_head i_wb_list; 3050 union { 3051 struct hlist_head i_dentry; 3052 struct callback_head i_rcu; 3053 }; 3054 atomic64_t i_version; 3055 atomic64_t i_sequence; 3056 atomic_t i_count; 3057 atomic_t i_dio_count; 3058 atomic_t i_writecount; 3059 atomic_t i_readcount; 3060 union { 3061 const struct file_operations *i_fop; 3062 void (*free_inode)(struct inode *); 3063 }; 3064 struct file_lock_context *i_flctx; 3065 struct address_space i_data; 3066 struct list_head i_devices; 3067 union { 3068 struct pipe_inode_info *i_pipe; 3069 struct cdev *i_cdev; 3070 char *i_link; 3071 unsigned int i_dir_seq; 3072 }; 3073 __u32 i_generation; 3074 __u32 i_fsnotify_mask; 3075 struct fsnotify_mark_connector *i_fsnotify_marks; 3076 struct fscrypt_info *i_crypt_info; 3077 struct fsverity_info *i_verity_info; 3078 void *i_private; 3079 }; 3080 3081 struct dentry_operations { 3082 int (*d_revalidate)(struct dentry *, unsigned int); 3083 int (*d_weak_revalidate)(struct dentry *, unsigned int); 3084 int (*d_hash)(const struct dentry *, struct qstr *); 3085 int (*d_compare)(const struct dentry *, unsigned int, const char *, const struct qstr *); 3086 int (*d_delete)(const struct dentry *); 3087 int (*d_init)(struct dentry *); 3088 void (*d_release)(struct dentry *); 3089 void (*d_prune)(struct dentry *); 3090 void (*d_iput)(struct dentry *, struct inode *); 3091 char * (*d_dname)(struct dentry *, char *, int); 3092 struct vfsmount * (*d_automount)(struct path *); 3093 int (*d_manage)(const struct path *, bool); 3094 struct dentry * (*d_real)(struct dentry *, const struct inode *); 3095 long: 64; 3096 long: 64; 3097 long: 64; 3098 }; 3099 3100 struct mtd_info; 3101 3102 typedef long long int qsize_t; 3103 3104 struct quota_format_type; 3105 3106 struct mem_dqinfo { 3107 struct quota_format_type *dqi_format; 3108 int dqi_fmt_id; 3109 struct list_head dqi_dirty_list; 3110 long unsigned int dqi_flags; 3111 unsigned int dqi_bgrace; 3112 unsigned int dqi_igrace; 3113 qsize_t dqi_max_spc_limit; 3114 qsize_t dqi_max_ino_limit; 3115 void *dqi_priv; 3116 }; 3117 3118 struct quota_format_ops; 3119 3120 struct quota_info { 3121 unsigned int flags; 3122 struct rw_semaphore dqio_sem; 3123 struct inode *files[3]; 3124 struct mem_dqinfo info[3]; 3125 const struct quota_format_ops *ops[3]; 3126 }; 3127 3128 struct rcu_sync { 3129 int gp_state; 3130 int gp_count; 3131 wait_queue_head_t gp_wait; 3132 struct callback_head cb_head; 3133 }; 3134 3135 struct rcuwait { 3136 struct task_struct *task; 3137 }; 3138 3139 struct percpu_rw_semaphore { 3140 struct rcu_sync rss; 3141 unsigned int *read_count; 3142 struct rcuwait writer; 3143 wait_queue_head_t waiters; 3144 atomic_t block; 3145 }; 3146 3147 struct sb_writers { 3148 int frozen; 3149 wait_queue_head_t wait_unfrozen; 3150 struct percpu_rw_semaphore rw_sem[3]; 3151 }; 3152 3153 typedef struct { 3154 __u8 b[16]; 3155 } uuid_t; 3156 3157 struct list_lru_node; 3158 3159 struct list_lru { 3160 struct list_lru_node *node; 3161 struct list_head list; 3162 int shrinker_id; 3163 bool memcg_aware; 3164 }; 3165 3166 struct super_operations; 3167 3168 struct dquot_operations; 3169 3170 struct quotactl_ops; 3171 3172 struct export_operations; 3173 3174 struct xattr_handler; 3175 3176 struct fscrypt_operations; 3177 3178 struct fsverity_operations; 3179 3180 struct unicode_map; 3181 3182 struct block_device; 3183 3184 struct workqueue_struct; 3185 3186 struct super_block { 3187 struct list_head s_list; 3188 dev_t s_dev; 3189 unsigned char s_blocksize_bits; 3190 long unsigned int s_blocksize; 3191 loff_t s_maxbytes; 3192 struct file_system_type *s_type; 3193 const struct super_operations *s_op; 3194 const struct dquot_operations *dq_op; 3195 const struct quotactl_ops *s_qcop; 3196 const struct export_operations *s_export_op; 3197 long unsigned int s_flags; 3198 long unsigned int s_iflags; 3199 long unsigned int s_magic; 3200 struct dentry *s_root; 3201 struct rw_semaphore s_umount; 3202 int s_count; 3203 atomic_t s_active; 3204 void *s_security; 3205 const struct xattr_handler **s_xattr; 3206 const struct fscrypt_operations *s_cop; 3207 struct key *s_master_keys; 3208 const struct fsverity_operations *s_vop; 3209 struct unicode_map *s_encoding; 3210 __u16 s_encoding_flags; 3211 struct hlist_bl_head s_roots; 3212 struct list_head s_mounts; 3213 struct block_device *s_bdev; 3214 struct backing_dev_info *s_bdi; 3215 struct mtd_info *s_mtd; 3216 struct hlist_node s_instances; 3217 unsigned int s_quota_types; 3218 struct quota_info s_dquot; 3219 struct sb_writers s_writers; 3220 void *s_fs_info; 3221 u32 s_time_gran; 3222 time64_t s_time_min; 3223 time64_t s_time_max; 3224 __u32 s_fsnotify_mask; 3225 struct fsnotify_mark_connector *s_fsnotify_marks; 3226 char s_id[32]; 3227 uuid_t s_uuid; 3228 unsigned int s_max_links; 3229 fmode_t s_mode; 3230 struct mutex s_vfs_rename_mutex; 3231 const char *s_subtype; 3232 const struct dentry_operations *s_d_op; 3233 int cleancache_poolid; 3234 struct shrinker s_shrink; 3235 atomic_long_t s_remove_count; 3236 atomic_long_t s_fsnotify_inode_refs; 3237 int s_readonly_remount; 3238 errseq_t s_wb_err; 3239 struct workqueue_struct *s_dio_done_wq; 3240 struct hlist_head s_pins; 3241 struct user_namespace *s_user_ns; 3242 struct list_lru s_dentry_lru; 3243 struct list_lru s_inode_lru; 3244 struct callback_head rcu; 3245 struct work_struct destroy_work; 3246 struct mutex s_sync_lock; 3247 int s_stack_depth; 3248 int: 32; 3249 spinlock_t s_inode_list_lock; 3250 struct list_head s_inodes; 3251 spinlock_t s_inode_wblist_lock; 3252 struct list_head s_inodes_wb; 3253 long: 64; 3254 long: 64; 3255 }; 3256 3257 struct kstat { 3258 u32 result_mask; 3259 umode_t mode; 3260 unsigned int nlink; 3261 uint32_t blksize; 3262 u64 attributes; 3263 u64 attributes_mask; 3264 u64 ino; 3265 dev_t dev; 3266 dev_t rdev; 3267 kuid_t uid; 3268 kgid_t gid; 3269 loff_t size; 3270 struct timespec64 atime; 3271 struct timespec64 mtime; 3272 struct timespec64 ctime; 3273 struct timespec64 btime; 3274 u64 blocks; 3275 u64 mnt_id; 3276 }; 3277 3278 struct list_lru_one { 3279 struct list_head list; 3280 long int nr_items; 3281 }; 3282 3283 struct list_lru_memcg { 3284 struct callback_head rcu; 3285 struct list_lru_one *lru[0]; 3286 }; 3287 3288 struct list_lru_node { 3289 spinlock_t lock; 3290 struct list_lru_one lru; 3291 struct list_lru_memcg *memcg_lrus; 3292 long int nr_items; 3293 long: 64; 3294 long: 64; 3295 }; 3296 3297 enum migrate_mode { 3298 MIGRATE_ASYNC = 0, 3299 MIGRATE_SYNC_LIGHT = 1, 3300 MIGRATE_SYNC = 2, 3301 MIGRATE_SYNC_NO_COPY = 3, 3302 }; 3303 3304 struct key_tag { 3305 struct callback_head rcu; 3306 refcount_t usage; 3307 bool removed; 3308 }; 3309 3310 typedef int (*request_key_actor_t)(struct key *, void *); 3311 3312 struct key_preparsed_payload; 3313 3314 struct key_match_data; 3315 3316 struct kernel_pkey_params; 3317 3318 struct kernel_pkey_query; 3319 3320 struct key_type { 3321 const char *name; 3322 size_t def_datalen; 3323 unsigned int flags; 3324 int (*vet_description)(const char *); 3325 int (*preparse)(struct key_preparsed_payload *); 3326 void (*free_preparse)(struct key_preparsed_payload *); 3327 int (*instantiate)(struct key *, struct key_preparsed_payload *); 3328 int (*update)(struct key *, struct key_preparsed_payload *); 3329 int (*match_preparse)(struct key_match_data *); 3330 void (*match_free)(struct key_match_data *); 3331 void (*revoke)(struct key *); 3332 void (*destroy)(struct key *); 3333 void (*describe)(const struct key *, struct seq_file *); 3334 long int (*read)(const struct key *, char *, size_t); 3335 request_key_actor_t request_key; 3336 struct key_restriction * (*lookup_restriction)(const char *); 3337 int (*asym_query)(const struct kernel_pkey_params *, struct kernel_pkey_query *); 3338 int (*asym_eds_op)(struct kernel_pkey_params *, const void *, void *); 3339 int (*asym_verify_signature)(struct kernel_pkey_params *, const void *, const void *); 3340 struct list_head link; 3341 struct lock_class_key lock_class; 3342 }; 3343 3344 typedef int (*key_restrict_link_func_t)(struct key *, const struct key_type *, const union key_payload *, struct key *); 3345 3346 struct key_restriction { 3347 key_restrict_link_func_t check; 3348 struct key *key; 3349 struct key_type *keytype; 3350 }; 3351 3352 struct group_info { 3353 atomic_t usage; 3354 int ngroups; 3355 kgid_t gid[0]; 3356 }; 3357 3358 struct delayed_call { 3359 void (*fn)(void *); 3360 void *arg; 3361 }; 3362 3363 struct io_cq { 3364 struct request_queue *q; 3365 struct io_context *ioc; 3366 union { 3367 struct list_head q_node; 3368 struct kmem_cache *__rcu_icq_cache; 3369 }; 3370 union { 3371 struct hlist_node ioc_node; 3372 struct callback_head __rcu_head; 3373 }; 3374 unsigned int flags; 3375 }; 3376 3377 struct wait_page_queue; 3378 3379 struct kiocb { 3380 struct file *ki_filp; 3381 loff_t ki_pos; 3382 void (*ki_complete)(struct kiocb *, long int, long int); 3383 void *private; 3384 int ki_flags; 3385 u16 ki_hint; 3386 u16 ki_ioprio; 3387 union { 3388 unsigned int ki_cookie; 3389 struct wait_page_queue *ki_waitq; 3390 }; 3391 }; 3392 3393 struct iattr { 3394 unsigned int ia_valid; 3395 umode_t ia_mode; 3396 kuid_t ia_uid; 3397 kgid_t ia_gid; 3398 loff_t ia_size; 3399 struct timespec64 ia_atime; 3400 struct timespec64 ia_mtime; 3401 struct timespec64 ia_ctime; 3402 struct file *ia_file; 3403 }; 3404 3405 typedef __kernel_uid32_t projid_t; 3406 3407 typedef struct { 3408 projid_t val; 3409 } kprojid_t; 3410 3411 enum quota_type { 3412 USRQUOTA = 0, 3413 GRPQUOTA = 1, 3414 PRJQUOTA = 2, 3415 }; 3416 3417 struct kqid { 3418 union { 3419 kuid_t uid; 3420 kgid_t gid; 3421 kprojid_t projid; 3422 }; 3423 enum quota_type type; 3424 }; 3425 3426 struct mem_dqblk { 3427 qsize_t dqb_bhardlimit; 3428 qsize_t dqb_bsoftlimit; 3429 qsize_t dqb_curspace; 3430 qsize_t dqb_rsvspace; 3431 qsize_t dqb_ihardlimit; 3432 qsize_t dqb_isoftlimit; 3433 qsize_t dqb_curinodes; 3434 time64_t dqb_btime; 3435 time64_t dqb_itime; 3436 }; 3437 3438 struct dquot { 3439 struct hlist_node dq_hash; 3440 struct list_head dq_inuse; 3441 struct list_head dq_free; 3442 struct list_head dq_dirty; 3443 struct mutex dq_lock; 3444 spinlock_t dq_dqb_lock; 3445 atomic_t dq_count; 3446 struct super_block *dq_sb; 3447 struct kqid dq_id; 3448 loff_t dq_off; 3449 long unsigned int dq_flags; 3450 struct mem_dqblk dq_dqb; 3451 }; 3452 3453 enum { 3454 DQF_ROOT_SQUASH_B = 0, 3455 DQF_SYS_FILE_B = 16, 3456 DQF_PRIVATE = 17, 3457 }; 3458 3459 struct quota_format_type { 3460 int qf_fmt_id; 3461 const struct quota_format_ops *qf_ops; 3462 struct module *qf_owner; 3463 struct quota_format_type *qf_next; 3464 }; 3465 3466 enum { 3467 DQST_LOOKUPS = 0, 3468 DQST_DROPS = 1, 3469 DQST_READS = 2, 3470 DQST_WRITES = 3, 3471 DQST_CACHE_HITS = 4, 3472 DQST_ALLOC_DQUOTS = 5, 3473 DQST_FREE_DQUOTS = 6, 3474 DQST_SYNCS = 7, 3475 _DQST_DQSTAT_LAST = 8, 3476 }; 3477 3478 struct quota_format_ops { 3479 int (*check_quota_file)(struct super_block *, int); 3480 int (*read_file_info)(struct super_block *, int); 3481 int (*write_file_info)(struct super_block *, int); 3482 int (*free_file_info)(struct super_block *, int); 3483 int (*read_dqblk)(struct dquot *); 3484 int (*commit_dqblk)(struct dquot *); 3485 int (*release_dqblk)(struct dquot *); 3486 int (*get_next_id)(struct super_block *, struct kqid *); 3487 }; 3488 3489 struct dquot_operations { 3490 int (*write_dquot)(struct dquot *); 3491 struct dquot * (*alloc_dquot)(struct super_block *, int); 3492 void (*destroy_dquot)(struct dquot *); 3493 int (*acquire_dquot)(struct dquot *); 3494 int (*release_dquot)(struct dquot *); 3495 int (*mark_dirty)(struct dquot *); 3496 int (*write_info)(struct super_block *, int); 3497 qsize_t * (*get_reserved_space)(struct inode *); 3498 int (*get_projid)(struct inode *, kprojid_t *); 3499 int (*get_inode_usage)(struct inode *, qsize_t *); 3500 int (*get_next_id)(struct super_block *, struct kqid *); 3501 }; 3502 3503 struct qc_dqblk { 3504 int d_fieldmask; 3505 u64 d_spc_hardlimit; 3506 u64 d_spc_softlimit; 3507 u64 d_ino_hardlimit; 3508 u64 d_ino_softlimit; 3509 u64 d_space; 3510 u64 d_ino_count; 3511 s64 d_ino_timer; 3512 s64 d_spc_timer; 3513 int d_ino_warns; 3514 int d_spc_warns; 3515 u64 d_rt_spc_hardlimit; 3516 u64 d_rt_spc_softlimit; 3517 u64 d_rt_space; 3518 s64 d_rt_spc_timer; 3519 int d_rt_spc_warns; 3520 }; 3521 3522 struct qc_type_state { 3523 unsigned int flags; 3524 unsigned int spc_timelimit; 3525 unsigned int ino_timelimit; 3526 unsigned int rt_spc_timelimit; 3527 unsigned int spc_warnlimit; 3528 unsigned int ino_warnlimit; 3529 unsigned int rt_spc_warnlimit; 3530 long long unsigned int ino; 3531 blkcnt_t blocks; 3532 blkcnt_t nextents; 3533 }; 3534 3535 struct qc_state { 3536 unsigned int s_incoredqs; 3537 struct qc_type_state s_state[3]; 3538 }; 3539 3540 struct qc_info { 3541 int i_fieldmask; 3542 unsigned int i_flags; 3543 unsigned int i_spc_timelimit; 3544 unsigned int i_ino_timelimit; 3545 unsigned int i_rt_spc_timelimit; 3546 unsigned int i_spc_warnlimit; 3547 unsigned int i_ino_warnlimit; 3548 unsigned int i_rt_spc_warnlimit; 3549 }; 3550 3551 struct quotactl_ops { 3552 int (*quota_on)(struct super_block *, int, int, const struct path *); 3553 int (*quota_off)(struct super_block *, int); 3554 int (*quota_enable)(struct super_block *, unsigned int); 3555 int (*quota_disable)(struct super_block *, unsigned int); 3556 int (*quota_sync)(struct super_block *, int); 3557 int (*set_info)(struct super_block *, int, struct qc_info *); 3558 int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); 3559 int (*get_nextdqblk)(struct super_block *, struct kqid *, struct qc_dqblk *); 3560 int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); 3561 int (*get_state)(struct super_block *, struct qc_state *); 3562 int (*rm_xquota)(struct super_block *, unsigned int); 3563 }; 3564 3565 struct writeback_control; 3566 3567 struct readahead_control; 3568 3569 struct swap_info_struct; 3570 3571 struct address_space_operations { 3572 int (*writepage)(struct page *, struct writeback_control *); 3573 int (*readpage)(struct file *, struct page *); 3574 int (*writepages)(struct address_space *, struct writeback_control *); 3575 int (*set_page_dirty)(struct page *); 3576 int (*readpages)(struct file *, struct address_space *, struct list_head *, unsigned int); 3577 void (*readahead)(struct readahead_control *); 3578 int (*write_begin)(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct page **, void **); 3579 int (*write_end)(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct page *, void *); 3580 sector_t (*bmap)(struct address_space *, sector_t); 3581 void (*invalidatepage)(struct page *, unsigned int, unsigned int); 3582 int (*releasepage)(struct page *, gfp_t); 3583 void (*freepage)(struct page *); 3584 ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *); 3585 int (*migratepage)(struct address_space *, struct page *, struct page *, enum migrate_mode); 3586 bool (*isolate_page)(struct page *, isolate_mode_t); 3587 void (*putback_page)(struct page *); 3588 int (*launder_page)(struct page *); 3589 int (*is_partially_uptodate)(struct page *, long unsigned int, long unsigned int); 3590 void (*is_dirty_writeback)(struct page *, bool *, bool *); 3591 int (*error_remove_page)(struct address_space *, struct page *); 3592 int (*swap_activate)(struct swap_info_struct *, struct file *, sector_t *); 3593 void (*swap_deactivate)(struct file *); 3594 }; 3595 3596 struct fiemap_extent_info; 3597 3598 struct inode_operations { 3599 struct dentry * (*lookup)(struct inode *, struct dentry *, unsigned int); 3600 const char * (*get_link)(struct dentry *, struct inode *, struct delayed_call *); 3601 int (*permission)(struct inode *, int); 3602 struct posix_acl * (*get_acl)(struct inode *, int); 3603 int (*readlink)(struct dentry *, char *, int); 3604 int (*create)(struct inode *, struct dentry *, umode_t, bool); 3605 int (*link)(struct dentry *, struct inode *, struct dentry *); 3606 int (*unlink)(struct inode *, struct dentry *); 3607 int (*symlink)(struct inode *, struct dentry *, const char *); 3608 int (*mkdir)(struct inode *, struct dentry *, umode_t); 3609 int (*rmdir)(struct inode *, struct dentry *); 3610 int (*mknod)(struct inode *, struct dentry *, umode_t, dev_t); 3611 int (*rename)(struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int); 3612 int (*setattr)(struct dentry *, struct iattr *); 3613 int (*getattr)(const struct path *, struct kstat *, u32, unsigned int); 3614 ssize_t (*listxattr)(struct dentry *, char *, size_t); 3615 int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64, u64); 3616 int (*update_time)(struct inode *, struct timespec64 *, int); 3617 int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned int, umode_t); 3618 int (*tmpfile)(struct inode *, struct dentry *, umode_t); 3619 int (*set_acl)(struct inode *, struct posix_acl *, int); 3620 long: 64; 3621 long: 64; 3622 long: 64; 3623 }; 3624 3625 struct file_lock_context { 3626 spinlock_t flc_lock; 3627 struct list_head flc_flock; 3628 struct list_head flc_posix; 3629 struct list_head flc_lease; 3630 }; 3631 3632 struct file_lock_operations { 3633 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 3634 void (*fl_release_private)(struct file_lock *); 3635 }; 3636 3637 struct nlm_lockowner; 3638 3639 struct nfs_lock_info { 3640 u32 state; 3641 struct nlm_lockowner *owner; 3642 struct list_head list; 3643 }; 3644 3645 struct nfs4_lock_state; 3646 3647 struct nfs4_lock_info { 3648 struct nfs4_lock_state *owner; 3649 }; 3650 3651 struct fasync_struct; 3652 3653 struct lock_manager_operations; 3654 3655 struct file_lock { 3656 struct file_lock *fl_blocker; 3657 struct list_head fl_list; 3658 struct hlist_node fl_link; 3659 struct list_head fl_blocked_requests; 3660 struct list_head fl_blocked_member; 3661 fl_owner_t fl_owner; 3662 unsigned int fl_flags; 3663 unsigned char fl_type; 3664 unsigned int fl_pid; 3665 int fl_link_cpu; 3666 wait_queue_head_t fl_wait; 3667 struct file *fl_file; 3668 loff_t fl_start; 3669 loff_t fl_end; 3670 struct fasync_struct *fl_fasync; 3671 long unsigned int fl_break_time; 3672 long unsigned int fl_downgrade_time; 3673 const struct file_lock_operations *fl_ops; 3674 const struct lock_manager_operations *fl_lmops; 3675 union { 3676 struct nfs_lock_info nfs_fl; 3677 struct nfs4_lock_info nfs4_fl; 3678 struct { 3679 struct list_head link; 3680 int state; 3681 unsigned int debug_id; 3682 } afs; 3683 } fl_u; 3684 }; 3685 3686 struct lock_manager_operations { 3687 fl_owner_t (*lm_get_owner)(fl_owner_t); 3688 void (*lm_put_owner)(fl_owner_t); 3689 void (*lm_notify)(struct file_lock *); 3690 int (*lm_grant)(struct file_lock *, int); 3691 bool (*lm_break)(struct file_lock *); 3692 int (*lm_change)(struct file_lock *, int, struct list_head *); 3693 void (*lm_setup)(struct file_lock *, void **); 3694 bool (*lm_breaker_owns_lease)(struct file_lock *); 3695 }; 3696 3697 struct fasync_struct { 3698 rwlock_t fa_lock; 3699 int magic; 3700 int fa_fd; 3701 struct fasync_struct *fa_next; 3702 struct file *fa_file; 3703 struct callback_head fa_rcu; 3704 }; 3705 3706 enum { 3707 SB_UNFROZEN = 0, 3708 SB_FREEZE_WRITE = 1, 3709 SB_FREEZE_PAGEFAULT = 2, 3710 SB_FREEZE_FS = 3, 3711 SB_FREEZE_COMPLETE = 4, 3712 }; 3713 3714 struct kstatfs; 3715 3716 struct super_operations { 3717 struct inode * (*alloc_inode)(struct super_block *); 3718 void (*destroy_inode)(struct inode *); 3719 void (*free_inode)(struct inode *); 3720 void (*dirty_inode)(struct inode *, int); 3721 int (*write_inode)(struct inode *, struct writeback_control *); 3722 int (*drop_inode)(struct inode *); 3723 void (*evict_inode)(struct inode *); 3724 void (*put_super)(struct super_block *); 3725 int (*sync_fs)(struct super_block *, int); 3726 int (*freeze_super)(struct super_block *); 3727 int (*freeze_fs)(struct super_block *); 3728 int (*thaw_super)(struct super_block *); 3729 int (*unfreeze_fs)(struct super_block *); 3730 int (*statfs)(struct dentry *, struct kstatfs *); 3731 int (*remount_fs)(struct super_block *, int *, char *); 3732 void (*umount_begin)(struct super_block *); 3733 int (*show_options)(struct seq_file *, struct dentry *); 3734 int (*show_devname)(struct seq_file *, struct dentry *); 3735 int (*show_path)(struct seq_file *, struct dentry *); 3736 int (*show_stats)(struct seq_file *, struct dentry *); 3737 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); 3738 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); 3739 struct dquot ** (*get_dquots)(struct inode *); 3740 int (*bdev_try_to_free_page)(struct super_block *, struct page *, gfp_t); 3741 long int (*nr_cached_objects)(struct super_block *, struct shrink_control *); 3742 long int (*free_cached_objects)(struct super_block *, struct shrink_control *); 3743 }; 3744 3745 struct fid; 3746 3747 struct iomap; 3748 3749 struct export_operations { 3750 int (*encode_fh)(struct inode *, __u32 *, int *, struct inode *); 3751 struct dentry * (*fh_to_dentry)(struct super_block *, struct fid *, int, int); 3752 struct dentry * (*fh_to_parent)(struct super_block *, struct fid *, int, int); 3753 int (*get_name)(struct dentry *, char *, struct dentry *); 3754 struct dentry * (*get_parent)(struct dentry *); 3755 int (*commit_metadata)(struct inode *); 3756 int (*get_uuid)(struct super_block *, u8 *, u32 *, u64 *); 3757 int (*map_blocks)(struct inode *, loff_t, u64, struct iomap *, bool, u32 *); 3758 int (*commit_blocks)(struct inode *, struct iomap *, int, struct iattr *); 3759 long unsigned int flags; 3760 }; 3761 3762 struct xattr_handler { 3763 const char *name; 3764 const char *prefix; 3765 int flags; 3766 bool (*list)(struct dentry *); 3767 int (*get)(const struct xattr_handler *, struct dentry *, struct inode *, const char *, void *, size_t); 3768 int (*set)(const struct xattr_handler *, struct dentry *, struct inode *, const char *, const void *, size_t, int); 3769 }; 3770 3771 union fscrypt_policy; 3772 3773 struct fscrypt_operations { 3774 unsigned int flags; 3775 const char *key_prefix; 3776 int (*get_context)(struct inode *, void *, size_t); 3777 int (*set_context)(struct inode *, const void *, size_t, void *); 3778 const union fscrypt_policy * (*get_dummy_policy)(struct super_block *); 3779 bool (*empty_dir)(struct inode *); 3780 unsigned int max_namelen; 3781 bool (*has_stable_inodes)(struct super_block *); 3782 void (*get_ino_and_lblk_bits)(struct super_block *, int *, int *); 3783 int (*get_num_devices)(struct super_block *); 3784 void (*get_devices)(struct super_block *, struct request_queue **); 3785 }; 3786 3787 struct fsverity_operations { 3788 int (*begin_enable_verity)(struct file *); 3789 int (*end_enable_verity)(struct file *, const void *, size_t, u64); 3790 int (*get_verity_descriptor)(struct inode *, void *, size_t); 3791 struct page * (*read_merkle_tree_page)(struct inode *, long unsigned int, long unsigned int); 3792 int (*write_merkle_tree_block)(struct inode *, const void *, u64, int); 3793 }; 3794 3795 typedef int (*filldir_t)(struct dir_context *, const char *, int, loff_t, u64, unsigned int); 3796 3797 struct dir_context { 3798 filldir_t actor; 3799 loff_t pos; 3800 }; 3801 3802 struct p_log; 3803 3804 struct fs_parameter; 3805 3806 struct fs_parse_result; 3807 3808 typedef int fs_param_type(struct p_log *, const struct fs_parameter_spec *, struct fs_parameter *, struct fs_parse_result *); 3809 3810 struct fs_parameter_spec { 3811 const char *name; 3812 fs_param_type *type; 3813 u8 opt; 3814 short unsigned int flags; 3815 const void *data; 3816 }; 3817 3818 enum compound_dtor_id { 3819 NULL_COMPOUND_DTOR = 0, 3820 COMPOUND_PAGE_DTOR = 1, 3821 HUGETLB_PAGE_DTOR = 2, 3822 TRANSHUGE_PAGE_DTOR = 3, 3823 NR_COMPOUND_DTORS = 4, 3824 }; 3825 3826 enum vm_event_item { 3827 PGPGIN = 0, 3828 PGPGOUT = 1, 3829 PSWPIN = 2, 3830 PSWPOUT = 3, 3831 PGALLOC_DMA = 4, 3832 PGALLOC_DMA32 = 5, 3833 PGALLOC_NORMAL = 6, 3834 PGALLOC_MOVABLE = 7, 3835 ALLOCSTALL_DMA = 8, 3836 ALLOCSTALL_DMA32 = 9, 3837 ALLOCSTALL_NORMAL = 10, 3838 ALLOCSTALL_MOVABLE = 11, 3839 PGSCAN_SKIP_DMA = 12, 3840 PGSCAN_SKIP_DMA32 = 13, 3841 PGSCAN_SKIP_NORMAL = 14, 3842 PGSCAN_SKIP_MOVABLE = 15, 3843 PGFREE = 16, 3844 PGACTIVATE = 17, 3845 PGDEACTIVATE = 18, 3846 PGLAZYFREE = 19, 3847 PGFAULT = 20, 3848 PGMAJFAULT = 21, 3849 PGLAZYFREED = 22, 3850 PGREFILL = 23, 3851 PGREUSE = 24, 3852 PGSTEAL_KSWAPD = 25, 3853 PGSTEAL_DIRECT = 26, 3854 PGSCAN_KSWAPD = 27, 3855 PGSCAN_DIRECT = 28, 3856 PGSCAN_DIRECT_THROTTLE = 29, 3857 PGSCAN_ANON = 30, 3858 PGSCAN_FILE = 31, 3859 PGSTEAL_ANON = 32, 3860 PGSTEAL_FILE = 33, 3861 PGSCAN_ZONE_RECLAIM_FAILED = 34, 3862 PGINODESTEAL = 35, 3863 SLABS_SCANNED = 36, 3864 KSWAPD_INODESTEAL = 37, 3865 KSWAPD_LOW_WMARK_HIT_QUICKLY = 38, 3866 KSWAPD_HIGH_WMARK_HIT_QUICKLY = 39, 3867 PAGEOUTRUN = 40, 3868 PGROTATED = 41, 3869 DROP_PAGECACHE = 42, 3870 DROP_SLAB = 43, 3871 OOM_KILL = 44, 3872 NUMA_PTE_UPDATES = 45, 3873 NUMA_HUGE_PTE_UPDATES = 46, 3874 NUMA_HINT_FAULTS = 47, 3875 NUMA_HINT_FAULTS_LOCAL = 48, 3876 NUMA_PAGE_MIGRATE = 49, 3877 PGMIGRATE_SUCCESS = 50, 3878 PGMIGRATE_FAIL = 51, 3879 THP_MIGRATION_SUCCESS = 52, 3880 THP_MIGRATION_FAIL = 53, 3881 THP_MIGRATION_SPLIT = 54, 3882 COMPACTMIGRATE_SCANNED = 55, 3883 COMPACTFREE_SCANNED = 56, 3884 COMPACTISOLATED = 57, 3885 COMPACTSTALL = 58, 3886 COMPACTFAIL = 59, 3887 COMPACTSUCCESS = 60, 3888 KCOMPACTD_WAKE = 61, 3889 KCOMPACTD_MIGRATE_SCANNED = 62, 3890 KCOMPACTD_FREE_SCANNED = 63, 3891 HTLB_BUDDY_PGALLOC = 64, 3892 HTLB_BUDDY_PGALLOC_FAIL = 65, 3893 UNEVICTABLE_PGCULLED = 66, 3894 UNEVICTABLE_PGSCANNED = 67, 3895 UNEVICTABLE_PGRESCUED = 68, 3896 UNEVICTABLE_PGMLOCKED = 69, 3897 UNEVICTABLE_PGMUNLOCKED = 70, 3898 UNEVICTABLE_PGCLEARED = 71, 3899 UNEVICTABLE_PGSTRANDED = 72, 3900 THP_FAULT_ALLOC = 73, 3901 THP_FAULT_FALLBACK = 74, 3902 THP_FAULT_FALLBACK_CHARGE = 75, 3903 THP_COLLAPSE_ALLOC = 76, 3904 THP_COLLAPSE_ALLOC_FAILED = 77, 3905 THP_FILE_ALLOC = 78, 3906 THP_FILE_FALLBACK = 79, 3907 THP_FILE_FALLBACK_CHARGE = 80, 3908 THP_FILE_MAPPED = 81, 3909 THP_SPLIT_PAGE = 82, 3910 THP_SPLIT_PAGE_FAILED = 83, 3911 THP_DEFERRED_SPLIT_PAGE = 84, 3912 THP_SPLIT_PMD = 85, 3913 THP_SPLIT_PUD = 86, 3914 THP_ZERO_PAGE_ALLOC = 87, 3915 THP_ZERO_PAGE_ALLOC_FAILED = 88, 3916 THP_SWPOUT = 89, 3917 THP_SWPOUT_FALLBACK = 90, 3918 BALLOON_INFLATE = 91, 3919 BALLOON_DEFLATE = 92, 3920 BALLOON_MIGRATE = 93, 3921 SWAP_RA = 94, 3922 SWAP_RA_HIT = 95, 3923 NR_VM_EVENT_ITEMS = 96, 3924 }; 3925 3926 struct tlb_context { 3927 u64 ctx_id; 3928 u64 tlb_gen; 3929 }; 3930 3931 struct tlb_state { 3932 struct mm_struct *loaded_mm; 3933 union { 3934 struct mm_struct *last_user_mm; 3935 long unsigned int last_user_mm_ibpb; 3936 }; 3937 u16 loaded_mm_asid; 3938 u16 next_asid; 3939 bool is_lazy; 3940 bool invalidate_other; 3941 short unsigned int user_pcid_flush_mask; 3942 long unsigned int cr4; 3943 struct tlb_context ctxs[6]; 3944 }; 3945 3946 struct boot_params_to_save { 3947 unsigned int start; 3948 unsigned int len; 3949 }; 3950 3951 enum cpu_idle_type { 3952 CPU_IDLE = 0, 3953 CPU_NOT_IDLE = 1, 3954 CPU_NEWLY_IDLE = 2, 3955 CPU_MAX_IDLE_TYPES = 3, 3956 }; 3957 3958 enum { 3959 __SD_BALANCE_NEWIDLE = 0, 3960 __SD_BALANCE_EXEC = 1, 3961 __SD_BALANCE_FORK = 2, 3962 __SD_BALANCE_WAKE = 3, 3963 __SD_WAKE_AFFINE = 4, 3964 __SD_ASYM_CPUCAPACITY = 5, 3965 __SD_SHARE_CPUCAPACITY = 6, 3966 __SD_SHARE_PKG_RESOURCES = 7, 3967 __SD_SERIALIZE = 8, 3968 __SD_ASYM_PACKING = 9, 3969 __SD_PREFER_SIBLING = 10, 3970 __SD_OVERLAP = 11, 3971 __SD_NUMA = 12, 3972 __SD_FLAG_CNT = 13, 3973 }; 3974 3975 struct x86_legacy_devices { 3976 int pnpbios; 3977 }; 3978 3979 enum x86_legacy_i8042_state { 3980 X86_LEGACY_I8042_PLATFORM_ABSENT = 0, 3981 X86_LEGACY_I8042_FIRMWARE_ABSENT = 1, 3982 X86_LEGACY_I8042_EXPECTED_PRESENT = 2, 3983 }; 3984 3985 struct x86_legacy_features { 3986 enum x86_legacy_i8042_state i8042; 3987 int rtc; 3988 int warm_reset; 3989 int no_vga; 3990 int reserve_bios_regions; 3991 struct x86_legacy_devices devices; 3992 }; 3993 3994 struct ghcb; 3995 3996 struct x86_hyper_runtime { 3997 void (*pin_vcpu)(int); 3998 void (*sev_es_hcall_prepare)(struct ghcb *, struct pt_regs *); 3999 bool (*sev_es_hcall_finish)(struct ghcb *, struct pt_regs *); 4000 }; 4001 4002 struct x86_platform_ops { 4003 long unsigned int (*calibrate_cpu)(); 4004 long unsigned int (*calibrate_tsc)(); 4005 void (*get_wallclock)(struct timespec64 *); 4006 int (*set_wallclock)(const struct timespec64 *); 4007 void (*iommu_shutdown)(); 4008 bool (*is_untracked_pat_range)(u64, u64); 4009 void (*nmi_init)(); 4010 unsigned char (*get_nmi_reason)(); 4011 void (*save_sched_clock_state)(); 4012 void (*restore_sched_clock_state)(); 4013 void (*apic_post_init)(); 4014 struct x86_legacy_features legacy; 4015 void (*set_legacy_features)(); 4016 struct x86_hyper_runtime hyper; 4017 }; 4018 4019 typedef signed char __s8; 4020 4021 typedef __s8 s8; 4022 4023 typedef __u32 __le32; 4024 4025 typedef long unsigned int irq_hw_number_t; 4026 4027 struct kernel_symbol { 4028 int value_offset; 4029 int name_offset; 4030 int namespace_offset; 4031 }; 4032 4033 typedef int (*initcall_t)(); 4034 4035 typedef int initcall_entry_t; 4036 4037 struct obs_kernel_param { 4038 const char *str; 4039 int (*setup_func)(char *); 4040 int early; 4041 }; 4042 4043 struct lockdep_map {}; 4044 4045 struct jump_entry { 4046 s32 code; 4047 s32 target; 4048 long int key; 4049 }; 4050 4051 struct static_key_mod; 4052 4053 struct static_key { 4054 atomic_t enabled; 4055 union { 4056 long unsigned int type; 4057 struct jump_entry *entries; 4058 struct static_key_mod *next; 4059 }; 4060 }; 4061 4062 struct static_key_true { 4063 struct static_key key; 4064 }; 4065 4066 struct static_key_false { 4067 struct static_key key; 4068 }; 4069 4070 struct _ddebug { 4071 const char *modname; 4072 const char *function; 4073 const char *filename; 4074 const char *format; 4075 unsigned int lineno: 18; 4076 unsigned int flags: 8; 4077 union { 4078 struct static_key_true dd_key_true; 4079 struct static_key_false dd_key_false; 4080 } key; 4081 }; 4082 4083 enum system_states { 4084 SYSTEM_BOOTING = 0, 4085 SYSTEM_SCHEDULING = 1, 4086 SYSTEM_RUNNING = 2, 4087 SYSTEM_HALT = 3, 4088 SYSTEM_POWER_OFF = 4, 4089 SYSTEM_RESTART = 5, 4090 SYSTEM_SUSPEND = 6, 4091 }; 4092 4093 struct orc_entry { 4094 s16 sp_offset; 4095 s16 bp_offset; 4096 unsigned int sp_reg: 4; 4097 unsigned int bp_reg: 4; 4098 unsigned int type: 2; 4099 unsigned int end: 1; 4100 } __attribute__((packed)); 4101 4102 struct bug_entry { 4103 int bug_addr_disp; 4104 int file_disp; 4105 short unsigned int line; 4106 short unsigned int flags; 4107 }; 4108 4109 typedef struct cpumask *cpumask_var_t; 4110 4111 struct tracepoint_func { 4112 void *func; 4113 void *data; 4114 int prio; 4115 }; 4116 4117 struct static_call_key; 4118 4119 struct tracepoint { 4120 const char *name; 4121 struct static_key key; 4122 struct static_call_key *static_call_key; 4123 void *static_call_tramp; 4124 void *iterator; 4125 int (*regfunc)(); 4126 void (*unregfunc)(); 4127 struct tracepoint_func *funcs; 4128 }; 4129 4130 struct static_call_mod; 4131 4132 struct static_call_site; 4133 4134 struct static_call_key { 4135 void *func; 4136 union { 4137 long unsigned int type; 4138 struct static_call_mod *mods; 4139 struct static_call_site *sites; 4140 }; 4141 }; 4142 4143 typedef const int tracepoint_ptr_t; 4144 4145 struct bpf_raw_event_map { 4146 struct tracepoint *tp; 4147 void *bpf_func; 4148 u32 num_args; 4149 u32 writable_size; 4150 long: 64; 4151 }; 4152 4153 struct seq_operations { 4154 void * (*start)(struct seq_file *, loff_t *); 4155 void (*stop)(struct seq_file *, void *); 4156 void * (*next)(struct seq_file *, void *, loff_t *); 4157 int (*show)(struct seq_file *, void *); 4158 }; 4159 4160 struct fixed_percpu_data { 4161 char gs_base[40]; 4162 long unsigned int stack_canary; 4163 }; 4164 4165 enum perf_event_state { 4166 PERF_EVENT_STATE_DEAD = 4294967292, 4167 PERF_EVENT_STATE_EXIT = 4294967293, 4168 PERF_EVENT_STATE_ERROR = 4294967294, 4169 PERF_EVENT_STATE_OFF = 4294967295, 4170 PERF_EVENT_STATE_INACTIVE = 0, 4171 PERF_EVENT_STATE_ACTIVE = 1, 4172 }; 4173 4174 typedef struct { 4175 atomic_long_t a; 4176 } local_t; 4177 4178 typedef struct { 4179 local_t a; 4180 } local64_t; 4181 4182 struct perf_event_attr { 4183 __u32 type; 4184 __u32 size; 4185 __u64 config; 4186 union { 4187 __u64 sample_period; 4188 __u64 sample_freq; 4189 }; 4190 __u64 sample_type; 4191 __u64 read_format; 4192 __u64 disabled: 1; 4193 __u64 inherit: 1; 4194 __u64 pinned: 1; 4195 __u64 exclusive: 1; 4196 __u64 exclude_user: 1; 4197 __u64 exclude_kernel: 1; 4198 __u64 exclude_hv: 1; 4199 __u64 exclude_idle: 1; 4200 __u64 mmap: 1; 4201 __u64 comm: 1; 4202 __u64 freq: 1; 4203 __u64 inherit_stat: 1; 4204 __u64 enable_on_exec: 1; 4205 __u64 task: 1; 4206 __u64 watermark: 1; 4207 __u64 precise_ip: 2; 4208 __u64 mmap_data: 1; 4209 __u64 sample_id_all: 1; 4210 __u64 exclude_host: 1; 4211 __u64 exclude_guest: 1; 4212 __u64 exclude_callchain_kernel: 1; 4213 __u64 exclude_callchain_user: 1; 4214 __u64 mmap2: 1; 4215 __u64 comm_exec: 1; 4216 __u64 use_clockid: 1; 4217 __u64 context_switch: 1; 4218 __u64 write_backward: 1; 4219 __u64 namespaces: 1; 4220 __u64 ksymbol: 1; 4221 __u64 bpf_event: 1; 4222 __u64 aux_output: 1; 4223 __u64 cgroup: 1; 4224 __u64 text_poke: 1; 4225 __u64 __reserved_1: 30; 4226 union { 4227 __u32 wakeup_events; 4228 __u32 wakeup_watermark; 4229 }; 4230 __u32 bp_type; 4231 union { 4232 __u64 bp_addr; 4233 __u64 kprobe_func; 4234 __u64 uprobe_path; 4235 __u64 config1; 4236 }; 4237 union { 4238 __u64 bp_len; 4239 __u64 kprobe_addr; 4240 __u64 probe_offset; 4241 __u64 config2; 4242 }; 4243 __u64 branch_sample_type; 4244 __u64 sample_regs_user; 4245 __u32 sample_stack_user; 4246 __s32 clockid; 4247 __u64 sample_regs_intr; 4248 __u32 aux_watermark; 4249 __u16 sample_max_stack; 4250 __u16 __reserved_2; 4251 __u32 aux_sample_size; 4252 __u32 __reserved_3; 4253 }; 4254 4255 struct hw_perf_event_extra { 4256 u64 config; 4257 unsigned int reg; 4258 int alloc; 4259 int idx; 4260 }; 4261 4262 struct arch_hw_breakpoint { 4263 long unsigned int address; 4264 long unsigned int mask; 4265 u8 len; 4266 u8 type; 4267 }; 4268 4269 struct hw_perf_event { 4270 union { 4271 struct { 4272 u64 config; 4273 u64 last_tag; 4274 long unsigned int config_base; 4275 long unsigned int event_base; 4276 int event_base_rdpmc; 4277 int idx; 4278 int last_cpu; 4279 int flags; 4280 struct hw_perf_event_extra extra_reg; 4281 struct hw_perf_event_extra branch_reg; 4282 }; 4283 struct { 4284 struct hrtimer hrtimer; 4285 }; 4286 struct { 4287 struct list_head tp_list; 4288 }; 4289 struct { 4290 u64 pwr_acc; 4291 u64 ptsc; 4292 }; 4293 struct { 4294 struct arch_hw_breakpoint info; 4295 struct list_head bp_list; 4296 }; 4297 struct { 4298 u8 iommu_bank; 4299 u8 iommu_cntr; 4300 u16 padding; 4301 u64 conf; 4302 u64 conf1; 4303 }; 4304 }; 4305 struct task_struct *target; 4306 void *addr_filters; 4307 long unsigned int addr_filters_gen; 4308 int state; 4309 local64_t prev_count; 4310 u64 sample_period; 4311 union { 4312 struct { 4313 u64 last_period; 4314 local64_t period_left; 4315 }; 4316 struct { 4317 u64 saved_metric; 4318 u64 saved_slots; 4319 }; 4320 }; 4321 u64 interrupts_seq; 4322 u64 interrupts; 4323 u64 freq_time_stamp; 4324 u64 freq_count_stamp; 4325 }; 4326 4327 struct irq_work { 4328 struct __call_single_node node; 4329 void (*func)(struct irq_work *); 4330 }; 4331 4332 struct perf_addr_filters_head { 4333 struct list_head list; 4334 raw_spinlock_t lock; 4335 unsigned int nr_file_filters; 4336 }; 4337 4338 struct perf_sample_data; 4339 4340 typedef void (*perf_overflow_handler_t)(struct perf_event *, struct perf_sample_data *, struct pt_regs *); 4341 4342 struct ftrace_ops; 4343 4344 struct ftrace_regs; 4345 4346 typedef void (*ftrace_func_t)(long unsigned int, long unsigned int, struct ftrace_ops *, struct ftrace_regs *); 4347 4348 struct ftrace_hash; 4349 4350 struct ftrace_ops_hash { 4351 struct ftrace_hash *notrace_hash; 4352 struct ftrace_hash *filter_hash; 4353 struct mutex regex_lock; 4354 }; 4355 4356 struct ftrace_ops { 4357 ftrace_func_t func; 4358 struct ftrace_ops *next; 4359 long unsigned int flags; 4360 void *private; 4361 ftrace_func_t saved_func; 4362 struct ftrace_ops_hash local_hash; 4363 struct ftrace_ops_hash *func_hash; 4364 struct ftrace_ops_hash old_hash; 4365 long unsigned int trampoline; 4366 long unsigned int trampoline_size; 4367 struct list_head list; 4368 }; 4369 4370 struct pmu; 4371 4372 struct perf_buffer; 4373 4374 struct perf_addr_filter_range; 4375 4376 struct bpf_prog; 4377 4378 struct trace_event_call; 4379 4380 struct event_filter; 4381 4382 struct perf_cgroup; 4383 4384 struct perf_event { 4385 struct list_head event_entry; 4386 struct list_head sibling_list; 4387 struct list_head active_list; 4388 struct rb_node group_node; 4389 u64 group_index; 4390 struct list_head migrate_entry; 4391 struct hlist_node hlist_entry; 4392 struct list_head active_entry; 4393 int nr_siblings; 4394 int event_caps; 4395 int group_caps; 4396 struct perf_event *group_leader; 4397 struct pmu *pmu; 4398 void *pmu_private; 4399 enum perf_event_state state; 4400 unsigned int attach_state; 4401 local64_t count; 4402 atomic64_t child_count; 4403 u64 total_time_enabled; 4404 u64 total_time_running; 4405 u64 tstamp; 4406 u64 shadow_ctx_time; 4407 struct perf_event_attr attr; 4408 u16 header_size; 4409 u16 id_header_size; 4410 u16 read_size; 4411 struct hw_perf_event hw; 4412 struct perf_event_context *ctx; 4413 atomic_long_t refcount; 4414 atomic64_t child_total_time_enabled; 4415 atomic64_t child_total_time_running; 4416 struct mutex child_mutex; 4417 struct list_head child_list; 4418 struct perf_event *parent; 4419 int oncpu; 4420 int cpu; 4421 struct list_head owner_entry; 4422 struct task_struct *owner; 4423 struct mutex mmap_mutex; 4424 atomic_t mmap_count; 4425 struct perf_buffer *rb; 4426 struct list_head rb_entry; 4427 long unsigned int rcu_batches; 4428 int rcu_pending; 4429 wait_queue_head_t waitq; 4430 struct fasync_struct *fasync; 4431 int pending_wakeup; 4432 int pending_kill; 4433 int pending_disable; 4434 struct irq_work pending; 4435 atomic_t event_limit; 4436 struct perf_addr_filters_head addr_filters; 4437 struct perf_addr_filter_range *addr_filter_ranges; 4438 long unsigned int addr_filters_gen; 4439 struct perf_event *aux_event; 4440 void (*destroy)(struct perf_event *); 4441 struct callback_head callback_head; 4442 struct pid_namespace *ns; 4443 u64 id; 4444 u64 (*clock)(); 4445 perf_overflow_handler_t overflow_handler; 4446 void *overflow_handler_context; 4447 perf_overflow_handler_t orig_overflow_handler; 4448 struct bpf_prog *prog; 4449 struct trace_event_call *tp_event; 4450 struct event_filter *filter; 4451 struct ftrace_ops ftrace_ops; 4452 struct perf_cgroup *cgrp; 4453 void *security; 4454 struct list_head sb_list; 4455 }; 4456 4457 struct uid_gid_extent { 4458 u32 first; 4459 u32 lower_first; 4460 u32 count; 4461 }; 4462 4463 struct uid_gid_map { 4464 u32 nr_extents; 4465 union { 4466 struct uid_gid_extent extent[5]; 4467 struct { 4468 struct uid_gid_extent *forward; 4469 struct uid_gid_extent *reverse; 4470 }; 4471 }; 4472 }; 4473 4474 struct proc_ns_operations; 4475 4476 struct ns_common { 4477 atomic_long_t stashed; 4478 const struct proc_ns_operations *ops; 4479 unsigned int inum; 4480 refcount_t count; 4481 }; 4482 4483 struct ctl_table; 4484 4485 struct ctl_table_root; 4486 4487 struct ctl_table_set; 4488 4489 struct ctl_dir; 4490 4491 struct ctl_node; 4492 4493 struct ctl_table_header { 4494 union { 4495 struct { 4496 struct ctl_table *ctl_table; 4497 int used; 4498 int count; 4499 int nreg; 4500 }; 4501 struct callback_head rcu; 4502 }; 4503 struct completion *unregistering; 4504 struct ctl_table *ctl_table_arg; 4505 struct ctl_table_root *root; 4506 struct ctl_table_set *set; 4507 struct ctl_dir *parent; 4508 struct ctl_node *node; 4509 struct hlist_head inodes; 4510 }; 4511 4512 struct ctl_dir { 4513 struct ctl_table_header header; 4514 struct rb_root root; 4515 }; 4516 4517 struct ctl_table_set { 4518 int (*is_seen)(struct ctl_table_set *); 4519 struct ctl_dir dir; 4520 }; 4521 4522 struct ucounts; 4523 4524 struct user_namespace { 4525 struct uid_gid_map uid_map; 4526 struct uid_gid_map gid_map; 4527 struct uid_gid_map projid_map; 4528 struct user_namespace *parent; 4529 int level; 4530 kuid_t owner; 4531 kgid_t group; 4532 struct ns_common ns; 4533 long unsigned int flags; 4534 struct list_head keyring_name_list; 4535 struct key *user_keyring_register; 4536 struct rw_semaphore keyring_sem; 4537 struct key *persistent_keyring_register; 4538 struct work_struct work; 4539 struct ctl_table_set set; 4540 struct ctl_table_header *sysctls; 4541 struct ucounts *ucounts; 4542 int ucount_max[10]; 4543 }; 4544 4545 struct pollfd { 4546 int fd; 4547 short int events; 4548 short int revents; 4549 }; 4550 4551 typedef void (*smp_call_func_t)(void *); 4552 4553 struct __call_single_data { 4554 struct __call_single_node node; 4555 smp_call_func_t func; 4556 void *info; 4557 }; 4558 4559 struct smp_ops { 4560 void (*smp_prepare_boot_cpu)(); 4561 void (*smp_prepare_cpus)(unsigned int); 4562 void (*smp_cpus_done)(unsigned int); 4563 void (*stop_other_cpus)(int); 4564 void (*crash_stop_other_cpus)(); 4565 void (*smp_send_reschedule)(int); 4566 int (*cpu_up)(unsigned int, struct task_struct *); 4567 int (*cpu_disable)(); 4568 void (*cpu_die)(unsigned int); 4569 void (*play_dead)(); 4570 void (*send_call_func_ipi)(const struct cpumask *); 4571 void (*send_call_func_single_ipi)(int); 4572 }; 4573 4574 struct wait_queue_entry; 4575 4576 typedef int (*wait_queue_func_t)(struct wait_queue_entry *, unsigned int, int, void *); 4577 4578 struct wait_queue_entry { 4579 unsigned int flags; 4580 void *private; 4581 wait_queue_func_t func; 4582 struct list_head entry; 4583 }; 4584 4585 typedef struct wait_queue_entry wait_queue_entry_t; 4586 4587 struct timer_list { 4588 struct hlist_node entry; 4589 long unsigned int expires; 4590 void (*function)(struct timer_list *); 4591 u32 flags; 4592 }; 4593 4594 struct delayed_work { 4595 struct work_struct work; 4596 struct timer_list timer; 4597 struct workqueue_struct *wq; 4598 int cpu; 4599 }; 4600 4601 struct rcu_work { 4602 struct work_struct work; 4603 struct callback_head rcu; 4604 struct workqueue_struct *wq; 4605 }; 4606 4607 struct rcu_segcblist { 4608 struct callback_head *head; 4609 struct callback_head **tails[4]; 4610 long unsigned int gp_seq[4]; 4611 atomic_long_t len; 4612 u8 enabled; 4613 u8 offloaded; 4614 }; 4615 4616 struct srcu_node; 4617 4618 struct srcu_struct; 4619 4620 struct srcu_data { 4621 long unsigned int srcu_lock_count[2]; 4622 long unsigned int srcu_unlock_count[2]; 4623 long: 64; 4624 long: 64; 4625 long: 64; 4626 long: 64; 4627 spinlock_t lock; 4628 struct rcu_segcblist srcu_cblist; 4629 long unsigned int srcu_gp_seq_needed; 4630 long unsigned int srcu_gp_seq_needed_exp; 4631 bool srcu_cblist_invoking; 4632 struct timer_list delay_work; 4633 struct work_struct work; 4634 struct callback_head srcu_barrier_head; 4635 struct srcu_node *mynode; 4636 long unsigned int grpmask; 4637 int cpu; 4638 struct srcu_struct *ssp; 4639 long: 64; 4640 long: 64; 4641 }; 4642 4643 struct srcu_node { 4644 spinlock_t lock; 4645 long unsigned int srcu_have_cbs[4]; 4646 long unsigned int srcu_data_have_cbs[4]; 4647 long unsigned int srcu_gp_seq_needed_exp; 4648 struct srcu_node *srcu_parent; 4649 int grplo; 4650 int grphi; 4651 }; 4652 4653 struct srcu_struct { 4654 struct srcu_node node[521]; 4655 struct srcu_node *level[4]; 4656 struct mutex srcu_cb_mutex; 4657 spinlock_t lock; 4658 struct mutex srcu_gp_mutex; 4659 unsigned int srcu_idx; 4660 long unsigned int srcu_gp_seq; 4661 long unsigned int srcu_gp_seq_needed; 4662 long unsigned int srcu_gp_seq_needed_exp; 4663 long unsigned int srcu_last_gp_end; 4664 struct srcu_data *sda; 4665 long unsigned int srcu_barrier_seq; 4666 struct mutex srcu_barrier_mutex; 4667 struct completion srcu_barrier_completion; 4668 atomic_t srcu_barrier_cpu_cnt; 4669 struct delayed_work work; 4670 }; 4671 4672 struct anon_vma { 4673 struct anon_vma *root; 4674 struct rw_semaphore rwsem; 4675 atomic_t refcount; 4676 unsigned int degree; 4677 struct anon_vma *parent; 4678 struct rb_root_cached rb_root; 4679 }; 4680 4681 struct mempolicy { 4682 atomic_t refcnt; 4683 short unsigned int mode; 4684 short unsigned int flags; 4685 union { 4686 short int preferred_node; 4687 nodemask_t nodes; 4688 } v; 4689 union { 4690 nodemask_t cpuset_mems_allowed; 4691 nodemask_t user_nodemask; 4692 } w; 4693 }; 4694 4695 struct linux_binprm; 4696 4697 struct coredump_params; 4698 4699 struct linux_binfmt { 4700 struct list_head lh; 4701 struct module *module; 4702 int (*load_binary)(struct linux_binprm *); 4703 int (*load_shlib)(struct file *); 4704 int (*core_dump)(struct coredump_params *); 4705 long unsigned int min_coredump; 4706 }; 4707 4708 struct free_area { 4709 struct list_head free_list[6]; 4710 long unsigned int nr_free; 4711 }; 4712 4713 struct zone_padding { 4714 char x[0]; 4715 }; 4716 4717 struct pglist_data; 4718 4719 struct lruvec { 4720 struct list_head lists[5]; 4721 spinlock_t lru_lock; 4722 long unsigned int anon_cost; 4723 long unsigned int file_cost; 4724 atomic_long_t nonresident_age; 4725 long unsigned int refaults[2]; 4726 long unsigned int flags; 4727 struct pglist_data *pgdat; 4728 }; 4729 4730 struct per_cpu_pageset; 4731 4732 struct zone { 4733 long unsigned int _watermark[3]; 4734 long unsigned int watermark_boost; 4735 long unsigned int nr_reserved_highatomic; 4736 long int lowmem_reserve[5]; 4737 int node; 4738 struct pglist_data *zone_pgdat; 4739 struct per_cpu_pageset *pageset; 4740 int pageset_high; 4741 int pageset_batch; 4742 long unsigned int zone_start_pfn; 4743 atomic_long_t managed_pages; 4744 long unsigned int spanned_pages; 4745 long unsigned int present_pages; 4746 const char *name; 4747 long unsigned int nr_isolate_pageblock; 4748 seqlock_t span_seqlock; 4749 int initialized; 4750 long: 32; 4751 long: 64; 4752 long: 64; 4753 struct zone_padding _pad1_; 4754 struct free_area free_area[11]; 4755 long unsigned int flags; 4756 spinlock_t lock; 4757 long: 32; 4758 long: 64; 4759 long: 64; 4760 long: 64; 4761 long: 64; 4762 long: 64; 4763 long: 64; 4764 long: 64; 4765 struct zone_padding _pad2_; 4766 long unsigned int percpu_drift_mark; 4767 long unsigned int compact_cached_free_pfn; 4768 long unsigned int compact_cached_migrate_pfn[2]; 4769 long unsigned int compact_init_migrate_pfn; 4770 long unsigned int compact_init_free_pfn; 4771 unsigned int compact_considered; 4772 unsigned int compact_defer_shift; 4773 int compact_order_failed; 4774 bool compact_blockskip_flush; 4775 bool contiguous; 4776 short: 16; 4777 struct zone_padding _pad3_; 4778 atomic_long_t vm_stat[11]; 4779 atomic_long_t vm_numa_stat[6]; 4780 long: 64; 4781 long: 64; 4782 long: 64; 4783 long: 64; 4784 long: 64; 4785 long: 64; 4786 long: 64; 4787 }; 4788 4789 struct zoneref { 4790 struct zone *zone; 4791 int zone_idx; 4792 }; 4793 4794 struct zonelist { 4795 struct zoneref _zonerefs[5121]; 4796 }; 4797 4798 enum zone_type { 4799 ZONE_DMA = 0, 4800 ZONE_DMA32 = 1, 4801 ZONE_NORMAL = 2, 4802 ZONE_MOVABLE = 3, 4803 ZONE_DEVICE = 4, 4804 __MAX_NR_ZONES = 5, 4805 }; 4806 4807 struct deferred_split { 4808 spinlock_t split_queue_lock; 4809 struct list_head split_queue; 4810 long unsigned int split_queue_len; 4811 }; 4812 4813 struct per_cpu_nodestat; 4814 4815 struct pglist_data { 4816 struct zone node_zones[5]; 4817 struct zonelist node_zonelists[2]; 4818 int nr_zones; 4819 spinlock_t node_size_lock; 4820 long unsigned int node_start_pfn; 4821 long unsigned int node_present_pages; 4822 long unsigned int node_spanned_pages; 4823 int node_id; 4824 wait_queue_head_t kswapd_wait; 4825 wait_queue_head_t pfmemalloc_wait; 4826 struct task_struct *kswapd; 4827 int kswapd_order; 4828 enum zone_type kswapd_highest_zoneidx; 4829 int kswapd_failures; 4830 int kcompactd_max_order; 4831 enum zone_type kcompactd_highest_zoneidx; 4832 wait_queue_head_t kcompactd_wait; 4833 struct task_struct *kcompactd; 4834 long unsigned int totalreserve_pages; 4835 long unsigned int min_unmapped_pages; 4836 long unsigned int min_slab_pages; 4837 long: 64; 4838 long: 64; 4839 long: 64; 4840 long: 64; 4841 long: 64; 4842 long: 64; 4843 struct zone_padding _pad1_; 4844 struct deferred_split deferred_split_queue; 4845 struct lruvec __lruvec; 4846 long unsigned int flags; 4847 long: 64; 4848 struct zone_padding _pad2_; 4849 struct per_cpu_nodestat *per_cpu_nodestats; 4850 atomic_long_t vm_stat[38]; 4851 long: 64; 4852 }; 4853 4854 struct per_cpu_pages { 4855 int count; 4856 int high; 4857 int batch; 4858 struct list_head lists[3]; 4859 }; 4860 4861 struct per_cpu_pageset { 4862 struct per_cpu_pages pcp; 4863 s8 expire; 4864 u16 vm_numa_stat_diff[6]; 4865 s8 stat_threshold; 4866 s8 vm_stat_diff[11]; 4867 }; 4868 4869 struct per_cpu_nodestat { 4870 s8 stat_threshold; 4871 s8 vm_node_stat_diff[38]; 4872 }; 4873 4874 typedef struct pglist_data pg_data_t; 4875 4876 enum irq_domain_bus_token { 4877 DOMAIN_BUS_ANY = 0, 4878 DOMAIN_BUS_WIRED = 1, 4879 DOMAIN_BUS_GENERIC_MSI = 2, 4880 DOMAIN_BUS_PCI_MSI = 3, 4881 DOMAIN_BUS_PLATFORM_MSI = 4, 4882 DOMAIN_BUS_NEXUS = 5, 4883 DOMAIN_BUS_IPI = 6, 4884 DOMAIN_BUS_FSL_MC_MSI = 7, 4885 DOMAIN_BUS_TI_SCI_INTA_MSI = 8, 4886 DOMAIN_BUS_WAKEUP = 9, 4887 DOMAIN_BUS_VMD_MSI = 10, 4888 }; 4889 4890 struct irq_domain_ops; 4891 4892 struct fwnode_handle; 4893 4894 struct irq_domain_chip_generic; 4895 4896 struct irq_domain { 4897 struct list_head link; 4898 const char *name; 4899 const struct irq_domain_ops *ops; 4900 void *host_data; 4901 unsigned int flags; 4902 unsigned int mapcount; 4903 struct fwnode_handle *fwnode; 4904 enum irq_domain_bus_token bus_token; 4905 struct irq_domain_chip_generic *gc; 4906 struct irq_domain *parent; 4907 irq_hw_number_t hwirq_max; 4908 unsigned int revmap_direct_max_irq; 4909 unsigned int revmap_size; 4910 struct xarray revmap_tree; 4911 struct mutex revmap_tree_mutex; 4912 unsigned int linear_revmap[0]; 4913 }; 4914 4915 typedef int proc_handler(struct ctl_table *, int, void *, size_t *, loff_t *); 4916 4917 struct ctl_table_poll; 4918 4919 struct ctl_table { 4920 const char *procname; 4921 void *data; 4922 int maxlen; 4923 umode_t mode; 4924 struct ctl_table *child; 4925 proc_handler *proc_handler; 4926 struct ctl_table_poll *poll; 4927 void *extra1; 4928 void *extra2; 4929 }; 4930 4931 struct ctl_table_poll { 4932 atomic_t event; 4933 wait_queue_head_t wait; 4934 }; 4935 4936 struct ctl_node { 4937 struct rb_node node; 4938 struct ctl_table_header *header; 4939 }; 4940 4941 struct ctl_table_root { 4942 struct ctl_table_set default_set; 4943 struct ctl_table_set * (*lookup)(struct ctl_table_root *); 4944 void (*set_ownership)(struct ctl_table_header *, struct ctl_table *, kuid_t *, kgid_t *); 4945 int (*permissions)(struct ctl_table_header *, struct ctl_table *); 4946 }; 4947 4948 enum umh_disable_depth { 4949 UMH_ENABLED = 0, 4950 UMH_FREEZING = 1, 4951 UMH_DISABLED = 2, 4952 }; 4953 4954 typedef __u64 Elf64_Addr; 4955 4956 typedef __u16 Elf64_Half; 4957 4958 typedef __u64 Elf64_Off; 4959 4960 typedef __u32 Elf64_Word; 4961 4962 typedef __u64 Elf64_Xword; 4963 4964 struct elf64_sym { 4965 Elf64_Word st_name; 4966 unsigned char st_info; 4967 unsigned char st_other; 4968 Elf64_Half st_shndx; 4969 Elf64_Addr st_value; 4970 Elf64_Xword st_size; 4971 }; 4972 4973 typedef struct elf64_sym Elf64_Sym; 4974 4975 struct elf64_hdr { 4976 unsigned char e_ident[16]; 4977 Elf64_Half e_type; 4978 Elf64_Half e_machine; 4979 Elf64_Word e_version; 4980 Elf64_Addr e_entry; 4981 Elf64_Off e_phoff; 4982 Elf64_Off e_shoff; 4983 Elf64_Word e_flags; 4984 Elf64_Half e_ehsize; 4985 Elf64_Half e_phentsize; 4986 Elf64_Half e_phnum; 4987 Elf64_Half e_shentsize; 4988 Elf64_Half e_shnum; 4989 Elf64_Half e_shstrndx; 4990 }; 4991 4992 typedef struct elf64_hdr Elf64_Ehdr; 4993 4994 struct elf64_shdr { 4995 Elf64_Word sh_name; 4996 Elf64_Word sh_type; 4997 Elf64_Xword sh_flags; 4998 Elf64_Addr sh_addr; 4999 Elf64_Off sh_offset; 5000 Elf64_Xword sh_size; 5001 Elf64_Word sh_link; 5002 Elf64_Word sh_info; 5003 Elf64_Xword sh_addralign; 5004 Elf64_Xword sh_entsize; 5005 }; 5006 5007 typedef struct elf64_shdr Elf64_Shdr; 5008 5009 struct idr { 5010 struct xarray idr_rt; 5011 unsigned int idr_base; 5012 unsigned int idr_next; 5013 }; 5014 5015 struct kernfs_root; 5016 5017 struct kernfs_elem_dir { 5018 long unsigned int subdirs; 5019 struct rb_root children; 5020 struct kernfs_root *root; 5021 }; 5022 5023 struct kernfs_node; 5024 5025 struct kernfs_syscall_ops; 5026 5027 struct kernfs_root { 5028 struct kernfs_node *kn; 5029 unsigned int flags; 5030 struct idr ino_idr; 5031 u32 last_id_lowbits; 5032 u32 id_highbits; 5033 struct kernfs_syscall_ops *syscall_ops; 5034 struct list_head supers; 5035 wait_queue_head_t deactivate_waitq; 5036 }; 5037 5038 struct kernfs_elem_symlink { 5039 struct kernfs_node *target_kn; 5040 }; 5041 5042 struct kernfs_ops; 5043 5044 struct kernfs_open_node; 5045 5046 struct kernfs_elem_attr { 5047 const struct kernfs_ops *ops; 5048 struct kernfs_open_node *open; 5049 loff_t size; 5050 struct kernfs_node *notify_next; 5051 }; 5052 5053 struct kernfs_iattrs; 5054 5055 struct kernfs_node { 5056 atomic_t count; 5057 atomic_t active; 5058 struct kernfs_node *parent; 5059 const char *name; 5060 struct rb_node rb; 5061 const void *ns; 5062 unsigned int hash; 5063 union { 5064 struct kernfs_elem_dir dir; 5065 struct kernfs_elem_symlink symlink; 5066 struct kernfs_elem_attr attr; 5067 }; 5068 void *priv; 5069 u64 id; 5070 short unsigned int flags; 5071 umode_t mode; 5072 struct kernfs_iattrs *iattr; 5073 }; 5074 5075 struct kernfs_open_file; 5076 5077 struct kernfs_ops { 5078 int (*open)(struct kernfs_open_file *); 5079 void (*release)(struct kernfs_open_file *); 5080 int (*seq_show)(struct seq_file *, void *); 5081 void * (*seq_start)(struct seq_file *, loff_t *); 5082 void * (*seq_next)(struct seq_file *, void *, loff_t *); 5083 void (*seq_stop)(struct seq_file *, void *); 5084 ssize_t (*read)(struct kernfs_open_file *, char *, size_t, loff_t); 5085 size_t atomic_write_len; 5086 bool prealloc; 5087 ssize_t (*write)(struct kernfs_open_file *, char *, size_t, loff_t); 5088 __poll_t (*poll)(struct kernfs_open_file *, struct poll_table_struct *); 5089 int (*mmap)(struct kernfs_open_file *, struct vm_area_struct *); 5090 }; 5091 5092 struct kernfs_syscall_ops { 5093 int (*show_options)(struct seq_file *, struct kernfs_root *); 5094 int (*mkdir)(struct kernfs_node *, const char *, umode_t); 5095 int (*rmdir)(struct kernfs_node *); 5096 int (*rename)(struct kernfs_node *, struct kernfs_node *, const char *); 5097 int (*show_path)(struct seq_file *, struct kernfs_node *, struct kernfs_root *); 5098 }; 5099 5100 struct seq_file { 5101 char *buf; 5102 size_t size; 5103 size_t from; 5104 size_t count; 5105 size_t pad_until; 5106 loff_t index; 5107 loff_t read_pos; 5108 struct mutex lock; 5109 const struct seq_operations *op; 5110 int poll_event; 5111 const struct file *file; 5112 void *private; 5113 }; 5114 5115 struct kernfs_open_file { 5116 struct kernfs_node *kn; 5117 struct file *file; 5118 struct seq_file *seq_file; 5119 void *priv; 5120 struct mutex mutex; 5121 struct mutex prealloc_mutex; 5122 int event; 5123 struct list_head list; 5124 char *prealloc_buf; 5125 size_t atomic_write_len; 5126 bool mmapped: 1; 5127 bool released: 1; 5128 const struct vm_operations_struct *vm_ops; 5129 }; 5130 5131 typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *); 5132 5133 struct poll_table_struct { 5134 poll_queue_proc _qproc; 5135 __poll_t _key; 5136 }; 5137 5138 enum kobj_ns_type { 5139 KOBJ_NS_TYPE_NONE = 0, 5140 KOBJ_NS_TYPE_NET = 1, 5141 KOBJ_NS_TYPES = 2, 5142 }; 5143 5144 struct sock; 5145 5146 struct kobj_ns_type_operations { 5147 enum kobj_ns_type type; 5148 bool (*current_may_mount)(); 5149 void * (*grab_current_ns)(); 5150 const void * (*netlink_ns)(struct sock *); 5151 const void * (*initial_ns)(); 5152 void (*drop_ns)(void *); 5153 }; 5154 5155 struct attribute { 5156 const char *name; 5157 umode_t mode; 5158 }; 5159 5160 struct kobject; 5161 5162 struct bin_attribute; 5163 5164 struct attribute_group { 5165 const char *name; 5166 umode_t (*is_visible)(struct kobject *, struct attribute *, int); 5167 umode_t (*is_bin_visible)(struct kobject *, struct bin_attribute *, int); 5168 struct attribute **attrs; 5169 struct bin_attribute **bin_attrs; 5170 }; 5171 5172 struct kref { 5173 refcount_t refcount; 5174 }; 5175 5176 struct kset; 5177 5178 struct kobj_type; 5179 5180 struct kobject { 5181 const char *name; 5182 struct list_head entry; 5183 struct kobject *parent; 5184 struct kset *kset; 5185 struct kobj_type *ktype; 5186 struct kernfs_node *sd; 5187 struct kref kref; 5188 unsigned int state_initialized: 1; 5189 unsigned int state_in_sysfs: 1; 5190 unsigned int state_add_uevent_sent: 1; 5191 unsigned int state_remove_uevent_sent: 1; 5192 unsigned int uevent_suppress: 1; 5193 }; 5194 5195 struct bin_attribute { 5196 struct attribute attr; 5197 size_t size; 5198 void *private; 5199 ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t); 5200 ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *, char *, loff_t, size_t); 5201 int (*mmap)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *); 5202 }; 5203 5204 struct sysfs_ops { 5205 ssize_t (*show)(struct kobject *, struct attribute *, char *); 5206 ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t); 5207 }; 5208 5209 struct kset_uevent_ops; 5210 5211 struct kset { 5212 struct list_head list; 5213 spinlock_t list_lock; 5214 struct kobject kobj; 5215 const struct kset_uevent_ops *uevent_ops; 5216 }; 5217 5218 struct kobj_type { 5219 void (*release)(struct kobject *); 5220 const struct sysfs_ops *sysfs_ops; 5221 struct attribute **default_attrs; 5222 const struct attribute_group **default_groups; 5223 const struct kobj_ns_type_operations * (*child_ns_type)(struct kobject *); 5224 const void * (*namespace)(struct kobject *); 5225 void (*get_ownership)(struct kobject *, kuid_t *, kgid_t *); 5226 }; 5227 5228 struct kobj_uevent_env { 5229 char *argv[3]; 5230 char *envp[64]; 5231 int envp_idx; 5232 char buf[2048]; 5233 int buflen; 5234 }; 5235 5236 struct kset_uevent_ops { 5237 int (* const filter)(struct kset *, struct kobject *); 5238 const char * (* const name)(struct kset *, struct kobject *); 5239 int (* const uevent)(struct kset *, struct kobject *, struct kobj_uevent_env *); 5240 }; 5241 5242 struct kernel_param; 5243 5244 struct kernel_param_ops { 5245 unsigned int flags; 5246 int (*set)(const char *, const struct kernel_param *); 5247 int (*get)(char *, const struct kernel_param *); 5248 void (*free)(void *); 5249 }; 5250 5251 struct kparam_string; 5252 5253 struct kparam_array; 5254 5255 struct kernel_param { 5256 const char *name; 5257 struct module *mod; 5258 const struct kernel_param_ops *ops; 5259 const u16 perm; 5260 s8 level; 5261 u8 flags; 5262 union { 5263 void *arg; 5264 const struct kparam_string *str; 5265 const struct kparam_array *arr; 5266 }; 5267 }; 5268 5269 struct kparam_string { 5270 unsigned int maxlen; 5271 char *string; 5272 }; 5273 5274 struct kparam_array { 5275 unsigned int max; 5276 unsigned int elemsize; 5277 unsigned int *num; 5278 const struct kernel_param_ops *ops; 5279 void *elem; 5280 }; 5281 5282 enum module_state { 5283 MODULE_STATE_LIVE = 0, 5284 MODULE_STATE_COMING = 1, 5285 MODULE_STATE_GOING = 2, 5286 MODULE_STATE_UNFORMED = 3, 5287 }; 5288 5289 struct module_param_attrs; 5290 5291 struct module_kobject { 5292 struct kobject kobj; 5293 struct module *mod; 5294 struct kobject *drivers_dir; 5295 struct module_param_attrs *mp; 5296 struct completion *kobj_completion; 5297 }; 5298 5299 struct latch_tree_node { 5300 struct rb_node node[2]; 5301 }; 5302 5303 struct mod_tree_node { 5304 struct module *mod; 5305 struct latch_tree_node node; 5306 }; 5307 5308 struct module_layout { 5309 void *base; 5310 unsigned int size; 5311 unsigned int text_size; 5312 unsigned int ro_size; 5313 unsigned int ro_after_init_size; 5314 struct mod_tree_node mtn; 5315 }; 5316 5317 struct mod_arch_specific { 5318 unsigned int num_orcs; 5319 int *orc_unwind_ip; 5320 struct orc_entry *orc_unwind; 5321 }; 5322 5323 struct mod_kallsyms { 5324 Elf64_Sym *symtab; 5325 unsigned int num_symtab; 5326 char *strtab; 5327 char *typetab; 5328 }; 5329 5330 struct module_attribute; 5331 5332 struct exception_table_entry; 5333 5334 struct module_sect_attrs; 5335 5336 struct module_notes_attrs; 5337 5338 struct trace_eval_map; 5339 5340 struct klp_modinfo; 5341 5342 struct error_injection_entry; 5343 5344 struct module { 5345 enum module_state state; 5346 struct list_head list; 5347 char name[56]; 5348 struct module_kobject mkobj; 5349 struct module_attribute *modinfo_attrs; 5350 const char *version; 5351 const char *srcversion; 5352 struct kobject *holders_dir; 5353 const struct kernel_symbol *syms; 5354 const s32 *crcs; 5355 unsigned int num_syms; 5356 struct mutex param_lock; 5357 struct kernel_param *kp; 5358 unsigned int num_kp; 5359 unsigned int num_gpl_syms; 5360 const struct kernel_symbol *gpl_syms; 5361 const s32 *gpl_crcs; 5362 bool using_gplonly_symbols; 5363 const struct kernel_symbol *unused_syms; 5364 const s32 *unused_crcs; 5365 unsigned int num_unused_syms; 5366 unsigned int num_unused_gpl_syms; 5367 const struct kernel_symbol *unused_gpl_syms; 5368 const s32 *unused_gpl_crcs; 5369 bool sig_ok; 5370 bool async_probe_requested; 5371 const struct kernel_symbol *gpl_future_syms; 5372 const s32 *gpl_future_crcs; 5373 unsigned int num_gpl_future_syms; 5374 unsigned int num_exentries; 5375 struct exception_table_entry *extable; 5376 int (*init)(); 5377 long: 64; 5378 long: 64; 5379 long: 64; 5380 long: 64; 5381 long: 64; 5382 long: 64; 5383 long: 64; 5384 struct module_layout core_layout; 5385 struct module_layout init_layout; 5386 struct mod_arch_specific arch; 5387 long unsigned int taints; 5388 unsigned int num_bugs; 5389 struct list_head bug_list; 5390 struct bug_entry *bug_table; 5391 struct mod_kallsyms *kallsyms; 5392 struct mod_kallsyms core_kallsyms; 5393 struct module_sect_attrs *sect_attrs; 5394 struct module_notes_attrs *notes_attrs; 5395 char *args; 5396 void *percpu; 5397 unsigned int percpu_size; 5398 void *noinstr_text_start; 5399 unsigned int noinstr_text_size; 5400 unsigned int num_tracepoints; 5401 tracepoint_ptr_t *tracepoints_ptrs; 5402 unsigned int num_srcu_structs; 5403 struct srcu_struct **srcu_struct_ptrs; 5404 unsigned int num_bpf_raw_events; 5405 struct bpf_raw_event_map *bpf_raw_events; 5406 unsigned int btf_data_size; 5407 void *btf_data; 5408 struct jump_entry *jump_entries; 5409 unsigned int num_jump_entries; 5410 unsigned int num_trace_bprintk_fmt; 5411 const char **trace_bprintk_fmt_start; 5412 struct trace_event_call **trace_events; 5413 unsigned int num_trace_events; 5414 struct trace_eval_map **trace_evals; 5415 unsigned int num_trace_evals; 5416 unsigned int num_ftrace_callsites; 5417 long unsigned int *ftrace_callsites; 5418 void *kprobes_text_start; 5419 unsigned int kprobes_text_size; 5420 long unsigned int *kprobe_blacklist; 5421 unsigned int num_kprobe_blacklist; 5422 int num_static_call_sites; 5423 struct static_call_site *static_call_sites; 5424 bool klp; 5425 bool klp_alive; 5426 struct klp_modinfo *klp_info; 5427 struct list_head source_list; 5428 struct list_head target_list; 5429 void (*exit)(); 5430 atomic_t refcnt; 5431 struct error_injection_entry *ei_funcs; 5432 unsigned int num_ei_funcs; 5433 long: 32; 5434 long: 64; 5435 long: 64; 5436 }; 5437 5438 struct error_injection_entry { 5439 long unsigned int addr; 5440 int etype; 5441 }; 5442 5443 struct static_call_site { 5444 s32 addr; 5445 s32 key; 5446 }; 5447 5448 struct module_attribute { 5449 struct attribute attr; 5450 ssize_t (*show)(struct module_attribute *, struct module_kobject *, char *); 5451 ssize_t (*store)(struct module_attribute *, struct module_kobject *, const char *, size_t); 5452 void (*setup)(struct module *, const char *); 5453 int (*test)(struct module *); 5454 void (*free)(struct module *); 5455 }; 5456 5457 struct klp_modinfo { 5458 Elf64_Ehdr hdr; 5459 Elf64_Shdr *sechdrs; 5460 char *secstrings; 5461 unsigned int symndx; 5462 }; 5463 5464 struct exception_table_entry { 5465 int insn; 5466 int fixup; 5467 int handler; 5468 }; 5469 5470 struct trace_event_functions; 5471 5472 struct trace_event { 5473 struct hlist_node node; 5474 struct list_head list; 5475 int type; 5476 struct trace_event_functions *funcs; 5477 }; 5478 5479 struct trace_event_class; 5480 5481 struct bpf_prog_array; 5482 5483 struct trace_event_call { 5484 struct list_head list; 5485 struct trace_event_class *class; 5486 union { 5487 char *name; 5488 struct tracepoint *tp; 5489 }; 5490 struct trace_event event; 5491 char *print_fmt; 5492 struct event_filter *filter; 5493 void *mod; 5494 void *data; 5495 int flags; 5496 int perf_refcount; 5497 struct hlist_head *perf_events; 5498 struct bpf_prog_array *prog_array; 5499 int (*perf_perm)(struct trace_event_call *, struct perf_event *); 5500 }; 5501 5502 struct trace_eval_map { 5503 const char *system; 5504 const char *eval_string; 5505 long unsigned int eval_value; 5506 }; 5507 5508 struct cgroup; 5509 5510 struct cgroup_subsys; 5511 5512 struct cgroup_subsys_state { 5513 struct cgroup *cgroup; 5514 struct cgroup_subsys *ss; 5515 struct percpu_ref refcnt; 5516 struct list_head sibling; 5517 struct list_head children; 5518 struct list_head rstat_css_node; 5519 int id; 5520 unsigned int flags; 5521 u64 serial_nr; 5522 atomic_t online_cnt; 5523 struct work_struct destroy_work; 5524 struct rcu_work destroy_rwork; 5525 struct cgroup_subsys_state *parent; 5526 }; 5527 5528 struct mem_cgroup_id { 5529 int id; 5530 refcount_t ref; 5531 }; 5532 5533 struct page_counter { 5534 atomic_long_t usage; 5535 long unsigned int min; 5536 long unsigned int low; 5537 long unsigned int high; 5538 long unsigned int max; 5539 struct page_counter *parent; 5540 long unsigned int emin; 5541 atomic_long_t min_usage; 5542 atomic_long_t children_min_usage; 5543 long unsigned int elow; 5544 atomic_long_t low_usage; 5545 atomic_long_t children_low_usage; 5546 long unsigned int watermark; 5547 long unsigned int failcnt; 5548 }; 5549 5550 struct vmpressure { 5551 long unsigned int scanned; 5552 long unsigned int reclaimed; 5553 long unsigned int tree_scanned; 5554 long unsigned int tree_reclaimed; 5555 spinlock_t sr_lock; 5556 struct list_head events; 5557 struct mutex events_lock; 5558 struct work_struct work; 5559 }; 5560 5561 struct cgroup_file { 5562 struct kernfs_node *kn; 5563 long unsigned int notified_at; 5564 struct timer_list notify_timer; 5565 }; 5566 5567 struct mem_cgroup_threshold_ary; 5568 5569 struct mem_cgroup_thresholds { 5570 struct mem_cgroup_threshold_ary *primary; 5571 struct mem_cgroup_threshold_ary *spare; 5572 }; 5573 5574 struct memcg_padding { 5575 char x[0]; 5576 }; 5577 5578 enum memcg_kmem_state { 5579 KMEM_NONE = 0, 5580 KMEM_ALLOCATED = 1, 5581 KMEM_ONLINE = 2, 5582 }; 5583 5584 struct percpu_counter { 5585 raw_spinlock_t lock; 5586 s64 count; 5587 struct list_head list; 5588 s32 *counters; 5589 }; 5590 5591 struct fprop_global { 5592 struct percpu_counter events; 5593 unsigned int period; 5594 seqcount_t sequence; 5595 }; 5596 5597 struct wb_domain { 5598 spinlock_t lock; 5599 struct fprop_global completions; 5600 struct timer_list period_timer; 5601 long unsigned int period_time; 5602 long unsigned int dirty_limit_tstamp; 5603 long unsigned int dirty_limit; 5604 }; 5605 5606 struct wb_completion { 5607 atomic_t cnt; 5608 wait_queue_head_t *waitq; 5609 }; 5610 5611 struct memcg_cgwb_frn { 5612 u64 bdi_id; 5613 int memcg_id; 5614 u64 at; 5615 struct wb_completion done; 5616 }; 5617 5618 struct obj_cgroup; 5619 5620 struct memcg_vmstats_percpu; 5621 5622 struct mem_cgroup_per_node; 5623 5624 struct mem_cgroup { 5625 struct cgroup_subsys_state css; 5626 struct mem_cgroup_id id; 5627 struct page_counter memory; 5628 union { 5629 struct page_counter swap; 5630 struct page_counter memsw; 5631 }; 5632 struct page_counter kmem; 5633 struct page_counter tcpmem; 5634 struct work_struct high_work; 5635 long unsigned int soft_limit; 5636 struct vmpressure vmpressure; 5637 bool oom_group; 5638 bool oom_lock; 5639 int under_oom; 5640 int swappiness; 5641 int oom_kill_disable; 5642 struct cgroup_file events_file; 5643 struct cgroup_file events_local_file; 5644 struct cgroup_file swap_events_file; 5645 struct mutex thresholds_lock; 5646 struct mem_cgroup_thresholds thresholds; 5647 struct mem_cgroup_thresholds memsw_thresholds; 5648 struct list_head oom_notify; 5649 long unsigned int move_charge_at_immigrate; 5650 spinlock_t move_lock; 5651 long unsigned int move_lock_flags; 5652 long: 64; 5653 long: 64; 5654 long: 64; 5655 long: 64; 5656 long: 64; 5657 long: 64; 5658 struct memcg_padding _pad1_; 5659 atomic_long_t vmstats[41]; 5660 atomic_long_t vmevents[96]; 5661 atomic_long_t memory_events[8]; 5662 atomic_long_t memory_events_local[8]; 5663 long unsigned int socket_pressure; 5664 bool tcpmem_active; 5665 int tcpmem_pressure; 5666 int kmemcg_id; 5667 enum memcg_kmem_state kmem_state; 5668 struct obj_cgroup *objcg; 5669 struct list_head objcg_list; 5670 long: 64; 5671 struct memcg_padding _pad2_; 5672 atomic_t moving_account; 5673 struct task_struct *move_lock_task; 5674 struct memcg_vmstats_percpu *vmstats_local; 5675 struct memcg_vmstats_percpu *vmstats_percpu; 5676 struct list_head cgwb_list; 5677 struct wb_domain cgwb_domain; 5678 struct memcg_cgwb_frn cgwb_frn[4]; 5679 struct list_head event_list; 5680 spinlock_t event_list_lock; 5681 struct deferred_split deferred_split_queue; 5682 struct mem_cgroup_per_node *nodeinfo[0]; 5683 }; 5684 5685 struct fs_pin; 5686 5687 struct pid_namespace { 5688 struct idr idr; 5689 struct callback_head rcu; 5690 unsigned int pid_allocated; 5691 struct task_struct *child_reaper; 5692 struct kmem_cache *pid_cachep; 5693 unsigned int level; 5694 struct pid_namespace *parent; 5695 struct fs_pin *bacct; 5696 struct user_namespace *user_ns; 5697 struct ucounts *ucounts; 5698 int reboot; 5699 struct ns_common ns; 5700 }; 5701 5702 struct task_cputime { 5703 u64 stime; 5704 u64 utime; 5705 long long unsigned int sum_exec_runtime; 5706 }; 5707 5708 struct uts_namespace; 5709 5710 struct ipc_namespace; 5711 5712 struct mnt_namespace; 5713 5714 struct net; 5715 5716 struct time_namespace; 5717 5718 struct cgroup_namespace; 5719 5720 struct nsproxy { 5721 atomic_t count; 5722 struct uts_namespace *uts_ns; 5723 struct ipc_namespace *ipc_ns; 5724 struct mnt_namespace *mnt_ns; 5725 struct pid_namespace *pid_ns_for_children; 5726 struct net *net_ns; 5727 struct time_namespace *time_ns; 5728 struct time_namespace *time_ns_for_children; 5729 struct cgroup_namespace *cgroup_ns; 5730 }; 5731 5732 struct bio; 5733 5734 struct bio_list { 5735 struct bio *head; 5736 struct bio *tail; 5737 }; 5738 5739 struct blk_plug { 5740 struct list_head mq_list; 5741 struct list_head cb_list; 5742 short unsigned int rq_count; 5743 bool multiple_queues; 5744 bool nowait; 5745 }; 5746 5747 struct reclaim_state { 5748 long unsigned int reclaimed_slab; 5749 }; 5750 5751 struct fprop_local_percpu { 5752 struct percpu_counter events; 5753 unsigned int period; 5754 raw_spinlock_t lock; 5755 }; 5756 5757 enum wb_reason { 5758 WB_REASON_BACKGROUND = 0, 5759 WB_REASON_VMSCAN = 1, 5760 WB_REASON_SYNC = 2, 5761 WB_REASON_PERIODIC = 3, 5762 WB_REASON_LAPTOP_TIMER = 4, 5763 WB_REASON_FS_FREE_SPACE = 5, 5764 WB_REASON_FORKER_THREAD = 6, 5765 WB_REASON_FOREIGN_FLUSH = 7, 5766 WB_REASON_MAX = 8, 5767 }; 5768 5769 struct bdi_writeback { 5770 struct backing_dev_info *bdi; 5771 long unsigned int state; 5772 long unsigned int last_old_flush; 5773 struct list_head b_dirty; 5774 struct list_head b_io; 5775 struct list_head b_more_io; 5776 struct list_head b_dirty_time; 5777 spinlock_t list_lock; 5778 struct percpu_counter stat[4]; 5779 long unsigned int congested; 5780 long unsigned int bw_time_stamp; 5781 long unsigned int dirtied_stamp; 5782 long unsigned int written_stamp; 5783 long unsigned int write_bandwidth; 5784 long unsigned int avg_write_bandwidth; 5785 long unsigned int dirty_ratelimit; 5786 long unsigned int balanced_dirty_ratelimit; 5787 struct fprop_local_percpu completions; 5788 int dirty_exceeded; 5789 enum wb_reason start_all_reason; 5790 spinlock_t work_lock; 5791 struct list_head work_list; 5792 struct delayed_work dwork; 5793 long unsigned int dirty_sleep; 5794 struct list_head bdi_node; 5795 struct percpu_ref refcnt; 5796 struct fprop_local_percpu memcg_completions; 5797 struct cgroup_subsys_state *memcg_css; 5798 struct cgroup_subsys_state *blkcg_css; 5799 struct list_head memcg_node; 5800 struct list_head blkcg_node; 5801 union { 5802 struct work_struct release_work; 5803 struct callback_head rcu; 5804 }; 5805 }; 5806 5807 struct device; 5808 5809 struct backing_dev_info { 5810 u64 id; 5811 struct rb_node rb_node; 5812 struct list_head bdi_list; 5813 long unsigned int ra_pages; 5814 long unsigned int io_pages; 5815 struct kref refcnt; 5816 unsigned int capabilities; 5817 unsigned int min_ratio; 5818 unsigned int max_ratio; 5819 unsigned int max_prop_frac; 5820 atomic_long_t tot_write_bandwidth; 5821 struct bdi_writeback wb; 5822 struct list_head wb_list; 5823 struct xarray cgwb_tree; 5824 struct mutex cgwb_release_mutex; 5825 struct rw_semaphore wb_switch_rwsem; 5826 wait_queue_head_t wb_waitq; 5827 struct device *dev; 5828 char dev_name[64]; 5829 struct device *owner; 5830 struct timer_list laptop_mode_wb_timer; 5831 struct dentry *debug_dir; 5832 }; 5833 5834 struct css_set { 5835 struct cgroup_subsys_state *subsys[12]; 5836 refcount_t refcount; 5837 struct css_set *dom_cset; 5838 struct cgroup *dfl_cgrp; 5839 int nr_tasks; 5840 struct list_head tasks; 5841 struct list_head mg_tasks; 5842 struct list_head dying_tasks; 5843 struct list_head task_iters; 5844 struct list_head e_cset_node[12]; 5845 struct list_head threaded_csets; 5846 struct list_head threaded_csets_node; 5847 struct hlist_node hlist; 5848 struct list_head cgrp_links; 5849 struct list_head mg_preload_node; 5850 struct list_head mg_node; 5851 struct cgroup *mg_src_cgrp; 5852 struct cgroup *mg_dst_cgrp; 5853 struct css_set *mg_dst_cset; 5854 bool dead; 5855 struct callback_head callback_head; 5856 }; 5857 5858 typedef u32 compat_uptr_t; 5859 5860 struct compat_robust_list { 5861 compat_uptr_t next; 5862 }; 5863 5864 typedef s32 compat_long_t; 5865 5866 struct compat_robust_list_head { 5867 struct compat_robust_list list; 5868 compat_long_t futex_offset; 5869 compat_uptr_t list_op_pending; 5870 }; 5871 5872 struct perf_event_groups { 5873 struct rb_root tree; 5874 u64 index; 5875 }; 5876 5877 struct perf_event_context { 5878 struct pmu *pmu; 5879 raw_spinlock_t lock; 5880 struct mutex mutex; 5881 struct list_head active_ctx_list; 5882 struct perf_event_groups pinned_groups; 5883 struct perf_event_groups flexible_groups; 5884 struct list_head event_list; 5885 struct list_head pinned_active; 5886 struct list_head flexible_active; 5887 int nr_events; 5888 int nr_active; 5889 int is_active; 5890 int nr_stat; 5891 int nr_freq; 5892 int rotate_disable; 5893 int rotate_necessary; 5894 refcount_t refcount; 5895 struct task_struct *task; 5896 u64 time; 5897 u64 timestamp; 5898 struct perf_event_context *parent_ctx; 5899 u64 parent_gen; 5900 u64 generation; 5901 int pin_count; 5902 int nr_cgroups; 5903 void *task_ctx_data; 5904 struct callback_head callback_head; 5905 }; 5906 5907 struct task_delay_info { 5908 raw_spinlock_t lock; 5909 unsigned int flags; 5910 u64 blkio_start; 5911 u64 blkio_delay; 5912 u64 swapin_delay; 5913 u32 blkio_count; 5914 u32 swapin_count; 5915 u64 freepages_start; 5916 u64 freepages_delay; 5917 u64 thrashing_start; 5918 u64 thrashing_delay; 5919 u32 freepages_count; 5920 u32 thrashing_count; 5921 }; 5922 5923 struct ftrace_ret_stack { 5924 long unsigned int ret; 5925 long unsigned int func; 5926 long long unsigned int calltime; 5927 long long unsigned int subtime; 5928 long unsigned int *retp; 5929 }; 5930 5931 struct blk_integrity_profile; 5932 5933 struct blk_integrity { 5934 const struct blk_integrity_profile *profile; 5935 unsigned char flags; 5936 unsigned char tuple_size; 5937 unsigned char interval_exp; 5938 unsigned char tag_size; 5939 }; 5940 5941 enum rpm_status { 5942 RPM_ACTIVE = 0, 5943 RPM_RESUMING = 1, 5944 RPM_SUSPENDED = 2, 5945 RPM_SUSPENDING = 3, 5946 }; 5947 5948 struct blk_rq_stat { 5949 u64 mean; 5950 u64 min; 5951 u64 max; 5952 u32 nr_samples; 5953 u64 batch; 5954 }; 5955 5956 enum blk_zoned_model { 5957 BLK_ZONED_NONE = 0, 5958 BLK_ZONED_HA = 1, 5959 BLK_ZONED_HM = 2, 5960 }; 5961 5962 struct queue_limits { 5963 long unsigned int bounce_pfn; 5964 long unsigned int seg_boundary_mask; 5965 long unsigned int virt_boundary_mask; 5966 unsigned int max_hw_sectors; 5967 unsigned int max_dev_sectors; 5968 unsigned int chunk_sectors; 5969 unsigned int max_sectors; 5970 unsigned int max_segment_size; 5971 unsigned int physical_block_size; 5972 unsigned int logical_block_size; 5973 unsigned int alignment_offset; 5974 unsigned int io_min; 5975 unsigned int io_opt; 5976 unsigned int max_discard_sectors; 5977 unsigned int max_hw_discard_sectors; 5978 unsigned int max_write_same_sectors; 5979 unsigned int max_write_zeroes_sectors; 5980 unsigned int max_zone_append_sectors; 5981 unsigned int discard_granularity; 5982 unsigned int discard_alignment; 5983 short unsigned int max_segments; 5984 short unsigned int max_integrity_segments; 5985 short unsigned int max_discard_segments; 5986 unsigned char misaligned; 5987 unsigned char discard_misaligned; 5988 unsigned char raid_partial_stripes_expensive; 5989 enum blk_zoned_model zoned; 5990 }; 5991 5992 struct bsg_ops; 5993 5994 struct bsg_class_device { 5995 struct device *class_dev; 5996 int minor; 5997 struct request_queue *queue; 5998 const struct bsg_ops *ops; 5999 }; 6000 6001 typedef void *mempool_alloc_t(gfp_t, void *); 6002 6003 typedef void mempool_free_t(void *, void *); 6004 6005 struct mempool_s { 6006 spinlock_t lock; 6007 int min_nr; 6008 int curr_nr; 6009 void **elements; 6010 void *pool_data; 6011 mempool_alloc_t *alloc; 6012 mempool_free_t *free; 6013 wait_queue_head_t wait; 6014 }; 6015 6016 typedef struct mempool_s mempool_t; 6017 6018 struct bio_set { 6019 struct kmem_cache *bio_slab; 6020 unsigned int front_pad; 6021 mempool_t bio_pool; 6022 mempool_t bvec_pool; 6023 mempool_t bio_integrity_pool; 6024 mempool_t bvec_integrity_pool; 6025 spinlock_t rescue_lock; 6026 struct bio_list rescue_list; 6027 struct work_struct rescue_work; 6028 struct workqueue_struct *rescue_workqueue; 6029 }; 6030 6031 struct request; 6032 6033 struct elevator_queue; 6034 6035 struct blk_queue_stats; 6036 6037 struct rq_qos; 6038 6039 struct blk_mq_ops; 6040 6041 struct blk_mq_ctx; 6042 6043 struct blk_mq_hw_ctx; 6044 6045 struct blk_keyslot_manager; 6046 6047 struct blk_stat_callback; 6048 6049 struct blkcg_gq; 6050 6051 struct blk_trace; 6052 6053 struct blk_flush_queue; 6054 6055 struct throtl_data; 6056 6057 struct blk_mq_tag_set; 6058 6059 struct request_queue { 6060 struct request *last_merge; 6061 struct elevator_queue *elevator; 6062 struct percpu_ref q_usage_counter; 6063 struct blk_queue_stats *stats; 6064 struct rq_qos *rq_qos; 6065 const struct blk_mq_ops *mq_ops; 6066 struct blk_mq_ctx *queue_ctx; 6067 unsigned int queue_depth; 6068 struct blk_mq_hw_ctx **queue_hw_ctx; 6069 unsigned int nr_hw_queues; 6070 struct backing_dev_info *backing_dev_info; 6071 void *queuedata; 6072 long unsigned int queue_flags; 6073 atomic_t pm_only; 6074 int id; 6075 gfp_t bounce_gfp; 6076 spinlock_t queue_lock; 6077 struct kobject kobj; 6078 struct kobject *mq_kobj; 6079 struct blk_integrity integrity; 6080 struct device *dev; 6081 enum rpm_status rpm_status; 6082 unsigned int nr_pending; 6083 long unsigned int nr_requests; 6084 unsigned int dma_pad_mask; 6085 unsigned int dma_alignment; 6086 struct blk_keyslot_manager *ksm; 6087 unsigned int rq_timeout; 6088 int poll_nsec; 6089 struct blk_stat_callback *poll_cb; 6090 struct blk_rq_stat poll_stat[16]; 6091 struct timer_list timeout; 6092 struct work_struct timeout_work; 6093 atomic_t nr_active_requests_shared_sbitmap; 6094 struct list_head icq_list; 6095 long unsigned int blkcg_pols[1]; 6096 struct blkcg_gq *root_blkg; 6097 struct list_head blkg_list; 6098 struct queue_limits limits; 6099 unsigned int required_elevator_features; 6100 unsigned int nr_zones; 6101 long unsigned int *conv_zones_bitmap; 6102 long unsigned int *seq_zones_wlock; 6103 unsigned int max_open_zones; 6104 unsigned int max_active_zones; 6105 unsigned int sg_timeout; 6106 unsigned int sg_reserved_size; 6107 int node; 6108 struct mutex debugfs_mutex; 6109 struct blk_trace *blk_trace; 6110 struct blk_flush_queue *fq; 6111 struct list_head requeue_list; 6112 spinlock_t requeue_lock; 6113 struct delayed_work requeue_work; 6114 struct mutex sysfs_lock; 6115 struct mutex sysfs_dir_lock; 6116 struct list_head unused_hctx_list; 6117 spinlock_t unused_hctx_lock; 6118 int mq_freeze_depth; 6119 struct bsg_class_device bsg_dev; 6120 struct throtl_data *td; 6121 struct callback_head callback_head; 6122 wait_queue_head_t mq_freeze_wq; 6123 struct mutex mq_freeze_lock; 6124 struct blk_mq_tag_set *tag_set; 6125 struct list_head tag_set_list; 6126 struct bio_set bio_split; 6127 struct dentry *debugfs_dir; 6128 struct dentry *sched_debugfs_dir; 6129 struct dentry *rqos_debugfs_dir; 6130 bool mq_sysfs_init_done; 6131 size_t cmd_size; 6132 u64 write_hints[5]; 6133 }; 6134 6135 struct cgroup_base_stat { 6136 struct task_cputime cputime; 6137 }; 6138 6139 struct psi_group_cpu; 6140 6141 struct psi_group { 6142 struct mutex avgs_lock; 6143 struct psi_group_cpu *pcpu; 6144 u64 avg_total[5]; 6145 u64 avg_last_update; 6146 u64 avg_next_update; 6147 struct delayed_work avgs_work; 6148 u64 total[10]; 6149 long unsigned int avg[15]; 6150 struct task_struct *poll_task; 6151 struct timer_list poll_timer; 6152 wait_queue_head_t poll_wait; 6153 atomic_t poll_wakeup; 6154 struct mutex trigger_lock; 6155 struct list_head triggers; 6156 u32 nr_triggers[5]; 6157 u32 poll_states; 6158 u64 poll_min_period; 6159 u64 polling_total[5]; 6160 u64 polling_next_update; 6161 u64 polling_until; 6162 }; 6163 6164 struct cgroup_bpf { 6165 struct bpf_prog_array *effective[38]; 6166 struct list_head progs[38]; 6167 u32 flags[38]; 6168 struct list_head storages; 6169 struct bpf_prog_array *inactive; 6170 struct percpu_ref refcnt; 6171 struct work_struct release_work; 6172 }; 6173 6174 struct cgroup_freezer_state { 6175 bool freeze; 6176 int e_freeze; 6177 int nr_frozen_descendants; 6178 int nr_frozen_tasks; 6179 }; 6180 6181 struct cgroup_root; 6182 6183 struct cgroup_rstat_cpu; 6184 6185 struct cgroup { 6186 struct cgroup_subsys_state self; 6187 long unsigned int flags; 6188 int level; 6189 int max_depth; 6190 int nr_descendants; 6191 int nr_dying_descendants; 6192 int max_descendants; 6193 int nr_populated_csets; 6194 int nr_populated_domain_children; 6195 int nr_populated_threaded_children; 6196 int nr_threaded_children; 6197 struct kernfs_node *kn; 6198 struct cgroup_file procs_file; 6199 struct cgroup_file events_file; 6200 u16 subtree_control; 6201 u16 subtree_ss_mask; 6202 u16 old_subtree_control; 6203 u16 old_subtree_ss_mask; 6204 struct cgroup_subsys_state *subsys[12]; 6205 struct cgroup_root *root; 6206 struct list_head cset_links; 6207 struct list_head e_csets[12]; 6208 struct cgroup *dom_cgrp; 6209 struct cgroup *old_dom_cgrp; 6210 struct cgroup_rstat_cpu *rstat_cpu; 6211 struct list_head rstat_css_list; 6212 struct cgroup_base_stat last_bstat; 6213 struct cgroup_base_stat bstat; 6214 struct prev_cputime prev_cputime; 6215 struct list_head pidlists; 6216 struct mutex pidlist_mutex; 6217 wait_queue_head_t offline_waitq; 6218 struct work_struct release_agent_work; 6219 struct psi_group psi; 6220 struct cgroup_bpf bpf; 6221 atomic_t congestion_count; 6222 struct cgroup_freezer_state freezer; 6223 u64 ancestor_ids[0]; 6224 }; 6225 6226 struct taskstats { 6227 __u16 version; 6228 __u32 ac_exitcode; 6229 __u8 ac_flag; 6230 __u8 ac_nice; 6231 __u64 cpu_count; 6232 __u64 cpu_delay_total; 6233 __u64 blkio_count; 6234 __u64 blkio_delay_total; 6235 __u64 swapin_count; 6236 __u64 swapin_delay_total; 6237 __u64 cpu_run_real_total; 6238 __u64 cpu_run_virtual_total; 6239 char ac_comm[32]; 6240 __u8 ac_sched; 6241 __u8 ac_pad[3]; 6242 int: 32; 6243 __u32 ac_uid; 6244 __u32 ac_gid; 6245 __u32 ac_pid; 6246 __u32 ac_ppid; 6247 __u32 ac_btime; 6248 __u64 ac_etime; 6249 __u64 ac_utime; 6250 __u64 ac_stime; 6251 __u64 ac_minflt; 6252 __u64 ac_majflt; 6253 __u64 coremem; 6254 __u64 virtmem; 6255 __u64 hiwater_rss; 6256 __u64 hiwater_vm; 6257 __u64 read_char; 6258 __u64 write_char; 6259 __u64 read_syscalls; 6260 __u64 write_syscalls; 6261 __u64 read_bytes; 6262 __u64 write_bytes; 6263 __u64 cancelled_write_bytes; 6264 __u64 nvcsw; 6265 __u64 nivcsw; 6266 __u64 ac_utimescaled; 6267 __u64 ac_stimescaled; 6268 __u64 cpu_scaled_run_real_total; 6269 __u64 freepages_count; 6270 __u64 freepages_delay_total; 6271 __u64 thrashing_count; 6272 __u64 thrashing_delay_total; 6273 __u64 ac_btime64; 6274 }; 6275 6276 typedef struct { 6277 __u8 b[16]; 6278 } guid_t; 6279 6280 struct wait_page_queue { 6281 struct page *page; 6282 int bit_nr; 6283 wait_queue_entry_t wait; 6284 }; 6285 6286 enum writeback_sync_modes { 6287 WB_SYNC_NONE = 0, 6288 WB_SYNC_ALL = 1, 6289 }; 6290 6291 struct writeback_control { 6292 long int nr_to_write; 6293 long int pages_skipped; 6294 loff_t range_start; 6295 loff_t range_end; 6296 enum writeback_sync_modes sync_mode; 6297 unsigned int for_kupdate: 1; 6298 unsigned int for_background: 1; 6299 unsigned int tagged_writepages: 1; 6300 unsigned int for_reclaim: 1; 6301 unsigned int range_cyclic: 1; 6302 unsigned int for_sync: 1; 6303 unsigned int no_cgroup_owner: 1; 6304 unsigned int punt_to_cgroup: 1; 6305 struct bdi_writeback *wb; 6306 struct inode *inode; 6307 int wb_id; 6308 int wb_lcand_id; 6309 int wb_tcand_id; 6310 size_t wb_bytes; 6311 size_t wb_lcand_bytes; 6312 size_t wb_tcand_bytes; 6313 }; 6314 6315 struct readahead_control { 6316 struct file *file; 6317 struct address_space *mapping; 6318 long unsigned int _index; 6319 unsigned int _nr_pages; 6320 unsigned int _batch_count; 6321 }; 6322 6323 struct iovec; 6324 6325 struct kvec; 6326 6327 struct bio_vec; 6328 6329 struct iov_iter { 6330 unsigned int type; 6331 size_t iov_offset; 6332 size_t count; 6333 union { 6334 const struct iovec *iov; 6335 const struct kvec *kvec; 6336 const struct bio_vec *bvec; 6337 struct pipe_inode_info *pipe; 6338 }; 6339 union { 6340 long unsigned int nr_segs; 6341 struct { 6342 unsigned int head; 6343 unsigned int start_head; 6344 }; 6345 }; 6346 }; 6347 6348 struct swap_cluster_info { 6349 spinlock_t lock; 6350 unsigned int data: 24; 6351 unsigned int flags: 8; 6352 }; 6353 6354 struct swap_cluster_list { 6355 struct swap_cluster_info head; 6356 struct swap_cluster_info tail; 6357 }; 6358 6359 struct percpu_cluster; 6360 6361 struct swap_info_struct { 6362 long unsigned int flags; 6363 short int prio; 6364 struct plist_node list; 6365 signed char type; 6366 unsigned int max; 6367 unsigned char *swap_map; 6368 struct swap_cluster_info *cluster_info; 6369 struct swap_cluster_list free_clusters; 6370 unsigned int lowest_bit; 6371 unsigned int highest_bit; 6372 unsigned int pages; 6373 unsigned int inuse_pages; 6374 unsigned int cluster_next; 6375 unsigned int cluster_nr; 6376 unsigned int *cluster_next_cpu; 6377 struct percpu_cluster *percpu_cluster; 6378 struct rb_root swap_extent_root; 6379 struct block_device *bdev; 6380 struct file *swap_file; 6381 unsigned int old_block_size; 6382 long unsigned int *frontswap_map; 6383 atomic_t frontswap_pages; 6384 spinlock_t lock; 6385 spinlock_t cont_lock; 6386 struct work_struct discard_work; 6387 struct swap_cluster_list discard_clusters; 6388 struct plist_node avail_lists[0]; 6389 }; 6390 6391 struct cdev { 6392 struct kobject kobj; 6393 struct module *owner; 6394 const struct file_operations *ops; 6395 struct list_head list; 6396 dev_t dev; 6397 unsigned int count; 6398 }; 6399 6400 enum dl_dev_state { 6401 DL_DEV_NO_DRIVER = 0, 6402 DL_DEV_PROBING = 1, 6403 DL_DEV_DRIVER_BOUND = 2, 6404 DL_DEV_UNBINDING = 3, 6405 }; 6406 6407 struct dev_links_info { 6408 struct list_head suppliers; 6409 struct list_head consumers; 6410 struct list_head defer_sync; 6411 enum dl_dev_state status; 6412 }; 6413 6414 struct pm_message { 6415 int event; 6416 }; 6417 6418 typedef struct pm_message pm_message_t; 6419 6420 enum rpm_request { 6421 RPM_REQ_NONE = 0, 6422 RPM_REQ_IDLE = 1, 6423 RPM_REQ_SUSPEND = 2, 6424 RPM_REQ_AUTOSUSPEND = 3, 6425 RPM_REQ_RESUME = 4, 6426 }; 6427 6428 struct wakeup_source; 6429 6430 struct wake_irq; 6431 6432 struct pm_subsys_data; 6433 6434 struct dev_pm_qos; 6435 6436 struct dev_pm_info { 6437 pm_message_t power_state; 6438 unsigned int can_wakeup: 1; 6439 unsigned int async_suspend: 1; 6440 bool in_dpm_list: 1; 6441 bool is_prepared: 1; 6442 bool is_suspended: 1; 6443 bool is_noirq_suspended: 1; 6444 bool is_late_suspended: 1; 6445 bool no_pm: 1; 6446 bool early_init: 1; 6447 bool direct_complete: 1; 6448 u32 driver_flags; 6449 spinlock_t lock; 6450 struct list_head entry; 6451 struct completion completion; 6452 struct wakeup_source *wakeup; 6453 bool wakeup_path: 1; 6454 bool syscore: 1; 6455 bool no_pm_callbacks: 1; 6456 unsigned int must_resume: 1; 6457 unsigned int may_skip_resume: 1; 6458 struct hrtimer suspend_timer; 6459 u64 timer_expires; 6460 struct work_struct work; 6461 wait_queue_head_t wait_queue; 6462 struct wake_irq *wakeirq; 6463 atomic_t usage_count; 6464 atomic_t child_count; 6465 unsigned int disable_depth: 3; 6466 unsigned int idle_notification: 1; 6467 unsigned int request_pending: 1; 6468 unsigned int deferred_resume: 1; 6469 unsigned int runtime_auto: 1; 6470 bool ignore_children: 1; 6471 unsigned int no_callbacks: 1; 6472 unsigned int irq_safe: 1; 6473 unsigned int use_autosuspend: 1; 6474 unsigned int timer_autosuspends: 1; 6475 unsigned int memalloc_noio: 1; 6476 unsigned int links_count; 6477 enum rpm_request request; 6478 enum rpm_status runtime_status; 6479 int runtime_error; 6480 int autosuspend_delay; 6481 u64 last_busy; 6482 u64 active_time; 6483 u64 suspended_time; 6484 u64 accounting_timestamp; 6485 struct pm_subsys_data *subsys_data; 6486 void (*set_latency_tolerance)(struct device *, s32); 6487 struct dev_pm_qos *qos; 6488 }; 6489 6490 struct dev_archdata {}; 6491 6492 struct device_private; 6493 6494 struct device_type; 6495 6496 struct bus_type; 6497 6498 struct device_driver; 6499 6500 struct dev_pm_domain; 6501 6502 struct em_perf_domain; 6503 6504 struct dev_pin_info; 6505 6506 struct dma_map_ops; 6507 6508 struct bus_dma_region; 6509 6510 struct device_dma_parameters; 6511 6512 struct cma; 6513 6514 struct device_node; 6515 6516 struct class; 6517 6518 struct iommu_group; 6519 6520 struct dev_iommu; 6521 6522 struct device { 6523 struct kobject kobj; 6524 struct device *parent; 6525 struct device_private *p; 6526 const char *init_name; 6527 const struct device_type *type; 6528 struct bus_type *bus; 6529 struct device_driver *driver; 6530 void *platform_data; 6531 void *driver_data; 6532 struct mutex mutex; 6533 struct dev_links_info links; 6534 struct dev_pm_info power; 6535 struct dev_pm_domain *pm_domain; 6536 struct em_perf_domain *em_pd; 6537 struct irq_domain *msi_domain; 6538 struct dev_pin_info *pins; 6539 struct list_head msi_list; 6540 const struct dma_map_ops *dma_ops; 6541 u64 *dma_mask; 6542 u64 coherent_dma_mask; 6543 u64 bus_dma_limit; 6544 const struct bus_dma_region *dma_range_map; 6545 struct device_dma_parameters *dma_parms; 6546 struct list_head dma_pools; 6547 struct cma *cma_area; 6548 struct dev_archdata archdata; 6549 struct device_node *of_node; 6550 struct fwnode_handle *fwnode; 6551 int numa_node; 6552 dev_t devt; 6553 u32 id; 6554 spinlock_t devres_lock; 6555 struct list_head devres_head; 6556 struct class *class; 6557 const struct attribute_group **groups; 6558 void (*release)(struct device *); 6559 struct iommu_group *iommu_group; 6560 struct dev_iommu *iommu; 6561 bool offline_disabled: 1; 6562 bool offline: 1; 6563 bool of_node_reused: 1; 6564 bool state_synced: 1; 6565 }; 6566 6567 struct disk_stats; 6568 6569 struct gendisk; 6570 6571 struct partition_meta_info; 6572 6573 struct block_device { 6574 sector_t bd_start_sect; 6575 struct disk_stats *bd_stats; 6576 long unsigned int bd_stamp; 6577 bool bd_read_only; 6578 dev_t bd_dev; 6579 int bd_openers; 6580 struct inode *bd_inode; 6581 struct super_block *bd_super; 6582 struct mutex bd_mutex; 6583 void *bd_claiming; 6584 struct device bd_device; 6585 void *bd_holder; 6586 int bd_holders; 6587 bool bd_write_holder; 6588 struct list_head bd_holder_disks; 6589 struct kobject *bd_holder_dir; 6590 u8 bd_partno; 6591 unsigned int bd_part_count; 6592 spinlock_t bd_size_lock; 6593 struct gendisk *bd_disk; 6594 struct backing_dev_info *bd_bdi; 6595 int bd_fsfreeze_count; 6596 struct mutex bd_fsfreeze_mutex; 6597 struct super_block *bd_fsfreeze_sb; 6598 struct partition_meta_info *bd_meta_info; 6599 }; 6600 6601 struct fc_log; 6602 6603 struct p_log { 6604 const char *prefix; 6605 struct fc_log *log; 6606 }; 6607 6608 enum fs_context_purpose { 6609 FS_CONTEXT_FOR_MOUNT = 0, 6610 FS_CONTEXT_FOR_SUBMOUNT = 1, 6611 FS_CONTEXT_FOR_RECONFIGURE = 2, 6612 }; 6613 6614 enum fs_context_phase { 6615 FS_CONTEXT_CREATE_PARAMS = 0, 6616 FS_CONTEXT_CREATING = 1, 6617 FS_CONTEXT_AWAITING_MOUNT = 2, 6618 FS_CONTEXT_AWAITING_RECONF = 3, 6619 FS_CONTEXT_RECONF_PARAMS = 4, 6620 FS_CONTEXT_RECONFIGURING = 5, 6621 FS_CONTEXT_FAILED = 6, 6622 }; 6623 6624 struct fs_context_operations; 6625 6626 struct fs_context { 6627 const struct fs_context_operations *ops; 6628 struct mutex uapi_mutex; 6629 struct file_system_type *fs_type; 6630 void *fs_private; 6631 void *sget_key; 6632 struct dentry *root; 6633 struct user_namespace *user_ns; 6634 struct net *net_ns; 6635 const struct cred *cred; 6636 struct p_log log; 6637 const char *source; 6638 void *security; 6639 void *s_fs_info; 6640 unsigned int sb_flags; 6641 unsigned int sb_flags_mask; 6642 unsigned int s_iflags; 6643 unsigned int lsm_flags; 6644 enum fs_context_purpose purpose: 8; 6645 enum fs_context_phase phase: 8; 6646 bool need_free: 1; 6647 bool global: 1; 6648 bool oldapi: 1; 6649 }; 6650 6651 struct audit_names; 6652 6653 struct filename { 6654 const char *name; 6655 const char *uptr; 6656 int refcnt; 6657 struct audit_names *aname; 6658 const char iname[0]; 6659 }; 6660 6661 typedef u8 blk_status_t; 6662 6663 struct bvec_iter { 6664 sector_t bi_sector; 6665 unsigned int bi_size; 6666 unsigned int bi_idx; 6667 unsigned int bi_bvec_done; 6668 }; 6669 6670 typedef void bio_end_io_t(struct bio *); 6671 6672 struct bio_issue { 6673 u64 value; 6674 }; 6675 6676 struct bio_vec { 6677 struct page *bv_page; 6678 unsigned int bv_len; 6679 unsigned int bv_offset; 6680 }; 6681 6682 struct bio_crypt_ctx; 6683 6684 struct bio_integrity_payload; 6685 6686 struct bio { 6687 struct bio *bi_next; 6688 struct gendisk *bi_disk; 6689 unsigned int bi_opf; 6690 short unsigned int bi_flags; 6691 short unsigned int bi_ioprio; 6692 short unsigned int bi_write_hint; 6693 blk_status_t bi_status; 6694 u8 bi_partno; 6695 atomic_t __bi_remaining; 6696 struct bvec_iter bi_iter; 6697 bio_end_io_t *bi_end_io; 6698 void *bi_private; 6699 struct blkcg_gq *bi_blkg; 6700 struct bio_issue bi_issue; 6701 u64 bi_iocost_cost; 6702 struct bio_crypt_ctx *bi_crypt_context; 6703 union { 6704 struct bio_integrity_payload *bi_integrity; 6705 }; 6706 short unsigned int bi_vcnt; 6707 short unsigned int bi_max_vecs; 6708 atomic_t __bi_cnt; 6709 struct bio_vec *bi_io_vec; 6710 struct bio_set *bi_pool; 6711 struct bio_vec bi_inline_vecs[0]; 6712 }; 6713 6714 struct linux_binprm { 6715 struct vm_area_struct *vma; 6716 long unsigned int vma_pages; 6717 struct mm_struct *mm; 6718 long unsigned int p; 6719 long unsigned int argmin; 6720 unsigned int have_execfd: 1; 6721 unsigned int execfd_creds: 1; 6722 unsigned int secureexec: 1; 6723 unsigned int point_of_no_return: 1; 6724 struct file *executable; 6725 struct file *interpreter; 6726 struct file *file; 6727 struct cred *cred; 6728 int unsafe; 6729 unsigned int per_clear; 6730 int argc; 6731 int envc; 6732 const char *filename; 6733 const char *interp; 6734 const char *fdpath; 6735 unsigned int interp_flags; 6736 int execfd; 6737 long unsigned int loader; 6738 long unsigned int exec; 6739 struct rlimit rlim_stack; 6740 char buf[256]; 6741 }; 6742 6743 struct coredump_params { 6744 const kernel_siginfo_t *siginfo; 6745 struct pt_regs *regs; 6746 struct file *file; 6747 long unsigned int limit; 6748 long unsigned int mm_flags; 6749 loff_t written; 6750 loff_t pos; 6751 }; 6752 6753 struct em_perf_state { 6754 long unsigned int frequency; 6755 long unsigned int power; 6756 long unsigned int cost; 6757 }; 6758 6759 struct em_perf_domain { 6760 struct em_perf_state *table; 6761 int nr_perf_states; 6762 int milliwatts; 6763 long unsigned int cpus[0]; 6764 }; 6765 6766 struct dev_pm_ops { 6767 int (*prepare)(struct device *); 6768 void (*complete)(struct device *); 6769 int (*suspend)(struct device *); 6770 int (*resume)(struct device *); 6771 int (*freeze)(struct device *); 6772 int (*thaw)(struct device *); 6773 int (*poweroff)(struct device *); 6774 int (*restore)(struct device *); 6775 int (*suspend_late)(struct device *); 6776 int (*resume_early)(struct device *); 6777 int (*freeze_late)(struct device *); 6778 int (*thaw_early)(struct device *); 6779 int (*poweroff_late)(struct device *); 6780 int (*restore_early)(struct device *); 6781 int (*suspend_noirq)(struct device *); 6782 int (*resume_noirq)(struct device *); 6783 int (*freeze_noirq)(struct device *); 6784 int (*thaw_noirq)(struct device *); 6785 int (*poweroff_noirq)(struct device *); 6786 int (*restore_noirq)(struct device *); 6787 int (*runtime_suspend)(struct device *); 6788 int (*runtime_resume)(struct device *); 6789 int (*runtime_idle)(struct device *); 6790 }; 6791 6792 struct pm_domain_data; 6793 6794 struct pm_subsys_data { 6795 spinlock_t lock; 6796 unsigned int refcount; 6797 struct list_head clock_list; 6798 struct pm_domain_data *domain_data; 6799 }; 6800 6801 struct wakeup_source { 6802 const char *name; 6803 int id; 6804 struct list_head entry; 6805 spinlock_t lock; 6806 struct wake_irq *wakeirq; 6807 struct timer_list timer; 6808 long unsigned int timer_expires; 6809 ktime_t total_time; 6810 ktime_t max_time; 6811 ktime_t last_time; 6812 ktime_t start_prevent_time; 6813 ktime_t prevent_sleep_time; 6814 long unsigned int event_count; 6815 long unsigned int active_count; 6816 long unsigned int relax_count; 6817 long unsigned int expire_count; 6818 long unsigned int wakeup_count; 6819 struct device *dev; 6820 bool active: 1; 6821 bool autosleep_enabled: 1; 6822 }; 6823 6824 struct dev_pm_domain { 6825 struct dev_pm_ops ops; 6826 int (*start)(struct device *); 6827 void (*detach)(struct device *, bool); 6828 int (*activate)(struct device *); 6829 void (*sync)(struct device *); 6830 void (*dismiss)(struct device *); 6831 }; 6832 6833 struct iommu_ops; 6834 6835 struct subsys_private; 6836 6837 struct bus_type { 6838 const char *name; 6839 const char *dev_name; 6840 struct device *dev_root; 6841 const struct attribute_group **bus_groups; 6842 const struct attribute_group **dev_groups; 6843 const struct attribute_group **drv_groups; 6844 int (*match)(struct device *, struct device_driver *); 6845 int (*uevent)(struct device *, struct kobj_uevent_env *); 6846 int (*probe)(struct device *); 6847 void (*sync_state)(struct device *); 6848 int (*remove)(struct device *); 6849 void (*shutdown)(struct device *); 6850 int (*online)(struct device *); 6851 int (*offline)(struct device *); 6852 int (*suspend)(struct device *, pm_message_t); 6853 int (*resume)(struct device *); 6854 int (*num_vf)(struct device *); 6855 int (*dma_configure)(struct device *); 6856 const struct dev_pm_ops *pm; 6857 const struct iommu_ops *iommu_ops; 6858 struct subsys_private *p; 6859 struct lock_class_key lock_key; 6860 bool need_parent_lock; 6861 }; 6862 6863 enum probe_type { 6864 PROBE_DEFAULT_STRATEGY = 0, 6865 PROBE_PREFER_ASYNCHRONOUS = 1, 6866 PROBE_FORCE_SYNCHRONOUS = 2, 6867 }; 6868 6869 struct of_device_id; 6870 6871 struct acpi_device_id; 6872 6873 struct driver_private; 6874 6875 struct device_driver { 6876 const char *name; 6877 struct bus_type *bus; 6878 struct module *owner; 6879 const char *mod_name; 6880 bool suppress_bind_attrs; 6881 enum probe_type probe_type; 6882 const struct of_device_id *of_match_table; 6883 const struct acpi_device_id *acpi_match_table; 6884 int (*probe)(struct device *); 6885 void (*sync_state)(struct device *); 6886 int (*remove)(struct device *); 6887 void (*shutdown)(struct device *); 6888 int (*suspend)(struct device *, pm_message_t); 6889 int (*resume)(struct device *); 6890 const struct attribute_group **groups; 6891 const struct attribute_group **dev_groups; 6892 const struct dev_pm_ops *pm; 6893 void (*coredump)(struct device *); 6894 struct driver_private *p; 6895 }; 6896 6897 enum iommu_cap { 6898 IOMMU_CAP_CACHE_COHERENCY = 0, 6899 IOMMU_CAP_INTR_REMAP = 1, 6900 IOMMU_CAP_NOEXEC = 2, 6901 }; 6902 6903 enum iommu_attr { 6904 DOMAIN_ATTR_GEOMETRY = 0, 6905 DOMAIN_ATTR_PAGING = 1, 6906 DOMAIN_ATTR_WINDOWS = 2, 6907 DOMAIN_ATTR_FSL_PAMU_STASH = 3, 6908 DOMAIN_ATTR_FSL_PAMU_ENABLE = 4, 6909 DOMAIN_ATTR_FSL_PAMUV1 = 5, 6910 DOMAIN_ATTR_NESTING = 6, 6911 DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE = 7, 6912 DOMAIN_ATTR_IO_PGTABLE_CFG = 8, 6913 DOMAIN_ATTR_MAX = 9, 6914 }; 6915 6916 enum iommu_dev_features { 6917 IOMMU_DEV_FEAT_AUX = 0, 6918 IOMMU_DEV_FEAT_SVA = 1, 6919 }; 6920 6921 struct iommu_domain; 6922 6923 struct iommu_iotlb_gather; 6924 6925 struct iommu_device; 6926 6927 struct iommu_resv_region; 6928 6929 struct of_phandle_args; 6930 6931 struct iommu_sva; 6932 6933 struct iommu_fault_event; 6934 6935 struct iommu_page_response; 6936 6937 struct iommu_cache_invalidate_info; 6938 6939 struct iommu_gpasid_bind_data; 6940 6941 struct iommu_ops { 6942 bool (*capable)(enum iommu_cap); 6943 struct iommu_domain * (*domain_alloc)(unsigned int); 6944 void (*domain_free)(struct iommu_domain *); 6945 int (*attach_dev)(struct iommu_domain *, struct device *); 6946 void (*detach_dev)(struct iommu_domain *, struct device *); 6947 int (*map)(struct iommu_domain *, long unsigned int, phys_addr_t, size_t, int, gfp_t); 6948 size_t (*unmap)(struct iommu_domain *, long unsigned int, size_t, struct iommu_iotlb_gather *); 6949 void (*flush_iotlb_all)(struct iommu_domain *); 6950 void (*iotlb_sync_map)(struct iommu_domain *); 6951 void (*iotlb_sync)(struct iommu_domain *, struct iommu_iotlb_gather *); 6952 phys_addr_t (*iova_to_phys)(struct iommu_domain *, dma_addr_t); 6953 struct iommu_device * (*probe_device)(struct device *); 6954 void (*release_device)(struct device *); 6955 void (*probe_finalize)(struct device *); 6956 struct iommu_group * (*device_group)(struct device *); 6957 int (*domain_get_attr)(struct iommu_domain *, enum iommu_attr, void *); 6958 int (*domain_set_attr)(struct iommu_domain *, enum iommu_attr, void *); 6959 void (*get_resv_regions)(struct device *, struct list_head *); 6960 void (*put_resv_regions)(struct device *, struct list_head *); 6961 void (*apply_resv_region)(struct device *, struct iommu_domain *, struct iommu_resv_region *); 6962 int (*domain_window_enable)(struct iommu_domain *, u32, phys_addr_t, u64, int); 6963 void (*domain_window_disable)(struct iommu_domain *, u32); 6964 int (*of_xlate)(struct device *, struct of_phandle_args *); 6965 bool (*is_attach_deferred)(struct iommu_domain *, struct device *); 6966 bool (*dev_has_feat)(struct device *, enum iommu_dev_features); 6967 bool (*dev_feat_enabled)(struct device *, enum iommu_dev_features); 6968 int (*dev_enable_feat)(struct device *, enum iommu_dev_features); 6969 int (*dev_disable_feat)(struct device *, enum iommu_dev_features); 6970 int (*aux_attach_dev)(struct iommu_domain *, struct device *); 6971 void (*aux_detach_dev)(struct iommu_domain *, struct device *); 6972 int (*aux_get_pasid)(struct iommu_domain *, struct device *); 6973 struct iommu_sva * (*sva_bind)(struct device *, struct mm_struct *, void *); 6974 void (*sva_unbind)(struct iommu_sva *); 6975 u32 (*sva_get_pasid)(struct iommu_sva *); 6976 int (*page_response)(struct device *, struct iommu_fault_event *, struct iommu_page_response *); 6977 int (*cache_invalidate)(struct iommu_domain *, struct device *, struct iommu_cache_invalidate_info *); 6978 int (*sva_bind_gpasid)(struct iommu_domain *, struct device *, struct iommu_gpasid_bind_data *); 6979 int (*sva_unbind_gpasid)(struct device *, u32); 6980 int (*def_domain_type)(struct device *); 6981 long unsigned int pgsize_bitmap; 6982 struct module *owner; 6983 }; 6984 6985 struct device_type { 6986 const char *name; 6987 const struct attribute_group **groups; 6988 int (*uevent)(struct device *, struct kobj_uevent_env *); 6989 char * (*devnode)(struct device *, umode_t *, kuid_t *, kgid_t *); 6990 void (*release)(struct device *); 6991 const struct dev_pm_ops *pm; 6992 }; 6993 6994 struct class { 6995 const char *name; 6996 struct module *owner; 6997 const struct attribute_group **class_groups; 6998 const struct attribute_group **dev_groups; 6999 struct kobject *dev_kobj; 7000 int (*dev_uevent)(struct device *, struct kobj_uevent_env *); 7001 char * (*devnode)(struct device *, umode_t *); 7002 void (*class_release)(struct class *); 7003 void (*dev_release)(struct device *); 7004 int (*shutdown_pre)(struct device *); 7005 const struct kobj_ns_type_operations *ns_type; 7006 const void * (*namespace)(struct device *); 7007 void (*get_ownership)(struct device *, kuid_t *, kgid_t *); 7008 const struct dev_pm_ops *pm; 7009 struct subsys_private *p; 7010 }; 7011 7012 struct of_device_id { 7013 char name[32]; 7014 char type[32]; 7015 char compatible[128]; 7016 const void *data; 7017 }; 7018 7019 typedef long unsigned int kernel_ulong_t; 7020 7021 struct acpi_device_id { 7022 __u8 id[9]; 7023 kernel_ulong_t driver_data; 7024 __u32 cls; 7025 __u32 cls_msk; 7026 }; 7027 7028 struct device_dma_parameters { 7029 unsigned int max_segment_size; 7030 long unsigned int segment_boundary_mask; 7031 }; 7032 7033 enum dma_data_direction { 7034 DMA_BIDIRECTIONAL = 0, 7035 DMA_TO_DEVICE = 1, 7036 DMA_FROM_DEVICE = 2, 7037 DMA_NONE = 3, 7038 }; 7039 7040 struct sg_table; 7041 7042 struct scatterlist; 7043 7044 struct dma_map_ops { 7045 void * (*alloc)(struct device *, size_t, dma_addr_t *, gfp_t, long unsigned int); 7046 void (*free)(struct device *, size_t, void *, dma_addr_t, long unsigned int); 7047 struct page * (*alloc_pages)(struct device *, size_t, dma_addr_t *, enum dma_data_direction, gfp_t); 7048 void (*free_pages)(struct device *, size_t, struct page *, dma_addr_t, enum dma_data_direction); 7049 void * (*alloc_noncoherent)(struct device *, size_t, dma_addr_t *, enum dma_data_direction, gfp_t); 7050 void (*free_noncoherent)(struct device *, size_t, void *, dma_addr_t, enum dma_data_direction); 7051 int (*mmap)(struct device *, struct vm_area_struct *, void *, dma_addr_t, size_t, long unsigned int); 7052 int (*get_sgtable)(struct device *, struct sg_table *, void *, dma_addr_t, size_t, long unsigned int); 7053 dma_addr_t (*map_page)(struct device *, struct page *, long unsigned int, size_t, enum dma_data_direction, long unsigned int); 7054 void (*unmap_page)(struct device *, dma_addr_t, size_t, enum dma_data_direction, long unsigned int); 7055 int (*map_sg)(struct device *, struct scatterlist *, int, enum dma_data_direction, long unsigned int); 7056 void (*unmap_sg)(struct device *, struct scatterlist *, int, enum dma_data_direction, long unsigned int); 7057 dma_addr_t (*map_resource)(struct device *, phys_addr_t, size_t, enum dma_data_direction, long unsigned int); 7058 void (*unmap_resource)(struct device *, dma_addr_t, size_t, enum dma_data_direction, long unsigned int); 7059 void (*sync_single_for_cpu)(struct device *, dma_addr_t, size_t, enum dma_data_direction); 7060 void (*sync_single_for_device)(struct device *, dma_addr_t, size_t, enum dma_data_direction); 7061 void (*sync_sg_for_cpu)(struct device *, struct scatterlist *, int, enum dma_data_direction); 7062 void (*sync_sg_for_device)(struct device *, struct scatterlist *, int, enum dma_data_direction); 7063 void (*cache_sync)(struct device *, void *, size_t, enum dma_data_direction); 7064 int (*dma_supported)(struct device *, u64); 7065 u64 (*get_required_mask)(struct device *); 7066 size_t (*max_mapping_size)(struct device *); 7067 long unsigned int (*get_merge_boundary)(struct device *); 7068 }; 7069 7070 struct bus_dma_region { 7071 phys_addr_t cpu_start; 7072 dma_addr_t dma_start; 7073 u64 size; 7074 u64 offset; 7075 }; 7076 7077 typedef u32 phandle; 7078 7079 struct fwnode_operations; 7080 7081 struct fwnode_handle { 7082 struct fwnode_handle *secondary; 7083 const struct fwnode_operations *ops; 7084 struct device *dev; 7085 struct list_head suppliers; 7086 struct list_head consumers; 7087 u8 flags; 7088 }; 7089 7090 struct property; 7091 7092 struct device_node { 7093 const char *name; 7094 phandle phandle; 7095 const char *full_name; 7096 struct fwnode_handle fwnode; 7097 struct property *properties; 7098 struct property *deadprops; 7099 struct device_node *parent; 7100 struct device_node *child; 7101 struct device_node *sibling; 7102 long unsigned int _flags; 7103 void *data; 7104 }; 7105 7106 enum cpuhp_state { 7107 CPUHP_INVALID = 4294967295, 7108 CPUHP_OFFLINE = 0, 7109 CPUHP_CREATE_THREADS = 1, 7110 CPUHP_PERF_PREPARE = 2, 7111 CPUHP_PERF_X86_PREPARE = 3, 7112 CPUHP_PERF_X86_AMD_UNCORE_PREP = 4, 7113 CPUHP_PERF_POWER = 5, 7114 CPUHP_PERF_SUPERH = 6, 7115 CPUHP_X86_HPET_DEAD = 7, 7116 CPUHP_X86_APB_DEAD = 8, 7117 CPUHP_X86_MCE_DEAD = 9, 7118 CPUHP_VIRT_NET_DEAD = 10, 7119 CPUHP_SLUB_DEAD = 11, 7120 CPUHP_DEBUG_OBJ_DEAD = 12, 7121 CPUHP_MM_WRITEBACK_DEAD = 13, 7122 CPUHP_MM_VMSTAT_DEAD = 14, 7123 CPUHP_SOFTIRQ_DEAD = 15, 7124 CPUHP_NET_MVNETA_DEAD = 16, 7125 CPUHP_CPUIDLE_DEAD = 17, 7126 CPUHP_ARM64_FPSIMD_DEAD = 18, 7127 CPUHP_ARM_OMAP_WAKE_DEAD = 19, 7128 CPUHP_IRQ_POLL_DEAD = 20, 7129 CPUHP_BLOCK_SOFTIRQ_DEAD = 21, 7130 CPUHP_ACPI_CPUDRV_DEAD = 22, 7131 CPUHP_S390_PFAULT_DEAD = 23, 7132 CPUHP_BLK_MQ_DEAD = 24, 7133 CPUHP_FS_BUFF_DEAD = 25, 7134 CPUHP_PRINTK_DEAD = 26, 7135 CPUHP_MM_MEMCQ_DEAD = 27, 7136 CPUHP_PERCPU_CNT_DEAD = 28, 7137 CPUHP_RADIX_DEAD = 29, 7138 CPUHP_PAGE_ALLOC_DEAD = 30, 7139 CPUHP_NET_DEV_DEAD = 31, 7140 CPUHP_PCI_XGENE_DEAD = 32, 7141 CPUHP_IOMMU_INTEL_DEAD = 33, 7142 CPUHP_LUSTRE_CFS_DEAD = 34, 7143 CPUHP_AP_ARM_CACHE_B15_RAC_DEAD = 35, 7144 CPUHP_PADATA_DEAD = 36, 7145 CPUHP_WORKQUEUE_PREP = 37, 7146 CPUHP_POWER_NUMA_PREPARE = 38, 7147 CPUHP_HRTIMERS_PREPARE = 39, 7148 CPUHP_PROFILE_PREPARE = 40, 7149 CPUHP_X2APIC_PREPARE = 41, 7150 CPUHP_SMPCFD_PREPARE = 42, 7151 CPUHP_RELAY_PREPARE = 43, 7152 CPUHP_SLAB_PREPARE = 44, 7153 CPUHP_MD_RAID5_PREPARE = 45, 7154 CPUHP_RCUTREE_PREP = 46, 7155 CPUHP_CPUIDLE_COUPLED_PREPARE = 47, 7156 CPUHP_POWERPC_PMAC_PREPARE = 48, 7157 CPUHP_POWERPC_MMU_CTX_PREPARE = 49, 7158 CPUHP_XEN_PREPARE = 50, 7159 CPUHP_XEN_EVTCHN_PREPARE = 51, 7160 CPUHP_ARM_SHMOBILE_SCU_PREPARE = 52, 7161 CPUHP_SH_SH3X_PREPARE = 53, 7162 CPUHP_NET_FLOW_PREPARE = 54, 7163 CPUHP_TOPOLOGY_PREPARE = 55, 7164 CPUHP_NET_IUCV_PREPARE = 56, 7165 CPUHP_ARM_BL_PREPARE = 57, 7166 CPUHP_TRACE_RB_PREPARE = 58, 7167 CPUHP_MM_ZS_PREPARE = 59, 7168 CPUHP_MM_ZSWP_MEM_PREPARE = 60, 7169 CPUHP_MM_ZSWP_POOL_PREPARE = 61, 7170 CPUHP_KVM_PPC_BOOK3S_PREPARE = 62, 7171 CPUHP_ZCOMP_PREPARE = 63, 7172 CPUHP_TIMERS_PREPARE = 64, 7173 CPUHP_MIPS_SOC_PREPARE = 65, 7174 CPUHP_BP_PREPARE_DYN = 66, 7175 CPUHP_BP_PREPARE_DYN_END = 86, 7176 CPUHP_BRINGUP_CPU = 87, 7177 CPUHP_AP_IDLE_DEAD = 88, 7178 CPUHP_AP_OFFLINE = 89, 7179 CPUHP_AP_SCHED_STARTING = 90, 7180 CPUHP_AP_RCUTREE_DYING = 91, 7181 CPUHP_AP_CPU_PM_STARTING = 92, 7182 CPUHP_AP_IRQ_GIC_STARTING = 93, 7183 CPUHP_AP_IRQ_HIP04_STARTING = 94, 7184 CPUHP_AP_IRQ_ARMADA_XP_STARTING = 95, 7185 CPUHP_AP_IRQ_BCM2836_STARTING = 96, 7186 CPUHP_AP_IRQ_MIPS_GIC_STARTING = 97, 7187 CPUHP_AP_IRQ_RISCV_STARTING = 98, 7188 CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING = 99, 7189 CPUHP_AP_ARM_MVEBU_COHERENCY = 100, 7190 CPUHP_AP_MICROCODE_LOADER = 101, 7191 CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING = 102, 7192 CPUHP_AP_PERF_X86_STARTING = 103, 7193 CPUHP_AP_PERF_X86_AMD_IBS_STARTING = 104, 7194 CPUHP_AP_PERF_X86_CQM_STARTING = 105, 7195 CPUHP_AP_PERF_X86_CSTATE_STARTING = 106, 7196 CPUHP_AP_PERF_XTENSA_STARTING = 107, 7197 CPUHP_AP_MIPS_OP_LOONGSON3_STARTING = 108, 7198 CPUHP_AP_ARM_SDEI_STARTING = 109, 7199 CPUHP_AP_ARM_VFP_STARTING = 110, 7200 CPUHP_AP_ARM64_DEBUG_MONITORS_STARTING = 111, 7201 CPUHP_AP_PERF_ARM_HW_BREAKPOINT_STARTING = 112, 7202 CPUHP_AP_PERF_ARM_ACPI_STARTING = 113, 7203 CPUHP_AP_PERF_ARM_STARTING = 114, 7204 CPUHP_AP_ARM_L2X0_STARTING = 115, 7205 CPUHP_AP_EXYNOS4_MCT_TIMER_STARTING = 116, 7206 CPUHP_AP_ARM_ARCH_TIMER_STARTING = 117, 7207 CPUHP_AP_ARM_GLOBAL_TIMER_STARTING = 118, 7208 CPUHP_AP_JCORE_TIMER_STARTING = 119, 7209 CPUHP_AP_ARM_TWD_STARTING = 120, 7210 CPUHP_AP_QCOM_TIMER_STARTING = 121, 7211 CPUHP_AP_TEGRA_TIMER_STARTING = 122, 7212 CPUHP_AP_ARMADA_TIMER_STARTING = 123, 7213 CPUHP_AP_MARCO_TIMER_STARTING = 124, 7214 CPUHP_AP_MIPS_GIC_TIMER_STARTING = 125, 7215 CPUHP_AP_ARC_TIMER_STARTING = 126, 7216 CPUHP_AP_RISCV_TIMER_STARTING = 127, 7217 CPUHP_AP_CLINT_TIMER_STARTING = 128, 7218 CPUHP_AP_CSKY_TIMER_STARTING = 129, 7219 CPUHP_AP_HYPERV_TIMER_STARTING = 130, 7220 CPUHP_AP_KVM_STARTING = 131, 7221 CPUHP_AP_KVM_ARM_VGIC_INIT_STARTING = 132, 7222 CPUHP_AP_KVM_ARM_VGIC_STARTING = 133, 7223 CPUHP_AP_KVM_ARM_TIMER_STARTING = 134, 7224 CPUHP_AP_DUMMY_TIMER_STARTING = 135, 7225 CPUHP_AP_ARM_XEN_STARTING = 136, 7226 CPUHP_AP_ARM_CORESIGHT_STARTING = 137, 7227 CPUHP_AP_ARM_CORESIGHT_CTI_STARTING = 138, 7228 CPUHP_AP_ARM64_ISNDEP_STARTING = 139, 7229 CPUHP_AP_SMPCFD_DYING = 140, 7230 CPUHP_AP_X86_TBOOT_DYING = 141, 7231 CPUHP_AP_ARM_CACHE_B15_RAC_DYING = 142, 7232 CPUHP_AP_ONLINE = 143, 7233 CPUHP_TEARDOWN_CPU = 144, 7234 CPUHP_AP_ONLINE_IDLE = 145, 7235 CPUHP_AP_SCHED_WAIT_EMPTY = 146, 7236 CPUHP_AP_SMPBOOT_THREADS = 147, 7237 CPUHP_AP_X86_VDSO_VMA_ONLINE = 148, 7238 CPUHP_AP_IRQ_AFFINITY_ONLINE = 149, 7239 CPUHP_AP_BLK_MQ_ONLINE = 150, 7240 CPUHP_AP_ARM_MVEBU_SYNC_CLOCKS = 151, 7241 CPUHP_AP_X86_INTEL_EPB_ONLINE = 152, 7242 CPUHP_AP_PERF_ONLINE = 153, 7243 CPUHP_AP_PERF_X86_ONLINE = 154, 7244 CPUHP_AP_PERF_X86_UNCORE_ONLINE = 155, 7245 CPUHP_AP_PERF_X86_AMD_UNCORE_ONLINE = 156, 7246 CPUHP_AP_PERF_X86_AMD_POWER_ONLINE = 157, 7247 CPUHP_AP_PERF_X86_RAPL_ONLINE = 158, 7248 CPUHP_AP_PERF_X86_CQM_ONLINE = 159, 7249 CPUHP_AP_PERF_X86_CSTATE_ONLINE = 160, 7250 CPUHP_AP_PERF_S390_CF_ONLINE = 161, 7251 CPUHP_AP_PERF_S390_SF_ONLINE = 162, 7252 CPUHP_AP_PERF_ARM_CCI_ONLINE = 163, 7253 CPUHP_AP_PERF_ARM_CCN_ONLINE = 164, 7254 CPUHP_AP_PERF_ARM_HISI_DDRC_ONLINE = 165, 7255 CPUHP_AP_PERF_ARM_HISI_HHA_ONLINE = 166, 7256 CPUHP_AP_PERF_ARM_HISI_L3_ONLINE = 167, 7257 CPUHP_AP_PERF_ARM_L2X0_ONLINE = 168, 7258 CPUHP_AP_PERF_ARM_QCOM_L2_ONLINE = 169, 7259 CPUHP_AP_PERF_ARM_QCOM_L3_ONLINE = 170, 7260 CPUHP_AP_PERF_ARM_APM_XGENE_ONLINE = 171, 7261 CPUHP_AP_PERF_ARM_CAVIUM_TX2_UNCORE_ONLINE = 172, 7262 CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE = 173, 7263 CPUHP_AP_PERF_POWERPC_CORE_IMC_ONLINE = 174, 7264 CPUHP_AP_PERF_POWERPC_THREAD_IMC_ONLINE = 175, 7265 CPUHP_AP_PERF_POWERPC_TRACE_IMC_ONLINE = 176, 7266 CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE = 177, 7267 CPUHP_AP_PERF_POWERPC_HV_GPCI_ONLINE = 178, 7268 CPUHP_AP_WATCHDOG_ONLINE = 179, 7269 CPUHP_AP_WORKQUEUE_ONLINE = 180, 7270 CPUHP_AP_RCUTREE_ONLINE = 181, 7271 CPUHP_AP_BASE_CACHEINFO_ONLINE = 182, 7272 CPUHP_AP_ONLINE_DYN = 183, 7273 CPUHP_AP_ONLINE_DYN_END = 213, 7274 CPUHP_AP_X86_HPET_ONLINE = 214, 7275 CPUHP_AP_X86_KVM_CLK_ONLINE = 215, 7276 CPUHP_AP_ACTIVE = 216, 7277 CPUHP_ONLINE = 217, 7278 }; 7279 7280 struct static_call_mod { 7281 struct static_call_mod *next; 7282 struct module *mod; 7283 struct static_call_site *sites; 7284 }; 7285 7286 struct ring_buffer_event { 7287 u32 type_len: 5; 7288 u32 time_delta: 27; 7289 u32 array[0]; 7290 }; 7291 7292 struct seq_buf { 7293 char *buffer; 7294 size_t size; 7295 size_t len; 7296 loff_t readpos; 7297 }; 7298 7299 struct trace_seq { 7300 char buffer[4096]; 7301 struct seq_buf seq; 7302 int full; 7303 }; 7304 7305 enum perf_sw_ids { 7306 PERF_COUNT_SW_CPU_CLOCK = 0, 7307 PERF_COUNT_SW_TASK_CLOCK = 1, 7308 PERF_COUNT_SW_PAGE_FAULTS = 2, 7309 PERF_COUNT_SW_CONTEXT_SWITCHES = 3, 7310 PERF_COUNT_SW_CPU_MIGRATIONS = 4, 7311 PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, 7312 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, 7313 PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, 7314 PERF_COUNT_SW_EMULATION_FAULTS = 8, 7315 PERF_COUNT_SW_DUMMY = 9, 7316 PERF_COUNT_SW_BPF_OUTPUT = 10, 7317 PERF_COUNT_SW_MAX = 11, 7318 }; 7319 7320 union perf_mem_data_src { 7321 __u64 val; 7322 struct { 7323 __u64 mem_op: 5; 7324 __u64 mem_lvl: 14; 7325 __u64 mem_snoop: 5; 7326 __u64 mem_lock: 2; 7327 __u64 mem_dtlb: 7; 7328 __u64 mem_lvl_num: 4; 7329 __u64 mem_remote: 1; 7330 __u64 mem_snoopx: 2; 7331 __u64 mem_rsvd: 24; 7332 }; 7333 }; 7334 7335 struct perf_branch_entry { 7336 __u64 from; 7337 __u64 to; 7338 __u64 mispred: 1; 7339 __u64 predicted: 1; 7340 __u64 in_tx: 1; 7341 __u64 abort: 1; 7342 __u64 cycles: 16; 7343 __u64 type: 4; 7344 __u64 reserved: 40; 7345 }; 7346 7347 struct new_utsname { 7348 char sysname[65]; 7349 char nodename[65]; 7350 char release[65]; 7351 char version[65]; 7352 char machine[65]; 7353 char domainname[65]; 7354 }; 7355 7356 struct uts_namespace { 7357 struct new_utsname name; 7358 struct user_namespace *user_ns; 7359 struct ucounts *ucounts; 7360 struct ns_common ns; 7361 }; 7362 7363 struct cgroup_namespace { 7364 struct ns_common ns; 7365 struct user_namespace *user_ns; 7366 struct ucounts *ucounts; 7367 struct css_set *root_cset; 7368 }; 7369 7370 struct nsset { 7371 unsigned int flags; 7372 struct nsproxy *nsproxy; 7373 struct fs_struct *fs; 7374 const struct cred *cred; 7375 }; 7376 7377 struct proc_ns_operations { 7378 const char *name; 7379 const char *real_ns_name; 7380 int type; 7381 struct ns_common * (*get)(struct task_struct *); 7382 void (*put)(struct ns_common *); 7383 int (*install)(struct nsset *, struct ns_common *); 7384 struct user_namespace * (*owner)(struct ns_common *); 7385 struct ns_common * (*get_parent)(struct ns_common *); 7386 }; 7387 7388 struct ucounts { 7389 struct hlist_node node; 7390 struct user_namespace *ns; 7391 kuid_t uid; 7392 int count; 7393 atomic_t ucount[10]; 7394 }; 7395 7396 struct perf_cpu_context; 7397 7398 struct perf_output_handle; 7399 7400 struct pmu { 7401 struct list_head entry; 7402 struct module *module; 7403 struct device *dev; 7404 const struct attribute_group **attr_groups; 7405 const struct attribute_group **attr_update; 7406 const char *name; 7407 int type; 7408 int capabilities; 7409 int *pmu_disable_count; 7410 struct perf_cpu_context *pmu_cpu_context; 7411 atomic_t exclusive_cnt; 7412 int task_ctx_nr; 7413 int hrtimer_interval_ms; 7414 unsigned int nr_addr_filters; 7415 void (*pmu_enable)(struct pmu *); 7416 void (*pmu_disable)(struct pmu *); 7417 int (*event_init)(struct perf_event *); 7418 void (*event_mapped)(struct perf_event *, struct mm_struct *); 7419 void (*event_unmapped)(struct perf_event *, struct mm_struct *); 7420 int (*add)(struct perf_event *, int); 7421 void (*del)(struct perf_event *, int); 7422 void (*start)(struct perf_event *, int); 7423 void (*stop)(struct perf_event *, int); 7424 void (*read)(struct perf_event *); 7425 void (*start_txn)(struct pmu *, unsigned int); 7426 int (*commit_txn)(struct pmu *); 7427 void (*cancel_txn)(struct pmu *); 7428 int (*event_idx)(struct perf_event *); 7429 void (*sched_task)(struct perf_event_context *, bool); 7430 struct kmem_cache *task_ctx_cache; 7431 void (*swap_task_ctx)(struct perf_event_context *, struct perf_event_context *); 7432 void * (*setup_aux)(struct perf_event *, void **, int, bool); 7433 void (*free_aux)(void *); 7434 long int (*snapshot_aux)(struct perf_event *, struct perf_output_handle *, long unsigned int); 7435 int (*addr_filters_validate)(struct list_head *); 7436 void (*addr_filters_sync)(struct perf_event *); 7437 int (*aux_output_match)(struct perf_event *); 7438 int (*filter_match)(struct perf_event *); 7439 int (*check_period)(struct perf_event *, u64); 7440 }; 7441 7442 struct ftrace_regs { 7443 struct pt_regs regs; 7444 }; 7445 7446 struct iovec { 7447 void *iov_base; 7448 __kernel_size_t iov_len; 7449 }; 7450 7451 struct kvec { 7452 void *iov_base; 7453 size_t iov_len; 7454 }; 7455 7456 struct perf_regs { 7457 __u64 abi; 7458 struct pt_regs *regs; 7459 }; 7460 7461 struct u64_stats_sync {}; 7462 7463 struct bpf_cgroup_storage_key { 7464 __u64 cgroup_inode_id; 7465 __u32 attach_type; 7466 }; 7467 7468 enum kmalloc_cache_type { 7469 KMALLOC_NORMAL = 0, 7470 KMALLOC_RECLAIM = 1, 7471 KMALLOC_DMA = 2, 7472 NR_KMALLOC_TYPES = 3, 7473 }; 7474 7475 struct bpf_cgroup_storage; 7476 7477 struct bpf_prog_array_item { 7478 struct bpf_prog *prog; 7479 struct bpf_cgroup_storage *cgroup_storage[2]; 7480 }; 7481 7482 struct bpf_storage_buffer; 7483 7484 struct bpf_cgroup_storage_map; 7485 7486 struct bpf_cgroup_storage { 7487 union { 7488 struct bpf_storage_buffer *buf; 7489 void *percpu_buf; 7490 }; 7491 struct bpf_cgroup_storage_map *map; 7492 struct bpf_cgroup_storage_key key; 7493 struct list_head list_map; 7494 struct list_head list_cg; 7495 struct rb_node node; 7496 struct callback_head rcu; 7497 }; 7498 7499 struct bpf_prog_array { 7500 struct callback_head rcu; 7501 struct bpf_prog_array_item items[0]; 7502 }; 7503 7504 struct bpf_storage_buffer { 7505 struct callback_head rcu; 7506 char data[0]; 7507 }; 7508 7509 struct psi_group_cpu { 7510 seqcount_t seq; 7511 unsigned int tasks[4]; 7512 u32 state_mask; 7513 u32 times[6]; 7514 u64 state_start; 7515 long: 64; 7516 u32 times_prev[12]; 7517 long: 64; 7518 long: 64; 7519 }; 7520 7521 struct cgroup_taskset; 7522 7523 struct cftype; 7524 7525 struct cgroup_subsys { 7526 struct cgroup_subsys_state * (*css_alloc)(struct cgroup_subsys_state *); 7527 int (*css_online)(struct cgroup_subsys_state *); 7528 void (*css_offline)(struct cgroup_subsys_state *); 7529 void (*css_released)(struct cgroup_subsys_state *); 7530 void (*css_free)(struct cgroup_subsys_state *); 7531 void (*css_reset)(struct cgroup_subsys_state *); 7532 void (*css_rstat_flush)(struct cgroup_subsys_state *, int); 7533 int (*css_extra_stat_show)(struct seq_file *, struct cgroup_subsys_state *); 7534 int (*can_attach)(struct cgroup_taskset *); 7535 void (*cancel_attach)(struct cgroup_taskset *); 7536 void (*attach)(struct cgroup_taskset *); 7537 void (*post_attach)(); 7538 int (*can_fork)(struct task_struct *, struct css_set *); 7539 void (*cancel_fork)(struct task_struct *, struct css_set *); 7540 void (*fork)(struct task_struct *); 7541 void (*exit)(struct task_struct *); 7542 void (*release)(struct task_struct *); 7543 void (*bind)(struct cgroup_subsys_state *); 7544 bool early_init: 1; 7545 bool implicit_on_dfl: 1; 7546 bool threaded: 1; 7547 int id; 7548 const char *name; 7549 const char *legacy_name; 7550 struct cgroup_root *root; 7551 struct idr css_idr; 7552 struct list_head cfts; 7553 struct cftype *dfl_cftypes; 7554 struct cftype *legacy_cftypes; 7555 unsigned int depends_on; 7556 }; 7557 7558 struct cgroup_rstat_cpu { 7559 struct u64_stats_sync bsync; 7560 struct cgroup_base_stat bstat; 7561 struct cgroup_base_stat last_bstat; 7562 struct cgroup *updated_children; 7563 struct cgroup *updated_next; 7564 }; 7565 7566 struct cgroup_root { 7567 struct kernfs_root *kf_root; 7568 unsigned int subsys_mask; 7569 int hierarchy_id; 7570 struct cgroup cgrp; 7571 u64 cgrp_ancestor_id_storage; 7572 atomic_t nr_cgrps; 7573 struct list_head root_list; 7574 unsigned int flags; 7575 char release_agent_path[4096]; 7576 char name[64]; 7577 }; 7578 7579 struct cftype { 7580 char name[64]; 7581 long unsigned int private; 7582 size_t max_write_len; 7583 unsigned int flags; 7584 unsigned int file_offset; 7585 struct cgroup_subsys *ss; 7586 struct list_head node; 7587 struct kernfs_ops *kf_ops; 7588 int (*open)(struct kernfs_open_file *); 7589 void (*release)(struct kernfs_open_file *); 7590 u64 (*read_u64)(struct cgroup_subsys_state *, struct cftype *); 7591 s64 (*read_s64)(struct cgroup_subsys_state *, struct cftype *); 7592 int (*seq_show)(struct seq_file *, void *); 7593 void * (*seq_start)(struct seq_file *, loff_t *); 7594 void * (*seq_next)(struct seq_file *, void *, loff_t *); 7595 void (*seq_stop)(struct seq_file *, void *); 7596 int (*write_u64)(struct cgroup_subsys_state *, struct cftype *, u64); 7597 int (*write_s64)(struct cgroup_subsys_state *, struct cftype *, s64); 7598 ssize_t (*write)(struct kernfs_open_file *, char *, size_t, loff_t); 7599 __poll_t (*poll)(struct kernfs_open_file *, struct poll_table_struct *); 7600 }; 7601 7602 struct perf_callchain_entry { 7603 __u64 nr; 7604 __u64 ip[0]; 7605 }; 7606 7607 typedef long unsigned int (*perf_copy_f)(void *, const void *, long unsigned int, long unsigned int); 7608 7609 struct perf_raw_frag { 7610 union { 7611 struct perf_raw_frag *next; 7612 long unsigned int pad; 7613 }; 7614 perf_copy_f copy; 7615 void *data; 7616 u32 size; 7617 } __attribute__((packed)); 7618 7619 struct perf_raw_record { 7620 struct perf_raw_frag frag; 7621 u32 size; 7622 }; 7623 7624 struct perf_branch_stack { 7625 __u64 nr; 7626 __u64 hw_idx; 7627 struct perf_branch_entry entries[0]; 7628 }; 7629 7630 struct perf_cpu_context { 7631 struct perf_event_context ctx; 7632 struct perf_event_context *task_ctx; 7633 int active_oncpu; 7634 int exclusive; 7635 raw_spinlock_t hrtimer_lock; 7636 struct hrtimer hrtimer; 7637 ktime_t hrtimer_interval; 7638 unsigned int hrtimer_active; 7639 struct perf_cgroup *cgrp; 7640 struct list_head cgrp_cpuctx_entry; 7641 struct list_head sched_cb_entry; 7642 int sched_cb_usage; 7643 int online; 7644 int heap_size; 7645 struct perf_event **heap; 7646 struct perf_event *heap_default[2]; 7647 }; 7648 7649 struct perf_output_handle { 7650 struct perf_event *event; 7651 struct perf_buffer *rb; 7652 long unsigned int wakeup; 7653 long unsigned int size; 7654 u64 aux_flags; 7655 union { 7656 void *addr; 7657 long unsigned int head; 7658 }; 7659 int page; 7660 }; 7661 7662 struct perf_addr_filter_range { 7663 long unsigned int start; 7664 long unsigned int size; 7665 }; 7666 7667 struct perf_sample_data { 7668 u64 addr; 7669 struct perf_raw_record *raw; 7670 struct perf_branch_stack *br_stack; 7671 u64 period; 7672 u64 weight; 7673 u64 txn; 7674 union perf_mem_data_src data_src; 7675 u64 type; 7676 u64 ip; 7677 struct { 7678 u32 pid; 7679 u32 tid; 7680 } tid_entry; 7681 u64 time; 7682 u64 id; 7683 u64 stream_id; 7684 struct { 7685 u32 cpu; 7686 u32 reserved; 7687 } cpu_entry; 7688 struct perf_callchain_entry *callchain; 7689 u64 aux_size; 7690 struct perf_regs regs_user; 7691 struct perf_regs regs_intr; 7692 u64 stack_user_size; 7693 u64 phys_addr; 7694 u64 cgroup; 7695 u64 data_page_size; 7696 u64 code_page_size; 7697 long: 64; 7698 long: 64; 7699 long: 64; 7700 long: 64; 7701 long: 64; 7702 long: 64; 7703 long: 64; 7704 }; 7705 7706 struct perf_cgroup_info; 7707 7708 struct perf_cgroup { 7709 struct cgroup_subsys_state css; 7710 struct perf_cgroup_info *info; 7711 }; 7712 7713 struct perf_cgroup_info { 7714 u64 time; 7715 u64 timestamp; 7716 }; 7717 7718 struct trace_entry { 7719 short unsigned int type; 7720 unsigned char flags; 7721 unsigned char preempt_count; 7722 int pid; 7723 }; 7724 7725 struct trace_array; 7726 7727 struct tracer; 7728 7729 struct array_buffer; 7730 7731 struct ring_buffer_iter; 7732 7733 struct trace_iterator { 7734 struct trace_array *tr; 7735 struct tracer *trace; 7736 struct array_buffer *array_buffer; 7737 void *private; 7738 int cpu_file; 7739 struct mutex mutex; 7740 struct ring_buffer_iter **buffer_iter; 7741 long unsigned int iter_flags; 7742 void *temp; 7743 unsigned int temp_size; 7744 struct trace_seq tmp_seq; 7745 cpumask_var_t started; 7746 bool snapshot; 7747 struct trace_seq seq; 7748 struct trace_entry *ent; 7749 long unsigned int lost_events; 7750 int leftover; 7751 int ent_size; 7752 int cpu; 7753 u64 ts; 7754 loff_t pos; 7755 long int idx; 7756 }; 7757 7758 enum print_line_t { 7759 TRACE_TYPE_PARTIAL_LINE = 0, 7760 TRACE_TYPE_HANDLED = 1, 7761 TRACE_TYPE_UNHANDLED = 2, 7762 TRACE_TYPE_NO_CONSUME = 3, 7763 }; 7764 7765 typedef enum print_line_t (*trace_print_func)(struct trace_iterator *, int, struct trace_event *); 7766 7767 struct trace_event_functions { 7768 trace_print_func trace; 7769 trace_print_func raw; 7770 trace_print_func hex; 7771 trace_print_func binary; 7772 }; 7773 7774 enum trace_reg { 7775 TRACE_REG_REGISTER = 0, 7776 TRACE_REG_UNREGISTER = 1, 7777 TRACE_REG_PERF_REGISTER = 2, 7778 TRACE_REG_PERF_UNREGISTER = 3, 7779 TRACE_REG_PERF_OPEN = 4, 7780 TRACE_REG_PERF_CLOSE = 5, 7781 TRACE_REG_PERF_ADD = 6, 7782 TRACE_REG_PERF_DEL = 7, 7783 }; 7784 7785 struct trace_event_fields { 7786 const char *type; 7787 union { 7788 struct { 7789 const char *name; 7790 const int size; 7791 const int align; 7792 const int is_signed; 7793 const int filter_type; 7794 }; 7795 int (*define_fields)(struct trace_event_call *); 7796 }; 7797 }; 7798 7799 struct trace_event_class { 7800 const char *system; 7801 void *probe; 7802 void *perf_probe; 7803 int (*reg)(struct trace_event_call *, enum trace_reg, void *); 7804 struct trace_event_fields *fields_array; 7805 struct list_head * (*get_fields)(struct trace_event_call *); 7806 struct list_head fields; 7807 int (*raw_init)(struct trace_event_call *); 7808 }; 7809 7810 struct trace_buffer; 7811 7812 struct trace_event_file; 7813 7814 struct trace_event_buffer { 7815 struct trace_buffer *buffer; 7816 struct ring_buffer_event *event; 7817 struct trace_event_file *trace_file; 7818 void *entry; 7819 long unsigned int flags; 7820 int pc; 7821 struct pt_regs *regs; 7822 }; 7823 7824 struct trace_subsystem_dir; 7825 7826 struct trace_event_file { 7827 struct list_head list; 7828 struct trace_event_call *event_call; 7829 struct event_filter *filter; 7830 struct dentry *dir; 7831 struct trace_array *tr; 7832 struct trace_subsystem_dir *system; 7833 struct list_head triggers; 7834 long unsigned int flags; 7835 atomic_t sm_ref; 7836 atomic_t tm_ref; 7837 }; 7838 7839 enum { 7840 TRACE_EVENT_FL_FILTERED_BIT = 0, 7841 TRACE_EVENT_FL_CAP_ANY_BIT = 1, 7842 TRACE_EVENT_FL_NO_SET_FILTER_BIT = 2, 7843 TRACE_EVENT_FL_IGNORE_ENABLE_BIT = 3, 7844 TRACE_EVENT_FL_TRACEPOINT_BIT = 4, 7845 TRACE_EVENT_FL_KPROBE_BIT = 5, 7846 TRACE_EVENT_FL_UPROBE_BIT = 6, 7847 }; 7848 7849 enum { 7850 TRACE_EVENT_FL_FILTERED = 1, 7851 TRACE_EVENT_FL_CAP_ANY = 2, 7852 TRACE_EVENT_FL_NO_SET_FILTER = 4, 7853 TRACE_EVENT_FL_IGNORE_ENABLE = 8, 7854 TRACE_EVENT_FL_TRACEPOINT = 16, 7855 TRACE_EVENT_FL_KPROBE = 32, 7856 TRACE_EVENT_FL_UPROBE = 64, 7857 }; 7858 7859 enum { 7860 EVENT_FILE_FL_ENABLED_BIT = 0, 7861 EVENT_FILE_FL_RECORDED_CMD_BIT = 1, 7862 EVENT_FILE_FL_RECORDED_TGID_BIT = 2, 7863 EVENT_FILE_FL_FILTERED_BIT = 3, 7864 EVENT_FILE_FL_NO_SET_FILTER_BIT = 4, 7865 EVENT_FILE_FL_SOFT_MODE_BIT = 5, 7866 EVENT_FILE_FL_SOFT_DISABLED_BIT = 6, 7867 EVENT_FILE_FL_TRIGGER_MODE_BIT = 7, 7868 EVENT_FILE_FL_TRIGGER_COND_BIT = 8, 7869 EVENT_FILE_FL_PID_FILTER_BIT = 9, 7870 EVENT_FILE_FL_WAS_ENABLED_BIT = 10, 7871 }; 7872 7873 enum { 7874 EVENT_FILE_FL_ENABLED = 1, 7875 EVENT_FILE_FL_RECORDED_CMD = 2, 7876 EVENT_FILE_FL_RECORDED_TGID = 4, 7877 EVENT_FILE_FL_FILTERED = 8, 7878 EVENT_FILE_FL_NO_SET_FILTER = 16, 7879 EVENT_FILE_FL_SOFT_MODE = 32, 7880 EVENT_FILE_FL_SOFT_DISABLED = 64, 7881 EVENT_FILE_FL_TRIGGER_MODE = 128, 7882 EVENT_FILE_FL_TRIGGER_COND = 256, 7883 EVENT_FILE_FL_PID_FILTER = 512, 7884 EVENT_FILE_FL_WAS_ENABLED = 1024, 7885 }; 7886 7887 enum event_trigger_type { 7888 ETT_NONE = 0, 7889 ETT_TRACE_ONOFF = 1, 7890 ETT_SNAPSHOT = 2, 7891 ETT_STACKTRACE = 4, 7892 ETT_EVENT_ENABLE = 8, 7893 ETT_EVENT_HIST = 16, 7894 ETT_HIST_ENABLE = 32, 7895 }; 7896 7897 enum { 7898 FILTER_OTHER = 0, 7899 FILTER_STATIC_STRING = 1, 7900 FILTER_DYN_STRING = 2, 7901 FILTER_PTR_STRING = 3, 7902 FILTER_TRACE_FN = 4, 7903 FILTER_COMM = 5, 7904 FILTER_CPU = 6, 7905 }; 7906 7907 struct fwnode_reference_args; 7908 7909 struct fwnode_endpoint; 7910 7911 struct fwnode_operations { 7912 struct fwnode_handle * (*get)(struct fwnode_handle *); 7913 void (*put)(struct fwnode_handle *); 7914 bool (*device_is_available)(const struct fwnode_handle *); 7915 const void * (*device_get_match_data)(const struct fwnode_handle *, const struct device *); 7916 bool (*property_present)(const struct fwnode_handle *, const char *); 7917 int (*property_read_int_array)(const struct fwnode_handle *, const char *, unsigned int, void *, size_t); 7918 int (*property_read_string_array)(const struct fwnode_handle *, const char *, const char **, size_t); 7919 const char * (*get_name)(const struct fwnode_handle *); 7920 const char * (*get_name_prefix)(const struct fwnode_handle *); 7921 struct fwnode_handle * (*get_parent)(const struct fwnode_handle *); 7922 struct fwnode_handle * (*get_next_child_node)(const struct fwnode_handle *, struct fwnode_handle *); 7923 struct fwnode_handle * (*get_named_child_node)(const struct fwnode_handle *, const char *); 7924 int (*get_reference_args)(const struct fwnode_handle *, const char *, const char *, unsigned int, unsigned int, struct fwnode_reference_args *); 7925 struct fwnode_handle * (*graph_get_next_endpoint)(const struct fwnode_handle *, struct fwnode_handle *); 7926 struct fwnode_handle * (*graph_get_remote_endpoint)(const struct fwnode_handle *); 7927 struct fwnode_handle * (*graph_get_port_parent)(struct fwnode_handle *); 7928 int (*graph_parse_endpoint)(const struct fwnode_handle *, struct fwnode_endpoint *); 7929 int (*add_links)(struct fwnode_handle *); 7930 }; 7931 7932 struct fwnode_endpoint { 7933 unsigned int port; 7934 unsigned int id; 7935 const struct fwnode_handle *local_fwnode; 7936 }; 7937 7938 struct fwnode_reference_args { 7939 struct fwnode_handle *fwnode; 7940 unsigned int nargs; 7941 u64 args[8]; 7942 }; 7943 7944 struct property { 7945 char *name; 7946 int length; 7947 void *value; 7948 struct property *next; 7949 }; 7950 7951 struct irq_fwspec { 7952 struct fwnode_handle *fwnode; 7953 int param_count; 7954 u32 param[16]; 7955 }; 7956 7957 struct irq_data; 7958 7959 struct irq_domain_ops { 7960 int (*match)(struct irq_domain *, struct device_node *, enum irq_domain_bus_token); 7961 int (*select)(struct irq_domain *, struct irq_fwspec *, enum irq_domain_bus_token); 7962 int (*map)(struct irq_domain *, unsigned int, irq_hw_number_t); 7963 void (*unmap)(struct irq_domain *, unsigned int); 7964 int (*xlate)(struct irq_domain *, struct device_node *, const u32 *, unsigned int, long unsigned int *, unsigned int *); 7965 int (*alloc)(struct irq_domain *, unsigned int, unsigned int, void *); 7966 void (*free)(struct irq_domain *, unsigned int, unsigned int); 7967 int (*activate)(struct irq_domain *, struct irq_data *, bool); 7968 void (*deactivate)(struct irq_domain *, struct irq_data *); 7969 int (*translate)(struct irq_domain *, struct irq_fwspec *, long unsigned int *, unsigned int *); 7970 }; 7971 7972 struct xbc_node { 7973 u16 next; 7974 u16 child; 7975 u16 parent; 7976 u16 data; 7977 }; 7978 7979 enum wb_stat_item { 7980 WB_RECLAIMABLE = 0, 7981 WB_WRITEBACK = 1, 7982 WB_DIRTIED = 2, 7983 WB_WRITTEN = 3, 7984 NR_WB_STAT_ITEMS = 4, 7985 }; 7986 7987 struct disk_part_tbl; 7988 7989 struct block_device_operations; 7990 7991 struct timer_rand_state; 7992 7993 struct disk_events; 7994 7995 struct cdrom_device_info; 7996 7997 struct badblocks; 7998 7999 struct gendisk { 8000 int major; 8001 int first_minor; 8002 int minors; 8003 char disk_name[32]; 8004 short unsigned int events; 8005 short unsigned int event_flags; 8006 struct disk_part_tbl *part_tbl; 8007 struct block_device *part0; 8008 const struct block_device_operations *fops; 8009 struct request_queue *queue; 8010 void *private_data; 8011 int flags; 8012 long unsigned int state; 8013 struct kobject *slave_dir; 8014 struct timer_rand_state *random; 8015 atomic_t sync_io; 8016 struct disk_events *ev; 8017 struct kobject integrity_kobj; 8018 struct cdrom_device_info *cdi; 8019 int node_id; 8020 struct badblocks *bb; 8021 struct lockdep_map lockdep_map; 8022 }; 8023 8024 struct partition_meta_info { 8025 char uuid[37]; 8026 u8 volname[64]; 8027 }; 8028 8029 struct bio_integrity_payload { 8030 struct bio *bip_bio; 8031 struct bvec_iter bip_iter; 8032 short unsigned int bip_slab; 8033 short unsigned int bip_vcnt; 8034 short unsigned int bip_max_vcnt; 8035 short unsigned int bip_flags; 8036 struct bvec_iter bio_iter; 8037 struct work_struct bip_work; 8038 struct bio_vec *bip_vec; 8039 struct bio_vec bip_inline_vecs[0]; 8040 }; 8041 8042 struct blkg_iostat { 8043 u64 bytes[3]; 8044 u64 ios[3]; 8045 }; 8046 8047 struct blkg_iostat_set { 8048 struct u64_stats_sync sync; 8049 struct blkg_iostat cur; 8050 struct blkg_iostat last; 8051 }; 8052 8053 struct blkcg; 8054 8055 struct blkg_policy_data; 8056 8057 struct blkcg_gq { 8058 struct request_queue *q; 8059 struct list_head q_node; 8060 struct hlist_node blkcg_node; 8061 struct blkcg *blkcg; 8062 struct blkcg_gq *parent; 8063 struct percpu_ref refcnt; 8064 bool online; 8065 struct blkg_iostat_set *iostat_cpu; 8066 struct blkg_iostat_set iostat; 8067 struct blkg_policy_data *pd[5]; 8068 spinlock_t async_bio_lock; 8069 struct bio_list async_bios; 8070 struct work_struct async_bio_work; 8071 atomic_t use_delay; 8072 atomic64_t delay_nsec; 8073 atomic64_t delay_start; 8074 u64 last_delay; 8075 int last_use; 8076 struct callback_head callback_head; 8077 }; 8078 8079 typedef unsigned int blk_qc_t; 8080 8081 struct disk_part_tbl { 8082 struct callback_head callback_head; 8083 int len; 8084 struct block_device *last_lookup; 8085 struct block_device *part[0]; 8086 }; 8087 8088 struct blk_integrity_iter; 8089 8090 typedef blk_status_t integrity_processing_fn(struct blk_integrity_iter *); 8091 8092 typedef void integrity_prepare_fn(struct request *); 8093 8094 typedef void integrity_complete_fn(struct request *, unsigned int); 8095 8096 struct blk_integrity_profile { 8097 integrity_processing_fn *generate_fn; 8098 integrity_processing_fn *verify_fn; 8099 integrity_prepare_fn *prepare_fn; 8100 integrity_complete_fn *complete_fn; 8101 const char *name; 8102 }; 8103 8104 struct blk_zone; 8105 8106 typedef int (*report_zones_cb)(struct blk_zone *, unsigned int, void *); 8107 8108 struct hd_geometry; 8109 8110 struct pr_ops; 8111 8112 struct block_device_operations { 8113 blk_qc_t (*submit_bio)(struct bio *); 8114 int (*open)(struct block_device *, fmode_t); 8115 void (*release)(struct gendisk *, fmode_t); 8116 int (*rw_page)(struct block_device *, sector_t, struct page *, unsigned int); 8117 int (*ioctl)(struct block_device *, fmode_t, unsigned int, long unsigned int); 8118 int (*compat_ioctl)(struct block_device *, fmode_t, unsigned int, long unsigned int); 8119 unsigned int (*check_events)(struct gendisk *, unsigned int); 8120 void (*unlock_native_capacity)(struct gendisk *); 8121 int (*revalidate_disk)(struct gendisk *); 8122 int (*getgeo)(struct block_device *, struct hd_geometry *); 8123 int (*set_read_only)(struct block_device *, bool); 8124 void (*swap_slot_free_notify)(struct block_device *, long unsigned int); 8125 int (*report_zones)(struct gendisk *, sector_t, unsigned int, report_zones_cb, void *); 8126 char * (*devnode)(struct gendisk *, umode_t *); 8127 struct module *owner; 8128 const struct pr_ops *pr_ops; 8129 }; 8130 8131 struct sg_io_v4 { 8132 __s32 guard; 8133 __u32 protocol; 8134 __u32 subprotocol; 8135 __u32 request_len; 8136 __u64 request; 8137 __u64 request_tag; 8138 __u32 request_attr; 8139 __u32 request_priority; 8140 __u32 request_extra; 8141 __u32 max_response_len; 8142 __u64 response; 8143 __u32 dout_iovec_count; 8144 __u32 dout_xfer_len; 8145 __u32 din_iovec_count; 8146 __u32 din_xfer_len; 8147 __u64 dout_xferp; 8148 __u64 din_xferp; 8149 __u32 timeout; 8150 __u32 flags; 8151 __u64 usr_ptr; 8152 __u32 spare_in; 8153 __u32 driver_status; 8154 __u32 transport_status; 8155 __u32 device_status; 8156 __u32 retry_delay; 8157 __u32 info; 8158 __u32 duration; 8159 __u32 response_len; 8160 __s32 din_resid; 8161 __s32 dout_resid; 8162 __u64 generated_tag; 8163 __u32 spare_out; 8164 __u32 padding; 8165 }; 8166 8167 struct bsg_ops { 8168 int (*check_proto)(struct sg_io_v4 *); 8169 int (*fill_hdr)(struct request *, struct sg_io_v4 *, fmode_t); 8170 int (*complete_rq)(struct request *, struct sg_io_v4 *); 8171 void (*free_rq)(struct request *); 8172 }; 8173 8174 typedef __u32 req_flags_t; 8175 8176 typedef void rq_end_io_fn(struct request *, blk_status_t); 8177 8178 enum mq_rq_state { 8179 MQ_RQ_IDLE = 0, 8180 MQ_RQ_IN_FLIGHT = 1, 8181 MQ_RQ_COMPLETE = 2, 8182 }; 8183 8184 struct blk_ksm_keyslot; 8185 8186 struct request { 8187 struct request_queue *q; 8188 struct blk_mq_ctx *mq_ctx; 8189 struct blk_mq_hw_ctx *mq_hctx; 8190 unsigned int cmd_flags; 8191 req_flags_t rq_flags; 8192 int tag; 8193 int internal_tag; 8194 unsigned int __data_len; 8195 sector_t __sector; 8196 struct bio *bio; 8197 struct bio *biotail; 8198 struct list_head queuelist; 8199 union { 8200 struct hlist_node hash; 8201 struct list_head ipi_list; 8202 }; 8203 union { 8204 struct rb_node rb_node; 8205 struct bio_vec special_vec; 8206 void *completion_data; 8207 int error_count; 8208 }; 8209 union { 8210 struct { 8211 struct io_cq *icq; 8212 void *priv[2]; 8213 } elv; 8214 struct { 8215 unsigned int seq; 8216 struct list_head list; 8217 rq_end_io_fn *saved_end_io; 8218 } flush; 8219 }; 8220 struct gendisk *rq_disk; 8221 struct block_device *part; 8222 u64 alloc_time_ns; 8223 u64 start_time_ns; 8224 u64 io_start_time_ns; 8225 short unsigned int wbt_flags; 8226 short unsigned int stats_sectors; 8227 short unsigned int nr_phys_segments; 8228 short unsigned int nr_integrity_segments; 8229 struct bio_crypt_ctx *crypt_ctx; 8230 struct blk_ksm_keyslot *crypt_keyslot; 8231 short unsigned int write_hint; 8232 short unsigned int ioprio; 8233 enum mq_rq_state state; 8234 refcount_t ref; 8235 unsigned int timeout; 8236 long unsigned int deadline; 8237 union { 8238 struct __call_single_data csd; 8239 u64 fifo_time; 8240 }; 8241 rq_end_io_fn *end_io; 8242 void *end_io_data; 8243 }; 8244 8245 struct blk_zone { 8246 __u64 start; 8247 __u64 len; 8248 __u64 wp; 8249 __u8 type; 8250 __u8 cond; 8251 __u8 non_seq; 8252 __u8 reset; 8253 __u8 resv[4]; 8254 __u64 capacity; 8255 __u8 reserved[24]; 8256 }; 8257 8258 enum elv_merge { 8259 ELEVATOR_NO_MERGE = 0, 8260 ELEVATOR_FRONT_MERGE = 1, 8261 ELEVATOR_BACK_MERGE = 2, 8262 ELEVATOR_DISCARD_MERGE = 3, 8263 }; 8264 8265 struct elevator_type; 8266 8267 struct blk_mq_alloc_data; 8268 8269 struct elevator_mq_ops { 8270 int (*init_sched)(struct request_queue *, struct elevator_type *); 8271 void (*exit_sched)(struct elevator_queue *); 8272 int (*init_hctx)(struct blk_mq_hw_ctx *, unsigned int); 8273 void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int); 8274 void (*depth_updated)(struct blk_mq_hw_ctx *); 8275 bool (*allow_merge)(struct request_queue *, struct request *, struct bio *); 8276 bool (*bio_merge)(struct blk_mq_hw_ctx *, struct bio *, unsigned int); 8277 int (*request_merge)(struct request_queue *, struct request **, struct bio *); 8278 void (*request_merged)(struct request_queue *, struct request *, enum elv_merge); 8279 void (*requests_merged)(struct request_queue *, struct request *, struct request *); 8280 void (*limit_depth)(unsigned int, struct blk_mq_alloc_data *); 8281 void (*prepare_request)(struct request *); 8282 void (*finish_request)(struct request *); 8283 void (*insert_requests)(struct blk_mq_hw_ctx *, struct list_head *, bool); 8284 struct request * (*dispatch_request)(struct blk_mq_hw_ctx *); 8285 bool (*has_work)(struct blk_mq_hw_ctx *); 8286 void (*completed_request)(struct request *, u64); 8287 void (*requeue_request)(struct request *); 8288 struct request * (*former_request)(struct request_queue *, struct request *); 8289 struct request * (*next_request)(struct request_queue *, struct request *); 8290 void (*init_icq)(struct io_cq *); 8291 void (*exit_icq)(struct io_cq *); 8292 }; 8293 8294 struct elv_fs_entry; 8295 8296 struct blk_mq_debugfs_attr; 8297 8298 struct elevator_type { 8299 struct kmem_cache *icq_cache; 8300 struct elevator_mq_ops ops; 8301 size_t icq_size; 8302 size_t icq_align; 8303 struct elv_fs_entry *elevator_attrs; 8304 const char *elevator_name; 8305 const char *elevator_alias; 8306 const unsigned int elevator_features; 8307 struct module *elevator_owner; 8308 const struct blk_mq_debugfs_attr *queue_debugfs_attrs; 8309 const struct blk_mq_debugfs_attr *hctx_debugfs_attrs; 8310 char icq_cache_name[22]; 8311 struct list_head list; 8312 }; 8313 8314 struct elevator_queue { 8315 struct elevator_type *type; 8316 void *elevator_data; 8317 struct kobject kobj; 8318 struct mutex sysfs_lock; 8319 unsigned int registered: 1; 8320 struct hlist_head hash[64]; 8321 }; 8322 8323 struct elv_fs_entry { 8324 struct attribute attr; 8325 ssize_t (*show)(struct elevator_queue *, char *); 8326 ssize_t (*store)(struct elevator_queue *, const char *, size_t); 8327 }; 8328 8329 struct blk_mq_debugfs_attr { 8330 const char *name; 8331 umode_t mode; 8332 int (*show)(void *, struct seq_file *); 8333 ssize_t (*write)(void *, const char *, size_t, loff_t *); 8334 const struct seq_operations *seq_ops; 8335 }; 8336 8337 enum blk_eh_timer_return { 8338 BLK_EH_DONE = 0, 8339 BLK_EH_RESET_TIMER = 1, 8340 }; 8341 8342 struct blk_mq_queue_data; 8343 8344 struct blk_mq_ops { 8345 blk_status_t (*queue_rq)(struct blk_mq_hw_ctx *, const struct blk_mq_queue_data *); 8346 void (*commit_rqs)(struct blk_mq_hw_ctx *); 8347 bool (*get_budget)(struct request_queue *); 8348 void (*put_budget)(struct request_queue *); 8349 enum blk_eh_timer_return (*timeout)(struct request *, bool); 8350 int (*poll)(struct blk_mq_hw_ctx *); 8351 void (*complete)(struct request *); 8352 int (*init_hctx)(struct blk_mq_hw_ctx *, void *, unsigned int); 8353 void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int); 8354 int (*init_request)(struct blk_mq_tag_set *, struct request *, unsigned int, unsigned int); 8355 void (*exit_request)(struct blk_mq_tag_set *, struct request *, unsigned int); 8356 void (*initialize_rq_fn)(struct request *); 8357 void (*cleanup_rq)(struct request *); 8358 bool (*busy)(struct request_queue *); 8359 int (*map_queues)(struct blk_mq_tag_set *); 8360 void (*show_rq)(struct seq_file *, struct request *); 8361 }; 8362 8363 struct blk_integrity_iter { 8364 void *prot_buf; 8365 void *data_buf; 8366 sector_t seed; 8367 unsigned int data_size; 8368 short unsigned int interval; 8369 const char *disk_name; 8370 }; 8371 8372 enum pr_type { 8373 PR_WRITE_EXCLUSIVE = 1, 8374 PR_EXCLUSIVE_ACCESS = 2, 8375 PR_WRITE_EXCLUSIVE_REG_ONLY = 3, 8376 PR_EXCLUSIVE_ACCESS_REG_ONLY = 4, 8377 PR_WRITE_EXCLUSIVE_ALL_REGS = 5, 8378 PR_EXCLUSIVE_ACCESS_ALL_REGS = 6, 8379 }; 8380 8381 struct pr_ops { 8382 int (*pr_register)(struct block_device *, u64, u64, u32); 8383 int (*pr_reserve)(struct block_device *, u64, enum pr_type, u32); 8384 int (*pr_release)(struct block_device *, u64, enum pr_type); 8385 int (*pr_preempt)(struct block_device *, u64, u64, enum pr_type, bool); 8386 int (*pr_clear)(struct block_device *, u64); 8387 }; 8388 8389 enum blkg_iostat_type { 8390 BLKG_IOSTAT_READ = 0, 8391 BLKG_IOSTAT_WRITE = 1, 8392 BLKG_IOSTAT_DISCARD = 2, 8393 BLKG_IOSTAT_NR = 3, 8394 }; 8395 8396 struct blkcg_policy_data; 8397 8398 struct blkcg { 8399 struct cgroup_subsys_state css; 8400 spinlock_t lock; 8401 refcount_t online_pin; 8402 struct xarray blkg_tree; 8403 struct blkcg_gq *blkg_hint; 8404 struct hlist_head blkg_list; 8405 struct blkcg_policy_data *cpd[5]; 8406 struct list_head all_blkcgs_node; 8407 struct list_head cgwb_list; 8408 }; 8409 8410 struct blkcg_policy_data { 8411 struct blkcg *blkcg; 8412 int plid; 8413 }; 8414 8415 struct blkg_policy_data { 8416 struct blkcg_gq *blkg; 8417 int plid; 8418 }; 8419 8420 typedef long unsigned int efi_status_t; 8421 8422 typedef u8 efi_bool_t; 8423 8424 typedef u16 efi_char16_t; 8425 8426 typedef guid_t efi_guid_t; 8427 8428 typedef struct { 8429 u64 signature; 8430 u32 revision; 8431 u32 headersize; 8432 u32 crc32; 8433 u32 reserved; 8434 } efi_table_hdr_t; 8435 8436 typedef struct { 8437 u32 type; 8438 u32 pad; 8439 u64 phys_addr; 8440 u64 virt_addr; 8441 u64 num_pages; 8442 u64 attribute; 8443 } efi_memory_desc_t; 8444 8445 typedef struct { 8446 efi_guid_t guid; 8447 u32 headersize; 8448 u32 flags; 8449 u32 imagesize; 8450 } efi_capsule_header_t; 8451 8452 typedef struct { 8453 u16 year; 8454 u8 month; 8455 u8 day; 8456 u8 hour; 8457 u8 minute; 8458 u8 second; 8459 u8 pad1; 8460 u32 nanosecond; 8461 s16 timezone; 8462 u8 daylight; 8463 u8 pad2; 8464 } efi_time_t; 8465 8466 typedef struct { 8467 u32 resolution; 8468 u32 accuracy; 8469 u8 sets_to_zero; 8470 } efi_time_cap_t; 8471 8472 typedef struct { 8473 efi_table_hdr_t hdr; 8474 u32 get_time; 8475 u32 set_time; 8476 u32 get_wakeup_time; 8477 u32 set_wakeup_time; 8478 u32 set_virtual_address_map; 8479 u32 convert_pointer; 8480 u32 get_variable; 8481 u32 get_next_variable; 8482 u32 set_variable; 8483 u32 get_next_high_mono_count; 8484 u32 reset_system; 8485 u32 update_capsule; 8486 u32 query_capsule_caps; 8487 u32 query_variable_info; 8488 } efi_runtime_services_32_t; 8489 8490 typedef efi_status_t efi_get_time_t(efi_time_t *, efi_time_cap_t *); 8491 8492 typedef efi_status_t efi_set_time_t(efi_time_t *); 8493 8494 typedef efi_status_t efi_get_wakeup_time_t(efi_bool_t *, efi_bool_t *, efi_time_t *); 8495 8496 typedef efi_status_t efi_set_wakeup_time_t(efi_bool_t, efi_time_t *); 8497 8498 typedef efi_status_t efi_get_variable_t(efi_char16_t *, efi_guid_t *, u32 *, long unsigned int *, void *); 8499 8500 typedef efi_status_t efi_get_next_variable_t(long unsigned int *, efi_char16_t *, efi_guid_t *); 8501 8502 typedef efi_status_t efi_set_variable_t(efi_char16_t *, efi_guid_t *, u32, long unsigned int, void *); 8503 8504 typedef efi_status_t efi_get_next_high_mono_count_t(u32 *); 8505 8506 typedef void efi_reset_system_t(int, efi_status_t, long unsigned int, efi_char16_t *); 8507 8508 typedef efi_status_t efi_query_variable_info_t(u32, u64 *, u64 *, u64 *); 8509 8510 typedef efi_status_t efi_update_capsule_t(efi_capsule_header_t **, long unsigned int, long unsigned int); 8511 8512 typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **, long unsigned int, u64 *, int *); 8513 8514 typedef union { 8515 struct { 8516 efi_table_hdr_t hdr; 8517 efi_status_t (*get_time)(efi_time_t *, efi_time_cap_t *); 8518 efi_status_t (*set_time)(efi_time_t *); 8519 efi_status_t (*get_wakeup_time)(efi_bool_t *, efi_bool_t *, efi_time_t *); 8520 efi_status_t (*set_wakeup_time)(efi_bool_t, efi_time_t *); 8521 efi_status_t (*set_virtual_address_map)(long unsigned int, long unsigned int, u32, efi_memory_desc_t *); 8522 void *convert_pointer; 8523 efi_status_t (*get_variable)(efi_char16_t *, efi_guid_t *, u32 *, long unsigned int *, void *); 8524 efi_status_t (*get_next_variable)(long unsigned int *, efi_char16_t *, efi_guid_t *); 8525 efi_status_t (*set_variable)(efi_char16_t *, efi_guid_t *, u32, long unsigned int, void *); 8526 efi_status_t (*get_next_high_mono_count)(u32 *); 8527 void (*reset_system)(int, efi_status_t, long unsigned int, efi_char16_t *); 8528 efi_status_t (*update_capsule)(efi_capsule_header_t **, long unsigned int, long unsigned int); 8529 efi_status_t (*query_capsule_caps)(efi_capsule_header_t **, long unsigned int, u64 *, int *); 8530 efi_status_t (*query_variable_info)(u32, u64 *, u64 *, u64 *); 8531 }; 8532 efi_runtime_services_32_t mixed_mode; 8533 } efi_runtime_services_t; 8534 8535 struct efi_memory_map { 8536 phys_addr_t phys_map; 8537 void *map; 8538 void *map_end; 8539 int nr_map; 8540 long unsigned int desc_version; 8541 long unsigned int desc_size; 8542 long unsigned int flags; 8543 }; 8544 8545 struct efi { 8546 const efi_runtime_services_t *runtime; 8547 unsigned int runtime_version; 8548 unsigned int runtime_supported_mask; 8549 long unsigned int acpi; 8550 long unsigned int acpi20; 8551 long unsigned int smbios; 8552 long unsigned int smbios3; 8553 long unsigned int esrt; 8554 long unsigned int tpm_log; 8555 long unsigned int tpm_final_log; 8556 long unsigned int mokvar_table; 8557 efi_get_time_t *get_time; 8558 efi_set_time_t *set_time; 8559 efi_get_wakeup_time_t *get_wakeup_time; 8560 efi_set_wakeup_time_t *set_wakeup_time; 8561 efi_get_variable_t *get_variable; 8562 efi_get_next_variable_t *get_next_variable; 8563 efi_set_variable_t *set_variable; 8564 efi_set_variable_t *set_variable_nonblocking; 8565 efi_query_variable_info_t *query_variable_info; 8566 efi_query_variable_info_t *query_variable_info_nonblocking; 8567 efi_update_capsule_t *update_capsule; 8568 efi_query_capsule_caps_t *query_capsule_caps; 8569 efi_get_next_high_mono_count_t *get_next_high_mono_count; 8570 efi_reset_system_t *reset_system; 8571 struct efi_memory_map memmap; 8572 long unsigned int flags; 8573 }; 8574 8575 enum memcg_stat_item { 8576 MEMCG_SWAP = 38, 8577 MEMCG_SOCK = 39, 8578 MEMCG_PERCPU_B = 40, 8579 MEMCG_NR_STAT = 41, 8580 }; 8581 8582 enum memcg_memory_event { 8583 MEMCG_LOW = 0, 8584 MEMCG_HIGH = 1, 8585 MEMCG_MAX = 2, 8586 MEMCG_OOM = 3, 8587 MEMCG_OOM_KILL = 4, 8588 MEMCG_SWAP_HIGH = 5, 8589 MEMCG_SWAP_MAX = 6, 8590 MEMCG_SWAP_FAIL = 7, 8591 MEMCG_NR_MEMORY_EVENTS = 8, 8592 }; 8593 8594 enum mem_cgroup_events_target { 8595 MEM_CGROUP_TARGET_THRESH = 0, 8596 MEM_CGROUP_TARGET_SOFTLIMIT = 1, 8597 MEM_CGROUP_NTARGETS = 2, 8598 }; 8599 8600 struct memcg_vmstats_percpu { 8601 long int stat[41]; 8602 long unsigned int events[96]; 8603 long unsigned int nr_page_events; 8604 long unsigned int targets[2]; 8605 }; 8606 8607 struct mem_cgroup_reclaim_iter { 8608 struct mem_cgroup *position; 8609 unsigned int generation; 8610 }; 8611 8612 struct lruvec_stat { 8613 long int count[38]; 8614 }; 8615 8616 struct memcg_shrinker_map { 8617 struct callback_head rcu; 8618 long unsigned int map[0]; 8619 }; 8620 8621 struct mem_cgroup_per_node { 8622 struct lruvec lruvec; 8623 struct lruvec_stat *lruvec_stat_local; 8624 struct lruvec_stat *lruvec_stat_cpu; 8625 atomic_long_t lruvec_stat[38]; 8626 long unsigned int lru_zone_size[25]; 8627 struct mem_cgroup_reclaim_iter iter; 8628 struct memcg_shrinker_map *shrinker_map; 8629 struct rb_node tree_node; 8630 long unsigned int usage_in_excess; 8631 bool on_tree; 8632 struct mem_cgroup *memcg; 8633 }; 8634 8635 struct eventfd_ctx; 8636 8637 struct mem_cgroup_threshold { 8638 struct eventfd_ctx *eventfd; 8639 long unsigned int threshold; 8640 }; 8641 8642 struct mem_cgroup_threshold_ary { 8643 int current_threshold; 8644 unsigned int size; 8645 struct mem_cgroup_threshold entries[0]; 8646 }; 8647 8648 struct obj_cgroup { 8649 struct percpu_ref refcnt; 8650 struct mem_cgroup *memcg; 8651 atomic_t nr_charged_bytes; 8652 union { 8653 struct list_head list; 8654 struct callback_head rcu; 8655 }; 8656 }; 8657 8658 struct percpu_cluster { 8659 struct swap_cluster_info index; 8660 unsigned int next; 8661 }; 8662 8663 enum fs_value_type { 8664 fs_value_is_undefined = 0, 8665 fs_value_is_flag = 1, 8666 fs_value_is_string = 2, 8667 fs_value_is_blob = 3, 8668 fs_value_is_filename = 4, 8669 fs_value_is_file = 5, 8670 }; 8671 8672 struct fs_parameter { 8673 const char *key; 8674 enum fs_value_type type: 8; 8675 union { 8676 char *string; 8677 void *blob; 8678 struct filename *name; 8679 struct file *file; 8680 }; 8681 size_t size; 8682 int dirfd; 8683 }; 8684 8685 struct fc_log { 8686 refcount_t usage; 8687 u8 head; 8688 u8 tail; 8689 u8 need_free; 8690 struct module *owner; 8691 char *buffer[8]; 8692 }; 8693 8694 struct fs_context_operations { 8695 void (*free)(struct fs_context *); 8696 int (*dup)(struct fs_context *, struct fs_context *); 8697 int (*parse_param)(struct fs_context *, struct fs_parameter *); 8698 int (*parse_monolithic)(struct fs_context *, void *); 8699 int (*get_tree)(struct fs_context *); 8700 int (*reconfigure)(struct fs_context *); 8701 }; 8702 8703 struct fs_parse_result { 8704 bool negated; 8705 union { 8706 bool boolean; 8707 int int_32; 8708 unsigned int uint_32; 8709 u64 uint_64; 8710 }; 8711 }; 8712 8713 struct trace_event_raw_initcall_level { 8714 struct trace_entry ent; 8715 u32 __data_loc_level; 8716 char __data[0]; 8717 }; 8718 8719 struct trace_event_raw_initcall_start { 8720 struct trace_entry ent; 8721 initcall_t func; 8722 char __data[0]; 8723 }; 8724 8725 struct trace_event_raw_initcall_finish { 8726 struct trace_entry ent; 8727 initcall_t func; 8728 int ret; 8729 char __data[0]; 8730 }; 8731 8732 struct trace_event_data_offsets_initcall_level { 8733 u32 level; 8734 }; 8735 8736 struct trace_event_data_offsets_initcall_start {}; 8737 8738 struct trace_event_data_offsets_initcall_finish {}; 8739 8740 typedef void (*btf_trace_initcall_level)(void *, const char *); 8741 8742 typedef void (*btf_trace_initcall_start)(void *, initcall_t); 8743 8744 typedef void (*btf_trace_initcall_finish)(void *, initcall_t, int); 8745 8746 struct blacklist_entry { 8747 struct list_head next; 8748 char *buf; 8749 }; 8750 8751 typedef __u32 Elf32_Word; 8752 8753 struct elf32_note { 8754 Elf32_Word n_namesz; 8755 Elf32_Word n_descsz; 8756 Elf32_Word n_type; 8757 }; 8758 8759 enum { 8760 PROC_ROOT_INO = 1, 8761 PROC_IPC_INIT_INO = 4026531839, 8762 PROC_UTS_INIT_INO = 4026531838, 8763 PROC_USER_INIT_INO = 4026531837, 8764 PROC_PID_INIT_INO = 4026531836, 8765 PROC_CGROUP_INIT_INO = 4026531835, 8766 PROC_TIME_INIT_INO = 4026531834, 8767 }; 8768 8769 typedef __u16 __le16; 8770 8771 typedef __u16 __be16; 8772 8773 typedef __u32 __be32; 8774 8775 typedef __u64 __be64; 8776 8777 typedef __u32 __wsum; 8778 8779 typedef unsigned int slab_flags_t; 8780 8781 struct notifier_block; 8782 8783 typedef int (*notifier_fn_t)(struct notifier_block *, long unsigned int, void *); 8784 8785 struct notifier_block { 8786 notifier_fn_t notifier_call; 8787 struct notifier_block *next; 8788 int priority; 8789 }; 8790 8791 struct blocking_notifier_head { 8792 struct rw_semaphore rwsem; 8793 struct notifier_block *head; 8794 }; 8795 8796 struct raw_notifier_head { 8797 struct notifier_block *head; 8798 }; 8799 8800 typedef __u64 __addrpair; 8801 8802 typedef __u32 __portpair; 8803 8804 typedef struct { 8805 struct net *net; 8806 } possible_net_t; 8807 8808 struct in6_addr { 8809 union { 8810 __u8 u6_addr8[16]; 8811 __be16 u6_addr16[8]; 8812 __be32 u6_addr32[4]; 8813 } in6_u; 8814 }; 8815 8816 struct hlist_nulls_node { 8817 struct hlist_nulls_node *next; 8818 struct hlist_nulls_node **pprev; 8819 }; 8820 8821 struct proto; 8822 8823 struct inet_timewait_death_row; 8824 8825 struct sock_common { 8826 union { 8827 __addrpair skc_addrpair; 8828 struct { 8829 __be32 skc_daddr; 8830 __be32 skc_rcv_saddr; 8831 }; 8832 }; 8833 union { 8834 unsigned int skc_hash; 8835 __u16 skc_u16hashes[2]; 8836 }; 8837 union { 8838 __portpair skc_portpair; 8839 struct { 8840 __be16 skc_dport; 8841 __u16 skc_num; 8842 }; 8843 }; 8844 short unsigned int skc_family; 8845 volatile unsigned char skc_state; 8846 unsigned char skc_reuse: 4; 8847 unsigned char skc_reuseport: 1; 8848 unsigned char skc_ipv6only: 1; 8849 unsigned char skc_net_refcnt: 1; 8850 int skc_bound_dev_if; 8851 union { 8852 struct hlist_node skc_bind_node; 8853 struct hlist_node skc_portaddr_node; 8854 }; 8855 struct proto *skc_prot; 8856 possible_net_t skc_net; 8857 struct in6_addr skc_v6_daddr; 8858 struct in6_addr skc_v6_rcv_saddr; 8859 atomic64_t skc_cookie; 8860 union { 8861 long unsigned int skc_flags; 8862 struct sock *skc_listener; 8863 struct inet_timewait_death_row *skc_tw_dr; 8864 }; 8865 int skc_dontcopy_begin[0]; 8866 union { 8867 struct hlist_node skc_node; 8868 struct hlist_nulls_node skc_nulls_node; 8869 }; 8870 short unsigned int skc_tx_queue_mapping; 8871 short unsigned int skc_rx_queue_mapping; 8872 union { 8873 int skc_incoming_cpu; 8874 u32 skc_rcv_wnd; 8875 u32 skc_tw_rcv_nxt; 8876 }; 8877 refcount_t skc_refcnt; 8878 int skc_dontcopy_end[0]; 8879 union { 8880 u32 skc_rxhash; 8881 u32 skc_window_clamp; 8882 u32 skc_tw_snd_nxt; 8883 }; 8884 }; 8885 8886 typedef struct { 8887 spinlock_t slock; 8888 int owned; 8889 wait_queue_head_t wq; 8890 } socket_lock_t; 8891 8892 struct sk_buff; 8893 8894 struct sk_buff_head { 8895 struct sk_buff *next; 8896 struct sk_buff *prev; 8897 __u32 qlen; 8898 spinlock_t lock; 8899 }; 8900 8901 typedef u64 netdev_features_t; 8902 8903 struct sock_cgroup_data { 8904 union { 8905 struct { 8906 u8 is_data: 1; 8907 u8 no_refcnt: 1; 8908 u8 unused: 6; 8909 u8 padding; 8910 u16 prioidx; 8911 u32 classid; 8912 }; 8913 u64 val; 8914 }; 8915 }; 8916 8917 struct sk_filter; 8918 8919 struct socket_wq; 8920 8921 struct xfrm_policy; 8922 8923 struct dst_entry; 8924 8925 struct socket; 8926 8927 struct net_device; 8928 8929 struct sock_reuseport; 8930 8931 struct bpf_local_storage; 8932 8933 struct sock { 8934 struct sock_common __sk_common; 8935 socket_lock_t sk_lock; 8936 atomic_t sk_drops; 8937 int sk_rcvlowat; 8938 struct sk_buff_head sk_error_queue; 8939 struct sk_buff *sk_rx_skb_cache; 8940 struct sk_buff_head sk_receive_queue; 8941 struct { 8942 atomic_t rmem_alloc; 8943 int len; 8944 struct sk_buff *head; 8945 struct sk_buff *tail; 8946 } sk_backlog; 8947 int sk_forward_alloc; 8948 unsigned int sk_ll_usec; 8949 unsigned int sk_napi_id; 8950 int sk_rcvbuf; 8951 struct sk_filter *sk_filter; 8952 union { 8953 struct socket_wq *sk_wq; 8954 struct socket_wq *sk_wq_raw; 8955 }; 8956 struct xfrm_policy *sk_policy[2]; 8957 struct dst_entry *sk_rx_dst; 8958 struct dst_entry *sk_dst_cache; 8959 atomic_t sk_omem_alloc; 8960 int sk_sndbuf; 8961 int sk_wmem_queued; 8962 refcount_t sk_wmem_alloc; 8963 long unsigned int sk_tsq_flags; 8964 union { 8965 struct sk_buff *sk_send_head; 8966 struct rb_root tcp_rtx_queue; 8967 }; 8968 struct sk_buff *sk_tx_skb_cache; 8969 struct sk_buff_head sk_write_queue; 8970 __s32 sk_peek_off; 8971 int sk_write_pending; 8972 __u32 sk_dst_pending_confirm; 8973 u32 sk_pacing_status; 8974 long int sk_sndtimeo; 8975 struct timer_list sk_timer; 8976 __u32 sk_priority; 8977 __u32 sk_mark; 8978 long unsigned int sk_pacing_rate; 8979 long unsigned int sk_max_pacing_rate; 8980 struct page_frag sk_frag; 8981 netdev_features_t sk_route_caps; 8982 netdev_features_t sk_route_nocaps; 8983 netdev_features_t sk_route_forced_caps; 8984 int sk_gso_type; 8985 unsigned int sk_gso_max_size; 8986 gfp_t sk_allocation; 8987 __u32 sk_txhash; 8988 u8 sk_padding: 1; 8989 u8 sk_kern_sock: 1; 8990 u8 sk_no_check_tx: 1; 8991 u8 sk_no_check_rx: 1; 8992 u8 sk_userlocks: 4; 8993 u8 sk_pacing_shift; 8994 u16 sk_type; 8995 u16 sk_protocol; 8996 u16 sk_gso_max_segs; 8997 long unsigned int sk_lingertime; 8998 struct proto *sk_prot_creator; 8999 rwlock_t sk_callback_lock; 9000 int sk_err; 9001 int sk_err_soft; 9002 u32 sk_ack_backlog; 9003 u32 sk_max_ack_backlog; 9004 kuid_t sk_uid; 9005 u8 sk_prefer_busy_poll; 9006 u16 sk_busy_poll_budget; 9007 struct pid *sk_peer_pid; 9008 const struct cred *sk_peer_cred; 9009 long int sk_rcvtimeo; 9010 ktime_t sk_stamp; 9011 u16 sk_tsflags; 9012 u8 sk_shutdown; 9013 u32 sk_tskey; 9014 atomic_t sk_zckey; 9015 u8 sk_clockid; 9016 u8 sk_txtime_deadline_mode: 1; 9017 u8 sk_txtime_report_errors: 1; 9018 u8 sk_txtime_unused: 6; 9019 struct socket *sk_socket; 9020 void *sk_user_data; 9021 void *sk_security; 9022 struct sock_cgroup_data sk_cgrp_data; 9023 struct mem_cgroup *sk_memcg; 9024 void (*sk_state_change)(struct sock *); 9025 void (*sk_data_ready)(struct sock *); 9026 void (*sk_write_space)(struct sock *); 9027 void (*sk_error_report)(struct sock *); 9028 int (*sk_backlog_rcv)(struct sock *, struct sk_buff *); 9029 struct sk_buff * (*sk_validate_xmit_skb)(struct sock *, struct net_device *, struct sk_buff *); 9030 void (*sk_destruct)(struct sock *); 9031 struct sock_reuseport *sk_reuseport_cb; 9032 struct bpf_local_storage *sk_bpf_storage; 9033 struct callback_head sk_rcu; 9034 }; 9035 9036 struct rhash_head { 9037 struct rhash_head *next; 9038 }; 9039 9040 struct rhashtable; 9041 9042 struct rhashtable_compare_arg { 9043 struct rhashtable *ht; 9044 const void *key; 9045 }; 9046 9047 typedef u32 (*rht_hashfn_t)(const void *, u32, u32); 9048 9049 typedef u32 (*rht_obj_hashfn_t)(const void *, u32, u32); 9050 9051 typedef int (*rht_obj_cmpfn_t)(struct rhashtable_compare_arg *, const void *); 9052 9053 struct rhashtable_params { 9054 u16 nelem_hint; 9055 u16 key_len; 9056 u16 key_offset; 9057 u16 head_offset; 9058 unsigned int max_size; 9059 u16 min_size; 9060 bool automatic_shrinking; 9061 rht_hashfn_t hashfn; 9062 rht_obj_hashfn_t obj_hashfn; 9063 rht_obj_cmpfn_t obj_cmpfn; 9064 }; 9065 9066 struct bucket_table; 9067 9068 struct rhashtable { 9069 struct bucket_table *tbl; 9070 unsigned int key_len; 9071 unsigned int max_elems; 9072 struct rhashtable_params p; 9073 bool rhlist; 9074 struct work_struct run_work; 9075 struct mutex mutex; 9076 spinlock_t lock; 9077 atomic_t nelems; 9078 }; 9079 9080 struct fs_struct { 9081 int users; 9082 spinlock_t lock; 9083 seqcount_spinlock_t seq; 9084 int umask; 9085 int in_exec; 9086 struct path root; 9087 struct path pwd; 9088 }; 9089 9090 struct pipe_buffer; 9091 9092 struct watch_queue; 9093 9094 struct pipe_inode_info { 9095 struct mutex mutex; 9096 wait_queue_head_t rd_wait; 9097 wait_queue_head_t wr_wait; 9098 unsigned int head; 9099 unsigned int tail; 9100 unsigned int max_usage; 9101 unsigned int ring_size; 9102 bool note_loss; 9103 unsigned int nr_accounted; 9104 unsigned int readers; 9105 unsigned int writers; 9106 unsigned int files; 9107 unsigned int r_counter; 9108 unsigned int w_counter; 9109 struct page *tmp_page; 9110 struct fasync_struct *fasync_readers; 9111 struct fasync_struct *fasync_writers; 9112 struct pipe_buffer *bufs; 9113 struct user_struct *user; 9114 struct watch_queue *watch_queue; 9115 }; 9116 9117 typedef short unsigned int __kernel_sa_family_t; 9118 9119 typedef __kernel_sa_family_t sa_family_t; 9120 9121 struct sockaddr { 9122 sa_family_t sa_family; 9123 char sa_data[14]; 9124 }; 9125 9126 struct msghdr { 9127 void *msg_name; 9128 int msg_namelen; 9129 struct iov_iter msg_iter; 9130 union { 9131 void *msg_control; 9132 void *msg_control_user; 9133 }; 9134 bool msg_control_is_user: 1; 9135 __kernel_size_t msg_controllen; 9136 unsigned int msg_flags; 9137 struct kiocb *msg_iocb; 9138 }; 9139 9140 typedef struct { 9141 unsigned int clock_rate; 9142 unsigned int clock_type; 9143 short unsigned int loopback; 9144 } sync_serial_settings; 9145 9146 typedef struct { 9147 unsigned int clock_rate; 9148 unsigned int clock_type; 9149 short unsigned int loopback; 9150 unsigned int slot_map; 9151 } te1_settings; 9152 9153 typedef struct { 9154 short unsigned int encoding; 9155 short unsigned int parity; 9156 } raw_hdlc_proto; 9157 9158 typedef struct { 9159 unsigned int t391; 9160 unsigned int t392; 9161 unsigned int n391; 9162 unsigned int n392; 9163 unsigned int n393; 9164 short unsigned int lmi; 9165 short unsigned int dce; 9166 } fr_proto; 9167 9168 typedef struct { 9169 unsigned int dlci; 9170 } fr_proto_pvc; 9171 9172 typedef struct { 9173 unsigned int dlci; 9174 char master[16]; 9175 } fr_proto_pvc_info; 9176 9177 typedef struct { 9178 unsigned int interval; 9179 unsigned int timeout; 9180 } cisco_proto; 9181 9182 typedef struct { 9183 short unsigned int dce; 9184 unsigned int modulo; 9185 unsigned int window; 9186 unsigned int t1; 9187 unsigned int t2; 9188 unsigned int n2; 9189 } x25_hdlc_proto; 9190 9191 struct ifmap { 9192 long unsigned int mem_start; 9193 long unsigned int mem_end; 9194 short unsigned int base_addr; 9195 unsigned char irq; 9196 unsigned char dma; 9197 unsigned char port; 9198 }; 9199 9200 struct if_settings { 9201 unsigned int type; 9202 unsigned int size; 9203 union { 9204 raw_hdlc_proto *raw_hdlc; 9205 cisco_proto *cisco; 9206 fr_proto *fr; 9207 fr_proto_pvc *fr_pvc; 9208 fr_proto_pvc_info *fr_pvc_info; 9209 x25_hdlc_proto *x25; 9210 sync_serial_settings *sync; 9211 te1_settings *te1; 9212 } ifs_ifsu; 9213 }; 9214 9215 struct ifreq { 9216 union { 9217 char ifrn_name[16]; 9218 } ifr_ifrn; 9219 union { 9220 struct sockaddr ifru_addr; 9221 struct sockaddr ifru_dstaddr; 9222 struct sockaddr ifru_broadaddr; 9223 struct sockaddr ifru_netmask; 9224 struct sockaddr ifru_hwaddr; 9225 short int ifru_flags; 9226 int ifru_ivalue; 9227 int ifru_mtu; 9228 struct ifmap ifru_map; 9229 char ifru_slave[16]; 9230 char ifru_newname[16]; 9231 void *ifru_data; 9232 struct if_settings ifru_settings; 9233 } ifr_ifru; 9234 }; 9235 9236 struct vfsmount { 9237 struct dentry *mnt_root; 9238 struct super_block *mnt_sb; 9239 int mnt_flags; 9240 }; 9241 9242 struct ld_semaphore { 9243 atomic_long_t count; 9244 raw_spinlock_t wait_lock; 9245 unsigned int wait_readers; 9246 struct list_head read_wait; 9247 struct list_head write_wait; 9248 }; 9249 9250 typedef unsigned int tcflag_t; 9251 9252 typedef unsigned char cc_t; 9253 9254 typedef unsigned int speed_t; 9255 9256 struct ktermios { 9257 tcflag_t c_iflag; 9258 tcflag_t c_oflag; 9259 tcflag_t c_cflag; 9260 tcflag_t c_lflag; 9261 cc_t c_line; 9262 cc_t c_cc[19]; 9263 speed_t c_ispeed; 9264 speed_t c_ospeed; 9265 }; 9266 9267 struct winsize { 9268 short unsigned int ws_row; 9269 short unsigned int ws_col; 9270 short unsigned int ws_xpixel; 9271 short unsigned int ws_ypixel; 9272 }; 9273 9274 struct tty_driver; 9275 9276 struct tty_operations; 9277 9278 struct tty_ldisc; 9279 9280 struct tty_port; 9281 9282 struct tty_struct { 9283 int magic; 9284 struct kref kref; 9285 struct device *dev; 9286 struct tty_driver *driver; 9287 const struct tty_operations *ops; 9288 int index; 9289 struct ld_semaphore ldisc_sem; 9290 struct tty_ldisc *ldisc; 9291 struct mutex atomic_write_lock; 9292 struct mutex legacy_mutex; 9293 struct mutex throttle_mutex; 9294 struct rw_semaphore termios_rwsem; 9295 struct mutex winsize_mutex; 9296 spinlock_t ctrl_lock; 9297 spinlock_t flow_lock; 9298 struct ktermios termios; 9299 struct ktermios termios_locked; 9300 char name[64]; 9301 struct pid *pgrp; 9302 struct pid *session; 9303 long unsigned int flags; 9304 int count; 9305 struct winsize winsize; 9306 long unsigned int stopped: 1; 9307 long unsigned int flow_stopped: 1; 9308 int: 30; 9309 long unsigned int unused: 62; 9310 int hw_stopped; 9311 long unsigned int ctrl_status: 8; 9312 long unsigned int packet: 1; 9313 int: 23; 9314 long unsigned int unused_ctrl: 55; 9315 unsigned int receive_room; 9316 int flow_change; 9317 struct tty_struct *link; 9318 struct fasync_struct *fasync; 9319 wait_queue_head_t write_wait; 9320 wait_queue_head_t read_wait; 9321 struct work_struct hangup_work; 9322 void *disc_data; 9323 void *driver_data; 9324 spinlock_t files_lock; 9325 struct list_head tty_files; 9326 int closing; 9327 unsigned char *write_buf; 9328 int write_cnt; 9329 struct work_struct SAK_work; 9330 struct tty_port *port; 9331 }; 9332 9333 typedef struct { 9334 size_t written; 9335 size_t count; 9336 union { 9337 char *buf; 9338 void *data; 9339 } arg; 9340 int error; 9341 } read_descriptor_t; 9342 9343 struct posix_acl_entry { 9344 short int e_tag; 9345 short unsigned int e_perm; 9346 union { 9347 kuid_t e_uid; 9348 kgid_t e_gid; 9349 }; 9350 }; 9351 9352 struct posix_acl { 9353 refcount_t a_refcount; 9354 struct callback_head a_rcu; 9355 unsigned int a_count; 9356 struct posix_acl_entry a_entries[0]; 9357 }; 9358 9359 struct serial_icounter_struct; 9360 9361 struct serial_struct; 9362 9363 struct tty_operations { 9364 struct tty_struct * (*lookup)(struct tty_driver *, struct file *, int); 9365 int (*install)(struct tty_driver *, struct tty_struct *); 9366 void (*remove)(struct tty_driver *, struct tty_struct *); 9367 int (*open)(struct tty_struct *, struct file *); 9368 void (*close)(struct tty_struct *, struct file *); 9369 void (*shutdown)(struct tty_struct *); 9370 void (*cleanup)(struct tty_struct *); 9371 int (*write)(struct tty_struct *, const unsigned char *, int); 9372 int (*put_char)(struct tty_struct *, unsigned char); 9373 void (*flush_chars)(struct tty_struct *); 9374 int (*write_room)(struct tty_struct *); 9375 int (*chars_in_buffer)(struct tty_struct *); 9376 int (*ioctl)(struct tty_struct *, unsigned int, long unsigned int); 9377 long int (*compat_ioctl)(struct tty_struct *, unsigned int, long unsigned int); 9378 void (*set_termios)(struct tty_struct *, struct ktermios *); 9379 void (*throttle)(struct tty_struct *); 9380 void (*unthrottle)(struct tty_struct *); 9381 void (*stop)(struct tty_struct *); 9382 void (*start)(struct tty_struct *); 9383 void (*hangup)(struct tty_struct *); 9384 int (*break_ctl)(struct tty_struct *, int); 9385 void (*flush_buffer)(struct tty_struct *); 9386 void (*set_ldisc)(struct tty_struct *); 9387 void (*wait_until_sent)(struct tty_struct *, int); 9388 void (*send_xchar)(struct tty_struct *, char); 9389 int (*tiocmget)(struct tty_struct *); 9390 int (*tiocmset)(struct tty_struct *, unsigned int, unsigned int); 9391 int (*resize)(struct tty_struct *, struct winsize *); 9392 int (*get_icount)(struct tty_struct *, struct serial_icounter_struct *); 9393 int (*get_serial)(struct tty_struct *, struct serial_struct *); 9394 int (*set_serial)(struct tty_struct *, struct serial_struct *); 9395 void (*show_fdinfo)(struct tty_struct *, struct seq_file *); 9396 int (*poll_init)(struct tty_driver *, int, char *); 9397 int (*poll_get_char)(struct tty_driver *, int); 9398 void (*poll_put_char)(struct tty_driver *, int, char); 9399 int (*proc_show)(struct seq_file *, void *); 9400 }; 9401 9402 struct proc_dir_entry; 9403 9404 struct tty_driver { 9405 int magic; 9406 struct kref kref; 9407 struct cdev **cdevs; 9408 struct module *owner; 9409 const char *driver_name; 9410 const char *name; 9411 int name_base; 9412 int major; 9413 int minor_start; 9414 unsigned int num; 9415 short int type; 9416 short int subtype; 9417 struct ktermios init_termios; 9418 long unsigned int flags; 9419 struct proc_dir_entry *proc_entry; 9420 struct tty_driver *other; 9421 struct tty_struct **ttys; 9422 struct tty_port **ports; 9423 struct ktermios **termios; 9424 void *driver_state; 9425 const struct tty_operations *ops; 9426 struct list_head tty_drivers; 9427 }; 9428 9429 struct tty_buffer { 9430 union { 9431 struct tty_buffer *next; 9432 struct llist_node free; 9433 }; 9434 int used; 9435 int size; 9436 int commit; 9437 int read; 9438 int flags; 9439 long unsigned int data[0]; 9440 }; 9441 9442 struct tty_bufhead { 9443 struct tty_buffer *head; 9444 struct work_struct work; 9445 struct mutex lock; 9446 atomic_t priority; 9447 struct tty_buffer sentinel; 9448 struct llist_head free; 9449 atomic_t mem_used; 9450 int mem_limit; 9451 struct tty_buffer *tail; 9452 }; 9453 9454 struct tty_port_operations; 9455 9456 struct tty_port_client_operations; 9457 9458 struct tty_port { 9459 struct tty_bufhead buf; 9460 struct tty_struct *tty; 9461 struct tty_struct *itty; 9462 const struct tty_port_operations *ops; 9463 const struct tty_port_client_operations *client_ops; 9464 spinlock_t lock; 9465 int blocked_open; 9466 int count; 9467 wait_queue_head_t open_wait; 9468 wait_queue_head_t delta_msr_wait; 9469 long unsigned int flags; 9470 long unsigned int iflags; 9471 unsigned char console: 1; 9472 unsigned char low_latency: 1; 9473 struct mutex mutex; 9474 struct mutex buf_mutex; 9475 unsigned char *xmit_buf; 9476 unsigned int close_delay; 9477 unsigned int closing_wait; 9478 int drain_delay; 9479 struct kref kref; 9480 void *client_data; 9481 }; 9482 9483 struct tty_ldisc_ops { 9484 int magic; 9485 char *name; 9486 int num; 9487 int flags; 9488 int (*open)(struct tty_struct *); 9489 void (*close)(struct tty_struct *); 9490 void (*flush_buffer)(struct tty_struct *); 9491 ssize_t (*read)(struct tty_struct *, struct file *, unsigned char *, size_t, void **, long unsigned int); 9492 ssize_t (*write)(struct tty_struct *, struct file *, const unsigned char *, size_t); 9493 int (*ioctl)(struct tty_struct *, struct file *, unsigned int, long unsigned int); 9494 int (*compat_ioctl)(struct tty_struct *, struct file *, unsigned int, long unsigned int); 9495 void (*set_termios)(struct tty_struct *, struct ktermios *); 9496 __poll_t (*poll)(struct tty_struct *, struct file *, struct poll_table_struct *); 9497 int (*hangup)(struct tty_struct *); 9498 void (*receive_buf)(struct tty_struct *, const unsigned char *, char *, int); 9499 void (*write_wakeup)(struct tty_struct *); 9500 void (*dcd_change)(struct tty_struct *, unsigned int); 9501 int (*receive_buf2)(struct tty_struct *, const unsigned char *, char *, int); 9502 struct module *owner; 9503 int refcount; 9504 }; 9505 9506 struct tty_ldisc { 9507 struct tty_ldisc_ops *ops; 9508 struct tty_struct *tty; 9509 }; 9510 9511 struct tty_port_operations { 9512 int (*carrier_raised)(struct tty_port *); 9513 void (*dtr_rts)(struct tty_port *, int); 9514 void (*shutdown)(struct tty_port *); 9515 int (*activate)(struct tty_port *, struct tty_struct *); 9516 void (*destruct)(struct tty_port *); 9517 }; 9518 9519 struct tty_port_client_operations { 9520 int (*receive_buf)(struct tty_port *, const unsigned char *, const unsigned char *, size_t); 9521 void (*write_wakeup)(struct tty_port *); 9522 }; 9523 9524 struct prot_inuse; 9525 9526 struct netns_core { 9527 struct ctl_table_header *sysctl_hdr; 9528 int sysctl_somaxconn; 9529 int *sock_inuse; 9530 struct prot_inuse *prot_inuse; 9531 }; 9532 9533 struct tcp_mib; 9534 9535 struct ipstats_mib; 9536 9537 struct linux_mib; 9538 9539 struct udp_mib; 9540 9541 struct icmp_mib; 9542 9543 struct icmpmsg_mib; 9544 9545 struct icmpv6_mib; 9546 9547 struct icmpv6msg_mib; 9548 9549 struct linux_xfrm_mib; 9550 9551 struct linux_tls_mib; 9552 9553 struct mptcp_mib; 9554 9555 struct netns_mib { 9556 struct tcp_mib *tcp_statistics; 9557 struct ipstats_mib *ip_statistics; 9558 struct linux_mib *net_statistics; 9559 struct udp_mib *udp_statistics; 9560 struct udp_mib *udplite_statistics; 9561 struct icmp_mib *icmp_statistics; 9562 struct icmpmsg_mib *icmpmsg_statistics; 9563 struct proc_dir_entry *proc_net_devsnmp6; 9564 struct udp_mib *udp_stats_in6; 9565 struct udp_mib *udplite_stats_in6; 9566 struct ipstats_mib *ipv6_statistics; 9567 struct icmpv6_mib *icmpv6_statistics; 9568 struct icmpv6msg_mib *icmpv6msg_statistics; 9569 struct linux_xfrm_mib *xfrm_statistics; 9570 struct linux_tls_mib *tls_statistics; 9571 struct mptcp_mib *mptcp_statistics; 9572 }; 9573 9574 struct netns_packet { 9575 struct mutex sklist_lock; 9576 struct hlist_head sklist; 9577 }; 9578 9579 struct netns_unix { 9580 int sysctl_max_dgram_qlen; 9581 struct ctl_table_header *ctl; 9582 }; 9583 9584 struct netns_nexthop { 9585 struct rb_root rb_root; 9586 struct hlist_head *devhash; 9587 unsigned int seq; 9588 u32 last_id_allocated; 9589 struct blocking_notifier_head notifier_chain; 9590 }; 9591 9592 struct local_ports { 9593 seqlock_t lock; 9594 int range[2]; 9595 bool warned; 9596 }; 9597 9598 struct inet_hashinfo; 9599 9600 struct inet_timewait_death_row { 9601 atomic_t tw_count; 9602 long: 32; 9603 long: 64; 9604 long: 64; 9605 long: 64; 9606 long: 64; 9607 long: 64; 9608 long: 64; 9609 long: 64; 9610 struct inet_hashinfo *hashinfo; 9611 int sysctl_max_tw_buckets; 9612 long: 32; 9613 long: 64; 9614 long: 64; 9615 long: 64; 9616 long: 64; 9617 long: 64; 9618 long: 64; 9619 }; 9620 9621 struct ping_group_range { 9622 seqlock_t lock; 9623 kgid_t range[2]; 9624 }; 9625 9626 typedef struct { 9627 u64 key[2]; 9628 } siphash_key_t; 9629 9630 struct ipv4_devconf; 9631 9632 struct ip_ra_chain; 9633 9634 struct fib_rules_ops; 9635 9636 struct fib_table; 9637 9638 struct inet_peer_base; 9639 9640 struct fqdir; 9641 9642 struct xt_table; 9643 9644 struct tcp_congestion_ops; 9645 9646 struct tcp_fastopen_context; 9647 9648 struct fib_notifier_ops; 9649 9650 struct netns_ipv4 { 9651 struct ctl_table_header *forw_hdr; 9652 struct ctl_table_header *frags_hdr; 9653 struct ctl_table_header *ipv4_hdr; 9654 struct ctl_table_header *route_hdr; 9655 struct ctl_table_header *xfrm4_hdr; 9656 struct ipv4_devconf *devconf_all; 9657 struct ipv4_devconf *devconf_dflt; 9658 struct ip_ra_chain *ra_chain; 9659 struct mutex ra_mutex; 9660 struct fib_rules_ops *rules_ops; 9661 bool fib_has_custom_rules; 9662 unsigned int fib_rules_require_fldissect; 9663 struct fib_table *fib_main; 9664 struct fib_table *fib_default; 9665 bool fib_has_custom_local_routes; 9666 int fib_num_tclassid_users; 9667 struct hlist_head *fib_table_hash; 9668 bool fib_offload_disabled; 9669 struct sock *fibnl; 9670 struct sock **icmp_sk; 9671 struct sock *mc_autojoin_sk; 9672 struct inet_peer_base *peers; 9673 struct sock **tcp_sk; 9674 struct fqdir *fqdir; 9675 struct xt_table *iptable_filter; 9676 struct xt_table *iptable_mangle; 9677 struct xt_table *iptable_raw; 9678 struct xt_table *arptable_filter; 9679 struct xt_table *iptable_security; 9680 struct xt_table *nat_table; 9681 int sysctl_icmp_echo_ignore_all; 9682 int sysctl_icmp_echo_ignore_broadcasts; 9683 int sysctl_icmp_ignore_bogus_error_responses; 9684 int sysctl_icmp_ratelimit; 9685 int sysctl_icmp_ratemask; 9686 int sysctl_icmp_errors_use_inbound_ifaddr; 9687 struct local_ports ip_local_ports; 9688 int sysctl_tcp_ecn; 9689 int sysctl_tcp_ecn_fallback; 9690 int sysctl_ip_default_ttl; 9691 int sysctl_ip_no_pmtu_disc; 9692 int sysctl_ip_fwd_use_pmtu; 9693 int sysctl_ip_fwd_update_priority; 9694 int sysctl_ip_nonlocal_bind; 9695 int sysctl_ip_autobind_reuse; 9696 int sysctl_ip_dynaddr; 9697 int sysctl_ip_early_demux; 9698 int sysctl_raw_l3mdev_accept; 9699 int sysctl_tcp_early_demux; 9700 int sysctl_udp_early_demux; 9701 int sysctl_nexthop_compat_mode; 9702 int sysctl_fwmark_reflect; 9703 int sysctl_tcp_fwmark_accept; 9704 int sysctl_tcp_l3mdev_accept; 9705 int sysctl_tcp_mtu_probing; 9706 int sysctl_tcp_mtu_probe_floor; 9707 int sysctl_tcp_base_mss; 9708 int sysctl_tcp_min_snd_mss; 9709 int sysctl_tcp_probe_threshold; 9710 u32 sysctl_tcp_probe_interval; 9711 int sysctl_tcp_keepalive_time; 9712 int sysctl_tcp_keepalive_probes; 9713 int sysctl_tcp_keepalive_intvl; 9714 int sysctl_tcp_syn_retries; 9715 int sysctl_tcp_synack_retries; 9716 int sysctl_tcp_syncookies; 9717 int sysctl_tcp_reordering; 9718 int sysctl_tcp_retries1; 9719 int sysctl_tcp_retries2; 9720 int sysctl_tcp_orphan_retries; 9721 int sysctl_tcp_fin_timeout; 9722 unsigned int sysctl_tcp_notsent_lowat; 9723 int sysctl_tcp_tw_reuse; 9724 int sysctl_tcp_sack; 9725 int sysctl_tcp_window_scaling; 9726 int sysctl_tcp_timestamps; 9727 int sysctl_tcp_early_retrans; 9728 int sysctl_tcp_recovery; 9729 int sysctl_tcp_thin_linear_timeouts; 9730 int sysctl_tcp_slow_start_after_idle; 9731 int sysctl_tcp_retrans_collapse; 9732 int sysctl_tcp_stdurg; 9733 int sysctl_tcp_rfc1337; 9734 int sysctl_tcp_abort_on_overflow; 9735 int sysctl_tcp_fack; 9736 int sysctl_tcp_max_reordering; 9737 int sysctl_tcp_dsack; 9738 int sysctl_tcp_app_win; 9739 int sysctl_tcp_adv_win_scale; 9740 int sysctl_tcp_frto; 9741 int sysctl_tcp_nometrics_save; 9742 int sysctl_tcp_no_ssthresh_metrics_save; 9743 int sysctl_tcp_moderate_rcvbuf; 9744 int sysctl_tcp_tso_win_divisor; 9745 int sysctl_tcp_workaround_signed_windows; 9746 int sysctl_tcp_limit_output_bytes; 9747 int sysctl_tcp_challenge_ack_limit; 9748 int sysctl_tcp_min_tso_segs; 9749 int sysctl_tcp_min_rtt_wlen; 9750 int sysctl_tcp_autocorking; 9751 int sysctl_tcp_invalid_ratelimit; 9752 int sysctl_tcp_pacing_ss_ratio; 9753 int sysctl_tcp_pacing_ca_ratio; 9754 int sysctl_tcp_wmem[3]; 9755 int sysctl_tcp_rmem[3]; 9756 int sysctl_tcp_comp_sack_nr; 9757 long unsigned int sysctl_tcp_comp_sack_delay_ns; 9758 long unsigned int sysctl_tcp_comp_sack_slack_ns; 9759 long: 64; 9760 long: 64; 9761 long: 64; 9762 long: 64; 9763 long: 64; 9764 struct inet_timewait_death_row tcp_death_row; 9765 int sysctl_max_syn_backlog; 9766 int sysctl_tcp_fastopen; 9767 const struct tcp_congestion_ops *tcp_congestion_control; 9768 struct tcp_fastopen_context *tcp_fastopen_ctx; 9769 spinlock_t tcp_fastopen_ctx_lock; 9770 unsigned int sysctl_tcp_fastopen_blackhole_timeout; 9771 atomic_t tfo_active_disable_times; 9772 long unsigned int tfo_active_disable_stamp; 9773 int sysctl_tcp_reflect_tos; 9774 int sysctl_udp_wmem_min; 9775 int sysctl_udp_rmem_min; 9776 int sysctl_udp_l3mdev_accept; 9777 int sysctl_igmp_max_memberships; 9778 int sysctl_igmp_max_msf; 9779 int sysctl_igmp_llm_reports; 9780 int sysctl_igmp_qrv; 9781 struct ping_group_range ping_group_range; 9782 atomic_t dev_addr_genid; 9783 long unsigned int *sysctl_local_reserved_ports; 9784 int sysctl_ip_prot_sock; 9785 struct list_head mr_tables; 9786 struct fib_rules_ops *mr_rules_ops; 9787 int sysctl_fib_multipath_use_neigh; 9788 int sysctl_fib_multipath_hash_policy; 9789 struct fib_notifier_ops *notifier_ops; 9790 unsigned int fib_seq; 9791 struct fib_notifier_ops *ipmr_notifier_ops; 9792 unsigned int ipmr_seq; 9793 atomic_t rt_genid; 9794 siphash_key_t ip_id_key; 9795 long: 64; 9796 long: 64; 9797 long: 64; 9798 long: 64; 9799 long: 64; 9800 long: 64; 9801 long: 64; 9802 }; 9803 9804 struct netns_sysctl_ipv6 { 9805 struct ctl_table_header *hdr; 9806 struct ctl_table_header *route_hdr; 9807 struct ctl_table_header *icmp_hdr; 9808 struct ctl_table_header *frags_hdr; 9809 struct ctl_table_header *xfrm6_hdr; 9810 int bindv6only; 9811 int flush_delay; 9812 int ip6_rt_max_size; 9813 int ip6_rt_gc_min_interval; 9814 int ip6_rt_gc_timeout; 9815 int ip6_rt_gc_interval; 9816 int ip6_rt_gc_elasticity; 9817 int ip6_rt_mtu_expires; 9818 int ip6_rt_min_advmss; 9819 int multipath_hash_policy; 9820 int flowlabel_consistency; 9821 int auto_flowlabels; 9822 int icmpv6_time; 9823 int icmpv6_echo_ignore_all; 9824 int icmpv6_echo_ignore_multicast; 9825 int icmpv6_echo_ignore_anycast; 9826 long unsigned int icmpv6_ratemask[4]; 9827 long unsigned int *icmpv6_ratemask_ptr; 9828 int anycast_src_echo_reply; 9829 int ip_nonlocal_bind; 9830 int fwmark_reflect; 9831 int idgen_retries; 9832 int idgen_delay; 9833 int flowlabel_state_ranges; 9834 int flowlabel_reflect; 9835 int max_dst_opts_cnt; 9836 int max_hbh_opts_cnt; 9837 int max_dst_opts_len; 9838 int max_hbh_opts_len; 9839 int seg6_flowlabel; 9840 bool skip_notify_on_dev_down; 9841 }; 9842 9843 struct neighbour; 9844 9845 struct dst_ops { 9846 short unsigned int family; 9847 unsigned int gc_thresh; 9848 int (*gc)(struct dst_ops *); 9849 struct dst_entry * (*check)(struct dst_entry *, __u32); 9850 unsigned int (*default_advmss)(const struct dst_entry *); 9851 unsigned int (*mtu)(const struct dst_entry *); 9852 u32 * (*cow_metrics)(struct dst_entry *, long unsigned int); 9853 void (*destroy)(struct dst_entry *); 9854 void (*ifdown)(struct dst_entry *, struct net_device *, int); 9855 struct dst_entry * (*negative_advice)(struct dst_entry *); 9856 void (*link_failure)(struct sk_buff *); 9857 void (*update_pmtu)(struct dst_entry *, struct sock *, struct sk_buff *, u32, bool); 9858 void (*redirect)(struct dst_entry *, struct sock *, struct sk_buff *); 9859 int (*local_out)(struct net *, struct sock *, struct sk_buff *); 9860 struct neighbour * (*neigh_lookup)(const struct dst_entry *, struct sk_buff *, const void *); 9861 void (*confirm_neigh)(const struct dst_entry *, const void *); 9862 struct kmem_cache *kmem_cachep; 9863 struct percpu_counter pcpuc_entries; 9864 long: 64; 9865 long: 64; 9866 long: 64; 9867 }; 9868 9869 struct ipv6_devconf; 9870 9871 struct fib6_info; 9872 9873 struct rt6_info; 9874 9875 struct rt6_statistics; 9876 9877 struct fib6_table; 9878 9879 struct seg6_pernet_data; 9880 9881 struct netns_ipv6 { 9882 struct netns_sysctl_ipv6 sysctl; 9883 struct ipv6_devconf *devconf_all; 9884 struct ipv6_devconf *devconf_dflt; 9885 struct inet_peer_base *peers; 9886 struct fqdir *fqdir; 9887 struct xt_table *ip6table_filter; 9888 struct xt_table *ip6table_mangle; 9889 struct xt_table *ip6table_raw; 9890 struct xt_table *ip6table_security; 9891 struct xt_table *ip6table_nat; 9892 struct fib6_info *fib6_null_entry; 9893 struct rt6_info *ip6_null_entry; 9894 struct rt6_statistics *rt6_stats; 9895 struct timer_list ip6_fib_timer; 9896 struct hlist_head *fib_table_hash; 9897 struct fib6_table *fib6_main_tbl; 9898 struct list_head fib6_walkers; 9899 long: 64; 9900 long: 64; 9901 struct dst_ops ip6_dst_ops; 9902 rwlock_t fib6_walker_lock; 9903 spinlock_t fib6_gc_lock; 9904 unsigned int ip6_rt_gc_expire; 9905 long unsigned int ip6_rt_last_gc; 9906 unsigned int fib6_rules_require_fldissect; 9907 bool fib6_has_custom_rules; 9908 unsigned int fib6_routes_require_src; 9909 struct rt6_info *ip6_prohibit_entry; 9910 struct rt6_info *ip6_blk_hole_entry; 9911 struct fib6_table *fib6_local_tbl; 9912 struct fib_rules_ops *fib6_rules_ops; 9913 struct sock **icmp_sk; 9914 struct sock *ndisc_sk; 9915 struct sock *tcp_sk; 9916 struct sock *igmp_sk; 9917 struct sock *mc_autojoin_sk; 9918 struct list_head mr6_tables; 9919 struct fib_rules_ops *mr6_rules_ops; 9920 atomic_t dev_addr_genid; 9921 atomic_t fib6_sernum; 9922 struct seg6_pernet_data *seg6_data; 9923 struct fib_notifier_ops *notifier_ops; 9924 struct fib_notifier_ops *ip6mr_notifier_ops; 9925 unsigned int ipmr_seq; 9926 struct { 9927 struct hlist_head head; 9928 spinlock_t lock; 9929 u32 seq; 9930 } ip6addrlbl_table; 9931 }; 9932 9933 struct netns_sysctl_lowpan { 9934 struct ctl_table_header *frags_hdr; 9935 }; 9936 9937 struct netns_ieee802154_lowpan { 9938 struct netns_sysctl_lowpan sysctl; 9939 struct fqdir *fqdir; 9940 }; 9941 9942 struct sctp_mib; 9943 9944 struct netns_sctp { 9945 struct sctp_mib *sctp_statistics; 9946 struct proc_dir_entry *proc_net_sctp; 9947 struct ctl_table_header *sysctl_header; 9948 struct sock *ctl_sock; 9949 struct sock *udp4_sock; 9950 struct sock *udp6_sock; 9951 int udp_port; 9952 int encap_port; 9953 struct list_head local_addr_list; 9954 struct list_head addr_waitq; 9955 struct timer_list addr_wq_timer; 9956 struct list_head auto_asconf_splist; 9957 spinlock_t addr_wq_lock; 9958 spinlock_t local_addr_lock; 9959 unsigned int rto_initial; 9960 unsigned int rto_min; 9961 unsigned int rto_max; 9962 int rto_alpha; 9963 int rto_beta; 9964 int max_burst; 9965 int cookie_preserve_enable; 9966 char *sctp_hmac_alg; 9967 unsigned int valid_cookie_life; 9968 unsigned int sack_timeout; 9969 unsigned int hb_interval; 9970 int max_retrans_association; 9971 int max_retrans_path; 9972 int max_retrans_init; 9973 int pf_retrans; 9974 int ps_retrans; 9975 int pf_enable; 9976 int pf_expose; 9977 int sndbuf_policy; 9978 int rcvbuf_policy; 9979 int default_auto_asconf; 9980 int addip_enable; 9981 int addip_noauth; 9982 int prsctp_enable; 9983 int reconf_enable; 9984 int auth_enable; 9985 int intl_enable; 9986 int ecn_enable; 9987 int scope_policy; 9988 int rwnd_upd_shift; 9989 long unsigned int max_autoclose; 9990 }; 9991 9992 struct nf_queue_handler; 9993 9994 struct nf_logger; 9995 9996 struct nf_hook_entries; 9997 9998 struct netns_nf { 9999 struct proc_dir_entry *proc_netfilter; 10000 const struct nf_queue_handler *queue_handler; 10001 const struct nf_logger *nf_loggers[13]; 10002 struct ctl_table_header *nf_log_dir_header; 10003 struct nf_hook_entries *hooks_ipv4[5]; 10004 struct nf_hook_entries *hooks_ipv6[5]; 10005 struct nf_hook_entries *hooks_arp[3]; 10006 struct nf_hook_entries *hooks_bridge[5]; 10007 bool defrag_ipv4; 10008 bool defrag_ipv6; 10009 }; 10010 10011 struct ebt_table; 10012 10013 struct netns_xt { 10014 struct list_head tables[13]; 10015 bool notrack_deprecated_warning; 10016 bool clusterip_deprecated_warning; 10017 struct ebt_table *broute_table; 10018 struct ebt_table *frame_filter; 10019 struct ebt_table *frame_nat; 10020 }; 10021 10022 struct nf_generic_net { 10023 unsigned int timeout; 10024 }; 10025 10026 struct nf_tcp_net { 10027 unsigned int timeouts[14]; 10028 int tcp_loose; 10029 int tcp_be_liberal; 10030 int tcp_max_retrans; 10031 }; 10032 10033 struct nf_udp_net { 10034 unsigned int timeouts[2]; 10035 }; 10036 10037 struct nf_icmp_net { 10038 unsigned int timeout; 10039 }; 10040 10041 struct nf_dccp_net { 10042 int dccp_loose; 10043 unsigned int dccp_timeout[10]; 10044 }; 10045 10046 struct nf_sctp_net { 10047 unsigned int timeouts[10]; 10048 }; 10049 10050 struct nf_gre_net { 10051 struct list_head keymap_list; 10052 unsigned int timeouts[2]; 10053 }; 10054 10055 struct nf_ip_net { 10056 struct nf_generic_net generic; 10057 struct nf_tcp_net tcp; 10058 struct nf_udp_net udp; 10059 struct nf_icmp_net icmp; 10060 struct nf_icmp_net icmpv6; 10061 struct nf_dccp_net dccp; 10062 struct nf_sctp_net sctp; 10063 struct nf_gre_net gre; 10064 }; 10065 10066 struct ct_pcpu; 10067 10068 struct ip_conntrack_stat; 10069 10070 struct nf_ct_event_notifier; 10071 10072 struct nf_exp_event_notifier; 10073 10074 struct netns_ct { 10075 atomic_t count; 10076 unsigned int expect_count; 10077 struct delayed_work ecache_dwork; 10078 bool ecache_dwork_pending; 10079 bool auto_assign_helper_warned; 10080 struct ctl_table_header *sysctl_header; 10081 unsigned int sysctl_log_invalid; 10082 int sysctl_events; 10083 int sysctl_acct; 10084 int sysctl_auto_assign_helper; 10085 int sysctl_tstamp; 10086 int sysctl_checksum; 10087 struct ct_pcpu *pcpu_lists; 10088 struct ip_conntrack_stat *stat; 10089 struct nf_ct_event_notifier *nf_conntrack_event_cb; 10090 struct nf_exp_event_notifier *nf_expect_event_cb; 10091 struct nf_ip_net nf_ct_proto; 10092 unsigned int labels_used; 10093 }; 10094 10095 struct netns_nftables { 10096 struct list_head tables; 10097 struct list_head commit_list; 10098 struct list_head module_list; 10099 struct list_head notify_list; 10100 struct mutex commit_mutex; 10101 unsigned int base_seq; 10102 u8 gencursor; 10103 u8 validate_state; 10104 }; 10105 10106 struct netns_nf_frag { 10107 struct fqdir *fqdir; 10108 }; 10109 10110 struct netns_bpf { 10111 struct bpf_prog_array *run_array[2]; 10112 struct bpf_prog *progs[2]; 10113 struct list_head links[2]; 10114 }; 10115 10116 struct xfrm_policy_hash { 10117 struct hlist_head *table; 10118 unsigned int hmask; 10119 u8 dbits4; 10120 u8 sbits4; 10121 u8 dbits6; 10122 u8 sbits6; 10123 }; 10124 10125 struct xfrm_policy_hthresh { 10126 struct work_struct work; 10127 seqlock_t lock; 10128 u8 lbits4; 10129 u8 rbits4; 10130 u8 lbits6; 10131 u8 rbits6; 10132 }; 10133 10134 struct netns_xfrm { 10135 struct list_head state_all; 10136 struct hlist_head *state_bydst; 10137 struct hlist_head *state_bysrc; 10138 struct hlist_head *state_byspi; 10139 unsigned int state_hmask; 10140 unsigned int state_num; 10141 struct work_struct state_hash_work; 10142 struct list_head policy_all; 10143 struct hlist_head *policy_byidx; 10144 unsigned int policy_idx_hmask; 10145 struct hlist_head policy_inexact[3]; 10146 struct xfrm_policy_hash policy_bydst[3]; 10147 unsigned int policy_count[6]; 10148 struct work_struct policy_hash_work; 10149 struct xfrm_policy_hthresh policy_hthresh; 10150 struct list_head inexact_bins; 10151 struct sock *nlsk; 10152 struct sock *nlsk_stash; 10153 u32 sysctl_aevent_etime; 10154 u32 sysctl_aevent_rseqth; 10155 int sysctl_larval_drop; 10156 u32 sysctl_acq_expires; 10157 struct ctl_table_header *sysctl_hdr; 10158 long: 64; 10159 long: 64; 10160 long: 64; 10161 long: 64; 10162 long: 64; 10163 struct dst_ops xfrm4_dst_ops; 10164 struct dst_ops xfrm6_dst_ops; 10165 spinlock_t xfrm_state_lock; 10166 seqcount_t xfrm_state_hash_generation; 10167 spinlock_t xfrm_policy_lock; 10168 struct mutex xfrm_cfg_mutex; 10169 long: 64; 10170 long: 64; 10171 }; 10172 10173 struct netns_ipvs; 10174 10175 struct mpls_route; 10176 10177 struct netns_mpls { 10178 int ip_ttl_propagate; 10179 int default_ttl; 10180 size_t platform_labels; 10181 struct mpls_route **platform_label; 10182 struct ctl_table_header *ctl; 10183 }; 10184 10185 struct can_dev_rcv_lists; 10186 10187 struct can_pkg_stats; 10188 10189 struct can_rcv_lists_stats; 10190 10191 struct netns_can { 10192 struct proc_dir_entry *proc_dir; 10193 struct proc_dir_entry *pde_stats; 10194 struct proc_dir_entry *pde_reset_stats; 10195 struct proc_dir_entry *pde_rcvlist_all; 10196 struct proc_dir_entry *pde_rcvlist_fil; 10197 struct proc_dir_entry *pde_rcvlist_inv; 10198 struct proc_dir_entry *pde_rcvlist_sff; 10199 struct proc_dir_entry *pde_rcvlist_eff; 10200 struct proc_dir_entry *pde_rcvlist_err; 10201 struct proc_dir_entry *bcmproc_dir; 10202 struct can_dev_rcv_lists *rx_alldev_list; 10203 spinlock_t rcvlists_lock; 10204 struct timer_list stattimer; 10205 struct can_pkg_stats *pkg_stats; 10206 struct can_rcv_lists_stats *rcv_lists_stats; 10207 struct hlist_head cgw_list; 10208 }; 10209 10210 struct netns_xdp { 10211 struct mutex lock; 10212 struct hlist_head list; 10213 }; 10214 10215 struct uevent_sock; 10216 10217 struct net_generic; 10218 10219 struct net { 10220 refcount_t passive; 10221 spinlock_t rules_mod_lock; 10222 unsigned int dev_unreg_count; 10223 unsigned int dev_base_seq; 10224 int ifindex; 10225 spinlock_t nsid_lock; 10226 atomic_t fnhe_genid; 10227 struct list_head list; 10228 struct list_head exit_list; 10229 struct llist_node cleanup_list; 10230 struct key_tag *key_domain; 10231 struct user_namespace *user_ns; 10232 struct ucounts *ucounts; 10233 struct idr netns_ids; 10234 struct ns_common ns; 10235 struct list_head dev_base_head; 10236 struct proc_dir_entry *proc_net; 10237 struct proc_dir_entry *proc_net_stat; 10238 struct ctl_table_set sysctls; 10239 struct sock *rtnl; 10240 struct sock *genl_sock; 10241 struct uevent_sock *uevent_sock; 10242 struct hlist_head *dev_name_head; 10243 struct hlist_head *dev_index_head; 10244 struct raw_notifier_head netdev_chain; 10245 u32 hash_mix; 10246 struct net_device *loopback_dev; 10247 struct list_head rules_ops; 10248 struct netns_core core; 10249 struct netns_mib mib; 10250 struct netns_packet packet; 10251 struct netns_unix unx; 10252 struct netns_nexthop nexthop; 10253 struct netns_ipv4 ipv4; 10254 struct netns_ipv6 ipv6; 10255 struct netns_ieee802154_lowpan ieee802154_lowpan; 10256 struct netns_sctp sctp; 10257 struct netns_nf nf; 10258 struct netns_xt xt; 10259 struct netns_ct ct; 10260 struct netns_nftables nft; 10261 struct netns_nf_frag nf_frag; 10262 struct ctl_table_header *nf_frag_frags_hdr; 10263 struct sock *nfnl; 10264 struct sock *nfnl_stash; 10265 struct sk_buff_head wext_nlevents; 10266 struct net_generic *gen; 10267 struct netns_bpf bpf; 10268 long: 64; 10269 long: 64; 10270 long: 64; 10271 long: 64; 10272 long: 64; 10273 struct netns_xfrm xfrm; 10274 atomic64_t net_cookie; 10275 struct netns_ipvs *ipvs; 10276 struct netns_mpls mpls; 10277 struct netns_can can; 10278 struct netns_xdp xdp; 10279 struct sock *crypto_nlsk; 10280 struct sock *diag_nlsk; 10281 long: 64; 10282 long: 64; 10283 long: 64; 10284 long: 64; 10285 long: 64; 10286 long: 64; 10287 long: 64; 10288 }; 10289 10290 typedef struct { 10291 local64_t v; 10292 } u64_stats_t; 10293 10294 struct bpf_insn { 10295 __u8 code; 10296 __u8 dst_reg: 4; 10297 __u8 src_reg: 4; 10298 __s16 off; 10299 __s32 imm; 10300 }; 10301 10302 enum bpf_map_type { 10303 BPF_MAP_TYPE_UNSPEC = 0, 10304 BPF_MAP_TYPE_HASH = 1, 10305 BPF_MAP_TYPE_ARRAY = 2, 10306 BPF_MAP_TYPE_PROG_ARRAY = 3, 10307 BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, 10308 BPF_MAP_TYPE_PERCPU_HASH = 5, 10309 BPF_MAP_TYPE_PERCPU_ARRAY = 6, 10310 BPF_MAP_TYPE_STACK_TRACE = 7, 10311 BPF_MAP_TYPE_CGROUP_ARRAY = 8, 10312 BPF_MAP_TYPE_LRU_HASH = 9, 10313 BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, 10314 BPF_MAP_TYPE_LPM_TRIE = 11, 10315 BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, 10316 BPF_MAP_TYPE_HASH_OF_MAPS = 13, 10317 BPF_MAP_TYPE_DEVMAP = 14, 10318 BPF_MAP_TYPE_SOCKMAP = 15, 10319 BPF_MAP_TYPE_CPUMAP = 16, 10320 BPF_MAP_TYPE_XSKMAP = 17, 10321 BPF_MAP_TYPE_SOCKHASH = 18, 10322 BPF_MAP_TYPE_CGROUP_STORAGE = 19, 10323 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, 10324 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 21, 10325 BPF_MAP_TYPE_QUEUE = 22, 10326 BPF_MAP_TYPE_STACK = 23, 10327 BPF_MAP_TYPE_SK_STORAGE = 24, 10328 BPF_MAP_TYPE_DEVMAP_HASH = 25, 10329 BPF_MAP_TYPE_STRUCT_OPS = 26, 10330 BPF_MAP_TYPE_RINGBUF = 27, 10331 BPF_MAP_TYPE_INODE_STORAGE = 28, 10332 BPF_MAP_TYPE_TASK_STORAGE = 29, 10333 }; 10334 10335 enum bpf_prog_type { 10336 BPF_PROG_TYPE_UNSPEC = 0, 10337 BPF_PROG_TYPE_SOCKET_FILTER = 1, 10338 BPF_PROG_TYPE_KPROBE = 2, 10339 BPF_PROG_TYPE_SCHED_CLS = 3, 10340 BPF_PROG_TYPE_SCHED_ACT = 4, 10341 BPF_PROG_TYPE_TRACEPOINT = 5, 10342 BPF_PROG_TYPE_XDP = 6, 10343 BPF_PROG_TYPE_PERF_EVENT = 7, 10344 BPF_PROG_TYPE_CGROUP_SKB = 8, 10345 BPF_PROG_TYPE_CGROUP_SOCK = 9, 10346 BPF_PROG_TYPE_LWT_IN = 10, 10347 BPF_PROG_TYPE_LWT_OUT = 11, 10348 BPF_PROG_TYPE_LWT_XMIT = 12, 10349 BPF_PROG_TYPE_SOCK_OPS = 13, 10350 BPF_PROG_TYPE_SK_SKB = 14, 10351 BPF_PROG_TYPE_CGROUP_DEVICE = 15, 10352 BPF_PROG_TYPE_SK_MSG = 16, 10353 BPF_PROG_TYPE_RAW_TRACEPOINT = 17, 10354 BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18, 10355 BPF_PROG_TYPE_LWT_SEG6LOCAL = 19, 10356 BPF_PROG_TYPE_LIRC_MODE2 = 20, 10357 BPF_PROG_TYPE_SK_REUSEPORT = 21, 10358 BPF_PROG_TYPE_FLOW_DISSECTOR = 22, 10359 BPF_PROG_TYPE_CGROUP_SYSCTL = 23, 10360 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24, 10361 BPF_PROG_TYPE_CGROUP_SOCKOPT = 25, 10362 BPF_PROG_TYPE_TRACING = 26, 10363 BPF_PROG_TYPE_STRUCT_OPS = 27, 10364 BPF_PROG_TYPE_EXT = 28, 10365 BPF_PROG_TYPE_LSM = 29, 10366 BPF_PROG_TYPE_SK_LOOKUP = 30, 10367 }; 10368 10369 enum bpf_attach_type { 10370 BPF_CGROUP_INET_INGRESS = 0, 10371 BPF_CGROUP_INET_EGRESS = 1, 10372 BPF_CGROUP_INET_SOCK_CREATE = 2, 10373 BPF_CGROUP_SOCK_OPS = 3, 10374 BPF_SK_SKB_STREAM_PARSER = 4, 10375 BPF_SK_SKB_STREAM_VERDICT = 5, 10376 BPF_CGROUP_DEVICE = 6, 10377 BPF_SK_MSG_VERDICT = 7, 10378 BPF_CGROUP_INET4_BIND = 8, 10379 BPF_CGROUP_INET6_BIND = 9, 10380 BPF_CGROUP_INET4_CONNECT = 10, 10381 BPF_CGROUP_INET6_CONNECT = 11, 10382 BPF_CGROUP_INET4_POST_BIND = 12, 10383 BPF_CGROUP_INET6_POST_BIND = 13, 10384 BPF_CGROUP_UDP4_SENDMSG = 14, 10385 BPF_CGROUP_UDP6_SENDMSG = 15, 10386 BPF_LIRC_MODE2 = 16, 10387 BPF_FLOW_DISSECTOR = 17, 10388 BPF_CGROUP_SYSCTL = 18, 10389 BPF_CGROUP_UDP4_RECVMSG = 19, 10390 BPF_CGROUP_UDP6_RECVMSG = 20, 10391 BPF_CGROUP_GETSOCKOPT = 21, 10392 BPF_CGROUP_SETSOCKOPT = 22, 10393 BPF_TRACE_RAW_TP = 23, 10394 BPF_TRACE_FENTRY = 24, 10395 BPF_TRACE_FEXIT = 25, 10396 BPF_MODIFY_RETURN = 26, 10397 BPF_LSM_MAC = 27, 10398 BPF_TRACE_ITER = 28, 10399 BPF_CGROUP_INET4_GETPEERNAME = 29, 10400 BPF_CGROUP_INET6_GETPEERNAME = 30, 10401 BPF_CGROUP_INET4_GETSOCKNAME = 31, 10402 BPF_CGROUP_INET6_GETSOCKNAME = 32, 10403 BPF_XDP_DEVMAP = 33, 10404 BPF_CGROUP_INET_SOCK_RELEASE = 34, 10405 BPF_XDP_CPUMAP = 35, 10406 BPF_SK_LOOKUP = 36, 10407 BPF_XDP = 37, 10408 __MAX_BPF_ATTACH_TYPE = 38, 10409 }; 10410 10411 union bpf_attr { 10412 struct { 10413 __u32 map_type; 10414 __u32 key_size; 10415 __u32 value_size; 10416 __u32 max_entries; 10417 __u32 map_flags; 10418 __u32 inner_map_fd; 10419 __u32 numa_node; 10420 char map_name[16]; 10421 __u32 map_ifindex; 10422 __u32 btf_fd; 10423 __u32 btf_key_type_id; 10424 __u32 btf_value_type_id; 10425 __u32 btf_vmlinux_value_type_id; 10426 }; 10427 struct { 10428 __u32 map_fd; 10429 __u64 key; 10430 union { 10431 __u64 value; 10432 __u64 next_key; 10433 }; 10434 __u64 flags; 10435 }; 10436 struct { 10437 __u64 in_batch; 10438 __u64 out_batch; 10439 __u64 keys; 10440 __u64 values; 10441 __u32 count; 10442 __u32 map_fd; 10443 __u64 elem_flags; 10444 __u64 flags; 10445 } batch; 10446 struct { 10447 __u32 prog_type; 10448 __u32 insn_cnt; 10449 __u64 insns; 10450 __u64 license; 10451 __u32 log_level; 10452 __u32 log_size; 10453 __u64 log_buf; 10454 __u32 kern_version; 10455 __u32 prog_flags; 10456 char prog_name[16]; 10457 __u32 prog_ifindex; 10458 __u32 expected_attach_type; 10459 __u32 prog_btf_fd; 10460 __u32 func_info_rec_size; 10461 __u64 func_info; 10462 __u32 func_info_cnt; 10463 __u32 line_info_rec_size; 10464 __u64 line_info; 10465 __u32 line_info_cnt; 10466 __u32 attach_btf_id; 10467 union { 10468 __u32 attach_prog_fd; 10469 __u32 attach_btf_obj_fd; 10470 }; 10471 }; 10472 struct { 10473 __u64 pathname; 10474 __u32 bpf_fd; 10475 __u32 file_flags; 10476 }; 10477 struct { 10478 __u32 target_fd; 10479 __u32 attach_bpf_fd; 10480 __u32 attach_type; 10481 __u32 attach_flags; 10482 __u32 replace_bpf_fd; 10483 }; 10484 struct { 10485 __u32 prog_fd; 10486 __u32 retval; 10487 __u32 data_size_in; 10488 __u32 data_size_out; 10489 __u64 data_in; 10490 __u64 data_out; 10491 __u32 repeat; 10492 __u32 duration; 10493 __u32 ctx_size_in; 10494 __u32 ctx_size_out; 10495 __u64 ctx_in; 10496 __u64 ctx_out; 10497 __u32 flags; 10498 __u32 cpu; 10499 } test; 10500 struct { 10501 union { 10502 __u32 start_id; 10503 __u32 prog_id; 10504 __u32 map_id; 10505 __u32 btf_id; 10506 __u32 link_id; 10507 }; 10508 __u32 next_id; 10509 __u32 open_flags; 10510 }; 10511 struct { 10512 __u32 bpf_fd; 10513 __u32 info_len; 10514 __u64 info; 10515 } info; 10516 struct { 10517 __u32 target_fd; 10518 __u32 attach_type; 10519 __u32 query_flags; 10520 __u32 attach_flags; 10521 __u64 prog_ids; 10522 __u32 prog_cnt; 10523 } query; 10524 struct { 10525 __u64 name; 10526 __u32 prog_fd; 10527 } raw_tracepoint; 10528 struct { 10529 __u64 btf; 10530 __u64 btf_log_buf; 10531 __u32 btf_size; 10532 __u32 btf_log_size; 10533 __u32 btf_log_level; 10534 }; 10535 struct { 10536 __u32 pid; 10537 __u32 fd; 10538 __u32 flags; 10539 __u32 buf_len; 10540 __u64 buf; 10541 __u32 prog_id; 10542 __u32 fd_type; 10543 __u64 probe_offset; 10544 __u64 probe_addr; 10545 } task_fd_query; 10546 struct { 10547 __u32 prog_fd; 10548 union { 10549 __u32 target_fd; 10550 __u32 target_ifindex; 10551 }; 10552 __u32 attach_type; 10553 __u32 flags; 10554 union { 10555 __u32 target_btf_id; 10556 struct { 10557 __u64 iter_info; 10558 __u32 iter_info_len; 10559 }; 10560 }; 10561 } link_create; 10562 struct { 10563 __u32 link_fd; 10564 __u32 new_prog_fd; 10565 __u32 flags; 10566 __u32 old_prog_fd; 10567 } link_update; 10568 struct { 10569 __u32 link_fd; 10570 } link_detach; 10571 struct { 10572 __u32 type; 10573 } enable_stats; 10574 struct { 10575 __u32 link_fd; 10576 __u32 flags; 10577 } iter_create; 10578 struct { 10579 __u32 prog_fd; 10580 __u32 map_fd; 10581 __u32 flags; 10582 } prog_bind_map; 10583 }; 10584 10585 struct bpf_func_info { 10586 __u32 insn_off; 10587 __u32 type_id; 10588 }; 10589 10590 struct bpf_line_info { 10591 __u32 insn_off; 10592 __u32 file_name_off; 10593 __u32 line_off; 10594 __u32 line_col; 10595 }; 10596 10597 struct bpf_iter_aux_info; 10598 10599 typedef int (*bpf_iter_init_seq_priv_t)(void *, struct bpf_iter_aux_info *); 10600 10601 struct bpf_map; 10602 10603 struct bpf_iter_aux_info { 10604 struct bpf_map *map; 10605 }; 10606 10607 typedef void (*bpf_iter_fini_seq_priv_t)(void *); 10608 10609 struct bpf_iter_seq_info { 10610 const struct seq_operations *seq_ops; 10611 bpf_iter_init_seq_priv_t init_seq_private; 10612 bpf_iter_fini_seq_priv_t fini_seq_private; 10613 u32 seq_priv_size; 10614 }; 10615 10616 struct btf; 10617 10618 struct btf_type; 10619 10620 struct bpf_prog_aux; 10621 10622 struct bpf_local_storage_map; 10623 10624 struct bpf_map_ops { 10625 int (*map_alloc_check)(union bpf_attr *); 10626 struct bpf_map * (*map_alloc)(union bpf_attr *); 10627 void (*map_release)(struct bpf_map *, struct file *); 10628 void (*map_free)(struct bpf_map *); 10629 int (*map_get_next_key)(struct bpf_map *, void *, void *); 10630 void (*map_release_uref)(struct bpf_map *); 10631 void * (*map_lookup_elem_sys_only)(struct bpf_map *, void *); 10632 int (*map_lookup_batch)(struct bpf_map *, const union bpf_attr *, union bpf_attr *); 10633 int (*map_lookup_and_delete_batch)(struct bpf_map *, const union bpf_attr *, union bpf_attr *); 10634 int (*map_update_batch)(struct bpf_map *, const union bpf_attr *, union bpf_attr *); 10635 int (*map_delete_batch)(struct bpf_map *, const union bpf_attr *, union bpf_attr *); 10636 void * (*map_lookup_elem)(struct bpf_map *, void *); 10637 int (*map_update_elem)(struct bpf_map *, void *, void *, u64); 10638 int (*map_delete_elem)(struct bpf_map *, void *); 10639 int (*map_push_elem)(struct bpf_map *, void *, u64); 10640 int (*map_pop_elem)(struct bpf_map *, void *); 10641 int (*map_peek_elem)(struct bpf_map *, void *); 10642 void * (*map_fd_get_ptr)(struct bpf_map *, struct file *, int); 10643 void (*map_fd_put_ptr)(void *); 10644 int (*map_gen_lookup)(struct bpf_map *, struct bpf_insn *); 10645 u32 (*map_fd_sys_lookup_elem)(void *); 10646 void (*map_seq_show_elem)(struct bpf_map *, void *, struct seq_file *); 10647 int (*map_check_btf)(const struct bpf_map *, const struct btf *, const struct btf_type *, const struct btf_type *); 10648 int (*map_poke_track)(struct bpf_map *, struct bpf_prog_aux *); 10649 void (*map_poke_untrack)(struct bpf_map *, struct bpf_prog_aux *); 10650 void (*map_poke_run)(struct bpf_map *, u32, struct bpf_prog *, struct bpf_prog *); 10651 int (*map_direct_value_addr)(const struct bpf_map *, u64 *, u32); 10652 int (*map_direct_value_meta)(const struct bpf_map *, u64, u32 *); 10653 int (*map_mmap)(struct bpf_map *, struct vm_area_struct *); 10654 __poll_t (*map_poll)(struct bpf_map *, struct file *, struct poll_table_struct *); 10655 int (*map_local_storage_charge)(struct bpf_local_storage_map *, void *, u32); 10656 void (*map_local_storage_uncharge)(struct bpf_local_storage_map *, void *, u32); 10657 struct bpf_local_storage ** (*map_owner_storage_ptr)(void *); 10658 bool (*map_meta_equal)(const struct bpf_map *, const struct bpf_map *); 10659 const char * const map_btf_name; 10660 int *map_btf_id; 10661 const struct bpf_iter_seq_info *iter_seq_info; 10662 }; 10663 10664 struct bpf_map { 10665 const struct bpf_map_ops *ops; 10666 struct bpf_map *inner_map_meta; 10667 void *security; 10668 enum bpf_map_type map_type; 10669 u32 key_size; 10670 u32 value_size; 10671 u32 max_entries; 10672 u32 map_flags; 10673 int spin_lock_off; 10674 u32 id; 10675 int numa_node; 10676 u32 btf_key_type_id; 10677 u32 btf_value_type_id; 10678 struct btf *btf; 10679 struct mem_cgroup *memcg; 10680 char name[16]; 10681 u32 btf_vmlinux_value_type_id; 10682 bool bypass_spec_v1; 10683 bool frozen; 10684 long: 16; 10685 long: 64; 10686 long: 64; 10687 long: 64; 10688 atomic64_t refcnt; 10689 atomic64_t usercnt; 10690 struct work_struct work; 10691 struct mutex freeze_mutex; 10692 u64 writecnt; 10693 long: 64; 10694 long: 64; 10695 long: 64; 10696 long: 64; 10697 long: 64; 10698 }; 10699 10700 struct btf_header { 10701 __u16 magic; 10702 __u8 version; 10703 __u8 flags; 10704 __u32 hdr_len; 10705 __u32 type_off; 10706 __u32 type_len; 10707 __u32 str_off; 10708 __u32 str_len; 10709 }; 10710 10711 struct btf { 10712 void *data; 10713 struct btf_type **types; 10714 u32 *resolved_ids; 10715 u32 *resolved_sizes; 10716 const char *strings; 10717 void *nohdr_data; 10718 struct btf_header hdr; 10719 u32 nr_types; 10720 u32 types_size; 10721 u32 data_size; 10722 refcount_t refcnt; 10723 u32 id; 10724 struct callback_head rcu; 10725 struct btf *base_btf; 10726 u32 start_id; 10727 u32 start_str_off; 10728 char name[56]; 10729 bool kernel_btf; 10730 }; 10731 10732 struct btf_type { 10733 __u32 name_off; 10734 __u32 info; 10735 union { 10736 __u32 size; 10737 __u32 type; 10738 }; 10739 }; 10740 10741 struct bpf_ksym { 10742 long unsigned int start; 10743 long unsigned int end; 10744 char name[128]; 10745 struct list_head lnode; 10746 struct latch_tree_node tnode; 10747 bool prog; 10748 }; 10749 10750 struct bpf_ctx_arg_aux; 10751 10752 struct bpf_trampoline; 10753 10754 struct bpf_jit_poke_descriptor; 10755 10756 struct bpf_prog_ops; 10757 10758 struct bpf_prog_offload; 10759 10760 struct bpf_func_info_aux; 10761 10762 struct bpf_prog_stats; 10763 10764 struct bpf_prog_aux { 10765 atomic64_t refcnt; 10766 u32 used_map_cnt; 10767 u32 max_ctx_offset; 10768 u32 max_pkt_offset; 10769 u32 max_tp_access; 10770 u32 stack_depth; 10771 u32 id; 10772 u32 func_cnt; 10773 u32 func_idx; 10774 u32 attach_btf_id; 10775 u32 ctx_arg_info_size; 10776 u32 max_rdonly_access; 10777 u32 max_rdwr_access; 10778 struct btf *attach_btf; 10779 const struct bpf_ctx_arg_aux *ctx_arg_info; 10780 struct mutex dst_mutex; 10781 struct bpf_prog *dst_prog; 10782 struct bpf_trampoline *dst_trampoline; 10783 enum bpf_prog_type saved_dst_prog_type; 10784 enum bpf_attach_type saved_dst_attach_type; 10785 bool verifier_zext; 10786 bool offload_requested; 10787 bool attach_btf_trace; 10788 bool func_proto_unreliable; 10789 bool sleepable; 10790 bool tail_call_reachable; 10791 struct hlist_node tramp_hlist; 10792 const struct btf_type *attach_func_proto; 10793 const char *attach_func_name; 10794 struct bpf_prog **func; 10795 void *jit_data; 10796 struct bpf_jit_poke_descriptor *poke_tab; 10797 u32 size_poke_tab; 10798 struct bpf_ksym ksym; 10799 const struct bpf_prog_ops *ops; 10800 struct bpf_map **used_maps; 10801 struct mutex used_maps_mutex; 10802 struct bpf_prog *prog; 10803 struct user_struct *user; 10804 u64 load_time; 10805 struct bpf_map *cgroup_storage[2]; 10806 char name[16]; 10807 void *security; 10808 struct bpf_prog_offload *offload; 10809 struct btf *btf; 10810 struct bpf_func_info *func_info; 10811 struct bpf_func_info_aux *func_info_aux; 10812 struct bpf_line_info *linfo; 10813 void **jited_linfo; 10814 u32 func_info_cnt; 10815 u32 nr_linfo; 10816 u32 linfo_idx; 10817 u32 num_exentries; 10818 struct exception_table_entry *extable; 10819 struct bpf_prog_stats *stats; 10820 union { 10821 struct work_struct work; 10822 struct callback_head rcu; 10823 }; 10824 }; 10825 10826 struct sock_filter { 10827 __u16 code; 10828 __u8 jt; 10829 __u8 jf; 10830 __u32 k; 10831 }; 10832 10833 struct sock_fprog_kern; 10834 10835 struct bpf_prog { 10836 u16 pages; 10837 u16 jited: 1; 10838 u16 jit_requested: 1; 10839 u16 gpl_compatible: 1; 10840 u16 cb_access: 1; 10841 u16 dst_needed: 1; 10842 u16 blinded: 1; 10843 u16 is_func: 1; 10844 u16 kprobe_override: 1; 10845 u16 has_callchain_buf: 1; 10846 u16 enforce_expected_attach_type: 1; 10847 u16 call_get_stack: 1; 10848 enum bpf_prog_type type; 10849 enum bpf_attach_type expected_attach_type; 10850 u32 len; 10851 u32 jited_len; 10852 u8 tag[8]; 10853 struct bpf_prog_aux *aux; 10854 struct sock_fprog_kern *orig_prog; 10855 unsigned int (*bpf_func)(const void *, const struct bpf_insn *); 10856 struct sock_filter insns[0]; 10857 struct bpf_insn insnsi[0]; 10858 }; 10859 10860 struct bpf_offloaded_map; 10861 10862 struct bpf_map_dev_ops { 10863 int (*map_get_next_key)(struct bpf_offloaded_map *, void *, void *); 10864 int (*map_lookup_elem)(struct bpf_offloaded_map *, void *, void *); 10865 int (*map_update_elem)(struct bpf_offloaded_map *, void *, void *, u64); 10866 int (*map_delete_elem)(struct bpf_offloaded_map *, void *); 10867 }; 10868 10869 struct bpf_offloaded_map { 10870 struct bpf_map map; 10871 struct net_device *netdev; 10872 const struct bpf_map_dev_ops *dev_ops; 10873 void *dev_priv; 10874 struct list_head offloads; 10875 long: 64; 10876 long: 64; 10877 long: 64; 10878 }; 10879 10880 struct net_device_stats { 10881 long unsigned int rx_packets; 10882 long unsigned int tx_packets; 10883 long unsigned int rx_bytes; 10884 long unsigned int tx_bytes; 10885 long unsigned int rx_errors; 10886 long unsigned int tx_errors; 10887 long unsigned int rx_dropped; 10888 long unsigned int tx_dropped; 10889 long unsigned int multicast; 10890 long unsigned int collisions; 10891 long unsigned int rx_length_errors; 10892 long unsigned int rx_over_errors; 10893 long unsigned int rx_crc_errors; 10894 long unsigned int rx_frame_errors; 10895 long unsigned int rx_fifo_errors; 10896 long unsigned int rx_missed_errors; 10897 long unsigned int tx_aborted_errors; 10898 long unsigned int tx_carrier_errors; 10899 long unsigned int tx_fifo_errors; 10900 long unsigned int tx_heartbeat_errors; 10901 long unsigned int tx_window_errors; 10902 long unsigned int rx_compressed; 10903 long unsigned int tx_compressed; 10904 }; 10905 10906 struct netdev_hw_addr_list { 10907 struct list_head list; 10908 int count; 10909 }; 10910 10911 struct tipc_bearer; 10912 10913 struct mpls_dev; 10914 10915 enum rx_handler_result { 10916 RX_HANDLER_CONSUMED = 0, 10917 RX_HANDLER_ANOTHER = 1, 10918 RX_HANDLER_EXACT = 2, 10919 RX_HANDLER_PASS = 3, 10920 }; 10921 10922 typedef enum rx_handler_result rx_handler_result_t; 10923 10924 typedef rx_handler_result_t rx_handler_func_t(struct sk_buff **); 10925 10926 enum netdev_ml_priv_type { 10927 ML_PRIV_NONE = 0, 10928 ML_PRIV_CAN = 1, 10929 }; 10930 10931 struct pcpu_dstats; 10932 10933 struct garp_port; 10934 10935 struct mrp_port; 10936 10937 struct netdev_tc_txq { 10938 u16 count; 10939 u16 offset; 10940 }; 10941 10942 struct macsec_ops; 10943 10944 struct udp_tunnel_nic; 10945 10946 struct bpf_xdp_link; 10947 10948 struct bpf_xdp_entity { 10949 struct bpf_prog *prog; 10950 struct bpf_xdp_link *link; 10951 }; 10952 10953 struct netdev_name_node; 10954 10955 struct dev_ifalias; 10956 10957 struct iw_handler_def; 10958 10959 struct iw_public_data; 10960 10961 struct net_device_ops; 10962 10963 struct ethtool_ops; 10964 10965 struct l3mdev_ops; 10966 10967 struct ndisc_ops; 10968 10969 struct xfrmdev_ops; 10970 10971 struct tlsdev_ops; 10972 10973 struct header_ops; 10974 10975 struct vlan_info; 10976 10977 struct dsa_port; 10978 10979 struct in_device; 10980 10981 struct inet6_dev; 10982 10983 struct wireless_dev; 10984 10985 struct wpan_dev; 10986 10987 struct netdev_rx_queue; 10988 10989 struct mini_Qdisc; 10990 10991 struct netdev_queue; 10992 10993 struct cpu_rmap; 10994 10995 struct Qdisc; 10996 10997 struct xdp_dev_bulk_queue; 10998 10999 struct xps_dev_maps; 11000 11001 struct netpoll_info; 11002 11003 struct pcpu_lstats; 11004 11005 struct pcpu_sw_netstats; 11006 11007 struct rtnl_link_ops; 11008 11009 struct dcbnl_rtnl_ops; 11010 11011 struct netprio_map; 11012 11013 struct phy_device; 11014 11015 struct sfp_bus; 11016 11017 struct udp_tunnel_nic_info; 11018 11019 struct net_device { 11020 char name[16]; 11021 struct netdev_name_node *name_node; 11022 struct dev_ifalias *ifalias; 11023 long unsigned int mem_end; 11024 long unsigned int mem_start; 11025 long unsigned int base_addr; 11026 int irq; 11027 long unsigned int state; 11028 struct list_head dev_list; 11029 struct list_head napi_list; 11030 struct list_head unreg_list; 11031 struct list_head close_list; 11032 struct list_head ptype_all; 11033 struct list_head ptype_specific; 11034 struct { 11035 struct list_head upper; 11036 struct list_head lower; 11037 } adj_list; 11038 netdev_features_t features; 11039 netdev_features_t hw_features; 11040 netdev_features_t wanted_features; 11041 netdev_features_t vlan_features; 11042 netdev_features_t hw_enc_features; 11043 netdev_features_t mpls_features; 11044 netdev_features_t gso_partial_features; 11045 int ifindex; 11046 int group; 11047 struct net_device_stats stats; 11048 atomic_long_t rx_dropped; 11049 atomic_long_t tx_dropped; 11050 atomic_long_t rx_nohandler; 11051 atomic_t carrier_up_count; 11052 atomic_t carrier_down_count; 11053 const struct iw_handler_def *wireless_handlers; 11054 struct iw_public_data *wireless_data; 11055 const struct net_device_ops *netdev_ops; 11056 const struct ethtool_ops *ethtool_ops; 11057 const struct l3mdev_ops *l3mdev_ops; 11058 const struct ndisc_ops *ndisc_ops; 11059 const struct xfrmdev_ops *xfrmdev_ops; 11060 const struct tlsdev_ops *tlsdev_ops; 11061 const struct header_ops *header_ops; 11062 unsigned int flags; 11063 unsigned int priv_flags; 11064 short unsigned int gflags; 11065 short unsigned int padded; 11066 unsigned char operstate; 11067 unsigned char link_mode; 11068 unsigned char if_port; 11069 unsigned char dma; 11070 unsigned int mtu; 11071 unsigned int min_mtu; 11072 unsigned int max_mtu; 11073 short unsigned int type; 11074 short unsigned int hard_header_len; 11075 unsigned char min_header_len; 11076 unsigned char name_assign_type; 11077 short unsigned int needed_headroom; 11078 short unsigned int needed_tailroom; 11079 unsigned char perm_addr[32]; 11080 unsigned char addr_assign_type; 11081 unsigned char addr_len; 11082 unsigned char upper_level; 11083 unsigned char lower_level; 11084 short unsigned int neigh_priv_len; 11085 short unsigned int dev_id; 11086 short unsigned int dev_port; 11087 spinlock_t addr_list_lock; 11088 struct netdev_hw_addr_list uc; 11089 struct netdev_hw_addr_list mc; 11090 struct netdev_hw_addr_list dev_addrs; 11091 struct kset *queues_kset; 11092 unsigned int promiscuity; 11093 unsigned int allmulti; 11094 bool uc_promisc; 11095 struct vlan_info *vlan_info; 11096 struct dsa_port *dsa_ptr; 11097 struct tipc_bearer *tipc_ptr; 11098 void *atalk_ptr; 11099 struct in_device *ip_ptr; 11100 struct inet6_dev *ip6_ptr; 11101 void *ax25_ptr; 11102 struct wireless_dev *ieee80211_ptr; 11103 struct wpan_dev *ieee802154_ptr; 11104 struct mpls_dev *mpls_ptr; 11105 unsigned char *dev_addr; 11106 struct netdev_rx_queue *_rx; 11107 unsigned int num_rx_queues; 11108 unsigned int real_num_rx_queues; 11109 struct bpf_prog *xdp_prog; 11110 long unsigned int gro_flush_timeout; 11111 int napi_defer_hard_irqs; 11112 rx_handler_func_t *rx_handler; 11113 void *rx_handler_data; 11114 struct mini_Qdisc *miniq_ingress; 11115 struct netdev_queue *ingress_queue; 11116 struct nf_hook_entries *nf_hooks_ingress; 11117 unsigned char broadcast[32]; 11118 struct cpu_rmap *rx_cpu_rmap; 11119 struct hlist_node index_hlist; 11120 struct netdev_queue *_tx; 11121 unsigned int num_tx_queues; 11122 unsigned int real_num_tx_queues; 11123 struct Qdisc *qdisc; 11124 unsigned int tx_queue_len; 11125 spinlock_t tx_global_lock; 11126 struct xdp_dev_bulk_queue *xdp_bulkq; 11127 struct xps_dev_maps *xps_cpus_map; 11128 struct xps_dev_maps *xps_rxqs_map; 11129 struct mini_Qdisc *miniq_egress; 11130 struct hlist_head qdisc_hash[16]; 11131 struct timer_list watchdog_timer; 11132 int watchdog_timeo; 11133 u32 proto_down_reason; 11134 struct list_head todo_list; 11135 int *pcpu_refcnt; 11136 struct list_head link_watch_list; 11137 enum { 11138 NETREG_UNINITIALIZED = 0, 11139 NETREG_REGISTERED = 1, 11140 NETREG_UNREGISTERING = 2, 11141 NETREG_UNREGISTERED = 3, 11142 NETREG_RELEASED = 4, 11143 NETREG_DUMMY = 5, 11144 } reg_state: 8; 11145 bool dismantle; 11146 enum { 11147 RTNL_LINK_INITIALIZED = 0, 11148 RTNL_LINK_INITIALIZING = 1, 11149 } rtnl_link_state: 16; 11150 bool needs_free_netdev; 11151 void (*priv_destructor)(struct net_device *); 11152 struct netpoll_info *npinfo; 11153 possible_net_t nd_net; 11154 void *ml_priv; 11155 enum netdev_ml_priv_type ml_priv_type; 11156 union { 11157 struct pcpu_lstats *lstats; 11158 struct pcpu_sw_netstats *tstats; 11159 struct pcpu_dstats *dstats; 11160 }; 11161 struct garp_port *garp_port; 11162 struct mrp_port *mrp_port; 11163 struct device dev; 11164 const struct attribute_group *sysfs_groups[4]; 11165 const struct attribute_group *sysfs_rx_queue_group; 11166 const struct rtnl_link_ops *rtnl_link_ops; 11167 unsigned int gso_max_size; 11168 u16 gso_max_segs; 11169 const struct dcbnl_rtnl_ops *dcbnl_ops; 11170 s16 num_tc; 11171 struct netdev_tc_txq tc_to_txq[16]; 11172 u8 prio_tc_map[16]; 11173 unsigned int fcoe_ddp_xid; 11174 struct netprio_map *priomap; 11175 struct phy_device *phydev; 11176 struct sfp_bus *sfp_bus; 11177 struct lock_class_key *qdisc_tx_busylock; 11178 struct lock_class_key *qdisc_running_key; 11179 bool proto_down; 11180 unsigned int wol_enabled: 1; 11181 struct list_head net_notifier_list; 11182 const struct macsec_ops *macsec_ops; 11183 const struct udp_tunnel_nic_info *udp_tunnel_nic_info; 11184 struct udp_tunnel_nic *udp_tunnel_nic; 11185 struct bpf_xdp_entity xdp_state[3]; 11186 long: 64; 11187 long: 64; 11188 long: 64; 11189 long: 64; 11190 }; 11191 11192 enum bpf_reg_type { 11193 NOT_INIT = 0, 11194 SCALAR_VALUE = 1, 11195 PTR_TO_CTX = 2, 11196 CONST_PTR_TO_MAP = 3, 11197 PTR_TO_MAP_VALUE = 4, 11198 PTR_TO_MAP_VALUE_OR_NULL = 5, 11199 PTR_TO_STACK = 6, 11200 PTR_TO_PACKET_META = 7, 11201 PTR_TO_PACKET = 8, 11202 PTR_TO_PACKET_END = 9, 11203 PTR_TO_FLOW_KEYS = 10, 11204 PTR_TO_SOCKET = 11, 11205 PTR_TO_SOCKET_OR_NULL = 12, 11206 PTR_TO_SOCK_COMMON = 13, 11207 PTR_TO_SOCK_COMMON_OR_NULL = 14, 11208 PTR_TO_TCP_SOCK = 15, 11209 PTR_TO_TCP_SOCK_OR_NULL = 16, 11210 PTR_TO_TP_BUFFER = 17, 11211 PTR_TO_XDP_SOCK = 18, 11212 PTR_TO_BTF_ID = 19, 11213 PTR_TO_BTF_ID_OR_NULL = 20, 11214 PTR_TO_MEM = 21, 11215 PTR_TO_MEM_OR_NULL = 22, 11216 PTR_TO_RDONLY_BUF = 23, 11217 PTR_TO_RDONLY_BUF_OR_NULL = 24, 11218 PTR_TO_RDWR_BUF = 25, 11219 PTR_TO_RDWR_BUF_OR_NULL = 26, 11220 PTR_TO_PERCPU_BTF_ID = 27, 11221 }; 11222 11223 struct bpf_prog_ops { 11224 int (*test_run)(struct bpf_prog *, const union bpf_attr *, union bpf_attr *); 11225 }; 11226 11227 struct bpf_offload_dev; 11228 11229 struct bpf_prog_offload { 11230 struct bpf_prog *prog; 11231 struct net_device *netdev; 11232 struct bpf_offload_dev *offdev; 11233 void *dev_priv; 11234 struct list_head offloads; 11235 bool dev_state; 11236 bool opt_failed; 11237 void *jited_image; 11238 u32 jited_len; 11239 }; 11240 11241 struct bpf_prog_stats { 11242 u64 cnt; 11243 u64 nsecs; 11244 struct u64_stats_sync syncp; 11245 }; 11246 11247 struct btf_func_model { 11248 u8 ret_size; 11249 u8 nr_args; 11250 u8 arg_size[12]; 11251 }; 11252 11253 struct bpf_tramp_image { 11254 void *image; 11255 struct bpf_ksym ksym; 11256 struct percpu_ref pcref; 11257 void *ip_after_call; 11258 void *ip_epilogue; 11259 union { 11260 struct callback_head rcu; 11261 struct work_struct work; 11262 }; 11263 }; 11264 11265 struct bpf_trampoline { 11266 struct hlist_node hlist; 11267 struct mutex mutex; 11268 refcount_t refcnt; 11269 u64 key; 11270 struct { 11271 struct btf_func_model model; 11272 void *addr; 11273 bool ftrace_managed; 11274 } func; 11275 struct bpf_prog *extension_prog; 11276 struct hlist_head progs_hlist[3]; 11277 int progs_cnt[3]; 11278 struct bpf_tramp_image *cur_image; 11279 u64 selector; 11280 struct module *mod; 11281 }; 11282 11283 struct bpf_func_info_aux { 11284 u16 linkage; 11285 bool unreliable; 11286 }; 11287 11288 struct bpf_jit_poke_descriptor { 11289 void *tailcall_target; 11290 void *tailcall_bypass; 11291 void *bypass_addr; 11292 union { 11293 struct { 11294 struct bpf_map *map; 11295 u32 key; 11296 } tail_call; 11297 }; 11298 bool tailcall_target_stable; 11299 u8 adj_off; 11300 u16 reason; 11301 u32 insn_idx; 11302 }; 11303 11304 struct bpf_ctx_arg_aux { 11305 u32 offset; 11306 enum bpf_reg_type reg_type; 11307 u32 btf_id; 11308 }; 11309 11310 typedef unsigned int sk_buff_data_t; 11311 11312 struct skb_ext; 11313 11314 struct sk_buff { 11315 union { 11316 struct { 11317 struct sk_buff *next; 11318 struct sk_buff *prev; 11319 union { 11320 struct net_device *dev; 11321 long unsigned int dev_scratch; 11322 }; 11323 }; 11324 struct rb_node rbnode; 11325 struct list_head list; 11326 }; 11327 union { 11328 struct sock *sk; 11329 int ip_defrag_offset; 11330 }; 11331 union { 11332 ktime_t tstamp; 11333 u64 skb_mstamp_ns; 11334 }; 11335 char cb[48]; 11336 union { 11337 struct { 11338 long unsigned int _skb_refdst; 11339 void (*destructor)(struct sk_buff *); 11340 }; 11341 struct list_head tcp_tsorted_anchor; 11342 }; 11343 long unsigned int _nfct; 11344 unsigned int len; 11345 unsigned int data_len; 11346 __u16 mac_len; 11347 __u16 hdr_len; 11348 __u16 queue_mapping; 11349 __u8 __cloned_offset[0]; 11350 __u8 cloned: 1; 11351 __u8 nohdr: 1; 11352 __u8 fclone: 2; 11353 __u8 peeked: 1; 11354 __u8 head_frag: 1; 11355 __u8 pfmemalloc: 1; 11356 __u8 active_extensions; 11357 __u32 headers_start[0]; 11358 __u8 __pkt_type_offset[0]; 11359 __u8 pkt_type: 3; 11360 __u8 ignore_df: 1; 11361 __u8 nf_trace: 1; 11362 __u8 ip_summed: 2; 11363 __u8 ooo_okay: 1; 11364 __u8 l4_hash: 1; 11365 __u8 sw_hash: 1; 11366 __u8 wifi_acked_valid: 1; 11367 __u8 wifi_acked: 1; 11368 __u8 no_fcs: 1; 11369 __u8 encapsulation: 1; 11370 __u8 encap_hdr_csum: 1; 11371 __u8 csum_valid: 1; 11372 __u8 __pkt_vlan_present_offset[0]; 11373 __u8 vlan_present: 1; 11374 __u8 csum_complete_sw: 1; 11375 __u8 csum_level: 2; 11376 __u8 csum_not_inet: 1; 11377 __u8 dst_pending_confirm: 1; 11378 __u8 ndisc_nodetype: 2; 11379 __u8 ipvs_property: 1; 11380 __u8 inner_protocol_type: 1; 11381 __u8 remcsum_offload: 1; 11382 __u8 offload_fwd_mark: 1; 11383 __u8 offload_l3_fwd_mark: 1; 11384 __u8 tc_skip_classify: 1; 11385 __u8 tc_at_ingress: 1; 11386 __u8 redirected: 1; 11387 __u8 from_ingress: 1; 11388 __u8 decrypted: 1; 11389 __u16 tc_index; 11390 union { 11391 __wsum csum; 11392 struct { 11393 __u16 csum_start; 11394 __u16 csum_offset; 11395 }; 11396 }; 11397 __u32 priority; 11398 int skb_iif; 11399 __u32 hash; 11400 __be16 vlan_proto; 11401 __u16 vlan_tci; 11402 union { 11403 unsigned int napi_id; 11404 unsigned int sender_cpu; 11405 }; 11406 __u32 secmark; 11407 union { 11408 __u32 mark; 11409 __u32 reserved_tailroom; 11410 }; 11411 union { 11412 __be16 inner_protocol; 11413 __u8 inner_ipproto; 11414 }; 11415 __u16 inner_transport_header; 11416 __u16 inner_network_header; 11417 __u16 inner_mac_header; 11418 __be16 protocol; 11419 __u16 transport_header; 11420 __u16 network_header; 11421 __u16 mac_header; 11422 __u32 headers_end[0]; 11423 sk_buff_data_t tail; 11424 sk_buff_data_t end; 11425 unsigned char *head; 11426 unsigned char *data; 11427 unsigned int truesize; 11428 refcount_t users; 11429 struct skb_ext *extensions; 11430 }; 11431 11432 struct scatterlist { 11433 long unsigned int page_link; 11434 unsigned int offset; 11435 unsigned int length; 11436 dma_addr_t dma_address; 11437 unsigned int dma_length; 11438 }; 11439 11440 enum { 11441 Root_NFS = 255, 11442 Root_CIFS = 254, 11443 Root_RAM0 = 1048576, 11444 Root_RAM1 = 1048577, 11445 Root_FD0 = 2097152, 11446 Root_HDA1 = 3145729, 11447 Root_HDA2 = 3145730, 11448 Root_SDA1 = 8388609, 11449 Root_SDA2 = 8388610, 11450 Root_HDC1 = 23068673, 11451 Root_SR0 = 11534336, 11452 }; 11453 11454 struct flowi_tunnel { 11455 __be64 tun_id; 11456 }; 11457 11458 struct flowi_common { 11459 int flowic_oif; 11460 int flowic_iif; 11461 __u32 flowic_mark; 11462 __u8 flowic_tos; 11463 __u8 flowic_scope; 11464 __u8 flowic_proto; 11465 __u8 flowic_flags; 11466 __u32 flowic_secid; 11467 kuid_t flowic_uid; 11468 struct flowi_tunnel flowic_tun_key; 11469 __u32 flowic_multipath_hash; 11470 }; 11471 11472 union flowi_uli { 11473 struct { 11474 __be16 dport; 11475 __be16 sport; 11476 } ports; 11477 struct { 11478 __u8 type; 11479 __u8 code; 11480 } icmpt; 11481 struct { 11482 __le16 dport; 11483 __le16 sport; 11484 } dnports; 11485 __be32 spi; 11486 __be32 gre_key; 11487 struct { 11488 __u8 type; 11489 } mht; 11490 }; 11491 11492 struct flowi4 { 11493 struct flowi_common __fl_common; 11494 __be32 saddr; 11495 __be32 daddr; 11496 union flowi_uli uli; 11497 }; 11498 11499 struct flowi6 { 11500 struct flowi_common __fl_common; 11501 struct in6_addr daddr; 11502 struct in6_addr saddr; 11503 __be32 flowlabel; 11504 union flowi_uli uli; 11505 __u32 mp_hash; 11506 }; 11507 11508 struct flowidn { 11509 struct flowi_common __fl_common; 11510 __le16 daddr; 11511 __le16 saddr; 11512 union flowi_uli uli; 11513 }; 11514 11515 struct flowi { 11516 union { 11517 struct flowi_common __fl_common; 11518 struct flowi4 ip4; 11519 struct flowi6 ip6; 11520 struct flowidn dn; 11521 } u; 11522 }; 11523 11524 struct ipstats_mib { 11525 u64 mibs[37]; 11526 struct u64_stats_sync syncp; 11527 }; 11528 11529 struct icmp_mib { 11530 long unsigned int mibs[28]; 11531 }; 11532 11533 struct icmpmsg_mib { 11534 atomic_long_t mibs[512]; 11535 }; 11536 11537 struct icmpv6_mib { 11538 long unsigned int mibs[6]; 11539 }; 11540 11541 struct icmpv6_mib_device { 11542 atomic_long_t mibs[6]; 11543 }; 11544 11545 struct icmpv6msg_mib { 11546 atomic_long_t mibs[512]; 11547 }; 11548 11549 struct icmpv6msg_mib_device { 11550 atomic_long_t mibs[512]; 11551 }; 11552 11553 struct tcp_mib { 11554 long unsigned int mibs[16]; 11555 }; 11556 11557 struct udp_mib { 11558 long unsigned int mibs[10]; 11559 }; 11560 11561 struct linux_mib { 11562 long unsigned int mibs[124]; 11563 }; 11564 11565 struct linux_xfrm_mib { 11566 long unsigned int mibs[29]; 11567 }; 11568 11569 struct linux_tls_mib { 11570 long unsigned int mibs[11]; 11571 }; 11572 11573 struct inet_frags; 11574 11575 struct fqdir { 11576 long int high_thresh; 11577 long int low_thresh; 11578 int timeout; 11579 int max_dist; 11580 struct inet_frags *f; 11581 struct net *net; 11582 bool dead; 11583 long: 56; 11584 long: 64; 11585 long: 64; 11586 struct rhashtable rhashtable; 11587 long: 64; 11588 long: 64; 11589 long: 64; 11590 long: 64; 11591 long: 64; 11592 long: 64; 11593 long: 64; 11594 atomic_long_t mem; 11595 struct work_struct destroy_work; 11596 struct llist_node free_list; 11597 long: 64; 11598 long: 64; 11599 }; 11600 11601 struct inet_frag_queue; 11602 11603 struct inet_frags { 11604 unsigned int qsize; 11605 void (*constructor)(struct inet_frag_queue *, const void *); 11606 void (*destructor)(struct inet_frag_queue *); 11607 void (*frag_expire)(struct timer_list *); 11608 struct kmem_cache *frags_cachep; 11609 const char *frags_cache_name; 11610 struct rhashtable_params rhash_params; 11611 refcount_t refcnt; 11612 struct completion completion; 11613 }; 11614 11615 struct frag_v4_compare_key { 11616 __be32 saddr; 11617 __be32 daddr; 11618 u32 user; 11619 u32 vif; 11620 __be16 id; 11621 u16 protocol; 11622 }; 11623 11624 struct frag_v6_compare_key { 11625 struct in6_addr saddr; 11626 struct in6_addr daddr; 11627 u32 user; 11628 __be32 id; 11629 u32 iif; 11630 }; 11631 11632 struct inet_frag_queue { 11633 struct rhash_head node; 11634 union { 11635 struct frag_v4_compare_key v4; 11636 struct frag_v6_compare_key v6; 11637 } key; 11638 struct timer_list timer; 11639 spinlock_t lock; 11640 refcount_t refcnt; 11641 struct rb_root rb_fragments; 11642 struct sk_buff *fragments_tail; 11643 struct sk_buff *last_run_head; 11644 ktime_t stamp; 11645 int len; 11646 int meat; 11647 __u8 flags; 11648 u16 max_size; 11649 struct fqdir *fqdir; 11650 struct callback_head rcu; 11651 }; 11652 11653 struct fib_rule; 11654 11655 struct fib_lookup_arg; 11656 11657 struct fib_rule_hdr; 11658 11659 struct nlattr; 11660 11661 struct netlink_ext_ack; 11662 11663 struct nla_policy; 11664 11665 struct fib_rules_ops { 11666 int family; 11667 struct list_head list; 11668 int rule_size; 11669 int addr_size; 11670 int unresolved_rules; 11671 int nr_goto_rules; 11672 unsigned int fib_rules_seq; 11673 int (*action)(struct fib_rule *, struct flowi *, int, struct fib_lookup_arg *); 11674 bool (*suppress)(struct fib_rule *, struct fib_lookup_arg *); 11675 int (*match)(struct fib_rule *, struct flowi *, int); 11676 int (*configure)(struct fib_rule *, struct sk_buff *, struct fib_rule_hdr *, struct nlattr **, struct netlink_ext_ack *); 11677 int (*delete)(struct fib_rule *); 11678 int (*compare)(struct fib_rule *, struct fib_rule_hdr *, struct nlattr **); 11679 int (*fill)(struct fib_rule *, struct sk_buff *, struct fib_rule_hdr *); 11680 size_t (*nlmsg_payload)(struct fib_rule *); 11681 void (*flush_cache)(struct fib_rules_ops *); 11682 int nlgroup; 11683 const struct nla_policy *policy; 11684 struct list_head rules_list; 11685 struct module *owner; 11686 struct net *fro_net; 11687 struct callback_head rcu; 11688 }; 11689 11690 enum tcp_ca_event { 11691 CA_EVENT_TX_START = 0, 11692 CA_EVENT_CWND_RESTART = 1, 11693 CA_EVENT_COMPLETE_CWR = 2, 11694 CA_EVENT_LOSS = 3, 11695 CA_EVENT_ECN_NO_CE = 4, 11696 CA_EVENT_ECN_IS_CE = 5, 11697 }; 11698 11699 struct ack_sample; 11700 11701 struct rate_sample; 11702 11703 union tcp_cc_info; 11704 11705 struct tcp_congestion_ops { 11706 struct list_head list; 11707 u32 key; 11708 u32 flags; 11709 void (*init)(struct sock *); 11710 void (*release)(struct sock *); 11711 u32 (*ssthresh)(struct sock *); 11712 void (*cong_avoid)(struct sock *, u32, u32); 11713 void (*set_state)(struct sock *, u8); 11714 void (*cwnd_event)(struct sock *, enum tcp_ca_event); 11715 void (*in_ack_event)(struct sock *, u32); 11716 u32 (*undo_cwnd)(struct sock *); 11717 void (*pkts_acked)(struct sock *, const struct ack_sample *); 11718 u32 (*min_tso_segs)(struct sock *); 11719 u32 (*sndbuf_expand)(struct sock *); 11720 void (*cong_control)(struct sock *, const struct rate_sample *); 11721 size_t (*get_info)(struct sock *, u32, int *, union tcp_cc_info *); 11722 char name[16]; 11723 struct module *owner; 11724 }; 11725 11726 struct fib_notifier_ops { 11727 int family; 11728 struct list_head list; 11729 unsigned int (*fib_seq_read)(struct net *); 11730 int (*fib_dump)(struct net *, struct notifier_block *, struct netlink_ext_ack *); 11731 struct module *owner; 11732 struct callback_head rcu; 11733 }; 11734 11735 struct xfrm_state; 11736 11737 struct lwtunnel_state; 11738 11739 struct dst_entry { 11740 struct net_device *dev; 11741 struct dst_ops *ops; 11742 long unsigned int _metrics; 11743 long unsigned int expires; 11744 struct xfrm_state *xfrm; 11745 int (*input)(struct sk_buff *); 11746 int (*output)(struct net *, struct sock *, struct sk_buff *); 11747 short unsigned int flags; 11748 short int obsolete; 11749 short unsigned int header_len; 11750 short unsigned int trailer_len; 11751 atomic_t __refcnt; 11752 int __use; 11753 long unsigned int lastuse; 11754 struct lwtunnel_state *lwtstate; 11755 struct callback_head callback_head; 11756 short int error; 11757 short int __pad; 11758 __u32 tclassid; 11759 }; 11760 11761 struct hh_cache { 11762 unsigned int hh_len; 11763 seqlock_t hh_lock; 11764 long unsigned int hh_data[16]; 11765 }; 11766 11767 struct neigh_table; 11768 11769 struct neigh_parms; 11770 11771 struct neigh_ops; 11772 11773 struct neighbour { 11774 struct neighbour *next; 11775 struct neigh_table *tbl; 11776 struct neigh_parms *parms; 11777 long unsigned int confirmed; 11778 long unsigned int updated; 11779 rwlock_t lock; 11780 refcount_t refcnt; 11781 unsigned int arp_queue_len_bytes; 11782 struct sk_buff_head arp_queue; 11783 struct timer_list timer; 11784 long unsigned int used; 11785 atomic_t probes; 11786 __u8 flags; 11787 __u8 nud_state; 11788 __u8 type; 11789 __u8 dead; 11790 u8 protocol; 11791 seqlock_t ha_lock; 11792 int: 32; 11793 unsigned char ha[32]; 11794 struct hh_cache hh; 11795 int (*output)(struct neighbour *, struct sk_buff *); 11796 const struct neigh_ops *ops; 11797 struct list_head gc_list; 11798 struct callback_head rcu; 11799 struct net_device *dev; 11800 u8 primary_key[0]; 11801 }; 11802 11803 struct ipv6_stable_secret { 11804 bool initialized; 11805 struct in6_addr secret; 11806 }; 11807 11808 struct ipv6_devconf { 11809 __s32 forwarding; 11810 __s32 hop_limit; 11811 __s32 mtu6; 11812 __s32 accept_ra; 11813 __s32 accept_redirects; 11814 __s32 autoconf; 11815 __s32 dad_transmits; 11816 __s32 rtr_solicits; 11817 __s32 rtr_solicit_interval; 11818 __s32 rtr_solicit_max_interval; 11819 __s32 rtr_solicit_delay; 11820 __s32 force_mld_version; 11821 __s32 mldv1_unsolicited_report_interval; 11822 __s32 mldv2_unsolicited_report_interval; 11823 __s32 use_tempaddr; 11824 __s32 temp_valid_lft; 11825 __s32 temp_prefered_lft; 11826 __s32 regen_max_retry; 11827 __s32 max_desync_factor; 11828 __s32 max_addresses; 11829 __s32 accept_ra_defrtr; 11830 __s32 accept_ra_min_hop_limit; 11831 __s32 accept_ra_pinfo; 11832 __s32 ignore_routes_with_linkdown; 11833 __s32 accept_ra_rtr_pref; 11834 __s32 rtr_probe_interval; 11835 __s32 accept_ra_rt_info_min_plen; 11836 __s32 accept_ra_rt_info_max_plen; 11837 __s32 proxy_ndp; 11838 __s32 accept_source_route; 11839 __s32 accept_ra_from_local; 11840 __s32 optimistic_dad; 11841 __s32 use_optimistic; 11842 __s32 mc_forwarding; 11843 __s32 disable_ipv6; 11844 __s32 drop_unicast_in_l2_multicast; 11845 __s32 accept_dad; 11846 __s32 force_tllao; 11847 __s32 ndisc_notify; 11848 __s32 suppress_frag_ndisc; 11849 __s32 accept_ra_mtu; 11850 __s32 drop_unsolicited_na; 11851 struct ipv6_stable_secret stable_secret; 11852 __s32 use_oif_addrs_only; 11853 __s32 keep_addr_on_down; 11854 __s32 seg6_enabled; 11855 __s32 seg6_require_hmac; 11856 __u32 enhanced_dad; 11857 __u32 addr_gen_mode; 11858 __s32 disable_policy; 11859 __s32 ndisc_tclass; 11860 __s32 rpl_seg_enabled; 11861 struct ctl_table_header *sysctl_header; 11862 }; 11863 11864 struct nf_queue_entry; 11865 11866 struct nf_queue_handler { 11867 int (*outfn)(struct nf_queue_entry *, unsigned int); 11868 void (*nf_hook_drop)(struct net *); 11869 }; 11870 11871 enum nf_log_type { 11872 NF_LOG_TYPE_LOG = 0, 11873 NF_LOG_TYPE_ULOG = 1, 11874 NF_LOG_TYPE_MAX = 2, 11875 }; 11876 11877 typedef u8 u_int8_t; 11878 11879 struct nf_loginfo; 11880 11881 typedef void nf_logfn(struct net *, u_int8_t, unsigned int, const struct sk_buff *, const struct net_device *, const struct net_device *, const struct nf_loginfo *, const char *); 11882 11883 struct nf_logger { 11884 char *name; 11885 enum nf_log_type type; 11886 nf_logfn *logfn; 11887 struct module *me; 11888 }; 11889 11890 struct hlist_nulls_head { 11891 struct hlist_nulls_node *first; 11892 }; 11893 11894 struct ip_conntrack_stat { 11895 unsigned int found; 11896 unsigned int invalid; 11897 unsigned int insert; 11898 unsigned int insert_failed; 11899 unsigned int clash_resolve; 11900 unsigned int drop; 11901 unsigned int early_drop; 11902 unsigned int error; 11903 unsigned int expect_new; 11904 unsigned int expect_create; 11905 unsigned int expect_delete; 11906 unsigned int search_restart; 11907 }; 11908 11909 struct ct_pcpu { 11910 spinlock_t lock; 11911 struct hlist_nulls_head unconfirmed; 11912 struct hlist_nulls_head dying; 11913 }; 11914 11915 typedef struct { 11916 union { 11917 void *kernel; 11918 void *user; 11919 }; 11920 bool is_kernel: 1; 11921 } sockptr_t; 11922 11923 typedef enum { 11924 SS_FREE = 0, 11925 SS_UNCONNECTED = 1, 11926 SS_CONNECTING = 2, 11927 SS_CONNECTED = 3, 11928 SS_DISCONNECTING = 4, 11929 } socket_state; 11930 11931 struct socket_wq { 11932 wait_queue_head_t wait; 11933 struct fasync_struct *fasync_list; 11934 long unsigned int flags; 11935 struct callback_head rcu; 11936 long: 64; 11937 }; 11938 11939 struct proto_ops; 11940 11941 struct socket { 11942 socket_state state; 11943 short int type; 11944 long unsigned int flags; 11945 struct file *file; 11946 struct sock *sk; 11947 const struct proto_ops *ops; 11948 long: 64; 11949 long: 64; 11950 long: 64; 11951 struct socket_wq wq; 11952 }; 11953 11954 typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *, unsigned int, size_t); 11955 11956 struct proto_ops { 11957 int family; 11958 unsigned int flags; 11959 struct module *owner; 11960 int (*release)(struct socket *); 11961 int (*bind)(struct socket *, struct sockaddr *, int); 11962 int (*connect)(struct socket *, struct sockaddr *, int, int); 11963 int (*socketpair)(struct socket *, struct socket *); 11964 int (*accept)(struct socket *, struct socket *, int, bool); 11965 int (*getname)(struct socket *, struct sockaddr *, int); 11966 __poll_t (*poll)(struct file *, struct socket *, struct poll_table_struct *); 11967 int (*ioctl)(struct socket *, unsigned int, long unsigned int); 11968 int (*compat_ioctl)(struct socket *, unsigned int, long unsigned int); 11969 int (*gettstamp)(struct socket *, void *, bool, bool); 11970 int (*listen)(struct socket *, int); 11971 int (*shutdown)(struct socket *, int); 11972 int (*setsockopt)(struct socket *, int, int, sockptr_t, unsigned int); 11973 int (*getsockopt)(struct socket *, int, int, char *, int *); 11974 void (*show_fdinfo)(struct seq_file *, struct socket *); 11975 int (*sendmsg)(struct socket *, struct msghdr *, size_t); 11976 int (*recvmsg)(struct socket *, struct msghdr *, size_t, int); 11977 int (*mmap)(struct file *, struct socket *, struct vm_area_struct *); 11978 ssize_t (*sendpage)(struct socket *, struct page *, int, size_t, int); 11979 ssize_t (*splice_read)(struct socket *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); 11980 int (*set_peek_off)(struct sock *, int); 11981 int (*peek_len)(struct socket *); 11982 int (*read_sock)(struct sock *, read_descriptor_t *, sk_read_actor_t); 11983 int (*sendpage_locked)(struct sock *, struct page *, int, size_t, int); 11984 int (*sendmsg_locked)(struct sock *, struct msghdr *, size_t); 11985 int (*set_rcvlowat)(struct sock *, int); 11986 }; 11987 11988 struct pipe_buf_operations; 11989 11990 struct pipe_buffer { 11991 struct page *page; 11992 unsigned int offset; 11993 unsigned int len; 11994 const struct pipe_buf_operations *ops; 11995 unsigned int flags; 11996 long unsigned int private; 11997 }; 11998 11999 struct pipe_buf_operations { 12000 int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *); 12001 void (*release)(struct pipe_inode_info *, struct pipe_buffer *); 12002 bool (*try_steal)(struct pipe_inode_info *, struct pipe_buffer *); 12003 bool (*get)(struct pipe_inode_info *, struct pipe_buffer *); 12004 }; 12005 12006 struct skb_ext { 12007 refcount_t refcnt; 12008 u8 offset[4]; 12009 u8 chunks; 12010 long: 56; 12011 char data[0]; 12012 }; 12013 12014 struct dql { 12015 unsigned int num_queued; 12016 unsigned int adj_limit; 12017 unsigned int last_obj_cnt; 12018 long: 32; 12019 long: 64; 12020 long: 64; 12021 long: 64; 12022 long: 64; 12023 long: 64; 12024 long: 64; 12025 unsigned int limit; 12026 unsigned int num_completed; 12027 unsigned int prev_ovlimit; 12028 unsigned int prev_num_queued; 12029 unsigned int prev_last_obj_cnt; 12030 unsigned int lowest_slack; 12031 long unsigned int slack_start_time; 12032 unsigned int max_limit; 12033 unsigned int min_limit; 12034 unsigned int slack_hold_time; 12035 long: 32; 12036 long: 64; 12037 long: 64; 12038 }; 12039 12040 struct ieee_ets { 12041 __u8 willing; 12042 __u8 ets_cap; 12043 __u8 cbs; 12044 __u8 tc_tx_bw[8]; 12045 __u8 tc_rx_bw[8]; 12046 __u8 tc_tsa[8]; 12047 __u8 prio_tc[8]; 12048 __u8 tc_reco_bw[8]; 12049 __u8 tc_reco_tsa[8]; 12050 __u8 reco_prio_tc[8]; 12051 }; 12052 12053 struct ieee_maxrate { 12054 __u64 tc_maxrate[8]; 12055 }; 12056 12057 struct ieee_qcn { 12058 __u8 rpg_enable[8]; 12059 __u32 rppp_max_rps[8]; 12060 __u32 rpg_time_reset[8]; 12061 __u32 rpg_byte_reset[8]; 12062 __u32 rpg_threshold[8]; 12063 __u32 rpg_max_rate[8]; 12064 __u32 rpg_ai_rate[8]; 12065 __u32 rpg_hai_rate[8]; 12066 __u32 rpg_gd[8]; 12067 __u32 rpg_min_dec_fac[8]; 12068 __u32 rpg_min_rate[8]; 12069 __u32 cndd_state_machine[8]; 12070 }; 12071 12072 struct ieee_qcn_stats { 12073 __u64 rppp_rp_centiseconds[8]; 12074 __u32 rppp_created_rps[8]; 12075 }; 12076 12077 struct ieee_pfc { 12078 __u8 pfc_cap; 12079 __u8 pfc_en; 12080 __u8 mbc; 12081 __u16 delay; 12082 __u64 requests[8]; 12083 __u64 indications[8]; 12084 }; 12085 12086 struct dcbnl_buffer { 12087 __u8 prio2buffer[8]; 12088 __u32 buffer_size[8]; 12089 __u32 total_size; 12090 }; 12091 12092 struct cee_pg { 12093 __u8 willing; 12094 __u8 error; 12095 __u8 pg_en; 12096 __u8 tcs_supported; 12097 __u8 pg_bw[8]; 12098 __u8 prio_pg[8]; 12099 }; 12100 12101 struct cee_pfc { 12102 __u8 willing; 12103 __u8 error; 12104 __u8 pfc_en; 12105 __u8 tcs_supported; 12106 }; 12107 12108 struct dcb_app { 12109 __u8 selector; 12110 __u8 priority; 12111 __u16 protocol; 12112 }; 12113 12114 struct dcb_peer_app_info { 12115 __u8 willing; 12116 __u8 error; 12117 }; 12118 12119 struct dcbnl_rtnl_ops { 12120 int (*ieee_getets)(struct net_device *, struct ieee_ets *); 12121 int (*ieee_setets)(struct net_device *, struct ieee_ets *); 12122 int (*ieee_getmaxrate)(struct net_device *, struct ieee_maxrate *); 12123 int (*ieee_setmaxrate)(struct net_device *, struct ieee_maxrate *); 12124 int (*ieee_getqcn)(struct net_device *, struct ieee_qcn *); 12125 int (*ieee_setqcn)(struct net_device *, struct ieee_qcn *); 12126 int (*ieee_getqcnstats)(struct net_device *, struct ieee_qcn_stats *); 12127 int (*ieee_getpfc)(struct net_device *, struct ieee_pfc *); 12128 int (*ieee_setpfc)(struct net_device *, struct ieee_pfc *); 12129 int (*ieee_getapp)(struct net_device *, struct dcb_app *); 12130 int (*ieee_setapp)(struct net_device *, struct dcb_app *); 12131 int (*ieee_delapp)(struct net_device *, struct dcb_app *); 12132 int (*ieee_peer_getets)(struct net_device *, struct ieee_ets *); 12133 int (*ieee_peer_getpfc)(struct net_device *, struct ieee_pfc *); 12134 u8 (*getstate)(struct net_device *); 12135 u8 (*setstate)(struct net_device *, u8); 12136 void (*getpermhwaddr)(struct net_device *, u8 *); 12137 void (*setpgtccfgtx)(struct net_device *, int, u8, u8, u8, u8); 12138 void (*setpgbwgcfgtx)(struct net_device *, int, u8); 12139 void (*setpgtccfgrx)(struct net_device *, int, u8, u8, u8, u8); 12140 void (*setpgbwgcfgrx)(struct net_device *, int, u8); 12141 void (*getpgtccfgtx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *); 12142 void (*getpgbwgcfgtx)(struct net_device *, int, u8 *); 12143 void (*getpgtccfgrx)(struct net_device *, int, u8 *, u8 *, u8 *, u8 *); 12144 void (*getpgbwgcfgrx)(struct net_device *, int, u8 *); 12145 void (*setpfccfg)(struct net_device *, int, u8); 12146 void (*getpfccfg)(struct net_device *, int, u8 *); 12147 u8 (*setall)(struct net_device *); 12148 u8 (*getcap)(struct net_device *, int, u8 *); 12149 int (*getnumtcs)(struct net_device *, int, u8 *); 12150 int (*setnumtcs)(struct net_device *, int, u8); 12151 u8 (*getpfcstate)(struct net_device *); 12152 void (*setpfcstate)(struct net_device *, u8); 12153 void (*getbcncfg)(struct net_device *, int, u32 *); 12154 void (*setbcncfg)(struct net_device *, int, u32); 12155 void (*getbcnrp)(struct net_device *, int, u8 *); 12156 void (*setbcnrp)(struct net_device *, int, u8); 12157 int (*setapp)(struct net_device *, u8, u16, u8); 12158 int (*getapp)(struct net_device *, u8, u16); 12159 u8 (*getfeatcfg)(struct net_device *, int, u8 *); 12160 u8 (*setfeatcfg)(struct net_device *, int, u8); 12161 u8 (*getdcbx)(struct net_device *); 12162 u8 (*setdcbx)(struct net_device *, u8); 12163 int (*peer_getappinfo)(struct net_device *, struct dcb_peer_app_info *, u16 *); 12164 int (*peer_getapptable)(struct net_device *, struct dcb_app *); 12165 int (*cee_peer_getpg)(struct net_device *, struct cee_pg *); 12166 int (*cee_peer_getpfc)(struct net_device *, struct cee_pfc *); 12167 int (*dcbnl_getbuffer)(struct net_device *, struct dcbnl_buffer *); 12168 int (*dcbnl_setbuffer)(struct net_device *, struct dcbnl_buffer *); 12169 }; 12170 12171 struct netprio_map { 12172 struct callback_head rcu; 12173 u32 priomap_len; 12174 u32 priomap[0]; 12175 }; 12176 12177 struct xdp_mem_info { 12178 u32 type; 12179 u32 id; 12180 }; 12181 12182 struct xdp_rxq_info { 12183 struct net_device *dev; 12184 u32 queue_index; 12185 u32 reg_state; 12186 struct xdp_mem_info mem; 12187 unsigned int napi_id; 12188 long: 32; 12189 long: 64; 12190 long: 64; 12191 long: 64; 12192 long: 64; 12193 }; 12194 12195 struct xdp_frame { 12196 void *data; 12197 u16 len; 12198 u16 headroom; 12199 u32 metasize: 8; 12200 u32 frame_sz: 24; 12201 struct xdp_mem_info mem; 12202 struct net_device *dev_rx; 12203 }; 12204 12205 struct nlmsghdr { 12206 __u32 nlmsg_len; 12207 __u16 nlmsg_type; 12208 __u16 nlmsg_flags; 12209 __u32 nlmsg_seq; 12210 __u32 nlmsg_pid; 12211 }; 12212 12213 struct nlattr { 12214 __u16 nla_len; 12215 __u16 nla_type; 12216 }; 12217 12218 struct netlink_ext_ack { 12219 const char *_msg; 12220 const struct nlattr *bad_attr; 12221 const struct nla_policy *policy; 12222 u8 cookie[20]; 12223 u8 cookie_len; 12224 }; 12225 12226 struct netlink_range_validation; 12227 12228 struct netlink_range_validation_signed; 12229 12230 struct nla_policy { 12231 u8 type; 12232 u8 validation_type; 12233 u16 len; 12234 union { 12235 const u32 bitfield32_valid; 12236 const u32 mask; 12237 const char *reject_message; 12238 const struct nla_policy *nested_policy; 12239 struct netlink_range_validation *range; 12240 struct netlink_range_validation_signed *range_signed; 12241 struct { 12242 s16 min; 12243 s16 max; 12244 }; 12245 int (*validate)(const struct nlattr *, struct netlink_ext_ack *); 12246 u16 strict_start_type; 12247 }; 12248 }; 12249 12250 struct netlink_callback { 12251 struct sk_buff *skb; 12252 const struct nlmsghdr *nlh; 12253 int (*dump)(struct sk_buff *, struct netlink_callback *); 12254 int (*done)(struct netlink_callback *); 12255 void *data; 12256 struct module *module; 12257 struct netlink_ext_ack *extack; 12258 u16 family; 12259 u16 answer_flags; 12260 u32 min_dump_alloc; 12261 unsigned int prev_seq; 12262 unsigned int seq; 12263 bool strict_check; 12264 union { 12265 u8 ctx[48]; 12266 long int args[6]; 12267 }; 12268 }; 12269 12270 struct ndmsg { 12271 __u8 ndm_family; 12272 __u8 ndm_pad1; 12273 __u16 ndm_pad2; 12274 __s32 ndm_ifindex; 12275 __u16 ndm_state; 12276 __u8 ndm_flags; 12277 __u8 ndm_type; 12278 }; 12279 12280 struct rtnl_link_stats64 { 12281 __u64 rx_packets; 12282 __u64 tx_packets; 12283 __u64 rx_bytes; 12284 __u64 tx_bytes; 12285 __u64 rx_errors; 12286 __u64 tx_errors; 12287 __u64 rx_dropped; 12288 __u64 tx_dropped; 12289 __u64 multicast; 12290 __u64 collisions; 12291 __u64 rx_length_errors; 12292 __u64 rx_over_errors; 12293 __u64 rx_crc_errors; 12294 __u64 rx_frame_errors; 12295 __u64 rx_fifo_errors; 12296 __u64 rx_missed_errors; 12297 __u64 tx_aborted_errors; 12298 __u64 tx_carrier_errors; 12299 __u64 tx_fifo_errors; 12300 __u64 tx_heartbeat_errors; 12301 __u64 tx_window_errors; 12302 __u64 rx_compressed; 12303 __u64 tx_compressed; 12304 __u64 rx_nohandler; 12305 }; 12306 12307 struct ifla_vf_guid { 12308 __u32 vf; 12309 __u64 guid; 12310 }; 12311 12312 struct ifla_vf_stats { 12313 __u64 rx_packets; 12314 __u64 tx_packets; 12315 __u64 rx_bytes; 12316 __u64 tx_bytes; 12317 __u64 broadcast; 12318 __u64 multicast; 12319 __u64 rx_dropped; 12320 __u64 tx_dropped; 12321 }; 12322 12323 struct ifla_vf_info { 12324 __u32 vf; 12325 __u8 mac[32]; 12326 __u32 vlan; 12327 __u32 qos; 12328 __u32 spoofchk; 12329 __u32 linkstate; 12330 __u32 min_tx_rate; 12331 __u32 max_tx_rate; 12332 __u32 rss_query_en; 12333 __u32 trusted; 12334 __be16 vlan_proto; 12335 }; 12336 12337 struct tc_stats { 12338 __u64 bytes; 12339 __u32 packets; 12340 __u32 drops; 12341 __u32 overlimits; 12342 __u32 bps; 12343 __u32 pps; 12344 __u32 qlen; 12345 __u32 backlog; 12346 }; 12347 12348 struct tc_sizespec { 12349 unsigned char cell_log; 12350 unsigned char size_log; 12351 short int cell_align; 12352 int overhead; 12353 unsigned int linklayer; 12354 unsigned int mpu; 12355 unsigned int mtu; 12356 unsigned int tsize; 12357 }; 12358 12359 enum netdev_tx { 12360 __NETDEV_TX_MIN = 2147483648, 12361 NETDEV_TX_OK = 0, 12362 NETDEV_TX_BUSY = 16, 12363 }; 12364 12365 typedef enum netdev_tx netdev_tx_t; 12366 12367 struct header_ops { 12368 int (*create)(struct sk_buff *, struct net_device *, short unsigned int, const void *, const void *, unsigned int); 12369 int (*parse)(const struct sk_buff *, unsigned char *); 12370 int (*cache)(const struct neighbour *, struct hh_cache *, __be16); 12371 void (*cache_update)(struct hh_cache *, const struct net_device *, const unsigned char *); 12372 bool (*validate)(const char *, unsigned int); 12373 __be16 (*parse_protocol)(const struct sk_buff *); 12374 }; 12375 12376 struct xsk_buff_pool; 12377 12378 struct netdev_queue { 12379 struct net_device *dev; 12380 struct Qdisc *qdisc; 12381 struct Qdisc *qdisc_sleeping; 12382 struct kobject kobj; 12383 int numa_node; 12384 long unsigned int tx_maxrate; 12385 long unsigned int trans_timeout; 12386 struct net_device *sb_dev; 12387 struct xsk_buff_pool *pool; 12388 spinlock_t _xmit_lock; 12389 int xmit_lock_owner; 12390 long unsigned int trans_start; 12391 long unsigned int state; 12392 long: 64; 12393 long: 64; 12394 long: 64; 12395 long: 64; 12396 long: 64; 12397 struct dql dql; 12398 }; 12399 12400 struct qdisc_skb_head { 12401 struct sk_buff *head; 12402 struct sk_buff *tail; 12403 __u32 qlen; 12404 spinlock_t lock; 12405 }; 12406 12407 struct gnet_stats_basic_packed { 12408 __u64 bytes; 12409 __u64 packets; 12410 }; 12411 12412 struct gnet_stats_queue { 12413 __u32 qlen; 12414 __u32 backlog; 12415 __u32 drops; 12416 __u32 requeues; 12417 __u32 overlimits; 12418 }; 12419 12420 struct Qdisc_ops; 12421 12422 struct qdisc_size_table; 12423 12424 struct net_rate_estimator; 12425 12426 struct gnet_stats_basic_cpu; 12427 12428 struct Qdisc { 12429 int (*enqueue)(struct sk_buff *, struct Qdisc *, struct sk_buff **); 12430 struct sk_buff * (*dequeue)(struct Qdisc *); 12431 unsigned int flags; 12432 u32 limit; 12433 const struct Qdisc_ops *ops; 12434 struct qdisc_size_table *stab; 12435 struct hlist_node hash; 12436 u32 handle; 12437 u32 parent; 12438 struct netdev_queue *dev_queue; 12439 struct net_rate_estimator *rate_est; 12440 struct gnet_stats_basic_cpu *cpu_bstats; 12441 struct gnet_stats_queue *cpu_qstats; 12442 int pad; 12443 refcount_t refcnt; 12444 long: 64; 12445 long: 64; 12446 long: 64; 12447 struct sk_buff_head gso_skb; 12448 struct qdisc_skb_head q; 12449 struct gnet_stats_basic_packed bstats; 12450 seqcount_t running; 12451 struct gnet_stats_queue qstats; 12452 long unsigned int state; 12453 struct Qdisc *next_sched; 12454 struct sk_buff_head skb_bad_txq; 12455 spinlock_t busylock; 12456 spinlock_t seqlock; 12457 bool empty; 12458 struct callback_head rcu; 12459 long: 64; 12460 long: 64; 12461 long: 64; 12462 long: 64; 12463 long int privdata[0]; 12464 }; 12465 12466 struct rps_map { 12467 unsigned int len; 12468 struct callback_head rcu; 12469 u16 cpus[0]; 12470 }; 12471 12472 struct rps_dev_flow { 12473 u16 cpu; 12474 u16 filter; 12475 unsigned int last_qtail; 12476 }; 12477 12478 struct rps_dev_flow_table { 12479 unsigned int mask; 12480 struct callback_head rcu; 12481 struct rps_dev_flow flows[0]; 12482 }; 12483 12484 struct netdev_rx_queue { 12485 struct rps_map *rps_map; 12486 struct rps_dev_flow_table *rps_flow_table; 12487 struct kobject kobj; 12488 struct net_device *dev; 12489 long: 64; 12490 long: 64; 12491 long: 64; 12492 long: 64; 12493 long: 64; 12494 struct xdp_rxq_info xdp_rxq; 12495 struct xsk_buff_pool *pool; 12496 long: 64; 12497 long: 64; 12498 long: 64; 12499 long: 64; 12500 long: 64; 12501 long: 64; 12502 long: 64; 12503 }; 12504 12505 struct xps_map { 12506 unsigned int len; 12507 unsigned int alloc_len; 12508 struct callback_head rcu; 12509 u16 queues[0]; 12510 }; 12511 12512 struct xps_dev_maps { 12513 struct callback_head rcu; 12514 struct xps_map *attr_map[0]; 12515 }; 12516 12517 struct netdev_fcoe_hbainfo { 12518 char manufacturer[64]; 12519 char serial_number[64]; 12520 char hardware_version[64]; 12521 char driver_version[64]; 12522 char optionrom_version[64]; 12523 char firmware_version[64]; 12524 char model[256]; 12525 char model_description[256]; 12526 }; 12527 12528 struct netdev_phys_item_id { 12529 unsigned char id[32]; 12530 unsigned char id_len; 12531 }; 12532 12533 enum tc_setup_type { 12534 TC_SETUP_QDISC_MQPRIO = 0, 12535 TC_SETUP_CLSU32 = 1, 12536 TC_SETUP_CLSFLOWER = 2, 12537 TC_SETUP_CLSMATCHALL = 3, 12538 TC_SETUP_CLSBPF = 4, 12539 TC_SETUP_BLOCK = 5, 12540 TC_SETUP_QDISC_CBS = 6, 12541 TC_SETUP_QDISC_RED = 7, 12542 TC_SETUP_QDISC_PRIO = 8, 12543 TC_SETUP_QDISC_MQ = 9, 12544 TC_SETUP_QDISC_ETF = 10, 12545 TC_SETUP_ROOT_QDISC = 11, 12546 TC_SETUP_QDISC_GRED = 12, 12547 TC_SETUP_QDISC_TAPRIO = 13, 12548 TC_SETUP_FT = 14, 12549 TC_SETUP_QDISC_ETS = 15, 12550 TC_SETUP_QDISC_TBF = 16, 12551 TC_SETUP_QDISC_FIFO = 17, 12552 }; 12553 12554 enum bpf_netdev_command { 12555 XDP_SETUP_PROG = 0, 12556 XDP_SETUP_PROG_HW = 1, 12557 BPF_OFFLOAD_MAP_ALLOC = 2, 12558 BPF_OFFLOAD_MAP_FREE = 3, 12559 XDP_SETUP_XSK_POOL = 4, 12560 }; 12561 12562 struct netdev_bpf { 12563 enum bpf_netdev_command command; 12564 union { 12565 struct { 12566 u32 flags; 12567 struct bpf_prog *prog; 12568 struct netlink_ext_ack *extack; 12569 }; 12570 struct { 12571 struct bpf_offloaded_map *offmap; 12572 }; 12573 struct { 12574 struct xsk_buff_pool *pool; 12575 u16 queue_id; 12576 } xsk; 12577 }; 12578 }; 12579 12580 struct xfrmdev_ops { 12581 int (*xdo_dev_state_add)(struct xfrm_state *); 12582 void (*xdo_dev_state_delete)(struct xfrm_state *); 12583 void (*xdo_dev_state_free)(struct xfrm_state *); 12584 bool (*xdo_dev_offload_ok)(struct sk_buff *, struct xfrm_state *); 12585 void (*xdo_dev_state_advance_esn)(struct xfrm_state *); 12586 }; 12587 12588 struct dev_ifalias { 12589 struct callback_head rcuhead; 12590 char ifalias[0]; 12591 }; 12592 12593 struct netdev_name_node { 12594 struct hlist_node hlist; 12595 struct list_head list; 12596 struct net_device *dev; 12597 const char *name; 12598 }; 12599 12600 struct udp_tunnel_info; 12601 12602 struct devlink_port; 12603 12604 struct ip_tunnel_parm; 12605 12606 struct net_device_ops { 12607 int (*ndo_init)(struct net_device *); 12608 void (*ndo_uninit)(struct net_device *); 12609 int (*ndo_open)(struct net_device *); 12610 int (*ndo_stop)(struct net_device *); 12611 netdev_tx_t (*ndo_start_xmit)(struct sk_buff *, struct net_device *); 12612 netdev_features_t (*ndo_features_check)(struct sk_buff *, struct net_device *, netdev_features_t); 12613 u16 (*ndo_select_queue)(struct net_device *, struct sk_buff *, struct net_device *); 12614 void (*ndo_change_rx_flags)(struct net_device *, int); 12615 void (*ndo_set_rx_mode)(struct net_device *); 12616 int (*ndo_set_mac_address)(struct net_device *, void *); 12617 int (*ndo_validate_addr)(struct net_device *); 12618 int (*ndo_do_ioctl)(struct net_device *, struct ifreq *, int); 12619 int (*ndo_set_config)(struct net_device *, struct ifmap *); 12620 int (*ndo_change_mtu)(struct net_device *, int); 12621 int (*ndo_neigh_setup)(struct net_device *, struct neigh_parms *); 12622 void (*ndo_tx_timeout)(struct net_device *, unsigned int); 12623 void (*ndo_get_stats64)(struct net_device *, struct rtnl_link_stats64 *); 12624 bool (*ndo_has_offload_stats)(const struct net_device *, int); 12625 int (*ndo_get_offload_stats)(int, const struct net_device *, void *); 12626 struct net_device_stats * (*ndo_get_stats)(struct net_device *); 12627 int (*ndo_vlan_rx_add_vid)(struct net_device *, __be16, u16); 12628 int (*ndo_vlan_rx_kill_vid)(struct net_device *, __be16, u16); 12629 void (*ndo_poll_controller)(struct net_device *); 12630 int (*ndo_netpoll_setup)(struct net_device *, struct netpoll_info *); 12631 void (*ndo_netpoll_cleanup)(struct net_device *); 12632 int (*ndo_set_vf_mac)(struct net_device *, int, u8 *); 12633 int (*ndo_set_vf_vlan)(struct net_device *, int, u16, u8, __be16); 12634 int (*ndo_set_vf_rate)(struct net_device *, int, int, int); 12635 int (*ndo_set_vf_spoofchk)(struct net_device *, int, bool); 12636 int (*ndo_set_vf_trust)(struct net_device *, int, bool); 12637 int (*ndo_get_vf_config)(struct net_device *, int, struct ifla_vf_info *); 12638 int (*ndo_set_vf_link_state)(struct net_device *, int, int); 12639 int (*ndo_get_vf_stats)(struct net_device *, int, struct ifla_vf_stats *); 12640 int (*ndo_set_vf_port)(struct net_device *, int, struct nlattr **); 12641 int (*ndo_get_vf_port)(struct net_device *, int, struct sk_buff *); 12642 int (*ndo_get_vf_guid)(struct net_device *, int, struct ifla_vf_guid *, struct ifla_vf_guid *); 12643 int (*ndo_set_vf_guid)(struct net_device *, int, u64, int); 12644 int (*ndo_set_vf_rss_query_en)(struct net_device *, int, bool); 12645 int (*ndo_setup_tc)(struct net_device *, enum tc_setup_type, void *); 12646 int (*ndo_fcoe_enable)(struct net_device *); 12647 int (*ndo_fcoe_disable)(struct net_device *); 12648 int (*ndo_fcoe_ddp_setup)(struct net_device *, u16, struct scatterlist *, unsigned int); 12649 int (*ndo_fcoe_ddp_done)(struct net_device *, u16); 12650 int (*ndo_fcoe_ddp_target)(struct net_device *, u16, struct scatterlist *, unsigned int); 12651 int (*ndo_fcoe_get_hbainfo)(struct net_device *, struct netdev_fcoe_hbainfo *); 12652 int (*ndo_fcoe_get_wwn)(struct net_device *, u64 *, int); 12653 int (*ndo_rx_flow_steer)(struct net_device *, const struct sk_buff *, u16, u32); 12654 int (*ndo_add_slave)(struct net_device *, struct net_device *, struct netlink_ext_ack *); 12655 int (*ndo_del_slave)(struct net_device *, struct net_device *); 12656 struct net_device * (*ndo_get_xmit_slave)(struct net_device *, struct sk_buff *, bool); 12657 netdev_features_t (*ndo_fix_features)(struct net_device *, netdev_features_t); 12658 int (*ndo_set_features)(struct net_device *, netdev_features_t); 12659 int (*ndo_neigh_construct)(struct net_device *, struct neighbour *); 12660 void (*ndo_neigh_destroy)(struct net_device *, struct neighbour *); 12661 int (*ndo_fdb_add)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, u16, u16, struct netlink_ext_ack *); 12662 int (*ndo_fdb_del)(struct ndmsg *, struct nlattr **, struct net_device *, const unsigned char *, u16); 12663 int (*ndo_fdb_dump)(struct sk_buff *, struct netlink_callback *, struct net_device *, struct net_device *, int *); 12664 int (*ndo_fdb_get)(struct sk_buff *, struct nlattr **, struct net_device *, const unsigned char *, u16, u32, u32, struct netlink_ext_ack *); 12665 int (*ndo_bridge_setlink)(struct net_device *, struct nlmsghdr *, u16, struct netlink_ext_ack *); 12666 int (*ndo_bridge_getlink)(struct sk_buff *, u32, u32, struct net_device *, u32, int); 12667 int (*ndo_bridge_dellink)(struct net_device *, struct nlmsghdr *, u16); 12668 int (*ndo_change_carrier)(struct net_device *, bool); 12669 int (*ndo_get_phys_port_id)(struct net_device *, struct netdev_phys_item_id *); 12670 int (*ndo_get_port_parent_id)(struct net_device *, struct netdev_phys_item_id *); 12671 int (*ndo_get_phys_port_name)(struct net_device *, char *, size_t); 12672 void (*ndo_udp_tunnel_add)(struct net_device *, struct udp_tunnel_info *); 12673 void (*ndo_udp_tunnel_del)(struct net_device *, struct udp_tunnel_info *); 12674 void * (*ndo_dfwd_add_station)(struct net_device *, struct net_device *); 12675 void (*ndo_dfwd_del_station)(struct net_device *, void *); 12676 int (*ndo_set_tx_maxrate)(struct net_device *, int, u32); 12677 int (*ndo_get_iflink)(const struct net_device *); 12678 int (*ndo_change_proto_down)(struct net_device *, bool); 12679 int (*ndo_fill_metadata_dst)(struct net_device *, struct sk_buff *); 12680 void (*ndo_set_rx_headroom)(struct net_device *, int); 12681 int (*ndo_bpf)(struct net_device *, struct netdev_bpf *); 12682 int (*ndo_xdp_xmit)(struct net_device *, int, struct xdp_frame **, u32); 12683 int (*ndo_xsk_wakeup)(struct net_device *, u32, u32); 12684 struct devlink_port * (*ndo_get_devlink_port)(struct net_device *); 12685 int (*ndo_tunnel_ctl)(struct net_device *, struct ip_tunnel_parm *, int); 12686 struct net_device * (*ndo_get_peer_dev)(struct net_device *); 12687 }; 12688 12689 struct neigh_parms { 12690 possible_net_t net; 12691 struct net_device *dev; 12692 struct list_head list; 12693 int (*neigh_setup)(struct neighbour *); 12694 struct neigh_table *tbl; 12695 void *sysctl_table; 12696 int dead; 12697 refcount_t refcnt; 12698 struct callback_head callback_head; 12699 int reachable_time; 12700 int data[13]; 12701 long unsigned int data_state[1]; 12702 }; 12703 12704 struct pcpu_lstats { 12705 u64_stats_t packets; 12706 u64_stats_t bytes; 12707 struct u64_stats_sync syncp; 12708 }; 12709 12710 struct pcpu_sw_netstats { 12711 u64 rx_packets; 12712 u64 rx_bytes; 12713 u64 tx_packets; 12714 u64 tx_bytes; 12715 struct u64_stats_sync syncp; 12716 }; 12717 12718 struct iw_request_info; 12719 12720 union iwreq_data; 12721 12722 typedef int (*iw_handler)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *); 12723 12724 struct iw_priv_args; 12725 12726 struct iw_statistics; 12727 12728 struct iw_handler_def { 12729 const iw_handler *standard; 12730 __u16 num_standard; 12731 __u16 num_private; 12732 __u16 num_private_args; 12733 const iw_handler *private; 12734 const struct iw_priv_args *private_args; 12735 struct iw_statistics * (*get_wireless_stats)(struct net_device *); 12736 }; 12737 12738 enum ethtool_phys_id_state { 12739 ETHTOOL_ID_INACTIVE = 0, 12740 ETHTOOL_ID_ACTIVE = 1, 12741 ETHTOOL_ID_ON = 2, 12742 ETHTOOL_ID_OFF = 3, 12743 }; 12744 12745 struct ethtool_drvinfo; 12746 12747 struct ethtool_regs; 12748 12749 struct ethtool_wolinfo; 12750 12751 struct ethtool_link_ext_state_info; 12752 12753 struct ethtool_eeprom; 12754 12755 struct ethtool_coalesce; 12756 12757 struct ethtool_ringparam; 12758 12759 struct ethtool_pause_stats; 12760 12761 struct ethtool_pauseparam; 12762 12763 struct ethtool_test; 12764 12765 struct ethtool_stats; 12766 12767 struct ethtool_rxnfc; 12768 12769 struct ethtool_flash; 12770 12771 struct ethtool_channels; 12772 12773 struct ethtool_dump; 12774 12775 struct ethtool_ts_info; 12776 12777 struct ethtool_modinfo; 12778 12779 struct ethtool_eee; 12780 12781 struct ethtool_tunable; 12782 12783 struct ethtool_link_ksettings; 12784 12785 struct ethtool_fecparam; 12786 12787 struct ethtool_ops { 12788 u32 supported_coalesce_params; 12789 void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *); 12790 int (*get_regs_len)(struct net_device *); 12791 void (*get_regs)(struct net_device *, struct ethtool_regs *, void *); 12792 void (*get_wol)(struct net_device *, struct ethtool_wolinfo *); 12793 int (*set_wol)(struct net_device *, struct ethtool_wolinfo *); 12794 u32 (*get_msglevel)(struct net_device *); 12795 void (*set_msglevel)(struct net_device *, u32); 12796 int (*nway_reset)(struct net_device *); 12797 u32 (*get_link)(struct net_device *); 12798 int (*get_link_ext_state)(struct net_device *, struct ethtool_link_ext_state_info *); 12799 int (*get_eeprom_len)(struct net_device *); 12800 int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); 12801 int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); 12802 int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); 12803 int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); 12804 void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); 12805 int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); 12806 void (*get_pause_stats)(struct net_device *, struct ethtool_pause_stats *); 12807 void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam *); 12808 int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam *); 12809 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); 12810 void (*get_strings)(struct net_device *, u32, u8 *); 12811 int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state); 12812 void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); 12813 int (*begin)(struct net_device *); 12814 void (*complete)(struct net_device *); 12815 u32 (*get_priv_flags)(struct net_device *); 12816 int (*set_priv_flags)(struct net_device *, u32); 12817 int (*get_sset_count)(struct net_device *, int); 12818 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, u32 *); 12819 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); 12820 int (*flash_device)(struct net_device *, struct ethtool_flash *); 12821 int (*reset)(struct net_device *, u32 *); 12822 u32 (*get_rxfh_key_size)(struct net_device *); 12823 u32 (*get_rxfh_indir_size)(struct net_device *); 12824 int (*get_rxfh)(struct net_device *, u32 *, u8 *, u8 *); 12825 int (*set_rxfh)(struct net_device *, const u32 *, const u8 *, const u8); 12826 int (*get_rxfh_context)(struct net_device *, u32 *, u8 *, u8 *, u32); 12827 int (*set_rxfh_context)(struct net_device *, const u32 *, const u8 *, const u8, u32 *, bool); 12828 void (*get_channels)(struct net_device *, struct ethtool_channels *); 12829 int (*set_channels)(struct net_device *, struct ethtool_channels *); 12830 int (*get_dump_flag)(struct net_device *, struct ethtool_dump *); 12831 int (*get_dump_data)(struct net_device *, struct ethtool_dump *, void *); 12832 int (*set_dump)(struct net_device *, struct ethtool_dump *); 12833 int (*get_ts_info)(struct net_device *, struct ethtool_ts_info *); 12834 int (*get_module_info)(struct net_device *, struct ethtool_modinfo *); 12835 int (*get_module_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); 12836 int (*get_eee)(struct net_device *, struct ethtool_eee *); 12837 int (*set_eee)(struct net_device *, struct ethtool_eee *); 12838 int (*get_tunable)(struct net_device *, const struct ethtool_tunable *, void *); 12839 int (*set_tunable)(struct net_device *, const struct ethtool_tunable *, const void *); 12840 int (*get_per_queue_coalesce)(struct net_device *, u32, struct ethtool_coalesce *); 12841 int (*set_per_queue_coalesce)(struct net_device *, u32, struct ethtool_coalesce *); 12842 int (*get_link_ksettings)(struct net_device *, struct ethtool_link_ksettings *); 12843 int (*set_link_ksettings)(struct net_device *, const struct ethtool_link_ksettings *); 12844 int (*get_fecparam)(struct net_device *, struct ethtool_fecparam *); 12845 int (*set_fecparam)(struct net_device *, struct ethtool_fecparam *); 12846 void (*get_ethtool_phy_stats)(struct net_device *, struct ethtool_stats *, u64 *); 12847 int (*get_phy_tunable)(struct net_device *, const struct ethtool_tunable *, void *); 12848 int (*set_phy_tunable)(struct net_device *, const struct ethtool_tunable *, const void *); 12849 }; 12850 12851 struct l3mdev_ops { 12852 u32 (*l3mdev_fib_table)(const struct net_device *); 12853 struct sk_buff * (*l3mdev_l3_rcv)(struct net_device *, struct sk_buff *, u16); 12854 struct sk_buff * (*l3mdev_l3_out)(struct net_device *, struct sock *, struct sk_buff *, u16); 12855 struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *, struct flowi6 *); 12856 }; 12857 12858 struct nd_opt_hdr; 12859 12860 struct ndisc_options; 12861 12862 struct prefix_info; 12863 12864 struct ndisc_ops { 12865 int (*is_useropt)(u8); 12866 int (*parse_options)(const struct net_device *, struct nd_opt_hdr *, struct ndisc_options *); 12867 void (*update)(const struct net_device *, struct neighbour *, u32, u8, const struct ndisc_options *); 12868 int (*opt_addr_space)(const struct net_device *, u8, struct neighbour *, u8 *, u8 **); 12869 void (*fill_addr_option)(const struct net_device *, struct sk_buff *, u8, const u8 *); 12870 void (*prefix_rcv_add_addr)(struct net *, struct net_device *, const struct prefix_info *, struct inet6_dev *, struct in6_addr *, int, u32, bool, bool, __u32, u32, bool); 12871 }; 12872 12873 enum tls_offload_ctx_dir { 12874 TLS_OFFLOAD_CTX_DIR_RX = 0, 12875 TLS_OFFLOAD_CTX_DIR_TX = 1, 12876 }; 12877 12878 struct tls_crypto_info; 12879 12880 struct tls_context; 12881 12882 struct tlsdev_ops { 12883 int (*tls_dev_add)(struct net_device *, struct sock *, enum tls_offload_ctx_dir, struct tls_crypto_info *, u32); 12884 void (*tls_dev_del)(struct net_device *, struct tls_context *, enum tls_offload_ctx_dir); 12885 int (*tls_dev_resync)(struct net_device *, struct sock *, u32, u8 *, enum tls_offload_ctx_dir); 12886 }; 12887 12888 struct ipv6_devstat { 12889 struct proc_dir_entry *proc_dir_entry; 12890 struct ipstats_mib *ipv6; 12891 struct icmpv6_mib_device *icmpv6dev; 12892 struct icmpv6msg_mib_device *icmpv6msgdev; 12893 }; 12894 12895 struct ifmcaddr6; 12896 12897 struct ifacaddr6; 12898 12899 struct inet6_dev { 12900 struct net_device *dev; 12901 struct list_head addr_list; 12902 struct ifmcaddr6 *mc_list; 12903 struct ifmcaddr6 *mc_tomb; 12904 spinlock_t mc_lock; 12905 unsigned char mc_qrv; 12906 unsigned char mc_gq_running; 12907 unsigned char mc_ifc_count; 12908 unsigned char mc_dad_count; 12909 long unsigned int mc_v1_seen; 12910 long unsigned int mc_qi; 12911 long unsigned int mc_qri; 12912 long unsigned int mc_maxdelay; 12913 struct timer_list mc_gq_timer; 12914 struct timer_list mc_ifc_timer; 12915 struct timer_list mc_dad_timer; 12916 struct ifacaddr6 *ac_list; 12917 rwlock_t lock; 12918 refcount_t refcnt; 12919 __u32 if_flags; 12920 int dead; 12921 u32 desync_factor; 12922 struct list_head tempaddr_list; 12923 struct in6_addr token; 12924 struct neigh_parms *nd_parms; 12925 struct ipv6_devconf cnf; 12926 struct ipv6_devstat stats; 12927 struct timer_list rs_timer; 12928 __s32 rs_interval; 12929 __u8 rs_probes; 12930 long unsigned int tstamp; 12931 struct callback_head rcu; 12932 }; 12933 12934 struct tcf_proto; 12935 12936 struct tcf_block; 12937 12938 struct mini_Qdisc { 12939 struct tcf_proto *filter_list; 12940 struct tcf_block *block; 12941 struct gnet_stats_basic_cpu *cpu_bstats; 12942 struct gnet_stats_queue *cpu_qstats; 12943 struct callback_head rcu; 12944 }; 12945 12946 struct rtnl_link_ops { 12947 struct list_head list; 12948 const char *kind; 12949 size_t priv_size; 12950 void (*setup)(struct net_device *); 12951 bool netns_refund; 12952 unsigned int maxtype; 12953 const struct nla_policy *policy; 12954 int (*validate)(struct nlattr **, struct nlattr **, struct netlink_ext_ack *); 12955 int (*newlink)(struct net *, struct net_device *, struct nlattr **, struct nlattr **, struct netlink_ext_ack *); 12956 int (*changelink)(struct net_device *, struct nlattr **, struct nlattr **, struct netlink_ext_ack *); 12957 void (*dellink)(struct net_device *, struct list_head *); 12958 size_t (*get_size)(const struct net_device *); 12959 int (*fill_info)(struct sk_buff *, const struct net_device *); 12960 size_t (*get_xstats_size)(const struct net_device *); 12961 int (*fill_xstats)(struct sk_buff *, const struct net_device *); 12962 unsigned int (*get_num_tx_queues)(); 12963 unsigned int (*get_num_rx_queues)(); 12964 unsigned int slave_maxtype; 12965 const struct nla_policy *slave_policy; 12966 int (*slave_changelink)(struct net_device *, struct net_device *, struct nlattr **, struct nlattr **, struct netlink_ext_ack *); 12967 size_t (*get_slave_size)(const struct net_device *, const struct net_device *); 12968 int (*fill_slave_info)(struct sk_buff *, const struct net_device *, const struct net_device *); 12969 struct net * (*get_link_net)(const struct net_device *); 12970 size_t (*get_linkxstats_size)(const struct net_device *, int); 12971 int (*fill_linkxstats)(struct sk_buff *, const struct net_device *, int *, int); 12972 }; 12973 12974 struct udp_tunnel_nic_table_info { 12975 unsigned int n_entries; 12976 unsigned int tunnel_types; 12977 }; 12978 12979 struct udp_tunnel_nic_shared; 12980 12981 struct udp_tunnel_nic_info { 12982 int (*set_port)(struct net_device *, unsigned int, unsigned int, struct udp_tunnel_info *); 12983 int (*unset_port)(struct net_device *, unsigned int, unsigned int, struct udp_tunnel_info *); 12984 int (*sync_table)(struct net_device *, unsigned int); 12985 struct udp_tunnel_nic_shared *shared; 12986 unsigned int flags; 12987 struct udp_tunnel_nic_table_info tables[4]; 12988 }; 12989 12990 enum { 12991 RTAX_UNSPEC = 0, 12992 RTAX_LOCK = 1, 12993 RTAX_MTU = 2, 12994 RTAX_WINDOW = 3, 12995 RTAX_RTT = 4, 12996 RTAX_RTTVAR = 5, 12997 RTAX_SSTHRESH = 6, 12998 RTAX_CWND = 7, 12999 RTAX_ADVMSS = 8, 13000 RTAX_REORDERING = 9, 13001 RTAX_HOPLIMIT = 10, 13002 RTAX_INITCWND = 11, 13003 RTAX_FEATURES = 12, 13004 RTAX_RTO_MIN = 13, 13005 RTAX_INITRWND = 14, 13006 RTAX_QUICKACK = 15, 13007 RTAX_CC_ALGO = 16, 13008 RTAX_FASTOPEN_NO_COOKIE = 17, 13009 __RTAX_MAX = 18, 13010 }; 13011 13012 struct tcmsg { 13013 unsigned char tcm_family; 13014 unsigned char tcm__pad1; 13015 short unsigned int tcm__pad2; 13016 int tcm_ifindex; 13017 __u32 tcm_handle; 13018 __u32 tcm_parent; 13019 __u32 tcm_info; 13020 }; 13021 13022 struct gnet_stats_basic_cpu { 13023 struct gnet_stats_basic_packed bstats; 13024 struct u64_stats_sync syncp; 13025 }; 13026 13027 struct gnet_dump { 13028 spinlock_t *lock; 13029 struct sk_buff *skb; 13030 struct nlattr *tail; 13031 int compat_tc_stats; 13032 int compat_xstats; 13033 int padattr; 13034 void *xstats; 13035 int xstats_len; 13036 struct tc_stats tc_stats; 13037 }; 13038 13039 struct netlink_range_validation { 13040 u64 min; 13041 u64 max; 13042 }; 13043 13044 struct netlink_range_validation_signed { 13045 s64 min; 13046 s64 max; 13047 }; 13048 13049 enum flow_action_hw_stats_bit { 13050 FLOW_ACTION_HW_STATS_IMMEDIATE_BIT = 0, 13051 FLOW_ACTION_HW_STATS_DELAYED_BIT = 1, 13052 FLOW_ACTION_HW_STATS_DISABLED_BIT = 2, 13053 FLOW_ACTION_HW_STATS_NUM_BITS = 3, 13054 }; 13055 13056 struct flow_block { 13057 struct list_head cb_list; 13058 }; 13059 13060 typedef int flow_setup_cb_t(enum tc_setup_type, void *, void *); 13061 13062 struct qdisc_size_table { 13063 struct callback_head rcu; 13064 struct list_head list; 13065 struct tc_sizespec szopts; 13066 int refcnt; 13067 u16 data[0]; 13068 }; 13069 13070 struct Qdisc_class_ops; 13071 13072 struct Qdisc_ops { 13073 struct Qdisc_ops *next; 13074 const struct Qdisc_class_ops *cl_ops; 13075 char id[16]; 13076 int priv_size; 13077 unsigned int static_flags; 13078 int (*enqueue)(struct sk_buff *, struct Qdisc *, struct sk_buff **); 13079 struct sk_buff * (*dequeue)(struct Qdisc *); 13080 struct sk_buff * (*peek)(struct Qdisc *); 13081 int (*init)(struct Qdisc *, struct nlattr *, struct netlink_ext_ack *); 13082 void (*reset)(struct Qdisc *); 13083 void (*destroy)(struct Qdisc *); 13084 int (*change)(struct Qdisc *, struct nlattr *, struct netlink_ext_ack *); 13085 void (*attach)(struct Qdisc *); 13086 int (*change_tx_queue_len)(struct Qdisc *, unsigned int); 13087 int (*dump)(struct Qdisc *, struct sk_buff *); 13088 int (*dump_stats)(struct Qdisc *, struct gnet_dump *); 13089 void (*ingress_block_set)(struct Qdisc *, u32); 13090 void (*egress_block_set)(struct Qdisc *, u32); 13091 u32 (*ingress_block_get)(struct Qdisc *); 13092 u32 (*egress_block_get)(struct Qdisc *); 13093 struct module *owner; 13094 }; 13095 13096 struct qdisc_walker; 13097 13098 struct Qdisc_class_ops { 13099 unsigned int flags; 13100 struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); 13101 int (*graft)(struct Qdisc *, long unsigned int, struct Qdisc *, struct Qdisc **, struct netlink_ext_ack *); 13102 struct Qdisc * (*leaf)(struct Qdisc *, long unsigned int); 13103 void (*qlen_notify)(struct Qdisc *, long unsigned int); 13104 long unsigned int (*find)(struct Qdisc *, u32); 13105 int (*change)(struct Qdisc *, u32, u32, struct nlattr **, long unsigned int *, struct netlink_ext_ack *); 13106 int (*delete)(struct Qdisc *, long unsigned int); 13107 void (*walk)(struct Qdisc *, struct qdisc_walker *); 13108 struct tcf_block * (*tcf_block)(struct Qdisc *, long unsigned int, struct netlink_ext_ack *); 13109 long unsigned int (*bind_tcf)(struct Qdisc *, long unsigned int, u32); 13110 void (*unbind_tcf)(struct Qdisc *, long unsigned int); 13111 int (*dump)(struct Qdisc *, long unsigned int, struct sk_buff *, struct tcmsg *); 13112 int (*dump_stats)(struct Qdisc *, long unsigned int, struct gnet_dump *); 13113 }; 13114 13115 struct tcf_chain; 13116 13117 struct tcf_block { 13118 struct mutex lock; 13119 struct list_head chain_list; 13120 u32 index; 13121 u32 classid; 13122 refcount_t refcnt; 13123 struct net *net; 13124 struct Qdisc *q; 13125 struct rw_semaphore cb_lock; 13126 struct flow_block flow_block; 13127 struct list_head owner_list; 13128 bool keep_dst; 13129 atomic_t offloadcnt; 13130 unsigned int nooffloaddevcnt; 13131 unsigned int lockeddevcnt; 13132 struct { 13133 struct tcf_chain *chain; 13134 struct list_head filter_chain_list; 13135 } chain0; 13136 struct callback_head rcu; 13137 struct hlist_head proto_destroy_ht[128]; 13138 struct mutex proto_destroy_lock; 13139 }; 13140 13141 struct tcf_result; 13142 13143 struct tcf_proto_ops; 13144 13145 struct tcf_proto { 13146 struct tcf_proto *next; 13147 void *root; 13148 int (*classify)(struct sk_buff *, const struct tcf_proto *, struct tcf_result *); 13149 __be16 protocol; 13150 u32 prio; 13151 void *data; 13152 const struct tcf_proto_ops *ops; 13153 struct tcf_chain *chain; 13154 spinlock_t lock; 13155 bool deleting; 13156 refcount_t refcnt; 13157 struct callback_head rcu; 13158 struct hlist_node destroy_ht_node; 13159 }; 13160 13161 struct tcf_result { 13162 union { 13163 struct { 13164 long unsigned int class; 13165 u32 classid; 13166 }; 13167 const struct tcf_proto *goto_tp; 13168 struct { 13169 bool ingress; 13170 struct gnet_stats_queue *qstats; 13171 }; 13172 }; 13173 }; 13174 13175 struct tcf_walker; 13176 13177 struct tcf_proto_ops { 13178 struct list_head head; 13179 char kind[16]; 13180 int (*classify)(struct sk_buff *, const struct tcf_proto *, struct tcf_result *); 13181 int (*init)(struct tcf_proto *); 13182 void (*destroy)(struct tcf_proto *, bool, struct netlink_ext_ack *); 13183 void * (*get)(struct tcf_proto *, u32); 13184 void (*put)(struct tcf_proto *, void *); 13185 int (*change)(struct net *, struct sk_buff *, struct tcf_proto *, long unsigned int, u32, struct nlattr **, void **, bool, bool, struct netlink_ext_ack *); 13186 int (*delete)(struct tcf_proto *, void *, bool *, bool, struct netlink_ext_ack *); 13187 bool (*delete_empty)(struct tcf_proto *); 13188 void (*walk)(struct tcf_proto *, struct tcf_walker *, bool); 13189 int (*reoffload)(struct tcf_proto *, bool, flow_setup_cb_t *, void *, struct netlink_ext_ack *); 13190 void (*hw_add)(struct tcf_proto *, void *); 13191 void (*hw_del)(struct tcf_proto *, void *); 13192 void (*bind_class)(void *, u32, long unsigned int, void *, long unsigned int); 13193 void * (*tmplt_create)(struct net *, struct tcf_chain *, struct nlattr **, struct netlink_ext_ack *); 13194 void (*tmplt_destroy)(void *); 13195 int (*dump)(struct net *, struct tcf_proto *, void *, struct sk_buff *, struct tcmsg *, bool); 13196 int (*terse_dump)(struct net *, struct tcf_proto *, void *, struct sk_buff *, struct tcmsg *, bool); 13197 int (*tmplt_dump)(struct sk_buff *, struct net *, void *); 13198 struct module *owner; 13199 int flags; 13200 }; 13201 13202 struct tcf_chain { 13203 struct mutex filter_chain_lock; 13204 struct tcf_proto *filter_chain; 13205 struct list_head list; 13206 struct tcf_block *block; 13207 u32 index; 13208 unsigned int refcnt; 13209 unsigned int action_refcnt; 13210 bool explicitly_created; 13211 bool flushing; 13212 const struct tcf_proto_ops *tmplt_ops; 13213 void *tmplt_priv; 13214 struct callback_head rcu; 13215 }; 13216 13217 struct sock_fprog_kern { 13218 u16 len; 13219 struct sock_filter *filter; 13220 }; 13221 13222 struct sk_filter { 13223 refcount_t refcnt; 13224 struct callback_head rcu; 13225 struct bpf_prog *prog; 13226 }; 13227 13228 enum { 13229 NEIGH_VAR_MCAST_PROBES = 0, 13230 NEIGH_VAR_UCAST_PROBES = 1, 13231 NEIGH_VAR_APP_PROBES = 2, 13232 NEIGH_VAR_MCAST_REPROBES = 3, 13233 NEIGH_VAR_RETRANS_TIME = 4, 13234 NEIGH_VAR_BASE_REACHABLE_TIME = 5, 13235 NEIGH_VAR_DELAY_PROBE_TIME = 6, 13236 NEIGH_VAR_GC_STALETIME = 7, 13237 NEIGH_VAR_QUEUE_LEN_BYTES = 8, 13238 NEIGH_VAR_PROXY_QLEN = 9, 13239 NEIGH_VAR_ANYCAST_DELAY = 10, 13240 NEIGH_VAR_PROXY_DELAY = 11, 13241 NEIGH_VAR_LOCKTIME = 12, 13242 NEIGH_VAR_QUEUE_LEN = 13, 13243 NEIGH_VAR_RETRANS_TIME_MS = 14, 13244 NEIGH_VAR_BASE_REACHABLE_TIME_MS = 15, 13245 NEIGH_VAR_GC_INTERVAL = 16, 13246 NEIGH_VAR_GC_THRESH1 = 17, 13247 NEIGH_VAR_GC_THRESH2 = 18, 13248 NEIGH_VAR_GC_THRESH3 = 19, 13249 NEIGH_VAR_MAX = 20, 13250 }; 13251 13252 struct pneigh_entry; 13253 13254 struct neigh_statistics; 13255 13256 struct neigh_hash_table; 13257 13258 struct neigh_table { 13259 int family; 13260 unsigned int entry_size; 13261 unsigned int key_len; 13262 __be16 protocol; 13263 __u32 (*hash)(const void *, const struct net_device *, __u32 *); 13264 bool (*key_eq)(const struct neighbour *, const void *); 13265 int (*constructor)(struct neighbour *); 13266 int (*pconstructor)(struct pneigh_entry *); 13267 void (*pdestructor)(struct pneigh_entry *); 13268 void (*proxy_redo)(struct sk_buff *); 13269 int (*is_multicast)(const void *); 13270 bool (*allow_add)(const struct net_device *, struct netlink_ext_ack *); 13271 char *id; 13272 struct neigh_parms parms; 13273 struct list_head parms_list; 13274 int gc_interval; 13275 int gc_thresh1; 13276 int gc_thresh2; 13277 int gc_thresh3; 13278 long unsigned int last_flush; 13279 struct delayed_work gc_work; 13280 struct timer_list proxy_timer; 13281 struct sk_buff_head proxy_queue; 13282 atomic_t entries; 13283 atomic_t gc_entries; 13284 struct list_head gc_list; 13285 rwlock_t lock; 13286 long unsigned int last_rand; 13287 struct neigh_statistics *stats; 13288 struct neigh_hash_table *nht; 13289 struct pneigh_entry **phash_buckets; 13290 }; 13291 13292 struct neigh_statistics { 13293 long unsigned int allocs; 13294 long unsigned int destroys; 13295 long unsigned int hash_grows; 13296 long unsigned int res_failed; 13297 long unsigned int lookups; 13298 long unsigned int hits; 13299 long unsigned int rcv_probes_mcast; 13300 long unsigned int rcv_probes_ucast; 13301 long unsigned int periodic_gc_runs; 13302 long unsigned int forced_gc_runs; 13303 long unsigned int unres_discards; 13304 long unsigned int table_fulls; 13305 }; 13306 13307 struct neigh_ops { 13308 int family; 13309 void (*solicit)(struct neighbour *, struct sk_buff *); 13310 void (*error_report)(struct neighbour *, struct sk_buff *); 13311 int (*output)(struct neighbour *, struct sk_buff *); 13312 int (*connected_output)(struct neighbour *, struct sk_buff *); 13313 }; 13314 13315 struct pneigh_entry { 13316 struct pneigh_entry *next; 13317 possible_net_t net; 13318 struct net_device *dev; 13319 u8 flags; 13320 u8 protocol; 13321 u8 key[0]; 13322 }; 13323 13324 struct neigh_hash_table { 13325 struct neighbour **hash_buckets; 13326 unsigned int hash_shift; 13327 __u32 hash_rnd[4]; 13328 struct callback_head rcu; 13329 }; 13330 13331 enum { 13332 TCP_ESTABLISHED = 1, 13333 TCP_SYN_SENT = 2, 13334 TCP_SYN_RECV = 3, 13335 TCP_FIN_WAIT1 = 4, 13336 TCP_FIN_WAIT2 = 5, 13337 TCP_TIME_WAIT = 6, 13338 TCP_CLOSE = 7, 13339 TCP_CLOSE_WAIT = 8, 13340 TCP_LAST_ACK = 9, 13341 TCP_LISTEN = 10, 13342 TCP_CLOSING = 11, 13343 TCP_NEW_SYN_RECV = 12, 13344 TCP_MAX_STATES = 13, 13345 }; 13346 13347 struct fib_rule_hdr { 13348 __u8 family; 13349 __u8 dst_len; 13350 __u8 src_len; 13351 __u8 tos; 13352 __u8 table; 13353 __u8 res1; 13354 __u8 res2; 13355 __u8 action; 13356 __u32 flags; 13357 }; 13358 13359 struct fib_rule_port_range { 13360 __u16 start; 13361 __u16 end; 13362 }; 13363 13364 struct fib_kuid_range { 13365 kuid_t start; 13366 kuid_t end; 13367 }; 13368 13369 struct fib_rule { 13370 struct list_head list; 13371 int iifindex; 13372 int oifindex; 13373 u32 mark; 13374 u32 mark_mask; 13375 u32 flags; 13376 u32 table; 13377 u8 action; 13378 u8 l3mdev; 13379 u8 proto; 13380 u8 ip_proto; 13381 u32 target; 13382 __be64 tun_id; 13383 struct fib_rule *ctarget; 13384 struct net *fr_net; 13385 refcount_t refcnt; 13386 u32 pref; 13387 int suppress_ifgroup; 13388 int suppress_prefixlen; 13389 char iifname[16]; 13390 char oifname[16]; 13391 struct fib_kuid_range uid_range; 13392 struct fib_rule_port_range sport_range; 13393 struct fib_rule_port_range dport_range; 13394 struct callback_head rcu; 13395 }; 13396 13397 struct fib_lookup_arg { 13398 void *lookup_ptr; 13399 const void *lookup_data; 13400 void *result; 13401 struct fib_rule *rule; 13402 u32 table; 13403 int flags; 13404 }; 13405 13406 struct smc_hashinfo; 13407 13408 struct request_sock_ops; 13409 13410 struct timewait_sock_ops; 13411 13412 struct udp_table; 13413 13414 struct raw_hashinfo; 13415 13416 struct proto { 13417 void (*close)(struct sock *, long int); 13418 int (*pre_connect)(struct sock *, struct sockaddr *, int); 13419 int (*connect)(struct sock *, struct sockaddr *, int); 13420 int (*disconnect)(struct sock *, int); 13421 struct sock * (*accept)(struct sock *, int, int *, bool); 13422 int (*ioctl)(struct sock *, int, long unsigned int); 13423 int (*init)(struct sock *); 13424 void (*destroy)(struct sock *); 13425 void (*shutdown)(struct sock *, int); 13426 int (*setsockopt)(struct sock *, int, int, sockptr_t, unsigned int); 13427 int (*getsockopt)(struct sock *, int, int, char *, int *); 13428 void (*keepalive)(struct sock *, int); 13429 int (*compat_ioctl)(struct sock *, unsigned int, long unsigned int); 13430 int (*sendmsg)(struct sock *, struct msghdr *, size_t); 13431 int (*recvmsg)(struct sock *, struct msghdr *, size_t, int, int, int *); 13432 int (*sendpage)(struct sock *, struct page *, int, size_t, int); 13433 int (*bind)(struct sock *, struct sockaddr *, int); 13434 int (*bind_add)(struct sock *, struct sockaddr *, int); 13435 int (*backlog_rcv)(struct sock *, struct sk_buff *); 13436 void (*release_cb)(struct sock *); 13437 int (*hash)(struct sock *); 13438 void (*unhash)(struct sock *); 13439 void (*rehash)(struct sock *); 13440 int (*get_port)(struct sock *, short unsigned int); 13441 unsigned int inuse_idx; 13442 bool (*stream_memory_free)(const struct sock *, int); 13443 bool (*stream_memory_read)(const struct sock *); 13444 void (*enter_memory_pressure)(struct sock *); 13445 void (*leave_memory_pressure)(struct sock *); 13446 atomic_long_t *memory_allocated; 13447 struct percpu_counter *sockets_allocated; 13448 long unsigned int *memory_pressure; 13449 long int *sysctl_mem; 13450 int *sysctl_wmem; 13451 int *sysctl_rmem; 13452 u32 sysctl_wmem_offset; 13453 u32 sysctl_rmem_offset; 13454 int max_header; 13455 bool no_autobind; 13456 struct kmem_cache *slab; 13457 unsigned int obj_size; 13458 slab_flags_t slab_flags; 13459 unsigned int useroffset; 13460 unsigned int usersize; 13461 struct percpu_counter *orphan_count; 13462 struct request_sock_ops *rsk_prot; 13463 struct timewait_sock_ops *twsk_prot; 13464 union { 13465 struct inet_hashinfo *hashinfo; 13466 struct udp_table *udp_table; 13467 struct raw_hashinfo *raw_hash; 13468 struct smc_hashinfo *smc_hash; 13469 } h; 13470 struct module *owner; 13471 char name[32]; 13472 struct list_head node; 13473 int (*diag_destroy)(struct sock *, int); 13474 }; 13475 13476 struct request_sock; 13477 13478 struct request_sock_ops { 13479 int family; 13480 unsigned int obj_size; 13481 struct kmem_cache *slab; 13482 char *slab_name; 13483 int (*rtx_syn_ack)(const struct sock *, struct request_sock *); 13484 void (*send_ack)(const struct sock *, struct sk_buff *, struct request_sock *); 13485 void (*send_reset)(const struct sock *, struct sk_buff *); 13486 void (*destructor)(struct request_sock *); 13487 void (*syn_ack_timeout)(const struct request_sock *); 13488 }; 13489 13490 struct timewait_sock_ops { 13491 struct kmem_cache *twsk_slab; 13492 char *twsk_slab_name; 13493 unsigned int twsk_obj_size; 13494 int (*twsk_unique)(struct sock *, struct sock *, void *); 13495 void (*twsk_destructor)(struct sock *); 13496 }; 13497 13498 struct saved_syn; 13499 13500 struct request_sock { 13501 struct sock_common __req_common; 13502 struct request_sock *dl_next; 13503 u16 mss; 13504 u8 num_retrans; 13505 u8 syncookie: 1; 13506 u8 num_timeout: 7; 13507 u32 ts_recent; 13508 struct timer_list rsk_timer; 13509 const struct request_sock_ops *rsk_ops; 13510 struct sock *sk; 13511 struct saved_syn *saved_syn; 13512 u32 secid; 13513 u32 peer_secid; 13514 }; 13515 13516 struct saved_syn { 13517 u32 mac_hdrlen; 13518 u32 network_hdrlen; 13519 u32 tcp_hdrlen; 13520 u8 data[0]; 13521 }; 13522 13523 enum tsq_enum { 13524 TSQ_THROTTLED = 0, 13525 TSQ_QUEUED = 1, 13526 TCP_TSQ_DEFERRED = 2, 13527 TCP_WRITE_TIMER_DEFERRED = 3, 13528 TCP_DELACK_TIMER_DEFERRED = 4, 13529 TCP_MTU_REDUCED_DEFERRED = 5, 13530 }; 13531 13532 struct ip6_sf_list { 13533 struct ip6_sf_list *sf_next; 13534 struct in6_addr sf_addr; 13535 long unsigned int sf_count[2]; 13536 unsigned char sf_gsresp; 13537 unsigned char sf_oldin; 13538 unsigned char sf_crcount; 13539 }; 13540 13541 struct ifmcaddr6 { 13542 struct in6_addr mca_addr; 13543 struct inet6_dev *idev; 13544 struct ifmcaddr6 *next; 13545 struct ip6_sf_list *mca_sources; 13546 struct ip6_sf_list *mca_tomb; 13547 unsigned int mca_sfmode; 13548 unsigned char mca_crcount; 13549 long unsigned int mca_sfcount[2]; 13550 struct timer_list mca_timer; 13551 unsigned int mca_flags; 13552 int mca_users; 13553 refcount_t mca_refcnt; 13554 spinlock_t mca_lock; 13555 long unsigned int mca_cstamp; 13556 long unsigned int mca_tstamp; 13557 }; 13558 13559 struct ifacaddr6 { 13560 struct in6_addr aca_addr; 13561 struct fib6_info *aca_rt; 13562 struct ifacaddr6 *aca_next; 13563 struct hlist_node aca_addr_lst; 13564 int aca_users; 13565 refcount_t aca_refcnt; 13566 long unsigned int aca_cstamp; 13567 long unsigned int aca_tstamp; 13568 struct callback_head rcu; 13569 }; 13570 13571 enum { 13572 __ND_OPT_PREFIX_INFO_END = 0, 13573 ND_OPT_SOURCE_LL_ADDR = 1, 13574 ND_OPT_TARGET_LL_ADDR = 2, 13575 ND_OPT_PREFIX_INFO = 3, 13576 ND_OPT_REDIRECT_HDR = 4, 13577 ND_OPT_MTU = 5, 13578 ND_OPT_NONCE = 14, 13579 __ND_OPT_ARRAY_MAX = 15, 13580 ND_OPT_ROUTE_INFO = 24, 13581 ND_OPT_RDNSS = 25, 13582 ND_OPT_DNSSL = 31, 13583 ND_OPT_6CO = 34, 13584 ND_OPT_CAPTIVE_PORTAL = 37, 13585 ND_OPT_PREF64 = 38, 13586 __ND_OPT_MAX = 39, 13587 }; 13588 13589 struct nd_opt_hdr { 13590 __u8 nd_opt_type; 13591 __u8 nd_opt_len; 13592 }; 13593 13594 struct ndisc_options { 13595 struct nd_opt_hdr *nd_opt_array[15]; 13596 struct nd_opt_hdr *nd_opts_ri; 13597 struct nd_opt_hdr *nd_opts_ri_end; 13598 struct nd_opt_hdr *nd_useropts; 13599 struct nd_opt_hdr *nd_useropts_end; 13600 struct nd_opt_hdr *nd_802154_opt_array[3]; 13601 }; 13602 13603 struct prefix_info { 13604 __u8 type; 13605 __u8 length; 13606 __u8 prefix_len; 13607 __u8 reserved: 6; 13608 __u8 autoconf: 1; 13609 __u8 onlink: 1; 13610 __be32 valid; 13611 __be32 prefered; 13612 __be32 reserved2; 13613 struct in6_addr prefix; 13614 }; 13615 13616 enum nfs_opnum4 { 13617 OP_ACCESS = 3, 13618 OP_CLOSE = 4, 13619 OP_COMMIT = 5, 13620 OP_CREATE = 6, 13621 OP_DELEGPURGE = 7, 13622 OP_DELEGRETURN = 8, 13623 OP_GETATTR = 9, 13624 OP_GETFH = 10, 13625 OP_LINK = 11, 13626 OP_LOCK = 12, 13627 OP_LOCKT = 13, 13628 OP_LOCKU = 14, 13629 OP_LOOKUP = 15, 13630 OP_LOOKUPP = 16, 13631 OP_NVERIFY = 17, 13632 OP_OPEN = 18, 13633 OP_OPENATTR = 19, 13634 OP_OPEN_CONFIRM = 20, 13635 OP_OPEN_DOWNGRADE = 21, 13636 OP_PUTFH = 22, 13637 OP_PUTPUBFH = 23, 13638 OP_PUTROOTFH = 24, 13639 OP_READ = 25, 13640 OP_READDIR = 26, 13641 OP_READLINK = 27, 13642 OP_REMOVE = 28, 13643 OP_RENAME = 29, 13644 OP_RENEW = 30, 13645 OP_RESTOREFH = 31, 13646 OP_SAVEFH = 32, 13647 OP_SECINFO = 33, 13648 OP_SETATTR = 34, 13649 OP_SETCLIENTID = 35, 13650 OP_SETCLIENTID_CONFIRM = 36, 13651 OP_VERIFY = 37, 13652 OP_WRITE = 38, 13653 OP_RELEASE_LOCKOWNER = 39, 13654 OP_BACKCHANNEL_CTL = 40, 13655 OP_BIND_CONN_TO_SESSION = 41, 13656 OP_EXCHANGE_ID = 42, 13657 OP_CREATE_SESSION = 43, 13658 OP_DESTROY_SESSION = 44, 13659 OP_FREE_STATEID = 45, 13660 OP_GET_DIR_DELEGATION = 46, 13661 OP_GETDEVICEINFO = 47, 13662 OP_GETDEVICELIST = 48, 13663 OP_LAYOUTCOMMIT = 49, 13664 OP_LAYOUTGET = 50, 13665 OP_LAYOUTRETURN = 51, 13666 OP_SECINFO_NO_NAME = 52, 13667 OP_SEQUENCE = 53, 13668 OP_SET_SSV = 54, 13669 OP_TEST_STATEID = 55, 13670 OP_WANT_DELEGATION = 56, 13671 OP_DESTROY_CLIENTID = 57, 13672 OP_RECLAIM_COMPLETE = 58, 13673 OP_ALLOCATE = 59, 13674 OP_COPY = 60, 13675 OP_COPY_NOTIFY = 61, 13676 OP_DEALLOCATE = 62, 13677 OP_IO_ADVISE = 63, 13678 OP_LAYOUTERROR = 64, 13679 OP_LAYOUTSTATS = 65, 13680 OP_OFFLOAD_CANCEL = 66, 13681 OP_OFFLOAD_STATUS = 67, 13682 OP_READ_PLUS = 68, 13683 OP_SEEK = 69, 13684 OP_WRITE_SAME = 70, 13685 OP_CLONE = 71, 13686 OP_GETXATTR = 72, 13687 OP_SETXATTR = 73, 13688 OP_LISTXATTRS = 74, 13689 OP_REMOVEXATTR = 75, 13690 OP_ILLEGAL = 10044, 13691 }; 13692 13693 enum perf_branch_sample_type_shift { 13694 PERF_SAMPLE_BRANCH_USER_SHIFT = 0, 13695 PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 1, 13696 PERF_SAMPLE_BRANCH_HV_SHIFT = 2, 13697 PERF_SAMPLE_BRANCH_ANY_SHIFT = 3, 13698 PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 4, 13699 PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 5, 13700 PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 6, 13701 PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 7, 13702 PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 8, 13703 PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 9, 13704 PERF_SAMPLE_BRANCH_COND_SHIFT = 10, 13705 PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 11, 13706 PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 12, 13707 PERF_SAMPLE_BRANCH_CALL_SHIFT = 13, 13708 PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 14, 13709 PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 15, 13710 PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, 13711 PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 17, 13712 PERF_SAMPLE_BRANCH_MAX_SHIFT = 18, 13713 }; 13714 13715 enum exception_stack_ordering { 13716 ESTACK_DF = 0, 13717 ESTACK_NMI = 1, 13718 ESTACK_DB = 2, 13719 ESTACK_MCE = 3, 13720 ESTACK_VC = 4, 13721 ESTACK_VC2 = 5, 13722 N_EXCEPTION_STACKS = 6, 13723 }; 13724 13725 enum { 13726 TSK_TRACE_FL_TRACE_BIT = 0, 13727 TSK_TRACE_FL_GRAPH_BIT = 1, 13728 }; 13729 13730 struct uuidcmp { 13731 const char *uuid; 13732 int len; 13733 }; 13734 13735 struct subprocess_info { 13736 struct work_struct work; 13737 struct completion *complete; 13738 const char *path; 13739 char **argv; 13740 char **envp; 13741 int wait; 13742 int retval; 13743 int (*init)(struct subprocess_info *, struct cred *); 13744 void (*cleanup)(struct subprocess_info *); 13745 void *data; 13746 }; 13747 13748 typedef phys_addr_t resource_size_t; 13749 13750 struct resource { 13751 resource_size_t start; 13752 resource_size_t end; 13753 const char *name; 13754 long unsigned int flags; 13755 long unsigned int desc; 13756 struct resource *parent; 13757 struct resource *sibling; 13758 struct resource *child; 13759 }; 13760 13761 struct hash { 13762 int ino; 13763 int minor; 13764 int major; 13765 umode_t mode; 13766 struct hash *next; 13767 char name[4098]; 13768 }; 13769 13770 struct dir_entry { 13771 struct list_head list; 13772 char *name; 13773 time64_t mtime; 13774 }; 13775 13776 enum state { 13777 Start = 0, 13778 Collect = 1, 13779 GotHeader = 2, 13780 SkipIt = 3, 13781 GotName = 4, 13782 CopyFile = 5, 13783 GotSymlink = 6, 13784 Reset = 7, 13785 }; 13786 13787 typedef int (*decompress_fn)(unsigned char *, long int, long int (*)(void *, long unsigned int), long int (*)(void *, long unsigned int), unsigned char *, long int *, void (*)(char *)); 13788 13789 enum { 13790 HI_SOFTIRQ = 0, 13791 TIMER_SOFTIRQ = 1, 13792 NET_TX_SOFTIRQ = 2, 13793 NET_RX_SOFTIRQ = 3, 13794 BLOCK_SOFTIRQ = 4, 13795 IRQ_POLL_SOFTIRQ = 5, 13796 TASKLET_SOFTIRQ = 6, 13797 SCHED_SOFTIRQ = 7, 13798 HRTIMER_SOFTIRQ = 8, 13799 RCU_SOFTIRQ = 9, 13800 NR_SOFTIRQS = 10, 13801 }; 13802 13803 enum ucount_type { 13804 UCOUNT_USER_NAMESPACES = 0, 13805 UCOUNT_PID_NAMESPACES = 1, 13806 UCOUNT_UTS_NAMESPACES = 2, 13807 UCOUNT_IPC_NAMESPACES = 3, 13808 UCOUNT_NET_NAMESPACES = 4, 13809 UCOUNT_MNT_NAMESPACES = 5, 13810 UCOUNT_CGROUP_NAMESPACES = 6, 13811 UCOUNT_TIME_NAMESPACES = 7, 13812 UCOUNT_INOTIFY_INSTANCES = 8, 13813 UCOUNT_INOTIFY_WATCHES = 9, 13814 UCOUNT_COUNTS = 10, 13815 }; 13816 13817 enum flow_dissector_key_id { 13818 FLOW_DISSECTOR_KEY_CONTROL = 0, 13819 FLOW_DISSECTOR_KEY_BASIC = 1, 13820 FLOW_DISSECTOR_KEY_IPV4_ADDRS = 2, 13821 FLOW_DISSECTOR_KEY_IPV6_ADDRS = 3, 13822 FLOW_DISSECTOR_KEY_PORTS = 4, 13823 FLOW_DISSECTOR_KEY_PORTS_RANGE = 5, 13824 FLOW_DISSECTOR_KEY_ICMP = 6, 13825 FLOW_DISSECTOR_KEY_ETH_ADDRS = 7, 13826 FLOW_DISSECTOR_KEY_TIPC = 8, 13827 FLOW_DISSECTOR_KEY_ARP = 9, 13828 FLOW_DISSECTOR_KEY_VLAN = 10, 13829 FLOW_DISSECTOR_KEY_FLOW_LABEL = 11, 13830 FLOW_DISSECTOR_KEY_GRE_KEYID = 12, 13831 FLOW_DISSECTOR_KEY_MPLS_ENTROPY = 13, 13832 FLOW_DISSECTOR_KEY_ENC_KEYID = 14, 13833 FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS = 15, 13834 FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS = 16, 13835 FLOW_DISSECTOR_KEY_ENC_CONTROL = 17, 13836 FLOW_DISSECTOR_KEY_ENC_PORTS = 18, 13837 FLOW_DISSECTOR_KEY_MPLS = 19, 13838 FLOW_DISSECTOR_KEY_TCP = 20, 13839 FLOW_DISSECTOR_KEY_IP = 21, 13840 FLOW_DISSECTOR_KEY_CVLAN = 22, 13841 FLOW_DISSECTOR_KEY_ENC_IP = 23, 13842 FLOW_DISSECTOR_KEY_ENC_OPTS = 24, 13843 FLOW_DISSECTOR_KEY_META = 25, 13844 FLOW_DISSECTOR_KEY_CT = 26, 13845 FLOW_DISSECTOR_KEY_HASH = 27, 13846 FLOW_DISSECTOR_KEY_MAX = 28, 13847 }; 13848 13849 enum { 13850 IPSTATS_MIB_NUM = 0, 13851 IPSTATS_MIB_INPKTS = 1, 13852 IPSTATS_MIB_INOCTETS = 2, 13853 IPSTATS_MIB_INDELIVERS = 3, 13854 IPSTATS_MIB_OUTFORWDATAGRAMS = 4, 13855 IPSTATS_MIB_OUTPKTS = 5, 13856 IPSTATS_MIB_OUTOCTETS = 6, 13857 IPSTATS_MIB_INHDRERRORS = 7, 13858 IPSTATS_MIB_INTOOBIGERRORS = 8, 13859 IPSTATS_MIB_INNOROUTES = 9, 13860 IPSTATS_MIB_INADDRERRORS = 10, 13861 IPSTATS_MIB_INUNKNOWNPROTOS = 11, 13862 IPSTATS_MIB_INTRUNCATEDPKTS = 12, 13863 IPSTATS_MIB_INDISCARDS = 13, 13864 IPSTATS_MIB_OUTDISCARDS = 14, 13865 IPSTATS_MIB_OUTNOROUTES = 15, 13866 IPSTATS_MIB_REASMTIMEOUT = 16, 13867 IPSTATS_MIB_REASMREQDS = 17, 13868 IPSTATS_MIB_REASMOKS = 18, 13869 IPSTATS_MIB_REASMFAILS = 19, 13870 IPSTATS_MIB_FRAGOKS = 20, 13871 IPSTATS_MIB_FRAGFAILS = 21, 13872 IPSTATS_MIB_FRAGCREATES = 22, 13873 IPSTATS_MIB_INMCASTPKTS = 23, 13874 IPSTATS_MIB_OUTMCASTPKTS = 24, 13875 IPSTATS_MIB_INBCASTPKTS = 25, 13876 IPSTATS_MIB_OUTBCASTPKTS = 26, 13877 IPSTATS_MIB_INMCASTOCTETS = 27, 13878 IPSTATS_MIB_OUTMCASTOCTETS = 28, 13879 IPSTATS_MIB_INBCASTOCTETS = 29, 13880 IPSTATS_MIB_OUTBCASTOCTETS = 30, 13881 IPSTATS_MIB_CSUMERRORS = 31, 13882 IPSTATS_MIB_NOECTPKTS = 32, 13883 IPSTATS_MIB_ECT1PKTS = 33, 13884 IPSTATS_MIB_ECT0PKTS = 34, 13885 IPSTATS_MIB_CEPKTS = 35, 13886 IPSTATS_MIB_REASM_OVERLAPS = 36, 13887 __IPSTATS_MIB_MAX = 37, 13888 }; 13889 13890 enum { 13891 ICMP_MIB_NUM = 0, 13892 ICMP_MIB_INMSGS = 1, 13893 ICMP_MIB_INERRORS = 2, 13894 ICMP_MIB_INDESTUNREACHS = 3, 13895 ICMP_MIB_INTIMEEXCDS = 4, 13896 ICMP_MIB_INPARMPROBS = 5, 13897 ICMP_MIB_INSRCQUENCHS = 6, 13898 ICMP_MIB_INREDIRECTS = 7, 13899 ICMP_MIB_INECHOS = 8, 13900 ICMP_MIB_INECHOREPS = 9, 13901 ICMP_MIB_INTIMESTAMPS = 10, 13902 ICMP_MIB_INTIMESTAMPREPS = 11, 13903 ICMP_MIB_INADDRMASKS = 12, 13904 ICMP_MIB_INADDRMASKREPS = 13, 13905 ICMP_MIB_OUTMSGS = 14, 13906 ICMP_MIB_OUTERRORS = 15, 13907 ICMP_MIB_OUTDESTUNREACHS = 16, 13908 ICMP_MIB_OUTTIMEEXCDS = 17, 13909 ICMP_MIB_OUTPARMPROBS = 18, 13910 ICMP_MIB_OUTSRCQUENCHS = 19, 13911 ICMP_MIB_OUTREDIRECTS = 20, 13912 ICMP_MIB_OUTECHOS = 21, 13913 ICMP_MIB_OUTECHOREPS = 22, 13914 ICMP_MIB_OUTTIMESTAMPS = 23, 13915 ICMP_MIB_OUTTIMESTAMPREPS = 24, 13916 ICMP_MIB_OUTADDRMASKS = 25, 13917 ICMP_MIB_OUTADDRMASKREPS = 26, 13918 ICMP_MIB_CSUMERRORS = 27, 13919 __ICMP_MIB_MAX = 28, 13920 }; 13921 13922 enum { 13923 ICMP6_MIB_NUM = 0, 13924 ICMP6_MIB_INMSGS = 1, 13925 ICMP6_MIB_INERRORS = 2, 13926 ICMP6_MIB_OUTMSGS = 3, 13927 ICMP6_MIB_OUTERRORS = 4, 13928 ICMP6_MIB_CSUMERRORS = 5, 13929 __ICMP6_MIB_MAX = 6, 13930 }; 13931 13932 enum { 13933 TCP_MIB_NUM = 0, 13934 TCP_MIB_RTOALGORITHM = 1, 13935 TCP_MIB_RTOMIN = 2, 13936 TCP_MIB_RTOMAX = 3, 13937 TCP_MIB_MAXCONN = 4, 13938 TCP_MIB_ACTIVEOPENS = 5, 13939 TCP_MIB_PASSIVEOPENS = 6, 13940 TCP_MIB_ATTEMPTFAILS = 7, 13941 TCP_MIB_ESTABRESETS = 8, 13942 TCP_MIB_CURRESTAB = 9, 13943 TCP_MIB_INSEGS = 10, 13944 TCP_MIB_OUTSEGS = 11, 13945 TCP_MIB_RETRANSSEGS = 12, 13946 TCP_MIB_INERRS = 13, 13947 TCP_MIB_OUTRSTS = 14, 13948 TCP_MIB_CSUMERRORS = 15, 13949 __TCP_MIB_MAX = 16, 13950 }; 13951 13952 enum { 13953 UDP_MIB_NUM = 0, 13954 UDP_MIB_INDATAGRAMS = 1, 13955 UDP_MIB_NOPORTS = 2, 13956 UDP_MIB_INERRORS = 3, 13957 UDP_MIB_OUTDATAGRAMS = 4, 13958 UDP_MIB_RCVBUFERRORS = 5, 13959 UDP_MIB_SNDBUFERRORS = 6, 13960 UDP_MIB_CSUMERRORS = 7, 13961 UDP_MIB_IGNOREDMULTI = 8, 13962 UDP_MIB_MEMERRORS = 9, 13963 __UDP_MIB_MAX = 10, 13964 }; 13965 13966 enum { 13967 LINUX_MIB_NUM = 0, 13968 LINUX_MIB_SYNCOOKIESSENT = 1, 13969 LINUX_MIB_SYNCOOKIESRECV = 2, 13970 LINUX_MIB_SYNCOOKIESFAILED = 3, 13971 LINUX_MIB_EMBRYONICRSTS = 4, 13972 LINUX_MIB_PRUNECALLED = 5, 13973 LINUX_MIB_RCVPRUNED = 6, 13974 LINUX_MIB_OFOPRUNED = 7, 13975 LINUX_MIB_OUTOFWINDOWICMPS = 8, 13976 LINUX_MIB_LOCKDROPPEDICMPS = 9, 13977 LINUX_MIB_ARPFILTER = 10, 13978 LINUX_MIB_TIMEWAITED = 11, 13979 LINUX_MIB_TIMEWAITRECYCLED = 12, 13980 LINUX_MIB_TIMEWAITKILLED = 13, 13981 LINUX_MIB_PAWSACTIVEREJECTED = 14, 13982 LINUX_MIB_PAWSESTABREJECTED = 15, 13983 LINUX_MIB_DELAYEDACKS = 16, 13984 LINUX_MIB_DELAYEDACKLOCKED = 17, 13985 LINUX_MIB_DELAYEDACKLOST = 18, 13986 LINUX_MIB_LISTENOVERFLOWS = 19, 13987 LINUX_MIB_LISTENDROPS = 20, 13988 LINUX_MIB_TCPHPHITS = 21, 13989 LINUX_MIB_TCPPUREACKS = 22, 13990 LINUX_MIB_TCPHPACKS = 23, 13991 LINUX_MIB_TCPRENORECOVERY = 24, 13992 LINUX_MIB_TCPSACKRECOVERY = 25, 13993 LINUX_MIB_TCPSACKRENEGING = 26, 13994 LINUX_MIB_TCPSACKREORDER = 27, 13995 LINUX_MIB_TCPRENOREORDER = 28, 13996 LINUX_MIB_TCPTSREORDER = 29, 13997 LINUX_MIB_TCPFULLUNDO = 30, 13998 LINUX_MIB_TCPPARTIALUNDO = 31, 13999 LINUX_MIB_TCPDSACKUNDO = 32, 14000 LINUX_MIB_TCPLOSSUNDO = 33, 14001 LINUX_MIB_TCPLOSTRETRANSMIT = 34, 14002 LINUX_MIB_TCPRENOFAILURES = 35, 14003 LINUX_MIB_TCPSACKFAILURES = 36, 14004 LINUX_MIB_TCPLOSSFAILURES = 37, 14005 LINUX_MIB_TCPFASTRETRANS = 38, 14006 LINUX_MIB_TCPSLOWSTARTRETRANS = 39, 14007 LINUX_MIB_TCPTIMEOUTS = 40, 14008 LINUX_MIB_TCPLOSSPROBES = 41, 14009 LINUX_MIB_TCPLOSSPROBERECOVERY = 42, 14010 LINUX_MIB_TCPRENORECOVERYFAIL = 43, 14011 LINUX_MIB_TCPSACKRECOVERYFAIL = 44, 14012 LINUX_MIB_TCPRCVCOLLAPSED = 45, 14013 LINUX_MIB_TCPDSACKOLDSENT = 46, 14014 LINUX_MIB_TCPDSACKOFOSENT = 47, 14015 LINUX_MIB_TCPDSACKRECV = 48, 14016 LINUX_MIB_TCPDSACKOFORECV = 49, 14017 LINUX_MIB_TCPABORTONDATA = 50, 14018 LINUX_MIB_TCPABORTONCLOSE = 51, 14019 LINUX_MIB_TCPABORTONMEMORY = 52, 14020 LINUX_MIB_TCPABORTONTIMEOUT = 53, 14021 LINUX_MIB_TCPABORTONLINGER = 54, 14022 LINUX_MIB_TCPABORTFAILED = 55, 14023 LINUX_MIB_TCPMEMORYPRESSURES = 56, 14024 LINUX_MIB_TCPMEMORYPRESSURESCHRONO = 57, 14025 LINUX_MIB_TCPSACKDISCARD = 58, 14026 LINUX_MIB_TCPDSACKIGNOREDOLD = 59, 14027 LINUX_MIB_TCPDSACKIGNOREDNOUNDO = 60, 14028 LINUX_MIB_TCPSPURIOUSRTOS = 61, 14029 LINUX_MIB_TCPMD5NOTFOUND = 62, 14030 LINUX_MIB_TCPMD5UNEXPECTED = 63, 14031 LINUX_MIB_TCPMD5FAILURE = 64, 14032 LINUX_MIB_SACKSHIFTED = 65, 14033 LINUX_MIB_SACKMERGED = 66, 14034 LINUX_MIB_SACKSHIFTFALLBACK = 67, 14035 LINUX_MIB_TCPBACKLOGDROP = 68, 14036 LINUX_MIB_PFMEMALLOCDROP = 69, 14037 LINUX_MIB_TCPMINTTLDROP = 70, 14038 LINUX_MIB_TCPDEFERACCEPTDROP = 71, 14039 LINUX_MIB_IPRPFILTER = 72, 14040 LINUX_MIB_TCPTIMEWAITOVERFLOW = 73, 14041 LINUX_MIB_TCPREQQFULLDOCOOKIES = 74, 14042 LINUX_MIB_TCPREQQFULLDROP = 75, 14043 LINUX_MIB_TCPRETRANSFAIL = 76, 14044 LINUX_MIB_TCPRCVCOALESCE = 77, 14045 LINUX_MIB_TCPBACKLOGCOALESCE = 78, 14046 LINUX_MIB_TCPOFOQUEUE = 79, 14047 LINUX_MIB_TCPOFODROP = 80, 14048 LINUX_MIB_TCPOFOMERGE = 81, 14049 LINUX_MIB_TCPCHALLENGEACK = 82, 14050 LINUX_MIB_TCPSYNCHALLENGE = 83, 14051 LINUX_MIB_TCPFASTOPENACTIVE = 84, 14052 LINUX_MIB_TCPFASTOPENACTIVEFAIL = 85, 14053 LINUX_MIB_TCPFASTOPENPASSIVE = 86, 14054 LINUX_MIB_TCPFASTOPENPASSIVEFAIL = 87, 14055 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW = 88, 14056 LINUX_MIB_TCPFASTOPENCOOKIEREQD = 89, 14057 LINUX_MIB_TCPFASTOPENBLACKHOLE = 90, 14058 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES = 91, 14059 LINUX_MIB_BUSYPOLLRXPACKETS = 92, 14060 LINUX_MIB_TCPAUTOCORKING = 93, 14061 LINUX_MIB_TCPFROMZEROWINDOWADV = 94, 14062 LINUX_MIB_TCPTOZEROWINDOWADV = 95, 14063 LINUX_MIB_TCPWANTZEROWINDOWADV = 96, 14064 LINUX_MIB_TCPSYNRETRANS = 97, 14065 LINUX_MIB_TCPORIGDATASENT = 98, 14066 LINUX_MIB_TCPHYSTARTTRAINDETECT = 99, 14067 LINUX_MIB_TCPHYSTARTTRAINCWND = 100, 14068 LINUX_MIB_TCPHYSTARTDELAYDETECT = 101, 14069 LINUX_MIB_TCPHYSTARTDELAYCWND = 102, 14070 LINUX_MIB_TCPACKSKIPPEDSYNRECV = 103, 14071 LINUX_MIB_TCPACKSKIPPEDPAWS = 104, 14072 LINUX_MIB_TCPACKSKIPPEDSEQ = 105, 14073 LINUX_MIB_TCPACKSKIPPEDFINWAIT2 = 106, 14074 LINUX_MIB_TCPACKSKIPPEDTIMEWAIT = 107, 14075 LINUX_MIB_TCPACKSKIPPEDCHALLENGE = 108, 14076 LINUX_MIB_TCPWINPROBE = 109, 14077 LINUX_MIB_TCPKEEPALIVE = 110, 14078 LINUX_MIB_TCPMTUPFAIL = 111, 14079 LINUX_MIB_TCPMTUPSUCCESS = 112, 14080 LINUX_MIB_TCPDELIVERED = 113, 14081 LINUX_MIB_TCPDELIVEREDCE = 114, 14082 LINUX_MIB_TCPACKCOMPRESSED = 115, 14083 LINUX_MIB_TCPZEROWINDOWDROP = 116, 14084 LINUX_MIB_TCPRCVQDROP = 117, 14085 LINUX_MIB_TCPWQUEUETOOBIG = 118, 14086 LINUX_MIB_TCPFASTOPENPASSIVEALTKEY = 119, 14087 LINUX_MIB_TCPTIMEOUTREHASH = 120, 14088 LINUX_MIB_TCPDUPLICATEDATAREHASH = 121, 14089 LINUX_MIB_TCPDSACKRECVSEGS = 122, 14090 LINUX_MIB_TCPDSACKIGNOREDDUBIOUS = 123, 14091 __LINUX_MIB_MAX = 124, 14092 }; 14093 14094 enum { 14095 LINUX_MIB_XFRMNUM = 0, 14096 LINUX_MIB_XFRMINERROR = 1, 14097 LINUX_MIB_XFRMINBUFFERERROR = 2, 14098 LINUX_MIB_XFRMINHDRERROR = 3, 14099 LINUX_MIB_XFRMINNOSTATES = 4, 14100 LINUX_MIB_XFRMINSTATEPROTOERROR = 5, 14101 LINUX_MIB_XFRMINSTATEMODEERROR = 6, 14102 LINUX_MIB_XFRMINSTATESEQERROR = 7, 14103 LINUX_MIB_XFRMINSTATEEXPIRED = 8, 14104 LINUX_MIB_XFRMINSTATEMISMATCH = 9, 14105 LINUX_MIB_XFRMINSTATEINVALID = 10, 14106 LINUX_MIB_XFRMINTMPLMISMATCH = 11, 14107 LINUX_MIB_XFRMINNOPOLS = 12, 14108 LINUX_MIB_XFRMINPOLBLOCK = 13, 14109 LINUX_MIB_XFRMINPOLERROR = 14, 14110 LINUX_MIB_XFRMOUTERROR = 15, 14111 LINUX_MIB_XFRMOUTBUNDLEGENERROR = 16, 14112 LINUX_MIB_XFRMOUTBUNDLECHECKERROR = 17, 14113 LINUX_MIB_XFRMOUTNOSTATES = 18, 14114 LINUX_MIB_XFRMOUTSTATEPROTOERROR = 19, 14115 LINUX_MIB_XFRMOUTSTATEMODEERROR = 20, 14116 LINUX_MIB_XFRMOUTSTATESEQERROR = 21, 14117 LINUX_MIB_XFRMOUTSTATEEXPIRED = 22, 14118 LINUX_MIB_XFRMOUTPOLBLOCK = 23, 14119 LINUX_MIB_XFRMOUTPOLDEAD = 24, 14120 LINUX_MIB_XFRMOUTPOLERROR = 25, 14121 LINUX_MIB_XFRMFWDHDRERROR = 26, 14122 LINUX_MIB_XFRMOUTSTATEINVALID = 27, 14123 LINUX_MIB_XFRMACQUIREERROR = 28, 14124 __LINUX_MIB_XFRMMAX = 29, 14125 }; 14126 14127 enum { 14128 LINUX_MIB_TLSNUM = 0, 14129 LINUX_MIB_TLSCURRTXSW = 1, 14130 LINUX_MIB_TLSCURRRXSW = 2, 14131 LINUX_MIB_TLSCURRTXDEVICE = 3, 14132 LINUX_MIB_TLSCURRRXDEVICE = 4, 14133 LINUX_MIB_TLSTXSW = 5, 14134 LINUX_MIB_TLSRXSW = 6, 14135 LINUX_MIB_TLSTXDEVICE = 7, 14136 LINUX_MIB_TLSRXDEVICE = 8, 14137 LINUX_MIB_TLSDECRYPTERROR = 9, 14138 LINUX_MIB_TLSRXDEVICERESYNC = 10, 14139 __LINUX_MIB_TLSMAX = 11, 14140 }; 14141 14142 enum nf_inet_hooks { 14143 NF_INET_PRE_ROUTING = 0, 14144 NF_INET_LOCAL_IN = 1, 14145 NF_INET_FORWARD = 2, 14146 NF_INET_LOCAL_OUT = 3, 14147 NF_INET_POST_ROUTING = 4, 14148 NF_INET_NUMHOOKS = 5, 14149 NF_INET_INGRESS = 5, 14150 }; 14151 14152 enum { 14153 NFPROTO_UNSPEC = 0, 14154 NFPROTO_INET = 1, 14155 NFPROTO_IPV4 = 2, 14156 NFPROTO_ARP = 3, 14157 NFPROTO_NETDEV = 5, 14158 NFPROTO_BRIDGE = 7, 14159 NFPROTO_IPV6 = 10, 14160 NFPROTO_DECNET = 12, 14161 NFPROTO_NUMPROTO = 13, 14162 }; 14163 14164 enum tcp_conntrack { 14165 TCP_CONNTRACK_NONE = 0, 14166 TCP_CONNTRACK_SYN_SENT = 1, 14167 TCP_CONNTRACK_SYN_RECV = 2, 14168 TCP_CONNTRACK_ESTABLISHED = 3, 14169 TCP_CONNTRACK_FIN_WAIT = 4, 14170 TCP_CONNTRACK_CLOSE_WAIT = 5, 14171 TCP_CONNTRACK_LAST_ACK = 6, 14172 TCP_CONNTRACK_TIME_WAIT = 7, 14173 TCP_CONNTRACK_CLOSE = 8, 14174 TCP_CONNTRACK_LISTEN = 9, 14175 TCP_CONNTRACK_MAX = 10, 14176 TCP_CONNTRACK_IGNORE = 11, 14177 TCP_CONNTRACK_RETRANS = 12, 14178 TCP_CONNTRACK_UNACK = 13, 14179 TCP_CONNTRACK_TIMEOUT_MAX = 14, 14180 }; 14181 14182 enum ct_dccp_states { 14183 CT_DCCP_NONE = 0, 14184 CT_DCCP_REQUEST = 1, 14185 CT_DCCP_RESPOND = 2, 14186 CT_DCCP_PARTOPEN = 3, 14187 CT_DCCP_OPEN = 4, 14188 CT_DCCP_CLOSEREQ = 5, 14189 CT_DCCP_CLOSING = 6, 14190 CT_DCCP_TIMEWAIT = 7, 14191 CT_DCCP_IGNORE = 8, 14192 CT_DCCP_INVALID = 9, 14193 __CT_DCCP_MAX = 10, 14194 }; 14195 14196 enum ip_conntrack_dir { 14197 IP_CT_DIR_ORIGINAL = 0, 14198 IP_CT_DIR_REPLY = 1, 14199 IP_CT_DIR_MAX = 2, 14200 }; 14201 14202 enum sctp_conntrack { 14203 SCTP_CONNTRACK_NONE = 0, 14204 SCTP_CONNTRACK_CLOSED = 1, 14205 SCTP_CONNTRACK_COOKIE_WAIT = 2, 14206 SCTP_CONNTRACK_COOKIE_ECHOED = 3, 14207 SCTP_CONNTRACK_ESTABLISHED = 4, 14208 SCTP_CONNTRACK_SHUTDOWN_SENT = 5, 14209 SCTP_CONNTRACK_SHUTDOWN_RECD = 6, 14210 SCTP_CONNTRACK_SHUTDOWN_ACK_SENT = 7, 14211 SCTP_CONNTRACK_HEARTBEAT_SENT = 8, 14212 SCTP_CONNTRACK_HEARTBEAT_ACKED = 9, 14213 SCTP_CONNTRACK_MAX = 10, 14214 }; 14215 14216 enum udp_conntrack { 14217 UDP_CT_UNREPLIED = 0, 14218 UDP_CT_REPLIED = 1, 14219 UDP_CT_MAX = 2, 14220 }; 14221 14222 enum gre_conntrack { 14223 GRE_CT_UNREPLIED = 0, 14224 GRE_CT_REPLIED = 1, 14225 GRE_CT_MAX = 2, 14226 }; 14227 14228 enum { 14229 XFRM_POLICY_IN = 0, 14230 XFRM_POLICY_OUT = 1, 14231 XFRM_POLICY_FWD = 2, 14232 XFRM_POLICY_MASK = 3, 14233 XFRM_POLICY_MAX = 3, 14234 }; 14235 14236 enum netns_bpf_attach_type { 14237 NETNS_BPF_INVALID = 4294967295, 14238 NETNS_BPF_FLOW_DISSECTOR = 0, 14239 NETNS_BPF_SK_LOOKUP = 1, 14240 MAX_NETNS_BPF_ATTACH_TYPE = 2, 14241 }; 14242 14243 enum skb_ext_id { 14244 SKB_EXT_BRIDGE_NF = 0, 14245 SKB_EXT_SEC_PATH = 1, 14246 TC_SKB_EXT = 2, 14247 SKB_EXT_MPTCP = 3, 14248 SKB_EXT_NUM = 4, 14249 }; 14250 14251 enum audit_ntp_type { 14252 AUDIT_NTP_OFFSET = 0, 14253 AUDIT_NTP_FREQ = 1, 14254 AUDIT_NTP_STATUS = 2, 14255 AUDIT_NTP_TAI = 3, 14256 AUDIT_NTP_TICK = 4, 14257 AUDIT_NTP_ADJUST = 5, 14258 AUDIT_NTP_NVALS = 6, 14259 }; 14260 14261 typedef long int (*sys_call_ptr_t)(const struct pt_regs *); 14262 14263 struct irq_stack { 14264 char stack[16384]; 14265 }; 14266 14267 struct io_bitmap { 14268 u64 sequence; 14269 refcount_t refcnt; 14270 unsigned int max; 14271 long unsigned int bitmap[1024]; 14272 }; 14273 14274 enum irqreturn { 14275 IRQ_NONE = 0, 14276 IRQ_HANDLED = 1, 14277 IRQ_WAKE_THREAD = 2, 14278 }; 14279 14280 typedef enum irqreturn irqreturn_t; 14281 14282 typedef struct { 14283 u16 __softirq_pending; 14284 u8 kvm_cpu_l1tf_flush_l1d; 14285 unsigned int __nmi_count; 14286 unsigned int apic_timer_irqs; 14287 unsigned int irq_spurious_count; 14288 unsigned int icr_read_retry_count; 14289 unsigned int kvm_posted_intr_ipis; 14290 unsigned int kvm_posted_intr_wakeup_ipis; 14291 unsigned int kvm_posted_intr_nested_ipis; 14292 unsigned int x86_platform_ipis; 14293 unsigned int apic_perf_irqs; 14294 unsigned int apic_irq_work_irqs; 14295 unsigned int irq_resched_count; 14296 unsigned int irq_call_count; 14297 unsigned int irq_tlb_count; 14298 unsigned int irq_thermal_count; 14299 unsigned int irq_threshold_count; 14300 unsigned int irq_deferred_error_count; 14301 unsigned int irq_hv_callback_count; 14302 unsigned int irq_hv_reenlightenment_count; 14303 unsigned int hyperv_stimer0_count; 14304 long: 64; 14305 long: 64; 14306 long: 64; 14307 long: 64; 14308 long: 64; 14309 long: 64; 14310 } irq_cpustat_t; 14311 14312 typedef irqreturn_t (*irq_handler_t)(int, void *); 14313 14314 struct irqaction { 14315 irq_handler_t handler; 14316 void *dev_id; 14317 void *percpu_dev_id; 14318 struct irqaction *next; 14319 irq_handler_t thread_fn; 14320 struct task_struct *thread; 14321 struct irqaction *secondary; 14322 unsigned int irq; 14323 unsigned int flags; 14324 long unsigned int thread_flags; 14325 long unsigned int thread_mask; 14326 const char *name; 14327 struct proc_dir_entry *dir; 14328 long: 64; 14329 long: 64; 14330 long: 64; 14331 long: 64; 14332 }; 14333 14334 struct irq_affinity_notify { 14335 unsigned int irq; 14336 struct kref kref; 14337 struct work_struct work; 14338 void (*notify)(struct irq_affinity_notify *, const cpumask_t *); 14339 void (*release)(struct kref *); 14340 }; 14341 14342 struct irq_affinity_desc { 14343 struct cpumask mask; 14344 unsigned int is_managed: 1; 14345 }; 14346 14347 enum irqchip_irq_state { 14348 IRQCHIP_STATE_PENDING = 0, 14349 IRQCHIP_STATE_ACTIVE = 1, 14350 IRQCHIP_STATE_MASKED = 2, 14351 IRQCHIP_STATE_LINE_LEVEL = 3, 14352 }; 14353 14354 enum { 14355 EI_ETYPE_NONE = 0, 14356 EI_ETYPE_NULL = 1, 14357 EI_ETYPE_ERRNO = 2, 14358 EI_ETYPE_ERRNO_NULL = 3, 14359 EI_ETYPE_TRUE = 4, 14360 }; 14361 14362 struct syscall_metadata { 14363 const char *name; 14364 int syscall_nr; 14365 int nb_args; 14366 const char **types; 14367 const char **args; 14368 struct list_head enter_fields; 14369 struct trace_event_call *enter_event; 14370 struct trace_event_call *exit_event; 14371 }; 14372 14373 struct irqentry_state { 14374 union { 14375 bool exit_rcu; 14376 bool lockdep; 14377 }; 14378 }; 14379 14380 typedef struct irqentry_state irqentry_state_t; 14381 14382 struct irq_desc; 14383 14384 typedef void (*irq_flow_handler_t)(struct irq_desc *); 14385 14386 struct msi_desc; 14387 14388 struct irq_common_data { 14389 unsigned int state_use_accessors; 14390 unsigned int node; 14391 void *handler_data; 14392 struct msi_desc *msi_desc; 14393 cpumask_var_t affinity; 14394 cpumask_var_t effective_affinity; 14395 }; 14396 14397 struct irq_chip; 14398 14399 struct irq_data { 14400 u32 mask; 14401 unsigned int irq; 14402 long unsigned int hwirq; 14403 struct irq_common_data *common; 14404 struct irq_chip *chip; 14405 struct irq_domain *domain; 14406 struct irq_data *parent_data; 14407 void *chip_data; 14408 }; 14409 14410 struct irq_desc { 14411 struct irq_common_data irq_common_data; 14412 struct irq_data irq_data; 14413 unsigned int *kstat_irqs; 14414 irq_flow_handler_t handle_irq; 14415 struct irqaction *action; 14416 unsigned int status_use_accessors; 14417 unsigned int core_internal_state__do_not_mess_with_it; 14418 unsigned int depth; 14419 unsigned int wake_depth; 14420 unsigned int tot_count; 14421 unsigned int irq_count; 14422 long unsigned int last_unhandled; 14423 unsigned int irqs_unhandled; 14424 atomic_t threads_handled; 14425 int threads_handled_last; 14426 raw_spinlock_t lock; 14427 struct cpumask *percpu_enabled; 14428 const struct cpumask *percpu_affinity; 14429 const struct cpumask *affinity_hint; 14430 struct irq_affinity_notify *affinity_notify; 14431 cpumask_var_t pending_mask; 14432 long unsigned int threads_oneshot; 14433 atomic_t threads_active; 14434 wait_queue_head_t wait_for_threads; 14435 unsigned int nr_actions; 14436 unsigned int no_suspend_depth; 14437 unsigned int cond_suspend_depth; 14438 unsigned int force_resume_depth; 14439 struct proc_dir_entry *dir; 14440 struct callback_head rcu; 14441 struct kobject kobj; 14442 struct mutex request_mutex; 14443 int parent_irq; 14444 struct module *owner; 14445 const char *name; 14446 long: 64; 14447 long: 64; 14448 long: 64; 14449 long: 64; 14450 long: 64; 14451 }; 14452 14453 struct x86_msi_addr_lo { 14454 union { 14455 struct { 14456 u32 reserved_0: 2; 14457 u32 dest_mode_logical: 1; 14458 u32 redirect_hint: 1; 14459 u32 reserved_1: 1; 14460 u32 virt_destid_8_14: 7; 14461 u32 destid_0_7: 8; 14462 u32 base_address: 12; 14463 }; 14464 struct { 14465 u32 dmar_reserved_0: 2; 14466 u32 dmar_index_15: 1; 14467 u32 dmar_subhandle_valid: 1; 14468 u32 dmar_format: 1; 14469 u32 dmar_index_0_14: 15; 14470 u32 dmar_base_address: 12; 14471 }; 14472 }; 14473 }; 14474 14475 typedef struct x86_msi_addr_lo arch_msi_msg_addr_lo_t; 14476 14477 struct x86_msi_addr_hi { 14478 u32 reserved: 8; 14479 u32 destid_8_31: 24; 14480 }; 14481 14482 typedef struct x86_msi_addr_hi arch_msi_msg_addr_hi_t; 14483 14484 struct x86_msi_data { 14485 u32 vector: 8; 14486 u32 delivery_mode: 3; 14487 u32 dest_mode_logical: 1; 14488 u32 reserved: 2; 14489 u32 active_low: 1; 14490 u32 is_level: 1; 14491 u32 dmar_subhandle; 14492 } __attribute__((packed)); 14493 14494 typedef struct x86_msi_data arch_msi_msg_data_t; 14495 14496 struct msi_msg { 14497 union { 14498 u32 address_lo; 14499 arch_msi_msg_addr_lo_t arch_addr_lo; 14500 }; 14501 union { 14502 u32 address_hi; 14503 arch_msi_msg_addr_hi_t arch_addr_hi; 14504 }; 14505 union { 14506 u32 data; 14507 arch_msi_msg_data_t arch_data; 14508 }; 14509 }; 14510 14511 struct platform_msi_priv_data; 14512 14513 struct platform_msi_desc { 14514 struct platform_msi_priv_data *msi_priv_data; 14515 u16 msi_index; 14516 }; 14517 14518 struct fsl_mc_msi_desc { 14519 u16 msi_index; 14520 }; 14521 14522 struct ti_sci_inta_msi_desc { 14523 u16 dev_index; 14524 }; 14525 14526 struct msi_desc { 14527 struct list_head list; 14528 unsigned int irq; 14529 unsigned int nvec_used; 14530 struct device *dev; 14531 struct msi_msg msg; 14532 struct irq_affinity_desc *affinity; 14533 const void *iommu_cookie; 14534 void (*write_msi_msg)(struct msi_desc *, void *); 14535 void *write_msi_msg_data; 14536 union { 14537 struct { 14538 u32 masked; 14539 struct { 14540 u8 is_msix: 1; 14541 u8 multiple: 3; 14542 u8 multi_cap: 3; 14543 u8 maskbit: 1; 14544 u8 is_64: 1; 14545 u8 is_virtual: 1; 14546 u16 entry_nr; 14547 unsigned int default_irq; 14548 } msi_attrib; 14549 union { 14550 u8 mask_pos; 14551 void *mask_base; 14552 }; 14553 }; 14554 struct platform_msi_desc platform; 14555 struct fsl_mc_msi_desc fsl_mc; 14556 struct ti_sci_inta_msi_desc inta; 14557 }; 14558 }; 14559 14560 struct irq_chip { 14561 struct device *parent_device; 14562 const char *name; 14563 unsigned int (*irq_startup)(struct irq_data *); 14564 void (*irq_shutdown)(struct irq_data *); 14565 void (*irq_enable)(struct irq_data *); 14566 void (*irq_disable)(struct irq_data *); 14567 void (*irq_ack)(struct irq_data *); 14568 void (*irq_mask)(struct irq_data *); 14569 void (*irq_mask_ack)(struct irq_data *); 14570 void (*irq_unmask)(struct irq_data *); 14571 void (*irq_eoi)(struct irq_data *); 14572 int (*irq_set_affinity)(struct irq_data *, const struct cpumask *, bool); 14573 int (*irq_retrigger)(struct irq_data *); 14574 int (*irq_set_type)(struct irq_data *, unsigned int); 14575 int (*irq_set_wake)(struct irq_data *, unsigned int); 14576 void (*irq_bus_lock)(struct irq_data *); 14577 void (*irq_bus_sync_unlock)(struct irq_data *); 14578 void (*irq_cpu_online)(struct irq_data *); 14579 void (*irq_cpu_offline)(struct irq_data *); 14580 void (*irq_suspend)(struct irq_data *); 14581 void (*irq_resume)(struct irq_data *); 14582 void (*irq_pm_shutdown)(struct irq_data *); 14583 void (*irq_calc_mask)(struct irq_data *); 14584 void (*irq_print_chip)(struct irq_data *, struct seq_file *); 14585 int (*irq_request_resources)(struct irq_data *); 14586 void (*irq_release_resources)(struct irq_data *); 14587 void (*irq_compose_msi_msg)(struct irq_data *, struct msi_msg *); 14588 void (*irq_write_msi_msg)(struct irq_data *, struct msi_msg *); 14589 int (*irq_get_irqchip_state)(struct irq_data *, enum irqchip_irq_state, bool *); 14590 int (*irq_set_irqchip_state)(struct irq_data *, enum irqchip_irq_state, bool); 14591 int (*irq_set_vcpu_affinity)(struct irq_data *, void *); 14592 void (*ipi_send_single)(struct irq_data *, unsigned int); 14593 void (*ipi_send_mask)(struct irq_data *, const struct cpumask *); 14594 int (*irq_nmi_setup)(struct irq_data *); 14595 void (*irq_nmi_teardown)(struct irq_data *); 14596 long unsigned int flags; 14597 }; 14598 14599 struct irq_chip_regs { 14600 long unsigned int enable; 14601 long unsigned int disable; 14602 long unsigned int mask; 14603 long unsigned int ack; 14604 long unsigned int eoi; 14605 long unsigned int type; 14606 long unsigned int polarity; 14607 }; 14608 14609 struct irq_chip_type { 14610 struct irq_chip chip; 14611 struct irq_chip_regs regs; 14612 irq_flow_handler_t handler; 14613 u32 type; 14614 u32 mask_cache_priv; 14615 u32 *mask_cache; 14616 }; 14617 14618 struct irq_chip_generic { 14619 raw_spinlock_t lock; 14620 void *reg_base; 14621 u32 (*reg_readl)(void *); 14622 void (*reg_writel)(u32, void *); 14623 void (*suspend)(struct irq_chip_generic *); 14624 void (*resume)(struct irq_chip_generic *); 14625 unsigned int irq_base; 14626 unsigned int irq_cnt; 14627 u32 mask_cache; 14628 u32 type_cache; 14629 u32 polarity_cache; 14630 u32 wake_enabled; 14631 u32 wake_active; 14632 unsigned int num_ct; 14633 void *private; 14634 long unsigned int installed; 14635 long unsigned int unused; 14636 struct irq_domain *domain; 14637 struct list_head list; 14638 struct irq_chip_type chip_types[0]; 14639 }; 14640 14641 enum irq_gc_flags { 14642 IRQ_GC_INIT_MASK_CACHE = 1, 14643 IRQ_GC_INIT_NESTED_LOCK = 2, 14644 IRQ_GC_MASK_CACHE_PER_TYPE = 4, 14645 IRQ_GC_NO_MASK = 8, 14646 IRQ_GC_BE_IO = 16, 14647 }; 14648 14649 struct irq_domain_chip_generic { 14650 unsigned int irqs_per_chip; 14651 unsigned int num_chips; 14652 unsigned int irq_flags_to_clear; 14653 unsigned int irq_flags_to_set; 14654 enum irq_gc_flags gc_flags; 14655 struct irq_chip_generic *gc[0]; 14656 }; 14657 14658 struct alt_instr { 14659 s32 instr_offset; 14660 s32 repl_offset; 14661 u16 cpuid; 14662 u8 instrlen; 14663 u8 replacementlen; 14664 u8 padlen; 14665 } __attribute__((packed)); 14666 14667 struct cpuinfo_x86 { 14668 __u8 x86; 14669 __u8 x86_vendor; 14670 __u8 x86_model; 14671 __u8 x86_stepping; 14672 int x86_tlbsize; 14673 __u32 vmx_capability[3]; 14674 __u8 x86_virt_bits; 14675 __u8 x86_phys_bits; 14676 __u8 x86_coreid_bits; 14677 __u8 cu_id; 14678 __u32 extended_cpuid_level; 14679 int cpuid_level; 14680 union { 14681 __u32 x86_capability[20]; 14682 long unsigned int x86_capability_alignment; 14683 }; 14684 char x86_vendor_id[16]; 14685 char x86_model_id[64]; 14686 unsigned int x86_cache_size; 14687 int x86_cache_alignment; 14688 int x86_cache_max_rmid; 14689 int x86_cache_occ_scale; 14690 int x86_cache_mbm_width_offset; 14691 int x86_power; 14692 long unsigned int loops_per_jiffy; 14693 u16 x86_max_cores; 14694 u16 apicid; 14695 u16 initial_apicid; 14696 u16 x86_clflush_size; 14697 u16 booted_cores; 14698 u16 phys_proc_id; 14699 u16 logical_proc_id; 14700 u16 cpu_core_id; 14701 u16 cpu_die_id; 14702 u16 logical_die_id; 14703 u16 cpu_index; 14704 u32 microcode; 14705 u8 x86_cache_bits; 14706 unsigned int initialized: 1; 14707 }; 14708 14709 struct timens_offset { 14710 s64 sec; 14711 u64 nsec; 14712 }; 14713 14714 enum vm_fault_reason { 14715 VM_FAULT_OOM = 1, 14716 VM_FAULT_SIGBUS = 2, 14717 VM_FAULT_MAJOR = 4, 14718 VM_FAULT_WRITE = 8, 14719 VM_FAULT_HWPOISON = 16, 14720 VM_FAULT_HWPOISON_LARGE = 32, 14721 VM_FAULT_SIGSEGV = 64, 14722 VM_FAULT_NOPAGE = 256, 14723 VM_FAULT_LOCKED = 512, 14724 VM_FAULT_RETRY = 1024, 14725 VM_FAULT_FALLBACK = 2048, 14726 VM_FAULT_DONE_COW = 4096, 14727 VM_FAULT_NEEDDSYNC = 8192, 14728 VM_FAULT_HINDEX_MASK = 983040, 14729 }; 14730 14731 struct vm_special_mapping { 14732 const char *name; 14733 struct page **pages; 14734 vm_fault_t (*fault)(const struct vm_special_mapping *, struct vm_area_struct *, struct vm_fault *); 14735 int (*mremap)(const struct vm_special_mapping *, struct vm_area_struct *); 14736 }; 14737 14738 struct timens_offsets { 14739 struct timespec64 monotonic; 14740 struct timespec64 boottime; 14741 }; 14742 14743 struct time_namespace { 14744 struct user_namespace *user_ns; 14745 struct ucounts *ucounts; 14746 struct ns_common ns; 14747 struct timens_offsets offsets; 14748 struct page *vvar_page; 14749 bool frozen_offsets; 14750 }; 14751 14752 struct pvclock_vcpu_time_info { 14753 u32 version; 14754 u32 pad0; 14755 u64 tsc_timestamp; 14756 u64 system_time; 14757 u32 tsc_to_system_mul; 14758 s8 tsc_shift; 14759 u8 flags; 14760 u8 pad[2]; 14761 }; 14762 14763 struct pvclock_vsyscall_time_info { 14764 struct pvclock_vcpu_time_info pvti; 14765 long: 64; 14766 long: 64; 14767 long: 64; 14768 long: 64; 14769 }; 14770 14771 enum vdso_clock_mode { 14772 VDSO_CLOCKMODE_NONE = 0, 14773 VDSO_CLOCKMODE_TSC = 1, 14774 VDSO_CLOCKMODE_PVCLOCK = 2, 14775 VDSO_CLOCKMODE_HVCLOCK = 3, 14776 VDSO_CLOCKMODE_MAX = 4, 14777 VDSO_CLOCKMODE_TIMENS = 2147483647, 14778 }; 14779 14780 struct arch_vdso_data {}; 14781 14782 struct vdso_timestamp { 14783 u64 sec; 14784 u64 nsec; 14785 }; 14786 14787 struct vdso_data { 14788 u32 seq; 14789 s32 clock_mode; 14790 u64 cycle_last; 14791 u64 mask; 14792 u32 mult; 14793 u32 shift; 14794 union { 14795 struct vdso_timestamp basetime[12]; 14796 struct timens_offset offset[12]; 14797 }; 14798 s32 tz_minuteswest; 14799 s32 tz_dsttime; 14800 u32 hrtimer_res; 14801 u32 __unused; 14802 struct arch_vdso_data arch_data; 14803 }; 14804 14805 struct ms_hyperv_tsc_page { 14806 volatile u32 tsc_sequence; 14807 u32 reserved1; 14808 volatile u64 tsc_scale; 14809 volatile s64 tsc_offset; 14810 }; 14811 14812 enum { 14813 TASKSTATS_CMD_UNSPEC = 0, 14814 TASKSTATS_CMD_GET = 1, 14815 TASKSTATS_CMD_NEW = 2, 14816 __TASKSTATS_CMD_MAX = 3, 14817 }; 14818 14819 enum cpu_usage_stat { 14820 CPUTIME_USER = 0, 14821 CPUTIME_NICE = 1, 14822 CPUTIME_SYSTEM = 2, 14823 CPUTIME_SOFTIRQ = 3, 14824 CPUTIME_IRQ = 4, 14825 CPUTIME_IDLE = 5, 14826 CPUTIME_IOWAIT = 6, 14827 CPUTIME_STEAL = 7, 14828 CPUTIME_GUEST = 8, 14829 CPUTIME_GUEST_NICE = 9, 14830 NR_STATS = 10, 14831 }; 14832 14833 enum bpf_cgroup_storage_type { 14834 BPF_CGROUP_STORAGE_SHARED = 0, 14835 BPF_CGROUP_STORAGE_PERCPU = 1, 14836 __BPF_CGROUP_STORAGE_MAX = 2, 14837 }; 14838 14839 enum bpf_tramp_prog_type { 14840 BPF_TRAMP_FENTRY = 0, 14841 BPF_TRAMP_FEXIT = 1, 14842 BPF_TRAMP_MODIFY_RETURN = 2, 14843 BPF_TRAMP_MAX = 3, 14844 BPF_TRAMP_REPLACE = 4, 14845 }; 14846 14847 enum psi_task_count { 14848 NR_IOWAIT = 0, 14849 NR_MEMSTALL = 1, 14850 NR_RUNNING = 2, 14851 NR_ONCPU = 3, 14852 NR_PSI_TASK_COUNTS = 4, 14853 }; 14854 14855 enum psi_states { 14856 PSI_IO_SOME = 0, 14857 PSI_IO_FULL = 1, 14858 PSI_MEM_SOME = 2, 14859 PSI_MEM_FULL = 3, 14860 PSI_CPU_SOME = 4, 14861 PSI_NONIDLE = 5, 14862 NR_PSI_STATES = 6, 14863 }; 14864 14865 enum psi_aggregators { 14866 PSI_AVGS = 0, 14867 PSI_POLL = 1, 14868 NR_PSI_AGGREGATORS = 2, 14869 }; 14870 14871 enum cgroup_subsys_id { 14872 cpuset_cgrp_id = 0, 14873 cpu_cgrp_id = 1, 14874 cpuacct_cgrp_id = 2, 14875 io_cgrp_id = 3, 14876 memory_cgrp_id = 4, 14877 devices_cgrp_id = 5, 14878 freezer_cgrp_id = 6, 14879 net_cls_cgrp_id = 7, 14880 perf_event_cgrp_id = 8, 14881 net_prio_cgrp_id = 9, 14882 hugetlb_cgrp_id = 10, 14883 pids_cgrp_id = 11, 14884 CGROUP_SUBSYS_COUNT = 12, 14885 }; 14886 14887 struct vdso_exception_table_entry { 14888 int insn; 14889 int fixup; 14890 }; 14891 14892 enum syscall_work_bit { 14893 SYSCALL_WORK_BIT_SECCOMP = 0, 14894 SYSCALL_WORK_BIT_SYSCALL_TRACEPOINT = 1, 14895 SYSCALL_WORK_BIT_SYSCALL_TRACE = 2, 14896 SYSCALL_WORK_BIT_SYSCALL_EMU = 3, 14897 SYSCALL_WORK_BIT_SYSCALL_AUDIT = 4, 14898 SYSCALL_WORK_BIT_SYSCALL_USER_DISPATCH = 5, 14899 SYSCALL_WORK_BIT_SYSCALL_EXIT_TRAP = 6, 14900 }; 14901 14902 struct seccomp_data { 14903 int nr; 14904 __u32 arch; 14905 __u64 instruction_pointer; 14906 __u64 args[6]; 14907 }; 14908 14909 enum x86_pf_error_code { 14910 X86_PF_PROT = 1, 14911 X86_PF_WRITE = 2, 14912 X86_PF_USER = 4, 14913 X86_PF_RSVD = 8, 14914 X86_PF_INSTR = 16, 14915 X86_PF_PK = 32, 14916 X86_PF_SGX = 32768, 14917 }; 14918 14919 struct trace_event_raw_emulate_vsyscall { 14920 struct trace_entry ent; 14921 int nr; 14922 char __data[0]; 14923 }; 14924 14925 struct trace_event_data_offsets_emulate_vsyscall {}; 14926 14927 typedef void (*btf_trace_emulate_vsyscall)(void *, int); 14928 14929 enum { 14930 EMULATE = 0, 14931 XONLY = 1, 14932 NONE = 2, 14933 }; 14934 14935 enum perf_type_id { 14936 PERF_TYPE_HARDWARE = 0, 14937 PERF_TYPE_SOFTWARE = 1, 14938 PERF_TYPE_TRACEPOINT = 2, 14939 PERF_TYPE_HW_CACHE = 3, 14940 PERF_TYPE_RAW = 4, 14941 PERF_TYPE_BREAKPOINT = 5, 14942 PERF_TYPE_MAX = 6, 14943 }; 14944 14945 enum perf_hw_id { 14946 PERF_COUNT_HW_CPU_CYCLES = 0, 14947 PERF_COUNT_HW_INSTRUCTIONS = 1, 14948 PERF_COUNT_HW_CACHE_REFERENCES = 2, 14949 PERF_COUNT_HW_CACHE_MISSES = 3, 14950 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, 14951 PERF_COUNT_HW_BRANCH_MISSES = 5, 14952 PERF_COUNT_HW_BUS_CYCLES = 6, 14953 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, 14954 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, 14955 PERF_COUNT_HW_REF_CPU_CYCLES = 9, 14956 PERF_COUNT_HW_MAX = 10, 14957 }; 14958 14959 enum perf_hw_cache_id { 14960 PERF_COUNT_HW_CACHE_L1D = 0, 14961 PERF_COUNT_HW_CACHE_L1I = 1, 14962 PERF_COUNT_HW_CACHE_LL = 2, 14963 PERF_COUNT_HW_CACHE_DTLB = 3, 14964 PERF_COUNT_HW_CACHE_ITLB = 4, 14965 PERF_COUNT_HW_CACHE_BPU = 5, 14966 PERF_COUNT_HW_CACHE_NODE = 6, 14967 PERF_COUNT_HW_CACHE_MAX = 7, 14968 }; 14969 14970 enum perf_hw_cache_op_id { 14971 PERF_COUNT_HW_CACHE_OP_READ = 0, 14972 PERF_COUNT_HW_CACHE_OP_WRITE = 1, 14973 PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, 14974 PERF_COUNT_HW_CACHE_OP_MAX = 3, 14975 }; 14976 14977 enum perf_hw_cache_op_result_id { 14978 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, 14979 PERF_COUNT_HW_CACHE_RESULT_MISS = 1, 14980 PERF_COUNT_HW_CACHE_RESULT_MAX = 2, 14981 }; 14982 14983 enum perf_event_sample_format { 14984 PERF_SAMPLE_IP = 1, 14985 PERF_SAMPLE_TID = 2, 14986 PERF_SAMPLE_TIME = 4, 14987 PERF_SAMPLE_ADDR = 8, 14988 PERF_SAMPLE_READ = 16, 14989 PERF_SAMPLE_CALLCHAIN = 32, 14990 PERF_SAMPLE_ID = 64, 14991 PERF_SAMPLE_CPU = 128, 14992 PERF_SAMPLE_PERIOD = 256, 14993 PERF_SAMPLE_STREAM_ID = 512, 14994 PERF_SAMPLE_RAW = 1024, 14995 PERF_SAMPLE_BRANCH_STACK = 2048, 14996 PERF_SAMPLE_REGS_USER = 4096, 14997 PERF_SAMPLE_STACK_USER = 8192, 14998 PERF_SAMPLE_WEIGHT = 16384, 14999 PERF_SAMPLE_DATA_SRC = 32768, 15000 PERF_SAMPLE_IDENTIFIER = 65536, 15001 PERF_SAMPLE_TRANSACTION = 131072, 15002 PERF_SAMPLE_REGS_INTR = 262144, 15003 PERF_SAMPLE_PHYS_ADDR = 524288, 15004 PERF_SAMPLE_AUX = 1048576, 15005 PERF_SAMPLE_CGROUP = 2097152, 15006 PERF_SAMPLE_DATA_PAGE_SIZE = 4194304, 15007 PERF_SAMPLE_CODE_PAGE_SIZE = 8388608, 15008 PERF_SAMPLE_MAX = 16777216, 15009 __PERF_SAMPLE_CALLCHAIN_EARLY = 0, 15010 }; 15011 15012 enum perf_branch_sample_type { 15013 PERF_SAMPLE_BRANCH_USER = 1, 15014 PERF_SAMPLE_BRANCH_KERNEL = 2, 15015 PERF_SAMPLE_BRANCH_HV = 4, 15016 PERF_SAMPLE_BRANCH_ANY = 8, 15017 PERF_SAMPLE_BRANCH_ANY_CALL = 16, 15018 PERF_SAMPLE_BRANCH_ANY_RETURN = 32, 15019 PERF_SAMPLE_BRANCH_IND_CALL = 64, 15020 PERF_SAMPLE_BRANCH_ABORT_TX = 128, 15021 PERF_SAMPLE_BRANCH_IN_TX = 256, 15022 PERF_SAMPLE_BRANCH_NO_TX = 512, 15023 PERF_SAMPLE_BRANCH_COND = 1024, 15024 PERF_SAMPLE_BRANCH_CALL_STACK = 2048, 15025 PERF_SAMPLE_BRANCH_IND_JUMP = 4096, 15026 PERF_SAMPLE_BRANCH_CALL = 8192, 15027 PERF_SAMPLE_BRANCH_NO_FLAGS = 16384, 15028 PERF_SAMPLE_BRANCH_NO_CYCLES = 32768, 15029 PERF_SAMPLE_BRANCH_TYPE_SAVE = 65536, 15030 PERF_SAMPLE_BRANCH_HW_INDEX = 131072, 15031 PERF_SAMPLE_BRANCH_MAX = 262144, 15032 }; 15033 15034 struct perf_event_mmap_page { 15035 __u32 version; 15036 __u32 compat_version; 15037 __u32 lock; 15038 __u32 index; 15039 __s64 offset; 15040 __u64 time_enabled; 15041 __u64 time_running; 15042 union { 15043 __u64 capabilities; 15044 struct { 15045 __u64 cap_bit0: 1; 15046 __u64 cap_bit0_is_deprecated: 1; 15047 __u64 cap_user_rdpmc: 1; 15048 __u64 cap_user_time: 1; 15049 __u64 cap_user_time_zero: 1; 15050 __u64 cap_user_time_short: 1; 15051 __u64 cap_____res: 58; 15052 }; 15053 }; 15054 __u16 pmc_width; 15055 __u16 time_shift; 15056 __u32 time_mult; 15057 __u64 time_offset; 15058 __u64 time_zero; 15059 __u32 size; 15060 __u32 __reserved_1; 15061 __u64 time_cycles; 15062 __u64 time_mask; 15063 __u8 __reserved[928]; 15064 __u64 data_head; 15065 __u64 data_tail; 15066 __u64 data_offset; 15067 __u64 data_size; 15068 __u64 aux_head; 15069 __u64 aux_tail; 15070 __u64 aux_offset; 15071 __u64 aux_size; 15072 }; 15073 15074 struct pv_info { 15075 u16 extra_user_64bit_cs; 15076 const char *name; 15077 }; 15078 15079 struct ldt_struct { 15080 struct desc_struct *entries; 15081 unsigned int nr_entries; 15082 int slot; 15083 }; 15084 15085 enum apic_delivery_modes { 15086 APIC_DELIVERY_MODE_FIXED = 0, 15087 APIC_DELIVERY_MODE_LOWESTPRIO = 1, 15088 APIC_DELIVERY_MODE_SMI = 2, 15089 APIC_DELIVERY_MODE_NMI = 4, 15090 APIC_DELIVERY_MODE_INIT = 5, 15091 APIC_DELIVERY_MODE_EXTINT = 7, 15092 }; 15093 15094 struct physid_mask { 15095 long unsigned int mask[512]; 15096 }; 15097 15098 typedef struct physid_mask physid_mask_t; 15099 15100 struct x86_pmu_capability { 15101 int version; 15102 int num_counters_gp; 15103 int num_counters_fixed; 15104 int bit_width_gp; 15105 int bit_width_fixed; 15106 unsigned int events_mask; 15107 int events_mask_len; 15108 }; 15109 15110 struct debug_store { 15111 u64 bts_buffer_base; 15112 u64 bts_index; 15113 u64 bts_absolute_maximum; 15114 u64 bts_interrupt_threshold; 15115 u64 pebs_buffer_base; 15116 u64 pebs_index; 15117 u64 pebs_absolute_maximum; 15118 u64 pebs_interrupt_threshold; 15119 u64 pebs_event_reset[12]; 15120 long: 64; 15121 long: 64; 15122 long: 64; 15123 long: 64; 15124 long: 64; 15125 long: 64; 15126 long: 64; 15127 long: 64; 15128 long: 64; 15129 long: 64; 15130 long: 64; 15131 long: 64; 15132 long: 64; 15133 long: 64; 15134 long: 64; 15135 long: 64; 15136 long: 64; 15137 long: 64; 15138 long: 64; 15139 long: 64; 15140 long: 64; 15141 long: 64; 15142 long: 64; 15143 long: 64; 15144 long: 64; 15145 long: 64; 15146 long: 64; 15147 long: 64; 15148 long: 64; 15149 long: 64; 15150 long: 64; 15151 long: 64; 15152 long: 64; 15153 long: 64; 15154 long: 64; 15155 long: 64; 15156 long: 64; 15157 long: 64; 15158 long: 64; 15159 long: 64; 15160 long: 64; 15161 long: 64; 15162 long: 64; 15163 long: 64; 15164 long: 64; 15165 long: 64; 15166 long: 64; 15167 long: 64; 15168 long: 64; 15169 long: 64; 15170 long: 64; 15171 long: 64; 15172 long: 64; 15173 long: 64; 15174 long: 64; 15175 long: 64; 15176 long: 64; 15177 long: 64; 15178 long: 64; 15179 long: 64; 15180 long: 64; 15181 long: 64; 15182 long: 64; 15183 long: 64; 15184 long: 64; 15185 long: 64; 15186 long: 64; 15187 long: 64; 15188 long: 64; 15189 long: 64; 15190 long: 64; 15191 long: 64; 15192 long: 64; 15193 long: 64; 15194 long: 64; 15195 long: 64; 15196 long: 64; 15197 long: 64; 15198 long: 64; 15199 long: 64; 15200 long: 64; 15201 long: 64; 15202 long: 64; 15203 long: 64; 15204 long: 64; 15205 long: 64; 15206 long: 64; 15207 long: 64; 15208 long: 64; 15209 long: 64; 15210 long: 64; 15211 long: 64; 15212 long: 64; 15213 long: 64; 15214 long: 64; 15215 long: 64; 15216 long: 64; 15217 long: 64; 15218 long: 64; 15219 long: 64; 15220 long: 64; 15221 long: 64; 15222 long: 64; 15223 long: 64; 15224 long: 64; 15225 long: 64; 15226 long: 64; 15227 long: 64; 15228 long: 64; 15229 long: 64; 15230 long: 64; 15231 long: 64; 15232 long: 64; 15233 long: 64; 15234 long: 64; 15235 long: 64; 15236 long: 64; 15237 long: 64; 15238 long: 64; 15239 long: 64; 15240 long: 64; 15241 long: 64; 15242 long: 64; 15243 long: 64; 15244 long: 64; 15245 long: 64; 15246 long: 64; 15247 long: 64; 15248 long: 64; 15249 long: 64; 15250 long: 64; 15251 long: 64; 15252 long: 64; 15253 long: 64; 15254 long: 64; 15255 long: 64; 15256 long: 64; 15257 long: 64; 15258 long: 64; 15259 long: 64; 15260 long: 64; 15261 long: 64; 15262 long: 64; 15263 long: 64; 15264 long: 64; 15265 long: 64; 15266 long: 64; 15267 long: 64; 15268 long: 64; 15269 long: 64; 15270 long: 64; 15271 long: 64; 15272 long: 64; 15273 long: 64; 15274 long: 64; 15275 long: 64; 15276 long: 64; 15277 long: 64; 15278 long: 64; 15279 long: 64; 15280 long: 64; 15281 long: 64; 15282 long: 64; 15283 long: 64; 15284 long: 64; 15285 long: 64; 15286 long: 64; 15287 long: 64; 15288 long: 64; 15289 long: 64; 15290 long: 64; 15291 long: 64; 15292 long: 64; 15293 long: 64; 15294 long: 64; 15295 long: 64; 15296 long: 64; 15297 long: 64; 15298 long: 64; 15299 long: 64; 15300 long: 64; 15301 long: 64; 15302 long: 64; 15303 long: 64; 15304 long: 64; 15305 long: 64; 15306 long: 64; 15307 long: 64; 15308 long: 64; 15309 long: 64; 15310 long: 64; 15311 long: 64; 15312 long: 64; 15313 long: 64; 15314 long: 64; 15315 long: 64; 15316 long: 64; 15317 long: 64; 15318 long: 64; 15319 long: 64; 15320 long: 64; 15321 long: 64; 15322 long: 64; 15323 long: 64; 15324 long: 64; 15325 long: 64; 15326 long: 64; 15327 long: 64; 15328 long: 64; 15329 long: 64; 15330 long: 64; 15331 long: 64; 15332 long: 64; 15333 long: 64; 15334 long: 64; 15335 long: 64; 15336 long: 64; 15337 long: 64; 15338 long: 64; 15339 long: 64; 15340 long: 64; 15341 long: 64; 15342 long: 64; 15343 long: 64; 15344 long: 64; 15345 long: 64; 15346 long: 64; 15347 long: 64; 15348 long: 64; 15349 long: 64; 15350 long: 64; 15351 long: 64; 15352 long: 64; 15353 long: 64; 15354 long: 64; 15355 long: 64; 15356 long: 64; 15357 long: 64; 15358 long: 64; 15359 long: 64; 15360 long: 64; 15361 long: 64; 15362 long: 64; 15363 long: 64; 15364 long: 64; 15365 long: 64; 15366 long: 64; 15367 long: 64; 15368 long: 64; 15369 long: 64; 15370 long: 64; 15371 long: 64; 15372 long: 64; 15373 long: 64; 15374 long: 64; 15375 long: 64; 15376 long: 64; 15377 long: 64; 15378 long: 64; 15379 long: 64; 15380 long: 64; 15381 long: 64; 15382 long: 64; 15383 long: 64; 15384 long: 64; 15385 long: 64; 15386 long: 64; 15387 long: 64; 15388 long: 64; 15389 long: 64; 15390 long: 64; 15391 long: 64; 15392 long: 64; 15393 long: 64; 15394 long: 64; 15395 long: 64; 15396 long: 64; 15397 long: 64; 15398 long: 64; 15399 long: 64; 15400 long: 64; 15401 long: 64; 15402 long: 64; 15403 long: 64; 15404 long: 64; 15405 long: 64; 15406 long: 64; 15407 long: 64; 15408 long: 64; 15409 long: 64; 15410 long: 64; 15411 long: 64; 15412 long: 64; 15413 long: 64; 15414 long: 64; 15415 long: 64; 15416 long: 64; 15417 long: 64; 15418 long: 64; 15419 long: 64; 15420 long: 64; 15421 long: 64; 15422 long: 64; 15423 long: 64; 15424 long: 64; 15425 long: 64; 15426 long: 64; 15427 long: 64; 15428 long: 64; 15429 long: 64; 15430 long: 64; 15431 long: 64; 15432 long: 64; 15433 long: 64; 15434 long: 64; 15435 long: 64; 15436 long: 64; 15437 long: 64; 15438 long: 64; 15439 long: 64; 15440 long: 64; 15441 long: 64; 15442 long: 64; 15443 long: 64; 15444 long: 64; 15445 long: 64; 15446 long: 64; 15447 long: 64; 15448 long: 64; 15449 long: 64; 15450 long: 64; 15451 long: 64; 15452 long: 64; 15453 long: 64; 15454 long: 64; 15455 long: 64; 15456 long: 64; 15457 long: 64; 15458 long: 64; 15459 long: 64; 15460 long: 64; 15461 long: 64; 15462 long: 64; 15463 long: 64; 15464 long: 64; 15465 long: 64; 15466 long: 64; 15467 long: 64; 15468 long: 64; 15469 long: 64; 15470 long: 64; 15471 long: 64; 15472 long: 64; 15473 long: 64; 15474 long: 64; 15475 long: 64; 15476 long: 64; 15477 long: 64; 15478 long: 64; 15479 long: 64; 15480 long: 64; 15481 long: 64; 15482 long: 64; 15483 long: 64; 15484 long: 64; 15485 long: 64; 15486 long: 64; 15487 long: 64; 15488 long: 64; 15489 long: 64; 15490 long: 64; 15491 long: 64; 15492 long: 64; 15493 long: 64; 15494 long: 64; 15495 long: 64; 15496 long: 64; 15497 long: 64; 15498 long: 64; 15499 long: 64; 15500 long: 64; 15501 long: 64; 15502 long: 64; 15503 long: 64; 15504 long: 64; 15505 long: 64; 15506 long: 64; 15507 long: 64; 15508 long: 64; 15509 long: 64; 15510 long: 64; 15511 long: 64; 15512 long: 64; 15513 long: 64; 15514 long: 64; 15515 long: 64; 15516 long: 64; 15517 long: 64; 15518 long: 64; 15519 long: 64; 15520 long: 64; 15521 long: 64; 15522 long: 64; 15523 long: 64; 15524 long: 64; 15525 long: 64; 15526 long: 64; 15527 long: 64; 15528 long: 64; 15529 long: 64; 15530 long: 64; 15531 long: 64; 15532 long: 64; 15533 long: 64; 15534 long: 64; 15535 long: 64; 15536 long: 64; 15537 long: 64; 15538 long: 64; 15539 long: 64; 15540 long: 64; 15541 long: 64; 15542 long: 64; 15543 long: 64; 15544 long: 64; 15545 long: 64; 15546 long: 64; 15547 long: 64; 15548 long: 64; 15549 long: 64; 15550 long: 64; 15551 long: 64; 15552 long: 64; 15553 long: 64; 15554 long: 64; 15555 long: 64; 15556 long: 64; 15557 long: 64; 15558 long: 64; 15559 long: 64; 15560 long: 64; 15561 long: 64; 15562 long: 64; 15563 long: 64; 15564 long: 64; 15565 long: 64; 15566 long: 64; 15567 long: 64; 15568 long: 64; 15569 long: 64; 15570 long: 64; 15571 long: 64; 15572 long: 64; 15573 long: 64; 15574 long: 64; 15575 long: 64; 15576 long: 64; 15577 long: 64; 15578 long: 64; 15579 long: 64; 15580 long: 64; 15581 long: 64; 15582 long: 64; 15583 long: 64; 15584 long: 64; 15585 long: 64; 15586 long: 64; 15587 long: 64; 15588 long: 64; 15589 long: 64; 15590 long: 64; 15591 long: 64; 15592 long: 64; 15593 long: 64; 15594 long: 64; 15595 long: 64; 15596 long: 64; 15597 long: 64; 15598 long: 64; 15599 long: 64; 15600 long: 64; 15601 long: 64; 15602 long: 64; 15603 long: 64; 15604 long: 64; 15605 long: 64; 15606 long: 64; 15607 long: 64; 15608 long: 64; 15609 long: 64; 15610 long: 64; 15611 long: 64; 15612 }; 15613 15614 enum stack_type { 15615 STACK_TYPE_UNKNOWN = 0, 15616 STACK_TYPE_TASK = 1, 15617 STACK_TYPE_IRQ = 2, 15618 STACK_TYPE_SOFTIRQ = 3, 15619 STACK_TYPE_ENTRY = 4, 15620 STACK_TYPE_EXCEPTION = 5, 15621 STACK_TYPE_EXCEPTION_LAST = 10, 15622 }; 15623 15624 struct stack_info { 15625 enum stack_type type; 15626 long unsigned int *begin; 15627 long unsigned int *end; 15628 long unsigned int *next_sp; 15629 }; 15630 15631 struct stack_frame { 15632 struct stack_frame *next_frame; 15633 long unsigned int return_address; 15634 }; 15635 15636 struct stack_frame_ia32 { 15637 u32 next_frame; 15638 u32 return_address; 15639 }; 15640 15641 struct perf_guest_switch_msr { 15642 unsigned int msr; 15643 u64 host; 15644 u64 guest; 15645 }; 15646 15647 struct perf_guest_info_callbacks { 15648 int (*is_in_guest)(); 15649 int (*is_user_mode)(); 15650 long unsigned int (*get_guest_ip)(); 15651 void (*handle_intel_pt_intr)(); 15652 }; 15653 15654 struct device_attribute { 15655 struct attribute attr; 15656 ssize_t (*show)(struct device *, struct device_attribute *, char *); 15657 ssize_t (*store)(struct device *, struct device_attribute *, const char *, size_t); 15658 }; 15659 15660 enum perf_event_x86_regs { 15661 PERF_REG_X86_AX = 0, 15662 PERF_REG_X86_BX = 1, 15663 PERF_REG_X86_CX = 2, 15664 PERF_REG_X86_DX = 3, 15665 PERF_REG_X86_SI = 4, 15666 PERF_REG_X86_DI = 5, 15667 PERF_REG_X86_BP = 6, 15668 PERF_REG_X86_SP = 7, 15669 PERF_REG_X86_IP = 8, 15670 PERF_REG_X86_FLAGS = 9, 15671 PERF_REG_X86_CS = 10, 15672 PERF_REG_X86_SS = 11, 15673 PERF_REG_X86_DS = 12, 15674 PERF_REG_X86_ES = 13, 15675 PERF_REG_X86_FS = 14, 15676 PERF_REG_X86_GS = 15, 15677 PERF_REG_X86_R8 = 16, 15678 PERF_REG_X86_R9 = 17, 15679 PERF_REG_X86_R10 = 18, 15680 PERF_REG_X86_R11 = 19, 15681 PERF_REG_X86_R12 = 20, 15682 PERF_REG_X86_R13 = 21, 15683 PERF_REG_X86_R14 = 22, 15684 PERF_REG_X86_R15 = 23, 15685 PERF_REG_X86_32_MAX = 16, 15686 PERF_REG_X86_64_MAX = 24, 15687 PERF_REG_X86_XMM0 = 32, 15688 PERF_REG_X86_XMM1 = 34, 15689 PERF_REG_X86_XMM2 = 36, 15690 PERF_REG_X86_XMM3 = 38, 15691 PERF_REG_X86_XMM4 = 40, 15692 PERF_REG_X86_XMM5 = 42, 15693 PERF_REG_X86_XMM6 = 44, 15694 PERF_REG_X86_XMM7 = 46, 15695 PERF_REG_X86_XMM8 = 48, 15696 PERF_REG_X86_XMM9 = 50, 15697 PERF_REG_X86_XMM10 = 52, 15698 PERF_REG_X86_XMM11 = 54, 15699 PERF_REG_X86_XMM12 = 56, 15700 PERF_REG_X86_XMM13 = 58, 15701 PERF_REG_X86_XMM14 = 60, 15702 PERF_REG_X86_XMM15 = 62, 15703 PERF_REG_X86_XMM_MAX = 64, 15704 }; 15705 15706 struct perf_callchain_entry_ctx { 15707 struct perf_callchain_entry *entry; 15708 u32 max_stack; 15709 u32 nr; 15710 short int contexts; 15711 bool contexts_maxed; 15712 }; 15713 15714 struct perf_pmu_events_attr { 15715 struct device_attribute attr; 15716 u64 id; 15717 const char *event_str; 15718 }; 15719 15720 struct perf_pmu_events_ht_attr { 15721 struct device_attribute attr; 15722 u64 id; 15723 const char *event_str_ht; 15724 const char *event_str_noht; 15725 }; 15726 15727 struct apic { 15728 void (*eoi_write)(u32, u32); 15729 void (*native_eoi_write)(u32, u32); 15730 void (*write)(u32, u32); 15731 u32 (*read)(u32); 15732 void (*wait_icr_idle)(); 15733 u32 (*safe_wait_icr_idle)(); 15734 void (*send_IPI)(int, int); 15735 void (*send_IPI_mask)(const struct cpumask *, int); 15736 void (*send_IPI_mask_allbutself)(const struct cpumask *, int); 15737 void (*send_IPI_allbutself)(int); 15738 void (*send_IPI_all)(int); 15739 void (*send_IPI_self)(int); 15740 u32 disable_esr; 15741 enum apic_delivery_modes delivery_mode; 15742 bool dest_mode_logical; 15743 u32 (*calc_dest_apicid)(unsigned int); 15744 u64 (*icr_read)(); 15745 void (*icr_write)(u32, u32); 15746 int (*probe)(); 15747 int (*acpi_madt_oem_check)(char *, char *); 15748 int (*apic_id_valid)(u32); 15749 int (*apic_id_registered)(); 15750 bool (*check_apicid_used)(physid_mask_t *, int); 15751 void (*init_apic_ldr)(); 15752 void (*ioapic_phys_id_map)(physid_mask_t *, physid_mask_t *); 15753 void (*setup_apic_routing)(); 15754 int (*cpu_present_to_apicid)(int); 15755 void (*apicid_to_cpu_present)(int, physid_mask_t *); 15756 int (*check_phys_apicid_present)(int); 15757 int (*phys_pkg_id)(int, int); 15758 u32 (*get_apic_id)(long unsigned int); 15759 u32 (*set_apic_id)(unsigned int); 15760 int (*wakeup_secondary_cpu)(int, long unsigned int); 15761 void (*inquire_remote_apic)(int); 15762 char *name; 15763 }; 15764 15765 enum { 15766 NMI_LOCAL = 0, 15767 NMI_UNKNOWN = 1, 15768 NMI_SERR = 2, 15769 NMI_IO_CHECK = 3, 15770 NMI_MAX = 4, 15771 }; 15772 15773 typedef int (*nmi_handler_t)(unsigned int, struct pt_regs *); 15774 15775 struct nmiaction { 15776 struct list_head list; 15777 nmi_handler_t handler; 15778 u64 max_duration; 15779 long unsigned int flags; 15780 const char *name; 15781 }; 15782 15783 struct gdt_page { 15784 struct desc_struct gdt[16]; 15785 long: 64; 15786 long: 64; 15787 long: 64; 15788 long: 64; 15789 long: 64; 15790 long: 64; 15791 long: 64; 15792 long: 64; 15793 long: 64; 15794 long: 64; 15795 long: 64; 15796 long: 64; 15797 long: 64; 15798 long: 64; 15799 long: 64; 15800 long: 64; 15801 long: 64; 15802 long: 64; 15803 long: 64; 15804 long: 64; 15805 long: 64; 15806 long: 64; 15807 long: 64; 15808 long: 64; 15809 long: 64; 15810 long: 64; 15811 long: 64; 15812 long: 64; 15813 long: 64; 15814 long: 64; 15815 long: 64; 15816 long: 64; 15817 long: 64; 15818 long: 64; 15819 long: 64; 15820 long: 64; 15821 long: 64; 15822 long: 64; 15823 long: 64; 15824 long: 64; 15825 long: 64; 15826 long: 64; 15827 long: 64; 15828 long: 64; 15829 long: 64; 15830 long: 64; 15831 long: 64; 15832 long: 64; 15833 long: 64; 15834 long: 64; 15835 long: 64; 15836 long: 64; 15837 long: 64; 15838 long: 64; 15839 long: 64; 15840 long: 64; 15841 long: 64; 15842 long: 64; 15843 long: 64; 15844 long: 64; 15845 long: 64; 15846 long: 64; 15847 long: 64; 15848 long: 64; 15849 long: 64; 15850 long: 64; 15851 long: 64; 15852 long: 64; 15853 long: 64; 15854 long: 64; 15855 long: 64; 15856 long: 64; 15857 long: 64; 15858 long: 64; 15859 long: 64; 15860 long: 64; 15861 long: 64; 15862 long: 64; 15863 long: 64; 15864 long: 64; 15865 long: 64; 15866 long: 64; 15867 long: 64; 15868 long: 64; 15869 long: 64; 15870 long: 64; 15871 long: 64; 15872 long: 64; 15873 long: 64; 15874 long: 64; 15875 long: 64; 15876 long: 64; 15877 long: 64; 15878 long: 64; 15879 long: 64; 15880 long: 64; 15881 long: 64; 15882 long: 64; 15883 long: 64; 15884 long: 64; 15885 long: 64; 15886 long: 64; 15887 long: 64; 15888 long: 64; 15889 long: 64; 15890 long: 64; 15891 long: 64; 15892 long: 64; 15893 long: 64; 15894 long: 64; 15895 long: 64; 15896 long: 64; 15897 long: 64; 15898 long: 64; 15899 long: 64; 15900 long: 64; 15901 long: 64; 15902 long: 64; 15903 long: 64; 15904 long: 64; 15905 long: 64; 15906 long: 64; 15907 long: 64; 15908 long: 64; 15909 long: 64; 15910 long: 64; 15911 long: 64; 15912 long: 64; 15913 long: 64; 15914 long: 64; 15915 long: 64; 15916 long: 64; 15917 long: 64; 15918 long: 64; 15919 long: 64; 15920 long: 64; 15921 long: 64; 15922 long: 64; 15923 long: 64; 15924 long: 64; 15925 long: 64; 15926 long: 64; 15927 long: 64; 15928 long: 64; 15929 long: 64; 15930 long: 64; 15931 long: 64; 15932 long: 64; 15933 long: 64; 15934 long: 64; 15935 long: 64; 15936 long: 64; 15937 long: 64; 15938 long: 64; 15939 long: 64; 15940 long: 64; 15941 long: 64; 15942 long: 64; 15943 long: 64; 15944 long: 64; 15945 long: 64; 15946 long: 64; 15947 long: 64; 15948 long: 64; 15949 long: 64; 15950 long: 64; 15951 long: 64; 15952 long: 64; 15953 long: 64; 15954 long: 64; 15955 long: 64; 15956 long: 64; 15957 long: 64; 15958 long: 64; 15959 long: 64; 15960 long: 64; 15961 long: 64; 15962 long: 64; 15963 long: 64; 15964 long: 64; 15965 long: 64; 15966 long: 64; 15967 long: 64; 15968 long: 64; 15969 long: 64; 15970 long: 64; 15971 long: 64; 15972 long: 64; 15973 long: 64; 15974 long: 64; 15975 long: 64; 15976 long: 64; 15977 long: 64; 15978 long: 64; 15979 long: 64; 15980 long: 64; 15981 long: 64; 15982 long: 64; 15983 long: 64; 15984 long: 64; 15985 long: 64; 15986 long: 64; 15987 long: 64; 15988 long: 64; 15989 long: 64; 15990 long: 64; 15991 long: 64; 15992 long: 64; 15993 long: 64; 15994 long: 64; 15995 long: 64; 15996 long: 64; 15997 long: 64; 15998 long: 64; 15999 long: 64; 16000 long: 64; 16001 long: 64; 16002 long: 64; 16003 long: 64; 16004 long: 64; 16005 long: 64; 16006 long: 64; 16007 long: 64; 16008 long: 64; 16009 long: 64; 16010 long: 64; 16011 long: 64; 16012 long: 64; 16013 long: 64; 16014 long: 64; 16015 long: 64; 16016 long: 64; 16017 long: 64; 16018 long: 64; 16019 long: 64; 16020 long: 64; 16021 long: 64; 16022 long: 64; 16023 long: 64; 16024 long: 64; 16025 long: 64; 16026 long: 64; 16027 long: 64; 16028 long: 64; 16029 long: 64; 16030 long: 64; 16031 long: 64; 16032 long: 64; 16033 long: 64; 16034 long: 64; 16035 long: 64; 16036 long: 64; 16037 long: 64; 16038 long: 64; 16039 long: 64; 16040 long: 64; 16041 long: 64; 16042 long: 64; 16043 long: 64; 16044 long: 64; 16045 long: 64; 16046 long: 64; 16047 long: 64; 16048 long: 64; 16049 long: 64; 16050 long: 64; 16051 long: 64; 16052 long: 64; 16053 long: 64; 16054 long: 64; 16055 long: 64; 16056 long: 64; 16057 long: 64; 16058 long: 64; 16059 long: 64; 16060 long: 64; 16061 long: 64; 16062 long: 64; 16063 long: 64; 16064 long: 64; 16065 long: 64; 16066 long: 64; 16067 long: 64; 16068 long: 64; 16069 long: 64; 16070 long: 64; 16071 long: 64; 16072 long: 64; 16073 long: 64; 16074 long: 64; 16075 long: 64; 16076 long: 64; 16077 long: 64; 16078 long: 64; 16079 long: 64; 16080 long: 64; 16081 long: 64; 16082 long: 64; 16083 long: 64; 16084 long: 64; 16085 long: 64; 16086 long: 64; 16087 long: 64; 16088 long: 64; 16089 long: 64; 16090 long: 64; 16091 long: 64; 16092 long: 64; 16093 long: 64; 16094 long: 64; 16095 long: 64; 16096 long: 64; 16097 long: 64; 16098 long: 64; 16099 long: 64; 16100 long: 64; 16101 long: 64; 16102 long: 64; 16103 long: 64; 16104 long: 64; 16105 long: 64; 16106 long: 64; 16107 long: 64; 16108 long: 64; 16109 long: 64; 16110 long: 64; 16111 long: 64; 16112 long: 64; 16113 long: 64; 16114 long: 64; 16115 long: 64; 16116 long: 64; 16117 long: 64; 16118 long: 64; 16119 long: 64; 16120 long: 64; 16121 long: 64; 16122 long: 64; 16123 long: 64; 16124 long: 64; 16125 long: 64; 16126 long: 64; 16127 long: 64; 16128 long: 64; 16129 long: 64; 16130 long: 64; 16131 long: 64; 16132 long: 64; 16133 long: 64; 16134 long: 64; 16135 long: 64; 16136 long: 64; 16137 long: 64; 16138 long: 64; 16139 long: 64; 16140 long: 64; 16141 long: 64; 16142 long: 64; 16143 long: 64; 16144 long: 64; 16145 long: 64; 16146 long: 64; 16147 long: 64; 16148 long: 64; 16149 long: 64; 16150 long: 64; 16151 long: 64; 16152 long: 64; 16153 long: 64; 16154 long: 64; 16155 long: 64; 16156 long: 64; 16157 long: 64; 16158 long: 64; 16159 long: 64; 16160 long: 64; 16161 long: 64; 16162 long: 64; 16163 long: 64; 16164 long: 64; 16165 long: 64; 16166 long: 64; 16167 long: 64; 16168 long: 64; 16169 long: 64; 16170 long: 64; 16171 long: 64; 16172 long: 64; 16173 long: 64; 16174 long: 64; 16175 long: 64; 16176 long: 64; 16177 long: 64; 16178 long: 64; 16179 long: 64; 16180 long: 64; 16181 long: 64; 16182 long: 64; 16183 long: 64; 16184 long: 64; 16185 long: 64; 16186 long: 64; 16187 long: 64; 16188 long: 64; 16189 long: 64; 16190 long: 64; 16191 long: 64; 16192 long: 64; 16193 long: 64; 16194 long: 64; 16195 long: 64; 16196 long: 64; 16197 long: 64; 16198 long: 64; 16199 long: 64; 16200 long: 64; 16201 long: 64; 16202 long: 64; 16203 long: 64; 16204 long: 64; 16205 long: 64; 16206 long: 64; 16207 long: 64; 16208 long: 64; 16209 long: 64; 16210 long: 64; 16211 long: 64; 16212 long: 64; 16213 long: 64; 16214 long: 64; 16215 long: 64; 16216 long: 64; 16217 long: 64; 16218 long: 64; 16219 long: 64; 16220 long: 64; 16221 long: 64; 16222 long: 64; 16223 long: 64; 16224 long: 64; 16225 long: 64; 16226 long: 64; 16227 long: 64; 16228 long: 64; 16229 long: 64; 16230 long: 64; 16231 long: 64; 16232 long: 64; 16233 long: 64; 16234 long: 64; 16235 long: 64; 16236 long: 64; 16237 long: 64; 16238 long: 64; 16239 long: 64; 16240 long: 64; 16241 long: 64; 16242 long: 64; 16243 long: 64; 16244 long: 64; 16245 long: 64; 16246 long: 64; 16247 long: 64; 16248 long: 64; 16249 long: 64; 16250 long: 64; 16251 long: 64; 16252 long: 64; 16253 long: 64; 16254 long: 64; 16255 long: 64; 16256 long: 64; 16257 long: 64; 16258 long: 64; 16259 long: 64; 16260 long: 64; 16261 long: 64; 16262 long: 64; 16263 long: 64; 16264 long: 64; 16265 long: 64; 16266 long: 64; 16267 long: 64; 16268 long: 64; 16269 long: 64; 16270 long: 64; 16271 long: 64; 16272 long: 64; 16273 long: 64; 16274 long: 64; 16275 long: 64; 16276 long: 64; 16277 long: 64; 16278 long: 64; 16279 long: 64; 16280 long: 64; 16281 }; 16282 16283 struct cyc2ns_data { 16284 u32 cyc2ns_mul; 16285 u32 cyc2ns_shift; 16286 u64 cyc2ns_offset; 16287 }; 16288 16289 struct unwind_state { 16290 struct stack_info stack_info; 16291 long unsigned int stack_mask; 16292 struct task_struct *task; 16293 int graph_idx; 16294 bool error; 16295 bool signal; 16296 bool full_regs; 16297 long unsigned int sp; 16298 long unsigned int bp; 16299 long unsigned int ip; 16300 struct pt_regs *regs; 16301 struct pt_regs *prev_regs; 16302 }; 16303 16304 enum extra_reg_type { 16305 EXTRA_REG_NONE = 4294967295, 16306 EXTRA_REG_RSP_0 = 0, 16307 EXTRA_REG_RSP_1 = 1, 16308 EXTRA_REG_LBR = 2, 16309 EXTRA_REG_LDLAT = 3, 16310 EXTRA_REG_FE = 4, 16311 EXTRA_REG_MAX = 5, 16312 }; 16313 16314 struct event_constraint { 16315 union { 16316 long unsigned int idxmsk[1]; 16317 u64 idxmsk64; 16318 }; 16319 u64 code; 16320 u64 cmask; 16321 int weight; 16322 int overlap; 16323 int flags; 16324 unsigned int size; 16325 }; 16326 16327 struct amd_nb { 16328 int nb_id; 16329 int refcnt; 16330 struct perf_event *owners[64]; 16331 struct event_constraint event_constraints[64]; 16332 }; 16333 16334 struct er_account { 16335 raw_spinlock_t lock; 16336 u64 config; 16337 u64 reg; 16338 atomic_t ref; 16339 }; 16340 16341 struct intel_shared_regs { 16342 struct er_account regs[5]; 16343 int refcnt; 16344 unsigned int core_id; 16345 }; 16346 16347 enum intel_excl_state_type { 16348 INTEL_EXCL_UNUSED = 0, 16349 INTEL_EXCL_SHARED = 1, 16350 INTEL_EXCL_EXCLUSIVE = 2, 16351 }; 16352 16353 struct intel_excl_states { 16354 enum intel_excl_state_type state[64]; 16355 bool sched_started; 16356 }; 16357 16358 struct intel_excl_cntrs { 16359 raw_spinlock_t lock; 16360 struct intel_excl_states states[2]; 16361 union { 16362 u16 has_exclusive[2]; 16363 u32 exclusive_present; 16364 }; 16365 int refcnt; 16366 unsigned int core_id; 16367 }; 16368 16369 enum { 16370 X86_PERF_KFREE_SHARED = 0, 16371 X86_PERF_KFREE_EXCL = 1, 16372 X86_PERF_KFREE_MAX = 2, 16373 }; 16374 16375 struct cpu_hw_events { 16376 struct perf_event *events[64]; 16377 long unsigned int active_mask[1]; 16378 long unsigned int running[1]; 16379 int enabled; 16380 int n_events; 16381 int n_added; 16382 int n_txn; 16383 int n_txn_pair; 16384 int n_txn_metric; 16385 int assign[64]; 16386 u64 tags[64]; 16387 struct perf_event *event_list[64]; 16388 struct event_constraint *event_constraint[64]; 16389 int n_excl; 16390 unsigned int txn_flags; 16391 int is_fake; 16392 struct debug_store *ds; 16393 void *ds_pebs_vaddr; 16394 void *ds_bts_vaddr; 16395 u64 pebs_enabled; 16396 int n_pebs; 16397 int n_large_pebs; 16398 int n_pebs_via_pt; 16399 int pebs_output; 16400 u64 pebs_data_cfg; 16401 u64 active_pebs_data_cfg; 16402 int pebs_record_size; 16403 int lbr_users; 16404 int lbr_pebs_users; 16405 struct perf_branch_stack lbr_stack; 16406 struct perf_branch_entry lbr_entries[32]; 16407 union { 16408 struct er_account *lbr_sel; 16409 struct er_account *lbr_ctl; 16410 }; 16411 u64 br_sel; 16412 void *last_task_ctx; 16413 int last_log_id; 16414 int lbr_select; 16415 void *lbr_xsave; 16416 u64 intel_ctrl_guest_mask; 16417 u64 intel_ctrl_host_mask; 16418 struct perf_guest_switch_msr guest_switch_msrs[64]; 16419 u64 intel_cp_status; 16420 struct intel_shared_regs *shared_regs; 16421 struct event_constraint *constraint_list; 16422 struct intel_excl_cntrs *excl_cntrs; 16423 int excl_thread_id; 16424 u64 tfa_shadow; 16425 int n_metric; 16426 struct amd_nb *amd_nb; 16427 u64 perf_ctr_virt_mask; 16428 int n_pair; 16429 void *kfree_on_online[2]; 16430 }; 16431 16432 struct extra_reg { 16433 unsigned int event; 16434 unsigned int msr; 16435 u64 config_mask; 16436 u64 valid_mask; 16437 int idx; 16438 bool extra_msr_access; 16439 }; 16440 16441 union perf_capabilities { 16442 struct { 16443 u64 lbr_format: 6; 16444 u64 pebs_trap: 1; 16445 u64 pebs_arch_reg: 1; 16446 u64 pebs_format: 4; 16447 u64 smm_freeze: 1; 16448 u64 full_width_write: 1; 16449 u64 pebs_baseline: 1; 16450 u64 perf_metrics: 1; 16451 u64 pebs_output_pt_available: 1; 16452 u64 anythread_deprecated: 1; 16453 }; 16454 u64 capabilities; 16455 }; 16456 16457 struct x86_pmu_quirk { 16458 struct x86_pmu_quirk *next; 16459 void (*func)(); 16460 }; 16461 16462 enum { 16463 x86_lbr_exclusive_lbr = 0, 16464 x86_lbr_exclusive_bts = 1, 16465 x86_lbr_exclusive_pt = 2, 16466 x86_lbr_exclusive_max = 3, 16467 }; 16468 16469 struct x86_pmu { 16470 const char *name; 16471 int version; 16472 int (*handle_irq)(struct pt_regs *); 16473 void (*disable_all)(); 16474 void (*enable_all)(int); 16475 void (*enable)(struct perf_event *); 16476 void (*disable)(struct perf_event *); 16477 void (*add)(struct perf_event *); 16478 void (*del)(struct perf_event *); 16479 void (*read)(struct perf_event *); 16480 int (*hw_config)(struct perf_event *); 16481 int (*schedule_events)(struct cpu_hw_events *, int, int *); 16482 unsigned int eventsel; 16483 unsigned int perfctr; 16484 int (*addr_offset)(int, bool); 16485 int (*rdpmc_index)(int); 16486 u64 (*event_map)(int); 16487 int max_events; 16488 int num_counters; 16489 int num_counters_fixed; 16490 int cntval_bits; 16491 u64 cntval_mask; 16492 union { 16493 long unsigned int events_maskl; 16494 long unsigned int events_mask[1]; 16495 }; 16496 int events_mask_len; 16497 int apic; 16498 u64 max_period; 16499 struct event_constraint * (*get_event_constraints)(struct cpu_hw_events *, int, struct perf_event *); 16500 void (*put_event_constraints)(struct cpu_hw_events *, struct perf_event *); 16501 void (*start_scheduling)(struct cpu_hw_events *); 16502 void (*commit_scheduling)(struct cpu_hw_events *, int, int); 16503 void (*stop_scheduling)(struct cpu_hw_events *); 16504 struct event_constraint *event_constraints; 16505 struct x86_pmu_quirk *quirks; 16506 int perfctr_second_write; 16507 u64 (*limit_period)(struct perf_event *, u64); 16508 unsigned int late_ack: 1; 16509 unsigned int enabled_ack: 1; 16510 unsigned int counter_freezing: 1; 16511 int attr_rdpmc_broken; 16512 int attr_rdpmc; 16513 struct attribute **format_attrs; 16514 ssize_t (*events_sysfs_show)(char *, u64); 16515 const struct attribute_group **attr_update; 16516 long unsigned int attr_freeze_on_smi; 16517 int (*cpu_prepare)(int); 16518 void (*cpu_starting)(int); 16519 void (*cpu_dying)(int); 16520 void (*cpu_dead)(int); 16521 void (*check_microcode)(); 16522 void (*sched_task)(struct perf_event_context *, bool); 16523 u64 intel_ctrl; 16524 union perf_capabilities intel_cap; 16525 unsigned int bts: 1; 16526 unsigned int bts_active: 1; 16527 unsigned int pebs: 1; 16528 unsigned int pebs_active: 1; 16529 unsigned int pebs_broken: 1; 16530 unsigned int pebs_prec_dist: 1; 16531 unsigned int pebs_no_tlb: 1; 16532 unsigned int pebs_no_isolation: 1; 16533 int pebs_record_size; 16534 int pebs_buffer_size; 16535 int max_pebs_events; 16536 void (*drain_pebs)(struct pt_regs *, struct perf_sample_data *); 16537 struct event_constraint *pebs_constraints; 16538 void (*pebs_aliases)(struct perf_event *); 16539 long unsigned int large_pebs_flags; 16540 u64 rtm_abort_event; 16541 unsigned int lbr_tos; 16542 unsigned int lbr_from; 16543 unsigned int lbr_to; 16544 unsigned int lbr_info; 16545 unsigned int lbr_nr; 16546 union { 16547 u64 lbr_sel_mask; 16548 u64 lbr_ctl_mask; 16549 }; 16550 union { 16551 const int *lbr_sel_map; 16552 int *lbr_ctl_map; 16553 }; 16554 bool lbr_double_abort; 16555 bool lbr_pt_coexist; 16556 unsigned int lbr_depth_mask: 8; 16557 unsigned int lbr_deep_c_reset: 1; 16558 unsigned int lbr_lip: 1; 16559 unsigned int lbr_cpl: 1; 16560 unsigned int lbr_filter: 1; 16561 unsigned int lbr_call_stack: 1; 16562 unsigned int lbr_mispred: 1; 16563 unsigned int lbr_timed_lbr: 1; 16564 unsigned int lbr_br_type: 1; 16565 void (*lbr_reset)(); 16566 void (*lbr_read)(struct cpu_hw_events *); 16567 void (*lbr_save)(void *); 16568 void (*lbr_restore)(void *); 16569 atomic_t lbr_exclusive[3]; 16570 u64 (*update_topdown_event)(struct perf_event *); 16571 int (*set_topdown_event_period)(struct perf_event *); 16572 void (*swap_task_ctx)(struct perf_event_context *, struct perf_event_context *); 16573 unsigned int amd_nb_constraints: 1; 16574 u64 perf_ctr_pair_en; 16575 struct extra_reg *extra_regs; 16576 unsigned int flags; 16577 struct perf_guest_switch_msr * (*guest_get_msrs)(int *); 16578 int (*check_period)(struct perf_event *, u64); 16579 int (*aux_output_match)(struct perf_event *); 16580 }; 16581 16582 struct sched_state { 16583 int weight; 16584 int event; 16585 int counter; 16586 int unassigned; 16587 int nr_gp; 16588 u64 used; 16589 }; 16590 16591 struct perf_sched { 16592 int max_weight; 16593 int max_events; 16594 int max_gp; 16595 int saved_states; 16596 struct event_constraint **constraints; 16597 struct sched_state state; 16598 struct sched_state saved[2]; 16599 }; 16600 16601 struct perf_msr { 16602 u64 msr; 16603 struct attribute_group *grp; 16604 bool (*test)(int, void *); 16605 bool no_check; 16606 }; 16607 16608 struct kobj_attribute { 16609 struct attribute attr; 16610 ssize_t (*show)(struct kobject *, struct kobj_attribute *, char *); 16611 ssize_t (*store)(struct kobject *, struct kobj_attribute *, const char *, size_t); 16612 }; 16613 16614 struct amd_uncore { 16615 int id; 16616 int refcnt; 16617 int cpu; 16618 int num_counters; 16619 int rdpmc_base; 16620 u32 msr_base; 16621 cpumask_t *active_mask; 16622 struct pmu *pmu; 16623 struct perf_event *events[6]; 16624 struct hlist_node node; 16625 }; 16626 16627 typedef int pci_power_t; 16628 16629 typedef unsigned int pci_channel_state_t; 16630 16631 typedef short unsigned int pci_dev_flags_t; 16632 16633 struct pci_bus; 16634 16635 struct pci_slot; 16636 16637 struct aer_stats; 16638 16639 struct rcec_ea; 16640 16641 struct pci_driver; 16642 16643 struct pcie_link_state; 16644 16645 struct pci_vpd; 16646 16647 struct pci_sriov; 16648 16649 struct pci_p2pdma; 16650 16651 struct pci_dev { 16652 struct list_head bus_list; 16653 struct pci_bus *bus; 16654 struct pci_bus *subordinate; 16655 void *sysdata; 16656 struct proc_dir_entry *procent; 16657 struct pci_slot *slot; 16658 unsigned int devfn; 16659 short unsigned int vendor; 16660 short unsigned int device; 16661 short unsigned int subsystem_vendor; 16662 short unsigned int subsystem_device; 16663 unsigned int class; 16664 u8 revision; 16665 u8 hdr_type; 16666 u16 aer_cap; 16667 struct aer_stats *aer_stats; 16668 struct rcec_ea *rcec_ea; 16669 struct pci_dev *rcec; 16670 u8 pcie_cap; 16671 u8 msi_cap; 16672 u8 msix_cap; 16673 u8 pcie_mpss: 3; 16674 u8 rom_base_reg; 16675 u8 pin; 16676 u16 pcie_flags_reg; 16677 long unsigned int *dma_alias_mask; 16678 struct pci_driver *driver; 16679 u64 dma_mask; 16680 struct device_dma_parameters dma_parms; 16681 pci_power_t current_state; 16682 unsigned int imm_ready: 1; 16683 u8 pm_cap; 16684 unsigned int pme_support: 5; 16685 unsigned int pme_poll: 1; 16686 unsigned int d1_support: 1; 16687 unsigned int d2_support: 1; 16688 unsigned int no_d1d2: 1; 16689 unsigned int no_d3cold: 1; 16690 unsigned int bridge_d3: 1; 16691 unsigned int d3cold_allowed: 1; 16692 unsigned int mmio_always_on: 1; 16693 unsigned int wakeup_prepared: 1; 16694 unsigned int runtime_d3cold: 1; 16695 unsigned int skip_bus_pm: 1; 16696 unsigned int ignore_hotplug: 1; 16697 unsigned int hotplug_user_indicators: 1; 16698 unsigned int clear_retrain_link: 1; 16699 unsigned int d3hot_delay; 16700 unsigned int d3cold_delay; 16701 struct pcie_link_state *link_state; 16702 unsigned int ltr_path: 1; 16703 u16 l1ss; 16704 unsigned int eetlp_prefix_path: 1; 16705 pci_channel_state_t error_state; 16706 struct device dev; 16707 int cfg_size; 16708 unsigned int irq; 16709 struct resource resource[17]; 16710 bool match_driver; 16711 unsigned int transparent: 1; 16712 unsigned int io_window: 1; 16713 unsigned int pref_window: 1; 16714 unsigned int pref_64_window: 1; 16715 unsigned int multifunction: 1; 16716 unsigned int is_busmaster: 1; 16717 unsigned int no_msi: 1; 16718 unsigned int no_64bit_msi: 1; 16719 unsigned int block_cfg_access: 1; 16720 unsigned int broken_parity_status: 1; 16721 unsigned int irq_reroute_variant: 2; 16722 unsigned int msi_enabled: 1; 16723 unsigned int msix_enabled: 1; 16724 unsigned int ari_enabled: 1; 16725 unsigned int ats_enabled: 1; 16726 unsigned int pasid_enabled: 1; 16727 unsigned int pri_enabled: 1; 16728 unsigned int is_managed: 1; 16729 unsigned int needs_freset: 1; 16730 unsigned int state_saved: 1; 16731 unsigned int is_physfn: 1; 16732 unsigned int is_virtfn: 1; 16733 unsigned int reset_fn: 1; 16734 unsigned int is_hotplug_bridge: 1; 16735 unsigned int shpc_managed: 1; 16736 unsigned int is_thunderbolt: 1; 16737 unsigned int untrusted: 1; 16738 unsigned int external_facing: 1; 16739 unsigned int broken_intx_masking: 1; 16740 unsigned int io_window_1k: 1; 16741 unsigned int irq_managed: 1; 16742 unsigned int non_compliant_bars: 1; 16743 unsigned int is_probed: 1; 16744 unsigned int link_active_reporting: 1; 16745 unsigned int no_vf_scan: 1; 16746 unsigned int no_command_memory: 1; 16747 pci_dev_flags_t dev_flags; 16748 atomic_t enable_cnt; 16749 u32 saved_config_space[16]; 16750 struct hlist_head saved_cap_space; 16751 struct bin_attribute *rom_attr; 16752 int rom_attr_enabled; 16753 struct bin_attribute *res_attr[17]; 16754 struct bin_attribute *res_attr_wc[17]; 16755 unsigned int broken_cmd_compl: 1; 16756 unsigned int ptm_root: 1; 16757 unsigned int ptm_enabled: 1; 16758 u8 ptm_granularity; 16759 const struct attribute_group **msi_irq_groups; 16760 struct pci_vpd *vpd; 16761 u16 dpc_cap; 16762 unsigned int dpc_rp_extensions: 1; 16763 u8 dpc_rp_log_size; 16764 union { 16765 struct pci_sriov *sriov; 16766 struct pci_dev *physfn; 16767 }; 16768 u16 ats_cap; 16769 u8 ats_stu; 16770 u16 pri_cap; 16771 u32 pri_reqs_alloc; 16772 unsigned int pasid_required: 1; 16773 u16 pasid_cap; 16774 u16 pasid_features; 16775 struct pci_p2pdma *p2pdma; 16776 u16 acs_cap; 16777 phys_addr_t rom; 16778 size_t romlen; 16779 char *driver_override; 16780 long unsigned int priv_flags; 16781 }; 16782 16783 struct pci_device_id { 16784 __u32 vendor; 16785 __u32 device; 16786 __u32 subvendor; 16787 __u32 subdevice; 16788 __u32 class; 16789 __u32 class_mask; 16790 kernel_ulong_t driver_data; 16791 }; 16792 16793 struct hotplug_slot; 16794 16795 struct pci_slot { 16796 struct pci_bus *bus; 16797 struct list_head list; 16798 struct hotplug_slot *hotplug; 16799 unsigned char number; 16800 struct kobject kobj; 16801 }; 16802 16803 typedef short unsigned int pci_bus_flags_t; 16804 16805 struct pci_ops; 16806 16807 struct msi_controller; 16808 16809 struct pci_bus { 16810 struct list_head node; 16811 struct pci_bus *parent; 16812 struct list_head children; 16813 struct list_head devices; 16814 struct pci_dev *self; 16815 struct list_head slots; 16816 struct resource *resource[4]; 16817 struct list_head resources; 16818 struct resource busn_res; 16819 struct pci_ops *ops; 16820 struct msi_controller *msi; 16821 void *sysdata; 16822 struct proc_dir_entry *procdir; 16823 unsigned char number; 16824 unsigned char primary; 16825 unsigned char max_bus_speed; 16826 unsigned char cur_bus_speed; 16827 char name[48]; 16828 short unsigned int bridge_ctl; 16829 pci_bus_flags_t bus_flags; 16830 struct device *bridge; 16831 struct device dev; 16832 struct bin_attribute *legacy_io; 16833 struct bin_attribute *legacy_mem; 16834 unsigned int is_added: 1; 16835 }; 16836 16837 enum { 16838 PCI_STD_RESOURCES = 0, 16839 PCI_STD_RESOURCE_END = 5, 16840 PCI_ROM_RESOURCE = 6, 16841 PCI_IOV_RESOURCES = 7, 16842 PCI_IOV_RESOURCE_END = 12, 16843 PCI_BRIDGE_RESOURCES = 13, 16844 PCI_BRIDGE_RESOURCE_END = 16, 16845 PCI_NUM_RESOURCES = 17, 16846 DEVICE_COUNT_RESOURCE = 17, 16847 }; 16848 16849 typedef unsigned int pcie_reset_state_t; 16850 16851 struct pci_dynids { 16852 spinlock_t lock; 16853 struct list_head list; 16854 }; 16855 16856 struct pci_error_handlers; 16857 16858 struct pci_driver { 16859 struct list_head node; 16860 const char *name; 16861 const struct pci_device_id *id_table; 16862 int (*probe)(struct pci_dev *, const struct pci_device_id *); 16863 void (*remove)(struct pci_dev *); 16864 int (*suspend)(struct pci_dev *, pm_message_t); 16865 int (*resume)(struct pci_dev *); 16866 void (*shutdown)(struct pci_dev *); 16867 int (*sriov_configure)(struct pci_dev *, int); 16868 const struct pci_error_handlers *err_handler; 16869 const struct attribute_group **groups; 16870 struct device_driver driver; 16871 struct pci_dynids dynids; 16872 }; 16873 16874 struct pci_ops { 16875 int (*add_bus)(struct pci_bus *); 16876 void (*remove_bus)(struct pci_bus *); 16877 void * (*map_bus)(struct pci_bus *, unsigned int, int); 16878 int (*read)(struct pci_bus *, unsigned int, int, int, u32 *); 16879 int (*write)(struct pci_bus *, unsigned int, int, int, u32); 16880 }; 16881 16882 typedef unsigned int pci_ers_result_t; 16883 16884 struct pci_error_handlers { 16885 pci_ers_result_t (*error_detected)(struct pci_dev *, pci_channel_state_t); 16886 pci_ers_result_t (*mmio_enabled)(struct pci_dev *); 16887 pci_ers_result_t (*slot_reset)(struct pci_dev *); 16888 void (*reset_prepare)(struct pci_dev *); 16889 void (*reset_done)(struct pci_dev *); 16890 void (*resume)(struct pci_dev *); 16891 }; 16892 16893 struct syscore_ops { 16894 struct list_head node; 16895 int (*suspend)(); 16896 void (*resume)(); 16897 void (*shutdown)(); 16898 }; 16899 16900 enum ibs_states { 16901 IBS_ENABLED = 0, 16902 IBS_STARTED = 1, 16903 IBS_STOPPING = 2, 16904 IBS_STOPPED = 3, 16905 IBS_MAX_STATES = 4, 16906 }; 16907 16908 struct cpu_perf_ibs { 16909 struct perf_event *event; 16910 long unsigned int state[1]; 16911 }; 16912 16913 struct perf_ibs { 16914 struct pmu pmu; 16915 unsigned int msr; 16916 u64 config_mask; 16917 u64 cnt_mask; 16918 u64 enable_mask; 16919 u64 valid_mask; 16920 u64 max_period; 16921 long unsigned int offset_mask[1]; 16922 int offset_max; 16923 unsigned int fetch_count_reset_broken: 1; 16924 struct cpu_perf_ibs *pcpu; 16925 struct attribute **format_attrs; 16926 struct attribute_group format_group; 16927 const struct attribute_group *attr_groups[2]; 16928 u64 (*get_count)(u64); 16929 }; 16930 16931 struct perf_ibs_data { 16932 u32 size; 16933 union { 16934 u32 data[0]; 16935 u32 caps; 16936 }; 16937 u64 regs[8]; 16938 }; 16939 16940 struct amd_iommu; 16941 16942 struct perf_amd_iommu { 16943 struct list_head list; 16944 struct pmu pmu; 16945 struct amd_iommu *iommu; 16946 char name[16]; 16947 u8 max_banks; 16948 u8 max_counters; 16949 u64 cntr_assign_mask; 16950 raw_spinlock_t lock; 16951 }; 16952 16953 struct amd_iommu_event_desc { 16954 struct kobj_attribute attr; 16955 const char *event; 16956 }; 16957 16958 enum perf_msr_id { 16959 PERF_MSR_TSC = 0, 16960 PERF_MSR_APERF = 1, 16961 PERF_MSR_MPERF = 2, 16962 PERF_MSR_PPERF = 3, 16963 PERF_MSR_SMI = 4, 16964 PERF_MSR_PTSC = 5, 16965 PERF_MSR_IRPERF = 6, 16966 PERF_MSR_THERM = 7, 16967 PERF_MSR_EVENT_MAX = 8, 16968 }; 16969 16970 struct x86_cpu_desc { 16971 u8 x86_family; 16972 u8 x86_vendor; 16973 u8 x86_model; 16974 u8 x86_stepping; 16975 u32 x86_microcode_rev; 16976 }; 16977 16978 union cpuid10_eax { 16979 struct { 16980 unsigned int version_id: 8; 16981 unsigned int num_counters: 8; 16982 unsigned int bit_width: 8; 16983 unsigned int mask_length: 8; 16984 } split; 16985 unsigned int full; 16986 }; 16987 16988 union cpuid10_ebx { 16989 struct { 16990 unsigned int no_unhalted_core_cycles: 1; 16991 unsigned int no_instructions_retired: 1; 16992 unsigned int no_unhalted_reference_cycles: 1; 16993 unsigned int no_llc_reference: 1; 16994 unsigned int no_llc_misses: 1; 16995 unsigned int no_branch_instruction_retired: 1; 16996 unsigned int no_branch_misses_retired: 1; 16997 } split; 16998 unsigned int full; 16999 }; 17000 17001 union cpuid10_edx { 17002 struct { 17003 unsigned int num_counters_fixed: 5; 17004 unsigned int bit_width_fixed: 8; 17005 unsigned int reserved1: 2; 17006 unsigned int anythread_deprecated: 1; 17007 unsigned int reserved2: 16; 17008 } split; 17009 unsigned int full; 17010 }; 17011 17012 enum { 17013 LBR_FORMAT_32 = 0, 17014 LBR_FORMAT_LIP = 1, 17015 LBR_FORMAT_EIP = 2, 17016 LBR_FORMAT_EIP_FLAGS = 3, 17017 LBR_FORMAT_EIP_FLAGS2 = 4, 17018 LBR_FORMAT_INFO = 5, 17019 LBR_FORMAT_TIME = 6, 17020 LBR_FORMAT_MAX_KNOWN = 6, 17021 }; 17022 17023 union x86_pmu_config { 17024 struct { 17025 u64 event: 8; 17026 u64 umask: 8; 17027 u64 usr: 1; 17028 u64 os: 1; 17029 u64 edge: 1; 17030 u64 pc: 1; 17031 u64 interrupt: 1; 17032 u64 __reserved1: 1; 17033 u64 en: 1; 17034 u64 inv: 1; 17035 u64 cmask: 8; 17036 u64 event2: 4; 17037 u64 __reserved2: 4; 17038 u64 go: 1; 17039 u64 ho: 1; 17040 } bits; 17041 u64 value; 17042 }; 17043 17044 enum pageflags { 17045 PG_locked = 0, 17046 PG_referenced = 1, 17047 PG_uptodate = 2, 17048 PG_dirty = 3, 17049 PG_lru = 4, 17050 PG_active = 5, 17051 PG_workingset = 6, 17052 PG_waiters = 7, 17053 PG_error = 8, 17054 PG_slab = 9, 17055 PG_owner_priv_1 = 10, 17056 PG_arch_1 = 11, 17057 PG_reserved = 12, 17058 PG_private = 13, 17059 PG_private_2 = 14, 17060 PG_writeback = 15, 17061 PG_head = 16, 17062 PG_mappedtodisk = 17, 17063 PG_reclaim = 18, 17064 PG_swapbacked = 19, 17065 PG_unevictable = 20, 17066 PG_mlocked = 21, 17067 PG_uncached = 22, 17068 PG_hwpoison = 23, 17069 PG_arch_2 = 24, 17070 __NR_PAGEFLAGS = 25, 17071 PG_checked = 10, 17072 PG_swapcache = 10, 17073 PG_fscache = 14, 17074 PG_pinned = 10, 17075 PG_savepinned = 3, 17076 PG_foreign = 10, 17077 PG_xen_remapped = 10, 17078 PG_slob_free = 13, 17079 PG_double_map = 6, 17080 PG_isolated = 18, 17081 PG_reported = 2, 17082 }; 17083 17084 struct bts_ctx { 17085 struct perf_output_handle handle; 17086 long: 64; 17087 long: 64; 17088 long: 64; 17089 long: 64; 17090 long: 64; 17091 long: 64; 17092 long: 64; 17093 long: 64; 17094 long: 64; 17095 long: 64; 17096 long: 64; 17097 long: 64; 17098 long: 64; 17099 long: 64; 17100 long: 64; 17101 long: 64; 17102 long: 64; 17103 long: 64; 17104 long: 64; 17105 long: 64; 17106 long: 64; 17107 long: 64; 17108 long: 64; 17109 long: 64; 17110 long: 64; 17111 long: 64; 17112 long: 64; 17113 long: 64; 17114 long: 64; 17115 long: 64; 17116 long: 64; 17117 long: 64; 17118 long: 64; 17119 long: 64; 17120 long: 64; 17121 long: 64; 17122 long: 64; 17123 long: 64; 17124 long: 64; 17125 long: 64; 17126 long: 64; 17127 long: 64; 17128 long: 64; 17129 long: 64; 17130 long: 64; 17131 long: 64; 17132 long: 64; 17133 long: 64; 17134 long: 64; 17135 long: 64; 17136 long: 64; 17137 long: 64; 17138 long: 64; 17139 long: 64; 17140 long: 64; 17141 long: 64; 17142 long: 64; 17143 long: 64; 17144 long: 64; 17145 long: 64; 17146 long: 64; 17147 long: 64; 17148 long: 64; 17149 long: 64; 17150 long: 64; 17151 long: 64; 17152 long: 64; 17153 long: 64; 17154 long: 64; 17155 long: 64; 17156 long: 64; 17157 long: 64; 17158 long: 64; 17159 long: 64; 17160 long: 64; 17161 long: 64; 17162 long: 64; 17163 long: 64; 17164 long: 64; 17165 long: 64; 17166 long: 64; 17167 long: 64; 17168 long: 64; 17169 long: 64; 17170 long: 64; 17171 long: 64; 17172 long: 64; 17173 long: 64; 17174 long: 64; 17175 long: 64; 17176 long: 64; 17177 long: 64; 17178 long: 64; 17179 long: 64; 17180 long: 64; 17181 long: 64; 17182 long: 64; 17183 long: 64; 17184 long: 64; 17185 long: 64; 17186 long: 64; 17187 long: 64; 17188 long: 64; 17189 long: 64; 17190 long: 64; 17191 long: 64; 17192 long: 64; 17193 long: 64; 17194 long: 64; 17195 long: 64; 17196 long: 64; 17197 long: 64; 17198 long: 64; 17199 long: 64; 17200 long: 64; 17201 long: 64; 17202 long: 64; 17203 long: 64; 17204 long: 64; 17205 long: 64; 17206 long: 64; 17207 long: 64; 17208 long: 64; 17209 long: 64; 17210 long: 64; 17211 long: 64; 17212 long: 64; 17213 long: 64; 17214 long: 64; 17215 long: 64; 17216 long: 64; 17217 long: 64; 17218 long: 64; 17219 long: 64; 17220 long: 64; 17221 long: 64; 17222 long: 64; 17223 long: 64; 17224 long: 64; 17225 long: 64; 17226 long: 64; 17227 long: 64; 17228 long: 64; 17229 long: 64; 17230 long: 64; 17231 long: 64; 17232 long: 64; 17233 long: 64; 17234 long: 64; 17235 long: 64; 17236 long: 64; 17237 long: 64; 17238 long: 64; 17239 long: 64; 17240 long: 64; 17241 long: 64; 17242 long: 64; 17243 long: 64; 17244 long: 64; 17245 long: 64; 17246 long: 64; 17247 long: 64; 17248 long: 64; 17249 long: 64; 17250 long: 64; 17251 long: 64; 17252 long: 64; 17253 long: 64; 17254 long: 64; 17255 long: 64; 17256 long: 64; 17257 long: 64; 17258 long: 64; 17259 long: 64; 17260 long: 64; 17261 long: 64; 17262 long: 64; 17263 long: 64; 17264 long: 64; 17265 long: 64; 17266 long: 64; 17267 long: 64; 17268 long: 64; 17269 long: 64; 17270 long: 64; 17271 long: 64; 17272 long: 64; 17273 long: 64; 17274 long: 64; 17275 long: 64; 17276 long: 64; 17277 long: 64; 17278 long: 64; 17279 long: 64; 17280 long: 64; 17281 long: 64; 17282 long: 64; 17283 long: 64; 17284 long: 64; 17285 long: 64; 17286 long: 64; 17287 long: 64; 17288 long: 64; 17289 long: 64; 17290 long: 64; 17291 long: 64; 17292 long: 64; 17293 long: 64; 17294 long: 64; 17295 long: 64; 17296 long: 64; 17297 long: 64; 17298 long: 64; 17299 long: 64; 17300 long: 64; 17301 long: 64; 17302 long: 64; 17303 long: 64; 17304 long: 64; 17305 long: 64; 17306 long: 64; 17307 long: 64; 17308 long: 64; 17309 long: 64; 17310 long: 64; 17311 long: 64; 17312 long: 64; 17313 long: 64; 17314 long: 64; 17315 long: 64; 17316 long: 64; 17317 long: 64; 17318 long: 64; 17319 long: 64; 17320 long: 64; 17321 long: 64; 17322 long: 64; 17323 long: 64; 17324 long: 64; 17325 long: 64; 17326 long: 64; 17327 long: 64; 17328 long: 64; 17329 long: 64; 17330 long: 64; 17331 long: 64; 17332 long: 64; 17333 long: 64; 17334 long: 64; 17335 long: 64; 17336 long: 64; 17337 long: 64; 17338 long: 64; 17339 long: 64; 17340 long: 64; 17341 long: 64; 17342 long: 64; 17343 long: 64; 17344 long: 64; 17345 long: 64; 17346 long: 64; 17347 long: 64; 17348 long: 64; 17349 long: 64; 17350 long: 64; 17351 long: 64; 17352 long: 64; 17353 long: 64; 17354 long: 64; 17355 long: 64; 17356 long: 64; 17357 long: 64; 17358 long: 64; 17359 long: 64; 17360 long: 64; 17361 long: 64; 17362 long: 64; 17363 long: 64; 17364 long: 64; 17365 long: 64; 17366 long: 64; 17367 long: 64; 17368 long: 64; 17369 long: 64; 17370 long: 64; 17371 long: 64; 17372 long: 64; 17373 long: 64; 17374 long: 64; 17375 long: 64; 17376 long: 64; 17377 long: 64; 17378 long: 64; 17379 long: 64; 17380 long: 64; 17381 long: 64; 17382 long: 64; 17383 long: 64; 17384 long: 64; 17385 long: 64; 17386 long: 64; 17387 long: 64; 17388 long: 64; 17389 long: 64; 17390 long: 64; 17391 long: 64; 17392 long: 64; 17393 long: 64; 17394 long: 64; 17395 long: 64; 17396 long: 64; 17397 long: 64; 17398 long: 64; 17399 long: 64; 17400 long: 64; 17401 long: 64; 17402 long: 64; 17403 long: 64; 17404 long: 64; 17405 long: 64; 17406 long: 64; 17407 long: 64; 17408 long: 64; 17409 long: 64; 17410 long: 64; 17411 long: 64; 17412 long: 64; 17413 long: 64; 17414 long: 64; 17415 long: 64; 17416 long: 64; 17417 long: 64; 17418 long: 64; 17419 long: 64; 17420 long: 64; 17421 long: 64; 17422 long: 64; 17423 long: 64; 17424 long: 64; 17425 long: 64; 17426 long: 64; 17427 long: 64; 17428 long: 64; 17429 long: 64; 17430 long: 64; 17431 long: 64; 17432 long: 64; 17433 long: 64; 17434 long: 64; 17435 long: 64; 17436 long: 64; 17437 long: 64; 17438 long: 64; 17439 long: 64; 17440 long: 64; 17441 long: 64; 17442 long: 64; 17443 long: 64; 17444 long: 64; 17445 long: 64; 17446 long: 64; 17447 long: 64; 17448 long: 64; 17449 long: 64; 17450 long: 64; 17451 long: 64; 17452 long: 64; 17453 long: 64; 17454 long: 64; 17455 long: 64; 17456 long: 64; 17457 long: 64; 17458 long: 64; 17459 long: 64; 17460 long: 64; 17461 long: 64; 17462 long: 64; 17463 long: 64; 17464 long: 64; 17465 long: 64; 17466 long: 64; 17467 long: 64; 17468 long: 64; 17469 long: 64; 17470 long: 64; 17471 long: 64; 17472 long: 64; 17473 long: 64; 17474 long: 64; 17475 long: 64; 17476 long: 64; 17477 long: 64; 17478 long: 64; 17479 long: 64; 17480 long: 64; 17481 long: 64; 17482 long: 64; 17483 long: 64; 17484 long: 64; 17485 long: 64; 17486 long: 64; 17487 long: 64; 17488 long: 64; 17489 long: 64; 17490 long: 64; 17491 long: 64; 17492 long: 64; 17493 long: 64; 17494 long: 64; 17495 long: 64; 17496 long: 64; 17497 long: 64; 17498 long: 64; 17499 long: 64; 17500 long: 64; 17501 long: 64; 17502 long: 64; 17503 long: 64; 17504 long: 64; 17505 long: 64; 17506 long: 64; 17507 long: 64; 17508 long: 64; 17509 long: 64; 17510 long: 64; 17511 long: 64; 17512 long: 64; 17513 long: 64; 17514 long: 64; 17515 long: 64; 17516 long: 64; 17517 long: 64; 17518 long: 64; 17519 long: 64; 17520 long: 64; 17521 long: 64; 17522 long: 64; 17523 long: 64; 17524 long: 64; 17525 long: 64; 17526 long: 64; 17527 long: 64; 17528 long: 64; 17529 long: 64; 17530 long: 64; 17531 long: 64; 17532 long: 64; 17533 long: 64; 17534 long: 64; 17535 long: 64; 17536 long: 64; 17537 long: 64; 17538 long: 64; 17539 long: 64; 17540 long: 64; 17541 long: 64; 17542 long: 64; 17543 long: 64; 17544 long: 64; 17545 long: 64; 17546 long: 64; 17547 long: 64; 17548 long: 64; 17549 long: 64; 17550 long: 64; 17551 long: 64; 17552 long: 64; 17553 long: 64; 17554 long: 64; 17555 long: 64; 17556 long: 64; 17557 long: 64; 17558 long: 64; 17559 long: 64; 17560 long: 64; 17561 long: 64; 17562 long: 64; 17563 long: 64; 17564 long: 64; 17565 long: 64; 17566 long: 64; 17567 long: 64; 17568 long: 64; 17569 long: 64; 17570 long: 64; 17571 long: 64; 17572 long: 64; 17573 long: 64; 17574 long: 64; 17575 long: 64; 17576 long: 64; 17577 long: 64; 17578 long: 64; 17579 long: 64; 17580 long: 64; 17581 long: 64; 17582 long: 64; 17583 long: 64; 17584 long: 64; 17585 long: 64; 17586 long: 64; 17587 long: 64; 17588 long: 64; 17589 long: 64; 17590 long: 64; 17591 struct debug_store ds_back; 17592 int state; 17593 long: 32; 17594 long: 64; 17595 long: 64; 17596 long: 64; 17597 long: 64; 17598 long: 64; 17599 long: 64; 17600 long: 64; 17601 long: 64; 17602 long: 64; 17603 long: 64; 17604 long: 64; 17605 long: 64; 17606 long: 64; 17607 long: 64; 17608 long: 64; 17609 long: 64; 17610 long: 64; 17611 long: 64; 17612 long: 64; 17613 long: 64; 17614 long: 64; 17615 long: 64; 17616 long: 64; 17617 long: 64; 17618 long: 64; 17619 long: 64; 17620 long: 64; 17621 long: 64; 17622 long: 64; 17623 long: 64; 17624 long: 64; 17625 long: 64; 17626 long: 64; 17627 long: 64; 17628 long: 64; 17629 long: 64; 17630 long: 64; 17631 long: 64; 17632 long: 64; 17633 long: 64; 17634 long: 64; 17635 long: 64; 17636 long: 64; 17637 long: 64; 17638 long: 64; 17639 long: 64; 17640 long: 64; 17641 long: 64; 17642 long: 64; 17643 long: 64; 17644 long: 64; 17645 long: 64; 17646 long: 64; 17647 long: 64; 17648 long: 64; 17649 long: 64; 17650 long: 64; 17651 long: 64; 17652 long: 64; 17653 long: 64; 17654 long: 64; 17655 long: 64; 17656 long: 64; 17657 long: 64; 17658 long: 64; 17659 long: 64; 17660 long: 64; 17661 long: 64; 17662 long: 64; 17663 long: 64; 17664 long: 64; 17665 long: 64; 17666 long: 64; 17667 long: 64; 17668 long: 64; 17669 long: 64; 17670 long: 64; 17671 long: 64; 17672 long: 64; 17673 long: 64; 17674 long: 64; 17675 long: 64; 17676 long: 64; 17677 long: 64; 17678 long: 64; 17679 long: 64; 17680 long: 64; 17681 long: 64; 17682 long: 64; 17683 long: 64; 17684 long: 64; 17685 long: 64; 17686 long: 64; 17687 long: 64; 17688 long: 64; 17689 long: 64; 17690 long: 64; 17691 long: 64; 17692 long: 64; 17693 long: 64; 17694 long: 64; 17695 long: 64; 17696 long: 64; 17697 long: 64; 17698 long: 64; 17699 long: 64; 17700 long: 64; 17701 long: 64; 17702 long: 64; 17703 long: 64; 17704 long: 64; 17705 long: 64; 17706 long: 64; 17707 long: 64; 17708 long: 64; 17709 long: 64; 17710 long: 64; 17711 long: 64; 17712 long: 64; 17713 long: 64; 17714 long: 64; 17715 long: 64; 17716 long: 64; 17717 long: 64; 17718 long: 64; 17719 long: 64; 17720 long: 64; 17721 long: 64; 17722 long: 64; 17723 long: 64; 17724 long: 64; 17725 long: 64; 17726 long: 64; 17727 long: 64; 17728 long: 64; 17729 long: 64; 17730 long: 64; 17731 long: 64; 17732 long: 64; 17733 long: 64; 17734 long: 64; 17735 long: 64; 17736 long: 64; 17737 long: 64; 17738 long: 64; 17739 long: 64; 17740 long: 64; 17741 long: 64; 17742 long: 64; 17743 long: 64; 17744 long: 64; 17745 long: 64; 17746 long: 64; 17747 long: 64; 17748 long: 64; 17749 long: 64; 17750 long: 64; 17751 long: 64; 17752 long: 64; 17753 long: 64; 17754 long: 64; 17755 long: 64; 17756 long: 64; 17757 long: 64; 17758 long: 64; 17759 long: 64; 17760 long: 64; 17761 long: 64; 17762 long: 64; 17763 long: 64; 17764 long: 64; 17765 long: 64; 17766 long: 64; 17767 long: 64; 17768 long: 64; 17769 long: 64; 17770 long: 64; 17771 long: 64; 17772 long: 64; 17773 long: 64; 17774 long: 64; 17775 long: 64; 17776 long: 64; 17777 long: 64; 17778 long: 64; 17779 long: 64; 17780 long: 64; 17781 long: 64; 17782 long: 64; 17783 long: 64; 17784 long: 64; 17785 long: 64; 17786 long: 64; 17787 long: 64; 17788 long: 64; 17789 long: 64; 17790 long: 64; 17791 long: 64; 17792 long: 64; 17793 long: 64; 17794 long: 64; 17795 long: 64; 17796 long: 64; 17797 long: 64; 17798 long: 64; 17799 long: 64; 17800 long: 64; 17801 long: 64; 17802 long: 64; 17803 long: 64; 17804 long: 64; 17805 long: 64; 17806 long: 64; 17807 long: 64; 17808 long: 64; 17809 long: 64; 17810 long: 64; 17811 long: 64; 17812 long: 64; 17813 long: 64; 17814 long: 64; 17815 long: 64; 17816 long: 64; 17817 long: 64; 17818 long: 64; 17819 long: 64; 17820 long: 64; 17821 long: 64; 17822 long: 64; 17823 long: 64; 17824 long: 64; 17825 long: 64; 17826 long: 64; 17827 long: 64; 17828 long: 64; 17829 long: 64; 17830 long: 64; 17831 long: 64; 17832 long: 64; 17833 long: 64; 17834 long: 64; 17835 long: 64; 17836 long: 64; 17837 long: 64; 17838 long: 64; 17839 long: 64; 17840 long: 64; 17841 long: 64; 17842 long: 64; 17843 long: 64; 17844 long: 64; 17845 long: 64; 17846 long: 64; 17847 long: 64; 17848 long: 64; 17849 long: 64; 17850 long: 64; 17851 long: 64; 17852 long: 64; 17853 long: 64; 17854 long: 64; 17855 long: 64; 17856 long: 64; 17857 long: 64; 17858 long: 64; 17859 long: 64; 17860 long: 64; 17861 long: 64; 17862 long: 64; 17863 long: 64; 17864 long: 64; 17865 long: 64; 17866 long: 64; 17867 long: 64; 17868 long: 64; 17869 long: 64; 17870 long: 64; 17871 long: 64; 17872 long: 64; 17873 long: 64; 17874 long: 64; 17875 long: 64; 17876 long: 64; 17877 long: 64; 17878 long: 64; 17879 long: 64; 17880 long: 64; 17881 long: 64; 17882 long: 64; 17883 long: 64; 17884 long: 64; 17885 long: 64; 17886 long: 64; 17887 long: 64; 17888 long: 64; 17889 long: 64; 17890 long: 64; 17891 long: 64; 17892 long: 64; 17893 long: 64; 17894 long: 64; 17895 long: 64; 17896 long: 64; 17897 long: 64; 17898 long: 64; 17899 long: 64; 17900 long: 64; 17901 long: 64; 17902 long: 64; 17903 long: 64; 17904 long: 64; 17905 long: 64; 17906 long: 64; 17907 long: 64; 17908 long: 64; 17909 long: 64; 17910 long: 64; 17911 long: 64; 17912 long: 64; 17913 long: 64; 17914 long: 64; 17915 long: 64; 17916 long: 64; 17917 long: 64; 17918 long: 64; 17919 long: 64; 17920 long: 64; 17921 long: 64; 17922 long: 64; 17923 long: 64; 17924 long: 64; 17925 long: 64; 17926 long: 64; 17927 long: 64; 17928 long: 64; 17929 long: 64; 17930 long: 64; 17931 long: 64; 17932 long: 64; 17933 long: 64; 17934 long: 64; 17935 long: 64; 17936 long: 64; 17937 long: 64; 17938 long: 64; 17939 long: 64; 17940 long: 64; 17941 long: 64; 17942 long: 64; 17943 long: 64; 17944 long: 64; 17945 long: 64; 17946 long: 64; 17947 long: 64; 17948 long: 64; 17949 long: 64; 17950 long: 64; 17951 long: 64; 17952 long: 64; 17953 long: 64; 17954 long: 64; 17955 long: 64; 17956 long: 64; 17957 long: 64; 17958 long: 64; 17959 long: 64; 17960 long: 64; 17961 long: 64; 17962 long: 64; 17963 long: 64; 17964 long: 64; 17965 long: 64; 17966 long: 64; 17967 long: 64; 17968 long: 64; 17969 long: 64; 17970 long: 64; 17971 long: 64; 17972 long: 64; 17973 long: 64; 17974 long: 64; 17975 long: 64; 17976 long: 64; 17977 long: 64; 17978 long: 64; 17979 long: 64; 17980 long: 64; 17981 long: 64; 17982 long: 64; 17983 long: 64; 17984 long: 64; 17985 long: 64; 17986 long: 64; 17987 long: 64; 17988 long: 64; 17989 long: 64; 17990 long: 64; 17991 long: 64; 17992 long: 64; 17993 long: 64; 17994 long: 64; 17995 long: 64; 17996 long: 64; 17997 long: 64; 17998 long: 64; 17999 long: 64; 18000 long: 64; 18001 long: 64; 18002 long: 64; 18003 long: 64; 18004 long: 64; 18005 long: 64; 18006 long: 64; 18007 long: 64; 18008 long: 64; 18009 long: 64; 18010 long: 64; 18011 long: 64; 18012 long: 64; 18013 long: 64; 18014 long: 64; 18015 long: 64; 18016 long: 64; 18017 long: 64; 18018 long: 64; 18019 long: 64; 18020 long: 64; 18021 long: 64; 18022 long: 64; 18023 long: 64; 18024 long: 64; 18025 long: 64; 18026 long: 64; 18027 long: 64; 18028 long: 64; 18029 long: 64; 18030 long: 64; 18031 long: 64; 18032 long: 64; 18033 long: 64; 18034 long: 64; 18035 long: 64; 18036 long: 64; 18037 long: 64; 18038 long: 64; 18039 long: 64; 18040 long: 64; 18041 long: 64; 18042 long: 64; 18043 long: 64; 18044 long: 64; 18045 long: 64; 18046 long: 64; 18047 long: 64; 18048 long: 64; 18049 long: 64; 18050 long: 64; 18051 long: 64; 18052 long: 64; 18053 long: 64; 18054 long: 64; 18055 long: 64; 18056 long: 64; 18057 long: 64; 18058 long: 64; 18059 long: 64; 18060 long: 64; 18061 long: 64; 18062 long: 64; 18063 long: 64; 18064 long: 64; 18065 long: 64; 18066 long: 64; 18067 long: 64; 18068 long: 64; 18069 long: 64; 18070 long: 64; 18071 long: 64; 18072 long: 64; 18073 long: 64; 18074 long: 64; 18075 long: 64; 18076 long: 64; 18077 long: 64; 18078 long: 64; 18079 long: 64; 18080 long: 64; 18081 long: 64; 18082 long: 64; 18083 long: 64; 18084 long: 64; 18085 long: 64; 18086 long: 64; 18087 long: 64; 18088 long: 64; 18089 long: 64; 18090 long: 64; 18091 long: 64; 18092 long: 64; 18093 long: 64; 18094 long: 64; 18095 long: 64; 18096 long: 64; 18097 long: 64; 18098 long: 64; 18099 long: 64; 18100 long: 64; 18101 long: 64; 18102 long: 64; 18103 long: 64; 18104 long: 64; 18105 }; 18106 18107 enum { 18108 BTS_STATE_STOPPED = 0, 18109 BTS_STATE_INACTIVE = 1, 18110 BTS_STATE_ACTIVE = 2, 18111 }; 18112 18113 struct bts_phys { 18114 struct page *page; 18115 long unsigned int size; 18116 long unsigned int offset; 18117 long unsigned int displacement; 18118 }; 18119 18120 struct bts_buffer { 18121 size_t real_size; 18122 unsigned int nr_pages; 18123 unsigned int nr_bufs; 18124 unsigned int cur_buf; 18125 bool snapshot; 18126 local_t data_size; 18127 local_t head; 18128 long unsigned int end; 18129 void **data_pages; 18130 struct bts_phys buf[0]; 18131 }; 18132 18133 struct lbr_entry { 18134 u64 from; 18135 u64 to; 18136 u64 info; 18137 }; 18138 18139 struct x86_hw_tss { 18140 u32 reserved1; 18141 u64 sp0; 18142 u64 sp1; 18143 u64 sp2; 18144 u64 reserved2; 18145 u64 ist[7]; 18146 u32 reserved3; 18147 u32 reserved4; 18148 u16 reserved5; 18149 u16 io_bitmap_base; 18150 } __attribute__((packed)); 18151 18152 struct entry_stack { 18153 char stack[4096]; 18154 }; 18155 18156 struct entry_stack_page { 18157 struct entry_stack stack; 18158 }; 18159 18160 struct x86_io_bitmap { 18161 u64 prev_sequence; 18162 unsigned int prev_max; 18163 long unsigned int bitmap[1025]; 18164 long unsigned int mapall[1025]; 18165 }; 18166 18167 struct tss_struct { 18168 struct x86_hw_tss x86_tss; 18169 struct x86_io_bitmap io_bitmap; 18170 long: 64; 18171 long: 64; 18172 long: 64; 18173 long: 64; 18174 long: 64; 18175 long: 64; 18176 long: 64; 18177 long: 64; 18178 long: 64; 18179 long: 64; 18180 long: 64; 18181 long: 64; 18182 long: 64; 18183 long: 64; 18184 long: 64; 18185 long: 64; 18186 long: 64; 18187 long: 64; 18188 long: 64; 18189 long: 64; 18190 long: 64; 18191 long: 64; 18192 long: 64; 18193 long: 64; 18194 long: 64; 18195 long: 64; 18196 long: 64; 18197 long: 64; 18198 long: 64; 18199 long: 64; 18200 long: 64; 18201 long: 64; 18202 long: 64; 18203 long: 64; 18204 long: 64; 18205 long: 64; 18206 long: 64; 18207 long: 64; 18208 long: 64; 18209 long: 64; 18210 long: 64; 18211 long: 64; 18212 long: 64; 18213 long: 64; 18214 long: 64; 18215 long: 64; 18216 long: 64; 18217 long: 64; 18218 long: 64; 18219 long: 64; 18220 long: 64; 18221 long: 64; 18222 long: 64; 18223 long: 64; 18224 long: 64; 18225 long: 64; 18226 long: 64; 18227 long: 64; 18228 long: 64; 18229 long: 64; 18230 long: 64; 18231 long: 64; 18232 long: 64; 18233 long: 64; 18234 long: 64; 18235 long: 64; 18236 long: 64; 18237 long: 64; 18238 long: 64; 18239 long: 64; 18240 long: 64; 18241 long: 64; 18242 long: 64; 18243 long: 64; 18244 long: 64; 18245 long: 64; 18246 long: 64; 18247 long: 64; 18248 long: 64; 18249 long: 64; 18250 long: 64; 18251 long: 64; 18252 long: 64; 18253 long: 64; 18254 long: 64; 18255 long: 64; 18256 long: 64; 18257 long: 64; 18258 long: 64; 18259 long: 64; 18260 long: 64; 18261 long: 64; 18262 long: 64; 18263 long: 64; 18264 long: 64; 18265 long: 64; 18266 long: 64; 18267 long: 64; 18268 long: 64; 18269 long: 64; 18270 long: 64; 18271 long: 64; 18272 long: 64; 18273 long: 64; 18274 long: 64; 18275 long: 64; 18276 long: 64; 18277 long: 64; 18278 long: 64; 18279 long: 64; 18280 long: 64; 18281 long: 64; 18282 long: 64; 18283 long: 64; 18284 long: 64; 18285 long: 64; 18286 long: 64; 18287 long: 64; 18288 long: 64; 18289 long: 64; 18290 long: 64; 18291 long: 64; 18292 long: 64; 18293 long: 64; 18294 long: 64; 18295 long: 64; 18296 long: 64; 18297 long: 64; 18298 long: 64; 18299 long: 64; 18300 long: 64; 18301 long: 64; 18302 long: 64; 18303 long: 64; 18304 long: 64; 18305 long: 64; 18306 long: 64; 18307 long: 64; 18308 long: 64; 18309 long: 64; 18310 long: 64; 18311 long: 64; 18312 long: 64; 18313 long: 64; 18314 long: 64; 18315 long: 64; 18316 long: 64; 18317 long: 64; 18318 long: 64; 18319 long: 64; 18320 long: 64; 18321 long: 64; 18322 long: 64; 18323 long: 64; 18324 long: 64; 18325 long: 64; 18326 long: 64; 18327 long: 64; 18328 long: 64; 18329 long: 64; 18330 long: 64; 18331 long: 64; 18332 long: 64; 18333 long: 64; 18334 long: 64; 18335 long: 64; 18336 long: 64; 18337 long: 64; 18338 long: 64; 18339 long: 64; 18340 long: 64; 18341 long: 64; 18342 long: 64; 18343 long: 64; 18344 long: 64; 18345 long: 64; 18346 long: 64; 18347 long: 64; 18348 long: 64; 18349 long: 64; 18350 long: 64; 18351 long: 64; 18352 long: 64; 18353 long: 64; 18354 long: 64; 18355 long: 64; 18356 long: 64; 18357 long: 64; 18358 long: 64; 18359 long: 64; 18360 long: 64; 18361 long: 64; 18362 long: 64; 18363 long: 64; 18364 long: 64; 18365 long: 64; 18366 long: 64; 18367 long: 64; 18368 long: 64; 18369 long: 64; 18370 long: 64; 18371 long: 64; 18372 long: 64; 18373 long: 64; 18374 long: 64; 18375 long: 64; 18376 long: 64; 18377 long: 64; 18378 long: 64; 18379 long: 64; 18380 long: 64; 18381 long: 64; 18382 long: 64; 18383 long: 64; 18384 long: 64; 18385 long: 64; 18386 long: 64; 18387 long: 64; 18388 long: 64; 18389 long: 64; 18390 long: 64; 18391 long: 64; 18392 long: 64; 18393 long: 64; 18394 long: 64; 18395 long: 64; 18396 long: 64; 18397 long: 64; 18398 long: 64; 18399 long: 64; 18400 long: 64; 18401 long: 64; 18402 long: 64; 18403 long: 64; 18404 long: 64; 18405 long: 64; 18406 long: 64; 18407 long: 64; 18408 long: 64; 18409 long: 64; 18410 long: 64; 18411 long: 64; 18412 long: 64; 18413 long: 64; 18414 long: 64; 18415 long: 64; 18416 long: 64; 18417 long: 64; 18418 long: 64; 18419 long: 64; 18420 long: 64; 18421 long: 64; 18422 long: 64; 18423 long: 64; 18424 long: 64; 18425 long: 64; 18426 long: 64; 18427 long: 64; 18428 long: 64; 18429 long: 64; 18430 long: 64; 18431 long: 64; 18432 long: 64; 18433 long: 64; 18434 long: 64; 18435 long: 64; 18436 long: 64; 18437 long: 64; 18438 long: 64; 18439 long: 64; 18440 long: 64; 18441 long: 64; 18442 long: 64; 18443 long: 64; 18444 long: 64; 18445 long: 64; 18446 long: 64; 18447 long: 64; 18448 long: 64; 18449 long: 64; 18450 long: 64; 18451 long: 64; 18452 long: 64; 18453 long: 64; 18454 long: 64; 18455 long: 64; 18456 long: 64; 18457 long: 64; 18458 long: 64; 18459 long: 64; 18460 long: 64; 18461 long: 64; 18462 long: 64; 18463 long: 64; 18464 long: 64; 18465 long: 64; 18466 long: 64; 18467 long: 64; 18468 long: 64; 18469 long: 64; 18470 long: 64; 18471 long: 64; 18472 long: 64; 18473 long: 64; 18474 long: 64; 18475 long: 64; 18476 long: 64; 18477 long: 64; 18478 long: 64; 18479 long: 64; 18480 long: 64; 18481 long: 64; 18482 long: 64; 18483 long: 64; 18484 long: 64; 18485 long: 64; 18486 long: 64; 18487 long: 64; 18488 long: 64; 18489 long: 64; 18490 long: 64; 18491 long: 64; 18492 long: 64; 18493 long: 64; 18494 long: 64; 18495 long: 64; 18496 long: 64; 18497 long: 64; 18498 long: 64; 18499 long: 64; 18500 long: 64; 18501 long: 64; 18502 long: 64; 18503 long: 64; 18504 long: 64; 18505 long: 64; 18506 long: 64; 18507 long: 64; 18508 long: 64; 18509 long: 64; 18510 long: 64; 18511 long: 64; 18512 long: 64; 18513 long: 64; 18514 long: 64; 18515 long: 64; 18516 long: 64; 18517 long: 64; 18518 long: 64; 18519 long: 64; 18520 long: 64; 18521 long: 64; 18522 long: 64; 18523 long: 64; 18524 long: 64; 18525 long: 64; 18526 long: 64; 18527 long: 64; 18528 long: 64; 18529 long: 64; 18530 long: 64; 18531 long: 64; 18532 long: 64; 18533 long: 64; 18534 long: 64; 18535 long: 64; 18536 long: 64; 18537 long: 64; 18538 long: 64; 18539 long: 64; 18540 long: 64; 18541 long: 64; 18542 long: 64; 18543 long: 64; 18544 long: 64; 18545 long: 64; 18546 long: 64; 18547 long: 64; 18548 long: 64; 18549 long: 64; 18550 long: 64; 18551 long: 64; 18552 long: 64; 18553 long: 64; 18554 long: 64; 18555 long: 64; 18556 long: 64; 18557 long: 64; 18558 long: 64; 18559 long: 64; 18560 long: 64; 18561 long: 64; 18562 long: 64; 18563 long: 64; 18564 long: 64; 18565 long: 64; 18566 long: 64; 18567 long: 64; 18568 long: 64; 18569 long: 64; 18570 long: 64; 18571 long: 64; 18572 long: 64; 18573 long: 64; 18574 long: 64; 18575 long: 64; 18576 long: 64; 18577 long: 64; 18578 long: 64; 18579 long: 64; 18580 long: 64; 18581 long: 64; 18582 long: 64; 18583 long: 64; 18584 long: 64; 18585 long: 64; 18586 long: 64; 18587 long: 64; 18588 long: 64; 18589 long: 64; 18590 long: 64; 18591 long: 64; 18592 long: 64; 18593 long: 64; 18594 long: 64; 18595 long: 64; 18596 long: 64; 18597 long: 64; 18598 long: 64; 18599 long: 64; 18600 long: 64; 18601 long: 64; 18602 long: 64; 18603 long: 64; 18604 long: 64; 18605 long: 64; 18606 long: 64; 18607 long: 64; 18608 long: 64; 18609 long: 64; 18610 long: 64; 18611 long: 64; 18612 long: 64; 18613 long: 64; 18614 long: 64; 18615 long: 64; 18616 long: 64; 18617 long: 64; 18618 long: 64; 18619 long: 64; 18620 long: 64; 18621 long: 64; 18622 long: 64; 18623 long: 64; 18624 long: 64; 18625 long: 64; 18626 long: 64; 18627 long: 64; 18628 long: 64; 18629 long: 64; 18630 long: 64; 18631 long: 64; 18632 long: 64; 18633 long: 64; 18634 long: 64; 18635 long: 64; 18636 long: 64; 18637 long: 64; 18638 long: 64; 18639 long: 64; 18640 long: 64; 18641 long: 64; 18642 long: 64; 18643 long: 64; 18644 long: 64; 18645 long: 64; 18646 long: 64; 18647 long: 64; 18648 long: 64; 18649 long: 64; 18650 long: 64; 18651 long: 64; 18652 long: 64; 18653 long: 64; 18654 long: 64; 18655 long: 64; 18656 long: 64; 18657 long: 64; 18658 long: 64; 18659 long: 64; 18660 long: 64; 18661 long: 64; 18662 long: 64; 18663 long: 64; 18664 long: 64; 18665 }; 18666 18667 struct debug_store_buffers { 18668 char bts_buffer[65536]; 18669 char pebs_buffer[65536]; 18670 }; 18671 18672 struct cea_exception_stacks { 18673 char DF_stack_guard[4096]; 18674 char DF_stack[4096]; 18675 char NMI_stack_guard[4096]; 18676 char NMI_stack[4096]; 18677 char DB_stack_guard[4096]; 18678 char DB_stack[4096]; 18679 char MCE_stack_guard[4096]; 18680 char MCE_stack[4096]; 18681 char VC_stack_guard[4096]; 18682 char VC_stack[4096]; 18683 char VC2_stack_guard[4096]; 18684 char VC2_stack[4096]; 18685 char IST_top_guard[4096]; 18686 }; 18687 18688 struct cpu_entry_area { 18689 char gdt[4096]; 18690 struct entry_stack_page entry_stack_page; 18691 struct tss_struct tss; 18692 struct cea_exception_stacks estacks; 18693 struct debug_store cpu_debug_store; 18694 struct debug_store_buffers cpu_debug_buffers; 18695 }; 18696 18697 struct pebs_basic { 18698 u64 format_size; 18699 u64 ip; 18700 u64 applicable_counters; 18701 u64 tsc; 18702 }; 18703 18704 struct pebs_meminfo { 18705 u64 address; 18706 u64 aux; 18707 u64 latency; 18708 u64 tsx_tuning; 18709 }; 18710 18711 struct pebs_gprs { 18712 u64 flags; 18713 u64 ip; 18714 u64 ax; 18715 u64 cx; 18716 u64 dx; 18717 u64 bx; 18718 u64 sp; 18719 u64 bp; 18720 u64 si; 18721 u64 di; 18722 u64 r8; 18723 u64 r9; 18724 u64 r10; 18725 u64 r11; 18726 u64 r12; 18727 u64 r13; 18728 u64 r14; 18729 u64 r15; 18730 }; 18731 18732 struct pebs_xmm { 18733 u64 xmm[32]; 18734 }; 18735 18736 struct x86_perf_regs { 18737 struct pt_regs regs; 18738 u64 *xmm_regs; 18739 }; 18740 18741 typedef unsigned int insn_attr_t; 18742 18743 typedef unsigned char insn_byte_t; 18744 18745 typedef int insn_value_t; 18746 18747 struct insn_field { 18748 union { 18749 insn_value_t value; 18750 insn_byte_t bytes[4]; 18751 }; 18752 unsigned char got; 18753 unsigned char nbytes; 18754 }; 18755 18756 struct insn { 18757 struct insn_field prefixes; 18758 struct insn_field rex_prefix; 18759 struct insn_field vex_prefix; 18760 struct insn_field opcode; 18761 struct insn_field modrm; 18762 struct insn_field sib; 18763 struct insn_field displacement; 18764 union { 18765 struct insn_field immediate; 18766 struct insn_field moffset1; 18767 struct insn_field immediate1; 18768 }; 18769 union { 18770 struct insn_field moffset2; 18771 struct insn_field immediate2; 18772 }; 18773 int emulate_prefix_size; 18774 insn_attr_t attr; 18775 unsigned char opnd_bytes; 18776 unsigned char addr_bytes; 18777 unsigned char length; 18778 unsigned char x86_64; 18779 const insn_byte_t *kaddr; 18780 const insn_byte_t *end_kaddr; 18781 const insn_byte_t *next_byte; 18782 }; 18783 18784 enum { 18785 PERF_TXN_ELISION = 1, 18786 PERF_TXN_TRANSACTION = 2, 18787 PERF_TXN_SYNC = 4, 18788 PERF_TXN_ASYNC = 8, 18789 PERF_TXN_RETRY = 16, 18790 PERF_TXN_CONFLICT = 32, 18791 PERF_TXN_CAPACITY_WRITE = 64, 18792 PERF_TXN_CAPACITY_READ = 128, 18793 PERF_TXN_MAX = 256, 18794 PERF_TXN_ABORT_MASK = 0, 18795 PERF_TXN_ABORT_SHIFT = 32, 18796 }; 18797 18798 struct perf_event_header { 18799 __u32 type; 18800 __u16 misc; 18801 __u16 size; 18802 }; 18803 18804 union intel_x86_pebs_dse { 18805 u64 val; 18806 struct { 18807 unsigned int ld_dse: 4; 18808 unsigned int ld_stlb_miss: 1; 18809 unsigned int ld_locked: 1; 18810 unsigned int ld_reserved: 26; 18811 }; 18812 struct { 18813 unsigned int st_l1d_hit: 1; 18814 unsigned int st_reserved1: 3; 18815 unsigned int st_stlb_miss: 1; 18816 unsigned int st_locked: 1; 18817 unsigned int st_reserved2: 26; 18818 }; 18819 }; 18820 18821 struct pebs_record_core { 18822 u64 flags; 18823 u64 ip; 18824 u64 ax; 18825 u64 bx; 18826 u64 cx; 18827 u64 dx; 18828 u64 si; 18829 u64 di; 18830 u64 bp; 18831 u64 sp; 18832 u64 r8; 18833 u64 r9; 18834 u64 r10; 18835 u64 r11; 18836 u64 r12; 18837 u64 r13; 18838 u64 r14; 18839 u64 r15; 18840 }; 18841 18842 struct pebs_record_nhm { 18843 u64 flags; 18844 u64 ip; 18845 u64 ax; 18846 u64 bx; 18847 u64 cx; 18848 u64 dx; 18849 u64 si; 18850 u64 di; 18851 u64 bp; 18852 u64 sp; 18853 u64 r8; 18854 u64 r9; 18855 u64 r10; 18856 u64 r11; 18857 u64 r12; 18858 u64 r13; 18859 u64 r14; 18860 u64 r15; 18861 u64 status; 18862 u64 dla; 18863 u64 dse; 18864 u64 lat; 18865 }; 18866 18867 union hsw_tsx_tuning { 18868 struct { 18869 u32 cycles_last_block: 32; 18870 u32 hle_abort: 1; 18871 u32 rtm_abort: 1; 18872 u32 instruction_abort: 1; 18873 u32 non_instruction_abort: 1; 18874 u32 retry: 1; 18875 u32 data_conflict: 1; 18876 u32 capacity_writes: 1; 18877 u32 capacity_reads: 1; 18878 }; 18879 u64 value; 18880 }; 18881 18882 struct pebs_record_skl { 18883 u64 flags; 18884 u64 ip; 18885 u64 ax; 18886 u64 bx; 18887 u64 cx; 18888 u64 dx; 18889 u64 si; 18890 u64 di; 18891 u64 bp; 18892 u64 sp; 18893 u64 r8; 18894 u64 r9; 18895 u64 r10; 18896 u64 r11; 18897 u64 r12; 18898 u64 r13; 18899 u64 r14; 18900 u64 r15; 18901 u64 status; 18902 u64 dla; 18903 u64 dse; 18904 u64 lat; 18905 u64 real_ip; 18906 u64 tsx_tuning; 18907 u64 tsc; 18908 }; 18909 18910 struct bts_record { 18911 u64 from; 18912 u64 to; 18913 u64 flags; 18914 }; 18915 18916 enum { 18917 PERF_BR_UNKNOWN = 0, 18918 PERF_BR_COND = 1, 18919 PERF_BR_UNCOND = 2, 18920 PERF_BR_IND = 3, 18921 PERF_BR_CALL = 4, 18922 PERF_BR_IND_CALL = 5, 18923 PERF_BR_RET = 6, 18924 PERF_BR_SYSCALL = 7, 18925 PERF_BR_SYSRET = 8, 18926 PERF_BR_COND_CALL = 9, 18927 PERF_BR_COND_RET = 10, 18928 PERF_BR_MAX = 11, 18929 }; 18930 18931 enum xfeature { 18932 XFEATURE_FP = 0, 18933 XFEATURE_SSE = 1, 18934 XFEATURE_YMM = 2, 18935 XFEATURE_BNDREGS = 3, 18936 XFEATURE_BNDCSR = 4, 18937 XFEATURE_OPMASK = 5, 18938 XFEATURE_ZMM_Hi256 = 6, 18939 XFEATURE_Hi16_ZMM = 7, 18940 XFEATURE_PT_UNIMPLEMENTED_SO_FAR = 8, 18941 XFEATURE_PKRU = 9, 18942 XFEATURE_PASID = 10, 18943 XFEATURE_RSRVD_COMP_11 = 11, 18944 XFEATURE_RSRVD_COMP_12 = 12, 18945 XFEATURE_RSRVD_COMP_13 = 13, 18946 XFEATURE_RSRVD_COMP_14 = 14, 18947 XFEATURE_LBR = 15, 18948 XFEATURE_MAX = 16, 18949 }; 18950 18951 struct arch_lbr_state { 18952 u64 lbr_ctl; 18953 u64 lbr_depth; 18954 u64 ler_from; 18955 u64 ler_to; 18956 u64 ler_info; 18957 struct lbr_entry entries[0]; 18958 }; 18959 18960 union cpuid28_eax { 18961 struct { 18962 unsigned int lbr_depth_mask: 8; 18963 unsigned int reserved: 22; 18964 unsigned int lbr_deep_c_reset: 1; 18965 unsigned int lbr_lip: 1; 18966 } split; 18967 unsigned int full; 18968 }; 18969 18970 union cpuid28_ebx { 18971 struct { 18972 unsigned int lbr_cpl: 1; 18973 unsigned int lbr_filter: 1; 18974 unsigned int lbr_call_stack: 1; 18975 } split; 18976 unsigned int full; 18977 }; 18978 18979 union cpuid28_ecx { 18980 struct { 18981 unsigned int lbr_mispred: 1; 18982 unsigned int lbr_timed_lbr: 1; 18983 unsigned int lbr_br_type: 1; 18984 } split; 18985 unsigned int full; 18986 }; 18987 18988 struct x86_pmu_lbr { 18989 unsigned int nr; 18990 unsigned int from; 18991 unsigned int to; 18992 unsigned int info; 18993 }; 18994 18995 struct x86_perf_task_context_opt { 18996 int lbr_callstack_users; 18997 int lbr_stack_state; 18998 int log_id; 18999 }; 19000 19001 struct x86_perf_task_context { 19002 u64 lbr_sel; 19003 int tos; 19004 int valid_lbrs; 19005 struct x86_perf_task_context_opt opt; 19006 struct lbr_entry lbr[32]; 19007 }; 19008 19009 struct x86_perf_task_context_arch_lbr { 19010 struct x86_perf_task_context_opt opt; 19011 struct lbr_entry entries[0]; 19012 }; 19013 19014 struct x86_perf_task_context_arch_lbr_xsave { 19015 struct x86_perf_task_context_opt opt; 19016 long: 32; 19017 long: 64; 19018 long: 64; 19019 long: 64; 19020 long: 64; 19021 long: 64; 19022 long: 64; 19023 union { 19024 struct xregs_state xsave; 19025 struct { 19026 struct fxregs_state i387; 19027 struct xstate_header header; 19028 struct arch_lbr_state lbr; 19029 long: 64; 19030 long: 64; 19031 long: 64; 19032 }; 19033 }; 19034 }; 19035 19036 enum { 19037 X86_BR_NONE = 0, 19038 X86_BR_USER = 1, 19039 X86_BR_KERNEL = 2, 19040 X86_BR_CALL = 4, 19041 X86_BR_RET = 8, 19042 X86_BR_SYSCALL = 16, 19043 X86_BR_SYSRET = 32, 19044 X86_BR_INT = 64, 19045 X86_BR_IRET = 128, 19046 X86_BR_JCC = 256, 19047 X86_BR_JMP = 512, 19048 X86_BR_IRQ = 1024, 19049 X86_BR_IND_CALL = 2048, 19050 X86_BR_ABORT = 4096, 19051 X86_BR_IN_TX = 8192, 19052 X86_BR_NO_TX = 16384, 19053 X86_BR_ZERO_CALL = 32768, 19054 X86_BR_CALL_STACK = 65536, 19055 X86_BR_IND_JMP = 131072, 19056 X86_BR_TYPE_SAVE = 262144, 19057 }; 19058 19059 enum { 19060 LBR_NONE = 0, 19061 LBR_VALID = 1, 19062 }; 19063 19064 enum { 19065 ARCH_LBR_BR_TYPE_JCC = 0, 19066 ARCH_LBR_BR_TYPE_NEAR_IND_JMP = 1, 19067 ARCH_LBR_BR_TYPE_NEAR_REL_JMP = 2, 19068 ARCH_LBR_BR_TYPE_NEAR_IND_CALL = 3, 19069 ARCH_LBR_BR_TYPE_NEAR_REL_CALL = 4, 19070 ARCH_LBR_BR_TYPE_NEAR_RET = 5, 19071 ARCH_LBR_BR_TYPE_KNOWN_MAX = 5, 19072 ARCH_LBR_BR_TYPE_MAP_MAX = 16, 19073 }; 19074 19075 enum P4_EVENTS { 19076 P4_EVENT_TC_DELIVER_MODE = 0, 19077 P4_EVENT_BPU_FETCH_REQUEST = 1, 19078 P4_EVENT_ITLB_REFERENCE = 2, 19079 P4_EVENT_MEMORY_CANCEL = 3, 19080 P4_EVENT_MEMORY_COMPLETE = 4, 19081 P4_EVENT_LOAD_PORT_REPLAY = 5, 19082 P4_EVENT_STORE_PORT_REPLAY = 6, 19083 P4_EVENT_MOB_LOAD_REPLAY = 7, 19084 P4_EVENT_PAGE_WALK_TYPE = 8, 19085 P4_EVENT_BSQ_CACHE_REFERENCE = 9, 19086 P4_EVENT_IOQ_ALLOCATION = 10, 19087 P4_EVENT_IOQ_ACTIVE_ENTRIES = 11, 19088 P4_EVENT_FSB_DATA_ACTIVITY = 12, 19089 P4_EVENT_BSQ_ALLOCATION = 13, 19090 P4_EVENT_BSQ_ACTIVE_ENTRIES = 14, 19091 P4_EVENT_SSE_INPUT_ASSIST = 15, 19092 P4_EVENT_PACKED_SP_UOP = 16, 19093 P4_EVENT_PACKED_DP_UOP = 17, 19094 P4_EVENT_SCALAR_SP_UOP = 18, 19095 P4_EVENT_SCALAR_DP_UOP = 19, 19096 P4_EVENT_64BIT_MMX_UOP = 20, 19097 P4_EVENT_128BIT_MMX_UOP = 21, 19098 P4_EVENT_X87_FP_UOP = 22, 19099 P4_EVENT_TC_MISC = 23, 19100 P4_EVENT_GLOBAL_POWER_EVENTS = 24, 19101 P4_EVENT_TC_MS_XFER = 25, 19102 P4_EVENT_UOP_QUEUE_WRITES = 26, 19103 P4_EVENT_RETIRED_MISPRED_BRANCH_TYPE = 27, 19104 P4_EVENT_RETIRED_BRANCH_TYPE = 28, 19105 P4_EVENT_RESOURCE_STALL = 29, 19106 P4_EVENT_WC_BUFFER = 30, 19107 P4_EVENT_B2B_CYCLES = 31, 19108 P4_EVENT_BNR = 32, 19109 P4_EVENT_SNOOP = 33, 19110 P4_EVENT_RESPONSE = 34, 19111 P4_EVENT_FRONT_END_EVENT = 35, 19112 P4_EVENT_EXECUTION_EVENT = 36, 19113 P4_EVENT_REPLAY_EVENT = 37, 19114 P4_EVENT_INSTR_RETIRED = 38, 19115 P4_EVENT_UOPS_RETIRED = 39, 19116 P4_EVENT_UOP_TYPE = 40, 19117 P4_EVENT_BRANCH_RETIRED = 41, 19118 P4_EVENT_MISPRED_BRANCH_RETIRED = 42, 19119 P4_EVENT_X87_ASSIST = 43, 19120 P4_EVENT_MACHINE_CLEAR = 44, 19121 P4_EVENT_INSTR_COMPLETED = 45, 19122 }; 19123 19124 enum P4_EVENT_OPCODES { 19125 P4_EVENT_TC_DELIVER_MODE_OPCODE = 257, 19126 P4_EVENT_BPU_FETCH_REQUEST_OPCODE = 768, 19127 P4_EVENT_ITLB_REFERENCE_OPCODE = 6147, 19128 P4_EVENT_MEMORY_CANCEL_OPCODE = 517, 19129 P4_EVENT_MEMORY_COMPLETE_OPCODE = 2050, 19130 P4_EVENT_LOAD_PORT_REPLAY_OPCODE = 1026, 19131 P4_EVENT_STORE_PORT_REPLAY_OPCODE = 1282, 19132 P4_EVENT_MOB_LOAD_REPLAY_OPCODE = 770, 19133 P4_EVENT_PAGE_WALK_TYPE_OPCODE = 260, 19134 P4_EVENT_BSQ_CACHE_REFERENCE_OPCODE = 3079, 19135 P4_EVENT_IOQ_ALLOCATION_OPCODE = 774, 19136 P4_EVENT_IOQ_ACTIVE_ENTRIES_OPCODE = 6662, 19137 P4_EVENT_FSB_DATA_ACTIVITY_OPCODE = 5894, 19138 P4_EVENT_BSQ_ALLOCATION_OPCODE = 1287, 19139 P4_EVENT_BSQ_ACTIVE_ENTRIES_OPCODE = 1543, 19140 P4_EVENT_SSE_INPUT_ASSIST_OPCODE = 13313, 19141 P4_EVENT_PACKED_SP_UOP_OPCODE = 2049, 19142 P4_EVENT_PACKED_DP_UOP_OPCODE = 3073, 19143 P4_EVENT_SCALAR_SP_UOP_OPCODE = 2561, 19144 P4_EVENT_SCALAR_DP_UOP_OPCODE = 3585, 19145 P4_EVENT_64BIT_MMX_UOP_OPCODE = 513, 19146 P4_EVENT_128BIT_MMX_UOP_OPCODE = 6657, 19147 P4_EVENT_X87_FP_UOP_OPCODE = 1025, 19148 P4_EVENT_TC_MISC_OPCODE = 1537, 19149 P4_EVENT_GLOBAL_POWER_EVENTS_OPCODE = 4870, 19150 P4_EVENT_TC_MS_XFER_OPCODE = 1280, 19151 P4_EVENT_UOP_QUEUE_WRITES_OPCODE = 2304, 19152 P4_EVENT_RETIRED_MISPRED_BRANCH_TYPE_OPCODE = 1282, 19153 P4_EVENT_RETIRED_BRANCH_TYPE_OPCODE = 1026, 19154 P4_EVENT_RESOURCE_STALL_OPCODE = 257, 19155 P4_EVENT_WC_BUFFER_OPCODE = 1285, 19156 P4_EVENT_B2B_CYCLES_OPCODE = 5635, 19157 P4_EVENT_BNR_OPCODE = 2051, 19158 P4_EVENT_SNOOP_OPCODE = 1539, 19159 P4_EVENT_RESPONSE_OPCODE = 1027, 19160 P4_EVENT_FRONT_END_EVENT_OPCODE = 2053, 19161 P4_EVENT_EXECUTION_EVENT_OPCODE = 3077, 19162 P4_EVENT_REPLAY_EVENT_OPCODE = 2309, 19163 P4_EVENT_INSTR_RETIRED_OPCODE = 516, 19164 P4_EVENT_UOPS_RETIRED_OPCODE = 260, 19165 P4_EVENT_UOP_TYPE_OPCODE = 514, 19166 P4_EVENT_BRANCH_RETIRED_OPCODE = 1541, 19167 P4_EVENT_MISPRED_BRANCH_RETIRED_OPCODE = 772, 19168 P4_EVENT_X87_ASSIST_OPCODE = 773, 19169 P4_EVENT_MACHINE_CLEAR_OPCODE = 517, 19170 P4_EVENT_INSTR_COMPLETED_OPCODE = 1796, 19171 }; 19172 19173 enum P4_ESCR_EMASKS { 19174 P4_EVENT_TC_DELIVER_MODE__DD = 512, 19175 P4_EVENT_TC_DELIVER_MODE__DB = 1024, 19176 P4_EVENT_TC_DELIVER_MODE__DI = 2048, 19177 P4_EVENT_TC_DELIVER_MODE__BD = 4096, 19178 P4_EVENT_TC_DELIVER_MODE__BB = 8192, 19179 P4_EVENT_TC_DELIVER_MODE__BI = 16384, 19180 P4_EVENT_TC_DELIVER_MODE__ID = 32768, 19181 P4_EVENT_BPU_FETCH_REQUEST__TCMISS = 512, 19182 P4_EVENT_ITLB_REFERENCE__HIT = 512, 19183 P4_EVENT_ITLB_REFERENCE__MISS = 1024, 19184 P4_EVENT_ITLB_REFERENCE__HIT_UK = 2048, 19185 P4_EVENT_MEMORY_CANCEL__ST_RB_FULL = 2048, 19186 P4_EVENT_MEMORY_CANCEL__64K_CONF = 4096, 19187 P4_EVENT_MEMORY_COMPLETE__LSC = 512, 19188 P4_EVENT_MEMORY_COMPLETE__SSC = 1024, 19189 P4_EVENT_LOAD_PORT_REPLAY__SPLIT_LD = 1024, 19190 P4_EVENT_STORE_PORT_REPLAY__SPLIT_ST = 1024, 19191 P4_EVENT_MOB_LOAD_REPLAY__NO_STA = 1024, 19192 P4_EVENT_MOB_LOAD_REPLAY__NO_STD = 4096, 19193 P4_EVENT_MOB_LOAD_REPLAY__PARTIAL_DATA = 8192, 19194 P4_EVENT_MOB_LOAD_REPLAY__UNALGN_ADDR = 16384, 19195 P4_EVENT_PAGE_WALK_TYPE__DTMISS = 512, 19196 P4_EVENT_PAGE_WALK_TYPE__ITMISS = 1024, 19197 P4_EVENT_BSQ_CACHE_REFERENCE__RD_2ndL_HITS = 512, 19198 P4_EVENT_BSQ_CACHE_REFERENCE__RD_2ndL_HITE = 1024, 19199 P4_EVENT_BSQ_CACHE_REFERENCE__RD_2ndL_HITM = 2048, 19200 P4_EVENT_BSQ_CACHE_REFERENCE__RD_3rdL_HITS = 4096, 19201 P4_EVENT_BSQ_CACHE_REFERENCE__RD_3rdL_HITE = 8192, 19202 P4_EVENT_BSQ_CACHE_REFERENCE__RD_3rdL_HITM = 16384, 19203 P4_EVENT_BSQ_CACHE_REFERENCE__RD_2ndL_MISS = 131072, 19204 P4_EVENT_BSQ_CACHE_REFERENCE__RD_3rdL_MISS = 262144, 19205 P4_EVENT_BSQ_CACHE_REFERENCE__WR_2ndL_MISS = 524288, 19206 P4_EVENT_IOQ_ALLOCATION__DEFAULT = 512, 19207 P4_EVENT_IOQ_ALLOCATION__ALL_READ = 16384, 19208 P4_EVENT_IOQ_ALLOCATION__ALL_WRITE = 32768, 19209 P4_EVENT_IOQ_ALLOCATION__MEM_UC = 65536, 19210 P4_EVENT_IOQ_ALLOCATION__MEM_WC = 131072, 19211 P4_EVENT_IOQ_ALLOCATION__MEM_WT = 262144, 19212 P4_EVENT_IOQ_ALLOCATION__MEM_WP = 524288, 19213 P4_EVENT_IOQ_ALLOCATION__MEM_WB = 1048576, 19214 P4_EVENT_IOQ_ALLOCATION__OWN = 4194304, 19215 P4_EVENT_IOQ_ALLOCATION__OTHER = 8388608, 19216 P4_EVENT_IOQ_ALLOCATION__PREFETCH = 16777216, 19217 P4_EVENT_IOQ_ACTIVE_ENTRIES__DEFAULT = 512, 19218 P4_EVENT_IOQ_ACTIVE_ENTRIES__ALL_READ = 16384, 19219 P4_EVENT_IOQ_ACTIVE_ENTRIES__ALL_WRITE = 32768, 19220 P4_EVENT_IOQ_ACTIVE_ENTRIES__MEM_UC = 65536, 19221 P4_EVENT_IOQ_ACTIVE_ENTRIES__MEM_WC = 131072, 19222 P4_EVENT_IOQ_ACTIVE_ENTRIES__MEM_WT = 262144, 19223 P4_EVENT_IOQ_ACTIVE_ENTRIES__MEM_WP = 524288, 19224 P4_EVENT_IOQ_ACTIVE_ENTRIES__MEM_WB = 1048576, 19225 P4_EVENT_IOQ_ACTIVE_ENTRIES__OWN = 4194304, 19226 P4_EVENT_IOQ_ACTIVE_ENTRIES__OTHER = 8388608, 19227 P4_EVENT_IOQ_ACTIVE_ENTRIES__PREFETCH = 16777216, 19228 P4_EVENT_FSB_DATA_ACTIVITY__DRDY_DRV = 512, 19229 P4_EVENT_FSB_DATA_ACTIVITY__DRDY_OWN = 1024, 19230 P4_EVENT_FSB_DATA_ACTIVITY__DRDY_OTHER = 2048, 19231 P4_EVENT_FSB_DATA_ACTIVITY__DBSY_DRV = 4096, 19232 P4_EVENT_FSB_DATA_ACTIVITY__DBSY_OWN = 8192, 19233 P4_EVENT_FSB_DATA_ACTIVITY__DBSY_OTHER = 16384, 19234 P4_EVENT_BSQ_ALLOCATION__REQ_TYPE0 = 512, 19235 P4_EVENT_BSQ_ALLOCATION__REQ_TYPE1 = 1024, 19236 P4_EVENT_BSQ_ALLOCATION__REQ_LEN0 = 2048, 19237 P4_EVENT_BSQ_ALLOCATION__REQ_LEN1 = 4096, 19238 P4_EVENT_BSQ_ALLOCATION__REQ_IO_TYPE = 16384, 19239 P4_EVENT_BSQ_ALLOCATION__REQ_LOCK_TYPE = 32768, 19240 P4_EVENT_BSQ_ALLOCATION__REQ_CACHE_TYPE = 65536, 19241 P4_EVENT_BSQ_ALLOCATION__REQ_SPLIT_TYPE = 131072, 19242 P4_EVENT_BSQ_ALLOCATION__REQ_DEM_TYPE = 262144, 19243 P4_EVENT_BSQ_ALLOCATION__REQ_ORD_TYPE = 524288, 19244 P4_EVENT_BSQ_ALLOCATION__MEM_TYPE0 = 1048576, 19245 P4_EVENT_BSQ_ALLOCATION__MEM_TYPE1 = 2097152, 19246 P4_EVENT_BSQ_ALLOCATION__MEM_TYPE2 = 4194304, 19247 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_TYPE0 = 512, 19248 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_TYPE1 = 1024, 19249 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_LEN0 = 2048, 19250 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_LEN1 = 4096, 19251 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_IO_TYPE = 16384, 19252 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_LOCK_TYPE = 32768, 19253 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_CACHE_TYPE = 65536, 19254 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_SPLIT_TYPE = 131072, 19255 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_DEM_TYPE = 262144, 19256 P4_EVENT_BSQ_ACTIVE_ENTRIES__REQ_ORD_TYPE = 524288, 19257 P4_EVENT_BSQ_ACTIVE_ENTRIES__MEM_TYPE0 = 1048576, 19258 P4_EVENT_BSQ_ACTIVE_ENTRIES__MEM_TYPE1 = 2097152, 19259 P4_EVENT_BSQ_ACTIVE_ENTRIES__MEM_TYPE2 = 4194304, 19260 P4_EVENT_SSE_INPUT_ASSIST__ALL = 16777216, 19261 P4_EVENT_PACKED_SP_UOP__ALL = 16777216, 19262 P4_EVENT_PACKED_DP_UOP__ALL = 16777216, 19263 P4_EVENT_SCALAR_SP_UOP__ALL = 16777216, 19264 P4_EVENT_SCALAR_DP_UOP__ALL = 16777216, 19265 P4_EVENT_64BIT_MMX_UOP__ALL = 16777216, 19266 P4_EVENT_128BIT_MMX_UOP__ALL = 16777216, 19267 P4_EVENT_X87_FP_UOP__ALL = 16777216, 19268 P4_EVENT_TC_MISC__FLUSH = 8192, 19269 P4_EVENT_GLOBAL_POWER_EVENTS__RUNNING = 512, 19270 P4_EVENT_TC_MS_XFER__CISC = 512, 19271 P4_EVENT_UOP_QUEUE_WRITES__FROM_TC_BUILD = 512, 19272 P4_EVENT_UOP_QUEUE_WRITES__FROM_TC_DELIVER = 1024, 19273 P4_EVENT_UOP_QUEUE_WRITES__FROM_ROM = 2048, 19274 P4_EVENT_RETIRED_MISPRED_BRANCH_TYPE__CONDITIONAL = 1024, 19275 P4_EVENT_RETIRED_MISPRED_BRANCH_TYPE__CALL = 2048, 19276 P4_EVENT_RETIRED_MISPRED_BRANCH_TYPE__RETURN = 4096, 19277 P4_EVENT_RETIRED_MISPRED_BRANCH_TYPE__INDIRECT = 8192, 19278 P4_EVENT_RETIRED_BRANCH_TYPE__CONDITIONAL = 1024, 19279 P4_EVENT_RETIRED_BRANCH_TYPE__CALL = 2048, 19280 P4_EVENT_RETIRED_BRANCH_TYPE__RETURN = 4096, 19281 P4_EVENT_RETIRED_BRANCH_TYPE__INDIRECT = 8192, 19282 P4_EVENT_RESOURCE_STALL__SBFULL = 16384, 19283 P4_EVENT_WC_BUFFER__WCB_EVICTS = 512, 19284 P4_EVENT_WC_BUFFER__WCB_FULL_EVICTS = 1024, 19285 P4_EVENT_FRONT_END_EVENT__NBOGUS = 512, 19286 P4_EVENT_FRONT_END_EVENT__BOGUS = 1024, 19287 P4_EVENT_EXECUTION_EVENT__NBOGUS0 = 512, 19288 P4_EVENT_EXECUTION_EVENT__NBOGUS1 = 1024, 19289 P4_EVENT_EXECUTION_EVENT__NBOGUS2 = 2048, 19290 P4_EVENT_EXECUTION_EVENT__NBOGUS3 = 4096, 19291 P4_EVENT_EXECUTION_EVENT__BOGUS0 = 8192, 19292 P4_EVENT_EXECUTION_EVENT__BOGUS1 = 16384, 19293 P4_EVENT_EXECUTION_EVENT__BOGUS2 = 32768, 19294 P4_EVENT_EXECUTION_EVENT__BOGUS3 = 65536, 19295 P4_EVENT_REPLAY_EVENT__NBOGUS = 512, 19296 P4_EVENT_REPLAY_EVENT__BOGUS = 1024, 19297 P4_EVENT_INSTR_RETIRED__NBOGUSNTAG = 512, 19298 P4_EVENT_INSTR_RETIRED__NBOGUSTAG = 1024, 19299 P4_EVENT_INSTR_RETIRED__BOGUSNTAG = 2048, 19300 P4_EVENT_INSTR_RETIRED__BOGUSTAG = 4096, 19301 P4_EVENT_UOPS_RETIRED__NBOGUS = 512, 19302 P4_EVENT_UOPS_RETIRED__BOGUS = 1024, 19303 P4_EVENT_UOP_TYPE__TAGLOADS = 1024, 19304 P4_EVENT_UOP_TYPE__TAGSTORES = 2048, 19305 P4_EVENT_BRANCH_RETIRED__MMNP = 512, 19306 P4_EVENT_BRANCH_RETIRED__MMNM = 1024, 19307 P4_EVENT_BRANCH_RETIRED__MMTP = 2048, 19308 P4_EVENT_BRANCH_RETIRED__MMTM = 4096, 19309 P4_EVENT_MISPRED_BRANCH_RETIRED__NBOGUS = 512, 19310 P4_EVENT_X87_ASSIST__FPSU = 512, 19311 P4_EVENT_X87_ASSIST__FPSO = 1024, 19312 P4_EVENT_X87_ASSIST__POAO = 2048, 19313 P4_EVENT_X87_ASSIST__POAU = 4096, 19314 P4_EVENT_X87_ASSIST__PREA = 8192, 19315 P4_EVENT_MACHINE_CLEAR__CLEAR = 512, 19316 P4_EVENT_MACHINE_CLEAR__MOCLEAR = 1024, 19317 P4_EVENT_MACHINE_CLEAR__SMCLEAR = 2048, 19318 P4_EVENT_INSTR_COMPLETED__NBOGUS = 512, 19319 P4_EVENT_INSTR_COMPLETED__BOGUS = 1024, 19320 }; 19321 19322 enum P4_PEBS_METRIC { 19323 P4_PEBS_METRIC__none = 0, 19324 P4_PEBS_METRIC__1stl_cache_load_miss_retired = 1, 19325 P4_PEBS_METRIC__2ndl_cache_load_miss_retired = 2, 19326 P4_PEBS_METRIC__dtlb_load_miss_retired = 3, 19327 P4_PEBS_METRIC__dtlb_store_miss_retired = 4, 19328 P4_PEBS_METRIC__dtlb_all_miss_retired = 5, 19329 P4_PEBS_METRIC__tagged_mispred_branch = 6, 19330 P4_PEBS_METRIC__mob_load_replay_retired = 7, 19331 P4_PEBS_METRIC__split_load_retired = 8, 19332 P4_PEBS_METRIC__split_store_retired = 9, 19333 P4_PEBS_METRIC__max = 10, 19334 }; 19335 19336 struct p4_event_bind { 19337 unsigned int opcode; 19338 unsigned int escr_msr[2]; 19339 unsigned int escr_emask; 19340 unsigned int shared; 19341 char cntr[6]; 19342 }; 19343 19344 struct p4_pebs_bind { 19345 unsigned int metric_pebs; 19346 unsigned int metric_vert; 19347 }; 19348 19349 struct p4_event_alias { 19350 u64 original; 19351 u64 alternative; 19352 }; 19353 19354 enum cpuid_regs_idx { 19355 CPUID_EAX = 0, 19356 CPUID_EBX = 1, 19357 CPUID_ECX = 2, 19358 CPUID_EDX = 3, 19359 }; 19360 19361 struct dev_ext_attribute { 19362 struct device_attribute attr; 19363 void *var; 19364 }; 19365 19366 enum pt_capabilities { 19367 PT_CAP_max_subleaf = 0, 19368 PT_CAP_cr3_filtering = 1, 19369 PT_CAP_psb_cyc = 2, 19370 PT_CAP_ip_filtering = 3, 19371 PT_CAP_mtc = 4, 19372 PT_CAP_ptwrite = 5, 19373 PT_CAP_power_event_trace = 6, 19374 PT_CAP_topa_output = 7, 19375 PT_CAP_topa_multiple_entries = 8, 19376 PT_CAP_single_range_output = 9, 19377 PT_CAP_output_subsys = 10, 19378 PT_CAP_payloads_lip = 11, 19379 PT_CAP_num_address_ranges = 12, 19380 PT_CAP_mtc_periods = 13, 19381 PT_CAP_cycle_thresholds = 14, 19382 PT_CAP_psb_periods = 15, 19383 }; 19384 19385 enum perf_addr_filter_action_t { 19386 PERF_ADDR_FILTER_ACTION_STOP = 0, 19387 PERF_ADDR_FILTER_ACTION_START = 1, 19388 PERF_ADDR_FILTER_ACTION_FILTER = 2, 19389 }; 19390 19391 struct perf_addr_filter { 19392 struct list_head entry; 19393 struct path path; 19394 long unsigned int offset; 19395 long unsigned int size; 19396 enum perf_addr_filter_action_t action; 19397 }; 19398 19399 struct topa_entry { 19400 u64 end: 1; 19401 u64 rsvd0: 1; 19402 u64 intr: 1; 19403 u64 rsvd1: 1; 19404 u64 stop: 1; 19405 u64 rsvd2: 1; 19406 u64 size: 4; 19407 u64 rsvd3: 2; 19408 u64 base: 36; 19409 u64 rsvd4: 16; 19410 }; 19411 19412 struct pt_pmu { 19413 struct pmu pmu; 19414 u32 caps[8]; 19415 bool vmx; 19416 bool branch_en_always_on; 19417 long unsigned int max_nonturbo_ratio; 19418 unsigned int tsc_art_num; 19419 unsigned int tsc_art_den; 19420 }; 19421 19422 struct topa; 19423 19424 struct pt_buffer { 19425 struct list_head tables; 19426 struct topa *first; 19427 struct topa *last; 19428 struct topa *cur; 19429 unsigned int cur_idx; 19430 size_t output_off; 19431 long unsigned int nr_pages; 19432 local_t data_size; 19433 local64_t head; 19434 bool snapshot; 19435 bool single; 19436 long int stop_pos; 19437 long int intr_pos; 19438 struct topa_entry *stop_te; 19439 struct topa_entry *intr_te; 19440 void **data_pages; 19441 }; 19442 19443 struct topa { 19444 struct list_head list; 19445 u64 offset; 19446 size_t size; 19447 int last; 19448 unsigned int z_count; 19449 }; 19450 19451 struct pt_filter { 19452 long unsigned int msr_a; 19453 long unsigned int msr_b; 19454 long unsigned int config; 19455 }; 19456 19457 struct pt_filters { 19458 struct pt_filter filter[4]; 19459 unsigned int nr_filters; 19460 }; 19461 19462 struct pt { 19463 struct perf_output_handle handle; 19464 struct pt_filters filters; 19465 int handle_nmi; 19466 int vmx_on; 19467 u64 output_base; 19468 u64 output_mask; 19469 }; 19470 19471 struct pt_cap_desc { 19472 const char *name; 19473 u32 leaf; 19474 u8 reg; 19475 u32 mask; 19476 }; 19477 19478 struct pt_address_range { 19479 long unsigned int msr_a; 19480 long unsigned int msr_b; 19481 unsigned int reg_off; 19482 }; 19483 19484 struct topa_page { 19485 struct topa_entry table[507]; 19486 struct topa topa; 19487 }; 19488 19489 typedef s8 int8_t; 19490 19491 typedef u8 uint8_t; 19492 19493 typedef u64 uint64_t; 19494 19495 struct atomic_notifier_head { 19496 spinlock_t lock; 19497 struct notifier_block *head; 19498 }; 19499 19500 enum xen_domain_type { 19501 XEN_NATIVE = 0, 19502 XEN_PV_DOMAIN = 1, 19503 XEN_HVM_DOMAIN = 2, 19504 }; 19505 19506 typedef long unsigned int xen_pfn_t; 19507 19508 typedef long unsigned int xen_ulong_t; 19509 19510 struct arch_shared_info { 19511 long unsigned int max_pfn; 19512 xen_pfn_t pfn_to_mfn_frame_list_list; 19513 long unsigned int nmi_reason; 19514 long unsigned int p2m_cr3; 19515 long unsigned int p2m_vaddr; 19516 long unsigned int p2m_generation; 19517 }; 19518 19519 struct arch_vcpu_info { 19520 long unsigned int cr2; 19521 long unsigned int pad; 19522 }; 19523 19524 struct pvclock_wall_clock { 19525 u32 version; 19526 u32 sec; 19527 u32 nsec; 19528 }; 19529 19530 struct vcpu_info { 19531 uint8_t evtchn_upcall_pending; 19532 uint8_t evtchn_upcall_mask; 19533 xen_ulong_t evtchn_pending_sel; 19534 struct arch_vcpu_info arch; 19535 struct pvclock_vcpu_time_info time; 19536 }; 19537 19538 struct shared_info { 19539 struct vcpu_info vcpu_info[32]; 19540 xen_ulong_t evtchn_pending[64]; 19541 xen_ulong_t evtchn_mask[64]; 19542 struct pvclock_wall_clock wc; 19543 struct arch_shared_info arch; 19544 }; 19545 19546 struct start_info { 19547 char magic[32]; 19548 long unsigned int nr_pages; 19549 long unsigned int shared_info; 19550 uint32_t flags; 19551 xen_pfn_t store_mfn; 19552 uint32_t store_evtchn; 19553 union { 19554 struct { 19555 xen_pfn_t mfn; 19556 uint32_t evtchn; 19557 } domU; 19558 struct { 19559 uint32_t info_off; 19560 uint32_t info_size; 19561 } dom0; 19562 } console; 19563 long unsigned int pt_base; 19564 long unsigned int nr_pt_frames; 19565 long unsigned int mfn_list; 19566 long unsigned int mod_start; 19567 long unsigned int mod_len; 19568 int8_t cmd_line[1024]; 19569 long unsigned int first_p2m_pfn; 19570 long unsigned int nr_p2m_frames; 19571 }; 19572 19573 struct sched_shutdown { 19574 unsigned int reason; 19575 }; 19576 19577 struct sched_pin_override { 19578 int32_t pcpu; 19579 }; 19580 19581 struct vcpu_register_vcpu_info { 19582 uint64_t mfn; 19583 uint32_t offset; 19584 uint32_t rsvd; 19585 }; 19586 19587 struct xmaddr { 19588 phys_addr_t maddr; 19589 }; 19590 19591 typedef struct xmaddr xmaddr_t; 19592 19593 struct xpaddr { 19594 phys_addr_t paddr; 19595 }; 19596 19597 typedef struct xpaddr xpaddr_t; 19598 19599 typedef s16 int16_t; 19600 19601 typedef u16 uint16_t; 19602 19603 struct clocksource { 19604 u64 (*read)(struct clocksource *); 19605 u64 mask; 19606 u32 mult; 19607 u32 shift; 19608 u64 max_idle_ns; 19609 u32 maxadj; 19610 u64 max_cycles; 19611 const char *name; 19612 struct list_head list; 19613 int rating; 19614 enum vdso_clock_mode vdso_clock_mode; 19615 long unsigned int flags; 19616 int (*enable)(struct clocksource *); 19617 void (*disable)(struct clocksource *); 19618 void (*suspend)(struct clocksource *); 19619 void (*resume)(struct clocksource *); 19620 void (*mark_unstable)(struct clocksource *); 19621 void (*tick_stable)(struct clocksource *); 19622 struct list_head wd_list; 19623 u64 cs_last; 19624 u64 wd_last; 19625 struct module *owner; 19626 }; 19627 19628 struct x86_init_mpparse { 19629 void (*setup_ioapic_ids)(); 19630 void (*find_smp_config)(); 19631 void (*get_smp_config)(unsigned int); 19632 }; 19633 19634 struct x86_init_resources { 19635 void (*probe_roms)(); 19636 void (*reserve_resources)(); 19637 char * (*memory_setup)(); 19638 }; 19639 19640 struct x86_init_irqs { 19641 void (*pre_vector_init)(); 19642 void (*intr_init)(); 19643 void (*intr_mode_select)(); 19644 void (*intr_mode_init)(); 19645 struct irq_domain * (*create_pci_msi_domain)(); 19646 }; 19647 19648 struct x86_init_oem { 19649 void (*arch_setup)(); 19650 void (*banner)(); 19651 }; 19652 19653 struct x86_init_paging { 19654 void (*pagetable_init)(); 19655 }; 19656 19657 struct x86_init_timers { 19658 void (*setup_percpu_clockev)(); 19659 void (*timer_init)(); 19660 void (*wallclock_init)(); 19661 }; 19662 19663 struct x86_init_iommu { 19664 int (*iommu_init)(); 19665 }; 19666 19667 struct x86_init_pci { 19668 int (*arch_init)(); 19669 int (*init)(); 19670 void (*init_irq)(); 19671 void (*fixup_irqs)(); 19672 }; 19673 19674 struct x86_hyper_init { 19675 void (*init_platform)(); 19676 void (*guest_late_init)(); 19677 bool (*x2apic_available)(); 19678 bool (*msi_ext_dest_id)(); 19679 void (*init_mem_mapping)(); 19680 void (*init_after_bootmem)(); 19681 }; 19682 19683 struct x86_init_acpi { 19684 void (*set_root_pointer)(u64); 19685 u64 (*get_root_pointer)(); 19686 void (*reduced_hw_early_init)(); 19687 }; 19688 19689 struct x86_init_ops { 19690 struct x86_init_resources resources; 19691 struct x86_init_mpparse mpparse; 19692 struct x86_init_irqs irqs; 19693 struct x86_init_oem oem; 19694 struct x86_init_paging paging; 19695 struct x86_init_timers timers; 19696 struct x86_init_iommu iommu; 19697 struct x86_init_pci pci; 19698 struct x86_hyper_init hyper; 19699 struct x86_init_acpi acpi; 19700 }; 19701 19702 struct x86_cpuinit_ops { 19703 void (*setup_percpu_clockev)(); 19704 void (*early_percpu_clock_init)(); 19705 void (*fixup_cpu_id)(struct cpuinfo_x86 *, int); 19706 }; 19707 19708 enum clock_event_state { 19709 CLOCK_EVT_STATE_DETACHED = 0, 19710 CLOCK_EVT_STATE_SHUTDOWN = 1, 19711 CLOCK_EVT_STATE_PERIODIC = 2, 19712 CLOCK_EVT_STATE_ONESHOT = 3, 19713 CLOCK_EVT_STATE_ONESHOT_STOPPED = 4, 19714 }; 19715 19716 struct clock_event_device { 19717 void (*event_handler)(struct clock_event_device *); 19718 int (*set_next_event)(long unsigned int, struct clock_event_device *); 19719 int (*set_next_ktime)(ktime_t, struct clock_event_device *); 19720 ktime_t next_event; 19721 u64 max_delta_ns; 19722 u64 min_delta_ns; 19723 u32 mult; 19724 u32 shift; 19725 enum clock_event_state state_use_accessors; 19726 unsigned int features; 19727 long unsigned int retries; 19728 int (*set_state_periodic)(struct clock_event_device *); 19729 int (*set_state_oneshot)(struct clock_event_device *); 19730 int (*set_state_oneshot_stopped)(struct clock_event_device *); 19731 int (*set_state_shutdown)(struct clock_event_device *); 19732 int (*tick_resume)(struct clock_event_device *); 19733 void (*broadcast)(const struct cpumask *); 19734 void (*suspend)(struct clock_event_device *); 19735 void (*resume)(struct clock_event_device *); 19736 long unsigned int min_delta_ticks; 19737 long unsigned int max_delta_ticks; 19738 const char *name; 19739 int rating; 19740 int irq; 19741 int bound_on; 19742 const struct cpumask *cpumask; 19743 struct list_head list; 19744 struct module *owner; 19745 long: 64; 19746 long: 64; 19747 long: 64; 19748 long: 64; 19749 long: 64; 19750 long: 64; 19751 }; 19752 19753 struct tk_read_base { 19754 struct clocksource *clock; 19755 u64 mask; 19756 u64 cycle_last; 19757 u32 mult; 19758 u32 shift; 19759 u64 xtime_nsec; 19760 ktime_t base; 19761 u64 base_real; 19762 }; 19763 19764 struct timekeeper { 19765 struct tk_read_base tkr_mono; 19766 struct tk_read_base tkr_raw; 19767 u64 xtime_sec; 19768 long unsigned int ktime_sec; 19769 struct timespec64 wall_to_monotonic; 19770 ktime_t offs_real; 19771 ktime_t offs_boot; 19772 ktime_t offs_tai; 19773 s32 tai_offset; 19774 unsigned int clock_was_set_seq; 19775 u8 cs_was_changed_seq; 19776 ktime_t next_leap_ktime; 19777 u64 raw_sec; 19778 struct timespec64 monotonic_to_boot; 19779 u64 cycle_interval; 19780 u64 xtime_interval; 19781 s64 xtime_remainder; 19782 u64 raw_interval; 19783 u64 ntp_tick; 19784 s64 ntp_error; 19785 u32 ntp_error_shift; 19786 u32 ntp_err_mult; 19787 u32 skip_second_overflow; 19788 }; 19789 19790 typedef unsigned char *__guest_handle_uchar; 19791 19792 typedef char *__guest_handle_char; 19793 19794 typedef void *__guest_handle_void; 19795 19796 typedef uint64_t *__guest_handle_uint64_t; 19797 19798 typedef uint32_t *__guest_handle_uint32_t; 19799 19800 struct vcpu_time_info { 19801 uint32_t version; 19802 uint32_t pad0; 19803 uint64_t tsc_timestamp; 19804 uint64_t system_time; 19805 uint32_t tsc_to_system_mul; 19806 int8_t tsc_shift; 19807 int8_t pad1[3]; 19808 }; 19809 19810 struct xenpf_settime32 { 19811 uint32_t secs; 19812 uint32_t nsecs; 19813 uint64_t system_time; 19814 }; 19815 19816 struct xenpf_settime64 { 19817 uint64_t secs; 19818 uint32_t nsecs; 19819 uint32_t mbz; 19820 uint64_t system_time; 19821 }; 19822 19823 struct xenpf_add_memtype { 19824 xen_pfn_t mfn; 19825 uint64_t nr_mfns; 19826 uint32_t type; 19827 uint32_t handle; 19828 uint32_t reg; 19829 }; 19830 19831 struct xenpf_del_memtype { 19832 uint32_t handle; 19833 uint32_t reg; 19834 }; 19835 19836 struct xenpf_read_memtype { 19837 uint32_t reg; 19838 xen_pfn_t mfn; 19839 uint64_t nr_mfns; 19840 uint32_t type; 19841 }; 19842 19843 struct xenpf_microcode_update { 19844 __guest_handle_void data; 19845 uint32_t length; 19846 }; 19847 19848 struct xenpf_platform_quirk { 19849 uint32_t quirk_id; 19850 }; 19851 19852 struct xenpf_efi_time { 19853 uint16_t year; 19854 uint8_t month; 19855 uint8_t day; 19856 uint8_t hour; 19857 uint8_t min; 19858 uint8_t sec; 19859 uint32_t ns; 19860 int16_t tz; 19861 uint8_t daylight; 19862 }; 19863 19864 struct xenpf_efi_guid { 19865 uint32_t data1; 19866 uint16_t data2; 19867 uint16_t data3; 19868 uint8_t data4[8]; 19869 }; 19870 19871 struct xenpf_efi_runtime_call { 19872 uint32_t function; 19873 uint32_t misc; 19874 xen_ulong_t status; 19875 union { 19876 struct { 19877 struct xenpf_efi_time time; 19878 uint32_t resolution; 19879 uint32_t accuracy; 19880 } get_time; 19881 struct xenpf_efi_time set_time; 19882 struct xenpf_efi_time get_wakeup_time; 19883 struct xenpf_efi_time set_wakeup_time; 19884 struct { 19885 __guest_handle_void name; 19886 xen_ulong_t size; 19887 __guest_handle_void data; 19888 struct xenpf_efi_guid vendor_guid; 19889 } get_variable; 19890 struct { 19891 __guest_handle_void name; 19892 xen_ulong_t size; 19893 __guest_handle_void data; 19894 struct xenpf_efi_guid vendor_guid; 19895 } set_variable; 19896 struct { 19897 xen_ulong_t size; 19898 __guest_handle_void name; 19899 struct xenpf_efi_guid vendor_guid; 19900 } get_next_variable_name; 19901 struct { 19902 uint32_t attr; 19903 uint64_t max_store_size; 19904 uint64_t remain_store_size; 19905 uint64_t max_size; 19906 } query_variable_info; 19907 struct { 19908 __guest_handle_void capsule_header_array; 19909 xen_ulong_t capsule_count; 19910 uint64_t max_capsule_size; 19911 uint32_t reset_type; 19912 } query_capsule_capabilities; 19913 struct { 19914 __guest_handle_void capsule_header_array; 19915 xen_ulong_t capsule_count; 19916 uint64_t sg_list; 19917 } update_capsule; 19918 } u; 19919 }; 19920 19921 union xenpf_efi_info { 19922 uint32_t version; 19923 struct { 19924 uint64_t addr; 19925 uint32_t nent; 19926 } cfg; 19927 struct { 19928 uint32_t revision; 19929 uint32_t bufsz; 19930 __guest_handle_void name; 19931 } vendor; 19932 struct { 19933 uint64_t addr; 19934 uint64_t size; 19935 uint64_t attr; 19936 uint32_t type; 19937 } mem; 19938 }; 19939 19940 struct xenpf_firmware_info { 19941 uint32_t type; 19942 uint32_t index; 19943 union { 19944 struct { 19945 uint8_t device; 19946 uint8_t version; 19947 uint16_t interface_support; 19948 uint16_t legacy_max_cylinder; 19949 uint8_t legacy_max_head; 19950 uint8_t legacy_sectors_per_track; 19951 __guest_handle_void edd_params; 19952 } disk_info; 19953 struct { 19954 uint8_t device; 19955 uint32_t mbr_signature; 19956 } disk_mbr_signature; 19957 struct { 19958 uint8_t capabilities; 19959 uint8_t edid_transfer_time; 19960 __guest_handle_uchar edid; 19961 } vbeddc_info; 19962 union xenpf_efi_info efi_info; 19963 uint8_t kbd_shift_flags; 19964 } u; 19965 }; 19966 19967 struct xenpf_enter_acpi_sleep { 19968 uint16_t val_a; 19969 uint16_t val_b; 19970 uint32_t sleep_state; 19971 uint32_t flags; 19972 }; 19973 19974 struct xenpf_change_freq { 19975 uint32_t flags; 19976 uint32_t cpu; 19977 uint64_t freq; 19978 }; 19979 19980 struct xenpf_getidletime { 19981 __guest_handle_uchar cpumap_bitmap; 19982 uint32_t cpumap_nr_cpus; 19983 __guest_handle_uint64_t idletime; 19984 uint64_t now; 19985 }; 19986 19987 struct xen_power_register { 19988 uint32_t space_id; 19989 uint32_t bit_width; 19990 uint32_t bit_offset; 19991 uint32_t access_size; 19992 uint64_t address; 19993 }; 19994 19995 struct xen_processor_csd { 19996 uint32_t domain; 19997 uint32_t coord_type; 19998 uint32_t num; 19999 }; 20000 20001 typedef struct xen_processor_csd *__guest_handle_xen_processor_csd; 20002 20003 struct xen_processor_cx { 20004 struct xen_power_register reg; 20005 uint8_t type; 20006 uint32_t latency; 20007 uint32_t power; 20008 uint32_t dpcnt; 20009 __guest_handle_xen_processor_csd dp; 20010 }; 20011 20012 typedef struct xen_processor_cx *__guest_handle_xen_processor_cx; 20013 20014 struct xen_processor_flags { 20015 uint32_t bm_control: 1; 20016 uint32_t bm_check: 1; 20017 uint32_t has_cst: 1; 20018 uint32_t power_setup_done: 1; 20019 uint32_t bm_rld_set: 1; 20020 }; 20021 20022 struct xen_processor_power { 20023 uint32_t count; 20024 struct xen_processor_flags flags; 20025 __guest_handle_xen_processor_cx states; 20026 }; 20027 20028 struct xen_pct_register { 20029 uint8_t descriptor; 20030 uint16_t length; 20031 uint8_t space_id; 20032 uint8_t bit_width; 20033 uint8_t bit_offset; 20034 uint8_t reserved; 20035 uint64_t address; 20036 }; 20037 20038 struct xen_processor_px { 20039 uint64_t core_frequency; 20040 uint64_t power; 20041 uint64_t transition_latency; 20042 uint64_t bus_master_latency; 20043 uint64_t control; 20044 uint64_t status; 20045 }; 20046 20047 typedef struct xen_processor_px *__guest_handle_xen_processor_px; 20048 20049 struct xen_psd_package { 20050 uint64_t num_entries; 20051 uint64_t revision; 20052 uint64_t domain; 20053 uint64_t coord_type; 20054 uint64_t num_processors; 20055 }; 20056 20057 struct xen_processor_performance { 20058 uint32_t flags; 20059 uint32_t platform_limit; 20060 struct xen_pct_register control_register; 20061 struct xen_pct_register status_register; 20062 uint32_t state_count; 20063 __guest_handle_xen_processor_px states; 20064 struct xen_psd_package domain_info; 20065 uint32_t shared_type; 20066 }; 20067 20068 struct xenpf_set_processor_pminfo { 20069 uint32_t id; 20070 uint32_t type; 20071 union { 20072 struct xen_processor_power power; 20073 struct xen_processor_performance perf; 20074 __guest_handle_uint32_t pdc; 20075 }; 20076 }; 20077 20078 struct xenpf_pcpuinfo { 20079 uint32_t xen_cpuid; 20080 uint32_t max_present; 20081 uint32_t flags; 20082 uint32_t apic_id; 20083 uint32_t acpi_id; 20084 }; 20085 20086 struct xenpf_cpu_ol { 20087 uint32_t cpuid; 20088 }; 20089 20090 struct xenpf_cpu_hotadd { 20091 uint32_t apic_id; 20092 uint32_t acpi_id; 20093 uint32_t pxm; 20094 }; 20095 20096 struct xenpf_mem_hotadd { 20097 uint64_t spfn; 20098 uint64_t epfn; 20099 uint32_t pxm; 20100 uint32_t flags; 20101 }; 20102 20103 struct xenpf_core_parking { 20104 uint32_t type; 20105 uint32_t idle_nums; 20106 }; 20107 20108 struct xenpf_symdata { 20109 uint32_t namelen; 20110 uint32_t symnum; 20111 __guest_handle_char name; 20112 uint64_t address; 20113 char type; 20114 }; 20115 20116 struct xen_platform_op { 20117 uint32_t cmd; 20118 uint32_t interface_version; 20119 union { 20120 struct xenpf_settime32 settime32; 20121 struct xenpf_settime64 settime64; 20122 struct xenpf_add_memtype add_memtype; 20123 struct xenpf_del_memtype del_memtype; 20124 struct xenpf_read_memtype read_memtype; 20125 struct xenpf_microcode_update microcode; 20126 struct xenpf_platform_quirk platform_quirk; 20127 struct xenpf_efi_runtime_call efi_runtime_call; 20128 struct xenpf_firmware_info firmware_info; 20129 struct xenpf_enter_acpi_sleep enter_acpi_sleep; 20130 struct xenpf_change_freq change_freq; 20131 struct xenpf_getidletime getidletime; 20132 struct xenpf_set_processor_pminfo set_pminfo; 20133 struct xenpf_pcpuinfo pcpu_info; 20134 struct xenpf_cpu_ol cpu_ol; 20135 struct xenpf_cpu_hotadd cpu_add; 20136 struct xenpf_mem_hotadd mem_add; 20137 struct xenpf_core_parking core_parking; 20138 struct xenpf_symdata symdata; 20139 uint8_t pad[128]; 20140 } u; 20141 }; 20142 20143 struct vcpu_set_singleshot_timer { 20144 uint64_t timeout_abs_ns; 20145 uint32_t flags; 20146 }; 20147 20148 typedef struct vcpu_time_info *__guest_handle_vcpu_time_info; 20149 20150 struct vcpu_register_time_memory_area { 20151 union { 20152 __guest_handle_vcpu_time_info h; 20153 struct pvclock_vcpu_time_info *v; 20154 uint64_t p; 20155 } addr; 20156 }; 20157 20158 struct xen_clock_event_device { 20159 struct clock_event_device evt; 20160 char name[16]; 20161 long: 64; 20162 long: 64; 20163 long: 64; 20164 long: 64; 20165 long: 64; 20166 long: 64; 20167 }; 20168 20169 typedef int (*pte_fn_t)(pte_t *, long unsigned int, void *); 20170 20171 typedef uint16_t grant_status_t; 20172 20173 struct grant_frames { 20174 xen_pfn_t *pfn; 20175 unsigned int count; 20176 void *vaddr; 20177 }; 20178 20179 struct gnttab_vm_area { 20180 struct vm_struct *area; 20181 pte_t **ptes; 20182 int idx; 20183 }; 20184 20185 enum acpi_irq_model_id { 20186 ACPI_IRQ_MODEL_PIC = 0, 20187 ACPI_IRQ_MODEL_IOAPIC = 1, 20188 ACPI_IRQ_MODEL_IOSAPIC = 2, 20189 ACPI_IRQ_MODEL_PLATFORM = 3, 20190 ACPI_IRQ_MODEL_GIC = 4, 20191 ACPI_IRQ_MODEL_COUNT = 5, 20192 }; 20193 20194 typedef uint16_t domid_t; 20195 20196 struct xen_add_to_physmap { 20197 domid_t domid; 20198 uint16_t size; 20199 unsigned int space; 20200 xen_ulong_t idx; 20201 xen_pfn_t gpfn; 20202 }; 20203 20204 struct machine_ops { 20205 void (*restart)(char *); 20206 void (*halt)(); 20207 void (*power_off)(); 20208 void (*shutdown)(); 20209 void (*crash_shutdown)(struct pt_regs *); 20210 void (*emergency_restart)(); 20211 }; 20212 20213 enum x86_hypervisor_type { 20214 X86_HYPER_NATIVE = 0, 20215 X86_HYPER_VMWARE = 1, 20216 X86_HYPER_MS_HYPERV = 2, 20217 X86_HYPER_XEN_PV = 3, 20218 X86_HYPER_XEN_HVM = 4, 20219 X86_HYPER_KVM = 5, 20220 X86_HYPER_JAILHOUSE = 6, 20221 X86_HYPER_ACRN = 7, 20222 }; 20223 20224 struct hypervisor_x86 { 20225 const char *name; 20226 uint32_t (*detect)(); 20227 enum x86_hypervisor_type type; 20228 struct x86_hyper_init init; 20229 struct x86_hyper_runtime runtime; 20230 bool ignore_nopv; 20231 }; 20232 20233 enum e820_type { 20234 E820_TYPE_RAM = 1, 20235 E820_TYPE_RESERVED = 2, 20236 E820_TYPE_ACPI = 3, 20237 E820_TYPE_NVS = 4, 20238 E820_TYPE_UNUSABLE = 5, 20239 E820_TYPE_PMEM = 7, 20240 E820_TYPE_PRAM = 12, 20241 E820_TYPE_SOFT_RESERVED = 4026531839, 20242 E820_TYPE_RESERVED_KERN = 128, 20243 }; 20244 20245 struct xen_hvm_pagetable_dying { 20246 domid_t domid; 20247 __u64 gpa; 20248 }; 20249 20250 enum hvmmem_type_t { 20251 HVMMEM_ram_rw = 0, 20252 HVMMEM_ram_ro = 1, 20253 HVMMEM_mmio_dm = 2, 20254 }; 20255 20256 struct xen_hvm_get_mem_type { 20257 domid_t domid; 20258 uint16_t mem_type; 20259 uint16_t pad[2]; 20260 uint64_t pfn; 20261 }; 20262 20263 struct e820_entry { 20264 u64 addr; 20265 u64 size; 20266 enum e820_type type; 20267 } __attribute__((packed)); 20268 20269 struct e820_table { 20270 __u32 nr_entries; 20271 struct e820_entry entries[3200]; 20272 } __attribute__((packed)); 20273 20274 typedef xen_pfn_t *__guest_handle_xen_pfn_t; 20275 20276 typedef long unsigned int xen_callback_t; 20277 20278 struct mmu_update { 20279 uint64_t ptr; 20280 uint64_t val; 20281 }; 20282 20283 struct xen_memory_region { 20284 long unsigned int start_pfn; 20285 long unsigned int n_pfns; 20286 }; 20287 20288 struct callback_register { 20289 uint16_t type; 20290 uint16_t flags; 20291 xen_callback_t address; 20292 }; 20293 20294 struct xen_memory_reservation { 20295 __guest_handle_xen_pfn_t extent_start; 20296 xen_ulong_t nr_extents; 20297 unsigned int extent_order; 20298 unsigned int address_bits; 20299 domid_t domid; 20300 }; 20301 20302 struct xen_memory_map { 20303 unsigned int nr_entries; 20304 __guest_handle_void buffer; 20305 }; 20306 20307 struct x86_apic_ops { 20308 unsigned int (*io_apic_read)(unsigned int, unsigned int); 20309 void (*restore)(); 20310 }; 20311 20312 struct physdev_apic { 20313 long unsigned int apic_physbase; 20314 uint32_t reg; 20315 uint32_t value; 20316 }; 20317 20318 typedef long unsigned int uintptr_t; 20319 20320 struct xen_pmu_amd_ctxt { 20321 uint32_t counters; 20322 uint32_t ctrls; 20323 uint64_t regs[0]; 20324 }; 20325 20326 struct xen_pmu_cntr_pair { 20327 uint64_t counter; 20328 uint64_t control; 20329 }; 20330 20331 struct xen_pmu_intel_ctxt { 20332 uint32_t fixed_counters; 20333 uint32_t arch_counters; 20334 uint64_t global_ctrl; 20335 uint64_t global_ovf_ctrl; 20336 uint64_t global_status; 20337 uint64_t fixed_ctrl; 20338 uint64_t ds_area; 20339 uint64_t pebs_enable; 20340 uint64_t debugctl; 20341 uint64_t regs[0]; 20342 }; 20343 20344 struct xen_pmu_regs { 20345 uint64_t ip; 20346 uint64_t sp; 20347 uint64_t flags; 20348 uint16_t cs; 20349 uint16_t ss; 20350 uint8_t cpl; 20351 uint8_t pad[3]; 20352 }; 20353 20354 struct xen_pmu_arch { 20355 union { 20356 struct xen_pmu_regs regs; 20357 uint8_t pad[64]; 20358 } r; 20359 uint64_t pmu_flags; 20360 union { 20361 uint32_t lapic_lvtpc; 20362 uint64_t pad; 20363 } l; 20364 union { 20365 struct xen_pmu_amd_ctxt amd; 20366 struct xen_pmu_intel_ctxt intel; 20367 uint8_t pad[128]; 20368 } c; 20369 }; 20370 20371 struct xen_pmu_params { 20372 struct { 20373 uint32_t maj; 20374 uint32_t min; 20375 } version; 20376 uint64_t val; 20377 uint32_t vcpu; 20378 uint32_t pad; 20379 }; 20380 20381 struct xen_pmu_data { 20382 uint32_t vcpu_id; 20383 uint32_t pcpu_id; 20384 domid_t domain_id; 20385 uint8_t pad[6]; 20386 struct xen_pmu_arch pmu; 20387 }; 20388 20389 struct xenpmu { 20390 struct xen_pmu_data *xenpmu_data; 20391 uint8_t flags; 20392 }; 20393 20394 enum pg_level { 20395 PG_LEVEL_NONE = 0, 20396 PG_LEVEL_4K = 1, 20397 PG_LEVEL_2M = 2, 20398 PG_LEVEL_1G = 3, 20399 PG_LEVEL_512G = 4, 20400 PG_LEVEL_NUM = 5, 20401 }; 20402 20403 typedef uint32_t grant_ref_t; 20404 20405 typedef uint32_t grant_handle_t; 20406 20407 struct gnttab_map_grant_ref { 20408 uint64_t host_addr; 20409 uint32_t flags; 20410 grant_ref_t ref; 20411 domid_t dom; 20412 int16_t status; 20413 grant_handle_t handle; 20414 uint64_t dev_bus_addr; 20415 }; 20416 20417 struct gnttab_unmap_grant_ref { 20418 uint64_t host_addr; 20419 uint64_t dev_bus_addr; 20420 grant_handle_t handle; 20421 int16_t status; 20422 }; 20423 20424 enum { 20425 DESC_TSS = 9, 20426 DESC_LDT = 2, 20427 DESCTYPE_S = 16, 20428 }; 20429 20430 enum paravirt_lazy_mode { 20431 PARAVIRT_LAZY_NONE = 0, 20432 PARAVIRT_LAZY_MMU = 1, 20433 PARAVIRT_LAZY_CPU = 2, 20434 }; 20435 20436 struct plist_head { 20437 struct list_head node_list; 20438 }; 20439 20440 enum pm_qos_type { 20441 PM_QOS_UNITIALIZED = 0, 20442 PM_QOS_MAX = 1, 20443 PM_QOS_MIN = 2, 20444 }; 20445 20446 struct pm_qos_constraints { 20447 struct plist_head list; 20448 s32 target_value; 20449 s32 default_value; 20450 s32 no_constraint_value; 20451 enum pm_qos_type type; 20452 struct blocking_notifier_head *notifiers; 20453 }; 20454 20455 struct freq_constraints { 20456 struct pm_qos_constraints min_freq; 20457 struct blocking_notifier_head min_freq_notifiers; 20458 struct pm_qos_constraints max_freq; 20459 struct blocking_notifier_head max_freq_notifiers; 20460 }; 20461 20462 struct pm_qos_flags { 20463 struct list_head list; 20464 s32 effective_flags; 20465 }; 20466 20467 struct dev_pm_qos_request; 20468 20469 struct dev_pm_qos { 20470 struct pm_qos_constraints resume_latency; 20471 struct pm_qos_constraints latency_tolerance; 20472 struct freq_constraints freq; 20473 struct pm_qos_flags flags; 20474 struct dev_pm_qos_request *resume_latency_req; 20475 struct dev_pm_qos_request *latency_tolerance_req; 20476 struct dev_pm_qos_request *flags_req; 20477 }; 20478 20479 typedef long int xen_long_t; 20480 20481 struct trap_info { 20482 uint8_t vector; 20483 uint8_t flags; 20484 uint16_t cs; 20485 long unsigned int address; 20486 }; 20487 20488 struct mmuext_op { 20489 unsigned int cmd; 20490 union { 20491 xen_pfn_t mfn; 20492 long unsigned int linear_addr; 20493 } arg1; 20494 union { 20495 unsigned int nr_ents; 20496 void *vcpumask; 20497 xen_pfn_t src_mfn; 20498 } arg2; 20499 }; 20500 20501 struct multicall_entry { 20502 xen_ulong_t op; 20503 xen_long_t result; 20504 xen_ulong_t args[6]; 20505 }; 20506 20507 struct dom0_vga_console_info { 20508 uint8_t video_type; 20509 union { 20510 struct { 20511 uint16_t font_height; 20512 uint16_t cursor_x; 20513 uint16_t cursor_y; 20514 uint16_t rows; 20515 uint16_t columns; 20516 } text_mode_3; 20517 struct { 20518 uint16_t width; 20519 uint16_t height; 20520 uint16_t bytes_per_line; 20521 uint16_t bits_per_pixel; 20522 uint32_t lfb_base; 20523 uint32_t lfb_size; 20524 uint8_t red_pos; 20525 uint8_t red_size; 20526 uint8_t green_pos; 20527 uint8_t green_size; 20528 uint8_t blue_pos; 20529 uint8_t blue_size; 20530 uint8_t rsvd_pos; 20531 uint8_t rsvd_size; 20532 uint32_t gbl_caps; 20533 uint16_t mode_attrs; 20534 } vesa_lfb; 20535 } u; 20536 }; 20537 20538 struct physdev_set_iopl { 20539 uint32_t iopl; 20540 }; 20541 20542 struct physdev_set_iobitmap { 20543 uint8_t *bitmap; 20544 uint32_t nr_ports; 20545 }; 20546 20547 struct xen_extraversion { 20548 char extraversion[16]; 20549 }; 20550 20551 typedef u32 acpi_status; 20552 20553 struct pm_qos_flags_request { 20554 struct list_head node; 20555 s32 flags; 20556 }; 20557 20558 enum freq_qos_req_type { 20559 FREQ_QOS_MIN = 1, 20560 FREQ_QOS_MAX = 2, 20561 }; 20562 20563 struct freq_qos_request { 20564 enum freq_qos_req_type type; 20565 struct plist_node pnode; 20566 struct freq_constraints *qos; 20567 }; 20568 20569 enum dev_pm_qos_req_type { 20570 DEV_PM_QOS_RESUME_LATENCY = 1, 20571 DEV_PM_QOS_LATENCY_TOLERANCE = 2, 20572 DEV_PM_QOS_MIN_FREQUENCY = 3, 20573 DEV_PM_QOS_MAX_FREQUENCY = 4, 20574 DEV_PM_QOS_FLAGS = 5, 20575 }; 20576 20577 struct dev_pm_qos_request { 20578 enum dev_pm_qos_req_type type; 20579 union { 20580 struct plist_node pnode; 20581 struct pm_qos_flags_request flr; 20582 struct freq_qos_request freq; 20583 } data; 20584 struct device *dev; 20585 }; 20586 20587 struct multicall_space { 20588 struct multicall_entry *mc; 20589 void *args; 20590 }; 20591 20592 struct tls_descs { 20593 struct desc_struct desc[3]; 20594 }; 20595 20596 struct trap_array_entry { 20597 void (*orig)(); 20598 void (*xen)(); 20599 bool ist_okay; 20600 }; 20601 20602 struct mmu_gather_batch { 20603 struct mmu_gather_batch *next; 20604 unsigned int nr; 20605 unsigned int max; 20606 struct page *pages[0]; 20607 }; 20608 20609 struct mmu_table_batch; 20610 20611 struct mmu_gather { 20612 struct mm_struct *mm; 20613 struct mmu_table_batch *batch; 20614 long unsigned int start; 20615 long unsigned int end; 20616 unsigned int fullmm: 1; 20617 unsigned int need_flush_all: 1; 20618 unsigned int freed_tables: 1; 20619 unsigned int cleared_ptes: 1; 20620 unsigned int cleared_pmds: 1; 20621 unsigned int cleared_puds: 1; 20622 unsigned int cleared_p4ds: 1; 20623 unsigned int vma_exec: 1; 20624 unsigned int vma_huge: 1; 20625 unsigned int batch_count; 20626 struct mmu_gather_batch *active; 20627 struct mmu_gather_batch local; 20628 struct page *__pages[8]; 20629 }; 20630 20631 struct mmu_table_batch { 20632 struct callback_head rcu; 20633 unsigned int nr; 20634 void *tables[0]; 20635 }; 20636 20637 struct xen_memory_exchange { 20638 struct xen_memory_reservation in; 20639 struct xen_memory_reservation out; 20640 xen_ulong_t nr_exchanged; 20641 }; 20642 20643 struct xen_machphys_mapping { 20644 xen_ulong_t v_start; 20645 xen_ulong_t v_end; 20646 xen_ulong_t max_mfn; 20647 }; 20648 20649 enum pt_level { 20650 PT_PGD = 0, 20651 PT_P4D = 1, 20652 PT_PUD = 2, 20653 PT_PMD = 3, 20654 PT_PTE = 4, 20655 }; 20656 20657 struct remap_data { 20658 xen_pfn_t *pfn; 20659 bool contiguous; 20660 bool no_translate; 20661 pgprot_t prot; 20662 struct mmu_update *mmu_update; 20663 }; 20664 20665 enum xen_mc_flush_reason { 20666 XEN_MC_FL_NONE = 0, 20667 XEN_MC_FL_BATCH = 1, 20668 XEN_MC_FL_ARGS = 2, 20669 XEN_MC_FL_CALLBACK = 3, 20670 }; 20671 20672 enum xen_mc_extend_args { 20673 XEN_MC_XE_OK = 0, 20674 XEN_MC_XE_BAD_OP = 1, 20675 XEN_MC_XE_NO_SPACE = 2, 20676 }; 20677 20678 typedef void (*xen_mc_callback_fn_t)(void *); 20679 20680 struct callback { 20681 void (*fn)(void *); 20682 void *data; 20683 }; 20684 20685 struct mc_buffer { 20686 unsigned int mcidx; 20687 unsigned int argidx; 20688 unsigned int cbidx; 20689 struct multicall_entry entries[32]; 20690 unsigned char args[512]; 20691 struct callback callbacks[32]; 20692 }; 20693 20694 struct hvm_start_info { 20695 uint32_t magic; 20696 uint32_t version; 20697 uint32_t flags; 20698 uint32_t nr_modules; 20699 uint64_t modlist_paddr; 20700 uint64_t cmdline_paddr; 20701 uint64_t rsdp_paddr; 20702 uint64_t memmap_paddr; 20703 uint32_t memmap_entries; 20704 uint32_t reserved; 20705 }; 20706 20707 struct trace_event_raw_xen_mc__batch { 20708 struct trace_entry ent; 20709 enum paravirt_lazy_mode mode; 20710 char __data[0]; 20711 }; 20712 20713 struct trace_event_raw_xen_mc_entry { 20714 struct trace_entry ent; 20715 unsigned int op; 20716 unsigned int nargs; 20717 long unsigned int args[6]; 20718 char __data[0]; 20719 }; 20720 20721 struct trace_event_raw_xen_mc_entry_alloc { 20722 struct trace_entry ent; 20723 size_t args; 20724 char __data[0]; 20725 }; 20726 20727 struct trace_event_raw_xen_mc_callback { 20728 struct trace_entry ent; 20729 xen_mc_callback_fn_t fn; 20730 void *data; 20731 char __data[0]; 20732 }; 20733 20734 struct trace_event_raw_xen_mc_flush_reason { 20735 struct trace_entry ent; 20736 enum xen_mc_flush_reason reason; 20737 char __data[0]; 20738 }; 20739 20740 struct trace_event_raw_xen_mc_flush { 20741 struct trace_entry ent; 20742 unsigned int mcidx; 20743 unsigned int argidx; 20744 unsigned int cbidx; 20745 char __data[0]; 20746 }; 20747 20748 struct trace_event_raw_xen_mc_extend_args { 20749 struct trace_entry ent; 20750 unsigned int op; 20751 size_t args; 20752 enum xen_mc_extend_args res; 20753 char __data[0]; 20754 }; 20755 20756 struct trace_event_raw_xen_mmu__set_pte { 20757 struct trace_entry ent; 20758 pte_t *ptep; 20759 pteval_t pteval; 20760 char __data[0]; 20761 }; 20762 20763 struct trace_event_raw_xen_mmu_set_pmd { 20764 struct trace_entry ent; 20765 pmd_t *pmdp; 20766 pmdval_t pmdval; 20767 char __data[0]; 20768 }; 20769 20770 struct trace_event_raw_xen_mmu_set_pud { 20771 struct trace_entry ent; 20772 pud_t *pudp; 20773 pudval_t pudval; 20774 char __data[0]; 20775 }; 20776 20777 struct trace_event_raw_xen_mmu_set_p4d { 20778 struct trace_entry ent; 20779 p4d_t *p4dp; 20780 p4d_t *user_p4dp; 20781 p4dval_t p4dval; 20782 char __data[0]; 20783 }; 20784 20785 struct trace_event_raw_xen_mmu_ptep_modify_prot { 20786 struct trace_entry ent; 20787 struct mm_struct *mm; 20788 long unsigned int addr; 20789 pte_t *ptep; 20790 pteval_t pteval; 20791 char __data[0]; 20792 }; 20793 20794 struct trace_event_raw_xen_mmu_alloc_ptpage { 20795 struct trace_entry ent; 20796 struct mm_struct *mm; 20797 long unsigned int pfn; 20798 unsigned int level; 20799 bool pinned; 20800 char __data[0]; 20801 }; 20802 20803 struct trace_event_raw_xen_mmu_release_ptpage { 20804 struct trace_entry ent; 20805 long unsigned int pfn; 20806 unsigned int level; 20807 bool pinned; 20808 char __data[0]; 20809 }; 20810 20811 struct trace_event_raw_xen_mmu_pgd { 20812 struct trace_entry ent; 20813 struct mm_struct *mm; 20814 pgd_t *pgd; 20815 char __data[0]; 20816 }; 20817 20818 struct trace_event_raw_xen_mmu_flush_tlb_one_user { 20819 struct trace_entry ent; 20820 long unsigned int addr; 20821 char __data[0]; 20822 }; 20823 20824 struct trace_event_raw_xen_mmu_flush_tlb_others { 20825 struct trace_entry ent; 20826 unsigned int ncpus; 20827 struct mm_struct *mm; 20828 long unsigned int addr; 20829 long unsigned int end; 20830 char __data[0]; 20831 }; 20832 20833 struct trace_event_raw_xen_mmu_write_cr3 { 20834 struct trace_entry ent; 20835 bool kernel; 20836 long unsigned int cr3; 20837 char __data[0]; 20838 }; 20839 20840 struct trace_event_raw_xen_cpu_write_ldt_entry { 20841 struct trace_entry ent; 20842 struct desc_struct *dt; 20843 int entrynum; 20844 u64 desc; 20845 char __data[0]; 20846 }; 20847 20848 struct trace_event_raw_xen_cpu_write_idt_entry { 20849 struct trace_entry ent; 20850 gate_desc *dt; 20851 int entrynum; 20852 char __data[0]; 20853 }; 20854 20855 struct trace_event_raw_xen_cpu_load_idt { 20856 struct trace_entry ent; 20857 long unsigned int addr; 20858 char __data[0]; 20859 }; 20860 20861 struct trace_event_raw_xen_cpu_write_gdt_entry { 20862 struct trace_entry ent; 20863 u64 desc; 20864 struct desc_struct *dt; 20865 int entrynum; 20866 int type; 20867 char __data[0]; 20868 }; 20869 20870 struct trace_event_raw_xen_cpu_set_ldt { 20871 struct trace_entry ent; 20872 const void *addr; 20873 unsigned int entries; 20874 char __data[0]; 20875 }; 20876 20877 struct trace_event_data_offsets_xen_mc__batch {}; 20878 20879 struct trace_event_data_offsets_xen_mc_entry {}; 20880 20881 struct trace_event_data_offsets_xen_mc_entry_alloc {}; 20882 20883 struct trace_event_data_offsets_xen_mc_callback {}; 20884 20885 struct trace_event_data_offsets_xen_mc_flush_reason {}; 20886 20887 struct trace_event_data_offsets_xen_mc_flush {}; 20888 20889 struct trace_event_data_offsets_xen_mc_extend_args {}; 20890 20891 struct trace_event_data_offsets_xen_mmu__set_pte {}; 20892 20893 struct trace_event_data_offsets_xen_mmu_set_pmd {}; 20894 20895 struct trace_event_data_offsets_xen_mmu_set_pud {}; 20896 20897 struct trace_event_data_offsets_xen_mmu_set_p4d {}; 20898 20899 struct trace_event_data_offsets_xen_mmu_ptep_modify_prot {}; 20900 20901 struct trace_event_data_offsets_xen_mmu_alloc_ptpage {}; 20902 20903 struct trace_event_data_offsets_xen_mmu_release_ptpage {}; 20904 20905 struct trace_event_data_offsets_xen_mmu_pgd {}; 20906 20907 struct trace_event_data_offsets_xen_mmu_flush_tlb_one_user {}; 20908 20909 struct trace_event_data_offsets_xen_mmu_flush_tlb_others {}; 20910 20911 struct trace_event_data_offsets_xen_mmu_write_cr3 {}; 20912 20913 struct trace_event_data_offsets_xen_cpu_write_ldt_entry {}; 20914 20915 struct trace_event_data_offsets_xen_cpu_write_idt_entry {}; 20916 20917 struct trace_event_data_offsets_xen_cpu_load_idt {}; 20918 20919 struct trace_event_data_offsets_xen_cpu_write_gdt_entry {}; 20920 20921 struct trace_event_data_offsets_xen_cpu_set_ldt {}; 20922 20923 typedef void (*btf_trace_xen_mc_batch)(void *, enum paravirt_lazy_mode); 20924 20925 typedef void (*btf_trace_xen_mc_issue)(void *, enum paravirt_lazy_mode); 20926 20927 typedef void (*btf_trace_xen_mc_entry)(void *, struct multicall_entry *, unsigned int); 20928 20929 typedef void (*btf_trace_xen_mc_entry_alloc)(void *, size_t); 20930 20931 typedef void (*btf_trace_xen_mc_callback)(void *, xen_mc_callback_fn_t, void *); 20932 20933 typedef void (*btf_trace_xen_mc_flush_reason)(void *, enum xen_mc_flush_reason); 20934 20935 typedef void (*btf_trace_xen_mc_flush)(void *, unsigned int, unsigned int, unsigned int); 20936 20937 typedef void (*btf_trace_xen_mc_extend_args)(void *, long unsigned int, size_t, enum xen_mc_extend_args); 20938 20939 typedef void (*btf_trace_xen_mmu_set_pte)(void *, pte_t *, pte_t); 20940 20941 typedef void (*btf_trace_xen_mmu_set_pmd)(void *, pmd_t *, pmd_t); 20942 20943 typedef void (*btf_trace_xen_mmu_set_pud)(void *, pud_t *, pud_t); 20944 20945 typedef void (*btf_trace_xen_mmu_set_p4d)(void *, p4d_t *, p4d_t *, p4d_t); 20946 20947 typedef void (*btf_trace_xen_mmu_ptep_modify_prot_start)(void *, struct mm_struct *, long unsigned int, pte_t *, pte_t); 20948 20949 typedef void (*btf_trace_xen_mmu_ptep_modify_prot_commit)(void *, struct mm_struct *, long unsigned int, pte_t *, pte_t); 20950 20951 typedef void (*btf_trace_xen_mmu_alloc_ptpage)(void *, struct mm_struct *, long unsigned int, unsigned int, bool); 20952 20953 typedef void (*btf_trace_xen_mmu_release_ptpage)(void *, long unsigned int, unsigned int, bool); 20954 20955 typedef void (*btf_trace_xen_mmu_pgd_pin)(void *, struct mm_struct *, pgd_t *); 20956 20957 typedef void (*btf_trace_xen_mmu_pgd_unpin)(void *, struct mm_struct *, pgd_t *); 20958 20959 typedef void (*btf_trace_xen_mmu_flush_tlb_one_user)(void *, long unsigned int); 20960 20961 typedef void (*btf_trace_xen_mmu_flush_tlb_others)(void *, const struct cpumask *, struct mm_struct *, long unsigned int, long unsigned int); 20962 20963 typedef void (*btf_trace_xen_mmu_write_cr3)(void *, bool, long unsigned int); 20964 20965 typedef void (*btf_trace_xen_cpu_write_ldt_entry)(void *, struct desc_struct *, int, u64); 20966 20967 typedef void (*btf_trace_xen_cpu_write_idt_entry)(void *, gate_desc *, int, const gate_desc *); 20968 20969 typedef void (*btf_trace_xen_cpu_load_idt)(void *, const struct desc_ptr *); 20970 20971 typedef void (*btf_trace_xen_cpu_write_gdt_entry)(void *, struct desc_struct *, int, const void *, int); 20972 20973 typedef void (*btf_trace_xen_cpu_set_ldt)(void *, const void *, unsigned int); 20974 20975 enum ipi_vector { 20976 XEN_RESCHEDULE_VECTOR = 0, 20977 XEN_CALL_FUNCTION_VECTOR = 1, 20978 XEN_CALL_FUNCTION_SINGLE_VECTOR = 2, 20979 XEN_SPIN_UNLOCK_VECTOR = 3, 20980 XEN_IRQ_WORK_VECTOR = 4, 20981 XEN_NMI_VECTOR = 5, 20982 XEN_NR_IPIS = 6, 20983 }; 20984 20985 struct xen_common_irq { 20986 int irq; 20987 char *name; 20988 }; 20989 20990 struct cpu_user_regs { 20991 uint64_t r15; 20992 uint64_t r14; 20993 uint64_t r13; 20994 uint64_t r12; 20995 union { 20996 uint64_t rbp; 20997 uint64_t ebp; 20998 uint32_t _ebp; 20999 }; 21000 union { 21001 uint64_t rbx; 21002 uint64_t ebx; 21003 uint32_t _ebx; 21004 }; 21005 uint64_t r11; 21006 uint64_t r10; 21007 uint64_t r9; 21008 uint64_t r8; 21009 union { 21010 uint64_t rax; 21011 uint64_t eax; 21012 uint32_t _eax; 21013 }; 21014 union { 21015 uint64_t rcx; 21016 uint64_t ecx; 21017 uint32_t _ecx; 21018 }; 21019 union { 21020 uint64_t rdx; 21021 uint64_t edx; 21022 uint32_t _edx; 21023 }; 21024 union { 21025 uint64_t rsi; 21026 uint64_t esi; 21027 uint32_t _esi; 21028 }; 21029 union { 21030 uint64_t rdi; 21031 uint64_t edi; 21032 uint32_t _edi; 21033 }; 21034 uint32_t error_code; 21035 uint32_t entry_vector; 21036 union { 21037 uint64_t rip; 21038 uint64_t eip; 21039 uint32_t _eip; 21040 }; 21041 uint16_t cs; 21042 uint16_t _pad0[1]; 21043 uint8_t saved_upcall_mask; 21044 uint8_t _pad1[3]; 21045 union { 21046 uint64_t rflags; 21047 uint64_t eflags; 21048 uint32_t _eflags; 21049 }; 21050 union { 21051 uint64_t rsp; 21052 uint64_t esp; 21053 uint32_t _esp; 21054 }; 21055 uint16_t ss; 21056 uint16_t _pad2[3]; 21057 uint16_t es; 21058 uint16_t _pad3[3]; 21059 uint16_t ds; 21060 uint16_t _pad4[3]; 21061 uint16_t fs; 21062 uint16_t _pad5[3]; 21063 uint16_t gs; 21064 uint16_t _pad6[3]; 21065 }; 21066 21067 struct vcpu_guest_context { 21068 struct { 21069 char x[512]; 21070 } fpu_ctxt; 21071 long unsigned int flags; 21072 struct cpu_user_regs user_regs; 21073 struct trap_info trap_ctxt[256]; 21074 long unsigned int ldt_base; 21075 long unsigned int ldt_ents; 21076 long unsigned int gdt_frames[16]; 21077 long unsigned int gdt_ents; 21078 long unsigned int kernel_ss; 21079 long unsigned int kernel_sp; 21080 long unsigned int ctrlreg[8]; 21081 long unsigned int debugreg[8]; 21082 long unsigned int event_callback_eip; 21083 long unsigned int failsafe_callback_eip; 21084 long unsigned int syscall_callback_eip; 21085 long unsigned int vm_assist; 21086 uint64_t fs_base; 21087 uint64_t gs_base_kernel; 21088 uint64_t gs_base_user; 21089 }; 21090 21091 struct sg_table { 21092 struct scatterlist *sgl; 21093 unsigned int nents; 21094 unsigned int orig_nents; 21095 }; 21096 21097 enum swiotlb_force { 21098 SWIOTLB_NORMAL = 0, 21099 SWIOTLB_FORCE = 1, 21100 SWIOTLB_NO_FORCE = 2, 21101 }; 21102 21103 struct iommu_table_entry { 21104 initcall_t detect; 21105 initcall_t depend; 21106 void (*early_init)(); 21107 void (*late_init)(); 21108 int flags; 21109 }; 21110 21111 union efi_boot_services; 21112 21113 typedef union efi_boot_services efi_boot_services_t; 21114 21115 typedef struct { 21116 efi_table_hdr_t hdr; 21117 u32 fw_vendor; 21118 u32 fw_revision; 21119 u32 con_in_handle; 21120 u32 con_in; 21121 u32 con_out_handle; 21122 u32 con_out; 21123 u32 stderr_handle; 21124 u32 stderr; 21125 u32 runtime; 21126 u32 boottime; 21127 u32 nr_tables; 21128 u32 tables; 21129 } efi_system_table_32_t; 21130 21131 union efi_simple_text_input_protocol; 21132 21133 typedef union efi_simple_text_input_protocol efi_simple_text_input_protocol_t; 21134 21135 union efi_simple_text_output_protocol; 21136 21137 typedef union efi_simple_text_output_protocol efi_simple_text_output_protocol_t; 21138 21139 typedef union { 21140 struct { 21141 efi_table_hdr_t hdr; 21142 long unsigned int fw_vendor; 21143 u32 fw_revision; 21144 long unsigned int con_in_handle; 21145 efi_simple_text_input_protocol_t *con_in; 21146 long unsigned int con_out_handle; 21147 efi_simple_text_output_protocol_t *con_out; 21148 long unsigned int stderr_handle; 21149 long unsigned int stderr; 21150 efi_runtime_services_t *runtime; 21151 efi_boot_services_t *boottime; 21152 long unsigned int nr_tables; 21153 long unsigned int tables; 21154 }; 21155 efi_system_table_32_t mixed_mode; 21156 } efi_system_table_t; 21157 21158 enum efi_secureboot_mode { 21159 efi_secureboot_mode_unset = 0, 21160 efi_secureboot_mode_unknown = 1, 21161 efi_secureboot_mode_disabled = 2, 21162 efi_secureboot_mode_enabled = 3, 21163 }; 21164 21165 struct hvm_modlist_entry { 21166 uint64_t paddr; 21167 uint64_t size; 21168 uint64_t cmdline_paddr; 21169 uint64_t reserved; 21170 }; 21171 21172 struct hvm_memmap_table_entry { 21173 uint64_t addr; 21174 uint64_t size; 21175 uint32_t type; 21176 uint32_t reserved; 21177 }; 21178 21179 enum { 21180 WORK_STRUCT_PENDING_BIT = 0, 21181 WORK_STRUCT_DELAYED_BIT = 1, 21182 WORK_STRUCT_PWQ_BIT = 2, 21183 WORK_STRUCT_LINKED_BIT = 3, 21184 WORK_STRUCT_COLOR_SHIFT = 4, 21185 WORK_STRUCT_COLOR_BITS = 4, 21186 WORK_STRUCT_PENDING = 1, 21187 WORK_STRUCT_DELAYED = 2, 21188 WORK_STRUCT_PWQ = 4, 21189 WORK_STRUCT_LINKED = 8, 21190 WORK_STRUCT_STATIC = 0, 21191 WORK_NR_COLORS = 15, 21192 WORK_NO_COLOR = 15, 21193 WORK_CPU_UNBOUND = 8192, 21194 WORK_STRUCT_FLAG_BITS = 8, 21195 WORK_OFFQ_FLAG_BASE = 4, 21196 __WORK_OFFQ_CANCELING = 4, 21197 WORK_OFFQ_CANCELING = 16, 21198 WORK_OFFQ_FLAG_BITS = 1, 21199 WORK_OFFQ_POOL_SHIFT = 5, 21200 WORK_OFFQ_LEFT = 59, 21201 WORK_OFFQ_POOL_BITS = 31, 21202 WORK_OFFQ_POOL_NONE = 2147483647, 21203 WORK_STRUCT_FLAG_MASK = 255, 21204 WORK_STRUCT_WQ_DATA_MASK = 4294967040, 21205 WORK_STRUCT_NO_POOL = 4294967264, 21206 WORK_BUSY_PENDING = 1, 21207 WORK_BUSY_RUNNING = 2, 21208 WORKER_DESC_LEN = 24, 21209 }; 21210 21211 union hv_x64_msr_hypercall_contents { 21212 u64 as_uint64; 21213 struct { 21214 u64 enable: 1; 21215 u64 reserved: 11; 21216 u64 guest_physical_address: 52; 21217 }; 21218 }; 21219 21220 struct hv_reenlightenment_control { 21221 __u64 vector: 8; 21222 __u64 reserved1: 8; 21223 __u64 enabled: 1; 21224 __u64 reserved2: 15; 21225 __u64 target_vp: 32; 21226 }; 21227 21228 struct hv_tsc_emulation_control { 21229 __u64 enabled: 1; 21230 __u64 reserved: 63; 21231 }; 21232 21233 struct hv_tsc_emulation_status { 21234 __u64 inprogress: 1; 21235 __u64 reserved: 63; 21236 }; 21237 21238 struct hv_nested_enlightenments_control { 21239 struct { 21240 __u32 directhypercall: 1; 21241 __u32 reserved: 31; 21242 } features; 21243 struct { 21244 __u32 reserved; 21245 } hypercallControls; 21246 }; 21247 21248 struct hv_vp_assist_page { 21249 __u32 apic_assist; 21250 __u32 reserved1; 21251 __u64 vtl_control[3]; 21252 struct hv_nested_enlightenments_control nested_control; 21253 __u8 enlighten_vmentry; 21254 __u8 reserved2[7]; 21255 __u64 current_nested_vmcs; 21256 }; 21257 21258 struct ms_hyperv_info { 21259 u32 features; 21260 u32 misc_features; 21261 u32 hints; 21262 u32 nested_features; 21263 u32 max_vp_index; 21264 u32 max_lp_index; 21265 }; 21266 21267 enum HV_GENERIC_SET_FORMAT { 21268 HV_GENERIC_SET_SPARSE_4K = 0, 21269 HV_GENERIC_SET_ALL = 1, 21270 }; 21271 21272 struct hv_vpset { 21273 u64 format; 21274 u64 valid_bank_mask; 21275 u64 bank_contents[0]; 21276 }; 21277 21278 struct hv_tlb_flush { 21279 u64 address_space; 21280 u64 flags; 21281 u64 processor_mask; 21282 u64 gva_list[0]; 21283 }; 21284 21285 struct hv_tlb_flush_ex { 21286 u64 address_space; 21287 u64 flags; 21288 struct hv_vpset hv_vp_set; 21289 u64 gva_list[0]; 21290 }; 21291 21292 struct trace_event_raw_hyperv_mmu_flush_tlb_others { 21293 struct trace_entry ent; 21294 unsigned int ncpus; 21295 struct mm_struct *mm; 21296 long unsigned int addr; 21297 long unsigned int end; 21298 char __data[0]; 21299 }; 21300 21301 struct trace_event_raw_hyperv_nested_flush_guest_mapping { 21302 struct trace_entry ent; 21303 u64 as; 21304 int ret; 21305 char __data[0]; 21306 }; 21307 21308 struct trace_event_raw_hyperv_nested_flush_guest_mapping_range { 21309 struct trace_entry ent; 21310 u64 as; 21311 int ret; 21312 char __data[0]; 21313 }; 21314 21315 struct trace_event_raw_hyperv_send_ipi_mask { 21316 struct trace_entry ent; 21317 unsigned int ncpus; 21318 int vector; 21319 char __data[0]; 21320 }; 21321 21322 struct trace_event_raw_hyperv_send_ipi_one { 21323 struct trace_entry ent; 21324 int cpu; 21325 int vector; 21326 char __data[0]; 21327 }; 21328 21329 struct trace_event_data_offsets_hyperv_mmu_flush_tlb_others {}; 21330 21331 struct trace_event_data_offsets_hyperv_nested_flush_guest_mapping {}; 21332 21333 struct trace_event_data_offsets_hyperv_nested_flush_guest_mapping_range {}; 21334 21335 struct trace_event_data_offsets_hyperv_send_ipi_mask {}; 21336 21337 struct trace_event_data_offsets_hyperv_send_ipi_one {}; 21338 21339 typedef void (*btf_trace_hyperv_mmu_flush_tlb_others)(void *, const struct cpumask *, const struct flush_tlb_info *); 21340 21341 typedef void (*btf_trace_hyperv_nested_flush_guest_mapping)(void *, u64, int); 21342 21343 typedef void (*btf_trace_hyperv_nested_flush_guest_mapping_range)(void *, u64, int); 21344 21345 typedef void (*btf_trace_hyperv_send_ipi_mask)(void *, const struct cpumask *, int); 21346 21347 typedef void (*btf_trace_hyperv_send_ipi_one)(void *, int, int); 21348 21349 struct hv_guest_mapping_flush { 21350 u64 address_space; 21351 u64 flags; 21352 }; 21353 21354 union hv_gpa_page_range { 21355 u64 address_space; 21356 struct { 21357 u64 additional_pages: 11; 21358 u64 largepage: 1; 21359 u64 basepfn: 52; 21360 } page; 21361 }; 21362 21363 struct hv_guest_mapping_flush_list { 21364 u64 address_space; 21365 u64 flags; 21366 union hv_gpa_page_range gpa_list[510]; 21367 }; 21368 21369 typedef int (*hyperv_fill_flush_list_func)(struct hv_guest_mapping_flush_list *, void *); 21370 21371 struct hv_send_ipi { 21372 u32 vector; 21373 u32 reserved; 21374 u64 cpu_mask; 21375 }; 21376 21377 struct hv_send_ipi_ex { 21378 u32 vector; 21379 u32 reserved; 21380 struct hv_vpset vp_set; 21381 }; 21382 21383 struct real_mode_header { 21384 u32 text_start; 21385 u32 ro_end; 21386 u32 trampoline_start; 21387 u32 trampoline_header; 21388 u32 sev_es_trampoline_start; 21389 u32 trampoline_pgd; 21390 u32 wakeup_start; 21391 u32 wakeup_header; 21392 u32 machine_real_restart_asm; 21393 u32 machine_real_restart_seg; 21394 }; 21395 21396 struct trampoline_header { 21397 u64 start; 21398 u64 efer; 21399 u32 cr4; 21400 u32 flags; 21401 }; 21402 21403 struct pkru_state { 21404 u32 pkru; 21405 u32 pad; 21406 }; 21407 21408 enum show_regs_mode { 21409 SHOW_REGS_SHORT = 0, 21410 SHOW_REGS_USER = 1, 21411 SHOW_REGS_ALL = 2, 21412 }; 21413 21414 struct resctrl_pqr_state { 21415 u32 cur_rmid; 21416 u32 cur_closid; 21417 u32 default_rmid; 21418 u32 default_closid; 21419 }; 21420 21421 enum which_selector { 21422 FS = 0, 21423 GS = 1, 21424 }; 21425 21426 struct sigcontext_64 { 21427 __u64 r8; 21428 __u64 r9; 21429 __u64 r10; 21430 __u64 r11; 21431 __u64 r12; 21432 __u64 r13; 21433 __u64 r14; 21434 __u64 r15; 21435 __u64 di; 21436 __u64 si; 21437 __u64 bp; 21438 __u64 bx; 21439 __u64 dx; 21440 __u64 ax; 21441 __u64 cx; 21442 __u64 sp; 21443 __u64 ip; 21444 __u64 flags; 21445 __u16 cs; 21446 __u16 gs; 21447 __u16 fs; 21448 __u16 ss; 21449 __u64 err; 21450 __u64 trapno; 21451 __u64 oldmask; 21452 __u64 cr2; 21453 __u64 fpstate; 21454 __u64 reserved1[8]; 21455 }; 21456 21457 struct sigaltstack { 21458 void *ss_sp; 21459 int ss_flags; 21460 size_t ss_size; 21461 }; 21462 21463 typedef struct sigaltstack stack_t; 21464 21465 struct siginfo { 21466 union { 21467 struct { 21468 int si_signo; 21469 int si_errno; 21470 int si_code; 21471 union __sifields _sifields; 21472 }; 21473 int _si_pad[32]; 21474 }; 21475 }; 21476 21477 typedef struct siginfo siginfo_t; 21478 21479 struct ksignal { 21480 struct k_sigaction ka; 21481 kernel_siginfo_t info; 21482 int sig; 21483 }; 21484 21485 struct __large_struct { 21486 long unsigned int buf[100]; 21487 }; 21488 21489 typedef u32 compat_sigset_word; 21490 21491 typedef struct { 21492 compat_sigset_word sig[2]; 21493 } compat_sigset_t; 21494 21495 struct ucontext { 21496 long unsigned int uc_flags; 21497 struct ucontext *uc_link; 21498 stack_t uc_stack; 21499 struct sigcontext_64 uc_mcontext; 21500 sigset_t uc_sigmask; 21501 }; 21502 21503 struct kernel_vm86_regs { 21504 struct pt_regs pt; 21505 short unsigned int es; 21506 short unsigned int __esh; 21507 short unsigned int ds; 21508 short unsigned int __dsh; 21509 short unsigned int fs; 21510 short unsigned int __fsh; 21511 short unsigned int gs; 21512 short unsigned int __gsh; 21513 }; 21514 21515 struct rt_sigframe { 21516 char *pretcode; 21517 struct ucontext uc; 21518 struct siginfo info; 21519 }; 21520 21521 typedef s32 compat_clock_t; 21522 21523 typedef s32 compat_pid_t; 21524 21525 typedef s32 compat_timer_t; 21526 21527 typedef s32 compat_int_t; 21528 21529 typedef u32 __compat_uid32_t; 21530 21531 union compat_sigval { 21532 compat_int_t sival_int; 21533 compat_uptr_t sival_ptr; 21534 }; 21535 21536 typedef union compat_sigval compat_sigval_t; 21537 21538 struct compat_siginfo { 21539 int si_signo; 21540 int si_errno; 21541 int si_code; 21542 union { 21543 int _pad[29]; 21544 struct { 21545 compat_pid_t _pid; 21546 __compat_uid32_t _uid; 21547 } _kill; 21548 struct { 21549 compat_timer_t _tid; 21550 int _overrun; 21551 compat_sigval_t _sigval; 21552 } _timer; 21553 struct { 21554 compat_pid_t _pid; 21555 __compat_uid32_t _uid; 21556 compat_sigval_t _sigval; 21557 } _rt; 21558 struct { 21559 compat_pid_t _pid; 21560 __compat_uid32_t _uid; 21561 int _status; 21562 compat_clock_t _utime; 21563 compat_clock_t _stime; 21564 } _sigchld; 21565 struct { 21566 compat_uptr_t _addr; 21567 union { 21568 short int _addr_lsb; 21569 struct { 21570 char _dummy_bnd[4]; 21571 compat_uptr_t _lower; 21572 compat_uptr_t _upper; 21573 } _addr_bnd; 21574 struct { 21575 char _dummy_pkey[4]; 21576 u32 _pkey; 21577 } _addr_pkey; 21578 }; 21579 } _sigfault; 21580 struct { 21581 compat_long_t _band; 21582 int _fd; 21583 } _sigpoll; 21584 struct { 21585 compat_uptr_t _call_addr; 21586 int _syscall; 21587 unsigned int _arch; 21588 } _sigsys; 21589 } _sifields; 21590 }; 21591 21592 typedef struct compat_siginfo compat_siginfo_t; 21593 21594 enum bug_trap_type { 21595 BUG_TRAP_TYPE_NONE = 0, 21596 BUG_TRAP_TYPE_WARN = 1, 21597 BUG_TRAP_TYPE_BUG = 2, 21598 }; 21599 21600 typedef u8 kprobe_opcode_t; 21601 21602 struct arch_specific_insn { 21603 kprobe_opcode_t *insn; 21604 bool boostable; 21605 bool if_modifier; 21606 int tp_len; 21607 }; 21608 21609 struct kprobe; 21610 21611 typedef int (*kprobe_pre_handler_t)(struct kprobe *, struct pt_regs *); 21612 21613 typedef void (*kprobe_post_handler_t)(struct kprobe *, struct pt_regs *, long unsigned int); 21614 21615 typedef int (*kprobe_fault_handler_t)(struct kprobe *, struct pt_regs *, int); 21616 21617 struct kprobe { 21618 struct hlist_node hlist; 21619 struct list_head list; 21620 long unsigned int nmissed; 21621 kprobe_opcode_t *addr; 21622 const char *symbol_name; 21623 unsigned int offset; 21624 kprobe_pre_handler_t pre_handler; 21625 kprobe_post_handler_t post_handler; 21626 kprobe_fault_handler_t fault_handler; 21627 kprobe_opcode_t opcode; 21628 struct arch_specific_insn ainsn; 21629 u32 flags; 21630 }; 21631 21632 enum die_val { 21633 DIE_OOPS = 1, 21634 DIE_INT3 = 2, 21635 DIE_DEBUG = 3, 21636 DIE_PANIC = 4, 21637 DIE_NMI = 5, 21638 DIE_DIE = 6, 21639 DIE_KERNELDEBUG = 7, 21640 DIE_TRAP = 8, 21641 DIE_GPF = 9, 21642 DIE_CALL = 10, 21643 DIE_PAGE_FAULT = 11, 21644 DIE_NMIUNKNOWN = 12, 21645 }; 21646 21647 enum kernel_gp_hint { 21648 GP_NO_HINT = 0, 21649 GP_NON_CANONICAL = 1, 21650 GP_CANONICAL = 2, 21651 }; 21652 21653 struct bad_iret_stack { 21654 void *error_entry_ret; 21655 struct pt_regs regs; 21656 }; 21657 21658 typedef struct irq_desc *vector_irq_t[256]; 21659 21660 struct trace_event_raw_x86_irq_vector { 21661 struct trace_entry ent; 21662 int vector; 21663 char __data[0]; 21664 }; 21665 21666 struct trace_event_raw_vector_config { 21667 struct trace_entry ent; 21668 unsigned int irq; 21669 unsigned int vector; 21670 unsigned int cpu; 21671 unsigned int apicdest; 21672 char __data[0]; 21673 }; 21674 21675 struct trace_event_raw_vector_mod { 21676 struct trace_entry ent; 21677 unsigned int irq; 21678 unsigned int vector; 21679 unsigned int cpu; 21680 unsigned int prev_vector; 21681 unsigned int prev_cpu; 21682 char __data[0]; 21683 }; 21684 21685 struct trace_event_raw_vector_reserve { 21686 struct trace_entry ent; 21687 unsigned int irq; 21688 int ret; 21689 char __data[0]; 21690 }; 21691 21692 struct trace_event_raw_vector_alloc { 21693 struct trace_entry ent; 21694 unsigned int irq; 21695 unsigned int vector; 21696 bool reserved; 21697 int ret; 21698 char __data[0]; 21699 }; 21700 21701 struct trace_event_raw_vector_alloc_managed { 21702 struct trace_entry ent; 21703 unsigned int irq; 21704 unsigned int vector; 21705 int ret; 21706 char __data[0]; 21707 }; 21708 21709 struct trace_event_raw_vector_activate { 21710 struct trace_entry ent; 21711 unsigned int irq; 21712 bool is_managed; 21713 bool can_reserve; 21714 bool reserve; 21715 char __data[0]; 21716 }; 21717 21718 struct trace_event_raw_vector_teardown { 21719 struct trace_entry ent; 21720 unsigned int irq; 21721 bool is_managed; 21722 bool has_reserved; 21723 char __data[0]; 21724 }; 21725 21726 struct trace_event_raw_vector_setup { 21727 struct trace_entry ent; 21728 unsigned int irq; 21729 bool is_legacy; 21730 int ret; 21731 char __data[0]; 21732 }; 21733 21734 struct trace_event_raw_vector_free_moved { 21735 struct trace_entry ent; 21736 unsigned int irq; 21737 unsigned int cpu; 21738 unsigned int vector; 21739 bool is_managed; 21740 char __data[0]; 21741 }; 21742 21743 struct trace_event_data_offsets_x86_irq_vector {}; 21744 21745 struct trace_event_data_offsets_vector_config {}; 21746 21747 struct trace_event_data_offsets_vector_mod {}; 21748 21749 struct trace_event_data_offsets_vector_reserve {}; 21750 21751 struct trace_event_data_offsets_vector_alloc {}; 21752 21753 struct trace_event_data_offsets_vector_alloc_managed {}; 21754 21755 struct trace_event_data_offsets_vector_activate {}; 21756 21757 struct trace_event_data_offsets_vector_teardown {}; 21758 21759 struct trace_event_data_offsets_vector_setup {}; 21760 21761 struct trace_event_data_offsets_vector_free_moved {}; 21762 21763 typedef void (*btf_trace_local_timer_entry)(void *, int); 21764 21765 typedef void (*btf_trace_local_timer_exit)(void *, int); 21766 21767 typedef void (*btf_trace_spurious_apic_entry)(void *, int); 21768 21769 typedef void (*btf_trace_spurious_apic_exit)(void *, int); 21770 21771 typedef void (*btf_trace_error_apic_entry)(void *, int); 21772 21773 typedef void (*btf_trace_error_apic_exit)(void *, int); 21774 21775 typedef void (*btf_trace_x86_platform_ipi_entry)(void *, int); 21776 21777 typedef void (*btf_trace_x86_platform_ipi_exit)(void *, int); 21778 21779 typedef void (*btf_trace_irq_work_entry)(void *, int); 21780 21781 typedef void (*btf_trace_irq_work_exit)(void *, int); 21782 21783 typedef void (*btf_trace_reschedule_entry)(void *, int); 21784 21785 typedef void (*btf_trace_reschedule_exit)(void *, int); 21786 21787 typedef void (*btf_trace_call_function_entry)(void *, int); 21788 21789 typedef void (*btf_trace_call_function_exit)(void *, int); 21790 21791 typedef void (*btf_trace_call_function_single_entry)(void *, int); 21792 21793 typedef void (*btf_trace_call_function_single_exit)(void *, int); 21794 21795 typedef void (*btf_trace_threshold_apic_entry)(void *, int); 21796 21797 typedef void (*btf_trace_threshold_apic_exit)(void *, int); 21798 21799 typedef void (*btf_trace_deferred_error_apic_entry)(void *, int); 21800 21801 typedef void (*btf_trace_deferred_error_apic_exit)(void *, int); 21802 21803 typedef void (*btf_trace_thermal_apic_entry)(void *, int); 21804 21805 typedef void (*btf_trace_thermal_apic_exit)(void *, int); 21806 21807 typedef void (*btf_trace_vector_config)(void *, unsigned int, unsigned int, unsigned int, unsigned int); 21808 21809 typedef void (*btf_trace_vector_update)(void *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); 21810 21811 typedef void (*btf_trace_vector_clear)(void *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int); 21812 21813 typedef void (*btf_trace_vector_reserve_managed)(void *, unsigned int, int); 21814 21815 typedef void (*btf_trace_vector_reserve)(void *, unsigned int, int); 21816 21817 typedef void (*btf_trace_vector_alloc)(void *, unsigned int, unsigned int, bool, int); 21818 21819 typedef void (*btf_trace_vector_alloc_managed)(void *, unsigned int, unsigned int, int); 21820 21821 typedef void (*btf_trace_vector_activate)(void *, unsigned int, bool, bool, bool); 21822 21823 typedef void (*btf_trace_vector_deactivate)(void *, unsigned int, bool, bool, bool); 21824 21825 typedef void (*btf_trace_vector_teardown)(void *, unsigned int, bool, bool); 21826 21827 typedef void (*btf_trace_vector_setup)(void *, unsigned int, bool, int); 21828 21829 typedef void (*btf_trace_vector_free_moved)(void *, unsigned int, unsigned int, unsigned int, bool); 21830 21831 struct estack_pages { 21832 u32 offs; 21833 u16 size; 21834 u16 type; 21835 }; 21836 21837 enum refcount_saturation_type { 21838 REFCOUNT_ADD_NOT_ZERO_OVF = 0, 21839 REFCOUNT_ADD_OVF = 1, 21840 REFCOUNT_ADD_UAF = 2, 21841 REFCOUNT_SUB_UAF = 3, 21842 REFCOUNT_DEC_LEAK = 4, 21843 }; 21844 21845 enum lockdown_reason { 21846 LOCKDOWN_NONE = 0, 21847 LOCKDOWN_MODULE_SIGNATURE = 1, 21848 LOCKDOWN_DEV_MEM = 2, 21849 LOCKDOWN_EFI_TEST = 3, 21850 LOCKDOWN_KEXEC = 4, 21851 LOCKDOWN_HIBERNATION = 5, 21852 LOCKDOWN_PCI_ACCESS = 6, 21853 LOCKDOWN_IOPORT = 7, 21854 LOCKDOWN_MSR = 8, 21855 LOCKDOWN_ACPI_TABLES = 9, 21856 LOCKDOWN_PCMCIA_CIS = 10, 21857 LOCKDOWN_TIOCSSERIAL = 11, 21858 LOCKDOWN_MODULE_PARAMETERS = 12, 21859 LOCKDOWN_MMIOTRACE = 13, 21860 LOCKDOWN_DEBUGFS = 14, 21861 LOCKDOWN_XMON_WR = 15, 21862 LOCKDOWN_INTEGRITY_MAX = 16, 21863 LOCKDOWN_KCORE = 17, 21864 LOCKDOWN_KPROBES = 18, 21865 LOCKDOWN_BPF_READ = 19, 21866 LOCKDOWN_PERF = 20, 21867 LOCKDOWN_TRACEFS = 21, 21868 LOCKDOWN_XMON_RW = 22, 21869 LOCKDOWN_XFRM_SECRET = 23, 21870 LOCKDOWN_CONFIDENTIALITY_MAX = 24, 21871 }; 21872 21873 enum lockdep_ok { 21874 LOCKDEP_STILL_OK = 0, 21875 LOCKDEP_NOW_UNRELIABLE = 1, 21876 }; 21877 21878 struct trace_event_raw_nmi_handler { 21879 struct trace_entry ent; 21880 void *handler; 21881 s64 delta_ns; 21882 int handled; 21883 char __data[0]; 21884 }; 21885 21886 struct trace_event_data_offsets_nmi_handler {}; 21887 21888 typedef void (*btf_trace_nmi_handler)(void *, void *, s64, int); 21889 21890 struct nmi_desc { 21891 raw_spinlock_t lock; 21892 struct list_head head; 21893 }; 21894 21895 struct nmi_stats { 21896 unsigned int normal; 21897 unsigned int unknown; 21898 unsigned int external; 21899 unsigned int swallow; 21900 }; 21901 21902 enum nmi_states { 21903 NMI_NOT_RUNNING = 0, 21904 NMI_EXECUTING = 1, 21905 NMI_LATCHED = 2, 21906 }; 21907 21908 struct user_desc { 21909 unsigned int entry_number; 21910 unsigned int base_addr; 21911 unsigned int limit; 21912 unsigned int seg_32bit: 1; 21913 unsigned int contents: 2; 21914 unsigned int read_exec_only: 1; 21915 unsigned int limit_in_pages: 1; 21916 unsigned int seg_not_present: 1; 21917 unsigned int useable: 1; 21918 unsigned int lm: 1; 21919 }; 21920 21921 enum con_scroll { 21922 SM_UP = 0, 21923 SM_DOWN = 1, 21924 }; 21925 21926 enum vc_intensity { 21927 VCI_HALF_BRIGHT = 0, 21928 VCI_NORMAL = 1, 21929 VCI_BOLD = 2, 21930 VCI_MASK = 3, 21931 }; 21932 21933 struct vc_data; 21934 21935 struct console_font; 21936 21937 struct consw { 21938 struct module *owner; 21939 const char * (*con_startup)(); 21940 void (*con_init)(struct vc_data *, int); 21941 void (*con_deinit)(struct vc_data *); 21942 void (*con_clear)(struct vc_data *, int, int, int, int); 21943 void (*con_putc)(struct vc_data *, int, int, int); 21944 void (*con_putcs)(struct vc_data *, const short unsigned int *, int, int, int); 21945 void (*con_cursor)(struct vc_data *, int); 21946 bool (*con_scroll)(struct vc_data *, unsigned int, unsigned int, enum con_scroll, unsigned int); 21947 int (*con_switch)(struct vc_data *); 21948 int (*con_blank)(struct vc_data *, int, int); 21949 int (*con_font_set)(struct vc_data *, struct console_font *, unsigned int); 21950 int (*con_font_get)(struct vc_data *, struct console_font *); 21951 int (*con_font_default)(struct vc_data *, struct console_font *, char *); 21952 int (*con_resize)(struct vc_data *, unsigned int, unsigned int, unsigned int); 21953 void (*con_set_palette)(struct vc_data *, const unsigned char *); 21954 void (*con_scrolldelta)(struct vc_data *, int); 21955 int (*con_set_origin)(struct vc_data *); 21956 void (*con_save_screen)(struct vc_data *); 21957 u8 (*con_build_attr)(struct vc_data *, u8, enum vc_intensity, bool, bool, bool, bool); 21958 void (*con_invert_region)(struct vc_data *, u16 *, int); 21959 u16 * (*con_screen_pos)(const struct vc_data *, int); 21960 long unsigned int (*con_getxy)(struct vc_data *, long unsigned int, int *, int *); 21961 void (*con_flush_scrollback)(struct vc_data *); 21962 int (*con_debug_enter)(struct vc_data *); 21963 int (*con_debug_leave)(struct vc_data *); 21964 }; 21965 21966 struct vc_state { 21967 unsigned int x; 21968 unsigned int y; 21969 unsigned char color; 21970 unsigned char Gx_charset[2]; 21971 unsigned int charset: 1; 21972 enum vc_intensity intensity; 21973 bool italic; 21974 bool underline; 21975 bool blink; 21976 bool reverse; 21977 }; 21978 21979 struct console_font { 21980 unsigned int width; 21981 unsigned int height; 21982 unsigned int charcount; 21983 unsigned char *data; 21984 }; 21985 21986 struct vt_mode { 21987 char mode; 21988 char waitv; 21989 short int relsig; 21990 short int acqsig; 21991 short int frsig; 21992 }; 21993 21994 struct uni_pagedir; 21995 21996 struct uni_screen; 21997 21998 struct vc_data { 21999 struct tty_port port; 22000 struct vc_state state; 22001 struct vc_state saved_state; 22002 short unsigned int vc_num; 22003 unsigned int vc_cols; 22004 unsigned int vc_rows; 22005 unsigned int vc_size_row; 22006 unsigned int vc_scan_lines; 22007 long unsigned int vc_origin; 22008 long unsigned int vc_scr_end; 22009 long unsigned int vc_visible_origin; 22010 unsigned int vc_top; 22011 unsigned int vc_bottom; 22012 const struct consw *vc_sw; 22013 short unsigned int *vc_screenbuf; 22014 unsigned int vc_screenbuf_size; 22015 unsigned char vc_mode; 22016 unsigned char vc_attr; 22017 unsigned char vc_def_color; 22018 unsigned char vc_ulcolor; 22019 unsigned char vc_itcolor; 22020 unsigned char vc_halfcolor; 22021 unsigned int vc_cursor_type; 22022 short unsigned int vc_complement_mask; 22023 short unsigned int vc_s_complement_mask; 22024 long unsigned int vc_pos; 22025 short unsigned int vc_hi_font_mask; 22026 struct console_font vc_font; 22027 short unsigned int vc_video_erase_char; 22028 unsigned int vc_state; 22029 unsigned int vc_npar; 22030 unsigned int vc_par[16]; 22031 struct vt_mode vt_mode; 22032 struct pid *vt_pid; 22033 int vt_newvt; 22034 wait_queue_head_t paste_wait; 22035 unsigned int vc_disp_ctrl: 1; 22036 unsigned int vc_toggle_meta: 1; 22037 unsigned int vc_decscnm: 1; 22038 unsigned int vc_decom: 1; 22039 unsigned int vc_decawm: 1; 22040 unsigned int vc_deccm: 1; 22041 unsigned int vc_decim: 1; 22042 unsigned int vc_priv: 3; 22043 unsigned int vc_need_wrap: 1; 22044 unsigned int vc_can_do_color: 1; 22045 unsigned int vc_report_mouse: 2; 22046 unsigned char vc_utf: 1; 22047 unsigned char vc_utf_count; 22048 int vc_utf_char; 22049 long unsigned int vc_tab_stop[4]; 22050 unsigned char vc_palette[48]; 22051 short unsigned int *vc_translate; 22052 unsigned int vc_resize_user; 22053 unsigned int vc_bell_pitch; 22054 unsigned int vc_bell_duration; 22055 short unsigned int vc_cur_blink_ms; 22056 struct vc_data **vc_display_fg; 22057 struct uni_pagedir *vc_uni_pagedir; 22058 struct uni_pagedir **vc_uni_pagedir_loc; 22059 struct uni_screen *vc_uni_screen; 22060 }; 22061 22062 struct edd { 22063 unsigned int mbr_signature[16]; 22064 struct edd_info edd_info[6]; 22065 unsigned char mbr_signature_nr; 22066 unsigned char edd_info_nr; 22067 }; 22068 22069 struct setup_data { 22070 __u64 next; 22071 __u32 type; 22072 __u32 len; 22073 __u8 data[0]; 22074 }; 22075 22076 struct setup_indirect { 22077 __u32 type; 22078 __u32 reserved; 22079 __u64 len; 22080 __u64 addr; 22081 }; 22082 22083 enum memblock_flags { 22084 MEMBLOCK_NONE = 0, 22085 MEMBLOCK_HOTPLUG = 1, 22086 MEMBLOCK_MIRROR = 2, 22087 MEMBLOCK_NOMAP = 4, 22088 }; 22089 22090 struct memblock_region { 22091 phys_addr_t base; 22092 phys_addr_t size; 22093 enum memblock_flags flags; 22094 int nid; 22095 }; 22096 22097 struct memblock_type { 22098 long unsigned int cnt; 22099 long unsigned int max; 22100 phys_addr_t total_size; 22101 struct memblock_region *regions; 22102 char *name; 22103 }; 22104 22105 struct memblock { 22106 bool bottom_up; 22107 phys_addr_t current_limit; 22108 struct memblock_type memory; 22109 struct memblock_type reserved; 22110 }; 22111 22112 struct x86_msi_ops { 22113 void (*restore_msi_irqs)(struct pci_dev *); 22114 }; 22115 22116 struct msi_controller { 22117 struct module *owner; 22118 struct device *dev; 22119 struct device_node *of_node; 22120 struct list_head list; 22121 int (*setup_irq)(struct msi_controller *, struct pci_dev *, struct msi_desc *); 22122 int (*setup_irqs)(struct msi_controller *, struct pci_dev *, int, int); 22123 void (*teardown_irq)(struct msi_controller *, unsigned int); 22124 }; 22125 22126 struct legacy_pic { 22127 int nr_legacy_irqs; 22128 struct irq_chip *chip; 22129 void (*mask)(unsigned int); 22130 void (*unmask)(unsigned int); 22131 void (*mask_all)(); 22132 void (*restore_mask)(); 22133 void (*init)(int); 22134 int (*probe)(); 22135 int (*irq_pending)(unsigned int); 22136 void (*make_irq)(unsigned int); 22137 }; 22138 22139 enum jump_label_type { 22140 JUMP_LABEL_NOP = 0, 22141 JUMP_LABEL_JMP = 1, 22142 }; 22143 22144 union text_poke_insn { 22145 u8 text[5]; 22146 struct { 22147 u8 opcode; 22148 s32 disp; 22149 } __attribute__((packed)); 22150 }; 22151 22152 enum { 22153 JL_STATE_START = 0, 22154 JL_STATE_NO_UPDATE = 1, 22155 JL_STATE_UPDATE = 2, 22156 }; 22157 22158 typedef short unsigned int __kernel_old_uid_t; 22159 22160 typedef short unsigned int __kernel_old_gid_t; 22161 22162 typedef struct { 22163 int val[2]; 22164 } __kernel_fsid_t; 22165 22166 typedef __kernel_old_uid_t old_uid_t; 22167 22168 typedef __kernel_old_gid_t old_gid_t; 22169 22170 struct kernel_clone_args { 22171 u64 flags; 22172 int *pidfd; 22173 int *child_tid; 22174 int *parent_tid; 22175 int exit_signal; 22176 long unsigned int stack; 22177 long unsigned int stack_size; 22178 long unsigned int tls; 22179 pid_t *set_tid; 22180 size_t set_tid_size; 22181 int cgroup; 22182 struct cgroup *cgrp; 22183 struct css_set *cset; 22184 }; 22185 22186 struct kstatfs { 22187 long int f_type; 22188 long int f_bsize; 22189 u64 f_blocks; 22190 u64 f_bfree; 22191 u64 f_bavail; 22192 u64 f_files; 22193 u64 f_ffree; 22194 __kernel_fsid_t f_fsid; 22195 long int f_namelen; 22196 long int f_frsize; 22197 long int f_flags; 22198 long int f_spare[4]; 22199 }; 22200 22201 struct stat64 { 22202 long long unsigned int st_dev; 22203 unsigned char __pad0[4]; 22204 unsigned int __st_ino; 22205 unsigned int st_mode; 22206 unsigned int st_nlink; 22207 unsigned int st_uid; 22208 unsigned int st_gid; 22209 long long unsigned int st_rdev; 22210 unsigned char __pad3[4]; 22211 long long int st_size; 22212 unsigned int st_blksize; 22213 long long int st_blocks; 22214 unsigned int st_atime; 22215 unsigned int st_atime_nsec; 22216 unsigned int st_mtime; 22217 unsigned int st_mtime_nsec; 22218 unsigned int st_ctime; 22219 unsigned int st_ctime_nsec; 22220 long long unsigned int st_ino; 22221 } __attribute__((packed)); 22222 22223 struct mmap_arg_struct32 { 22224 unsigned int addr; 22225 unsigned int len; 22226 unsigned int prot; 22227 unsigned int flags; 22228 unsigned int fd; 22229 unsigned int offset; 22230 }; 22231 22232 struct vm_unmapped_area_info { 22233 long unsigned int flags; 22234 long unsigned int length; 22235 long unsigned int low_limit; 22236 long unsigned int high_limit; 22237 long unsigned int align_mask; 22238 long unsigned int align_offset; 22239 }; 22240 22241 enum align_flags { 22242 ALIGN_VA_32 = 1, 22243 ALIGN_VA_64 = 2, 22244 }; 22245 22246 struct va_alignment { 22247 int flags; 22248 long unsigned int mask; 22249 long unsigned int bits; 22250 long: 64; 22251 long: 64; 22252 long: 64; 22253 long: 64; 22254 long: 64; 22255 }; 22256 22257 enum { 22258 MEMREMAP_WB = 1, 22259 MEMREMAP_WT = 2, 22260 MEMREMAP_WC = 4, 22261 MEMREMAP_ENC = 8, 22262 MEMREMAP_DEC = 16, 22263 }; 22264 22265 typedef void (*swap_func_t)(void *, void *, int); 22266 22267 typedef int (*cmp_func_t)(const void *, const void *); 22268 22269 enum { 22270 IORES_DESC_NONE = 0, 22271 IORES_DESC_CRASH_KERNEL = 1, 22272 IORES_DESC_ACPI_TABLES = 2, 22273 IORES_DESC_ACPI_NV_STORAGE = 3, 22274 IORES_DESC_PERSISTENT_MEMORY = 4, 22275 IORES_DESC_PERSISTENT_MEMORY_LEGACY = 5, 22276 IORES_DESC_DEVICE_PRIVATE_MEMORY = 6, 22277 IORES_DESC_RESERVED = 7, 22278 IORES_DESC_SOFT_RESERVED = 8, 22279 }; 22280 22281 struct change_member { 22282 struct e820_entry *entry; 22283 long long unsigned int addr; 22284 }; 22285 22286 struct iommu_fault_param; 22287 22288 struct iommu_fwspec; 22289 22290 struct dev_iommu { 22291 struct mutex lock; 22292 struct iommu_fault_param *fault_param; 22293 struct iommu_fwspec *fwspec; 22294 struct iommu_device *iommu_dev; 22295 void *priv; 22296 }; 22297 22298 struct of_phandle_args { 22299 struct device_node *np; 22300 int args_count; 22301 uint32_t args[16]; 22302 }; 22303 22304 struct iommu_fault_unrecoverable { 22305 __u32 reason; 22306 __u32 flags; 22307 __u32 pasid; 22308 __u32 perm; 22309 __u64 addr; 22310 __u64 fetch_addr; 22311 }; 22312 22313 struct iommu_fault_page_request { 22314 __u32 flags; 22315 __u32 pasid; 22316 __u32 grpid; 22317 __u32 perm; 22318 __u64 addr; 22319 __u64 private_data[2]; 22320 }; 22321 22322 struct iommu_fault { 22323 __u32 type; 22324 __u32 padding; 22325 union { 22326 struct iommu_fault_unrecoverable event; 22327 struct iommu_fault_page_request prm; 22328 __u8 padding2[56]; 22329 }; 22330 }; 22331 22332 struct iommu_page_response { 22333 __u32 argsz; 22334 __u32 version; 22335 __u32 flags; 22336 __u32 pasid; 22337 __u32 grpid; 22338 __u32 code; 22339 }; 22340 22341 struct iommu_inv_addr_info { 22342 __u32 flags; 22343 __u32 archid; 22344 __u64 pasid; 22345 __u64 addr; 22346 __u64 granule_size; 22347 __u64 nb_granules; 22348 }; 22349 22350 struct iommu_inv_pasid_info { 22351 __u32 flags; 22352 __u32 archid; 22353 __u64 pasid; 22354 }; 22355 22356 struct iommu_cache_invalidate_info { 22357 __u32 argsz; 22358 __u32 version; 22359 __u8 cache; 22360 __u8 granularity; 22361 __u8 padding[6]; 22362 union { 22363 struct iommu_inv_pasid_info pasid_info; 22364 struct iommu_inv_addr_info addr_info; 22365 } granu; 22366 }; 22367 22368 struct iommu_gpasid_bind_data_vtd { 22369 __u64 flags; 22370 __u32 pat; 22371 __u32 emt; 22372 }; 22373 22374 struct iommu_gpasid_bind_data { 22375 __u32 argsz; 22376 __u32 version; 22377 __u32 format; 22378 __u32 addr_width; 22379 __u64 flags; 22380 __u64 gpgd; 22381 __u64 hpasid; 22382 __u64 gpasid; 22383 __u8 padding[8]; 22384 union { 22385 struct iommu_gpasid_bind_data_vtd vtd; 22386 } vendor; 22387 }; 22388 22389 typedef int (*iommu_fault_handler_t)(struct iommu_domain *, struct device *, long unsigned int, int, void *); 22390 22391 struct iommu_domain_geometry { 22392 dma_addr_t aperture_start; 22393 dma_addr_t aperture_end; 22394 bool force_aperture; 22395 }; 22396 22397 struct iommu_domain { 22398 unsigned int type; 22399 const struct iommu_ops *ops; 22400 long unsigned int pgsize_bitmap; 22401 iommu_fault_handler_t handler; 22402 void *handler_token; 22403 struct iommu_domain_geometry geometry; 22404 void *iova_cookie; 22405 }; 22406 22407 typedef int (*iommu_dev_fault_handler_t)(struct iommu_fault *, void *); 22408 22409 enum iommu_resv_type { 22410 IOMMU_RESV_DIRECT = 0, 22411 IOMMU_RESV_DIRECT_RELAXABLE = 1, 22412 IOMMU_RESV_RESERVED = 2, 22413 IOMMU_RESV_MSI = 3, 22414 IOMMU_RESV_SW_MSI = 4, 22415 }; 22416 22417 struct iommu_resv_region { 22418 struct list_head list; 22419 phys_addr_t start; 22420 size_t length; 22421 int prot; 22422 enum iommu_resv_type type; 22423 }; 22424 22425 struct iommu_iotlb_gather { 22426 long unsigned int start; 22427 long unsigned int end; 22428 size_t pgsize; 22429 struct page *freelist; 22430 }; 22431 22432 struct iommu_device { 22433 struct list_head list; 22434 const struct iommu_ops *ops; 22435 struct fwnode_handle *fwnode; 22436 struct device *dev; 22437 }; 22438 22439 struct iommu_sva { 22440 struct device *dev; 22441 }; 22442 22443 struct iommu_fault_event { 22444 struct iommu_fault fault; 22445 struct list_head list; 22446 }; 22447 22448 struct iommu_fault_param { 22449 iommu_dev_fault_handler_t handler; 22450 void *data; 22451 struct list_head faults; 22452 struct mutex lock; 22453 }; 22454 22455 struct iommu_fwspec { 22456 const struct iommu_ops *ops; 22457 struct fwnode_handle *iommu_fwnode; 22458 u32 flags; 22459 u32 num_pasid_bits; 22460 unsigned int num_ids; 22461 u32 ids[0]; 22462 }; 22463 22464 enum dmi_field { 22465 DMI_NONE = 0, 22466 DMI_BIOS_VENDOR = 1, 22467 DMI_BIOS_VERSION = 2, 22468 DMI_BIOS_DATE = 3, 22469 DMI_BIOS_RELEASE = 4, 22470 DMI_EC_FIRMWARE_RELEASE = 5, 22471 DMI_SYS_VENDOR = 6, 22472 DMI_PRODUCT_NAME = 7, 22473 DMI_PRODUCT_VERSION = 8, 22474 DMI_PRODUCT_SERIAL = 9, 22475 DMI_PRODUCT_UUID = 10, 22476 DMI_PRODUCT_SKU = 11, 22477 DMI_PRODUCT_FAMILY = 12, 22478 DMI_BOARD_VENDOR = 13, 22479 DMI_BOARD_NAME = 14, 22480 DMI_BOARD_VERSION = 15, 22481 DMI_BOARD_SERIAL = 16, 22482 DMI_BOARD_ASSET_TAG = 17, 22483 DMI_CHASSIS_VENDOR = 18, 22484 DMI_CHASSIS_TYPE = 19, 22485 DMI_CHASSIS_VERSION = 20, 22486 DMI_CHASSIS_SERIAL = 21, 22487 DMI_CHASSIS_ASSET_TAG = 22, 22488 DMI_STRING_MAX = 23, 22489 DMI_OEM_STRING = 24, 22490 }; 22491 22492 struct acpi_device; 22493 22494 struct pci_sysdata { 22495 int domain; 22496 int node; 22497 struct acpi_device *companion; 22498 void *iommu; 22499 void *fwnode; 22500 struct pci_dev *vmd_dev; 22501 }; 22502 22503 enum { 22504 NONE_FORCE_HPET_RESUME = 0, 22505 OLD_ICH_FORCE_HPET_RESUME = 1, 22506 ICH_FORCE_HPET_RESUME = 2, 22507 VT8237_FORCE_HPET_RESUME = 3, 22508 NVIDIA_FORCE_HPET_RESUME = 4, 22509 ATI_FORCE_HPET_RESUME = 5, 22510 }; 22511 22512 enum meminit_context { 22513 MEMINIT_EARLY = 0, 22514 MEMINIT_HOTPLUG = 1, 22515 }; 22516 22517 struct cpu { 22518 int node_id; 22519 int hotpluggable; 22520 struct device dev; 22521 }; 22522 22523 struct x86_cpu { 22524 struct cpu cpu; 22525 }; 22526 22527 struct debugfs_blob_wrapper { 22528 void *data; 22529 long unsigned int size; 22530 }; 22531 22532 struct setup_data_node { 22533 u64 paddr; 22534 u32 type; 22535 u32 len; 22536 }; 22537 22538 struct paravirt_patch_site { 22539 u8 *instr; 22540 u8 type; 22541 u8 len; 22542 }; 22543 22544 struct die_args { 22545 struct pt_regs *regs; 22546 const char *str; 22547 long int err; 22548 int trapnr; 22549 int signr; 22550 }; 22551 22552 struct smp_alt_module { 22553 struct module *mod; 22554 char *name; 22555 const s32 *locks; 22556 const s32 *locks_end; 22557 u8 *text; 22558 u8 *text_end; 22559 struct list_head next; 22560 }; 22561 22562 typedef struct { 22563 struct mm_struct *mm; 22564 } temp_mm_state_t; 22565 22566 struct text_poke_loc { 22567 s32 rel_addr; 22568 s32 rel32; 22569 u8 opcode; 22570 const u8 text[5]; 22571 u8 old; 22572 }; 22573 22574 struct bp_patching_desc { 22575 struct text_poke_loc *vec; 22576 int nr_entries; 22577 atomic_t refs; 22578 }; 22579 22580 enum { 22581 HW_BREAKPOINT_LEN_1 = 1, 22582 HW_BREAKPOINT_LEN_2 = 2, 22583 HW_BREAKPOINT_LEN_3 = 3, 22584 HW_BREAKPOINT_LEN_4 = 4, 22585 HW_BREAKPOINT_LEN_5 = 5, 22586 HW_BREAKPOINT_LEN_6 = 6, 22587 HW_BREAKPOINT_LEN_7 = 7, 22588 HW_BREAKPOINT_LEN_8 = 8, 22589 }; 22590 22591 enum { 22592 HW_BREAKPOINT_EMPTY = 0, 22593 HW_BREAKPOINT_R = 1, 22594 HW_BREAKPOINT_W = 2, 22595 HW_BREAKPOINT_RW = 3, 22596 HW_BREAKPOINT_X = 4, 22597 HW_BREAKPOINT_INVALID = 7, 22598 }; 22599 22600 typedef unsigned int u_int; 22601 22602 typedef long long unsigned int cycles_t; 22603 22604 struct system_counterval_t { 22605 u64 cycles; 22606 struct clocksource *cs; 22607 }; 22608 22609 typedef struct { 22610 seqcount_t seqcount; 22611 } seqcount_latch_t; 22612 22613 enum cpufreq_table_sorting { 22614 CPUFREQ_TABLE_UNSORTED = 0, 22615 CPUFREQ_TABLE_SORTED_ASCENDING = 1, 22616 CPUFREQ_TABLE_SORTED_DESCENDING = 2, 22617 }; 22618 22619 struct cpufreq_cpuinfo { 22620 unsigned int max_freq; 22621 unsigned int min_freq; 22622 unsigned int transition_latency; 22623 }; 22624 22625 struct clk; 22626 22627 struct cpufreq_governor; 22628 22629 struct cpufreq_frequency_table; 22630 22631 struct cpufreq_stats; 22632 22633 struct thermal_cooling_device; 22634 22635 struct cpufreq_policy { 22636 cpumask_var_t cpus; 22637 cpumask_var_t related_cpus; 22638 cpumask_var_t real_cpus; 22639 unsigned int shared_type; 22640 unsigned int cpu; 22641 struct clk *clk; 22642 struct cpufreq_cpuinfo cpuinfo; 22643 unsigned int min; 22644 unsigned int max; 22645 unsigned int cur; 22646 unsigned int suspend_freq; 22647 unsigned int policy; 22648 unsigned int last_policy; 22649 struct cpufreq_governor *governor; 22650 void *governor_data; 22651 char last_governor[16]; 22652 struct work_struct update; 22653 struct freq_constraints constraints; 22654 struct freq_qos_request *min_freq_req; 22655 struct freq_qos_request *max_freq_req; 22656 struct cpufreq_frequency_table *freq_table; 22657 enum cpufreq_table_sorting freq_table_sorted; 22658 struct list_head policy_list; 22659 struct kobject kobj; 22660 struct completion kobj_unregister; 22661 struct rw_semaphore rwsem; 22662 bool fast_switch_possible; 22663 bool fast_switch_enabled; 22664 bool strict_target; 22665 unsigned int transition_delay_us; 22666 bool dvfs_possible_from_any_cpu; 22667 unsigned int cached_target_freq; 22668 unsigned int cached_resolved_idx; 22669 bool transition_ongoing; 22670 spinlock_t transition_lock; 22671 wait_queue_head_t transition_wait; 22672 struct task_struct *transition_task; 22673 struct cpufreq_stats *stats; 22674 void *driver_data; 22675 struct thermal_cooling_device *cdev; 22676 struct notifier_block nb_min; 22677 struct notifier_block nb_max; 22678 }; 22679 22680 struct cpufreq_governor { 22681 char name[16]; 22682 int (*init)(struct cpufreq_policy *); 22683 void (*exit)(struct cpufreq_policy *); 22684 int (*start)(struct cpufreq_policy *); 22685 void (*stop)(struct cpufreq_policy *); 22686 void (*limits)(struct cpufreq_policy *); 22687 ssize_t (*show_setspeed)(struct cpufreq_policy *, char *); 22688 int (*store_setspeed)(struct cpufreq_policy *, unsigned int); 22689 struct list_head governor_list; 22690 struct module *owner; 22691 u8 flags; 22692 }; 22693 22694 struct cpufreq_frequency_table { 22695 unsigned int flags; 22696 unsigned int driver_data; 22697 unsigned int frequency; 22698 }; 22699 22700 struct cpufreq_freqs { 22701 struct cpufreq_policy *policy; 22702 unsigned int old; 22703 unsigned int new; 22704 u8 flags; 22705 }; 22706 22707 struct cyc2ns { 22708 struct cyc2ns_data data[2]; 22709 seqcount_latch_t seq; 22710 }; 22711 22712 struct x86_cpu_id { 22713 __u16 vendor; 22714 __u16 family; 22715 __u16 model; 22716 __u16 steppings; 22717 __u16 feature; 22718 kernel_ulong_t driver_data; 22719 }; 22720 22721 struct muldiv { 22722 u32 multiplier; 22723 u32 divider; 22724 }; 22725 22726 struct freq_desc { 22727 bool use_msr_plat; 22728 struct muldiv muldiv[16]; 22729 u32 freqs[16]; 22730 u32 mask; 22731 }; 22732 22733 struct dmi_strmatch { 22734 unsigned char slot: 7; 22735 unsigned char exact_match: 1; 22736 char substr[79]; 22737 }; 22738 22739 struct dmi_system_id { 22740 int (*callback)(const struct dmi_system_id *); 22741 const char *ident; 22742 struct dmi_strmatch matches[4]; 22743 void *driver_data; 22744 }; 22745 22746 struct pdev_archdata {}; 22747 22748 struct platform_device_id; 22749 22750 struct mfd_cell; 22751 22752 struct platform_device { 22753 const char *name; 22754 int id; 22755 bool id_auto; 22756 struct device dev; 22757 u64 platform_dma_mask; 22758 struct device_dma_parameters dma_parms; 22759 u32 num_resources; 22760 struct resource *resource; 22761 const struct platform_device_id *id_entry; 22762 char *driver_override; 22763 struct mfd_cell *mfd_cell; 22764 struct pdev_archdata archdata; 22765 }; 22766 22767 struct platform_device_id { 22768 char name[20]; 22769 kernel_ulong_t driver_data; 22770 }; 22771 22772 struct rtc_time { 22773 int tm_sec; 22774 int tm_min; 22775 int tm_hour; 22776 int tm_mday; 22777 int tm_mon; 22778 int tm_year; 22779 int tm_wday; 22780 int tm_yday; 22781 int tm_isdst; 22782 }; 22783 22784 struct pnp_device_id { 22785 __u8 id[8]; 22786 kernel_ulong_t driver_data; 22787 }; 22788 22789 struct pnp_card_device_id { 22790 __u8 id[8]; 22791 kernel_ulong_t driver_data; 22792 struct { 22793 __u8 id[8]; 22794 } devs[8]; 22795 }; 22796 22797 struct acpi_table_header { 22798 char signature[4]; 22799 u32 length; 22800 u8 revision; 22801 u8 checksum; 22802 char oem_id[6]; 22803 char oem_table_id[8]; 22804 u32 oem_revision; 22805 char asl_compiler_id[4]; 22806 u32 asl_compiler_revision; 22807 }; 22808 22809 struct acpi_generic_address { 22810 u8 space_id; 22811 u8 bit_width; 22812 u8 bit_offset; 22813 u8 access_width; 22814 u64 address; 22815 } __attribute__((packed)); 22816 22817 struct acpi_table_fadt { 22818 struct acpi_table_header header; 22819 u32 facs; 22820 u32 dsdt; 22821 u8 model; 22822 u8 preferred_profile; 22823 u16 sci_interrupt; 22824 u32 smi_command; 22825 u8 acpi_enable; 22826 u8 acpi_disable; 22827 u8 s4_bios_request; 22828 u8 pstate_control; 22829 u32 pm1a_event_block; 22830 u32 pm1b_event_block; 22831 u32 pm1a_control_block; 22832 u32 pm1b_control_block; 22833 u32 pm2_control_block; 22834 u32 pm_timer_block; 22835 u32 gpe0_block; 22836 u32 gpe1_block; 22837 u8 pm1_event_length; 22838 u8 pm1_control_length; 22839 u8 pm2_control_length; 22840 u8 pm_timer_length; 22841 u8 gpe0_block_length; 22842 u8 gpe1_block_length; 22843 u8 gpe1_base; 22844 u8 cst_control; 22845 u16 c2_latency; 22846 u16 c3_latency; 22847 u16 flush_size; 22848 u16 flush_stride; 22849 u8 duty_offset; 22850 u8 duty_width; 22851 u8 day_alarm; 22852 u8 month_alarm; 22853 u8 century; 22854 u16 boot_flags; 22855 u8 reserved; 22856 u32 flags; 22857 struct acpi_generic_address reset_register; 22858 u8 reset_value; 22859 u16 arm_boot_flags; 22860 u8 minor_revision; 22861 u64 Xfacs; 22862 u64 Xdsdt; 22863 struct acpi_generic_address xpm1a_event_block; 22864 struct acpi_generic_address xpm1b_event_block; 22865 struct acpi_generic_address xpm1a_control_block; 22866 struct acpi_generic_address xpm1b_control_block; 22867 struct acpi_generic_address xpm2_control_block; 22868 struct acpi_generic_address xpm_timer_block; 22869 struct acpi_generic_address xgpe0_block; 22870 struct acpi_generic_address xgpe1_block; 22871 struct acpi_generic_address sleep_control; 22872 struct acpi_generic_address sleep_status; 22873 u64 hypervisor_id; 22874 } __attribute__((packed)); 22875 22876 struct pnp_protocol; 22877 22878 struct pnp_id; 22879 22880 struct pnp_card { 22881 struct device dev; 22882 unsigned char number; 22883 struct list_head global_list; 22884 struct list_head protocol_list; 22885 struct list_head devices; 22886 struct pnp_protocol *protocol; 22887 struct pnp_id *id; 22888 char name[50]; 22889 unsigned char pnpver; 22890 unsigned char productver; 22891 unsigned int serial; 22892 unsigned char checksum; 22893 struct proc_dir_entry *procdir; 22894 }; 22895 22896 struct pnp_dev; 22897 22898 struct pnp_protocol { 22899 struct list_head protocol_list; 22900 char *name; 22901 int (*get)(struct pnp_dev *); 22902 int (*set)(struct pnp_dev *); 22903 int (*disable)(struct pnp_dev *); 22904 bool (*can_wakeup)(struct pnp_dev *); 22905 int (*suspend)(struct pnp_dev *, pm_message_t); 22906 int (*resume)(struct pnp_dev *); 22907 unsigned char number; 22908 struct device dev; 22909 struct list_head cards; 22910 struct list_head devices; 22911 }; 22912 22913 struct pnp_id { 22914 char id[8]; 22915 struct pnp_id *next; 22916 }; 22917 22918 struct pnp_card_driver; 22919 22920 struct pnp_card_link { 22921 struct pnp_card *card; 22922 struct pnp_card_driver *driver; 22923 void *driver_data; 22924 pm_message_t pm_state; 22925 }; 22926 22927 struct pnp_driver { 22928 const char *name; 22929 const struct pnp_device_id *id_table; 22930 unsigned int flags; 22931 int (*probe)(struct pnp_dev *, const struct pnp_device_id *); 22932 void (*remove)(struct pnp_dev *); 22933 void (*shutdown)(struct pnp_dev *); 22934 int (*suspend)(struct pnp_dev *, pm_message_t); 22935 int (*resume)(struct pnp_dev *); 22936 struct device_driver driver; 22937 }; 22938 22939 struct pnp_card_driver { 22940 struct list_head global_list; 22941 char *name; 22942 const struct pnp_card_device_id *id_table; 22943 unsigned int flags; 22944 int (*probe)(struct pnp_card_link *, const struct pnp_card_device_id *); 22945 void (*remove)(struct pnp_card_link *); 22946 int (*suspend)(struct pnp_card_link *, pm_message_t); 22947 int (*resume)(struct pnp_card_link *); 22948 struct pnp_driver link; 22949 }; 22950 22951 struct pnp_dev { 22952 struct device dev; 22953 u64 dma_mask; 22954 unsigned int number; 22955 int status; 22956 struct list_head global_list; 22957 struct list_head protocol_list; 22958 struct list_head card_list; 22959 struct list_head rdev_list; 22960 struct pnp_protocol *protocol; 22961 struct pnp_card *card; 22962 struct pnp_driver *driver; 22963 struct pnp_card_link *card_link; 22964 struct pnp_id *id; 22965 int active; 22966 int capabilities; 22967 unsigned int num_dependent_sets; 22968 struct list_head resources; 22969 struct list_head options; 22970 char name[50]; 22971 int flags; 22972 struct proc_dir_entry *procent; 22973 void *data; 22974 }; 22975 22976 enum insn_type { 22977 CALL = 0, 22978 NOP = 1, 22979 JMP = 2, 22980 RET = 3, 22981 }; 22982 22983 struct ldttss_desc { 22984 u16 limit0; 22985 u16 base0; 22986 u16 base1: 8; 22987 u16 type: 5; 22988 u16 dpl: 2; 22989 u16 p: 1; 22990 u16 limit1: 4; 22991 u16 zero0: 3; 22992 u16 g: 1; 22993 u16 base2: 8; 22994 u32 base3; 22995 u32 zero1; 22996 }; 22997 22998 typedef struct ldttss_desc tss_desc; 22999 23000 enum idle_boot_override { 23001 IDLE_NO_OVERRIDE = 0, 23002 IDLE_HALT = 1, 23003 IDLE_NOMWAIT = 2, 23004 IDLE_POLL = 3, 23005 }; 23006 23007 enum tick_broadcast_mode { 23008 TICK_BROADCAST_OFF = 0, 23009 TICK_BROADCAST_ON = 1, 23010 TICK_BROADCAST_FORCE = 2, 23011 }; 23012 23013 enum tick_broadcast_state { 23014 TICK_BROADCAST_EXIT = 0, 23015 TICK_BROADCAST_ENTER = 1, 23016 }; 23017 23018 struct inactive_task_frame { 23019 long unsigned int r15; 23020 long unsigned int r14; 23021 long unsigned int r13; 23022 long unsigned int r12; 23023 long unsigned int bx; 23024 long unsigned int bp; 23025 long unsigned int ret_addr; 23026 }; 23027 23028 struct fork_frame { 23029 struct inactive_task_frame frame; 23030 struct pt_regs regs; 23031 }; 23032 23033 struct ssb_state { 23034 struct ssb_state *shared_state; 23035 raw_spinlock_t lock; 23036 unsigned int disable_state; 23037 long unsigned int local_state; 23038 }; 23039 23040 struct trace_event_raw_x86_fpu { 23041 struct trace_entry ent; 23042 struct fpu *fpu; 23043 bool load_fpu; 23044 u64 xfeatures; 23045 u64 xcomp_bv; 23046 char __data[0]; 23047 }; 23048 23049 struct trace_event_data_offsets_x86_fpu {}; 23050 23051 typedef void (*btf_trace_x86_fpu_before_save)(void *, struct fpu *); 23052 23053 typedef void (*btf_trace_x86_fpu_after_save)(void *, struct fpu *); 23054 23055 typedef void (*btf_trace_x86_fpu_before_restore)(void *, struct fpu *); 23056 23057 typedef void (*btf_trace_x86_fpu_after_restore)(void *, struct fpu *); 23058 23059 typedef void (*btf_trace_x86_fpu_regs_activated)(void *, struct fpu *); 23060 23061 typedef void (*btf_trace_x86_fpu_regs_deactivated)(void *, struct fpu *); 23062 23063 typedef void (*btf_trace_x86_fpu_init_state)(void *, struct fpu *); 23064 23065 typedef void (*btf_trace_x86_fpu_dropped)(void *, struct fpu *); 23066 23067 typedef void (*btf_trace_x86_fpu_copy_src)(void *, struct fpu *); 23068 23069 typedef void (*btf_trace_x86_fpu_copy_dst)(void *, struct fpu *); 23070 23071 typedef void (*btf_trace_x86_fpu_xstate_check_failed)(void *, struct fpu *); 23072 23073 struct _fpreg { 23074 __u16 significand[4]; 23075 __u16 exponent; 23076 }; 23077 23078 struct _fpxreg { 23079 __u16 significand[4]; 23080 __u16 exponent; 23081 __u16 padding[3]; 23082 }; 23083 23084 struct user_i387_ia32_struct { 23085 u32 cwd; 23086 u32 swd; 23087 u32 twd; 23088 u32 fip; 23089 u32 fcs; 23090 u32 foo; 23091 u32 fos; 23092 u32 st_space[20]; 23093 }; 23094 23095 struct membuf { 23096 void *p; 23097 size_t left; 23098 }; 23099 23100 struct user_regset; 23101 23102 typedef int user_regset_active_fn(struct task_struct *, const struct user_regset *); 23103 23104 typedef int user_regset_get2_fn(struct task_struct *, const struct user_regset *, struct membuf); 23105 23106 typedef int user_regset_set_fn(struct task_struct *, const struct user_regset *, unsigned int, unsigned int, const void *, const void *); 23107 23108 typedef int user_regset_writeback_fn(struct task_struct *, const struct user_regset *, int); 23109 23110 struct user_regset { 23111 user_regset_get2_fn *regset_get; 23112 user_regset_set_fn *set; 23113 user_regset_active_fn *active; 23114 user_regset_writeback_fn *writeback; 23115 unsigned int n; 23116 unsigned int size; 23117 unsigned int align; 23118 unsigned int bias; 23119 unsigned int core_note_type; 23120 }; 23121 23122 struct _fpx_sw_bytes { 23123 __u32 magic1; 23124 __u32 extended_size; 23125 __u64 xfeatures; 23126 __u32 xstate_size; 23127 __u32 padding[7]; 23128 }; 23129 23130 struct _xmmreg { 23131 __u32 element[4]; 23132 }; 23133 23134 struct _fpstate_32 { 23135 __u32 cw; 23136 __u32 sw; 23137 __u32 tag; 23138 __u32 ipoff; 23139 __u32 cssel; 23140 __u32 dataoff; 23141 __u32 datasel; 23142 struct _fpreg _st[8]; 23143 __u16 status; 23144 __u16 magic; 23145 __u32 _fxsr_env[6]; 23146 __u32 mxcsr; 23147 __u32 reserved; 23148 struct _fpxreg _fxsr_st[8]; 23149 struct _xmmreg _xmm[8]; 23150 union { 23151 __u32 padding1[44]; 23152 __u32 padding[44]; 23153 }; 23154 union { 23155 __u32 padding2[12]; 23156 struct _fpx_sw_bytes sw_reserved; 23157 }; 23158 }; 23159 23160 struct ia32_pasid_state { 23161 u64 pasid; 23162 }; 23163 23164 typedef u32 compat_ulong_t; 23165 23166 struct user_regset_view { 23167 const char *name; 23168 const struct user_regset *regsets; 23169 unsigned int n; 23170 u32 e_flags; 23171 u16 e_machine; 23172 u8 ei_osabi; 23173 }; 23174 23175 enum x86_regset { 23176 REGSET_GENERAL = 0, 23177 REGSET_FP = 1, 23178 REGSET_XFP = 2, 23179 REGSET_IOPERM64 = 2, 23180 REGSET_XSTATE = 3, 23181 REGSET_TLS = 4, 23182 REGSET_IOPERM32 = 5, 23183 }; 23184 23185 struct pt_regs_offset { 23186 const char *name; 23187 int offset; 23188 }; 23189 23190 enum { 23191 TB_SHUTDOWN_REBOOT = 0, 23192 TB_SHUTDOWN_S5 = 1, 23193 TB_SHUTDOWN_S4 = 2, 23194 TB_SHUTDOWN_S3 = 3, 23195 TB_SHUTDOWN_HALT = 4, 23196 TB_SHUTDOWN_WFS = 5, 23197 }; 23198 23199 struct tboot_mac_region { 23200 u64 start; 23201 u32 size; 23202 } __attribute__((packed)); 23203 23204 struct tboot_acpi_generic_address { 23205 u8 space_id; 23206 u8 bit_width; 23207 u8 bit_offset; 23208 u8 access_width; 23209 u64 address; 23210 } __attribute__((packed)); 23211 23212 struct tboot_acpi_sleep_info { 23213 struct tboot_acpi_generic_address pm1a_cnt_blk; 23214 struct tboot_acpi_generic_address pm1b_cnt_blk; 23215 struct tboot_acpi_generic_address pm1a_evt_blk; 23216 struct tboot_acpi_generic_address pm1b_evt_blk; 23217 u16 pm1a_cnt_val; 23218 u16 pm1b_cnt_val; 23219 u64 wakeup_vector; 23220 u32 vector_width; 23221 u64 kernel_s3_resume_vector; 23222 } __attribute__((packed)); 23223 23224 struct tboot { 23225 u8 uuid[16]; 23226 u32 version; 23227 u32 log_addr; 23228 u32 shutdown_entry; 23229 u32 shutdown_type; 23230 struct tboot_acpi_sleep_info acpi_sinfo; 23231 u32 tboot_base; 23232 u32 tboot_size; 23233 u8 num_mac_regions; 23234 struct tboot_mac_region mac_regions[32]; 23235 u8 s3_key[64]; 23236 u8 reserved_align[3]; 23237 u32 num_in_wfs; 23238 } __attribute__((packed)); 23239 23240 struct sha1_hash { 23241 u8 hash[20]; 23242 }; 23243 23244 struct sinit_mle_data { 23245 u32 version; 23246 struct sha1_hash bios_acm_id; 23247 u32 edx_senter_flags; 23248 u64 mseg_valid; 23249 struct sha1_hash sinit_hash; 23250 struct sha1_hash mle_hash; 23251 struct sha1_hash stm_hash; 23252 struct sha1_hash lcp_policy_hash; 23253 u32 lcp_policy_control; 23254 u32 rlp_wakeup_addr; 23255 u32 reserved; 23256 u32 num_mdrs; 23257 u32 mdrs_off; 23258 u32 num_vtd_dmars; 23259 u32 vtd_dmars_off; 23260 } __attribute__((packed)); 23261 23262 typedef bool (*stack_trace_consume_fn)(void *, long unsigned int); 23263 23264 struct stack_frame_user { 23265 const void *next_fp; 23266 long unsigned int ret_addr; 23267 }; 23268 23269 enum cache_type { 23270 CACHE_TYPE_NOCACHE = 0, 23271 CACHE_TYPE_INST = 1, 23272 CACHE_TYPE_DATA = 2, 23273 CACHE_TYPE_SEPARATE = 3, 23274 CACHE_TYPE_UNIFIED = 4, 23275 }; 23276 23277 struct cacheinfo { 23278 unsigned int id; 23279 enum cache_type type; 23280 unsigned int level; 23281 unsigned int coherency_line_size; 23282 unsigned int number_of_sets; 23283 unsigned int ways_of_associativity; 23284 unsigned int physical_line_partition; 23285 unsigned int size; 23286 cpumask_t shared_cpu_map; 23287 unsigned int attributes; 23288 void *fw_token; 23289 bool disable_sysfs; 23290 void *priv; 23291 }; 23292 23293 struct cpu_cacheinfo { 23294 struct cacheinfo *info_list; 23295 unsigned int num_levels; 23296 unsigned int num_leaves; 23297 bool cpu_map_populated; 23298 }; 23299 23300 struct amd_l3_cache { 23301 unsigned int indices; 23302 u8 subcaches[4]; 23303 }; 23304 23305 struct threshold_block { 23306 unsigned int block; 23307 unsigned int bank; 23308 unsigned int cpu; 23309 u32 address; 23310 u16 interrupt_enable; 23311 bool interrupt_capable; 23312 u16 threshold_limit; 23313 struct kobject kobj; 23314 struct list_head miscj; 23315 }; 23316 23317 struct threshold_bank { 23318 struct kobject *kobj; 23319 struct threshold_block *blocks; 23320 refcount_t cpus; 23321 unsigned int shared; 23322 }; 23323 23324 struct amd_northbridge { 23325 struct pci_dev *root; 23326 struct pci_dev *misc; 23327 struct pci_dev *link; 23328 struct amd_l3_cache l3_cache; 23329 struct threshold_bank *bank4; 23330 }; 23331 23332 struct _cache_table { 23333 unsigned char descriptor; 23334 char cache_type; 23335 short int size; 23336 }; 23337 23338 enum _cache_type { 23339 CTYPE_NULL = 0, 23340 CTYPE_DATA = 1, 23341 CTYPE_INST = 2, 23342 CTYPE_UNIFIED = 3, 23343 }; 23344 23345 union _cpuid4_leaf_eax { 23346 struct { 23347 enum _cache_type type: 5; 23348 unsigned int level: 3; 23349 unsigned int is_self_initializing: 1; 23350 unsigned int is_fully_associative: 1; 23351 unsigned int reserved: 4; 23352 unsigned int num_threads_sharing: 12; 23353 unsigned int num_cores_on_die: 6; 23354 } split; 23355 u32 full; 23356 }; 23357 23358 union _cpuid4_leaf_ebx { 23359 struct { 23360 unsigned int coherency_line_size: 12; 23361 unsigned int physical_line_partition: 10; 23362 unsigned int ways_of_associativity: 10; 23363 } split; 23364 u32 full; 23365 }; 23366 23367 union _cpuid4_leaf_ecx { 23368 struct { 23369 unsigned int number_of_sets: 32; 23370 } split; 23371 u32 full; 23372 }; 23373 23374 struct _cpuid4_info_regs { 23375 union _cpuid4_leaf_eax eax; 23376 union _cpuid4_leaf_ebx ebx; 23377 union _cpuid4_leaf_ecx ecx; 23378 unsigned int id; 23379 long unsigned int size; 23380 struct amd_northbridge *nb; 23381 }; 23382 23383 union l1_cache { 23384 struct { 23385 unsigned int line_size: 8; 23386 unsigned int lines_per_tag: 8; 23387 unsigned int assoc: 8; 23388 unsigned int size_in_kb: 8; 23389 }; 23390 unsigned int val; 23391 }; 23392 23393 union l2_cache { 23394 struct { 23395 unsigned int line_size: 8; 23396 unsigned int lines_per_tag: 4; 23397 unsigned int assoc: 4; 23398 unsigned int size_in_kb: 16; 23399 }; 23400 unsigned int val; 23401 }; 23402 23403 union l3_cache { 23404 struct { 23405 unsigned int line_size: 8; 23406 unsigned int lines_per_tag: 4; 23407 unsigned int assoc: 4; 23408 unsigned int res: 2; 23409 unsigned int size_encoded: 14; 23410 }; 23411 unsigned int val; 23412 }; 23413 23414 struct cpuid_bit { 23415 u16 feature; 23416 u8 reg; 23417 u8 bit; 23418 u32 level; 23419 u32 sub_leaf; 23420 }; 23421 23422 enum cpuid_leafs { 23423 CPUID_1_EDX = 0, 23424 CPUID_8000_0001_EDX = 1, 23425 CPUID_8086_0001_EDX = 2, 23426 CPUID_LNX_1 = 3, 23427 CPUID_1_ECX = 4, 23428 CPUID_C000_0001_EDX = 5, 23429 CPUID_8000_0001_ECX = 6, 23430 CPUID_LNX_2 = 7, 23431 CPUID_LNX_3 = 8, 23432 CPUID_7_0_EBX = 9, 23433 CPUID_D_1_EAX = 10, 23434 CPUID_LNX_4 = 11, 23435 CPUID_7_1_EAX = 12, 23436 CPUID_8000_0008_EBX = 13, 23437 CPUID_6_EAX = 14, 23438 CPUID_8000_000A_EDX = 15, 23439 CPUID_7_ECX = 16, 23440 CPUID_8000_0007_EBX = 17, 23441 CPUID_7_EDX = 18, 23442 }; 23443 23444 enum kgdb_bptype { 23445 BP_BREAKPOINT = 0, 23446 BP_HARDWARE_BREAKPOINT = 1, 23447 BP_WRITE_WATCHPOINT = 2, 23448 BP_READ_WATCHPOINT = 3, 23449 BP_ACCESS_WATCHPOINT = 4, 23450 BP_POKE_BREAKPOINT = 5, 23451 }; 23452 23453 struct kgdb_arch { 23454 unsigned char gdb_bpt_instr[1]; 23455 long unsigned int flags; 23456 int (*set_breakpoint)(long unsigned int, char *); 23457 int (*remove_breakpoint)(long unsigned int, char *); 23458 int (*set_hw_breakpoint)(long unsigned int, int, enum kgdb_bptype); 23459 int (*remove_hw_breakpoint)(long unsigned int, int, enum kgdb_bptype); 23460 void (*disable_hw_break)(struct pt_regs *); 23461 void (*remove_all_hw_break)(); 23462 void (*correct_hw_break)(); 23463 void (*enable_nmi)(bool); 23464 }; 23465 23466 struct cpu_dev { 23467 const char *c_vendor; 23468 const char *c_ident[2]; 23469 void (*c_early_init)(struct cpuinfo_x86 *); 23470 void (*c_bsp_init)(struct cpuinfo_x86 *); 23471 void (*c_init)(struct cpuinfo_x86 *); 23472 void (*c_identify)(struct cpuinfo_x86 *); 23473 void (*c_detect_tlb)(struct cpuinfo_x86 *); 23474 int c_x86_vendor; 23475 }; 23476 23477 struct cpuid_dependent_feature { 23478 u32 feature; 23479 u32 level; 23480 }; 23481 23482 enum spectre_v2_mitigation { 23483 SPECTRE_V2_NONE = 0, 23484 SPECTRE_V2_RETPOLINE_GENERIC = 1, 23485 SPECTRE_V2_RETPOLINE_AMD = 2, 23486 SPECTRE_V2_IBRS_ENHANCED = 3, 23487 }; 23488 23489 enum spectre_v2_user_mitigation { 23490 SPECTRE_V2_USER_NONE = 0, 23491 SPECTRE_V2_USER_STRICT = 1, 23492 SPECTRE_V2_USER_STRICT_PREFERRED = 2, 23493 SPECTRE_V2_USER_PRCTL = 3, 23494 SPECTRE_V2_USER_SECCOMP = 4, 23495 }; 23496 23497 enum ssb_mitigation { 23498 SPEC_STORE_BYPASS_NONE = 0, 23499 SPEC_STORE_BYPASS_DISABLE = 1, 23500 SPEC_STORE_BYPASS_PRCTL = 2, 23501 SPEC_STORE_BYPASS_SECCOMP = 3, 23502 }; 23503 23504 enum l1tf_mitigations { 23505 L1TF_MITIGATION_OFF = 0, 23506 L1TF_MITIGATION_FLUSH_NOWARN = 1, 23507 L1TF_MITIGATION_FLUSH = 2, 23508 L1TF_MITIGATION_FLUSH_NOSMT = 3, 23509 L1TF_MITIGATION_FULL = 4, 23510 L1TF_MITIGATION_FULL_FORCE = 5, 23511 }; 23512 23513 enum mds_mitigations { 23514 MDS_MITIGATION_OFF = 0, 23515 MDS_MITIGATION_FULL = 1, 23516 MDS_MITIGATION_VMWERV = 2, 23517 }; 23518 23519 enum cpuhp_smt_control { 23520 CPU_SMT_ENABLED = 0, 23521 CPU_SMT_DISABLED = 1, 23522 CPU_SMT_FORCE_DISABLED = 2, 23523 CPU_SMT_NOT_SUPPORTED = 3, 23524 CPU_SMT_NOT_IMPLEMENTED = 4, 23525 }; 23526 23527 enum vmx_l1d_flush_state { 23528 VMENTER_L1D_FLUSH_AUTO = 0, 23529 VMENTER_L1D_FLUSH_NEVER = 1, 23530 VMENTER_L1D_FLUSH_COND = 2, 23531 VMENTER_L1D_FLUSH_ALWAYS = 3, 23532 VMENTER_L1D_FLUSH_EPT_DISABLED = 4, 23533 VMENTER_L1D_FLUSH_NOT_REQUIRED = 5, 23534 }; 23535 23536 enum taa_mitigations { 23537 TAA_MITIGATION_OFF = 0, 23538 TAA_MITIGATION_UCODE_NEEDED = 1, 23539 TAA_MITIGATION_VERW = 2, 23540 TAA_MITIGATION_TSX_DISABLED = 3, 23541 }; 23542 23543 enum srbds_mitigations { 23544 SRBDS_MITIGATION_OFF = 0, 23545 SRBDS_MITIGATION_UCODE_NEEDED = 1, 23546 SRBDS_MITIGATION_FULL = 2, 23547 SRBDS_MITIGATION_TSX_OFF = 3, 23548 SRBDS_MITIGATION_HYPERVISOR = 4, 23549 }; 23550 23551 enum spectre_v1_mitigation { 23552 SPECTRE_V1_MITIGATION_NONE = 0, 23553 SPECTRE_V1_MITIGATION_AUTO = 1, 23554 }; 23555 23556 enum spectre_v2_mitigation_cmd { 23557 SPECTRE_V2_CMD_NONE = 0, 23558 SPECTRE_V2_CMD_AUTO = 1, 23559 SPECTRE_V2_CMD_FORCE = 2, 23560 SPECTRE_V2_CMD_RETPOLINE = 3, 23561 SPECTRE_V2_CMD_RETPOLINE_GENERIC = 4, 23562 SPECTRE_V2_CMD_RETPOLINE_AMD = 5, 23563 }; 23564 23565 enum spectre_v2_user_cmd { 23566 SPECTRE_V2_USER_CMD_NONE = 0, 23567 SPECTRE_V2_USER_CMD_AUTO = 1, 23568 SPECTRE_V2_USER_CMD_FORCE = 2, 23569 SPECTRE_V2_USER_CMD_PRCTL = 3, 23570 SPECTRE_V2_USER_CMD_PRCTL_IBPB = 4, 23571 SPECTRE_V2_USER_CMD_SECCOMP = 5, 23572 SPECTRE_V2_USER_CMD_SECCOMP_IBPB = 6, 23573 }; 23574 23575 enum ssb_mitigation_cmd { 23576 SPEC_STORE_BYPASS_CMD_NONE = 0, 23577 SPEC_STORE_BYPASS_CMD_AUTO = 1, 23578 SPEC_STORE_BYPASS_CMD_ON = 2, 23579 SPEC_STORE_BYPASS_CMD_PRCTL = 3, 23580 SPEC_STORE_BYPASS_CMD_SECCOMP = 4, 23581 }; 23582 23583 enum hk_flags { 23584 HK_FLAG_TIMER = 1, 23585 HK_FLAG_RCU = 2, 23586 HK_FLAG_MISC = 4, 23587 HK_FLAG_SCHED = 8, 23588 HK_FLAG_TICK = 16, 23589 HK_FLAG_DOMAIN = 32, 23590 HK_FLAG_WQ = 64, 23591 HK_FLAG_MANAGED_IRQ = 128, 23592 HK_FLAG_KTHREAD = 256, 23593 }; 23594 23595 struct aperfmperf_sample { 23596 unsigned int khz; 23597 atomic_t scfpending; 23598 ktime_t time; 23599 u64 aperf; 23600 u64 mperf; 23601 }; 23602 23603 struct cpuid_dep { 23604 unsigned int feature; 23605 unsigned int depends; 23606 }; 23607 23608 enum vmx_feature_leafs { 23609 MISC_FEATURES = 0, 23610 PRIMARY_CTLS = 1, 23611 SECONDARY_CTLS = 2, 23612 NR_VMX_FEATURE_WORDS = 3, 23613 }; 23614 23615 struct _tlb_table { 23616 unsigned char descriptor; 23617 char tlb_type; 23618 unsigned int entries; 23619 char info[128]; 23620 }; 23621 23622 enum tsx_ctrl_states { 23623 TSX_CTRL_ENABLE = 0, 23624 TSX_CTRL_DISABLE = 1, 23625 TSX_CTRL_NOT_SUPPORTED = 2, 23626 }; 23627 23628 enum split_lock_detect_state { 23629 sld_off = 0, 23630 sld_warn = 1, 23631 sld_fatal = 2, 23632 }; 23633 23634 struct sku_microcode { 23635 u8 model; 23636 u8 stepping; 23637 u32 microcode; 23638 }; 23639 23640 struct cpuid_regs { 23641 u32 eax; 23642 u32 ebx; 23643 u32 ecx; 23644 u32 edx; 23645 }; 23646 23647 enum pconfig_target { 23648 INVALID_TARGET = 0, 23649 MKTME_TARGET = 1, 23650 PCONFIG_TARGET_NR = 2, 23651 }; 23652 23653 enum { 23654 PCONFIG_CPUID_SUBLEAF_INVALID = 0, 23655 PCONFIG_CPUID_SUBLEAF_TARGETID = 1, 23656 }; 23657 23658 enum task_work_notify_mode { 23659 TWA_NONE = 0, 23660 TWA_RESUME = 1, 23661 TWA_SIGNAL = 2, 23662 }; 23663 23664 enum mf_flags { 23665 MF_COUNT_INCREASED = 1, 23666 MF_ACTION_REQUIRED = 2, 23667 MF_MUST_KILL = 4, 23668 MF_SOFT_OFFLINE = 8, 23669 }; 23670 23671 struct mce { 23672 __u64 status; 23673 __u64 misc; 23674 __u64 addr; 23675 __u64 mcgstatus; 23676 __u64 ip; 23677 __u64 tsc; 23678 __u64 time; 23679 __u8 cpuvendor; 23680 __u8 inject_flags; 23681 __u8 severity; 23682 __u8 pad; 23683 __u32 cpuid; 23684 __u8 cs; 23685 __u8 bank; 23686 __u8 cpu; 23687 __u8 finished; 23688 __u32 extcpu; 23689 __u32 socketid; 23690 __u32 apicid; 23691 __u64 mcgcap; 23692 __u64 synd; 23693 __u64 ipid; 23694 __u64 ppin; 23695 __u32 microcode; 23696 __u64 kflags; 23697 }; 23698 23699 enum mce_notifier_prios { 23700 MCE_PRIO_LOWEST = 0, 23701 MCE_PRIO_MCELOG = 1, 23702 MCE_PRIO_EDAC = 2, 23703 MCE_PRIO_NFIT = 3, 23704 MCE_PRIO_EXTLOG = 4, 23705 MCE_PRIO_UC = 5, 23706 MCE_PRIO_EARLY = 6, 23707 MCE_PRIO_CEC = 7, 23708 MCE_PRIO_HIGHEST = 7, 23709 }; 23710 23711 typedef long unsigned int mce_banks_t[1]; 23712 23713 enum mcp_flags { 23714 MCP_TIMESTAMP = 1, 23715 MCP_UC = 2, 23716 MCP_DONTLOG = 4, 23717 }; 23718 23719 enum severity_level { 23720 MCE_NO_SEVERITY = 0, 23721 MCE_DEFERRED_SEVERITY = 1, 23722 MCE_UCNA_SEVERITY = 1, 23723 MCE_KEEP_SEVERITY = 2, 23724 MCE_SOME_SEVERITY = 3, 23725 MCE_AO_SEVERITY = 4, 23726 MCE_UC_SEVERITY = 5, 23727 MCE_AR_SEVERITY = 6, 23728 MCE_PANIC_SEVERITY = 7, 23729 }; 23730 23731 struct mce_evt_llist { 23732 struct llist_node llnode; 23733 struct mce mce; 23734 }; 23735 23736 struct mca_config { 23737 bool dont_log_ce; 23738 bool cmci_disabled; 23739 bool ignore_ce; 23740 bool print_all; 23741 __u64 lmce_disabled: 1; 23742 __u64 disabled: 1; 23743 __u64 ser: 1; 23744 __u64 recovery: 1; 23745 __u64 bios_cmci_threshold: 1; 23746 int: 27; 23747 __u64 __reserved: 59; 23748 s8 bootlog; 23749 int tolerant; 23750 int monarch_timeout; 23751 int panic_timeout; 23752 u32 rip_msr; 23753 }; 23754 23755 struct mce_vendor_flags { 23756 __u64 overflow_recov: 1; 23757 __u64 succor: 1; 23758 __u64 smca: 1; 23759 __u64 amd_threshold: 1; 23760 __u64 __reserved_0: 60; 23761 }; 23762 23763 struct mca_msr_regs { 23764 u32 (*ctl)(int); 23765 u32 (*status)(int); 23766 u32 (*addr)(int); 23767 u32 (*misc)(int); 23768 }; 23769 23770 struct trace_event_raw_mce_record { 23771 struct trace_entry ent; 23772 u64 mcgcap; 23773 u64 mcgstatus; 23774 u64 status; 23775 u64 addr; 23776 u64 misc; 23777 u64 synd; 23778 u64 ipid; 23779 u64 ip; 23780 u64 tsc; 23781 u64 walltime; 23782 u32 cpu; 23783 u32 cpuid; 23784 u32 apicid; 23785 u32 socketid; 23786 u8 cs; 23787 u8 bank; 23788 u8 cpuvendor; 23789 char __data[0]; 23790 }; 23791 23792 struct trace_event_data_offsets_mce_record {}; 23793 23794 typedef void (*btf_trace_mce_record)(void *, struct mce *); 23795 23796 struct mce_bank { 23797 u64 ctl; 23798 bool init; 23799 }; 23800 23801 struct mce_bank_dev { 23802 struct device_attribute attr; 23803 char attrname[16]; 23804 u8 bank; 23805 }; 23806 23807 enum handler_type { 23808 EX_HANDLER_NONE = 0, 23809 EX_HANDLER_FAULT = 1, 23810 EX_HANDLER_UACCESS = 2, 23811 EX_HANDLER_OTHER = 3, 23812 }; 23813 23814 enum context { 23815 IN_KERNEL = 1, 23816 IN_USER = 2, 23817 IN_KERNEL_RECOV = 3, 23818 }; 23819 23820 enum ser { 23821 SER_REQUIRED = 1, 23822 NO_SER = 2, 23823 }; 23824 23825 enum exception { 23826 EXCP_CONTEXT = 1, 23827 NO_EXCP = 2, 23828 }; 23829 23830 struct severity { 23831 u64 mask; 23832 u64 result; 23833 unsigned char sev; 23834 unsigned char mcgmask; 23835 unsigned char mcgres; 23836 unsigned char ser; 23837 unsigned char context; 23838 unsigned char excp; 23839 unsigned char covered; 23840 unsigned char cpu_model; 23841 unsigned char cpu_minstepping; 23842 unsigned char bank_lo; 23843 unsigned char bank_hi; 23844 char *msg; 23845 }; 23846 23847 struct gen_pool; 23848 23849 typedef long unsigned int (*genpool_algo_t)(long unsigned int *, long unsigned int, long unsigned int, unsigned int, void *, struct gen_pool *, long unsigned int); 23850 23851 struct gen_pool { 23852 spinlock_t lock; 23853 struct list_head chunks; 23854 int min_alloc_order; 23855 genpool_algo_t algo; 23856 void *data; 23857 const char *name; 23858 }; 23859 23860 enum { 23861 CMCI_STORM_NONE = 0, 23862 CMCI_STORM_ACTIVE = 1, 23863 CMCI_STORM_SUBSIDED = 2, 23864 }; 23865 23866 enum kobject_action { 23867 KOBJ_ADD = 0, 23868 KOBJ_REMOVE = 1, 23869 KOBJ_CHANGE = 2, 23870 KOBJ_MOVE = 3, 23871 KOBJ_ONLINE = 4, 23872 KOBJ_OFFLINE = 5, 23873 KOBJ_BIND = 6, 23874 KOBJ_UNBIND = 7, 23875 }; 23876 23877 enum smca_bank_types { 23878 SMCA_LS = 0, 23879 SMCA_LS_V2 = 1, 23880 SMCA_IF = 2, 23881 SMCA_L2_CACHE = 3, 23882 SMCA_DE = 4, 23883 SMCA_RESERVED = 5, 23884 SMCA_EX = 6, 23885 SMCA_FP = 7, 23886 SMCA_L3_CACHE = 8, 23887 SMCA_CS = 9, 23888 SMCA_CS_V2 = 10, 23889 SMCA_PIE = 11, 23890 SMCA_UMC = 12, 23891 SMCA_PB = 13, 23892 SMCA_PSP = 14, 23893 SMCA_PSP_V2 = 15, 23894 SMCA_SMU = 16, 23895 SMCA_SMU_V2 = 17, 23896 SMCA_MP5 = 18, 23897 SMCA_NBIO = 19, 23898 SMCA_PCIE = 20, 23899 N_SMCA_BANK_TYPES = 21, 23900 }; 23901 23902 struct smca_hwid { 23903 unsigned int bank_type; 23904 u32 hwid_mcatype; 23905 u8 count; 23906 }; 23907 23908 struct smca_bank { 23909 struct smca_hwid *hwid; 23910 u32 id; 23911 u8 sysfs_id; 23912 }; 23913 23914 struct smca_bank_name { 23915 const char *name; 23916 const char *long_name; 23917 }; 23918 23919 struct thresh_restart { 23920 struct threshold_block *b; 23921 int reset; 23922 int set_lvt_off; 23923 int lvt_off; 23924 u16 old_limit; 23925 }; 23926 23927 struct threshold_attr { 23928 struct attribute attr; 23929 ssize_t (*show)(struct threshold_block *, char *); 23930 ssize_t (*store)(struct threshold_block *, const char *, size_t); 23931 }; 23932 23933 struct _thermal_state { 23934 u64 next_check; 23935 u64 last_interrupt_time; 23936 struct delayed_work therm_work; 23937 long unsigned int count; 23938 long unsigned int last_count; 23939 long unsigned int max_time_ms; 23940 long unsigned int total_time_ms; 23941 bool rate_control_active; 23942 bool new_event; 23943 u8 level; 23944 u8 sample_index; 23945 u8 sample_count; 23946 u8 average; 23947 u8 baseline_temp; 23948 u8 temp_samples[3]; 23949 }; 23950 23951 struct thermal_state { 23952 struct _thermal_state core_throttle; 23953 struct _thermal_state core_power_limit; 23954 struct _thermal_state package_throttle; 23955 struct _thermal_state package_power_limit; 23956 struct _thermal_state core_thresh0; 23957 struct _thermal_state core_thresh1; 23958 struct _thermal_state pkg_thresh0; 23959 struct _thermal_state pkg_thresh1; 23960 }; 23961 23962 enum { 23963 CPER_SEV_RECOVERABLE = 0, 23964 CPER_SEV_FATAL = 1, 23965 CPER_SEV_CORRECTED = 2, 23966 CPER_SEV_INFORMATIONAL = 3, 23967 }; 23968 23969 struct cper_record_header { 23970 char signature[4]; 23971 u16 revision; 23972 u32 signature_end; 23973 u16 section_count; 23974 u32 error_severity; 23975 u32 validation_bits; 23976 u32 record_length; 23977 u64 timestamp; 23978 guid_t platform_id; 23979 guid_t partition_id; 23980 guid_t creator_id; 23981 guid_t notification_type; 23982 u64 record_id; 23983 u32 flags; 23984 u64 persistence_information; 23985 u8 reserved[12]; 23986 } __attribute__((packed)); 23987 23988 struct cper_section_descriptor { 23989 u32 section_offset; 23990 u32 section_length; 23991 u16 revision; 23992 u8 validation_bits; 23993 u8 reserved; 23994 u32 flags; 23995 guid_t section_type; 23996 guid_t fru_id; 23997 u32 section_severity; 23998 u8 fru_text[20]; 23999 }; 24000 24001 struct cper_ia_proc_ctx { 24002 u16 reg_ctx_type; 24003 u16 reg_arr_size; 24004 u32 msr_addr; 24005 u64 mm_reg_addr; 24006 }; 24007 24008 struct cper_sec_mem_err { 24009 u64 validation_bits; 24010 u64 error_status; 24011 u64 physical_addr; 24012 u64 physical_addr_mask; 24013 u16 node; 24014 u16 card; 24015 u16 module; 24016 u16 bank; 24017 u16 device; 24018 u16 row; 24019 u16 column; 24020 u16 bit_pos; 24021 u64 requestor_id; 24022 u64 responder_id; 24023 u64 target_id; 24024 u8 error_type; 24025 u8 extended; 24026 u16 rank; 24027 u16 mem_array_handle; 24028 u16 mem_dev_handle; 24029 }; 24030 24031 enum { 24032 GHES_SEV_NO = 0, 24033 GHES_SEV_CORRECTED = 1, 24034 GHES_SEV_RECOVERABLE = 2, 24035 GHES_SEV_PANIC = 3, 24036 }; 24037 24038 struct cper_mce_record { 24039 struct cper_record_header hdr; 24040 struct cper_section_descriptor sec_hdr; 24041 struct mce mce; 24042 }; 24043 24044 struct miscdevice { 24045 int minor; 24046 const char *name; 24047 const struct file_operations *fops; 24048 struct list_head list; 24049 struct device *parent; 24050 struct device *this_device; 24051 const struct attribute_group **groups; 24052 const char *nodename; 24053 umode_t mode; 24054 }; 24055 24056 typedef struct poll_table_struct poll_table; 24057 24058 struct mce_log_buffer { 24059 char signature[12]; 24060 unsigned int len; 24061 unsigned int next; 24062 unsigned int flags; 24063 unsigned int recordlen; 24064 struct mce entry[0]; 24065 }; 24066 24067 typedef int (*cpu_stop_fn_t)(void *); 24068 24069 typedef __u8 mtrr_type; 24070 24071 struct mtrr_ops { 24072 u32 vendor; 24073 u32 use_intel_if; 24074 void (*set)(unsigned int, long unsigned int, long unsigned int, mtrr_type); 24075 void (*set_all)(); 24076 void (*get)(unsigned int, long unsigned int *, long unsigned int *, mtrr_type *); 24077 int (*get_free_region)(long unsigned int, long unsigned int, int); 24078 int (*validate_add_page)(long unsigned int, long unsigned int, unsigned int); 24079 int (*have_wrcomb)(); 24080 }; 24081 24082 struct set_mtrr_data { 24083 long unsigned int smp_base; 24084 long unsigned int smp_size; 24085 unsigned int smp_reg; 24086 mtrr_type smp_type; 24087 }; 24088 24089 struct mtrr_value { 24090 mtrr_type ltype; 24091 long unsigned int lbase; 24092 long unsigned int lsize; 24093 }; 24094 24095 struct proc_ops { 24096 unsigned int proc_flags; 24097 int (*proc_open)(struct inode *, struct file *); 24098 ssize_t (*proc_read)(struct file *, char *, size_t, loff_t *); 24099 ssize_t (*proc_read_iter)(struct kiocb *, struct iov_iter *); 24100 ssize_t (*proc_write)(struct file *, const char *, size_t, loff_t *); 24101 loff_t (*proc_lseek)(struct file *, loff_t, int); 24102 int (*proc_release)(struct inode *, struct file *); 24103 __poll_t (*proc_poll)(struct file *, struct poll_table_struct *); 24104 long int (*proc_ioctl)(struct file *, unsigned int, long unsigned int); 24105 long int (*proc_compat_ioctl)(struct file *, unsigned int, long unsigned int); 24106 int (*proc_mmap)(struct file *, struct vm_area_struct *); 24107 long unsigned int (*proc_get_unmapped_area)(struct file *, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 24108 }; 24109 24110 struct mtrr_sentry { 24111 __u64 base; 24112 __u32 size; 24113 __u32 type; 24114 }; 24115 24116 struct mtrr_gentry { 24117 __u64 base; 24118 __u32 size; 24119 __u32 regnum; 24120 __u32 type; 24121 __u32 _pad; 24122 }; 24123 24124 typedef u32 compat_uint_t; 24125 24126 struct mtrr_sentry32 { 24127 compat_ulong_t base; 24128 compat_uint_t size; 24129 compat_uint_t type; 24130 }; 24131 24132 struct mtrr_gentry32 { 24133 compat_ulong_t regnum; 24134 compat_uint_t base; 24135 compat_uint_t size; 24136 compat_uint_t type; 24137 }; 24138 24139 struct mtrr_var_range { 24140 __u32 base_lo; 24141 __u32 base_hi; 24142 __u32 mask_lo; 24143 __u32 mask_hi; 24144 }; 24145 24146 struct mtrr_state_type { 24147 struct mtrr_var_range var_ranges[256]; 24148 mtrr_type fixed_ranges[88]; 24149 unsigned char enabled; 24150 unsigned char have_fixed; 24151 mtrr_type def_type; 24152 }; 24153 24154 struct fixed_range_block { 24155 int base_msr; 24156 int ranges; 24157 }; 24158 24159 struct var_mtrr_range_state { 24160 long unsigned int base_pfn; 24161 long unsigned int size_pfn; 24162 mtrr_type type; 24163 }; 24164 24165 struct var_mtrr_state { 24166 long unsigned int range_startk; 24167 long unsigned int range_sizek; 24168 long unsigned int chunk_sizek; 24169 long unsigned int gran_sizek; 24170 unsigned int reg; 24171 }; 24172 24173 struct mtrr_cleanup_result { 24174 long unsigned int gran_sizek; 24175 long unsigned int chunk_sizek; 24176 long unsigned int lose_cover_sizek; 24177 unsigned int num_reg; 24178 int bad; 24179 }; 24180 24181 struct subsys_interface { 24182 const char *name; 24183 struct bus_type *subsys; 24184 struct list_head node; 24185 int (*add_dev)(struct device *, struct subsys_interface *); 24186 void (*remove_dev)(struct device *, struct subsys_interface *); 24187 }; 24188 24189 struct property_entry; 24190 24191 struct platform_device_info { 24192 struct device *parent; 24193 struct fwnode_handle *fwnode; 24194 bool of_node_reused; 24195 const char *name; 24196 int id; 24197 const struct resource *res; 24198 unsigned int num_res; 24199 const void *data; 24200 size_t size_data; 24201 u64 dma_mask; 24202 const struct property_entry *properties; 24203 }; 24204 24205 enum dev_prop_type { 24206 DEV_PROP_U8 = 0, 24207 DEV_PROP_U16 = 1, 24208 DEV_PROP_U32 = 2, 24209 DEV_PROP_U64 = 3, 24210 DEV_PROP_STRING = 4, 24211 DEV_PROP_REF = 5, 24212 }; 24213 24214 struct property_entry { 24215 const char *name; 24216 size_t length; 24217 bool is_inline; 24218 enum dev_prop_type type; 24219 union { 24220 const void *pointer; 24221 union { 24222 u8 u8_data[8]; 24223 u16 u16_data[4]; 24224 u32 u32_data[2]; 24225 u64 u64_data[1]; 24226 const char *str[1]; 24227 } value; 24228 }; 24229 }; 24230 24231 struct builtin_fw { 24232 char *name; 24233 void *data; 24234 long unsigned int size; 24235 }; 24236 24237 struct cpio_data { 24238 void *data; 24239 size_t size; 24240 char name[18]; 24241 }; 24242 24243 struct cpu_signature { 24244 unsigned int sig; 24245 unsigned int pf; 24246 unsigned int rev; 24247 }; 24248 24249 enum ucode_state { 24250 UCODE_OK = 0, 24251 UCODE_NEW = 1, 24252 UCODE_UPDATED = 2, 24253 UCODE_NFOUND = 3, 24254 UCODE_ERROR = 4, 24255 }; 24256 24257 struct microcode_ops { 24258 enum ucode_state (*request_microcode_user)(int, const void *, size_t); 24259 enum ucode_state (*request_microcode_fw)(int, struct device *, bool); 24260 void (*microcode_fini_cpu)(int); 24261 enum ucode_state (*apply_microcode)(int); 24262 int (*collect_cpu_info)(int, struct cpu_signature *); 24263 }; 24264 24265 struct ucode_cpu_info { 24266 struct cpu_signature cpu_sig; 24267 int valid; 24268 void *mc; 24269 }; 24270 24271 struct cpu_info_ctx { 24272 struct cpu_signature *cpu_sig; 24273 int err; 24274 }; 24275 24276 struct firmware { 24277 size_t size; 24278 const u8 *data; 24279 void *priv; 24280 }; 24281 24282 struct ucode_patch { 24283 struct list_head plist; 24284 void *data; 24285 u32 patch_id; 24286 u16 equiv_cpu; 24287 }; 24288 24289 struct microcode_header_intel { 24290 unsigned int hdrver; 24291 unsigned int rev; 24292 unsigned int date; 24293 unsigned int sig; 24294 unsigned int cksum; 24295 unsigned int ldrver; 24296 unsigned int pf; 24297 unsigned int datasize; 24298 unsigned int totalsize; 24299 unsigned int reserved[3]; 24300 }; 24301 24302 struct microcode_intel { 24303 struct microcode_header_intel hdr; 24304 unsigned int bits[0]; 24305 }; 24306 24307 struct extended_signature { 24308 unsigned int sig; 24309 unsigned int pf; 24310 unsigned int cksum; 24311 }; 24312 24313 struct extended_sigtable { 24314 unsigned int count; 24315 unsigned int cksum; 24316 unsigned int reserved[3]; 24317 struct extended_signature sigs[0]; 24318 }; 24319 24320 struct equiv_cpu_entry { 24321 u32 installed_cpu; 24322 u32 fixed_errata_mask; 24323 u32 fixed_errata_compare; 24324 u16 equiv_cpu; 24325 u16 res; 24326 }; 24327 24328 struct microcode_header_amd { 24329 u32 data_code; 24330 u32 patch_id; 24331 u16 mc_patch_data_id; 24332 u8 mc_patch_data_len; 24333 u8 init_flag; 24334 u32 mc_patch_data_checksum; 24335 u32 nb_dev_id; 24336 u32 sb_dev_id; 24337 u16 processor_rev_id; 24338 u8 nb_rev_id; 24339 u8 sb_rev_id; 24340 u8 bios_api_rev; 24341 u8 reserved1[3]; 24342 u32 match_reg[8]; 24343 }; 24344 24345 struct microcode_amd { 24346 struct microcode_header_amd hdr; 24347 unsigned int mpb[0]; 24348 }; 24349 24350 struct equiv_cpu_table { 24351 unsigned int num_entries; 24352 struct equiv_cpu_entry *entry; 24353 }; 24354 24355 struct cont_desc { 24356 struct microcode_amd *mc; 24357 u32 cpuid_1_eax; 24358 u32 psize; 24359 u8 *data; 24360 size_t size; 24361 }; 24362 24363 typedef void (*exitcall_t)(); 24364 24365 enum rdt_group_type { 24366 RDTCTRL_GROUP = 0, 24367 RDTMON_GROUP = 1, 24368 RDT_NUM_GROUP = 2, 24369 }; 24370 24371 struct rdtgroup; 24372 24373 struct mongroup { 24374 struct kernfs_node *mon_data_kn; 24375 struct rdtgroup *parent; 24376 struct list_head crdtgrp_list; 24377 u32 rmid; 24378 }; 24379 24380 enum rdtgrp_mode { 24381 RDT_MODE_SHAREABLE = 0, 24382 RDT_MODE_EXCLUSIVE = 1, 24383 RDT_MODE_PSEUDO_LOCKSETUP = 2, 24384 RDT_MODE_PSEUDO_LOCKED = 3, 24385 RDT_NUM_MODES = 4, 24386 }; 24387 24388 struct pseudo_lock_region; 24389 24390 struct rdtgroup { 24391 struct kernfs_node *kn; 24392 struct list_head rdtgroup_list; 24393 u32 closid; 24394 struct cpumask cpu_mask; 24395 int flags; 24396 atomic_t waitcount; 24397 enum rdt_group_type type; 24398 struct mongroup mon; 24399 enum rdtgrp_mode mode; 24400 struct pseudo_lock_region *plr; 24401 }; 24402 24403 struct rdt_cache { 24404 unsigned int cbm_len; 24405 unsigned int min_cbm_bits; 24406 unsigned int cbm_idx_mult; 24407 unsigned int cbm_idx_offset; 24408 unsigned int shareable_bits; 24409 bool arch_has_sparse_bitmaps; 24410 bool arch_has_empty_bitmaps; 24411 bool arch_has_per_cpu_cfg; 24412 }; 24413 24414 enum membw_throttle_mode { 24415 THREAD_THROTTLE_UNDEFINED = 0, 24416 THREAD_THROTTLE_MAX = 1, 24417 THREAD_THROTTLE_PER_THREAD = 2, 24418 }; 24419 24420 struct rdt_membw { 24421 u32 min_bw; 24422 u32 bw_gran; 24423 u32 delay_linear; 24424 bool arch_needs_linear; 24425 enum membw_throttle_mode throttle_mode; 24426 bool mba_sc; 24427 u32 *mb_map; 24428 }; 24429 24430 struct rdt_domain; 24431 24432 struct msr_param; 24433 24434 struct rdt_parse_data; 24435 24436 struct rdt_resource { 24437 int rid; 24438 bool alloc_enabled; 24439 bool mon_enabled; 24440 bool alloc_capable; 24441 bool mon_capable; 24442 char *name; 24443 int num_closid; 24444 int cache_level; 24445 u32 default_ctrl; 24446 unsigned int msr_base; 24447 void (*msr_update)(struct rdt_domain *, struct msr_param *, struct rdt_resource *); 24448 int data_width; 24449 struct list_head domains; 24450 struct rdt_cache cache; 24451 struct rdt_membw membw; 24452 const char *format_str; 24453 int (*parse_ctrlval)(struct rdt_parse_data *, struct rdt_resource *, struct rdt_domain *); 24454 struct list_head evt_list; 24455 int num_rmid; 24456 unsigned int mon_scale; 24457 unsigned int mbm_width; 24458 long unsigned int fflags; 24459 }; 24460 24461 struct mbm_state; 24462 24463 struct rdt_domain { 24464 struct list_head list; 24465 int id; 24466 struct cpumask cpu_mask; 24467 long unsigned int *rmid_busy_llc; 24468 struct mbm_state *mbm_total; 24469 struct mbm_state *mbm_local; 24470 struct delayed_work mbm_over; 24471 struct delayed_work cqm_limbo; 24472 int mbm_work_cpu; 24473 int cqm_work_cpu; 24474 u32 *ctrl_val; 24475 u32 *mbps_val; 24476 u32 new_ctrl; 24477 bool have_new_ctrl; 24478 struct pseudo_lock_region *plr; 24479 }; 24480 24481 struct pseudo_lock_region { 24482 struct rdt_resource *r; 24483 struct rdt_domain *d; 24484 u32 cbm; 24485 wait_queue_head_t lock_thread_wq; 24486 int thread_done; 24487 int cpu; 24488 unsigned int line_size; 24489 unsigned int size; 24490 void *kmem; 24491 unsigned int minor; 24492 struct dentry *debugfs_dir; 24493 struct list_head pm_reqs; 24494 }; 24495 24496 struct mbm_state { 24497 u64 chunks; 24498 u64 prev_msr; 24499 u64 prev_bw_msr; 24500 u32 prev_bw; 24501 u32 delta_bw; 24502 bool delta_comp; 24503 }; 24504 24505 struct msr_param { 24506 struct rdt_resource *res; 24507 int low; 24508 int high; 24509 }; 24510 24511 struct rdt_parse_data { 24512 struct rdtgroup *rdtgrp; 24513 char *buf; 24514 }; 24515 24516 enum { 24517 RDT_RESOURCE_L3 = 0, 24518 RDT_RESOURCE_L3DATA = 1, 24519 RDT_RESOURCE_L3CODE = 2, 24520 RDT_RESOURCE_L2 = 3, 24521 RDT_RESOURCE_L2DATA = 4, 24522 RDT_RESOURCE_L2CODE = 5, 24523 RDT_RESOURCE_MBA = 6, 24524 RDT_NUM_RESOURCES = 7, 24525 }; 24526 24527 union cpuid_0x10_1_eax { 24528 struct { 24529 unsigned int cbm_len: 5; 24530 } split; 24531 unsigned int full; 24532 }; 24533 24534 union cpuid_0x10_3_eax { 24535 struct { 24536 unsigned int max_delay: 12; 24537 } split; 24538 unsigned int full; 24539 }; 24540 24541 union cpuid_0x10_x_edx { 24542 struct { 24543 unsigned int cos_max: 16; 24544 } split; 24545 unsigned int full; 24546 }; 24547 24548 enum { 24549 RDT_FLAG_CMT = 0, 24550 RDT_FLAG_MBM_TOTAL = 1, 24551 RDT_FLAG_MBM_LOCAL = 2, 24552 RDT_FLAG_L3_CAT = 3, 24553 RDT_FLAG_L3_CDP = 4, 24554 RDT_FLAG_L2_CAT = 5, 24555 RDT_FLAG_L2_CDP = 6, 24556 RDT_FLAG_MBA = 7, 24557 }; 24558 24559 struct rdt_options { 24560 char *name; 24561 int flag; 24562 bool force_off; 24563 bool force_on; 24564 }; 24565 24566 typedef unsigned int uint; 24567 24568 struct __va_list_tag { 24569 unsigned int gp_offset; 24570 unsigned int fp_offset; 24571 void *overflow_arg_area; 24572 void *reg_save_area; 24573 }; 24574 24575 typedef __builtin_va_list __gnuc_va_list; 24576 24577 typedef __gnuc_va_list va_list; 24578 24579 enum kernfs_node_type { 24580 KERNFS_DIR = 1, 24581 KERNFS_FILE = 2, 24582 KERNFS_LINK = 4, 24583 }; 24584 24585 enum kernfs_root_flag { 24586 KERNFS_ROOT_CREATE_DEACTIVATED = 1, 24587 KERNFS_ROOT_EXTRA_OPEN_PERM_CHECK = 2, 24588 KERNFS_ROOT_SUPPORT_EXPORTOP = 4, 24589 KERNFS_ROOT_SUPPORT_USER_XATTR = 8, 24590 }; 24591 24592 struct kernfs_fs_context { 24593 struct kernfs_root *root; 24594 void *ns_tag; 24595 long unsigned int magic; 24596 bool new_sb_created; 24597 }; 24598 24599 struct rdt_fs_context { 24600 struct kernfs_fs_context kfc; 24601 bool enable_cdpl2; 24602 bool enable_cdpl3; 24603 bool enable_mba_mbps; 24604 }; 24605 24606 struct mon_evt { 24607 u32 evtid; 24608 char *name; 24609 struct list_head list; 24610 }; 24611 24612 union mon_data_bits { 24613 void *priv; 24614 struct { 24615 unsigned int rid: 10; 24616 unsigned int evtid: 8; 24617 unsigned int domid: 14; 24618 } u; 24619 }; 24620 24621 struct rmid_read { 24622 struct rdtgroup *rgrp; 24623 struct rdt_resource *r; 24624 struct rdt_domain *d; 24625 int evtid; 24626 bool first; 24627 u64 val; 24628 }; 24629 24630 struct rftype { 24631 char *name; 24632 umode_t mode; 24633 const struct kernfs_ops *kf_ops; 24634 long unsigned int flags; 24635 long unsigned int fflags; 24636 int (*seq_show)(struct kernfs_open_file *, struct seq_file *, void *); 24637 ssize_t (*write)(struct kernfs_open_file *, char *, size_t, loff_t); 24638 }; 24639 24640 enum rdt_param { 24641 Opt_cdp = 0, 24642 Opt_cdpl2 = 1, 24643 Opt_mba_mbps = 2, 24644 nr__rdt_params = 3, 24645 }; 24646 24647 struct rmid_entry { 24648 u32 rmid; 24649 int busy; 24650 struct list_head list; 24651 }; 24652 24653 struct mbm_correction_factor_table { 24654 u32 rmidthreshold; 24655 u64 cf; 24656 }; 24657 24658 struct trace_event_raw_pseudo_lock_mem_latency { 24659 struct trace_entry ent; 24660 u32 latency; 24661 char __data[0]; 24662 }; 24663 24664 struct trace_event_raw_pseudo_lock_l2 { 24665 struct trace_entry ent; 24666 u64 l2_hits; 24667 u64 l2_miss; 24668 char __data[0]; 24669 }; 24670 24671 struct trace_event_raw_pseudo_lock_l3 { 24672 struct trace_entry ent; 24673 u64 l3_hits; 24674 u64 l3_miss; 24675 char __data[0]; 24676 }; 24677 24678 struct trace_event_data_offsets_pseudo_lock_mem_latency {}; 24679 24680 struct trace_event_data_offsets_pseudo_lock_l2 {}; 24681 24682 struct trace_event_data_offsets_pseudo_lock_l3 {}; 24683 24684 typedef void (*btf_trace_pseudo_lock_mem_latency)(void *, u32); 24685 24686 typedef void (*btf_trace_pseudo_lock_l2)(void *, u64, u64); 24687 24688 typedef void (*btf_trace_pseudo_lock_l3)(void *, u64, u64); 24689 24690 struct pseudo_lock_pm_req { 24691 struct list_head list; 24692 struct dev_pm_qos_request req; 24693 }; 24694 24695 struct residency_counts { 24696 u64 miss_before; 24697 u64 hits_before; 24698 u64 miss_after; 24699 u64 hits_after; 24700 }; 24701 24702 enum mmu_notifier_event { 24703 MMU_NOTIFY_UNMAP = 0, 24704 MMU_NOTIFY_CLEAR = 1, 24705 MMU_NOTIFY_PROTECTION_VMA = 2, 24706 MMU_NOTIFY_PROTECTION_PAGE = 3, 24707 MMU_NOTIFY_SOFT_DIRTY = 4, 24708 MMU_NOTIFY_RELEASE = 5, 24709 MMU_NOTIFY_MIGRATE = 6, 24710 }; 24711 24712 struct mmu_notifier; 24713 24714 struct mmu_notifier_range; 24715 24716 struct mmu_notifier_ops { 24717 void (*release)(struct mmu_notifier *, struct mm_struct *); 24718 int (*clear_flush_young)(struct mmu_notifier *, struct mm_struct *, long unsigned int, long unsigned int); 24719 int (*clear_young)(struct mmu_notifier *, struct mm_struct *, long unsigned int, long unsigned int); 24720 int (*test_young)(struct mmu_notifier *, struct mm_struct *, long unsigned int); 24721 void (*change_pte)(struct mmu_notifier *, struct mm_struct *, long unsigned int, pte_t); 24722 int (*invalidate_range_start)(struct mmu_notifier *, const struct mmu_notifier_range *); 24723 void (*invalidate_range_end)(struct mmu_notifier *, const struct mmu_notifier_range *); 24724 void (*invalidate_range)(struct mmu_notifier *, struct mm_struct *, long unsigned int, long unsigned int); 24725 struct mmu_notifier * (*alloc_notifier)(struct mm_struct *); 24726 void (*free_notifier)(struct mmu_notifier *); 24727 }; 24728 24729 struct mmu_notifier { 24730 struct hlist_node hlist; 24731 const struct mmu_notifier_ops *ops; 24732 struct mm_struct *mm; 24733 struct callback_head rcu; 24734 unsigned int users; 24735 }; 24736 24737 struct mmu_notifier_range { 24738 struct vm_area_struct *vma; 24739 struct mm_struct *mm; 24740 long unsigned int start; 24741 long unsigned int end; 24742 unsigned int flags; 24743 enum mmu_notifier_event event; 24744 void *migrate_pgmap_owner; 24745 }; 24746 24747 enum sgx_page_type { 24748 SGX_PAGE_TYPE_SECS = 0, 24749 SGX_PAGE_TYPE_TCS = 1, 24750 SGX_PAGE_TYPE_REG = 2, 24751 SGX_PAGE_TYPE_VA = 3, 24752 SGX_PAGE_TYPE_TRIM = 4, 24753 }; 24754 24755 struct sgx_encl_page; 24756 24757 struct sgx_epc_page { 24758 unsigned int section; 24759 unsigned int flags; 24760 struct sgx_encl_page *owner; 24761 struct list_head list; 24762 }; 24763 24764 struct sgx_encl; 24765 24766 struct sgx_va_page; 24767 24768 struct sgx_encl_page { 24769 long unsigned int desc; 24770 long unsigned int vm_max_prot_bits; 24771 struct sgx_epc_page *epc_page; 24772 struct sgx_encl *encl; 24773 struct sgx_va_page *va_page; 24774 }; 24775 24776 struct sgx_encl { 24777 long unsigned int base; 24778 long unsigned int size; 24779 long unsigned int flags; 24780 unsigned int page_cnt; 24781 unsigned int secs_child_cnt; 24782 struct mutex lock; 24783 struct xarray page_array; 24784 struct sgx_encl_page secs; 24785 long unsigned int attributes; 24786 long unsigned int attributes_mask; 24787 cpumask_t cpumask; 24788 struct file *backing; 24789 struct kref refcount; 24790 struct list_head va_pages; 24791 long unsigned int mm_list_version; 24792 struct list_head mm_list; 24793 spinlock_t mm_lock; 24794 struct srcu_struct srcu; 24795 }; 24796 24797 struct sgx_va_page { 24798 struct sgx_epc_page *epc_page; 24799 long unsigned int slots[8]; 24800 struct list_head list; 24801 }; 24802 24803 struct sgx_encl_mm { 24804 struct sgx_encl *encl; 24805 struct mm_struct *mm; 24806 struct list_head list; 24807 struct mmu_notifier mmu_notifier; 24808 }; 24809 24810 typedef unsigned int xa_mark_t; 24811 24812 struct xa_node { 24813 unsigned char shift; 24814 unsigned char offset; 24815 unsigned char count; 24816 unsigned char nr_values; 24817 struct xa_node *parent; 24818 struct xarray *array; 24819 union { 24820 struct list_head private_list; 24821 struct callback_head callback_head; 24822 }; 24823 void *slots[64]; 24824 union { 24825 long unsigned int tags[3]; 24826 long unsigned int marks[3]; 24827 }; 24828 }; 24829 24830 typedef void (*xa_update_node_t)(struct xa_node *); 24831 24832 struct xa_state { 24833 struct xarray *xa; 24834 long unsigned int xa_index; 24835 unsigned char xa_shift; 24836 unsigned char xa_sibs; 24837 unsigned char xa_offset; 24838 unsigned char xa_pad; 24839 struct xa_node *xa_node; 24840 struct xa_node *xa_alloc; 24841 xa_update_node_t xa_update; 24842 }; 24843 24844 enum { 24845 XA_CHECK_SCHED = 4096, 24846 }; 24847 24848 struct sgx_pageinfo { 24849 u64 addr; 24850 u64 contents; 24851 u64 metadata; 24852 u64 secs; 24853 }; 24854 24855 struct sgx_epc_section { 24856 long unsigned int phys_addr; 24857 void *virt_addr; 24858 struct sgx_epc_page *pages; 24859 spinlock_t lock; 24860 struct list_head page_list; 24861 long unsigned int free_cnt; 24862 struct list_head init_laundry_list; 24863 }; 24864 24865 enum sgx_encl_flags { 24866 SGX_ENCL_IOCTL = 1, 24867 SGX_ENCL_DEBUG = 2, 24868 SGX_ENCL_CREATED = 4, 24869 SGX_ENCL_INITIALIZED = 8, 24870 }; 24871 24872 struct sgx_backing { 24873 long unsigned int page_index; 24874 struct page *contents; 24875 struct page *pcmd; 24876 long unsigned int pcmd_offset; 24877 }; 24878 24879 enum sgx_encls_function { 24880 ECREATE = 0, 24881 EADD = 1, 24882 EINIT = 2, 24883 EREMOVE = 3, 24884 EDGBRD = 4, 24885 EDGBWR = 5, 24886 EEXTEND = 6, 24887 ELDU = 8, 24888 EBLOCK = 9, 24889 EPA = 10, 24890 EWB = 11, 24891 ETRACK = 12, 24892 }; 24893 24894 struct crypto_alg; 24895 24896 struct crypto_tfm { 24897 u32 crt_flags; 24898 int node; 24899 void (*exit)(struct crypto_tfm *); 24900 struct crypto_alg *__crt_alg; 24901 void *__crt_ctx[0]; 24902 }; 24903 24904 struct cipher_alg { 24905 unsigned int cia_min_keysize; 24906 unsigned int cia_max_keysize; 24907 int (*cia_setkey)(struct crypto_tfm *, const u8 *, unsigned int); 24908 void (*cia_encrypt)(struct crypto_tfm *, u8 *, const u8 *); 24909 void (*cia_decrypt)(struct crypto_tfm *, u8 *, const u8 *); 24910 }; 24911 24912 struct compress_alg { 24913 int (*coa_compress)(struct crypto_tfm *, const u8 *, unsigned int, u8 *, unsigned int *); 24914 int (*coa_decompress)(struct crypto_tfm *, const u8 *, unsigned int, u8 *, unsigned int *); 24915 }; 24916 24917 struct crypto_istat_aead { 24918 atomic64_t encrypt_cnt; 24919 atomic64_t encrypt_tlen; 24920 atomic64_t decrypt_cnt; 24921 atomic64_t decrypt_tlen; 24922 atomic64_t err_cnt; 24923 }; 24924 24925 struct crypto_istat_akcipher { 24926 atomic64_t encrypt_cnt; 24927 atomic64_t encrypt_tlen; 24928 atomic64_t decrypt_cnt; 24929 atomic64_t decrypt_tlen; 24930 atomic64_t verify_cnt; 24931 atomic64_t sign_cnt; 24932 atomic64_t err_cnt; 24933 }; 24934 24935 struct crypto_istat_cipher { 24936 atomic64_t encrypt_cnt; 24937 atomic64_t encrypt_tlen; 24938 atomic64_t decrypt_cnt; 24939 atomic64_t decrypt_tlen; 24940 atomic64_t err_cnt; 24941 }; 24942 24943 struct crypto_istat_compress { 24944 atomic64_t compress_cnt; 24945 atomic64_t compress_tlen; 24946 atomic64_t decompress_cnt; 24947 atomic64_t decompress_tlen; 24948 atomic64_t err_cnt; 24949 }; 24950 24951 struct crypto_istat_hash { 24952 atomic64_t hash_cnt; 24953 atomic64_t hash_tlen; 24954 atomic64_t err_cnt; 24955 }; 24956 24957 struct crypto_istat_kpp { 24958 atomic64_t setsecret_cnt; 24959 atomic64_t generate_public_key_cnt; 24960 atomic64_t compute_shared_secret_cnt; 24961 atomic64_t err_cnt; 24962 }; 24963 24964 struct crypto_istat_rng { 24965 atomic64_t generate_cnt; 24966 atomic64_t generate_tlen; 24967 atomic64_t seed_cnt; 24968 atomic64_t err_cnt; 24969 }; 24970 24971 struct crypto_type; 24972 24973 struct crypto_alg { 24974 struct list_head cra_list; 24975 struct list_head cra_users; 24976 u32 cra_flags; 24977 unsigned int cra_blocksize; 24978 unsigned int cra_ctxsize; 24979 unsigned int cra_alignmask; 24980 int cra_priority; 24981 refcount_t cra_refcnt; 24982 char cra_name[128]; 24983 char cra_driver_name[128]; 24984 const struct crypto_type *cra_type; 24985 union { 24986 struct cipher_alg cipher; 24987 struct compress_alg compress; 24988 } cra_u; 24989 int (*cra_init)(struct crypto_tfm *); 24990 void (*cra_exit)(struct crypto_tfm *); 24991 void (*cra_destroy)(struct crypto_alg *); 24992 struct module *cra_module; 24993 union { 24994 struct crypto_istat_aead aead; 24995 struct crypto_istat_akcipher akcipher; 24996 struct crypto_istat_cipher cipher; 24997 struct crypto_istat_compress compress; 24998 struct crypto_istat_hash hash; 24999 struct crypto_istat_rng rng; 25000 struct crypto_istat_kpp kpp; 25001 } stats; 25002 }; 25003 25004 struct crypto_instance; 25005 25006 struct crypto_type { 25007 unsigned int (*ctxsize)(struct crypto_alg *, u32, u32); 25008 unsigned int (*extsize)(struct crypto_alg *); 25009 int (*init)(struct crypto_tfm *, u32, u32); 25010 int (*init_tfm)(struct crypto_tfm *); 25011 void (*show)(struct seq_file *, struct crypto_alg *); 25012 int (*report)(struct sk_buff *, struct crypto_alg *); 25013 void (*free)(struct crypto_instance *); 25014 unsigned int type; 25015 unsigned int maskclear; 25016 unsigned int maskset; 25017 unsigned int tfmsize; 25018 }; 25019 25020 struct crypto_shash; 25021 25022 struct shash_desc { 25023 struct crypto_shash *tfm; 25024 void *__ctx[0]; 25025 }; 25026 25027 struct crypto_shash { 25028 unsigned int descsize; 25029 struct crypto_tfm base; 25030 }; 25031 25032 enum sgx_page_flags { 25033 SGX_PAGE_MEASURE = 1, 25034 }; 25035 25036 struct sgx_enclave_create { 25037 __u64 src; 25038 }; 25039 25040 struct sgx_enclave_add_pages { 25041 __u64 src; 25042 __u64 offset; 25043 __u64 length; 25044 __u64 secinfo; 25045 __u64 flags; 25046 __u64 count; 25047 }; 25048 25049 struct sgx_enclave_init { 25050 __u64 sigstruct; 25051 }; 25052 25053 struct sgx_enclave_provision { 25054 __u64 fd; 25055 }; 25056 25057 enum sgx_return_code { 25058 SGX_NOT_TRACKED = 11, 25059 SGX_INVALID_EINITTOKEN = 16, 25060 SGX_UNMASKED_EVENT = 128, 25061 }; 25062 25063 enum sgx_attribute { 25064 SGX_ATTR_INIT = 1, 25065 SGX_ATTR_DEBUG = 2, 25066 SGX_ATTR_MODE64BIT = 4, 25067 SGX_ATTR_PROVISIONKEY = 16, 25068 SGX_ATTR_EINITTOKENKEY = 32, 25069 SGX_ATTR_KSS = 128, 25070 }; 25071 25072 struct sgx_secs { 25073 u64 size; 25074 u64 base; 25075 u32 ssa_frame_size; 25076 u32 miscselect; 25077 u8 reserved1[24]; 25078 u64 attributes; 25079 u64 xfrm; 25080 u32 mrenclave[8]; 25081 u8 reserved2[32]; 25082 u32 mrsigner[8]; 25083 u8 reserved3[32]; 25084 u32 config_id[16]; 25085 u16 isv_prod_id; 25086 u16 isv_svn; 25087 u16 config_svn; 25088 u8 reserved4[3834]; 25089 }; 25090 25091 enum sgx_secinfo_flags { 25092 SGX_SECINFO_R = 1, 25093 SGX_SECINFO_W = 2, 25094 SGX_SECINFO_X = 4, 25095 SGX_SECINFO_SECS = 0, 25096 SGX_SECINFO_TCS = 256, 25097 SGX_SECINFO_REG = 512, 25098 SGX_SECINFO_VA = 768, 25099 SGX_SECINFO_TRIM = 1024, 25100 }; 25101 25102 struct sgx_secinfo { 25103 u64 flags; 25104 u8 reserved[56]; 25105 }; 25106 25107 struct sgx_sigstruct_header { 25108 u64 header1[2]; 25109 u32 vendor; 25110 u32 date; 25111 u64 header2[2]; 25112 u32 swdefined; 25113 u8 reserved1[84]; 25114 }; 25115 25116 struct sgx_sigstruct_body { 25117 u32 miscselect; 25118 u32 misc_mask; 25119 u8 reserved2[20]; 25120 u64 attributes; 25121 u64 xfrm; 25122 u64 attributes_mask; 25123 u64 xfrm_mask; 25124 u8 mrenclave[32]; 25125 u8 reserved3[32]; 25126 u16 isvprodid; 25127 u16 isvsvn; 25128 } __attribute__((packed)); 25129 25130 struct sgx_sigstruct { 25131 struct sgx_sigstruct_header header; 25132 u8 modulus[384]; 25133 u32 exponent; 25134 u8 signature[384]; 25135 struct sgx_sigstruct_body body; 25136 u8 reserved4[12]; 25137 u8 q1[384]; 25138 u8 q2[384]; 25139 } __attribute__((packed)); 25140 25141 struct vmcb_seg { 25142 u16 selector; 25143 u16 attrib; 25144 u32 limit; 25145 u64 base; 25146 }; 25147 25148 struct vmcb_save_area { 25149 struct vmcb_seg es; 25150 struct vmcb_seg cs; 25151 struct vmcb_seg ss; 25152 struct vmcb_seg ds; 25153 struct vmcb_seg fs; 25154 struct vmcb_seg gs; 25155 struct vmcb_seg gdtr; 25156 struct vmcb_seg ldtr; 25157 struct vmcb_seg idtr; 25158 struct vmcb_seg tr; 25159 u8 reserved_1[43]; 25160 u8 cpl; 25161 u8 reserved_2[4]; 25162 u64 efer; 25163 u8 reserved_3[104]; 25164 u64 xss; 25165 u64 cr4; 25166 u64 cr3; 25167 u64 cr0; 25168 u64 dr7; 25169 u64 dr6; 25170 u64 rflags; 25171 u64 rip; 25172 u8 reserved_4[88]; 25173 u64 rsp; 25174 u8 reserved_5[24]; 25175 u64 rax; 25176 u64 star; 25177 u64 lstar; 25178 u64 cstar; 25179 u64 sfmask; 25180 u64 kernel_gs_base; 25181 u64 sysenter_cs; 25182 u64 sysenter_esp; 25183 u64 sysenter_eip; 25184 u64 cr2; 25185 u8 reserved_6[32]; 25186 u64 g_pat; 25187 u64 dbgctl; 25188 u64 br_from; 25189 u64 br_to; 25190 u64 last_excp_from; 25191 u64 last_excp_to; 25192 u8 reserved_7[80]; 25193 u32 pkru; 25194 u8 reserved_7a[20]; 25195 u64 reserved_8; 25196 u64 rcx; 25197 u64 rdx; 25198 u64 rbx; 25199 u64 reserved_9; 25200 u64 rbp; 25201 u64 rsi; 25202 u64 rdi; 25203 u64 r8; 25204 u64 r9; 25205 u64 r10; 25206 u64 r11; 25207 u64 r12; 25208 u64 r13; 25209 u64 r14; 25210 u64 r15; 25211 u8 reserved_10[16]; 25212 u64 sw_exit_code; 25213 u64 sw_exit_info_1; 25214 u64 sw_exit_info_2; 25215 u64 sw_scratch; 25216 u8 reserved_11[56]; 25217 u64 xcr0; 25218 u8 valid_bitmap[16]; 25219 u64 x87_state_gpa; 25220 }; 25221 25222 struct ghcb { 25223 struct vmcb_save_area save; 25224 u8 reserved_save[1016]; 25225 u8 shared_buffer[2032]; 25226 u8 reserved_1[10]; 25227 u16 protocol_version; 25228 u32 ghcb_usage; 25229 }; 25230 25231 enum intercept_words { 25232 INTERCEPT_CR = 0, 25233 INTERCEPT_DR = 1, 25234 INTERCEPT_EXCEPTION = 2, 25235 INTERCEPT_WORD3 = 3, 25236 INTERCEPT_WORD4 = 4, 25237 INTERCEPT_WORD5 = 5, 25238 MAX_INTERCEPT = 6, 25239 }; 25240 25241 struct vmware_steal_time { 25242 union { 25243 uint64_t clock; 25244 struct { 25245 uint32_t clock_low; 25246 uint32_t clock_high; 25247 }; 25248 }; 25249 uint64_t reserved[7]; 25250 }; 25251 25252 struct mpc_intsrc { 25253 unsigned char type; 25254 unsigned char irqtype; 25255 short unsigned int irqflag; 25256 unsigned char srcbus; 25257 unsigned char srcbusirq; 25258 unsigned char dstapic; 25259 unsigned char dstirq; 25260 }; 25261 25262 enum mp_irq_source_types { 25263 mp_INT = 0, 25264 mp_NMI = 1, 25265 mp_SMI = 2, 25266 mp_ExtINT = 3, 25267 }; 25268 25269 typedef u64 acpi_io_address; 25270 25271 typedef u64 acpi_physical_address; 25272 25273 typedef char *acpi_string; 25274 25275 typedef void *acpi_handle; 25276 25277 typedef u32 acpi_object_type; 25278 25279 typedef u8 acpi_adr_space_type; 25280 25281 union acpi_object { 25282 acpi_object_type type; 25283 struct { 25284 acpi_object_type type; 25285 u64 value; 25286 } integer; 25287 struct { 25288 acpi_object_type type; 25289 u32 length; 25290 char *pointer; 25291 } string; 25292 struct { 25293 acpi_object_type type; 25294 u32 length; 25295 u8 *pointer; 25296 } buffer; 25297 struct { 25298 acpi_object_type type; 25299 u32 count; 25300 union acpi_object *elements; 25301 } package; 25302 struct { 25303 acpi_object_type type; 25304 acpi_object_type actual_type; 25305 acpi_handle handle; 25306 } reference; 25307 struct { 25308 acpi_object_type type; 25309 u32 proc_id; 25310 acpi_io_address pblk_address; 25311 u32 pblk_length; 25312 } processor; 25313 struct { 25314 acpi_object_type type; 25315 u32 system_level; 25316 u32 resource_order; 25317 } power_resource; 25318 }; 25319 25320 struct acpi_object_list { 25321 u32 count; 25322 union acpi_object *pointer; 25323 }; 25324 25325 struct acpi_subtable_header { 25326 u8 type; 25327 u8 length; 25328 }; 25329 25330 struct acpi_table_boot { 25331 struct acpi_table_header header; 25332 u8 cmos_index; 25333 u8 reserved[3]; 25334 }; 25335 25336 struct acpi_hmat_structure { 25337 u16 type; 25338 u16 reserved; 25339 u32 length; 25340 }; 25341 25342 struct acpi_table_hpet { 25343 struct acpi_table_header header; 25344 u32 id; 25345 struct acpi_generic_address address; 25346 u8 sequence; 25347 u16 minimum_tick; 25348 u8 flags; 25349 } __attribute__((packed)); 25350 25351 struct acpi_table_madt { 25352 struct acpi_table_header header; 25353 u32 address; 25354 u32 flags; 25355 }; 25356 25357 enum acpi_madt_type { 25358 ACPI_MADT_TYPE_LOCAL_APIC = 0, 25359 ACPI_MADT_TYPE_IO_APIC = 1, 25360 ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2, 25361 ACPI_MADT_TYPE_NMI_SOURCE = 3, 25362 ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4, 25363 ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5, 25364 ACPI_MADT_TYPE_IO_SAPIC = 6, 25365 ACPI_MADT_TYPE_LOCAL_SAPIC = 7, 25366 ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, 25367 ACPI_MADT_TYPE_LOCAL_X2APIC = 9, 25368 ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, 25369 ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, 25370 ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, 25371 ACPI_MADT_TYPE_GENERIC_MSI_FRAME = 13, 25372 ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, 25373 ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15, 25374 ACPI_MADT_TYPE_RESERVED = 16, 25375 }; 25376 25377 struct acpi_madt_local_apic { 25378 struct acpi_subtable_header header; 25379 u8 processor_id; 25380 u8 id; 25381 u32 lapic_flags; 25382 }; 25383 25384 struct acpi_madt_io_apic { 25385 struct acpi_subtable_header header; 25386 u8 id; 25387 u8 reserved; 25388 u32 address; 25389 u32 global_irq_base; 25390 }; 25391 25392 struct acpi_madt_interrupt_override { 25393 struct acpi_subtable_header header; 25394 u8 bus; 25395 u8 source_irq; 25396 u32 global_irq; 25397 u16 inti_flags; 25398 } __attribute__((packed)); 25399 25400 struct acpi_madt_nmi_source { 25401 struct acpi_subtable_header header; 25402 u16 inti_flags; 25403 u32 global_irq; 25404 }; 25405 25406 struct acpi_madt_local_apic_nmi { 25407 struct acpi_subtable_header header; 25408 u8 processor_id; 25409 u16 inti_flags; 25410 u8 lint; 25411 } __attribute__((packed)); 25412 25413 struct acpi_madt_local_apic_override { 25414 struct acpi_subtable_header header; 25415 u16 reserved; 25416 u64 address; 25417 } __attribute__((packed)); 25418 25419 struct acpi_madt_local_sapic { 25420 struct acpi_subtable_header header; 25421 u8 processor_id; 25422 u8 id; 25423 u8 eid; 25424 u8 reserved[3]; 25425 u32 lapic_flags; 25426 u32 uid; 25427 char uid_string[1]; 25428 } __attribute__((packed)); 25429 25430 struct acpi_madt_local_x2apic { 25431 struct acpi_subtable_header header; 25432 u16 reserved; 25433 u32 local_apic_id; 25434 u32 lapic_flags; 25435 u32 uid; 25436 }; 25437 25438 struct acpi_madt_local_x2apic_nmi { 25439 struct acpi_subtable_header header; 25440 u16 inti_flags; 25441 u32 uid; 25442 u8 lint; 25443 u8 reserved[3]; 25444 }; 25445 25446 union acpi_subtable_headers { 25447 struct acpi_subtable_header common; 25448 struct acpi_hmat_structure hmat; 25449 }; 25450 25451 typedef int (*acpi_tbl_table_handler)(struct acpi_table_header *); 25452 25453 typedef int (*acpi_tbl_entry_handler)(union acpi_subtable_headers *, const long unsigned int); 25454 25455 struct acpi_subtable_proc { 25456 int id; 25457 acpi_tbl_entry_handler handler; 25458 int count; 25459 }; 25460 25461 typedef u32 phys_cpuid_t; 25462 25463 enum irq_alloc_type { 25464 X86_IRQ_ALLOC_TYPE_IOAPIC = 1, 25465 X86_IRQ_ALLOC_TYPE_HPET = 2, 25466 X86_IRQ_ALLOC_TYPE_PCI_MSI = 3, 25467 X86_IRQ_ALLOC_TYPE_PCI_MSIX = 4, 25468 X86_IRQ_ALLOC_TYPE_DMAR = 5, 25469 X86_IRQ_ALLOC_TYPE_AMDVI = 6, 25470 X86_IRQ_ALLOC_TYPE_UV = 7, 25471 }; 25472 25473 struct ioapic_alloc_info { 25474 int pin; 25475 int node; 25476 u32 is_level: 1; 25477 u32 active_low: 1; 25478 u32 valid: 1; 25479 }; 25480 25481 struct uv_alloc_info { 25482 int limit; 25483 int blade; 25484 long unsigned int offset; 25485 char *name; 25486 }; 25487 25488 struct irq_alloc_info { 25489 enum irq_alloc_type type; 25490 u32 flags; 25491 u32 devid; 25492 irq_hw_number_t hwirq; 25493 const struct cpumask *mask; 25494 struct msi_desc *desc; 25495 void *data; 25496 union { 25497 struct ioapic_alloc_info ioapic; 25498 struct uv_alloc_info uv; 25499 }; 25500 }; 25501 25502 struct serial_icounter_struct { 25503 int cts; 25504 int dsr; 25505 int rng; 25506 int dcd; 25507 int rx; 25508 int tx; 25509 int frame; 25510 int overrun; 25511 int parity; 25512 int brk; 25513 int buf_overrun; 25514 int reserved[9]; 25515 }; 25516 25517 struct serial_struct { 25518 int type; 25519 int line; 25520 unsigned int port; 25521 int irq; 25522 int flags; 25523 int xmit_fifo_size; 25524 int custom_divisor; 25525 int baud_base; 25526 short unsigned int close_delay; 25527 char io_type; 25528 char reserved_char[1]; 25529 int hub6; 25530 short unsigned int closing_wait; 25531 short unsigned int closing_wait2; 25532 unsigned char *iomem_base; 25533 short unsigned int iomem_reg_shift; 25534 unsigned int port_high; 25535 long unsigned int iomap_base; 25536 }; 25537 25538 enum ioapic_domain_type { 25539 IOAPIC_DOMAIN_INVALID = 0, 25540 IOAPIC_DOMAIN_LEGACY = 1, 25541 IOAPIC_DOMAIN_STRICT = 2, 25542 IOAPIC_DOMAIN_DYNAMIC = 3, 25543 }; 25544 25545 struct ioapic_domain_cfg { 25546 enum ioapic_domain_type type; 25547 const struct irq_domain_ops *ops; 25548 struct device_node *dev; 25549 }; 25550 25551 struct wakeup_header { 25552 u16 video_mode; 25553 u32 pmode_entry; 25554 u16 pmode_cs; 25555 u32 pmode_cr0; 25556 u32 pmode_cr3; 25557 u32 pmode_cr4; 25558 u32 pmode_efer_low; 25559 u32 pmode_efer_high; 25560 u64 pmode_gdt; 25561 u32 pmode_misc_en_low; 25562 u32 pmode_misc_en_high; 25563 u32 pmode_behavior; 25564 u32 realmode_flags; 25565 u32 real_magic; 25566 u32 signature; 25567 } __attribute__((packed)); 25568 25569 struct acpi_hest_header { 25570 u16 type; 25571 u16 source_id; 25572 }; 25573 25574 struct acpi_hest_ia_error_bank { 25575 u8 bank_number; 25576 u8 clear_status_on_init; 25577 u8 status_format; 25578 u8 reserved; 25579 u32 control_register; 25580 u64 control_data; 25581 u32 status_register; 25582 u32 address_register; 25583 u32 misc_register; 25584 } __attribute__((packed)); 25585 25586 struct acpi_hest_notify { 25587 u8 type; 25588 u8 length; 25589 u16 config_write_enable; 25590 u32 poll_interval; 25591 u32 vector; 25592 u32 polling_threshold_value; 25593 u32 polling_threshold_window; 25594 u32 error_threshold_value; 25595 u32 error_threshold_window; 25596 }; 25597 25598 struct acpi_hest_ia_corrected { 25599 struct acpi_hest_header header; 25600 u16 reserved1; 25601 u8 flags; 25602 u8 enabled; 25603 u32 records_to_preallocate; 25604 u32 max_sections_per_record; 25605 struct acpi_hest_notify notify; 25606 u8 num_hardware_banks; 25607 u8 reserved2[3]; 25608 }; 25609 25610 struct cpc_reg { 25611 u8 descriptor; 25612 u16 length; 25613 u8 space_id; 25614 u8 bit_width; 25615 u8 bit_offset; 25616 u8 access_width; 25617 u64 address; 25618 } __attribute__((packed)); 25619 25620 struct acpi_power_register { 25621 u8 descriptor; 25622 u16 length; 25623 u8 space_id; 25624 u8 bit_width; 25625 u8 bit_offset; 25626 u8 access_size; 25627 u64 address; 25628 } __attribute__((packed)); 25629 25630 struct acpi_processor_cx { 25631 u8 valid; 25632 u8 type; 25633 u32 address; 25634 u8 entry_method; 25635 u8 index; 25636 u32 latency; 25637 u8 bm_sts_skip; 25638 char desc[32]; 25639 }; 25640 25641 struct acpi_processor_flags { 25642 u8 power: 1; 25643 u8 performance: 1; 25644 u8 throttling: 1; 25645 u8 limit: 1; 25646 u8 bm_control: 1; 25647 u8 bm_check: 1; 25648 u8 has_cst: 1; 25649 u8 has_lpi: 1; 25650 u8 power_setup_done: 1; 25651 u8 bm_rld_set: 1; 25652 u8 need_hotplug_init: 1; 25653 }; 25654 25655 struct cstate_entry { 25656 struct { 25657 unsigned int eax; 25658 unsigned int ecx; 25659 } states[8]; 25660 }; 25661 25662 enum reboot_mode { 25663 REBOOT_UNDEFINED = 4294967295, 25664 REBOOT_COLD = 0, 25665 REBOOT_WARM = 1, 25666 REBOOT_HARD = 2, 25667 REBOOT_SOFT = 3, 25668 REBOOT_GPIO = 4, 25669 }; 25670 25671 enum reboot_type { 25672 BOOT_TRIPLE = 116, 25673 BOOT_KBD = 107, 25674 BOOT_BIOS = 98, 25675 BOOT_ACPI = 97, 25676 BOOT_EFI = 101, 25677 BOOT_CF9_FORCE = 112, 25678 BOOT_CF9_SAFE = 113, 25679 }; 25680 25681 typedef void (*nmi_shootdown_cb)(int, struct pt_regs *); 25682 25683 enum allow_write_msrs { 25684 MSR_WRITES_ON = 0, 25685 MSR_WRITES_OFF = 1, 25686 MSR_WRITES_DEFAULT = 2, 25687 }; 25688 25689 typedef struct __call_single_data call_single_data_t; 25690 25691 struct cpuid_regs_done { 25692 struct cpuid_regs regs; 25693 struct completion done; 25694 }; 25695 25696 struct intel_early_ops { 25697 resource_size_t (*stolen_size)(int, int, int); 25698 resource_size_t (*stolen_base)(int, int, int, resource_size_t); 25699 }; 25700 25701 struct chipset { 25702 u32 vendor; 25703 u32 device; 25704 u32 class; 25705 u32 class_mask; 25706 u32 flags; 25707 void (*f)(int, int, int); 25708 }; 25709 25710 enum { 25711 SD_BALANCE_NEWIDLE = 1, 25712 SD_BALANCE_EXEC = 2, 25713 SD_BALANCE_FORK = 4, 25714 SD_BALANCE_WAKE = 8, 25715 SD_WAKE_AFFINE = 16, 25716 SD_ASYM_CPUCAPACITY = 32, 25717 SD_SHARE_CPUCAPACITY = 64, 25718 SD_SHARE_PKG_RESOURCES = 128, 25719 SD_SERIALIZE = 256, 25720 SD_ASYM_PACKING = 512, 25721 SD_PREFER_SIBLING = 1024, 25722 SD_OVERLAP = 2048, 25723 SD_NUMA = 4096, 25724 }; 25725 25726 struct sched_domain_shared { 25727 atomic_t ref; 25728 atomic_t nr_busy_cpus; 25729 int has_idle_cores; 25730 }; 25731 25732 struct sched_group; 25733 25734 struct sched_domain { 25735 struct sched_domain *parent; 25736 struct sched_domain *child; 25737 struct sched_group *groups; 25738 long unsigned int min_interval; 25739 long unsigned int max_interval; 25740 unsigned int busy_factor; 25741 unsigned int imbalance_pct; 25742 unsigned int cache_nice_tries; 25743 int nohz_idle; 25744 int flags; 25745 int level; 25746 long unsigned int last_balance; 25747 unsigned int balance_interval; 25748 unsigned int nr_balance_failed; 25749 u64 max_newidle_lb_cost; 25750 long unsigned int next_decay_max_lb_cost; 25751 u64 avg_scan_cost; 25752 unsigned int lb_count[3]; 25753 unsigned int lb_failed[3]; 25754 unsigned int lb_balanced[3]; 25755 unsigned int lb_imbalance[3]; 25756 unsigned int lb_gained[3]; 25757 unsigned int lb_hot_gained[3]; 25758 unsigned int lb_nobusyg[3]; 25759 unsigned int lb_nobusyq[3]; 25760 unsigned int alb_count; 25761 unsigned int alb_failed; 25762 unsigned int alb_pushed; 25763 unsigned int sbe_count; 25764 unsigned int sbe_balanced; 25765 unsigned int sbe_pushed; 25766 unsigned int sbf_count; 25767 unsigned int sbf_balanced; 25768 unsigned int sbf_pushed; 25769 unsigned int ttwu_wake_remote; 25770 unsigned int ttwu_move_affine; 25771 unsigned int ttwu_move_balance; 25772 char *name; 25773 union { 25774 void *private; 25775 struct callback_head rcu; 25776 }; 25777 struct sched_domain_shared *shared; 25778 unsigned int span_weight; 25779 long unsigned int span[0]; 25780 }; 25781 25782 typedef const struct cpumask * (*sched_domain_mask_f)(int); 25783 25784 typedef int (*sched_domain_flags_f)(); 25785 25786 struct sched_group_capacity; 25787 25788 struct sd_data { 25789 struct sched_domain **sd; 25790 struct sched_domain_shared **sds; 25791 struct sched_group **sg; 25792 struct sched_group_capacity **sgc; 25793 }; 25794 25795 struct sched_domain_topology_level { 25796 sched_domain_mask_f mask; 25797 sched_domain_flags_f sd_flags; 25798 int flags; 25799 int numa_level; 25800 struct sd_data data; 25801 char *name; 25802 }; 25803 25804 enum apic_intr_mode_id { 25805 APIC_PIC = 0, 25806 APIC_VIRTUAL_WIRE = 1, 25807 APIC_VIRTUAL_WIRE_NO_CONFIG = 2, 25808 APIC_SYMMETRIC_IO = 3, 25809 APIC_SYMMETRIC_IO_NO_ROUTING = 4, 25810 }; 25811 25812 struct cppc_perf_caps { 25813 u32 guaranteed_perf; 25814 u32 highest_perf; 25815 u32 nominal_perf; 25816 u32 lowest_perf; 25817 u32 lowest_nonlinear_perf; 25818 u32 lowest_freq; 25819 u32 nominal_freq; 25820 }; 25821 25822 struct tsc_adjust { 25823 s64 bootval; 25824 s64 adjusted; 25825 long unsigned int nextcheck; 25826 bool warned; 25827 }; 25828 25829 typedef void * (*pcpu_fc_alloc_fn_t)(unsigned int, size_t, size_t); 25830 25831 typedef void (*pcpu_fc_free_fn_t)(void *, size_t); 25832 25833 typedef void (*pcpu_fc_populate_pte_fn_t)(long unsigned int); 25834 25835 typedef int pcpu_fc_cpu_distance_fn_t(unsigned int, unsigned int); 25836 25837 enum { 25838 DUMP_PREFIX_NONE = 0, 25839 DUMP_PREFIX_ADDRESS = 1, 25840 DUMP_PREFIX_OFFSET = 2, 25841 }; 25842 25843 struct mpf_intel { 25844 char signature[4]; 25845 unsigned int physptr; 25846 unsigned char length; 25847 unsigned char specification; 25848 unsigned char checksum; 25849 unsigned char feature1; 25850 unsigned char feature2; 25851 unsigned char feature3; 25852 unsigned char feature4; 25853 unsigned char feature5; 25854 }; 25855 25856 struct mpc_table { 25857 char signature[4]; 25858 short unsigned int length; 25859 char spec; 25860 char checksum; 25861 char oem[8]; 25862 char productid[12]; 25863 unsigned int oemptr; 25864 short unsigned int oemsize; 25865 short unsigned int oemcount; 25866 unsigned int lapic; 25867 unsigned int reserved; 25868 }; 25869 25870 struct mpc_cpu { 25871 unsigned char type; 25872 unsigned char apicid; 25873 unsigned char apicver; 25874 unsigned char cpuflag; 25875 unsigned int cpufeature; 25876 unsigned int featureflag; 25877 unsigned int reserved[2]; 25878 }; 25879 25880 struct mpc_bus { 25881 unsigned char type; 25882 unsigned char busid; 25883 unsigned char bustype[6]; 25884 }; 25885 25886 struct mpc_ioapic { 25887 unsigned char type; 25888 unsigned char apicid; 25889 unsigned char apicver; 25890 unsigned char flags; 25891 unsigned int apicaddr; 25892 }; 25893 25894 struct mpc_lintsrc { 25895 unsigned char type; 25896 unsigned char irqtype; 25897 short unsigned int irqflag; 25898 unsigned char srcbusid; 25899 unsigned char srcbusirq; 25900 unsigned char destapic; 25901 unsigned char destapiclint; 25902 }; 25903 25904 enum page_cache_mode { 25905 _PAGE_CACHE_MODE_WB = 0, 25906 _PAGE_CACHE_MODE_WC = 1, 25907 _PAGE_CACHE_MODE_UC_MINUS = 2, 25908 _PAGE_CACHE_MODE_UC = 3, 25909 _PAGE_CACHE_MODE_WT = 4, 25910 _PAGE_CACHE_MODE_WP = 5, 25911 _PAGE_CACHE_MODE_NUM = 8, 25912 }; 25913 25914 struct irq_cfg { 25915 unsigned int dest_apicid; 25916 unsigned int vector; 25917 }; 25918 25919 enum { 25920 IRQ_REMAP_XAPIC_MODE = 0, 25921 IRQ_REMAP_X2APIC_MODE = 1, 25922 }; 25923 25924 union apic_ir { 25925 long unsigned int map[4]; 25926 u32 regs[8]; 25927 }; 25928 25929 enum { 25930 X2APIC_OFF = 0, 25931 X2APIC_ON = 1, 25932 X2APIC_DISABLED = 2, 25933 }; 25934 25935 enum { 25936 IRQ_SET_MASK_OK = 0, 25937 IRQ_SET_MASK_OK_NOCOPY = 1, 25938 IRQ_SET_MASK_OK_DONE = 2, 25939 }; 25940 25941 enum { 25942 IRQD_TRIGGER_MASK = 15, 25943 IRQD_SETAFFINITY_PENDING = 256, 25944 IRQD_ACTIVATED = 512, 25945 IRQD_NO_BALANCING = 1024, 25946 IRQD_PER_CPU = 2048, 25947 IRQD_AFFINITY_SET = 4096, 25948 IRQD_LEVEL = 8192, 25949 IRQD_WAKEUP_STATE = 16384, 25950 IRQD_MOVE_PCNTXT = 32768, 25951 IRQD_IRQ_DISABLED = 65536, 25952 IRQD_IRQ_MASKED = 131072, 25953 IRQD_IRQ_INPROGRESS = 262144, 25954 IRQD_WAKEUP_ARMED = 524288, 25955 IRQD_FORWARDED_TO_VCPU = 1048576, 25956 IRQD_AFFINITY_MANAGED = 2097152, 25957 IRQD_IRQ_STARTED = 4194304, 25958 IRQD_MANAGED_SHUTDOWN = 8388608, 25959 IRQD_SINGLE_TARGET = 16777216, 25960 IRQD_DEFAULT_TRIGGER_SET = 33554432, 25961 IRQD_CAN_RESERVE = 67108864, 25962 IRQD_MSI_NOMASK_QUIRK = 134217728, 25963 IRQD_HANDLE_ENFORCE_IRQCTX = 268435456, 25964 IRQD_AFFINITY_ON_ACTIVATE = 536870912, 25965 IRQD_IRQ_ENABLED_ON_SUSPEND = 1073741824, 25966 }; 25967 25968 enum { 25969 IRQCHIP_FWNODE_REAL = 0, 25970 IRQCHIP_FWNODE_NAMED = 1, 25971 IRQCHIP_FWNODE_NAMED_ID = 2, 25972 }; 25973 25974 enum { 25975 X86_IRQ_ALLOC_CONTIGUOUS_VECTORS = 1, 25976 X86_IRQ_ALLOC_LEGACY = 2, 25977 }; 25978 25979 struct apic_chip_data { 25980 struct irq_cfg hw_irq_cfg; 25981 unsigned int vector; 25982 unsigned int prev_vector; 25983 unsigned int cpu; 25984 unsigned int prev_cpu; 25985 unsigned int irq; 25986 struct hlist_node clist; 25987 unsigned int move_in_progress: 1; 25988 unsigned int is_managed: 1; 25989 unsigned int can_reserve: 1; 25990 unsigned int has_reserved: 1; 25991 }; 25992 25993 struct irq_matrix; 25994 25995 enum { 25996 IRQ_TYPE_NONE = 0, 25997 IRQ_TYPE_EDGE_RISING = 1, 25998 IRQ_TYPE_EDGE_FALLING = 2, 25999 IRQ_TYPE_EDGE_BOTH = 3, 26000 IRQ_TYPE_LEVEL_HIGH = 4, 26001 IRQ_TYPE_LEVEL_LOW = 8, 26002 IRQ_TYPE_LEVEL_MASK = 12, 26003 IRQ_TYPE_SENSE_MASK = 15, 26004 IRQ_TYPE_DEFAULT = 15, 26005 IRQ_TYPE_PROBE = 16, 26006 IRQ_LEVEL = 256, 26007 IRQ_PER_CPU = 512, 26008 IRQ_NOPROBE = 1024, 26009 IRQ_NOREQUEST = 2048, 26010 IRQ_NOAUTOEN = 4096, 26011 IRQ_NO_BALANCING = 8192, 26012 IRQ_MOVE_PCNTXT = 16384, 26013 IRQ_NESTED_THREAD = 32768, 26014 IRQ_NOTHREAD = 65536, 26015 IRQ_PER_CPU_DEVID = 131072, 26016 IRQ_IS_POLLED = 262144, 26017 IRQ_DISABLE_UNLAZY = 524288, 26018 IRQ_HIDDEN = 1048576, 26019 }; 26020 26021 enum { 26022 IRQCHIP_SET_TYPE_MASKED = 1, 26023 IRQCHIP_EOI_IF_HANDLED = 2, 26024 IRQCHIP_MASK_ON_SUSPEND = 4, 26025 IRQCHIP_ONOFFLINE_ENABLED = 8, 26026 IRQCHIP_SKIP_SET_WAKE = 16, 26027 IRQCHIP_ONESHOT_SAFE = 32, 26028 IRQCHIP_EOI_THREADED = 64, 26029 IRQCHIP_SUPPORTS_LEVEL_MSI = 128, 26030 IRQCHIP_SUPPORTS_NMI = 256, 26031 IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND = 512, 26032 }; 26033 26034 struct clock_event_device___2; 26035 26036 union IO_APIC_reg_00 { 26037 u32 raw; 26038 struct { 26039 u32 __reserved_2: 14; 26040 u32 LTS: 1; 26041 u32 delivery_type: 1; 26042 u32 __reserved_1: 8; 26043 u32 ID: 8; 26044 } bits; 26045 }; 26046 26047 union IO_APIC_reg_01 { 26048 u32 raw; 26049 struct { 26050 u32 version: 8; 26051 u32 __reserved_2: 7; 26052 u32 PRQ: 1; 26053 u32 entries: 8; 26054 u32 __reserved_1: 8; 26055 } bits; 26056 }; 26057 26058 union IO_APIC_reg_02 { 26059 u32 raw; 26060 struct { 26061 u32 __reserved_2: 24; 26062 u32 arbitration: 4; 26063 u32 __reserved_1: 4; 26064 } bits; 26065 }; 26066 26067 union IO_APIC_reg_03 { 26068 u32 raw; 26069 struct { 26070 u32 boot_DT: 1; 26071 u32 __reserved_1: 31; 26072 } bits; 26073 }; 26074 26075 struct IO_APIC_route_entry { 26076 union { 26077 struct { 26078 u64 vector: 8; 26079 u64 delivery_mode: 3; 26080 u64 dest_mode_logical: 1; 26081 u64 delivery_status: 1; 26082 u64 active_low: 1; 26083 u64 irr: 1; 26084 u64 is_level: 1; 26085 u64 masked: 1; 26086 u64 reserved_0: 15; 26087 u64 reserved_1: 17; 26088 u64 virt_destid_8_14: 7; 26089 u64 destid_0_7: 8; 26090 }; 26091 struct { 26092 u64 ir_shared_0: 8; 26093 u64 ir_zero: 3; 26094 u64 ir_index_15: 1; 26095 u64 ir_shared_1: 5; 26096 u64 ir_reserved_0: 31; 26097 u64 ir_format: 1; 26098 u64 ir_index_0_14: 15; 26099 }; 26100 struct { 26101 u64 w1: 32; 26102 u64 w2: 32; 26103 }; 26104 }; 26105 }; 26106 26107 struct irq_pin_list { 26108 struct list_head list; 26109 int apic; 26110 int pin; 26111 }; 26112 26113 struct mp_chip_data { 26114 struct list_head irq_2_pin; 26115 struct IO_APIC_route_entry entry; 26116 bool is_level; 26117 bool active_low; 26118 bool isa_irq; 26119 u32 count; 26120 }; 26121 26122 struct mp_ioapic_gsi { 26123 u32 gsi_base; 26124 u32 gsi_end; 26125 }; 26126 26127 struct ioapic { 26128 int nr_registers; 26129 struct IO_APIC_route_entry *saved_registers; 26130 struct mpc_ioapic mp_config; 26131 struct mp_ioapic_gsi gsi_config; 26132 struct ioapic_domain_cfg irqdomain_cfg; 26133 struct irq_domain *irqdomain; 26134 struct resource *iomem_res; 26135 }; 26136 26137 struct io_apic { 26138 unsigned int index; 26139 unsigned int unused[3]; 26140 unsigned int data; 26141 unsigned int unused2[11]; 26142 unsigned int eoi; 26143 }; 26144 26145 enum { 26146 IRQ_DOMAIN_FLAG_HIERARCHY = 1, 26147 IRQ_DOMAIN_NAME_ALLOCATED = 2, 26148 IRQ_DOMAIN_FLAG_IPI_PER_CPU = 4, 26149 IRQ_DOMAIN_FLAG_IPI_SINGLE = 8, 26150 IRQ_DOMAIN_FLAG_MSI = 16, 26151 IRQ_DOMAIN_FLAG_MSI_REMAP = 32, 26152 IRQ_DOMAIN_MSI_NOMASK_QUIRK = 64, 26153 IRQ_DOMAIN_FLAG_NONCORE = 65536, 26154 }; 26155 26156 typedef struct irq_alloc_info msi_alloc_info_t; 26157 26158 struct msi_domain_info; 26159 26160 struct msi_domain_ops { 26161 irq_hw_number_t (*get_hwirq)(struct msi_domain_info *, msi_alloc_info_t *); 26162 int (*msi_init)(struct irq_domain *, struct msi_domain_info *, unsigned int, irq_hw_number_t, msi_alloc_info_t *); 26163 void (*msi_free)(struct irq_domain *, struct msi_domain_info *, unsigned int); 26164 int (*msi_check)(struct irq_domain *, struct msi_domain_info *, struct device *); 26165 int (*msi_prepare)(struct irq_domain *, struct device *, int, msi_alloc_info_t *); 26166 void (*msi_finish)(msi_alloc_info_t *, int); 26167 void (*set_desc)(msi_alloc_info_t *, struct msi_desc *); 26168 int (*handle_error)(struct irq_domain *, struct msi_desc *, int); 26169 int (*domain_alloc_irqs)(struct irq_domain *, struct device *, int); 26170 void (*domain_free_irqs)(struct irq_domain *, struct device *); 26171 }; 26172 26173 struct msi_domain_info { 26174 u32 flags; 26175 struct msi_domain_ops *ops; 26176 struct irq_chip *chip; 26177 void *chip_data; 26178 irq_flow_handler_t handler; 26179 void *handler_data; 26180 const char *handler_name; 26181 void *data; 26182 }; 26183 26184 enum { 26185 MSI_FLAG_USE_DEF_DOM_OPS = 1, 26186 MSI_FLAG_USE_DEF_CHIP_OPS = 2, 26187 MSI_FLAG_MULTI_PCI_MSI = 4, 26188 MSI_FLAG_PCI_MSIX = 8, 26189 MSI_FLAG_ACTIVATE_EARLY = 16, 26190 MSI_FLAG_MUST_REACTIVATE = 32, 26191 MSI_FLAG_LEVEL_CAPABLE = 64, 26192 }; 26193 26194 typedef int (*arch_set_vga_state_t)(struct pci_dev *, bool, unsigned int, u32); 26195 26196 struct acpi_device_status { 26197 u32 present: 1; 26198 u32 enabled: 1; 26199 u32 show_in_ui: 1; 26200 u32 functional: 1; 26201 u32 battery_present: 1; 26202 u32 reserved: 27; 26203 }; 26204 26205 struct acpi_device_flags { 26206 u32 dynamic_status: 1; 26207 u32 removable: 1; 26208 u32 ejectable: 1; 26209 u32 power_manageable: 1; 26210 u32 match_driver: 1; 26211 u32 initialized: 1; 26212 u32 visited: 1; 26213 u32 hotplug_notify: 1; 26214 u32 is_dock_station: 1; 26215 u32 of_compatible_ok: 1; 26216 u32 coherent_dma: 1; 26217 u32 cca_seen: 1; 26218 u32 enumeration_by_parent: 1; 26219 u32 reserved: 19; 26220 }; 26221 26222 typedef char acpi_bus_id[8]; 26223 26224 struct acpi_pnp_type { 26225 u32 hardware_id: 1; 26226 u32 bus_address: 1; 26227 u32 platform_id: 1; 26228 u32 reserved: 29; 26229 }; 26230 26231 typedef u64 acpi_bus_address; 26232 26233 typedef char acpi_device_name[40]; 26234 26235 typedef char acpi_device_class[20]; 26236 26237 struct acpi_device_pnp { 26238 acpi_bus_id bus_id; 26239 int instance_no; 26240 struct acpi_pnp_type type; 26241 acpi_bus_address bus_address; 26242 char *unique_id; 26243 struct list_head ids; 26244 acpi_device_name device_name; 26245 acpi_device_class device_class; 26246 union acpi_object *str_obj; 26247 }; 26248 26249 struct acpi_device_power_flags { 26250 u32 explicit_get: 1; 26251 u32 power_resources: 1; 26252 u32 inrush_current: 1; 26253 u32 power_removed: 1; 26254 u32 ignore_parent: 1; 26255 u32 dsw_present: 1; 26256 u32 reserved: 26; 26257 }; 26258 26259 struct acpi_device_power_state { 26260 struct { 26261 u8 valid: 1; 26262 u8 explicit_set: 1; 26263 u8 reserved: 6; 26264 } flags; 26265 int power; 26266 int latency; 26267 struct list_head resources; 26268 }; 26269 26270 struct acpi_device_power { 26271 int state; 26272 struct acpi_device_power_flags flags; 26273 struct acpi_device_power_state states[5]; 26274 }; 26275 26276 struct acpi_device_wakeup_flags { 26277 u8 valid: 1; 26278 u8 notifier_present: 1; 26279 }; 26280 26281 struct acpi_device_wakeup_context { 26282 void (*func)(struct acpi_device_wakeup_context *); 26283 struct device *dev; 26284 }; 26285 26286 struct acpi_device_wakeup { 26287 acpi_handle gpe_device; 26288 u64 gpe_number; 26289 u64 sleep_state; 26290 struct list_head resources; 26291 struct acpi_device_wakeup_flags flags; 26292 struct acpi_device_wakeup_context context; 26293 struct wakeup_source *ws; 26294 int prepare_count; 26295 int enable_count; 26296 }; 26297 26298 struct acpi_device_perf_flags { 26299 u8 reserved: 8; 26300 }; 26301 26302 struct acpi_device_perf_state; 26303 26304 struct acpi_device_perf { 26305 int state; 26306 struct acpi_device_perf_flags flags; 26307 int state_count; 26308 struct acpi_device_perf_state *states; 26309 }; 26310 26311 struct acpi_device_dir { 26312 struct proc_dir_entry *entry; 26313 }; 26314 26315 struct acpi_device_data { 26316 const union acpi_object *pointer; 26317 struct list_head properties; 26318 const union acpi_object *of_compatible; 26319 struct list_head subnodes; 26320 }; 26321 26322 struct acpi_scan_handler; 26323 26324 struct acpi_hotplug_context; 26325 26326 struct acpi_driver; 26327 26328 struct acpi_gpio_mapping; 26329 26330 struct acpi_device { 26331 int device_type; 26332 acpi_handle handle; 26333 struct fwnode_handle fwnode; 26334 struct acpi_device *parent; 26335 struct list_head children; 26336 struct list_head node; 26337 struct list_head wakeup_list; 26338 struct list_head del_list; 26339 struct acpi_device_status status; 26340 struct acpi_device_flags flags; 26341 struct acpi_device_pnp pnp; 26342 struct acpi_device_power power; 26343 struct acpi_device_wakeup wakeup; 26344 struct acpi_device_perf performance; 26345 struct acpi_device_dir dir; 26346 struct acpi_device_data data; 26347 struct acpi_scan_handler *handler; 26348 struct acpi_hotplug_context *hp; 26349 struct acpi_driver *driver; 26350 const struct acpi_gpio_mapping *driver_gpios; 26351 void *driver_data; 26352 struct device dev; 26353 unsigned int physical_node_count; 26354 unsigned int dep_unmet; 26355 struct list_head physical_node_list; 26356 struct mutex physical_node_lock; 26357 void (*remove)(struct acpi_device *); 26358 }; 26359 26360 struct acpi_hotplug_profile { 26361 struct kobject kobj; 26362 int (*scan_dependent)(struct acpi_device *); 26363 void (*notify_online)(struct acpi_device *); 26364 bool enabled: 1; 26365 bool demand_offline: 1; 26366 }; 26367 26368 struct acpi_scan_handler { 26369 const struct acpi_device_id *ids; 26370 struct list_head list_node; 26371 bool (*match)(const char *, const struct acpi_device_id **); 26372 int (*attach)(struct acpi_device *, const struct acpi_device_id *); 26373 void (*detach)(struct acpi_device *); 26374 void (*bind)(struct device *); 26375 void (*unbind)(struct device *); 26376 struct acpi_hotplug_profile hotplug; 26377 }; 26378 26379 struct acpi_hotplug_context { 26380 struct acpi_device *self; 26381 int (*notify)(struct acpi_device *, u32); 26382 void (*uevent)(struct acpi_device *, u32); 26383 void (*fixup)(struct acpi_device *); 26384 }; 26385 26386 typedef int (*acpi_op_add)(struct acpi_device *); 26387 26388 typedef int (*acpi_op_remove)(struct acpi_device *); 26389 26390 typedef void (*acpi_op_notify)(struct acpi_device *, u32); 26391 26392 struct acpi_device_ops { 26393 acpi_op_add add; 26394 acpi_op_remove remove; 26395 acpi_op_notify notify; 26396 }; 26397 26398 struct acpi_driver { 26399 char name[80]; 26400 char class[80]; 26401 const struct acpi_device_id *ids; 26402 unsigned int flags; 26403 struct acpi_device_ops ops; 26404 struct device_driver drv; 26405 struct module *owner; 26406 }; 26407 26408 struct acpi_device_perf_state { 26409 struct { 26410 u8 valid: 1; 26411 u8 reserved: 7; 26412 } flags; 26413 u8 power; 26414 u8 performance; 26415 int latency; 26416 }; 26417 26418 struct acpi_gpio_params; 26419 26420 struct acpi_gpio_mapping { 26421 const char *name; 26422 const struct acpi_gpio_params *data; 26423 unsigned int size; 26424 unsigned int quirks; 26425 }; 26426 26427 struct acpi_gpio_params { 26428 unsigned int crs_entry_index; 26429 unsigned int line_index; 26430 bool active_low; 26431 }; 26432 26433 struct uvyh_gr0_gam_gr_config_s { 26434 long unsigned int rsvd_0_9: 10; 26435 long unsigned int subspace: 1; 26436 long unsigned int rsvd_11_63: 53; 26437 }; 26438 26439 struct uv5h_gr0_gam_gr_config_s { 26440 long unsigned int rsvd_0_9: 10; 26441 long unsigned int subspace: 1; 26442 long unsigned int rsvd_11_63: 53; 26443 }; 26444 26445 struct uv4h_gr0_gam_gr_config_s { 26446 long unsigned int rsvd_0_9: 10; 26447 long unsigned int subspace: 1; 26448 long unsigned int rsvd_11_63: 53; 26449 }; 26450 26451 struct uv3h_gr0_gam_gr_config_s { 26452 long unsigned int m_skt: 6; 26453 long unsigned int undef_6_9: 4; 26454 long unsigned int subspace: 1; 26455 long unsigned int reserved: 53; 26456 }; 26457 26458 struct uv2h_gr0_gam_gr_config_s { 26459 long unsigned int n_gr: 4; 26460 long unsigned int reserved: 60; 26461 }; 26462 26463 union uvyh_gr0_gam_gr_config_u { 26464 long unsigned int v; 26465 struct uvyh_gr0_gam_gr_config_s sy; 26466 struct uv5h_gr0_gam_gr_config_s s5; 26467 struct uv4h_gr0_gam_gr_config_s s4; 26468 struct uv3h_gr0_gam_gr_config_s s3; 26469 struct uv2h_gr0_gam_gr_config_s s2; 26470 }; 26471 26472 struct uvh_node_id_s { 26473 long unsigned int force1: 1; 26474 long unsigned int manufacturer: 11; 26475 long unsigned int part_number: 16; 26476 long unsigned int revision: 4; 26477 long unsigned int rsvd_32_63: 32; 26478 }; 26479 26480 struct uvxh_node_id_s { 26481 long unsigned int force1: 1; 26482 long unsigned int manufacturer: 11; 26483 long unsigned int part_number: 16; 26484 long unsigned int revision: 4; 26485 long unsigned int node_id: 15; 26486 long unsigned int rsvd_47_49: 3; 26487 long unsigned int nodes_per_bit: 7; 26488 long unsigned int ni_port: 5; 26489 long unsigned int rsvd_62_63: 2; 26490 }; 26491 26492 struct uvyh_node_id_s { 26493 long unsigned int force1: 1; 26494 long unsigned int manufacturer: 11; 26495 long unsigned int part_number: 16; 26496 long unsigned int revision: 4; 26497 long unsigned int node_id: 7; 26498 long unsigned int rsvd_39_56: 18; 26499 long unsigned int ni_port: 6; 26500 long unsigned int rsvd_63: 1; 26501 }; 26502 26503 struct uv5h_node_id_s { 26504 long unsigned int force1: 1; 26505 long unsigned int manufacturer: 11; 26506 long unsigned int part_number: 16; 26507 long unsigned int revision: 4; 26508 long unsigned int node_id: 7; 26509 long unsigned int rsvd_39_56: 18; 26510 long unsigned int ni_port: 6; 26511 long unsigned int rsvd_63: 1; 26512 }; 26513 26514 struct uv4h_node_id_s { 26515 long unsigned int force1: 1; 26516 long unsigned int manufacturer: 11; 26517 long unsigned int part_number: 16; 26518 long unsigned int revision: 4; 26519 long unsigned int node_id: 15; 26520 long unsigned int rsvd_47: 1; 26521 long unsigned int router_select: 1; 26522 long unsigned int rsvd_49: 1; 26523 long unsigned int nodes_per_bit: 7; 26524 long unsigned int ni_port: 5; 26525 long unsigned int rsvd_62_63: 2; 26526 }; 26527 26528 struct uv3h_node_id_s { 26529 long unsigned int force1: 1; 26530 long unsigned int manufacturer: 11; 26531 long unsigned int part_number: 16; 26532 long unsigned int revision: 4; 26533 long unsigned int node_id: 15; 26534 long unsigned int rsvd_47: 1; 26535 long unsigned int router_select: 1; 26536 long unsigned int rsvd_49: 1; 26537 long unsigned int nodes_per_bit: 7; 26538 long unsigned int ni_port: 5; 26539 long unsigned int rsvd_62_63: 2; 26540 }; 26541 26542 struct uv2h_node_id_s { 26543 long unsigned int force1: 1; 26544 long unsigned int manufacturer: 11; 26545 long unsigned int part_number: 16; 26546 long unsigned int revision: 4; 26547 long unsigned int node_id: 15; 26548 long unsigned int rsvd_47_49: 3; 26549 long unsigned int nodes_per_bit: 7; 26550 long unsigned int ni_port: 5; 26551 long unsigned int rsvd_62_63: 2; 26552 }; 26553 26554 union uvh_node_id_u { 26555 long unsigned int v; 26556 struct uvh_node_id_s s; 26557 struct uvxh_node_id_s sx; 26558 struct uvyh_node_id_s sy; 26559 struct uv5h_node_id_s s5; 26560 struct uv4h_node_id_s s4; 26561 struct uv3h_node_id_s s3; 26562 struct uv2h_node_id_s s2; 26563 }; 26564 26565 struct uvh_rh10_gam_addr_map_config_s { 26566 long unsigned int undef_0_5: 6; 26567 long unsigned int n_skt: 3; 26568 long unsigned int undef_9_11: 3; 26569 long unsigned int ls_enable: 1; 26570 long unsigned int undef_13_15: 3; 26571 long unsigned int mk_tme_keyid_bits: 4; 26572 long unsigned int rsvd_20_63: 44; 26573 }; 26574 26575 struct uvyh_rh10_gam_addr_map_config_s { 26576 long unsigned int undef_0_5: 6; 26577 long unsigned int n_skt: 3; 26578 long unsigned int undef_9_11: 3; 26579 long unsigned int ls_enable: 1; 26580 long unsigned int undef_13_15: 3; 26581 long unsigned int mk_tme_keyid_bits: 4; 26582 long unsigned int rsvd_20_63: 44; 26583 }; 26584 26585 struct uv5h_rh10_gam_addr_map_config_s { 26586 long unsigned int undef_0_5: 6; 26587 long unsigned int n_skt: 3; 26588 long unsigned int undef_9_11: 3; 26589 long unsigned int ls_enable: 1; 26590 long unsigned int undef_13_15: 3; 26591 long unsigned int mk_tme_keyid_bits: 4; 26592 }; 26593 26594 union uvh_rh10_gam_addr_map_config_u { 26595 long unsigned int v; 26596 struct uvh_rh10_gam_addr_map_config_s s; 26597 struct uvyh_rh10_gam_addr_map_config_s sy; 26598 struct uv5h_rh10_gam_addr_map_config_s s5; 26599 }; 26600 26601 struct uvh_rh10_gam_mmioh_overlay_config0_s { 26602 long unsigned int rsvd_0_25: 26; 26603 long unsigned int base: 26; 26604 long unsigned int m_io: 6; 26605 long unsigned int n_io: 4; 26606 long unsigned int undef_62: 1; 26607 long unsigned int enable: 1; 26608 }; 26609 26610 struct uvyh_rh10_gam_mmioh_overlay_config0_s { 26611 long unsigned int rsvd_0_25: 26; 26612 long unsigned int base: 26; 26613 long unsigned int m_io: 6; 26614 long unsigned int n_io: 4; 26615 long unsigned int undef_62: 1; 26616 long unsigned int enable: 1; 26617 }; 26618 26619 struct uv5h_rh10_gam_mmioh_overlay_config0_s { 26620 long unsigned int rsvd_0_25: 26; 26621 long unsigned int base: 26; 26622 long unsigned int m_io: 6; 26623 long unsigned int n_io: 4; 26624 long unsigned int undef_62: 1; 26625 long unsigned int enable: 1; 26626 }; 26627 26628 union uvh_rh10_gam_mmioh_overlay_config0_u { 26629 long unsigned int v; 26630 struct uvh_rh10_gam_mmioh_overlay_config0_s s; 26631 struct uvyh_rh10_gam_mmioh_overlay_config0_s sy; 26632 struct uv5h_rh10_gam_mmioh_overlay_config0_s s5; 26633 }; 26634 26635 struct uvh_rh10_gam_mmioh_overlay_config1_s { 26636 long unsigned int rsvd_0_25: 26; 26637 long unsigned int base: 26; 26638 long unsigned int m_io: 6; 26639 long unsigned int n_io: 4; 26640 long unsigned int undef_62: 1; 26641 long unsigned int enable: 1; 26642 }; 26643 26644 struct uvyh_rh10_gam_mmioh_overlay_config1_s { 26645 long unsigned int rsvd_0_25: 26; 26646 long unsigned int base: 26; 26647 long unsigned int m_io: 6; 26648 long unsigned int n_io: 4; 26649 long unsigned int undef_62: 1; 26650 long unsigned int enable: 1; 26651 }; 26652 26653 struct uv5h_rh10_gam_mmioh_overlay_config1_s { 26654 long unsigned int rsvd_0_25: 26; 26655 long unsigned int base: 26; 26656 long unsigned int m_io: 6; 26657 long unsigned int n_io: 4; 26658 long unsigned int undef_62: 1; 26659 long unsigned int enable: 1; 26660 }; 26661 26662 union uvh_rh10_gam_mmioh_overlay_config1_u { 26663 long unsigned int v; 26664 struct uvh_rh10_gam_mmioh_overlay_config1_s s; 26665 struct uvyh_rh10_gam_mmioh_overlay_config1_s sy; 26666 struct uv5h_rh10_gam_mmioh_overlay_config1_s s5; 26667 }; 26668 26669 struct uvh_rh10_gam_mmr_overlay_config_s { 26670 long unsigned int undef_0_24: 25; 26671 long unsigned int base: 27; 26672 long unsigned int undef_52_62: 11; 26673 long unsigned int enable: 1; 26674 }; 26675 26676 struct uvyh_rh10_gam_mmr_overlay_config_s { 26677 long unsigned int undef_0_24: 25; 26678 long unsigned int base: 27; 26679 long unsigned int undef_52_62: 11; 26680 long unsigned int enable: 1; 26681 }; 26682 26683 struct uv5h_rh10_gam_mmr_overlay_config_s { 26684 long unsigned int undef_0_24: 25; 26685 long unsigned int base: 27; 26686 long unsigned int undef_52_62: 11; 26687 long unsigned int enable: 1; 26688 }; 26689 26690 union uvh_rh10_gam_mmr_overlay_config_u { 26691 long unsigned int v; 26692 struct uvh_rh10_gam_mmr_overlay_config_s s; 26693 struct uvyh_rh10_gam_mmr_overlay_config_s sy; 26694 struct uv5h_rh10_gam_mmr_overlay_config_s s5; 26695 }; 26696 26697 struct uvh_rh_gam_addr_map_config_s { 26698 long unsigned int rsvd_0_5: 6; 26699 long unsigned int n_skt: 4; 26700 long unsigned int rsvd_10_63: 54; 26701 }; 26702 26703 struct uvxh_rh_gam_addr_map_config_s { 26704 long unsigned int rsvd_0_5: 6; 26705 long unsigned int n_skt: 4; 26706 long unsigned int rsvd_10_63: 54; 26707 }; 26708 26709 struct uv4h_rh_gam_addr_map_config_s { 26710 long unsigned int rsvd_0_5: 6; 26711 long unsigned int n_skt: 4; 26712 long unsigned int rsvd_10_63: 54; 26713 }; 26714 26715 struct uv3h_rh_gam_addr_map_config_s { 26716 long unsigned int m_skt: 6; 26717 long unsigned int n_skt: 4; 26718 long unsigned int rsvd_10_63: 54; 26719 }; 26720 26721 struct uv2h_rh_gam_addr_map_config_s { 26722 long unsigned int m_skt: 6; 26723 long unsigned int n_skt: 4; 26724 long unsigned int rsvd_10_63: 54; 26725 }; 26726 26727 union uvh_rh_gam_addr_map_config_u { 26728 long unsigned int v; 26729 struct uvh_rh_gam_addr_map_config_s s; 26730 struct uvxh_rh_gam_addr_map_config_s sx; 26731 struct uv4h_rh_gam_addr_map_config_s s4; 26732 struct uv3h_rh_gam_addr_map_config_s s3; 26733 struct uv2h_rh_gam_addr_map_config_s s2; 26734 }; 26735 26736 struct uvh_rh_gam_alias_2_overlay_config_s { 26737 long unsigned int rsvd_0_23: 24; 26738 long unsigned int base: 8; 26739 long unsigned int rsvd_32_47: 16; 26740 long unsigned int m_alias: 5; 26741 long unsigned int rsvd_53_62: 10; 26742 long unsigned int enable: 1; 26743 }; 26744 26745 struct uvxh_rh_gam_alias_2_overlay_config_s { 26746 long unsigned int rsvd_0_23: 24; 26747 long unsigned int base: 8; 26748 long unsigned int rsvd_32_47: 16; 26749 long unsigned int m_alias: 5; 26750 long unsigned int rsvd_53_62: 10; 26751 long unsigned int enable: 1; 26752 }; 26753 26754 struct uv4h_rh_gam_alias_2_overlay_config_s { 26755 long unsigned int rsvd_0_23: 24; 26756 long unsigned int base: 8; 26757 long unsigned int rsvd_32_47: 16; 26758 long unsigned int m_alias: 5; 26759 long unsigned int rsvd_53_62: 10; 26760 long unsigned int enable: 1; 26761 }; 26762 26763 struct uv3h_rh_gam_alias_2_overlay_config_s { 26764 long unsigned int rsvd_0_23: 24; 26765 long unsigned int base: 8; 26766 long unsigned int rsvd_32_47: 16; 26767 long unsigned int m_alias: 5; 26768 long unsigned int rsvd_53_62: 10; 26769 long unsigned int enable: 1; 26770 }; 26771 26772 struct uv2h_rh_gam_alias_2_overlay_config_s { 26773 long unsigned int rsvd_0_23: 24; 26774 long unsigned int base: 8; 26775 long unsigned int rsvd_32_47: 16; 26776 long unsigned int m_alias: 5; 26777 long unsigned int rsvd_53_62: 10; 26778 long unsigned int enable: 1; 26779 }; 26780 26781 union uvh_rh_gam_alias_2_overlay_config_u { 26782 long unsigned int v; 26783 struct uvh_rh_gam_alias_2_overlay_config_s s; 26784 struct uvxh_rh_gam_alias_2_overlay_config_s sx; 26785 struct uv4h_rh_gam_alias_2_overlay_config_s s4; 26786 struct uv3h_rh_gam_alias_2_overlay_config_s s3; 26787 struct uv2h_rh_gam_alias_2_overlay_config_s s2; 26788 }; 26789 26790 struct uvh_rh_gam_alias_2_redirect_config_s { 26791 long unsigned int rsvd_0_23: 24; 26792 long unsigned int dest_base: 22; 26793 long unsigned int rsvd_46_63: 18; 26794 }; 26795 26796 struct uvxh_rh_gam_alias_2_redirect_config_s { 26797 long unsigned int rsvd_0_23: 24; 26798 long unsigned int dest_base: 22; 26799 long unsigned int rsvd_46_63: 18; 26800 }; 26801 26802 struct uv4h_rh_gam_alias_2_redirect_config_s { 26803 long unsigned int rsvd_0_23: 24; 26804 long unsigned int dest_base: 22; 26805 long unsigned int rsvd_46_63: 18; 26806 }; 26807 26808 struct uv3h_rh_gam_alias_2_redirect_config_s { 26809 long unsigned int rsvd_0_23: 24; 26810 long unsigned int dest_base: 22; 26811 long unsigned int rsvd_46_63: 18; 26812 }; 26813 26814 struct uv2h_rh_gam_alias_2_redirect_config_s { 26815 long unsigned int rsvd_0_23: 24; 26816 long unsigned int dest_base: 22; 26817 long unsigned int rsvd_46_63: 18; 26818 }; 26819 26820 union uvh_rh_gam_alias_2_redirect_config_u { 26821 long unsigned int v; 26822 struct uvh_rh_gam_alias_2_redirect_config_s s; 26823 struct uvxh_rh_gam_alias_2_redirect_config_s sx; 26824 struct uv4h_rh_gam_alias_2_redirect_config_s s4; 26825 struct uv3h_rh_gam_alias_2_redirect_config_s s3; 26826 struct uv2h_rh_gam_alias_2_redirect_config_s s2; 26827 }; 26828 26829 struct uvh_rh_gam_gru_overlay_config_s { 26830 long unsigned int rsvd_0_45: 46; 26831 long unsigned int rsvd_46_51: 6; 26832 long unsigned int n_gru: 4; 26833 long unsigned int rsvd_56_62: 7; 26834 long unsigned int enable: 1; 26835 }; 26836 26837 struct uvxh_rh_gam_gru_overlay_config_s { 26838 long unsigned int rsvd_0_45: 46; 26839 long unsigned int rsvd_46_51: 6; 26840 long unsigned int n_gru: 4; 26841 long unsigned int rsvd_56_62: 7; 26842 long unsigned int enable: 1; 26843 }; 26844 26845 struct uv4ah_rh_gam_gru_overlay_config_s { 26846 long unsigned int rsvd_0_24: 25; 26847 long unsigned int undef_25: 1; 26848 long unsigned int base: 26; 26849 long unsigned int n_gru: 4; 26850 long unsigned int rsvd_56_62: 7; 26851 long unsigned int enable: 1; 26852 }; 26853 26854 struct uv4h_rh_gam_gru_overlay_config_s { 26855 long unsigned int rsvd_0_24: 25; 26856 long unsigned int undef_25: 1; 26857 long unsigned int base: 20; 26858 long unsigned int rsvd_46_51: 6; 26859 long unsigned int n_gru: 4; 26860 long unsigned int rsvd_56_62: 7; 26861 long unsigned int enable: 1; 26862 }; 26863 26864 struct uv3h_rh_gam_gru_overlay_config_s { 26865 long unsigned int rsvd_0_27: 28; 26866 long unsigned int base: 18; 26867 long unsigned int rsvd_46_51: 6; 26868 long unsigned int n_gru: 4; 26869 long unsigned int rsvd_56_61: 6; 26870 long unsigned int mode: 1; 26871 long unsigned int enable: 1; 26872 }; 26873 26874 struct uv2h_rh_gam_gru_overlay_config_s { 26875 long unsigned int rsvd_0_27: 28; 26876 long unsigned int base: 18; 26877 long unsigned int rsvd_46_51: 6; 26878 long unsigned int n_gru: 4; 26879 long unsigned int rsvd_56_62: 7; 26880 long unsigned int enable: 1; 26881 }; 26882 26883 union uvh_rh_gam_gru_overlay_config_u { 26884 long unsigned int v; 26885 struct uvh_rh_gam_gru_overlay_config_s s; 26886 struct uvxh_rh_gam_gru_overlay_config_s sx; 26887 struct uv4ah_rh_gam_gru_overlay_config_s s4a; 26888 struct uv4h_rh_gam_gru_overlay_config_s s4; 26889 struct uv3h_rh_gam_gru_overlay_config_s s3; 26890 struct uv2h_rh_gam_gru_overlay_config_s s2; 26891 }; 26892 26893 struct uvh_rh_gam_mmioh_overlay_config_s { 26894 long unsigned int rsvd_0_26: 27; 26895 long unsigned int base: 19; 26896 long unsigned int m_io: 6; 26897 long unsigned int n_io: 4; 26898 long unsigned int rsvd_56_62: 7; 26899 long unsigned int enable: 1; 26900 }; 26901 26902 struct uvxh_rh_gam_mmioh_overlay_config_s { 26903 long unsigned int rsvd_0_26: 27; 26904 long unsigned int base: 19; 26905 long unsigned int m_io: 6; 26906 long unsigned int n_io: 4; 26907 long unsigned int rsvd_56_62: 7; 26908 long unsigned int enable: 1; 26909 }; 26910 26911 struct uv2h_rh_gam_mmioh_overlay_config_s { 26912 long unsigned int rsvd_0_26: 27; 26913 long unsigned int base: 19; 26914 long unsigned int m_io: 6; 26915 long unsigned int n_io: 4; 26916 long unsigned int rsvd_56_62: 7; 26917 long unsigned int enable: 1; 26918 }; 26919 26920 union uvh_rh_gam_mmioh_overlay_config_u { 26921 long unsigned int v; 26922 struct uvh_rh_gam_mmioh_overlay_config_s s; 26923 struct uvxh_rh_gam_mmioh_overlay_config_s sx; 26924 struct uv2h_rh_gam_mmioh_overlay_config_s s2; 26925 }; 26926 26927 struct uvh_rh_gam_mmioh_overlay_config0_s { 26928 long unsigned int rsvd_0_25: 26; 26929 long unsigned int base: 20; 26930 long unsigned int m_io: 6; 26931 long unsigned int n_io: 4; 26932 long unsigned int rsvd_56_62: 7; 26933 long unsigned int enable: 1; 26934 }; 26935 26936 struct uvxh_rh_gam_mmioh_overlay_config0_s { 26937 long unsigned int rsvd_0_25: 26; 26938 long unsigned int base: 20; 26939 long unsigned int m_io: 6; 26940 long unsigned int n_io: 4; 26941 long unsigned int rsvd_56_62: 7; 26942 long unsigned int enable: 1; 26943 }; 26944 26945 struct uv4ah_rh_gam_mmioh_overlay_config0_mmr_s { 26946 long unsigned int rsvd_0_25: 26; 26947 long unsigned int base: 26; 26948 long unsigned int m_io: 6; 26949 long unsigned int n_io: 4; 26950 long unsigned int undef_62: 1; 26951 long unsigned int enable: 1; 26952 }; 26953 26954 struct uv4h_rh_gam_mmioh_overlay_config0_s { 26955 long unsigned int rsvd_0_25: 26; 26956 long unsigned int base: 20; 26957 long unsigned int m_io: 6; 26958 long unsigned int n_io: 4; 26959 long unsigned int rsvd_56_62: 7; 26960 long unsigned int enable: 1; 26961 }; 26962 26963 struct uv3h_rh_gam_mmioh_overlay_config0_s { 26964 long unsigned int rsvd_0_25: 26; 26965 long unsigned int base: 20; 26966 long unsigned int m_io: 6; 26967 long unsigned int n_io: 4; 26968 long unsigned int rsvd_56_62: 7; 26969 long unsigned int enable: 1; 26970 }; 26971 26972 union uvh_rh_gam_mmioh_overlay_config0_u { 26973 long unsigned int v; 26974 struct uvh_rh_gam_mmioh_overlay_config0_s s; 26975 struct uvxh_rh_gam_mmioh_overlay_config0_s sx; 26976 struct uv4ah_rh_gam_mmioh_overlay_config0_mmr_s s4a; 26977 struct uv4h_rh_gam_mmioh_overlay_config0_s s4; 26978 struct uv3h_rh_gam_mmioh_overlay_config0_s s3; 26979 }; 26980 26981 struct uvh_rh_gam_mmioh_overlay_config1_s { 26982 long unsigned int rsvd_0_25: 26; 26983 long unsigned int base: 20; 26984 long unsigned int m_io: 6; 26985 long unsigned int n_io: 4; 26986 long unsigned int rsvd_56_62: 7; 26987 long unsigned int enable: 1; 26988 }; 26989 26990 struct uvxh_rh_gam_mmioh_overlay_config1_s { 26991 long unsigned int rsvd_0_25: 26; 26992 long unsigned int base: 20; 26993 long unsigned int m_io: 6; 26994 long unsigned int n_io: 4; 26995 long unsigned int rsvd_56_62: 7; 26996 long unsigned int enable: 1; 26997 }; 26998 26999 struct uv4ah_rh_gam_mmioh_overlay_config1_mmr_s { 27000 long unsigned int rsvd_0_25: 26; 27001 long unsigned int base: 26; 27002 long unsigned int m_io: 6; 27003 long unsigned int n_io: 4; 27004 long unsigned int undef_62: 1; 27005 long unsigned int enable: 1; 27006 }; 27007 27008 struct uv4h_rh_gam_mmioh_overlay_config1_s { 27009 long unsigned int rsvd_0_25: 26; 27010 long unsigned int base: 20; 27011 long unsigned int m_io: 6; 27012 long unsigned int n_io: 4; 27013 long unsigned int rsvd_56_62: 7; 27014 long unsigned int enable: 1; 27015 }; 27016 27017 struct uv3h_rh_gam_mmioh_overlay_config1_s { 27018 long unsigned int rsvd_0_25: 26; 27019 long unsigned int base: 20; 27020 long unsigned int m_io: 6; 27021 long unsigned int n_io: 4; 27022 long unsigned int rsvd_56_62: 7; 27023 long unsigned int enable: 1; 27024 }; 27025 27026 union uvh_rh_gam_mmioh_overlay_config1_u { 27027 long unsigned int v; 27028 struct uvh_rh_gam_mmioh_overlay_config1_s s; 27029 struct uvxh_rh_gam_mmioh_overlay_config1_s sx; 27030 struct uv4ah_rh_gam_mmioh_overlay_config1_mmr_s s4a; 27031 struct uv4h_rh_gam_mmioh_overlay_config1_s s4; 27032 struct uv3h_rh_gam_mmioh_overlay_config1_s s3; 27033 }; 27034 27035 struct uvh_rh_gam_mmr_overlay_config_s { 27036 long unsigned int rsvd_0_25: 26; 27037 long unsigned int base: 20; 27038 long unsigned int rsvd_46_62: 17; 27039 long unsigned int enable: 1; 27040 }; 27041 27042 struct uvxh_rh_gam_mmr_overlay_config_s { 27043 long unsigned int rsvd_0_25: 26; 27044 long unsigned int base: 20; 27045 long unsigned int rsvd_46_62: 17; 27046 long unsigned int enable: 1; 27047 }; 27048 27049 struct uv4h_rh_gam_mmr_overlay_config_s { 27050 long unsigned int rsvd_0_25: 26; 27051 long unsigned int base: 20; 27052 long unsigned int rsvd_46_62: 17; 27053 long unsigned int enable: 1; 27054 }; 27055 27056 struct uv3h_rh_gam_mmr_overlay_config_s { 27057 long unsigned int rsvd_0_25: 26; 27058 long unsigned int base: 20; 27059 long unsigned int rsvd_46_62: 17; 27060 long unsigned int enable: 1; 27061 }; 27062 27063 struct uv2h_rh_gam_mmr_overlay_config_s { 27064 long unsigned int rsvd_0_25: 26; 27065 long unsigned int base: 20; 27066 long unsigned int rsvd_46_62: 17; 27067 long unsigned int enable: 1; 27068 }; 27069 27070 union uvh_rh_gam_mmr_overlay_config_u { 27071 long unsigned int v; 27072 struct uvh_rh_gam_mmr_overlay_config_s s; 27073 struct uvxh_rh_gam_mmr_overlay_config_s sx; 27074 struct uv4h_rh_gam_mmr_overlay_config_s s4; 27075 struct uv3h_rh_gam_mmr_overlay_config_s s3; 27076 struct uv2h_rh_gam_mmr_overlay_config_s s2; 27077 }; 27078 27079 enum uv_system_type { 27080 UV_NONE = 0, 27081 UV_LEGACY_APIC = 1, 27082 UV_X2APIC = 2, 27083 }; 27084 27085 enum { 27086 BIOS_STATUS_MORE_PASSES = 1, 27087 BIOS_STATUS_SUCCESS = 0, 27088 BIOS_STATUS_UNIMPLEMENTED = 4294967258, 27089 BIOS_STATUS_EINVAL = 4294967274, 27090 BIOS_STATUS_UNAVAIL = 4294967280, 27091 BIOS_STATUS_ABORT = 4294967292, 27092 }; 27093 27094 struct uv_gam_parameters { 27095 u64 mmr_base; 27096 u64 gru_base; 27097 u8 mmr_shift; 27098 u8 gru_shift; 27099 u8 gpa_shift; 27100 u8 unused1; 27101 }; 27102 27103 struct uv_gam_range_entry { 27104 char type; 27105 char unused1; 27106 u16 nasid; 27107 u16 sockid; 27108 u16 pnode; 27109 u32 unused2; 27110 u32 limit; 27111 }; 27112 27113 struct uv_arch_type_entry { 27114 char archtype[8]; 27115 }; 27116 27117 struct uv_systab { 27118 char signature[4]; 27119 u32 revision; 27120 u64 function; 27121 u32 size; 27122 struct { 27123 u32 type: 8; 27124 u32 offset: 24; 27125 } entry[1]; 27126 }; 27127 27128 enum { 27129 BIOS_FREQ_BASE_PLATFORM = 0, 27130 BIOS_FREQ_BASE_INTERVAL_TIMER = 1, 27131 BIOS_FREQ_BASE_REALTIME_CLOCK = 2, 27132 }; 27133 27134 struct uv_gam_range_s { 27135 u32 limit; 27136 u16 nasid; 27137 s8 base; 27138 u8 reserved; 27139 }; 27140 27141 struct uv_hub_info_s { 27142 unsigned int hub_type; 27143 unsigned char hub_revision; 27144 long unsigned int global_mmr_base; 27145 long unsigned int global_mmr_shift; 27146 long unsigned int gpa_mask; 27147 short unsigned int *socket_to_node; 27148 short unsigned int *socket_to_pnode; 27149 short unsigned int *pnode_to_socket; 27150 struct uv_gam_range_s *gr_table; 27151 short unsigned int min_socket; 27152 short unsigned int min_pnode; 27153 unsigned char m_val; 27154 unsigned char n_val; 27155 unsigned char gr_table_len; 27156 unsigned char apic_pnode_shift; 27157 unsigned char gpa_shift; 27158 unsigned char nasid_shift; 27159 unsigned char m_shift; 27160 unsigned char n_lshift; 27161 unsigned int gnode_extra; 27162 long unsigned int gnode_upper; 27163 long unsigned int lowmem_remap_top; 27164 long unsigned int lowmem_remap_base; 27165 long unsigned int global_gru_base; 27166 long unsigned int global_gru_shift; 27167 short unsigned int pnode; 27168 short unsigned int pnode_mask; 27169 short unsigned int coherency_domain_number; 27170 short unsigned int numa_blade_id; 27171 short unsigned int nr_possible_cpus; 27172 short unsigned int nr_online_cpus; 27173 short int memory_nid; 27174 }; 27175 27176 struct uv_cpu_info_s { 27177 void *p_uv_hub_info; 27178 unsigned char blade_cpu_id; 27179 void *reserved; 27180 }; 27181 27182 struct uvh_apicid_s { 27183 long unsigned int local_apic_mask: 24; 27184 long unsigned int local_apic_shift: 5; 27185 long unsigned int unused1: 3; 27186 long unsigned int pnode_mask: 24; 27187 long unsigned int pnode_shift: 5; 27188 long unsigned int unused2: 3; 27189 }; 27190 27191 union uvh_apicid { 27192 long unsigned int v; 27193 struct uvh_apicid_s s; 27194 }; 27195 27196 enum map_type { 27197 map_wb = 0, 27198 map_uc = 1, 27199 }; 27200 27201 enum mmioh_arch { 27202 UV2_MMIOH = 4294967295, 27203 UVY_MMIOH0 = 0, 27204 UVY_MMIOH1 = 1, 27205 UVX_MMIOH0 = 2, 27206 UVX_MMIOH1 = 3, 27207 }; 27208 27209 struct mn { 27210 unsigned char m_val; 27211 unsigned char n_val; 27212 unsigned char m_shift; 27213 unsigned char n_lshift; 27214 }; 27215 27216 struct cluster_mask { 27217 unsigned int clusterid; 27218 int node; 27219 struct cpumask mask; 27220 }; 27221 27222 struct dyn_arch_ftrace {}; 27223 27224 enum { 27225 FTRACE_OPS_FL_ENABLED = 1, 27226 FTRACE_OPS_FL_DYNAMIC = 2, 27227 FTRACE_OPS_FL_SAVE_REGS = 4, 27228 FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 8, 27229 FTRACE_OPS_FL_RECURSION = 16, 27230 FTRACE_OPS_FL_STUB = 32, 27231 FTRACE_OPS_FL_INITIALIZED = 64, 27232 FTRACE_OPS_FL_DELETED = 128, 27233 FTRACE_OPS_FL_ADDING = 256, 27234 FTRACE_OPS_FL_REMOVING = 512, 27235 FTRACE_OPS_FL_MODIFYING = 1024, 27236 FTRACE_OPS_FL_ALLOC_TRAMP = 2048, 27237 FTRACE_OPS_FL_IPMODIFY = 4096, 27238 FTRACE_OPS_FL_PID = 8192, 27239 FTRACE_OPS_FL_RCU = 16384, 27240 FTRACE_OPS_FL_TRACE_ARRAY = 32768, 27241 FTRACE_OPS_FL_PERMANENT = 65536, 27242 FTRACE_OPS_FL_DIRECT = 131072, 27243 }; 27244 27245 enum { 27246 FTRACE_FL_ENABLED = 2147483648, 27247 FTRACE_FL_REGS = 1073741824, 27248 FTRACE_FL_REGS_EN = 536870912, 27249 FTRACE_FL_TRAMP = 268435456, 27250 FTRACE_FL_TRAMP_EN = 134217728, 27251 FTRACE_FL_IPMODIFY = 67108864, 27252 FTRACE_FL_DISABLED = 33554432, 27253 FTRACE_FL_DIRECT = 16777216, 27254 FTRACE_FL_DIRECT_EN = 8388608, 27255 }; 27256 27257 struct dyn_ftrace { 27258 long unsigned int ip; 27259 long unsigned int flags; 27260 struct dyn_arch_ftrace arch; 27261 }; 27262 27263 enum { 27264 FTRACE_UPDATE_IGNORE = 0, 27265 FTRACE_UPDATE_MAKE_CALL = 1, 27266 FTRACE_UPDATE_MODIFY_CALL = 2, 27267 FTRACE_UPDATE_MAKE_NOP = 3, 27268 }; 27269 27270 union ftrace_op_code_union { 27271 char code[7]; 27272 struct { 27273 char op[3]; 27274 int offset; 27275 } __attribute__((packed)); 27276 }; 27277 27278 struct ftrace_rec_iter; 27279 27280 typedef __s64 Elf64_Sxword; 27281 27282 struct elf64_rela { 27283 Elf64_Addr r_offset; 27284 Elf64_Xword r_info; 27285 Elf64_Sxword r_addend; 27286 }; 27287 27288 typedef struct elf64_rela Elf64_Rela; 27289 27290 struct kimage_arch { 27291 p4d_t *p4d; 27292 pud_t *pud; 27293 pmd_t *pmd; 27294 pte_t *pte; 27295 void *elf_headers; 27296 long unsigned int elf_headers_sz; 27297 long unsigned int elf_load_addr; 27298 }; 27299 27300 typedef long unsigned int kimage_entry_t; 27301 27302 struct kexec_segment { 27303 union { 27304 void *buf; 27305 void *kbuf; 27306 }; 27307 size_t bufsz; 27308 long unsigned int mem; 27309 size_t memsz; 27310 }; 27311 27312 struct purgatory_info { 27313 const Elf64_Ehdr *ehdr; 27314 Elf64_Shdr *sechdrs; 27315 void *purgatory_buf; 27316 }; 27317 27318 typedef int kexec_probe_t(const char *, long unsigned int); 27319 27320 struct kimage; 27321 27322 typedef void *kexec_load_t(struct kimage *, char *, long unsigned int, char *, long unsigned int, char *, long unsigned int); 27323 27324 struct kexec_file_ops; 27325 27326 struct kimage { 27327 kimage_entry_t head; 27328 kimage_entry_t *entry; 27329 kimage_entry_t *last_entry; 27330 long unsigned int start; 27331 struct page *control_code_page; 27332 struct page *swap_page; 27333 void *vmcoreinfo_data_copy; 27334 long unsigned int nr_segments; 27335 struct kexec_segment segment[16]; 27336 struct list_head control_pages; 27337 struct list_head dest_pages; 27338 struct list_head unusable_pages; 27339 long unsigned int control_page; 27340 unsigned int type: 1; 27341 unsigned int preserve_context: 1; 27342 unsigned int file_mode: 1; 27343 struct kimage_arch arch; 27344 void *kernel_buf; 27345 long unsigned int kernel_buf_len; 27346 void *initrd_buf; 27347 long unsigned int initrd_buf_len; 27348 char *cmdline_buf; 27349 long unsigned int cmdline_buf_len; 27350 const struct kexec_file_ops *fops; 27351 void *image_loader_data; 27352 struct purgatory_info purgatory_info; 27353 }; 27354 27355 typedef int kexec_cleanup_t(void *); 27356 27357 typedef int kexec_verify_sig_t(const char *, long unsigned int); 27358 27359 struct kexec_file_ops { 27360 kexec_probe_t *probe; 27361 kexec_load_t *load; 27362 kexec_cleanup_t *cleanup; 27363 kexec_verify_sig_t *verify_sig; 27364 }; 27365 27366 struct x86_mapping_info { 27367 void * (*alloc_pgt_page)(void *); 27368 void *context; 27369 long unsigned int page_flag; 27370 long unsigned int offset; 27371 bool direct_gbpages; 27372 long unsigned int kernpg_flag; 27373 }; 27374 27375 struct init_pgtable_data { 27376 struct x86_mapping_info *info; 27377 pgd_t *level4p; 27378 }; 27379 27380 typedef void crash_vmclear_fn(); 27381 27382 struct kexec_buf { 27383 struct kimage *image; 27384 void *buffer; 27385 long unsigned int bufsz; 27386 long unsigned int mem; 27387 long unsigned int memsz; 27388 long unsigned int buf_align; 27389 long unsigned int buf_min; 27390 long unsigned int buf_max; 27391 bool top_down; 27392 }; 27393 27394 struct crash_mem_range { 27395 u64 start; 27396 u64 end; 27397 }; 27398 27399 struct crash_mem { 27400 unsigned int max_nr_ranges; 27401 unsigned int nr_ranges; 27402 struct crash_mem_range ranges[0]; 27403 }; 27404 27405 struct crash_memmap_data { 27406 struct boot_params *params; 27407 unsigned int type; 27408 }; 27409 27410 struct kexec_entry64_regs { 27411 uint64_t rax; 27412 uint64_t rcx; 27413 uint64_t rdx; 27414 uint64_t rbx; 27415 uint64_t rsp; 27416 uint64_t rbp; 27417 uint64_t rsi; 27418 uint64_t rdi; 27419 uint64_t r8; 27420 uint64_t r9; 27421 uint64_t r10; 27422 uint64_t r11; 27423 uint64_t r12; 27424 uint64_t r13; 27425 uint64_t r14; 27426 uint64_t r15; 27427 uint64_t rip; 27428 }; 27429 27430 enum key_being_used_for { 27431 VERIFYING_MODULE_SIGNATURE = 0, 27432 VERIFYING_FIRMWARE_SIGNATURE = 1, 27433 VERIFYING_KEXEC_PE_SIGNATURE = 2, 27434 VERIFYING_KEY_SIGNATURE = 3, 27435 VERIFYING_KEY_SELF_SIGNATURE = 4, 27436 VERIFYING_UNSPECIFIED_SIGNATURE = 5, 27437 NR__KEY_BEING_USED_FOR = 6, 27438 }; 27439 27440 struct efi_setup_data { 27441 u64 fw_vendor; 27442 u64 __unused; 27443 u64 tables; 27444 u64 smbios; 27445 u64 reserved[8]; 27446 }; 27447 27448 struct bzimage64_data { 27449 void *bootparams_buf; 27450 }; 27451 27452 struct freelist_node { 27453 atomic_t refs; 27454 struct freelist_node *next; 27455 }; 27456 27457 struct freelist_head { 27458 struct freelist_node *head; 27459 }; 27460 27461 struct prev_kprobe { 27462 struct kprobe *kp; 27463 long unsigned int status; 27464 long unsigned int old_flags; 27465 long unsigned int saved_flags; 27466 }; 27467 27468 struct kprobe_ctlblk { 27469 long unsigned int kprobe_status; 27470 long unsigned int kprobe_old_flags; 27471 long unsigned int kprobe_saved_flags; 27472 struct prev_kprobe prev_kprobe; 27473 }; 27474 27475 struct kretprobe_instance; 27476 27477 typedef int (*kretprobe_handler_t)(struct kretprobe_instance *, struct pt_regs *); 27478 27479 struct kretprobe_holder; 27480 27481 struct kretprobe_instance { 27482 union { 27483 struct freelist_node freelist; 27484 struct callback_head rcu; 27485 }; 27486 struct llist_node llist; 27487 struct kretprobe_holder *rph; 27488 kprobe_opcode_t *ret_addr; 27489 void *fp; 27490 char data[0]; 27491 }; 27492 27493 struct kretprobe; 27494 27495 struct kretprobe_holder { 27496 struct kretprobe *rp; 27497 refcount_t ref; 27498 }; 27499 27500 struct kretprobe { 27501 struct kprobe kp; 27502 kretprobe_handler_t handler; 27503 kretprobe_handler_t entry_handler; 27504 int maxactive; 27505 int nmissed; 27506 size_t data_size; 27507 struct freelist_head freelist; 27508 struct kretprobe_holder *rph; 27509 }; 27510 27511 struct kretprobe_blackpoint { 27512 const char *name; 27513 void *addr; 27514 }; 27515 27516 struct kprobe_insn_cache { 27517 struct mutex mutex; 27518 void * (*alloc)(); 27519 void (*free)(void *); 27520 const char *sym; 27521 struct list_head pages; 27522 size_t insn_size; 27523 int nr_garbage; 27524 }; 27525 27526 struct __arch_relative_insn { 27527 u8 op; 27528 s32 raddr; 27529 } __attribute__((packed)); 27530 27531 struct arch_optimized_insn { 27532 kprobe_opcode_t copied_insn[4]; 27533 kprobe_opcode_t *insn; 27534 size_t size; 27535 }; 27536 27537 struct optimized_kprobe { 27538 struct kprobe kp; 27539 struct list_head list; 27540 struct arch_optimized_insn optinsn; 27541 }; 27542 27543 enum { 27544 TRACE_FTRACE_BIT = 0, 27545 TRACE_FTRACE_NMI_BIT = 1, 27546 TRACE_FTRACE_IRQ_BIT = 2, 27547 TRACE_FTRACE_SIRQ_BIT = 3, 27548 TRACE_INTERNAL_BIT = 4, 27549 TRACE_INTERNAL_NMI_BIT = 5, 27550 TRACE_INTERNAL_IRQ_BIT = 6, 27551 TRACE_INTERNAL_SIRQ_BIT = 7, 27552 TRACE_BRANCH_BIT = 8, 27553 TRACE_IRQ_BIT = 9, 27554 TRACE_GRAPH_BIT = 10, 27555 TRACE_GRAPH_DEPTH_START_BIT = 11, 27556 TRACE_GRAPH_DEPTH_END_BIT = 12, 27557 TRACE_GRAPH_NOTRACE_BIT = 13, 27558 TRACE_TRANSITION_BIT = 14, 27559 TRACE_RECORD_RECURSION_BIT = 15, 27560 }; 27561 27562 enum { 27563 TRACE_CTX_NMI = 0, 27564 TRACE_CTX_IRQ = 1, 27565 TRACE_CTX_SOFTIRQ = 2, 27566 TRACE_CTX_NORMAL = 3, 27567 }; 27568 27569 enum regnames { 27570 GDB_AX = 0, 27571 GDB_BX = 1, 27572 GDB_CX = 2, 27573 GDB_DX = 3, 27574 GDB_SI = 4, 27575 GDB_DI = 5, 27576 GDB_BP = 6, 27577 GDB_SP = 7, 27578 GDB_R8 = 8, 27579 GDB_R9 = 9, 27580 GDB_R10 = 10, 27581 GDB_R11 = 11, 27582 GDB_R12 = 12, 27583 GDB_R13 = 13, 27584 GDB_R14 = 14, 27585 GDB_R15 = 15, 27586 GDB_PC = 16, 27587 GDB_PS = 17, 27588 GDB_CS = 18, 27589 GDB_SS = 19, 27590 GDB_DS = 20, 27591 GDB_ES = 21, 27592 GDB_FS = 22, 27593 GDB_GS = 23, 27594 }; 27595 27596 enum kgdb_bpstate { 27597 BP_UNDEFINED = 0, 27598 BP_REMOVED = 1, 27599 BP_SET = 2, 27600 BP_ACTIVE = 3, 27601 }; 27602 27603 struct kgdb_bkpt { 27604 long unsigned int bpt_addr; 27605 unsigned char saved_instr[1]; 27606 enum kgdb_bptype type; 27607 enum kgdb_bpstate state; 27608 }; 27609 27610 struct dbg_reg_def_t { 27611 char *name; 27612 int size; 27613 int offset; 27614 }; 27615 27616 struct hw_breakpoint { 27617 unsigned int enabled; 27618 long unsigned int addr; 27619 int len; 27620 int type; 27621 struct perf_event **pev; 27622 }; 27623 27624 struct console { 27625 char name[16]; 27626 void (*write)(struct console *, const char *, unsigned int); 27627 int (*read)(struct console *, char *, unsigned int); 27628 struct tty_driver * (*device)(struct console *, int *); 27629 void (*unblank)(); 27630 int (*setup)(struct console *, char *); 27631 int (*exit)(struct console *); 27632 int (*match)(struct console *, char *, int, char *); 27633 short int flags; 27634 short int index; 27635 int cflag; 27636 void *data; 27637 struct console *next; 27638 }; 27639 27640 struct hpet_data { 27641 long unsigned int hd_phys_address; 27642 void *hd_address; 27643 short unsigned int hd_nirqs; 27644 unsigned int hd_state; 27645 unsigned int hd_irq[32]; 27646 }; 27647 27648 typedef irqreturn_t (*rtc_irq_handler)(int, void *); 27649 27650 enum hpet_mode { 27651 HPET_MODE_UNUSED = 0, 27652 HPET_MODE_LEGACY = 1, 27653 HPET_MODE_CLOCKEVT = 2, 27654 HPET_MODE_DEVICE = 3, 27655 }; 27656 27657 struct hpet_channel { 27658 struct clock_event_device evt; 27659 unsigned int num; 27660 unsigned int cpu; 27661 unsigned int irq; 27662 unsigned int in_use; 27663 enum hpet_mode mode; 27664 unsigned int boot_cfg; 27665 char name[10]; 27666 long: 48; 27667 long: 64; 27668 long: 64; 27669 long: 64; 27670 }; 27671 27672 struct hpet_base { 27673 unsigned int nr_channels; 27674 unsigned int nr_clockevents; 27675 unsigned int boot_cfg; 27676 struct hpet_channel *channels; 27677 }; 27678 27679 union hpet_lock { 27680 struct { 27681 arch_spinlock_t lock; 27682 u32 value; 27683 }; 27684 u64 lockval; 27685 }; 27686 27687 struct amd_nb_bus_dev_range { 27688 u8 bus; 27689 u8 dev_base; 27690 u8 dev_limit; 27691 }; 27692 27693 struct amd_northbridge_info { 27694 u16 num; 27695 u64 flags; 27696 struct amd_northbridge *nb; 27697 }; 27698 27699 struct swait_queue { 27700 struct task_struct *task; 27701 struct list_head task_list; 27702 }; 27703 27704 struct kvm_steal_time { 27705 __u64 steal; 27706 __u32 version; 27707 __u32 flags; 27708 __u8 preempted; 27709 __u8 u8_pad[3]; 27710 __u32 pad[11]; 27711 }; 27712 27713 struct kvm_vcpu_pv_apf_data { 27714 __u32 flags; 27715 __u32 token; 27716 __u8 pad[56]; 27717 __u32 enabled; 27718 }; 27719 27720 struct kvm_task_sleep_node { 27721 struct hlist_node link; 27722 struct swait_queue_head wq; 27723 u32 token; 27724 int cpu; 27725 }; 27726 27727 struct kvm_task_sleep_head { 27728 raw_spinlock_t lock; 27729 struct hlist_head list; 27730 }; 27731 27732 typedef struct ldttss_desc ldt_desc; 27733 27734 struct branch { 27735 unsigned char opcode; 27736 u32 delta; 27737 } __attribute__((packed)); 27738 27739 struct patch_xxl { 27740 const unsigned char irq_irq_disable[1]; 27741 const unsigned char irq_irq_enable[1]; 27742 const unsigned char irq_save_fl[2]; 27743 const unsigned char mmu_read_cr2[3]; 27744 const unsigned char mmu_read_cr3[3]; 27745 const unsigned char mmu_write_cr3[3]; 27746 const unsigned char irq_restore_fl[2]; 27747 const unsigned char cpu_wbinvd[2]; 27748 const unsigned char cpu_usergs_sysret64[6]; 27749 const unsigned char cpu_swapgs[3]; 27750 const unsigned char mov64[3]; 27751 }; 27752 27753 struct patch_lock { 27754 unsigned char queued_spin_unlock[3]; 27755 unsigned char vcpu_is_preempted[2]; 27756 }; 27757 27758 typedef long unsigned int ulong; 27759 27760 struct scan_area { 27761 u64 addr; 27762 u64 size; 27763 }; 27764 27765 struct uprobe_xol_ops; 27766 27767 struct arch_uprobe { 27768 union { 27769 u8 insn[16]; 27770 u8 ixol[16]; 27771 }; 27772 const struct uprobe_xol_ops *ops; 27773 union { 27774 struct { 27775 s32 offs; 27776 u8 ilen; 27777 u8 opc1; 27778 } branch; 27779 struct { 27780 u8 fixups; 27781 u8 ilen; 27782 } defparam; 27783 struct { 27784 u8 reg_offset; 27785 u8 ilen; 27786 } push; 27787 }; 27788 }; 27789 27790 struct uprobe_xol_ops { 27791 bool (*emulate)(struct arch_uprobe *, struct pt_regs *); 27792 int (*pre_xol)(struct arch_uprobe *, struct pt_regs *); 27793 int (*post_xol)(struct arch_uprobe *, struct pt_regs *); 27794 void (*abort)(struct arch_uprobe *, struct pt_regs *); 27795 }; 27796 27797 enum rp_check { 27798 RP_CHECK_CALL = 0, 27799 RP_CHECK_CHAIN_CALL = 1, 27800 RP_CHECK_RET = 2, 27801 }; 27802 27803 struct simplefb_platform_data { 27804 u32 width; 27805 u32 height; 27806 u32 stride; 27807 const char *format; 27808 }; 27809 27810 enum { 27811 M_I17 = 0, 27812 M_I20 = 1, 27813 M_I20_SR = 2, 27814 M_I24 = 3, 27815 M_I24_8_1 = 4, 27816 M_I24_10_1 = 5, 27817 M_I27_11_1 = 6, 27818 M_MINI = 7, 27819 M_MINI_3_1 = 8, 27820 M_MINI_4_1 = 9, 27821 M_MB = 10, 27822 M_MB_2 = 11, 27823 M_MB_3 = 12, 27824 M_MB_5_1 = 13, 27825 M_MB_6_1 = 14, 27826 M_MB_7_1 = 15, 27827 M_MB_SR = 16, 27828 M_MBA = 17, 27829 M_MBA_3 = 18, 27830 M_MBP = 19, 27831 M_MBP_2 = 20, 27832 M_MBP_2_2 = 21, 27833 M_MBP_SR = 22, 27834 M_MBP_4 = 23, 27835 M_MBP_5_1 = 24, 27836 M_MBP_5_2 = 25, 27837 M_MBP_5_3 = 26, 27838 M_MBP_6_1 = 27, 27839 M_MBP_6_2 = 28, 27840 M_MBP_7_1 = 29, 27841 M_MBP_8_2 = 30, 27842 M_UNKNOWN = 31, 27843 }; 27844 27845 struct efifb_dmi_info { 27846 char *optname; 27847 long unsigned int base; 27848 int stride; 27849 int width; 27850 int height; 27851 int flags; 27852 }; 27853 27854 enum { 27855 OVERRIDE_NONE = 0, 27856 OVERRIDE_BASE = 1, 27857 OVERRIDE_STRIDE = 2, 27858 OVERRIDE_HEIGHT = 4, 27859 OVERRIDE_WIDTH = 8, 27860 }; 27861 27862 enum perf_sample_regs_abi { 27863 PERF_SAMPLE_REGS_ABI_NONE = 0, 27864 PERF_SAMPLE_REGS_ABI_32 = 1, 27865 PERF_SAMPLE_REGS_ABI_64 = 2, 27866 }; 27867 27868 struct va_format { 27869 const char *fmt; 27870 va_list *va; 27871 }; 27872 27873 enum es_result { 27874 ES_OK = 0, 27875 ES_UNSUPPORTED = 1, 27876 ES_VMM_ERROR = 2, 27877 ES_DECODE_FAILED = 3, 27878 ES_EXCEPTION = 4, 27879 ES_RETRY = 5, 27880 }; 27881 27882 struct es_fault_info { 27883 long unsigned int vector; 27884 long unsigned int error_code; 27885 long unsigned int cr2; 27886 }; 27887 27888 struct es_em_ctxt { 27889 struct pt_regs *regs; 27890 struct insn insn; 27891 struct es_fault_info fi; 27892 }; 27893 27894 struct sev_es_runtime_data { 27895 struct ghcb ghcb_page; 27896 char ist_stack[4096]; 27897 char fallback_stack[4096]; 27898 struct ghcb backup_ghcb; 27899 bool ghcb_active; 27900 bool backup_ghcb_active; 27901 long unsigned int dr7; 27902 long: 64; 27903 long: 64; 27904 long: 64; 27905 long: 64; 27906 long: 64; 27907 long: 64; 27908 long: 64; 27909 long: 64; 27910 long: 64; 27911 long: 64; 27912 long: 64; 27913 long: 64; 27914 long: 64; 27915 long: 64; 27916 long: 64; 27917 long: 64; 27918 long: 64; 27919 long: 64; 27920 long: 64; 27921 long: 64; 27922 long: 64; 27923 long: 64; 27924 long: 64; 27925 long: 64; 27926 long: 64; 27927 long: 64; 27928 long: 64; 27929 long: 64; 27930 long: 64; 27931 long: 64; 27932 long: 64; 27933 long: 64; 27934 long: 64; 27935 long: 64; 27936 long: 64; 27937 long: 64; 27938 long: 64; 27939 long: 64; 27940 long: 64; 27941 long: 64; 27942 long: 64; 27943 long: 64; 27944 long: 64; 27945 long: 64; 27946 long: 64; 27947 long: 64; 27948 long: 64; 27949 long: 64; 27950 long: 64; 27951 long: 64; 27952 long: 64; 27953 long: 64; 27954 long: 64; 27955 long: 64; 27956 long: 64; 27957 long: 64; 27958 long: 64; 27959 long: 64; 27960 long: 64; 27961 long: 64; 27962 long: 64; 27963 long: 64; 27964 long: 64; 27965 long: 64; 27966 long: 64; 27967 long: 64; 27968 long: 64; 27969 long: 64; 27970 long: 64; 27971 long: 64; 27972 long: 64; 27973 long: 64; 27974 long: 64; 27975 long: 64; 27976 long: 64; 27977 long: 64; 27978 long: 64; 27979 long: 64; 27980 long: 64; 27981 long: 64; 27982 long: 64; 27983 long: 64; 27984 long: 64; 27985 long: 64; 27986 long: 64; 27987 long: 64; 27988 long: 64; 27989 long: 64; 27990 long: 64; 27991 long: 64; 27992 long: 64; 27993 long: 64; 27994 long: 64; 27995 long: 64; 27996 long: 64; 27997 long: 64; 27998 long: 64; 27999 long: 64; 28000 long: 64; 28001 long: 64; 28002 long: 64; 28003 long: 64; 28004 long: 64; 28005 long: 64; 28006 long: 64; 28007 long: 64; 28008 long: 64; 28009 long: 64; 28010 long: 64; 28011 long: 64; 28012 long: 64; 28013 long: 64; 28014 long: 64; 28015 long: 64; 28016 long: 64; 28017 long: 64; 28018 long: 64; 28019 long: 64; 28020 long: 64; 28021 long: 64; 28022 long: 64; 28023 long: 64; 28024 long: 64; 28025 long: 64; 28026 long: 64; 28027 long: 64; 28028 long: 64; 28029 long: 64; 28030 long: 64; 28031 long: 64; 28032 long: 64; 28033 long: 64; 28034 long: 64; 28035 long: 64; 28036 long: 64; 28037 long: 64; 28038 long: 64; 28039 long: 64; 28040 long: 64; 28041 long: 64; 28042 long: 64; 28043 long: 64; 28044 long: 64; 28045 long: 64; 28046 long: 64; 28047 long: 64; 28048 long: 64; 28049 long: 64; 28050 long: 64; 28051 long: 64; 28052 long: 64; 28053 long: 64; 28054 long: 64; 28055 long: 64; 28056 long: 64; 28057 long: 64; 28058 long: 64; 28059 long: 64; 28060 long: 64; 28061 long: 64; 28062 long: 64; 28063 long: 64; 28064 long: 64; 28065 long: 64; 28066 long: 64; 28067 long: 64; 28068 long: 64; 28069 long: 64; 28070 long: 64; 28071 long: 64; 28072 long: 64; 28073 long: 64; 28074 long: 64; 28075 long: 64; 28076 long: 64; 28077 long: 64; 28078 long: 64; 28079 long: 64; 28080 long: 64; 28081 long: 64; 28082 long: 64; 28083 long: 64; 28084 long: 64; 28085 long: 64; 28086 long: 64; 28087 long: 64; 28088 long: 64; 28089 long: 64; 28090 long: 64; 28091 long: 64; 28092 long: 64; 28093 long: 64; 28094 long: 64; 28095 long: 64; 28096 long: 64; 28097 long: 64; 28098 long: 64; 28099 long: 64; 28100 long: 64; 28101 long: 64; 28102 long: 64; 28103 long: 64; 28104 long: 64; 28105 long: 64; 28106 long: 64; 28107 long: 64; 28108 long: 64; 28109 long: 64; 28110 long: 64; 28111 long: 64; 28112 long: 64; 28113 long: 64; 28114 long: 64; 28115 long: 64; 28116 long: 64; 28117 long: 64; 28118 long: 64; 28119 long: 64; 28120 long: 64; 28121 long: 64; 28122 long: 64; 28123 long: 64; 28124 long: 64; 28125 long: 64; 28126 long: 64; 28127 long: 64; 28128 long: 64; 28129 long: 64; 28130 long: 64; 28131 long: 64; 28132 long: 64; 28133 long: 64; 28134 long: 64; 28135 long: 64; 28136 long: 64; 28137 long: 64; 28138 long: 64; 28139 long: 64; 28140 long: 64; 28141 long: 64; 28142 long: 64; 28143 long: 64; 28144 long: 64; 28145 long: 64; 28146 long: 64; 28147 long: 64; 28148 long: 64; 28149 long: 64; 28150 long: 64; 28151 long: 64; 28152 long: 64; 28153 long: 64; 28154 long: 64; 28155 long: 64; 28156 long: 64; 28157 long: 64; 28158 long: 64; 28159 long: 64; 28160 long: 64; 28161 long: 64; 28162 long: 64; 28163 long: 64; 28164 long: 64; 28165 long: 64; 28166 long: 64; 28167 long: 64; 28168 long: 64; 28169 long: 64; 28170 long: 64; 28171 long: 64; 28172 long: 64; 28173 long: 64; 28174 long: 64; 28175 long: 64; 28176 long: 64; 28177 long: 64; 28178 long: 64; 28179 long: 64; 28180 long: 64; 28181 long: 64; 28182 long: 64; 28183 long: 64; 28184 long: 64; 28185 long: 64; 28186 long: 64; 28187 long: 64; 28188 long: 64; 28189 long: 64; 28190 long: 64; 28191 long: 64; 28192 long: 64; 28193 long: 64; 28194 long: 64; 28195 long: 64; 28196 long: 64; 28197 long: 64; 28198 long: 64; 28199 long: 64; 28200 long: 64; 28201 long: 64; 28202 long: 64; 28203 long: 64; 28204 long: 64; 28205 long: 64; 28206 long: 64; 28207 long: 64; 28208 long: 64; 28209 long: 64; 28210 long: 64; 28211 long: 64; 28212 long: 64; 28213 long: 64; 28214 long: 64; 28215 long: 64; 28216 long: 64; 28217 long: 64; 28218 long: 64; 28219 long: 64; 28220 long: 64; 28221 long: 64; 28222 long: 64; 28223 long: 64; 28224 long: 64; 28225 long: 64; 28226 long: 64; 28227 long: 64; 28228 long: 64; 28229 long: 64; 28230 long: 64; 28231 long: 64; 28232 long: 64; 28233 long: 64; 28234 long: 64; 28235 long: 64; 28236 long: 64; 28237 long: 64; 28238 long: 64; 28239 long: 64; 28240 long: 64; 28241 long: 64; 28242 long: 64; 28243 long: 64; 28244 long: 64; 28245 long: 64; 28246 long: 64; 28247 long: 64; 28248 long: 64; 28249 long: 64; 28250 long: 64; 28251 long: 64; 28252 long: 64; 28253 long: 64; 28254 long: 64; 28255 long: 64; 28256 long: 64; 28257 long: 64; 28258 long: 64; 28259 long: 64; 28260 long: 64; 28261 long: 64; 28262 long: 64; 28263 long: 64; 28264 long: 64; 28265 long: 64; 28266 long: 64; 28267 long: 64; 28268 long: 64; 28269 long: 64; 28270 long: 64; 28271 long: 64; 28272 long: 64; 28273 long: 64; 28274 long: 64; 28275 long: 64; 28276 long: 64; 28277 long: 64; 28278 long: 64; 28279 long: 64; 28280 long: 64; 28281 long: 64; 28282 long: 64; 28283 long: 64; 28284 long: 64; 28285 long: 64; 28286 long: 64; 28287 long: 64; 28288 long: 64; 28289 long: 64; 28290 long: 64; 28291 long: 64; 28292 long: 64; 28293 long: 64; 28294 long: 64; 28295 long: 64; 28296 long: 64; 28297 long: 64; 28298 long: 64; 28299 long: 64; 28300 long: 64; 28301 long: 64; 28302 long: 64; 28303 long: 64; 28304 long: 64; 28305 long: 64; 28306 long: 64; 28307 long: 64; 28308 long: 64; 28309 long: 64; 28310 long: 64; 28311 long: 64; 28312 long: 64; 28313 long: 64; 28314 long: 64; 28315 long: 64; 28316 long: 64; 28317 long: 64; 28318 long: 64; 28319 long: 64; 28320 long: 64; 28321 long: 64; 28322 long: 64; 28323 long: 64; 28324 long: 64; 28325 long: 64; 28326 long: 64; 28327 long: 64; 28328 long: 64; 28329 long: 64; 28330 long: 64; 28331 long: 64; 28332 long: 64; 28333 long: 64; 28334 long: 64; 28335 long: 64; 28336 long: 64; 28337 long: 64; 28338 long: 64; 28339 long: 64; 28340 long: 64; 28341 long: 64; 28342 long: 64; 28343 long: 64; 28344 long: 64; 28345 long: 64; 28346 long: 64; 28347 long: 64; 28348 long: 64; 28349 long: 64; 28350 long: 64; 28351 long: 64; 28352 long: 64; 28353 long: 64; 28354 long: 64; 28355 long: 64; 28356 long: 64; 28357 long: 64; 28358 long: 64; 28359 long: 64; 28360 long: 64; 28361 long: 64; 28362 long: 64; 28363 long: 64; 28364 long: 64; 28365 long: 64; 28366 long: 64; 28367 long: 64; 28368 long: 64; 28369 long: 64; 28370 long: 64; 28371 long: 64; 28372 long: 64; 28373 long: 64; 28374 long: 64; 28375 long: 64; 28376 long: 64; 28377 long: 64; 28378 long: 64; 28379 long: 64; 28380 long: 64; 28381 long: 64; 28382 long: 64; 28383 long: 64; 28384 long: 64; 28385 long: 64; 28386 long: 64; 28387 long: 64; 28388 long: 64; 28389 long: 64; 28390 long: 64; 28391 long: 64; 28392 long: 64; 28393 long: 64; 28394 long: 64; 28395 long: 64; 28396 long: 64; 28397 long: 64; 28398 long: 64; 28399 long: 64; 28400 long: 64; 28401 long: 64; 28402 long: 64; 28403 long: 64; 28404 long: 64; 28405 long: 64; 28406 long: 64; 28407 long: 64; 28408 long: 64; 28409 long: 64; 28410 long: 64; 28411 long: 64; 28412 }; 28413 28414 struct ghcb_state { 28415 struct ghcb *ghcb; 28416 }; 28417 28418 struct pci_hostbridge_probe { 28419 u32 bus; 28420 u32 slot; 28421 u32 vendor; 28422 u32 device; 28423 }; 28424 28425 struct trace_print_flags { 28426 long unsigned int mask; 28427 const char *name; 28428 }; 28429 28430 enum tlb_flush_reason { 28431 TLB_FLUSH_ON_TASK_SWITCH = 0, 28432 TLB_REMOTE_SHOOTDOWN = 1, 28433 TLB_LOCAL_SHOOTDOWN = 2, 28434 TLB_LOCAL_MM_SHOOTDOWN = 3, 28435 TLB_REMOTE_SEND_IPI = 4, 28436 NR_TLB_FLUSH_REASONS = 5, 28437 }; 28438 28439 enum { 28440 REGION_INTERSECTS = 0, 28441 REGION_DISJOINT = 1, 28442 REGION_MIXED = 2, 28443 }; 28444 28445 struct trace_event_raw_tlb_flush { 28446 struct trace_entry ent; 28447 int reason; 28448 long unsigned int pages; 28449 char __data[0]; 28450 }; 28451 28452 struct trace_event_data_offsets_tlb_flush {}; 28453 28454 typedef void (*btf_trace_tlb_flush)(void *, int, long unsigned int); 28455 28456 struct map_range { 28457 long unsigned int start; 28458 long unsigned int end; 28459 unsigned int page_size_mask; 28460 }; 28461 28462 enum { 28463 MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE = 12, 28464 SECTION_INFO = 12, 28465 MIX_SECTION_INFO = 13, 28466 NODE_INFO = 14, 28467 MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE = 14, 28468 }; 28469 28470 struct mhp_params { 28471 struct vmem_altmap *altmap; 28472 pgprot_t pgprot; 28473 }; 28474 28475 struct mem_section_usage { 28476 long unsigned int subsection_map[1]; 28477 long unsigned int pageblock_flags[0]; 28478 }; 28479 28480 struct mem_section { 28481 long unsigned int section_mem_map; 28482 struct mem_section_usage *usage; 28483 }; 28484 28485 enum kcore_type { 28486 KCORE_TEXT = 0, 28487 KCORE_VMALLOC = 1, 28488 KCORE_RAM = 2, 28489 KCORE_VMEMMAP = 3, 28490 KCORE_USER = 4, 28491 KCORE_OTHER = 5, 28492 KCORE_REMAP = 6, 28493 }; 28494 28495 struct kcore_list { 28496 struct list_head list; 28497 long unsigned int addr; 28498 long unsigned int vaddr; 28499 size_t size; 28500 int type; 28501 }; 28502 28503 struct hstate { 28504 int next_nid_to_alloc; 28505 int next_nid_to_free; 28506 unsigned int order; 28507 long unsigned int mask; 28508 long unsigned int max_huge_pages; 28509 long unsigned int nr_huge_pages; 28510 long unsigned int free_huge_pages; 28511 long unsigned int resv_huge_pages; 28512 long unsigned int surplus_huge_pages; 28513 long unsigned int nr_overcommit_huge_pages; 28514 struct list_head hugepage_activelist; 28515 struct list_head hugepage_freelists[1024]; 28516 unsigned int nr_huge_pages_node[1024]; 28517 unsigned int free_huge_pages_node[1024]; 28518 unsigned int surplus_huge_pages_node[1024]; 28519 struct cftype cgroup_files_dfl[7]; 28520 struct cftype cgroup_files_legacy[9]; 28521 char name[32]; 28522 }; 28523 28524 struct trace_event_raw_x86_exceptions { 28525 struct trace_entry ent; 28526 long unsigned int address; 28527 long unsigned int ip; 28528 long unsigned int error_code; 28529 char __data[0]; 28530 }; 28531 28532 struct trace_event_data_offsets_x86_exceptions {}; 28533 28534 typedef void (*btf_trace_page_fault_user)(void *, long unsigned int, struct pt_regs *, long unsigned int); 28535 28536 typedef void (*btf_trace_page_fault_kernel)(void *, long unsigned int, struct pt_regs *, long unsigned int); 28537 28538 enum { 28539 IORES_MAP_SYSTEM_RAM = 1, 28540 IORES_MAP_ENCRYPTED = 2, 28541 }; 28542 28543 struct ioremap_desc { 28544 unsigned int flags; 28545 }; 28546 28547 typedef bool (*ex_handler_t)(const struct exception_table_entry *, struct pt_regs *, int, long unsigned int, long unsigned int); 28548 28549 struct hugepage_subpool { 28550 spinlock_t lock; 28551 long int count; 28552 long int max_hpages; 28553 long int used_hpages; 28554 struct hstate *hstate; 28555 long int min_hpages; 28556 long int rsv_hpages; 28557 }; 28558 28559 struct hugetlbfs_sb_info { 28560 long int max_inodes; 28561 long int free_inodes; 28562 spinlock_t stat_lock; 28563 struct hstate *hstate; 28564 struct hugepage_subpool *spool; 28565 kuid_t uid; 28566 kgid_t gid; 28567 umode_t mode; 28568 }; 28569 28570 typedef bool (*smp_cond_func_t)(int, void *); 28571 28572 struct exception_stacks { 28573 char DF_stack_guard[0]; 28574 char DF_stack[4096]; 28575 char NMI_stack_guard[0]; 28576 char NMI_stack[4096]; 28577 char DB_stack_guard[0]; 28578 char DB_stack[4096]; 28579 char MCE_stack_guard[0]; 28580 char MCE_stack[4096]; 28581 char VC_stack_guard[0]; 28582 char VC_stack[0]; 28583 char VC2_stack_guard[0]; 28584 char VC2_stack[0]; 28585 char IST_top_guard[0]; 28586 }; 28587 28588 struct cpa_data { 28589 long unsigned int *vaddr; 28590 pgd_t *pgd; 28591 pgprot_t mask_set; 28592 pgprot_t mask_clr; 28593 long unsigned int numpages; 28594 long unsigned int curpage; 28595 long unsigned int pfn; 28596 unsigned int flags; 28597 unsigned int force_split: 1; 28598 unsigned int force_static_prot: 1; 28599 unsigned int force_flush_all: 1; 28600 struct page **pages; 28601 }; 28602 28603 enum cpa_warn { 28604 CPA_CONFLICT = 0, 28605 CPA_PROTECT = 1, 28606 CPA_DETECT = 2, 28607 }; 28608 28609 typedef struct { 28610 u64 val; 28611 } pfn_t; 28612 28613 struct memtype { 28614 u64 start; 28615 u64 end; 28616 u64 subtree_max_end; 28617 enum page_cache_mode type; 28618 struct rb_node rb; 28619 }; 28620 28621 enum { 28622 PAT_UC = 0, 28623 PAT_WC = 1, 28624 PAT_WT = 4, 28625 PAT_WP = 5, 28626 PAT_WB = 6, 28627 PAT_UC_MINUS = 7, 28628 }; 28629 28630 struct pagerange_state { 28631 long unsigned int cur_pfn; 28632 int ram; 28633 int not_ram; 28634 }; 28635 28636 struct rb_augment_callbacks { 28637 void (*propagate)(struct rb_node *, struct rb_node *); 28638 void (*copy)(struct rb_node *, struct rb_node *); 28639 void (*rotate)(struct rb_node *, struct rb_node *); 28640 }; 28641 28642 enum { 28643 MEMTYPE_EXACT_MATCH = 0, 28644 MEMTYPE_END_MATCH = 1, 28645 }; 28646 28647 struct ptdump_range { 28648 long unsigned int start; 28649 long unsigned int end; 28650 }; 28651 28652 struct ptdump_state { 28653 void (*note_page)(struct ptdump_state *, long unsigned int, int, u64); 28654 void (*effective_prot)(struct ptdump_state *, int, u64); 28655 const struct ptdump_range *range; 28656 }; 28657 28658 struct addr_marker; 28659 28660 struct pg_state { 28661 struct ptdump_state ptdump; 28662 int level; 28663 pgprotval_t current_prot; 28664 pgprotval_t effective_prot; 28665 pgprotval_t prot_levels[5]; 28666 long unsigned int start_address; 28667 const struct addr_marker *marker; 28668 long unsigned int lines; 28669 bool to_dmesg; 28670 bool check_wx; 28671 long unsigned int wx_pages; 28672 struct seq_file *seq; 28673 }; 28674 28675 struct addr_marker { 28676 long unsigned int start_address; 28677 const char *name; 28678 long unsigned int max_lines; 28679 }; 28680 28681 enum address_markers_idx { 28682 USER_SPACE_NR = 0, 28683 KERNEL_SPACE_NR = 1, 28684 LDT_NR = 2, 28685 LOW_KERNEL_NR = 3, 28686 VMALLOC_START_NR = 4, 28687 VMEMMAP_START_NR = 5, 28688 CPU_ENTRY_AREA_NR = 6, 28689 ESPFIX_START_NR = 7, 28690 EFI_END_NR = 8, 28691 HIGH_KERNEL_NR = 9, 28692 MODULES_VADDR_NR = 10, 28693 MODULES_END_NR = 11, 28694 FIXADDR_START_NR = 12, 28695 END_OF_SPACE_NR = 13, 28696 }; 28697 28698 typedef void (*rcu_callback_t)(struct callback_head *); 28699 28700 struct kmmio_probe; 28701 28702 typedef void (*kmmio_pre_handler_t)(struct kmmio_probe *, struct pt_regs *, long unsigned int); 28703 28704 typedef void (*kmmio_post_handler_t)(struct kmmio_probe *, long unsigned int, struct pt_regs *); 28705 28706 struct kmmio_probe { 28707 struct list_head list; 28708 long unsigned int addr; 28709 long unsigned int len; 28710 kmmio_pre_handler_t pre_handler; 28711 kmmio_post_handler_t post_handler; 28712 void *private; 28713 }; 28714 28715 struct kmmio_fault_page { 28716 struct list_head list; 28717 struct kmmio_fault_page *release_next; 28718 long unsigned int addr; 28719 pteval_t old_presence; 28720 bool armed; 28721 int count; 28722 bool scheduled_for_release; 28723 }; 28724 28725 struct kmmio_delayed_release { 28726 struct callback_head rcu; 28727 struct kmmio_fault_page *release_list; 28728 }; 28729 28730 struct kmmio_context { 28731 struct kmmio_fault_page *fpage; 28732 struct kmmio_probe *probe; 28733 long unsigned int saved_flags; 28734 long unsigned int addr; 28735 int active; 28736 }; 28737 28738 enum reason_type { 28739 NOT_ME = 0, 28740 NOTHING = 1, 28741 REG_READ = 2, 28742 REG_WRITE = 3, 28743 IMM_WRITE = 4, 28744 OTHERS = 5, 28745 }; 28746 28747 struct prefix_bits { 28748 unsigned int shorted: 1; 28749 unsigned int enlarged: 1; 28750 unsigned int rexr: 1; 28751 unsigned int rex: 1; 28752 }; 28753 28754 enum { 28755 arg_AL = 0, 28756 arg_CL = 1, 28757 arg_DL = 2, 28758 arg_BL = 3, 28759 arg_AH = 4, 28760 arg_CH = 5, 28761 arg_DH = 6, 28762 arg_BH = 7, 28763 arg_AX = 0, 28764 arg_CX = 1, 28765 arg_DX = 2, 28766 arg_BX = 3, 28767 arg_SP = 4, 28768 arg_BP = 5, 28769 arg_SI = 6, 28770 arg_DI = 7, 28771 arg_R8 = 8, 28772 arg_R9 = 9, 28773 arg_R10 = 10, 28774 arg_R11 = 11, 28775 arg_R12 = 12, 28776 arg_R13 = 13, 28777 arg_R14 = 14, 28778 arg_R15 = 15, 28779 }; 28780 28781 enum mm_io_opcode { 28782 MMIO_READ = 1, 28783 MMIO_WRITE = 2, 28784 MMIO_PROBE = 3, 28785 MMIO_UNPROBE = 4, 28786 MMIO_UNKNOWN_OP = 5, 28787 }; 28788 28789 struct mmiotrace_rw { 28790 resource_size_t phys; 28791 long unsigned int value; 28792 long unsigned int pc; 28793 int map_id; 28794 unsigned char opcode; 28795 unsigned char width; 28796 }; 28797 28798 struct mmiotrace_map { 28799 resource_size_t phys; 28800 long unsigned int virt; 28801 long unsigned int len; 28802 int map_id; 28803 unsigned char opcode; 28804 }; 28805 28806 struct trap_reason { 28807 long unsigned int addr; 28808 long unsigned int ip; 28809 enum reason_type type; 28810 int active_traces; 28811 }; 28812 28813 struct remap_trace { 28814 struct list_head list; 28815 struct kmmio_probe probe; 28816 resource_size_t phys; 28817 long unsigned int id; 28818 }; 28819 28820 struct numa_memblk { 28821 u64 start; 28822 u64 end; 28823 int nid; 28824 }; 28825 28826 struct numa_meminfo { 28827 int nr_blks; 28828 struct numa_memblk blk[2048]; 28829 }; 28830 28831 struct acpi_srat_cpu_affinity { 28832 struct acpi_subtable_header header; 28833 u8 proximity_domain_lo; 28834 u8 apic_id; 28835 u32 flags; 28836 u8 local_sapic_eid; 28837 u8 proximity_domain_hi[3]; 28838 u32 clock_domain; 28839 }; 28840 28841 struct acpi_srat_x2apic_cpu_affinity { 28842 struct acpi_subtable_header header; 28843 u16 reserved; 28844 u32 proximity_domain; 28845 u32 apic_id; 28846 u32 flags; 28847 u32 clock_domain; 28848 u32 reserved2; 28849 }; 28850 28851 struct rnd_state { 28852 __u32 s1; 28853 __u32 s2; 28854 __u32 s3; 28855 __u32 s4; 28856 }; 28857 28858 struct kaslr_memory_region { 28859 long unsigned int *base; 28860 long unsigned int size_tb; 28861 }; 28862 28863 enum pti_mode { 28864 PTI_AUTO = 0, 28865 PTI_FORCE_OFF = 1, 28866 PTI_FORCE_ON = 2, 28867 }; 28868 28869 enum pti_clone_level { 28870 PTI_CLONE_PMD = 0, 28871 PTI_CLONE_PTE = 1, 28872 }; 28873 28874 struct sme_populate_pgd_data { 28875 void *pgtable_area; 28876 pgd_t *pgd; 28877 pmdval_t pmd_flags; 28878 pteval_t pte_flags; 28879 long unsigned int paddr; 28880 long unsigned int vaddr; 28881 long unsigned int vaddr_end; 28882 }; 28883 28884 typedef __u64 __le64; 28885 28886 typedef struct { 28887 u64 a; 28888 u64 b; 28889 } u128; 28890 28891 typedef struct { 28892 __be64 a; 28893 __be64 b; 28894 } be128; 28895 28896 typedef struct { 28897 __le64 b; 28898 __le64 a; 28899 } le128; 28900 28901 struct crypto_async_request; 28902 28903 typedef void (*crypto_completion_t)(struct crypto_async_request *, int); 28904 28905 struct crypto_async_request { 28906 struct list_head list; 28907 crypto_completion_t complete; 28908 void *data; 28909 struct crypto_tfm *tfm; 28910 u32 flags; 28911 }; 28912 28913 struct crypto_template; 28914 28915 struct crypto_spawn; 28916 28917 struct crypto_instance { 28918 struct crypto_alg alg; 28919 struct crypto_template *tmpl; 28920 union { 28921 struct hlist_node list; 28922 struct crypto_spawn *spawns; 28923 }; 28924 void *__ctx[0]; 28925 }; 28926 28927 struct crypto_spawn { 28928 struct list_head list; 28929 struct crypto_alg *alg; 28930 union { 28931 struct crypto_instance *inst; 28932 struct crypto_spawn *next; 28933 }; 28934 const struct crypto_type *frontend; 28935 u32 mask; 28936 bool dead; 28937 bool registered; 28938 }; 28939 28940 struct rtattr; 28941 28942 struct crypto_template { 28943 struct list_head list; 28944 struct hlist_head instances; 28945 struct module *module; 28946 int (*create)(struct crypto_template *, struct rtattr **); 28947 char name[128]; 28948 }; 28949 28950 struct scatter_walk { 28951 struct scatterlist *sg; 28952 unsigned int offset; 28953 }; 28954 28955 struct skcipher_request { 28956 unsigned int cryptlen; 28957 u8 *iv; 28958 struct scatterlist *src; 28959 struct scatterlist *dst; 28960 struct crypto_async_request base; 28961 void *__ctx[0]; 28962 }; 28963 28964 struct crypto_skcipher { 28965 unsigned int reqsize; 28966 struct crypto_tfm base; 28967 }; 28968 28969 struct skcipher_walk { 28970 union { 28971 struct { 28972 struct page *page; 28973 long unsigned int offset; 28974 } phys; 28975 struct { 28976 u8 *page; 28977 void *addr; 28978 } virt; 28979 } src; 28980 union { 28981 struct { 28982 struct page *page; 28983 long unsigned int offset; 28984 } phys; 28985 struct { 28986 u8 *page; 28987 void *addr; 28988 } virt; 28989 } dst; 28990 struct scatter_walk in; 28991 unsigned int nbytes; 28992 struct scatter_walk out; 28993 unsigned int total; 28994 struct list_head buffers; 28995 u8 *page; 28996 u8 *buffer; 28997 u8 *oiv; 28998 void *iv; 28999 unsigned int ivsize; 29000 int flags; 29001 unsigned int blocksize; 29002 unsigned int stride; 29003 unsigned int alignmask; 29004 }; 29005 29006 typedef void (*common_glue_func_t)(const void *, u8 *, const u8 *); 29007 29008 typedef void (*common_glue_cbc_func_t)(const void *, u8 *, const u8 *); 29009 29010 typedef void (*common_glue_ctr_func_t)(const void *, u8 *, const u8 *, le128 *); 29011 29012 typedef void (*common_glue_xts_func_t)(const void *, u8 *, const u8 *, le128 *); 29013 29014 struct common_glue_func_entry { 29015 unsigned int num_blocks; 29016 union { 29017 common_glue_func_t ecb; 29018 common_glue_cbc_func_t cbc; 29019 common_glue_ctr_func_t ctr; 29020 common_glue_xts_func_t xts; 29021 } fn_u; 29022 }; 29023 29024 struct common_glue_ctx { 29025 unsigned int num_funcs; 29026 int fpu_blocks_limit; 29027 struct common_glue_func_entry funcs[0]; 29028 }; 29029 29030 struct crypto_aes_ctx { 29031 u32 key_enc[60]; 29032 u32 key_dec[60]; 29033 u32 key_length; 29034 }; 29035 29036 struct skcipher_alg { 29037 int (*setkey)(struct crypto_skcipher *, const u8 *, unsigned int); 29038 int (*encrypt)(struct skcipher_request *); 29039 int (*decrypt)(struct skcipher_request *); 29040 int (*init)(struct crypto_skcipher *); 29041 void (*exit)(struct crypto_skcipher *); 29042 unsigned int min_keysize; 29043 unsigned int max_keysize; 29044 unsigned int ivsize; 29045 unsigned int chunksize; 29046 unsigned int walksize; 29047 struct crypto_alg base; 29048 }; 29049 29050 struct aead_request { 29051 struct crypto_async_request base; 29052 unsigned int assoclen; 29053 unsigned int cryptlen; 29054 u8 *iv; 29055 struct scatterlist *src; 29056 struct scatterlist *dst; 29057 void *__ctx[0]; 29058 }; 29059 29060 struct crypto_aead; 29061 29062 struct aead_alg { 29063 int (*setkey)(struct crypto_aead *, const u8 *, unsigned int); 29064 int (*setauthsize)(struct crypto_aead *, unsigned int); 29065 int (*encrypt)(struct aead_request *); 29066 int (*decrypt)(struct aead_request *); 29067 int (*init)(struct crypto_aead *); 29068 void (*exit)(struct crypto_aead *); 29069 unsigned int ivsize; 29070 unsigned int maxauthsize; 29071 unsigned int chunksize; 29072 struct crypto_alg base; 29073 }; 29074 29075 struct crypto_aead { 29076 unsigned int authsize; 29077 unsigned int reqsize; 29078 struct crypto_tfm base; 29079 }; 29080 29081 struct aesni_rfc4106_gcm_ctx { 29082 u8 hash_subkey[16]; 29083 struct crypto_aes_ctx aes_key_expanded; 29084 u8 nonce[4]; 29085 long: 64; 29086 }; 29087 29088 struct generic_gcmaes_ctx { 29089 u8 hash_subkey[16]; 29090 struct crypto_aes_ctx aes_key_expanded; 29091 long: 32; 29092 long: 64; 29093 }; 29094 29095 struct aesni_xts_ctx { 29096 u8 raw_tweak_ctx[484]; 29097 long: 32; 29098 long: 64; 29099 u8 raw_crypt_ctx[484]; 29100 long: 32; 29101 long: 64; 29102 }; 29103 29104 struct gcm_context_data { 29105 u8 aad_hash[16]; 29106 u64 aad_length; 29107 u64 in_length; 29108 u8 partial_block_enc_key[16]; 29109 u8 orig_IV[16]; 29110 u8 current_counter[16]; 29111 u64 partial_block_len; 29112 u64 unused; 29113 u8 hash_keys[256]; 29114 }; 29115 29116 struct aesni_gcm_tfm_s { 29117 void (*init)(void *, struct gcm_context_data *, u8 *, u8 *, const u8 *, long unsigned int); 29118 void (*enc_update)(void *, struct gcm_context_data *, u8 *, const u8 *, long unsigned int); 29119 void (*dec_update)(void *, struct gcm_context_data *, u8 *, const u8 *, long unsigned int); 29120 void (*finalize)(void *, struct gcm_context_data *, u8 *, long unsigned int); 29121 }; 29122 29123 struct simd_skcipher_alg; 29124 29125 struct simd_aead_alg; 29126 29127 struct sigcontext_32 { 29128 __u16 gs; 29129 __u16 __gsh; 29130 __u16 fs; 29131 __u16 __fsh; 29132 __u16 es; 29133 __u16 __esh; 29134 __u16 ds; 29135 __u16 __dsh; 29136 __u32 di; 29137 __u32 si; 29138 __u32 bp; 29139 __u32 sp; 29140 __u32 bx; 29141 __u32 dx; 29142 __u32 cx; 29143 __u32 ax; 29144 __u32 trapno; 29145 __u32 err; 29146 __u32 ip; 29147 __u16 cs; 29148 __u16 __csh; 29149 __u32 flags; 29150 __u32 sp_at_signal; 29151 __u16 ss; 29152 __u16 __ssh; 29153 __u32 fpstate; 29154 __u32 oldmask; 29155 __u32 cr2; 29156 }; 29157 29158 typedef u32 compat_size_t; 29159 29160 struct compat_sigaltstack { 29161 compat_uptr_t ss_sp; 29162 int ss_flags; 29163 compat_size_t ss_size; 29164 }; 29165 29166 typedef struct compat_sigaltstack compat_stack_t; 29167 29168 struct ucontext_ia32 { 29169 unsigned int uc_flags; 29170 unsigned int uc_link; 29171 compat_stack_t uc_stack; 29172 struct sigcontext_32 uc_mcontext; 29173 compat_sigset_t uc_sigmask; 29174 }; 29175 29176 struct sigframe_ia32 { 29177 u32 pretcode; 29178 int sig; 29179 struct sigcontext_32 sc; 29180 struct _fpstate_32 fpstate_unused; 29181 unsigned int extramask[1]; 29182 char retcode[8]; 29183 }; 29184 29185 struct rt_sigframe_ia32 { 29186 u32 pretcode; 29187 int sig; 29188 u32 pinfo; 29189 u32 puc; 29190 compat_siginfo_t info; 29191 struct ucontext_ia32 uc; 29192 char retcode[8]; 29193 }; 29194 29195 typedef struct { 29196 efi_guid_t guid; 29197 u64 table; 29198 } efi_config_table_64_t; 29199 29200 struct efi_memory_map_data { 29201 phys_addr_t phys_map; 29202 long unsigned int size; 29203 long unsigned int desc_version; 29204 long unsigned int desc_size; 29205 long unsigned int flags; 29206 }; 29207 29208 struct efi_mem_range { 29209 struct range range; 29210 u64 attribute; 29211 }; 29212 29213 enum efi_rts_ids { 29214 EFI_NONE = 0, 29215 EFI_GET_TIME = 1, 29216 EFI_SET_TIME = 2, 29217 EFI_GET_WAKEUP_TIME = 3, 29218 EFI_SET_WAKEUP_TIME = 4, 29219 EFI_GET_VARIABLE = 5, 29220 EFI_GET_NEXT_VARIABLE = 6, 29221 EFI_SET_VARIABLE = 7, 29222 EFI_QUERY_VARIABLE_INFO = 8, 29223 EFI_GET_NEXT_HIGH_MONO_COUNT = 9, 29224 EFI_RESET_SYSTEM = 10, 29225 EFI_UPDATE_CAPSULE = 11, 29226 EFI_QUERY_CAPSULE_CAPS = 12, 29227 }; 29228 29229 struct efi_runtime_work { 29230 void *arg1; 29231 void *arg2; 29232 void *arg3; 29233 void *arg4; 29234 void *arg5; 29235 efi_status_t status; 29236 struct work_struct work; 29237 enum efi_rts_ids efi_rts_id; 29238 struct completion efi_rts_comp; 29239 }; 29240 29241 struct efi_scratch { 29242 u64 phys_stack; 29243 struct mm_struct *prev_mm; 29244 }; 29245 29246 typedef struct { 29247 efi_guid_t guid; 29248 u32 table; 29249 } efi_config_table_32_t; 29250 29251 typedef union { 29252 struct { 29253 efi_guid_t guid; 29254 void *table; 29255 }; 29256 efi_config_table_32_t mixed_mode; 29257 } efi_config_table_t; 29258 29259 typedef struct { 29260 efi_guid_t guid; 29261 long unsigned int *ptr; 29262 const char name[16]; 29263 } efi_config_table_type_t; 29264 29265 typedef struct { 29266 efi_table_hdr_t hdr; 29267 u64 fw_vendor; 29268 u32 fw_revision; 29269 u32 __pad1; 29270 u64 con_in_handle; 29271 u64 con_in; 29272 u64 con_out_handle; 29273 u64 con_out; 29274 u64 stderr_handle; 29275 u64 stderr; 29276 u64 runtime; 29277 u64 boottime; 29278 u32 nr_tables; 29279 u32 __pad2; 29280 u64 tables; 29281 } efi_system_table_64_t; 29282 29283 typedef struct { 29284 u32 version; 29285 u32 length; 29286 u64 memory_protection_attribute; 29287 } efi_properties_table_t; 29288 29289 typedef int (*efi_memattr_perm_setter)(struct mm_struct *, efi_memory_desc_t *); 29290 29291 typedef u16 ucs2_char_t; 29292 29293 struct pm_qos_request { 29294 struct plist_node node; 29295 struct pm_qos_constraints *qos; 29296 }; 29297 29298 struct semaphore { 29299 raw_spinlock_t lock; 29300 unsigned int count; 29301 struct list_head wait_list; 29302 }; 29303 29304 enum uv_bios_cmd { 29305 UV_BIOS_COMMON = 0, 29306 UV_BIOS_GET_SN_INFO = 1, 29307 UV_BIOS_FREQ_BASE = 2, 29308 UV_BIOS_WATCHLIST_ALLOC = 3, 29309 UV_BIOS_WATCHLIST_FREE = 4, 29310 UV_BIOS_MEMPROTECT = 5, 29311 UV_BIOS_GET_PARTITION_ADDR = 6, 29312 UV_BIOS_SET_LEGACY_VGA_TARGET = 7, 29313 }; 29314 29315 union partition_info_u { 29316 u64 val; 29317 struct { 29318 u64 hub_version: 8; 29319 u64 partition_id: 16; 29320 u64 coherence_id: 16; 29321 u64 region_size: 24; 29322 }; 29323 }; 29324 29325 enum uv_memprotect { 29326 UV_MEMPROT_RESTRICT_ACCESS = 0, 29327 UV_MEMPROT_ALLOW_AMO = 1, 29328 UV_MEMPROT_ALLOW_RW = 2, 29329 }; 29330 29331 struct uv_IO_APIC_route_entry { 29332 __u64 vector: 8; 29333 __u64 delivery_mode: 3; 29334 __u64 dest_mode: 1; 29335 __u64 delivery_status: 1; 29336 __u64 polarity: 1; 29337 __u64 __reserved_1: 1; 29338 __u64 trigger: 1; 29339 __u64 mask: 1; 29340 __u64 __reserved_2: 15; 29341 __u64 dest: 32; 29342 }; 29343 29344 enum { 29345 UV_AFFINITY_ALL = 0, 29346 UV_AFFINITY_NODE = 1, 29347 UV_AFFINITY_CPU = 2, 29348 }; 29349 29350 struct uv_irq_2_mmr_pnode { 29351 long unsigned int offset; 29352 int pnode; 29353 }; 29354 29355 struct uv_rtc_timer_head { 29356 spinlock_t lock; 29357 int next_cpu; 29358 int ncpus; 29359 struct { 29360 int lcpu; 29361 u64 expires; 29362 } cpu[0]; 29363 }; 29364 29365 struct uv_hub_nmi_s { 29366 raw_spinlock_t nmi_lock; 29367 atomic_t in_nmi; 29368 atomic_t cpu_owner; 29369 atomic_t read_mmr_count; 29370 atomic_t nmi_count; 29371 long unsigned int nmi_value; 29372 bool hub_present; 29373 bool pch_owner; 29374 }; 29375 29376 struct uv_cpu_nmi_s { 29377 struct uv_hub_nmi_s *hub; 29378 int state; 29379 int pinging; 29380 int queries; 29381 int pings; 29382 }; 29383 29384 struct nmi_action { 29385 char *action; 29386 char *desc; 29387 }; 29388 29389 typedef char action_t[16]; 29390 29391 struct init_nmi { 29392 unsigned int offset; 29393 unsigned int mask; 29394 unsigned int data; 29395 }; 29396 29397 enum { 29398 BPF_REG_0 = 0, 29399 BPF_REG_1 = 1, 29400 BPF_REG_2 = 2, 29401 BPF_REG_3 = 3, 29402 BPF_REG_4 = 4, 29403 BPF_REG_5 = 5, 29404 BPF_REG_6 = 6, 29405 BPF_REG_7 = 7, 29406 BPF_REG_8 = 8, 29407 BPF_REG_9 = 9, 29408 BPF_REG_10 = 10, 29409 __MAX_BPF_REG = 11, 29410 }; 29411 29412 struct bpf_tramp_progs { 29413 struct bpf_prog *progs[40]; 29414 int nr_progs; 29415 }; 29416 29417 enum bpf_jit_poke_reason { 29418 BPF_POKE_REASON_TAIL_CALL = 0, 29419 }; 29420 29421 struct bpf_array_aux { 29422 enum bpf_prog_type type; 29423 bool jited; 29424 struct list_head poke_progs; 29425 struct bpf_map *map; 29426 struct mutex poke_mutex; 29427 struct work_struct work; 29428 }; 29429 29430 struct bpf_array { 29431 struct bpf_map map; 29432 u32 elem_size; 29433 u32 index_mask; 29434 struct bpf_array_aux *aux; 29435 union { 29436 char value[0]; 29437 void *ptrs[0]; 29438 void *pptrs[0]; 29439 }; 29440 long: 64; 29441 long: 64; 29442 long: 64; 29443 long: 64; 29444 long: 64; 29445 long: 64; 29446 }; 29447 29448 enum bpf_text_poke_type { 29449 BPF_MOD_CALL = 0, 29450 BPF_MOD_JUMP = 1, 29451 }; 29452 29453 struct bpf_binary_header { 29454 u32 pages; 29455 int: 32; 29456 u8 image[0]; 29457 }; 29458 29459 typedef void (*bpf_jit_fill_hole_t)(void *, unsigned int); 29460 29461 struct jit_context { 29462 int cleanup_addr; 29463 }; 29464 29465 struct x64_jit_data { 29466 struct bpf_binary_header *header; 29467 int *addrs; 29468 u8 *image; 29469 int proglen; 29470 struct jit_context ctx; 29471 }; 29472 29473 enum tk_offsets { 29474 TK_OFFS_REAL = 0, 29475 TK_OFFS_BOOT = 1, 29476 TK_OFFS_TAI = 2, 29477 TK_OFFS_MAX = 3, 29478 }; 29479 29480 typedef long unsigned int vm_flags_t; 29481 29482 struct clone_args { 29483 __u64 flags; 29484 __u64 pidfd; 29485 __u64 child_tid; 29486 __u64 parent_tid; 29487 __u64 exit_signal; 29488 __u64 stack; 29489 __u64 stack_size; 29490 __u64 tls; 29491 __u64 set_tid; 29492 __u64 set_tid_size; 29493 __u64 cgroup; 29494 }; 29495 29496 enum hrtimer_mode { 29497 HRTIMER_MODE_ABS = 0, 29498 HRTIMER_MODE_REL = 1, 29499 HRTIMER_MODE_PINNED = 2, 29500 HRTIMER_MODE_SOFT = 4, 29501 HRTIMER_MODE_HARD = 8, 29502 HRTIMER_MODE_ABS_PINNED = 2, 29503 HRTIMER_MODE_REL_PINNED = 3, 29504 HRTIMER_MODE_ABS_SOFT = 4, 29505 HRTIMER_MODE_REL_SOFT = 5, 29506 HRTIMER_MODE_ABS_PINNED_SOFT = 6, 29507 HRTIMER_MODE_REL_PINNED_SOFT = 7, 29508 HRTIMER_MODE_ABS_HARD = 8, 29509 HRTIMER_MODE_REL_HARD = 9, 29510 HRTIMER_MODE_ABS_PINNED_HARD = 10, 29511 HRTIMER_MODE_REL_PINNED_HARD = 11, 29512 }; 29513 29514 struct fdtable { 29515 unsigned int max_fds; 29516 struct file **fd; 29517 long unsigned int *close_on_exec; 29518 long unsigned int *open_fds; 29519 long unsigned int *full_fds_bits; 29520 struct callback_head rcu; 29521 }; 29522 29523 struct files_struct { 29524 atomic_t count; 29525 bool resize_in_progress; 29526 wait_queue_head_t resize_wait; 29527 struct fdtable *fdt; 29528 struct fdtable fdtab; 29529 long: 64; 29530 long: 64; 29531 long: 64; 29532 long: 64; 29533 spinlock_t file_lock; 29534 unsigned int next_fd; 29535 long unsigned int close_on_exec_init[1]; 29536 long unsigned int open_fds_init[1]; 29537 long unsigned int full_fds_bits_init[1]; 29538 struct file *fd_array[64]; 29539 long: 64; 29540 long: 64; 29541 long: 64; 29542 long: 64; 29543 }; 29544 29545 struct io_identity { 29546 struct files_struct *files; 29547 struct mm_struct *mm; 29548 struct cgroup_subsys_state *blkcg_css; 29549 const struct cred *creds; 29550 struct nsproxy *nsproxy; 29551 struct fs_struct *fs; 29552 long unsigned int fsize; 29553 kuid_t loginuid; 29554 unsigned int sessionid; 29555 refcount_t count; 29556 }; 29557 29558 struct io_uring_task { 29559 struct xarray xa; 29560 struct wait_queue_head wait; 29561 struct file *last; 29562 struct percpu_counter inflight; 29563 struct io_identity __identity; 29564 struct io_identity *identity; 29565 atomic_t in_idle; 29566 bool sqpoll; 29567 }; 29568 29569 struct robust_list { 29570 struct robust_list *next; 29571 }; 29572 29573 struct robust_list_head { 29574 struct robust_list list; 29575 long int futex_offset; 29576 struct robust_list *list_op_pending; 29577 }; 29578 29579 struct multiprocess_signals { 29580 sigset_t signal; 29581 struct hlist_node node; 29582 }; 29583 29584 typedef int (*proc_visitor)(struct task_struct *, void *); 29585 29586 enum { 29587 IOPRIO_CLASS_NONE = 0, 29588 IOPRIO_CLASS_RT = 1, 29589 IOPRIO_CLASS_BE = 2, 29590 IOPRIO_CLASS_IDLE = 3, 29591 }; 29592 29593 enum { 29594 FUTEX_STATE_OK = 0, 29595 FUTEX_STATE_EXITING = 1, 29596 FUTEX_STATE_DEAD = 2, 29597 }; 29598 29599 enum proc_hidepid { 29600 HIDEPID_OFF = 0, 29601 HIDEPID_NO_ACCESS = 1, 29602 HIDEPID_INVISIBLE = 2, 29603 HIDEPID_NOT_PTRACEABLE = 4, 29604 }; 29605 29606 enum proc_pidonly { 29607 PROC_PIDONLY_OFF = 0, 29608 PROC_PIDONLY_ON = 1, 29609 }; 29610 29611 struct proc_fs_info { 29612 struct pid_namespace *pid_ns; 29613 struct dentry *proc_self; 29614 struct dentry *proc_thread_self; 29615 kgid_t pid_gid; 29616 enum proc_hidepid hide_pid; 29617 enum proc_pidonly pidonly; 29618 }; 29619 29620 struct trace_event_raw_task_newtask { 29621 struct trace_entry ent; 29622 pid_t pid; 29623 char comm[16]; 29624 long unsigned int clone_flags; 29625 short int oom_score_adj; 29626 char __data[0]; 29627 }; 29628 29629 struct trace_event_raw_task_rename { 29630 struct trace_entry ent; 29631 pid_t pid; 29632 char oldcomm[16]; 29633 char newcomm[16]; 29634 short int oom_score_adj; 29635 char __data[0]; 29636 }; 29637 29638 struct trace_event_data_offsets_task_newtask {}; 29639 29640 struct trace_event_data_offsets_task_rename {}; 29641 29642 typedef void (*btf_trace_task_newtask)(void *, struct task_struct *, long unsigned int); 29643 29644 typedef void (*btf_trace_task_rename)(void *, struct task_struct *, const char *); 29645 29646 struct taint_flag { 29647 char c_true; 29648 char c_false; 29649 bool module; 29650 }; 29651 29652 enum ftrace_dump_mode { 29653 DUMP_NONE = 0, 29654 DUMP_ALL = 1, 29655 DUMP_ORIG = 2, 29656 }; 29657 29658 enum kmsg_dump_reason { 29659 KMSG_DUMP_UNDEF = 0, 29660 KMSG_DUMP_PANIC = 1, 29661 KMSG_DUMP_OOPS = 2, 29662 KMSG_DUMP_EMERG = 3, 29663 KMSG_DUMP_SHUTDOWN = 4, 29664 KMSG_DUMP_MAX = 5, 29665 }; 29666 29667 enum con_flush_mode { 29668 CONSOLE_FLUSH_PENDING = 0, 29669 CONSOLE_REPLAY_ALL = 1, 29670 }; 29671 29672 struct warn_args { 29673 const char *fmt; 29674 va_list args; 29675 }; 29676 29677 struct smp_hotplug_thread { 29678 struct task_struct **store; 29679 struct list_head list; 29680 int (*thread_should_run)(unsigned int); 29681 void (*thread_fn)(unsigned int); 29682 void (*create)(unsigned int); 29683 void (*setup)(unsigned int); 29684 void (*cleanup)(unsigned int, bool); 29685 void (*park)(unsigned int); 29686 void (*unpark)(unsigned int); 29687 bool selfparking; 29688 const char *thread_comm; 29689 }; 29690 29691 struct trace_event_raw_cpuhp_enter { 29692 struct trace_entry ent; 29693 unsigned int cpu; 29694 int target; 29695 int idx; 29696 void *fun; 29697 char __data[0]; 29698 }; 29699 29700 struct trace_event_raw_cpuhp_multi_enter { 29701 struct trace_entry ent; 29702 unsigned int cpu; 29703 int target; 29704 int idx; 29705 void *fun; 29706 char __data[0]; 29707 }; 29708 29709 struct trace_event_raw_cpuhp_exit { 29710 struct trace_entry ent; 29711 unsigned int cpu; 29712 int state; 29713 int idx; 29714 int ret; 29715 char __data[0]; 29716 }; 29717 29718 struct trace_event_data_offsets_cpuhp_enter {}; 29719 29720 struct trace_event_data_offsets_cpuhp_multi_enter {}; 29721 29722 struct trace_event_data_offsets_cpuhp_exit {}; 29723 29724 typedef void (*btf_trace_cpuhp_enter)(void *, unsigned int, int, int, int (*)(unsigned int)); 29725 29726 typedef void (*btf_trace_cpuhp_multi_enter)(void *, unsigned int, int, int, int (*)(unsigned int, struct hlist_node *), struct hlist_node *); 29727 29728 typedef void (*btf_trace_cpuhp_exit)(void *, unsigned int, int, int, int); 29729 29730 struct cpuhp_cpu_state { 29731 enum cpuhp_state state; 29732 enum cpuhp_state target; 29733 enum cpuhp_state fail; 29734 struct task_struct *thread; 29735 bool should_run; 29736 bool rollback; 29737 bool single; 29738 bool bringup; 29739 struct hlist_node *node; 29740 struct hlist_node *last; 29741 enum cpuhp_state cb_state; 29742 int result; 29743 struct completion done_up; 29744 struct completion done_down; 29745 }; 29746 29747 struct cpuhp_step { 29748 const char *name; 29749 union { 29750 int (*single)(unsigned int); 29751 int (*multi)(unsigned int, struct hlist_node *); 29752 } startup; 29753 union { 29754 int (*single)(unsigned int); 29755 int (*multi)(unsigned int, struct hlist_node *); 29756 } teardown; 29757 struct hlist_head list; 29758 bool cant_stop; 29759 bool multi_instance; 29760 }; 29761 29762 enum cpu_mitigations { 29763 CPU_MITIGATIONS_OFF = 0, 29764 CPU_MITIGATIONS_AUTO = 1, 29765 CPU_MITIGATIONS_AUTO_NOSMT = 2, 29766 }; 29767 29768 struct __kernel_old_timeval { 29769 __kernel_long_t tv_sec; 29770 __kernel_long_t tv_usec; 29771 }; 29772 29773 struct old_timeval32 { 29774 old_time32_t tv_sec; 29775 s32 tv_usec; 29776 }; 29777 29778 struct rusage { 29779 struct __kernel_old_timeval ru_utime; 29780 struct __kernel_old_timeval ru_stime; 29781 __kernel_long_t ru_maxrss; 29782 __kernel_long_t ru_ixrss; 29783 __kernel_long_t ru_idrss; 29784 __kernel_long_t ru_isrss; 29785 __kernel_long_t ru_minflt; 29786 __kernel_long_t ru_majflt; 29787 __kernel_long_t ru_nswap; 29788 __kernel_long_t ru_inblock; 29789 __kernel_long_t ru_oublock; 29790 __kernel_long_t ru_msgsnd; 29791 __kernel_long_t ru_msgrcv; 29792 __kernel_long_t ru_nsignals; 29793 __kernel_long_t ru_nvcsw; 29794 __kernel_long_t ru_nivcsw; 29795 }; 29796 29797 typedef struct {} mm_segment_t; 29798 29799 struct compat_rusage { 29800 struct old_timeval32 ru_utime; 29801 struct old_timeval32 ru_stime; 29802 compat_long_t ru_maxrss; 29803 compat_long_t ru_ixrss; 29804 compat_long_t ru_idrss; 29805 compat_long_t ru_isrss; 29806 compat_long_t ru_minflt; 29807 compat_long_t ru_majflt; 29808 compat_long_t ru_nswap; 29809 compat_long_t ru_inblock; 29810 compat_long_t ru_oublock; 29811 compat_long_t ru_msgsnd; 29812 compat_long_t ru_msgrcv; 29813 compat_long_t ru_nsignals; 29814 compat_long_t ru_nvcsw; 29815 compat_long_t ru_nivcsw; 29816 }; 29817 29818 struct waitid_info { 29819 pid_t pid; 29820 uid_t uid; 29821 int status; 29822 int cause; 29823 }; 29824 29825 struct wait_opts { 29826 enum pid_type wo_type; 29827 int wo_flags; 29828 struct pid *wo_pid; 29829 struct waitid_info *wo_info; 29830 int wo_stat; 29831 struct rusage *wo_rusage; 29832 wait_queue_entry_t child_wait; 29833 int notask_error; 29834 }; 29835 29836 struct softirq_action { 29837 void (*action)(struct softirq_action *); 29838 }; 29839 29840 struct tasklet_struct { 29841 struct tasklet_struct *next; 29842 long unsigned int state; 29843 atomic_t count; 29844 bool use_callback; 29845 union { 29846 void (*func)(long unsigned int); 29847 void (*callback)(struct tasklet_struct *); 29848 }; 29849 long unsigned int data; 29850 }; 29851 29852 enum { 29853 TASKLET_STATE_SCHED = 0, 29854 TASKLET_STATE_RUN = 1, 29855 }; 29856 29857 struct kernel_stat { 29858 long unsigned int irqs_sum; 29859 unsigned int softirqs[10]; 29860 }; 29861 29862 struct trace_event_raw_irq_handler_entry { 29863 struct trace_entry ent; 29864 int irq; 29865 u32 __data_loc_name; 29866 char __data[0]; 29867 }; 29868 29869 struct trace_event_raw_irq_handler_exit { 29870 struct trace_entry ent; 29871 int irq; 29872 int ret; 29873 char __data[0]; 29874 }; 29875 29876 struct trace_event_raw_softirq { 29877 struct trace_entry ent; 29878 unsigned int vec; 29879 char __data[0]; 29880 }; 29881 29882 struct trace_event_data_offsets_irq_handler_entry { 29883 u32 name; 29884 }; 29885 29886 struct trace_event_data_offsets_irq_handler_exit {}; 29887 29888 struct trace_event_data_offsets_softirq {}; 29889 29890 typedef void (*btf_trace_irq_handler_entry)(void *, int, struct irqaction *); 29891 29892 typedef void (*btf_trace_irq_handler_exit)(void *, int, struct irqaction *, int); 29893 29894 typedef void (*btf_trace_softirq_entry)(void *, unsigned int); 29895 29896 typedef void (*btf_trace_softirq_exit)(void *, unsigned int); 29897 29898 typedef void (*btf_trace_softirq_raise)(void *, unsigned int); 29899 29900 struct tasklet_head { 29901 struct tasklet_struct *head; 29902 struct tasklet_struct **tail; 29903 }; 29904 29905 typedef void (*dr_release_t)(struct device *, void *); 29906 29907 typedef int (*dr_match_t)(struct device *, void *, void *); 29908 29909 struct resource_entry { 29910 struct list_head node; 29911 struct resource *res; 29912 resource_size_t offset; 29913 struct resource __res; 29914 }; 29915 29916 struct resource_constraint { 29917 resource_size_t min; 29918 resource_size_t max; 29919 resource_size_t align; 29920 resource_size_t (*alignf)(void *, const struct resource *, resource_size_t, resource_size_t); 29921 void *alignf_data; 29922 }; 29923 29924 enum { 29925 MAX_IORES_LEVEL = 5, 29926 }; 29927 29928 struct region_devres { 29929 struct resource *parent; 29930 resource_size_t start; 29931 resource_size_t n; 29932 }; 29933 29934 typedef __kernel_clock_t clock_t; 29935 29936 struct dentry_stat_t { 29937 long int nr_dentry; 29938 long int nr_unused; 29939 long int age_limit; 29940 long int want_pages; 29941 long int nr_negative; 29942 long int dummy; 29943 }; 29944 29945 struct files_stat_struct { 29946 long unsigned int nr_files; 29947 long unsigned int nr_free_files; 29948 long unsigned int max_files; 29949 }; 29950 29951 struct inodes_stat_t { 29952 long int nr_inodes; 29953 long int nr_unused; 29954 long int dummy[5]; 29955 }; 29956 29957 enum sched_tunable_scaling { 29958 SCHED_TUNABLESCALING_NONE = 0, 29959 SCHED_TUNABLESCALING_LOG = 1, 29960 SCHED_TUNABLESCALING_LINEAR = 2, 29961 SCHED_TUNABLESCALING_END = 3, 29962 }; 29963 29964 enum sysctl_writes_mode { 29965 SYSCTL_WRITES_LEGACY = 4294967295, 29966 SYSCTL_WRITES_WARN = 0, 29967 SYSCTL_WRITES_STRICT = 1, 29968 }; 29969 29970 struct do_proc_dointvec_minmax_conv_param { 29971 int *min; 29972 int *max; 29973 }; 29974 29975 struct do_proc_douintvec_minmax_conv_param { 29976 unsigned int *min; 29977 unsigned int *max; 29978 }; 29979 29980 struct __user_cap_header_struct { 29981 __u32 version; 29982 int pid; 29983 }; 29984 29985 typedef struct __user_cap_header_struct *cap_user_header_t; 29986 29987 struct __user_cap_data_struct { 29988 __u32 effective; 29989 __u32 permitted; 29990 __u32 inheritable; 29991 }; 29992 29993 typedef struct __user_cap_data_struct *cap_user_data_t; 29994 29995 struct sigqueue { 29996 struct list_head list; 29997 int flags; 29998 kernel_siginfo_t info; 29999 struct user_struct *user; 30000 }; 30001 30002 struct wait_bit_key { 30003 void *flags; 30004 int bit_nr; 30005 long unsigned int timeout; 30006 }; 30007 30008 typedef int wait_bit_action_f(struct wait_bit_key *, int); 30009 30010 struct ptrace_peeksiginfo_args { 30011 __u64 off; 30012 __u32 flags; 30013 __s32 nr; 30014 }; 30015 30016 struct ptrace_syscall_info { 30017 __u8 op; 30018 __u8 pad[3]; 30019 __u32 arch; 30020 __u64 instruction_pointer; 30021 __u64 stack_pointer; 30022 union { 30023 struct { 30024 __u64 nr; 30025 __u64 args[6]; 30026 } entry; 30027 struct { 30028 __s64 rval; 30029 __u8 is_error; 30030 } exit; 30031 struct { 30032 __u64 nr; 30033 __u64 args[6]; 30034 __u32 ret_data; 30035 } seccomp; 30036 }; 30037 }; 30038 30039 struct compat_iovec { 30040 compat_uptr_t iov_base; 30041 compat_size_t iov_len; 30042 }; 30043 30044 typedef long unsigned int old_sigset_t; 30045 30046 enum siginfo_layout { 30047 SIL_KILL = 0, 30048 SIL_TIMER = 1, 30049 SIL_POLL = 2, 30050 SIL_FAULT = 3, 30051 SIL_FAULT_MCEERR = 4, 30052 SIL_FAULT_BNDERR = 5, 30053 SIL_FAULT_PKUERR = 6, 30054 SIL_CHLD = 7, 30055 SIL_RT = 8, 30056 SIL_SYS = 9, 30057 }; 30058 30059 struct fd { 30060 struct file *file; 30061 unsigned int flags; 30062 }; 30063 30064 typedef u32 compat_old_sigset_t; 30065 30066 struct compat_sigaction { 30067 compat_uptr_t sa_handler; 30068 compat_ulong_t sa_flags; 30069 compat_uptr_t sa_restorer; 30070 compat_sigset_t sa_mask; 30071 }; 30072 30073 struct compat_old_sigaction { 30074 compat_uptr_t sa_handler; 30075 compat_old_sigset_t sa_mask; 30076 compat_ulong_t sa_flags; 30077 compat_uptr_t sa_restorer; 30078 }; 30079 30080 enum { 30081 TRACE_SIGNAL_DELIVERED = 0, 30082 TRACE_SIGNAL_IGNORED = 1, 30083 TRACE_SIGNAL_ALREADY_PENDING = 2, 30084 TRACE_SIGNAL_OVERFLOW_FAIL = 3, 30085 TRACE_SIGNAL_LOSE_INFO = 4, 30086 }; 30087 30088 struct trace_event_raw_signal_generate { 30089 struct trace_entry ent; 30090 int sig; 30091 int errno; 30092 int code; 30093 char comm[16]; 30094 pid_t pid; 30095 int group; 30096 int result; 30097 char __data[0]; 30098 }; 30099 30100 struct trace_event_raw_signal_deliver { 30101 struct trace_entry ent; 30102 int sig; 30103 int errno; 30104 int code; 30105 long unsigned int sa_handler; 30106 long unsigned int sa_flags; 30107 char __data[0]; 30108 }; 30109 30110 struct trace_event_data_offsets_signal_generate {}; 30111 30112 struct trace_event_data_offsets_signal_deliver {}; 30113 30114 typedef void (*btf_trace_signal_generate)(void *, int, struct kernel_siginfo *, struct task_struct *, int, int); 30115 30116 typedef void (*btf_trace_signal_deliver)(void *, int, struct kernel_siginfo *, struct k_sigaction *); 30117 30118 struct sysinfo { 30119 __kernel_long_t uptime; 30120 __kernel_ulong_t loads[3]; 30121 __kernel_ulong_t totalram; 30122 __kernel_ulong_t freeram; 30123 __kernel_ulong_t sharedram; 30124 __kernel_ulong_t bufferram; 30125 __kernel_ulong_t totalswap; 30126 __kernel_ulong_t freeswap; 30127 __u16 procs; 30128 __u16 pad; 30129 __kernel_ulong_t totalhigh; 30130 __kernel_ulong_t freehigh; 30131 __u32 mem_unit; 30132 char _f[0]; 30133 }; 30134 30135 enum { 30136 PER_LINUX = 0, 30137 PER_LINUX_32BIT = 8388608, 30138 PER_LINUX_FDPIC = 524288, 30139 PER_SVR4 = 68157441, 30140 PER_SVR3 = 83886082, 30141 PER_SCOSVR3 = 117440515, 30142 PER_OSR5 = 100663299, 30143 PER_WYSEV386 = 83886084, 30144 PER_ISCR4 = 67108869, 30145 PER_BSD = 6, 30146 PER_SUNOS = 67108870, 30147 PER_XENIX = 83886087, 30148 PER_LINUX32 = 8, 30149 PER_LINUX32_3GB = 134217736, 30150 PER_IRIX32 = 67108873, 30151 PER_IRIXN32 = 67108874, 30152 PER_IRIX64 = 67108875, 30153 PER_RISCOS = 12, 30154 PER_SOLARIS = 67108877, 30155 PER_UW7 = 68157454, 30156 PER_OSF4 = 15, 30157 PER_HPUX = 16, 30158 PER_MASK = 255, 30159 }; 30160 30161 struct rlimit64 { 30162 __u64 rlim_cur; 30163 __u64 rlim_max; 30164 }; 30165 30166 struct oldold_utsname { 30167 char sysname[9]; 30168 char nodename[9]; 30169 char release[9]; 30170 char version[9]; 30171 char machine[9]; 30172 }; 30173 30174 struct old_utsname { 30175 char sysname[65]; 30176 char nodename[65]; 30177 char release[65]; 30178 char version[65]; 30179 char machine[65]; 30180 }; 30181 30182 enum uts_proc { 30183 UTS_PROC_OSTYPE = 0, 30184 UTS_PROC_OSRELEASE = 1, 30185 UTS_PROC_VERSION = 2, 30186 UTS_PROC_HOSTNAME = 3, 30187 UTS_PROC_DOMAINNAME = 4, 30188 }; 30189 30190 struct prctl_mm_map { 30191 __u64 start_code; 30192 __u64 end_code; 30193 __u64 start_data; 30194 __u64 end_data; 30195 __u64 start_brk; 30196 __u64 brk; 30197 __u64 start_stack; 30198 __u64 arg_start; 30199 __u64 arg_end; 30200 __u64 env_start; 30201 __u64 env_end; 30202 __u64 *auxv; 30203 __u32 auxv_size; 30204 __u32 exe_fd; 30205 }; 30206 30207 struct compat_tms { 30208 compat_clock_t tms_utime; 30209 compat_clock_t tms_stime; 30210 compat_clock_t tms_cutime; 30211 compat_clock_t tms_cstime; 30212 }; 30213 30214 struct compat_rlimit { 30215 compat_ulong_t rlim_cur; 30216 compat_ulong_t rlim_max; 30217 }; 30218 30219 struct tms { 30220 __kernel_clock_t tms_utime; 30221 __kernel_clock_t tms_stime; 30222 __kernel_clock_t tms_cutime; 30223 __kernel_clock_t tms_cstime; 30224 }; 30225 30226 struct getcpu_cache { 30227 long unsigned int blob[16]; 30228 }; 30229 30230 struct compat_sysinfo { 30231 s32 uptime; 30232 u32 loads[3]; 30233 u32 totalram; 30234 u32 freeram; 30235 u32 sharedram; 30236 u32 bufferram; 30237 u32 totalswap; 30238 u32 freeswap; 30239 u16 procs; 30240 u16 pad; 30241 u32 totalhigh; 30242 u32 freehigh; 30243 u32 mem_unit; 30244 char _f[8]; 30245 }; 30246 30247 struct wq_flusher; 30248 30249 struct worker; 30250 30251 struct workqueue_attrs; 30252 30253 struct pool_workqueue; 30254 30255 struct wq_device; 30256 30257 struct workqueue_struct { 30258 struct list_head pwqs; 30259 struct list_head list; 30260 struct mutex mutex; 30261 int work_color; 30262 int flush_color; 30263 atomic_t nr_pwqs_to_flush; 30264 struct wq_flusher *first_flusher; 30265 struct list_head flusher_queue; 30266 struct list_head flusher_overflow; 30267 struct list_head maydays; 30268 struct worker *rescuer; 30269 int nr_drainers; 30270 int saved_max_active; 30271 struct workqueue_attrs *unbound_attrs; 30272 struct pool_workqueue *dfl_pwq; 30273 struct wq_device *wq_dev; 30274 char name[24]; 30275 struct callback_head rcu; 30276 long: 64; 30277 long: 64; 30278 long: 64; 30279 long: 64; 30280 long: 64; 30281 unsigned int flags; 30282 struct pool_workqueue *cpu_pwqs; 30283 struct pool_workqueue *numa_pwq_tbl[0]; 30284 long: 64; 30285 long: 64; 30286 long: 64; 30287 long: 64; 30288 long: 64; 30289 long: 64; 30290 }; 30291 30292 struct workqueue_attrs { 30293 int nice; 30294 cpumask_var_t cpumask; 30295 bool no_numa; 30296 }; 30297 30298 struct execute_work { 30299 struct work_struct work; 30300 }; 30301 30302 enum { 30303 WQ_UNBOUND = 2, 30304 WQ_FREEZABLE = 4, 30305 WQ_MEM_RECLAIM = 8, 30306 WQ_HIGHPRI = 16, 30307 WQ_CPU_INTENSIVE = 32, 30308 WQ_SYSFS = 64, 30309 WQ_POWER_EFFICIENT = 128, 30310 __WQ_DRAINING = 65536, 30311 __WQ_ORDERED = 131072, 30312 __WQ_LEGACY = 262144, 30313 __WQ_ORDERED_EXPLICIT = 524288, 30314 WQ_MAX_ACTIVE = 512, 30315 WQ_MAX_UNBOUND_PER_CPU = 4, 30316 WQ_DFL_ACTIVE = 256, 30317 }; 30318 30319 enum xa_lock_type { 30320 XA_LOCK_IRQ = 1, 30321 XA_LOCK_BH = 2, 30322 }; 30323 30324 struct ida { 30325 struct xarray xa; 30326 }; 30327 30328 struct __una_u32 { 30329 u32 x; 30330 }; 30331 30332 struct worker_pool; 30333 30334 struct worker { 30335 union { 30336 struct list_head entry; 30337 struct hlist_node hentry; 30338 }; 30339 struct work_struct *current_work; 30340 work_func_t current_func; 30341 struct pool_workqueue *current_pwq; 30342 struct list_head scheduled; 30343 struct task_struct *task; 30344 struct worker_pool *pool; 30345 struct list_head node; 30346 long unsigned int last_active; 30347 unsigned int flags; 30348 int id; 30349 int sleeping; 30350 char desc[24]; 30351 struct workqueue_struct *rescue_wq; 30352 work_func_t last_func; 30353 }; 30354 30355 struct pool_workqueue { 30356 struct worker_pool *pool; 30357 struct workqueue_struct *wq; 30358 int work_color; 30359 int flush_color; 30360 int refcnt; 30361 int nr_in_flight[15]; 30362 int nr_active; 30363 int max_active; 30364 struct list_head delayed_works; 30365 struct list_head pwqs_node; 30366 struct list_head mayday_node; 30367 struct work_struct unbound_release_work; 30368 struct callback_head rcu; 30369 long: 64; 30370 long: 64; 30371 long: 64; 30372 long: 64; 30373 long: 64; 30374 long: 64; 30375 long: 64; 30376 long: 64; 30377 }; 30378 30379 struct worker_pool { 30380 raw_spinlock_t lock; 30381 int cpu; 30382 int node; 30383 int id; 30384 unsigned int flags; 30385 long unsigned int watchdog_ts; 30386 struct list_head worklist; 30387 int nr_workers; 30388 int nr_idle; 30389 struct list_head idle_list; 30390 struct timer_list idle_timer; 30391 struct timer_list mayday_timer; 30392 struct hlist_head busy_hash[64]; 30393 struct worker *manager; 30394 struct list_head workers; 30395 struct completion *detach_completion; 30396 struct ida worker_ida; 30397 struct workqueue_attrs *attrs; 30398 struct hlist_node hash_node; 30399 int refcnt; 30400 long: 32; 30401 long: 64; 30402 long: 64; 30403 long: 64; 30404 atomic_t nr_running; 30405 struct callback_head rcu; 30406 long: 64; 30407 long: 64; 30408 long: 64; 30409 long: 64; 30410 long: 64; 30411 }; 30412 30413 enum { 30414 POOL_MANAGER_ACTIVE = 1, 30415 POOL_DISASSOCIATED = 4, 30416 WORKER_DIE = 2, 30417 WORKER_IDLE = 4, 30418 WORKER_PREP = 8, 30419 WORKER_CPU_INTENSIVE = 64, 30420 WORKER_UNBOUND = 128, 30421 WORKER_REBOUND = 256, 30422 WORKER_NOT_RUNNING = 456, 30423 NR_STD_WORKER_POOLS = 2, 30424 UNBOUND_POOL_HASH_ORDER = 6, 30425 BUSY_WORKER_HASH_ORDER = 6, 30426 MAX_IDLE_WORKERS_RATIO = 4, 30427 IDLE_WORKER_TIMEOUT = 300000, 30428 MAYDAY_INITIAL_TIMEOUT = 10, 30429 MAYDAY_INTERVAL = 100, 30430 CREATE_COOLDOWN = 1000, 30431 RESCUER_NICE_LEVEL = 4294967276, 30432 HIGHPRI_NICE_LEVEL = 4294967276, 30433 WQ_NAME_LEN = 24, 30434 }; 30435 30436 struct wq_flusher { 30437 struct list_head list; 30438 int flush_color; 30439 struct completion done; 30440 }; 30441 30442 struct wq_device { 30443 struct workqueue_struct *wq; 30444 struct device dev; 30445 }; 30446 30447 struct trace_event_raw_workqueue_queue_work { 30448 struct trace_entry ent; 30449 void *work; 30450 void *function; 30451 void *workqueue; 30452 unsigned int req_cpu; 30453 unsigned int cpu; 30454 char __data[0]; 30455 }; 30456 30457 struct trace_event_raw_workqueue_activate_work { 30458 struct trace_entry ent; 30459 void *work; 30460 char __data[0]; 30461 }; 30462 30463 struct trace_event_raw_workqueue_execute_start { 30464 struct trace_entry ent; 30465 void *work; 30466 void *function; 30467 char __data[0]; 30468 }; 30469 30470 struct trace_event_raw_workqueue_execute_end { 30471 struct trace_entry ent; 30472 void *work; 30473 void *function; 30474 char __data[0]; 30475 }; 30476 30477 struct trace_event_data_offsets_workqueue_queue_work {}; 30478 30479 struct trace_event_data_offsets_workqueue_activate_work {}; 30480 30481 struct trace_event_data_offsets_workqueue_execute_start {}; 30482 30483 struct trace_event_data_offsets_workqueue_execute_end {}; 30484 30485 typedef void (*btf_trace_workqueue_queue_work)(void *, unsigned int, struct pool_workqueue *, struct work_struct *); 30486 30487 typedef void (*btf_trace_workqueue_activate_work)(void *, struct work_struct *); 30488 30489 typedef void (*btf_trace_workqueue_execute_start)(void *, struct work_struct *); 30490 30491 typedef void (*btf_trace_workqueue_execute_end)(void *, struct work_struct *, work_func_t); 30492 30493 struct wq_barrier { 30494 struct work_struct work; 30495 struct completion done; 30496 struct task_struct *task; 30497 }; 30498 30499 struct cwt_wait { 30500 wait_queue_entry_t wait; 30501 struct work_struct *work; 30502 }; 30503 30504 struct apply_wqattrs_ctx { 30505 struct workqueue_struct *wq; 30506 struct workqueue_attrs *attrs; 30507 struct list_head list; 30508 struct pool_workqueue *dfl_pwq; 30509 struct pool_workqueue *pwq_tbl[0]; 30510 }; 30511 30512 struct work_for_cpu { 30513 struct work_struct work; 30514 long int (*fn)(void *); 30515 void *arg; 30516 long int ret; 30517 }; 30518 30519 typedef struct {} local_lock_t; 30520 30521 struct radix_tree_preload { 30522 local_lock_t lock; 30523 unsigned int nr; 30524 struct xa_node *nodes; 30525 }; 30526 30527 typedef void (*task_work_func_t)(struct callback_head *); 30528 30529 enum { 30530 KERNEL_PARAM_OPS_FL_NOARG = 1, 30531 }; 30532 30533 enum { 30534 KERNEL_PARAM_FL_UNSAFE = 1, 30535 KERNEL_PARAM_FL_HWPARAM = 2, 30536 }; 30537 30538 struct param_attribute { 30539 struct module_attribute mattr; 30540 const struct kernel_param *param; 30541 }; 30542 30543 struct module_param_attrs { 30544 unsigned int num; 30545 struct attribute_group grp; 30546 struct param_attribute attrs[0]; 30547 }; 30548 30549 struct module_version_attribute { 30550 struct module_attribute mattr; 30551 const char *module_name; 30552 const char *version; 30553 }; 30554 30555 struct kmalloced_param { 30556 struct list_head list; 30557 char val[0]; 30558 }; 30559 30560 struct sched_param { 30561 int sched_priority; 30562 }; 30563 30564 enum { 30565 __PERCPU_REF_ATOMIC = 1, 30566 __PERCPU_REF_DEAD = 2, 30567 __PERCPU_REF_ATOMIC_DEAD = 3, 30568 __PERCPU_REF_FLAG_BITS = 2, 30569 }; 30570 30571 struct kthread_work; 30572 30573 typedef void (*kthread_work_func_t)(struct kthread_work *); 30574 30575 struct kthread_worker; 30576 30577 struct kthread_work { 30578 struct list_head node; 30579 kthread_work_func_t func; 30580 struct kthread_worker *worker; 30581 int canceling; 30582 }; 30583 30584 enum { 30585 KTW_FREEZABLE = 1, 30586 }; 30587 30588 struct kthread_worker { 30589 unsigned int flags; 30590 raw_spinlock_t lock; 30591 struct list_head work_list; 30592 struct list_head delayed_work_list; 30593 struct task_struct *task; 30594 struct kthread_work *current_work; 30595 }; 30596 30597 struct kthread_delayed_work { 30598 struct kthread_work work; 30599 struct timer_list timer; 30600 }; 30601 30602 enum { 30603 CSS_NO_REF = 1, 30604 CSS_ONLINE = 2, 30605 CSS_RELEASED = 4, 30606 CSS_VISIBLE = 8, 30607 CSS_DYING = 16, 30608 }; 30609 30610 struct kthread_create_info { 30611 int (*threadfn)(void *); 30612 void *data; 30613 int node; 30614 struct task_struct *result; 30615 struct completion *done; 30616 struct list_head list; 30617 }; 30618 30619 struct kthread { 30620 long unsigned int flags; 30621 unsigned int cpu; 30622 int (*threadfn)(void *); 30623 void *data; 30624 mm_segment_t oldfs; 30625 struct completion parked; 30626 struct completion exited; 30627 struct cgroup_subsys_state *blkcg_css; 30628 }; 30629 30630 enum KTHREAD_BITS { 30631 KTHREAD_IS_PER_CPU = 0, 30632 KTHREAD_SHOULD_STOP = 1, 30633 KTHREAD_SHOULD_PARK = 2, 30634 }; 30635 30636 struct kthread_flush_work { 30637 struct kthread_work work; 30638 struct completion done; 30639 }; 30640 30641 struct pt_regs___2; 30642 30643 struct ipc_ids { 30644 int in_use; 30645 short unsigned int seq; 30646 struct rw_semaphore rwsem; 30647 struct idr ipcs_idr; 30648 int max_idx; 30649 int last_idx; 30650 int next_id; 30651 struct rhashtable key_ht; 30652 }; 30653 30654 struct ipc_namespace { 30655 struct ipc_ids ids[3]; 30656 int sem_ctls[4]; 30657 int used_sems; 30658 unsigned int msg_ctlmax; 30659 unsigned int msg_ctlmnb; 30660 unsigned int msg_ctlmni; 30661 atomic_t msg_bytes; 30662 atomic_t msg_hdrs; 30663 size_t shm_ctlmax; 30664 size_t shm_ctlall; 30665 long unsigned int shm_tot; 30666 int shm_ctlmni; 30667 int shm_rmid_forced; 30668 struct notifier_block ipcns_nb; 30669 struct vfsmount *mq_mnt; 30670 unsigned int mq_queues_count; 30671 unsigned int mq_queues_max; 30672 unsigned int mq_msg_max; 30673 unsigned int mq_msgsize_max; 30674 unsigned int mq_msg_default; 30675 unsigned int mq_msgsize_default; 30676 struct user_namespace *user_ns; 30677 struct ucounts *ucounts; 30678 struct llist_node mnt_llist; 30679 struct ns_common ns; 30680 }; 30681 30682 struct srcu_notifier_head { 30683 struct mutex mutex; 30684 struct srcu_struct srcu; 30685 struct notifier_block *head; 30686 }; 30687 30688 enum what { 30689 PROC_EVENT_NONE = 0, 30690 PROC_EVENT_FORK = 1, 30691 PROC_EVENT_EXEC = 2, 30692 PROC_EVENT_UID = 4, 30693 PROC_EVENT_GID = 64, 30694 PROC_EVENT_SID = 128, 30695 PROC_EVENT_PTRACE = 256, 30696 PROC_EVENT_COMM = 512, 30697 PROC_EVENT_COREDUMP = 1073741824, 30698 PROC_EVENT_EXIT = 2147483648, 30699 }; 30700 30701 typedef u64 async_cookie_t; 30702 30703 typedef void (*async_func_t)(void *, async_cookie_t); 30704 30705 struct async_domain { 30706 struct list_head pending; 30707 unsigned int registered: 1; 30708 }; 30709 30710 struct async_entry { 30711 struct list_head domain_list; 30712 struct list_head global_list; 30713 struct work_struct work; 30714 async_cookie_t cookie; 30715 async_func_t func; 30716 void *data; 30717 struct async_domain *domain; 30718 }; 30719 30720 struct smpboot_thread_data { 30721 unsigned int cpu; 30722 unsigned int status; 30723 struct smp_hotplug_thread *ht; 30724 }; 30725 30726 enum { 30727 HP_THREAD_NONE = 0, 30728 HP_THREAD_ACTIVE = 1, 30729 HP_THREAD_PARKED = 2, 30730 }; 30731 30732 struct umd_info { 30733 const char *driver_name; 30734 struct file *pipe_to_umh; 30735 struct file *pipe_from_umh; 30736 struct path wd; 30737 struct pid *tgid; 30738 }; 30739 30740 struct pin_cookie {}; 30741 30742 struct preempt_notifier; 30743 30744 struct preempt_ops { 30745 void (*sched_in)(struct preempt_notifier *, int); 30746 void (*sched_out)(struct preempt_notifier *, struct task_struct *); 30747 }; 30748 30749 struct preempt_notifier { 30750 struct hlist_node link; 30751 struct preempt_ops *ops; 30752 }; 30753 30754 enum { 30755 CSD_FLAG_LOCK = 1, 30756 IRQ_WORK_PENDING = 1, 30757 IRQ_WORK_BUSY = 2, 30758 IRQ_WORK_LAZY = 4, 30759 IRQ_WORK_HARD_IRQ = 8, 30760 IRQ_WORK_CLAIMED = 3, 30761 CSD_TYPE_ASYNC = 0, 30762 CSD_TYPE_SYNC = 16, 30763 CSD_TYPE_IRQ_WORK = 32, 30764 CSD_TYPE_TTWU = 48, 30765 CSD_FLAG_TYPE_MASK = 240, 30766 }; 30767 30768 struct dl_bw { 30769 raw_spinlock_t lock; 30770 u64 bw; 30771 u64 total_bw; 30772 }; 30773 30774 struct cpudl_item; 30775 30776 struct cpudl { 30777 raw_spinlock_t lock; 30778 int size; 30779 cpumask_var_t free_cpus; 30780 struct cpudl_item *elements; 30781 }; 30782 30783 struct cpupri_vec { 30784 atomic_t count; 30785 cpumask_var_t mask; 30786 }; 30787 30788 struct cpupri { 30789 struct cpupri_vec pri_to_cpu[101]; 30790 int *cpu_to_pri; 30791 }; 30792 30793 struct perf_domain; 30794 30795 struct root_domain { 30796 atomic_t refcount; 30797 atomic_t rto_count; 30798 struct callback_head rcu; 30799 cpumask_var_t span; 30800 cpumask_var_t online; 30801 int overload; 30802 int overutilized; 30803 cpumask_var_t dlo_mask; 30804 atomic_t dlo_count; 30805 struct dl_bw dl_bw; 30806 struct cpudl cpudl; 30807 u64 visit_gen; 30808 struct irq_work rto_push_work; 30809 raw_spinlock_t rto_lock; 30810 int rto_loop; 30811 int rto_cpu; 30812 atomic_t rto_loop_next; 30813 atomic_t rto_loop_start; 30814 cpumask_var_t rto_mask; 30815 struct cpupri cpupri; 30816 long unsigned int max_cpu_capacity; 30817 struct perf_domain *pd; 30818 }; 30819 30820 struct cfs_rq { 30821 struct load_weight load; 30822 unsigned int nr_running; 30823 unsigned int h_nr_running; 30824 unsigned int idle_h_nr_running; 30825 u64 exec_clock; 30826 u64 min_vruntime; 30827 struct rb_root_cached tasks_timeline; 30828 struct sched_entity *curr; 30829 struct sched_entity *next; 30830 struct sched_entity *last; 30831 struct sched_entity *skip; 30832 unsigned int nr_spread_over; 30833 long: 32; 30834 long: 64; 30835 long: 64; 30836 long: 64; 30837 struct sched_avg avg; 30838 struct { 30839 raw_spinlock_t lock; 30840 int nr; 30841 long unsigned int load_avg; 30842 long unsigned int util_avg; 30843 long unsigned int runnable_avg; 30844 long: 64; 30845 long: 64; 30846 long: 64; 30847 long: 64; 30848 } removed; 30849 long unsigned int tg_load_avg_contrib; 30850 long int propagate; 30851 long int prop_runnable_sum; 30852 long unsigned int h_load; 30853 u64 last_h_load_update; 30854 struct sched_entity *h_load_next; 30855 struct rq *rq; 30856 int on_list; 30857 struct list_head leaf_cfs_rq_list; 30858 struct task_group *tg; 30859 int runtime_enabled; 30860 s64 runtime_remaining; 30861 u64 throttled_clock; 30862 u64 throttled_clock_task; 30863 u64 throttled_clock_task_time; 30864 int throttled; 30865 int throttle_count; 30866 struct list_head throttled_list; 30867 long: 64; 30868 long: 64; 30869 long: 64; 30870 long: 64; 30871 long: 64; 30872 }; 30873 30874 struct cfs_bandwidth { 30875 raw_spinlock_t lock; 30876 ktime_t period; 30877 u64 quota; 30878 u64 runtime; 30879 s64 hierarchical_quota; 30880 u8 idle; 30881 u8 period_active; 30882 u8 slack_started; 30883 struct hrtimer period_timer; 30884 struct hrtimer slack_timer; 30885 struct list_head throttled_cfs_rq; 30886 int nr_periods; 30887 int nr_throttled; 30888 u64 throttled_time; 30889 }; 30890 30891 struct task_group { 30892 struct cgroup_subsys_state css; 30893 struct sched_entity **se; 30894 struct cfs_rq **cfs_rq; 30895 long unsigned int shares; 30896 long: 64; 30897 long: 64; 30898 long: 64; 30899 long: 64; 30900 atomic_long_t load_avg; 30901 struct callback_head rcu; 30902 struct list_head list; 30903 struct task_group *parent; 30904 struct list_head siblings; 30905 struct list_head children; 30906 struct autogroup *autogroup; 30907 struct cfs_bandwidth cfs_bandwidth; 30908 long: 64; 30909 long: 64; 30910 long: 64; 30911 }; 30912 30913 struct sched_domain_attr { 30914 int relax_domain_level; 30915 }; 30916 30917 struct sched_group { 30918 struct sched_group *next; 30919 atomic_t ref; 30920 unsigned int group_weight; 30921 struct sched_group_capacity *sgc; 30922 int asym_prefer_cpu; 30923 long unsigned int cpumask[0]; 30924 }; 30925 30926 struct sched_group_capacity { 30927 atomic_t ref; 30928 long unsigned int capacity; 30929 long unsigned int min_capacity; 30930 long unsigned int max_capacity; 30931 long unsigned int next_update; 30932 int imbalance; 30933 int id; 30934 long unsigned int cpumask[0]; 30935 }; 30936 30937 struct wait_bit_queue_entry { 30938 struct wait_bit_key key; 30939 struct wait_queue_entry wq_entry; 30940 }; 30941 30942 struct autogroup { 30943 struct kref kref; 30944 struct task_group *tg; 30945 struct rw_semaphore lock; 30946 long unsigned int id; 30947 int nice; 30948 }; 30949 30950 enum ctx_state { 30951 CONTEXT_DISABLED = 4294967295, 30952 CONTEXT_KERNEL = 0, 30953 CONTEXT_USER = 1, 30954 CONTEXT_GUEST = 2, 30955 }; 30956 30957 struct context_tracking { 30958 bool active; 30959 int recursion; 30960 enum ctx_state state; 30961 }; 30962 30963 struct kernel_cpustat { 30964 u64 cpustat[10]; 30965 }; 30966 30967 enum { 30968 MEMBARRIER_STATE_PRIVATE_EXPEDITED_READY = 1, 30969 MEMBARRIER_STATE_PRIVATE_EXPEDITED = 2, 30970 MEMBARRIER_STATE_GLOBAL_EXPEDITED_READY = 4, 30971 MEMBARRIER_STATE_GLOBAL_EXPEDITED = 8, 30972 MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE_READY = 16, 30973 MEMBARRIER_STATE_PRIVATE_EXPEDITED_SYNC_CORE = 32, 30974 MEMBARRIER_STATE_PRIVATE_EXPEDITED_RSEQ_READY = 64, 30975 MEMBARRIER_STATE_PRIVATE_EXPEDITED_RSEQ = 128, 30976 }; 30977 30978 enum { 30979 CFTYPE_ONLY_ON_ROOT = 1, 30980 CFTYPE_NOT_ON_ROOT = 2, 30981 CFTYPE_NS_DELEGATABLE = 4, 30982 CFTYPE_NO_PREFIX = 8, 30983 CFTYPE_WORLD_WRITABLE = 16, 30984 CFTYPE_DEBUG = 32, 30985 __CFTYPE_ONLY_ON_DFL = 65536, 30986 __CFTYPE_NOT_ON_DFL = 131072, 30987 }; 30988 30989 struct trace_event_raw_sched_kthread_stop { 30990 struct trace_entry ent; 30991 char comm[16]; 30992 pid_t pid; 30993 char __data[0]; 30994 }; 30995 30996 struct trace_event_raw_sched_kthread_stop_ret { 30997 struct trace_entry ent; 30998 int ret; 30999 char __data[0]; 31000 }; 31001 31002 struct trace_event_raw_sched_kthread_work_queue_work { 31003 struct trace_entry ent; 31004 void *work; 31005 void *function; 31006 void *worker; 31007 char __data[0]; 31008 }; 31009 31010 struct trace_event_raw_sched_kthread_work_execute_start { 31011 struct trace_entry ent; 31012 void *work; 31013 void *function; 31014 char __data[0]; 31015 }; 31016 31017 struct trace_event_raw_sched_kthread_work_execute_end { 31018 struct trace_entry ent; 31019 void *work; 31020 void *function; 31021 char __data[0]; 31022 }; 31023 31024 struct trace_event_raw_sched_wakeup_template { 31025 struct trace_entry ent; 31026 char comm[16]; 31027 pid_t pid; 31028 int prio; 31029 int success; 31030 int target_cpu; 31031 char __data[0]; 31032 }; 31033 31034 struct trace_event_raw_sched_switch { 31035 struct trace_entry ent; 31036 char prev_comm[16]; 31037 pid_t prev_pid; 31038 int prev_prio; 31039 long int prev_state; 31040 char next_comm[16]; 31041 pid_t next_pid; 31042 int next_prio; 31043 char __data[0]; 31044 }; 31045 31046 struct trace_event_raw_sched_migrate_task { 31047 struct trace_entry ent; 31048 char comm[16]; 31049 pid_t pid; 31050 int prio; 31051 int orig_cpu; 31052 int dest_cpu; 31053 char __data[0]; 31054 }; 31055 31056 struct trace_event_raw_sched_process_template { 31057 struct trace_entry ent; 31058 char comm[16]; 31059 pid_t pid; 31060 int prio; 31061 char __data[0]; 31062 }; 31063 31064 struct trace_event_raw_sched_process_wait { 31065 struct trace_entry ent; 31066 char comm[16]; 31067 pid_t pid; 31068 int prio; 31069 char __data[0]; 31070 }; 31071 31072 struct trace_event_raw_sched_process_fork { 31073 struct trace_entry ent; 31074 char parent_comm[16]; 31075 pid_t parent_pid; 31076 char child_comm[16]; 31077 pid_t child_pid; 31078 char __data[0]; 31079 }; 31080 31081 struct trace_event_raw_sched_process_exec { 31082 struct trace_entry ent; 31083 u32 __data_loc_filename; 31084 pid_t pid; 31085 pid_t old_pid; 31086 char __data[0]; 31087 }; 31088 31089 struct trace_event_raw_sched_stat_template { 31090 struct trace_entry ent; 31091 char comm[16]; 31092 pid_t pid; 31093 u64 delay; 31094 char __data[0]; 31095 }; 31096 31097 struct trace_event_raw_sched_stat_runtime { 31098 struct trace_entry ent; 31099 char comm[16]; 31100 pid_t pid; 31101 u64 runtime; 31102 u64 vruntime; 31103 char __data[0]; 31104 }; 31105 31106 struct trace_event_raw_sched_pi_setprio { 31107 struct trace_entry ent; 31108 char comm[16]; 31109 pid_t pid; 31110 int oldprio; 31111 int newprio; 31112 char __data[0]; 31113 }; 31114 31115 struct trace_event_raw_sched_move_numa { 31116 struct trace_entry ent; 31117 pid_t pid; 31118 pid_t tgid; 31119 pid_t ngid; 31120 int src_cpu; 31121 int src_nid; 31122 int dst_cpu; 31123 int dst_nid; 31124 char __data[0]; 31125 }; 31126 31127 struct trace_event_raw_sched_numa_pair_template { 31128 struct trace_entry ent; 31129 pid_t src_pid; 31130 pid_t src_tgid; 31131 pid_t src_ngid; 31132 int src_cpu; 31133 int src_nid; 31134 pid_t dst_pid; 31135 pid_t dst_tgid; 31136 pid_t dst_ngid; 31137 int dst_cpu; 31138 int dst_nid; 31139 char __data[0]; 31140 }; 31141 31142 struct trace_event_raw_sched_wake_idle_without_ipi { 31143 struct trace_entry ent; 31144 int cpu; 31145 char __data[0]; 31146 }; 31147 31148 struct trace_event_data_offsets_sched_kthread_stop {}; 31149 31150 struct trace_event_data_offsets_sched_kthread_stop_ret {}; 31151 31152 struct trace_event_data_offsets_sched_kthread_work_queue_work {}; 31153 31154 struct trace_event_data_offsets_sched_kthread_work_execute_start {}; 31155 31156 struct trace_event_data_offsets_sched_kthread_work_execute_end {}; 31157 31158 struct trace_event_data_offsets_sched_wakeup_template {}; 31159 31160 struct trace_event_data_offsets_sched_switch {}; 31161 31162 struct trace_event_data_offsets_sched_migrate_task {}; 31163 31164 struct trace_event_data_offsets_sched_process_template {}; 31165 31166 struct trace_event_data_offsets_sched_process_wait {}; 31167 31168 struct trace_event_data_offsets_sched_process_fork {}; 31169 31170 struct trace_event_data_offsets_sched_process_exec { 31171 u32 filename; 31172 }; 31173 31174 struct trace_event_data_offsets_sched_stat_template {}; 31175 31176 struct trace_event_data_offsets_sched_stat_runtime {}; 31177 31178 struct trace_event_data_offsets_sched_pi_setprio {}; 31179 31180 struct trace_event_data_offsets_sched_move_numa {}; 31181 31182 struct trace_event_data_offsets_sched_numa_pair_template {}; 31183 31184 struct trace_event_data_offsets_sched_wake_idle_without_ipi {}; 31185 31186 typedef void (*btf_trace_sched_kthread_stop)(void *, struct task_struct *); 31187 31188 typedef void (*btf_trace_sched_kthread_stop_ret)(void *, int); 31189 31190 typedef void (*btf_trace_sched_kthread_work_queue_work)(void *, struct kthread_worker *, struct kthread_work *); 31191 31192 typedef void (*btf_trace_sched_kthread_work_execute_start)(void *, struct kthread_work *); 31193 31194 typedef void (*btf_trace_sched_kthread_work_execute_end)(void *, struct kthread_work *, kthread_work_func_t); 31195 31196 typedef void (*btf_trace_sched_waking)(void *, struct task_struct *); 31197 31198 typedef void (*btf_trace_sched_wakeup)(void *, struct task_struct *); 31199 31200 typedef void (*btf_trace_sched_wakeup_new)(void *, struct task_struct *); 31201 31202 typedef void (*btf_trace_sched_switch)(void *, bool, struct task_struct *, struct task_struct *); 31203 31204 typedef void (*btf_trace_sched_migrate_task)(void *, struct task_struct *, int); 31205 31206 typedef void (*btf_trace_sched_process_free)(void *, struct task_struct *); 31207 31208 typedef void (*btf_trace_sched_process_exit)(void *, struct task_struct *); 31209 31210 typedef void (*btf_trace_sched_wait_task)(void *, struct task_struct *); 31211 31212 typedef void (*btf_trace_sched_process_wait)(void *, struct pid *); 31213 31214 typedef void (*btf_trace_sched_process_fork)(void *, struct task_struct *, struct task_struct *); 31215 31216 typedef void (*btf_trace_sched_process_exec)(void *, struct task_struct *, pid_t, struct linux_binprm *); 31217 31218 typedef void (*btf_trace_sched_stat_wait)(void *, struct task_struct *, u64); 31219 31220 typedef void (*btf_trace_sched_stat_sleep)(void *, struct task_struct *, u64); 31221 31222 typedef void (*btf_trace_sched_stat_iowait)(void *, struct task_struct *, u64); 31223 31224 typedef void (*btf_trace_sched_stat_blocked)(void *, struct task_struct *, u64); 31225 31226 typedef void (*btf_trace_sched_stat_runtime)(void *, struct task_struct *, u64, u64); 31227 31228 typedef void (*btf_trace_sched_pi_setprio)(void *, struct task_struct *, struct task_struct *); 31229 31230 typedef void (*btf_trace_sched_move_numa)(void *, struct task_struct *, int, int); 31231 31232 typedef void (*btf_trace_sched_stick_numa)(void *, struct task_struct *, int, struct task_struct *, int); 31233 31234 typedef void (*btf_trace_sched_swap_numa)(void *, struct task_struct *, int, struct task_struct *, int); 31235 31236 typedef void (*btf_trace_sched_wake_idle_without_ipi)(void *, int); 31237 31238 struct wake_q_head { 31239 struct wake_q_node *first; 31240 struct wake_q_node **lastp; 31241 }; 31242 31243 struct sched_attr { 31244 __u32 size; 31245 __u32 sched_policy; 31246 __u64 sched_flags; 31247 __s32 sched_nice; 31248 __u32 sched_priority; 31249 __u64 sched_runtime; 31250 __u64 sched_deadline; 31251 __u64 sched_period; 31252 __u32 sched_util_min; 31253 __u32 sched_util_max; 31254 }; 31255 31256 struct cpuidle_state_usage { 31257 long long unsigned int disable; 31258 long long unsigned int usage; 31259 u64 time_ns; 31260 long long unsigned int above; 31261 long long unsigned int below; 31262 long long unsigned int rejected; 31263 long long unsigned int s2idle_usage; 31264 long long unsigned int s2idle_time; 31265 }; 31266 31267 struct cpuidle_device; 31268 31269 struct cpuidle_driver; 31270 31271 struct cpuidle_state { 31272 char name[16]; 31273 char desc[32]; 31274 u64 exit_latency_ns; 31275 u64 target_residency_ns; 31276 unsigned int flags; 31277 unsigned int exit_latency; 31278 int power_usage; 31279 unsigned int target_residency; 31280 int (*enter)(struct cpuidle_device *, struct cpuidle_driver *, int); 31281 int (*enter_dead)(struct cpuidle_device *, int); 31282 int (*enter_s2idle)(struct cpuidle_device *, struct cpuidle_driver *, int); 31283 }; 31284 31285 struct cpuidle_driver_kobj; 31286 31287 struct cpuidle_state_kobj; 31288 31289 struct cpuidle_device_kobj; 31290 31291 struct cpuidle_device { 31292 unsigned int registered: 1; 31293 unsigned int enabled: 1; 31294 unsigned int poll_time_limit: 1; 31295 unsigned int cpu; 31296 ktime_t next_hrtimer; 31297 int last_state_idx; 31298 u64 last_residency_ns; 31299 u64 poll_limit_ns; 31300 u64 forced_idle_latency_limit_ns; 31301 struct cpuidle_state_usage states_usage[10]; 31302 struct cpuidle_state_kobj *kobjs[10]; 31303 struct cpuidle_driver_kobj *kobj_driver; 31304 struct cpuidle_device_kobj *kobj_dev; 31305 struct list_head device_list; 31306 }; 31307 31308 struct cpuidle_driver { 31309 const char *name; 31310 struct module *owner; 31311 unsigned int bctimer: 1; 31312 struct cpuidle_state states[10]; 31313 int state_count; 31314 int safe_state_index; 31315 struct cpumask *cpumask; 31316 const char *governor; 31317 }; 31318 31319 struct cpu_stop_done; 31320 31321 struct cpu_stop_work { 31322 struct list_head list; 31323 cpu_stop_fn_t fn; 31324 long unsigned int caller; 31325 void *arg; 31326 struct cpu_stop_done *done; 31327 }; 31328 31329 struct cpudl_item { 31330 u64 dl; 31331 int cpu; 31332 int idx; 31333 }; 31334 31335 struct rt_prio_array { 31336 long unsigned int bitmap[2]; 31337 struct list_head queue[100]; 31338 }; 31339 31340 struct rt_bandwidth { 31341 raw_spinlock_t rt_runtime_lock; 31342 ktime_t rt_period; 31343 u64 rt_runtime; 31344 struct hrtimer rt_period_timer; 31345 unsigned int rt_period_active; 31346 }; 31347 31348 struct dl_bandwidth { 31349 raw_spinlock_t dl_runtime_lock; 31350 u64 dl_runtime; 31351 u64 dl_period; 31352 }; 31353 31354 typedef int (*tg_visitor)(struct task_group *, void *); 31355 31356 struct rt_rq { 31357 struct rt_prio_array active; 31358 unsigned int rt_nr_running; 31359 unsigned int rr_nr_running; 31360 struct { 31361 int curr; 31362 int next; 31363 } highest_prio; 31364 long unsigned int rt_nr_migratory; 31365 long unsigned int rt_nr_total; 31366 int overloaded; 31367 struct plist_head pushable_tasks; 31368 int rt_queued; 31369 int rt_throttled; 31370 u64 rt_time; 31371 u64 rt_runtime; 31372 raw_spinlock_t rt_runtime_lock; 31373 }; 31374 31375 struct dl_rq { 31376 struct rb_root_cached root; 31377 long unsigned int dl_nr_running; 31378 struct { 31379 u64 curr; 31380 u64 next; 31381 } earliest_dl; 31382 long unsigned int dl_nr_migratory; 31383 int overloaded; 31384 struct rb_root_cached pushable_dl_tasks_root; 31385 u64 running_bw; 31386 u64 this_bw; 31387 u64 extra_bw; 31388 u64 bw_ratio; 31389 }; 31390 31391 struct rq { 31392 raw_spinlock_t lock; 31393 unsigned int nr_running; 31394 unsigned int nr_numa_running; 31395 unsigned int nr_preferred_running; 31396 unsigned int numa_migrate_on; 31397 long unsigned int last_blocked_load_update_tick; 31398 unsigned int has_blocked_load; 31399 long: 32; 31400 long: 64; 31401 long: 64; 31402 long: 64; 31403 call_single_data_t nohz_csd; 31404 unsigned int nohz_tick_stopped; 31405 atomic_t nohz_flags; 31406 unsigned int ttwu_pending; 31407 u64 nr_switches; 31408 long: 64; 31409 struct cfs_rq cfs; 31410 struct rt_rq rt; 31411 struct dl_rq dl; 31412 struct list_head leaf_cfs_rq_list; 31413 struct list_head *tmp_alone_branch; 31414 long unsigned int nr_uninterruptible; 31415 struct task_struct *curr; 31416 struct task_struct *idle; 31417 struct task_struct *stop; 31418 long unsigned int next_balance; 31419 struct mm_struct *prev_mm; 31420 unsigned int clock_update_flags; 31421 u64 clock; 31422 long: 64; 31423 long: 64; 31424 long: 64; 31425 u64 clock_task; 31426 u64 clock_pelt; 31427 long unsigned int lost_idle_time; 31428 atomic_t nr_iowait; 31429 int membarrier_state; 31430 struct root_domain *rd; 31431 struct sched_domain *sd; 31432 long unsigned int cpu_capacity; 31433 long unsigned int cpu_capacity_orig; 31434 struct callback_head *balance_callback; 31435 unsigned char balance_push; 31436 unsigned char nohz_idle_balance; 31437 unsigned char idle_balance; 31438 long unsigned int misfit_task_load; 31439 int active_balance; 31440 int push_cpu; 31441 struct cpu_stop_work active_balance_work; 31442 int cpu; 31443 int online; 31444 struct list_head cfs_tasks; 31445 long: 64; 31446 long: 64; 31447 long: 64; 31448 struct sched_avg avg_rt; 31449 struct sched_avg avg_dl; 31450 struct sched_avg avg_irq; 31451 u64 idle_stamp; 31452 u64 avg_idle; 31453 u64 max_idle_balance_cost; 31454 struct rcuwait hotplug_wait; 31455 u64 prev_irq_time; 31456 u64 prev_steal_time; 31457 u64 prev_steal_time_rq; 31458 long unsigned int calc_load_update; 31459 long int calc_load_active; 31460 long: 64; 31461 long: 64; 31462 long: 64; 31463 call_single_data_t hrtick_csd; 31464 struct hrtimer hrtick_timer; 31465 ktime_t hrtick_time; 31466 struct sched_info rq_sched_info; 31467 long long unsigned int rq_cpu_time; 31468 unsigned int yld_count; 31469 unsigned int sched_count; 31470 unsigned int sched_goidle; 31471 unsigned int ttwu_count; 31472 unsigned int ttwu_local; 31473 struct cpuidle_state *idle_state; 31474 unsigned int nr_pinned; 31475 unsigned int push_busy; 31476 struct cpu_stop_work push_work; 31477 long: 64; 31478 long: 64; 31479 long: 64; 31480 long: 64; 31481 long: 64; 31482 long: 64; 31483 long: 64; 31484 }; 31485 31486 struct perf_domain { 31487 struct em_perf_domain *em_pd; 31488 struct perf_domain *next; 31489 struct callback_head rcu; 31490 }; 31491 31492 struct rq_flags { 31493 long unsigned int flags; 31494 struct pin_cookie cookie; 31495 unsigned int clock_update_flags; 31496 }; 31497 31498 enum { 31499 __SCHED_FEAT_GENTLE_FAIR_SLEEPERS = 0, 31500 __SCHED_FEAT_START_DEBIT = 1, 31501 __SCHED_FEAT_NEXT_BUDDY = 2, 31502 __SCHED_FEAT_LAST_BUDDY = 3, 31503 __SCHED_FEAT_CACHE_HOT_BUDDY = 4, 31504 __SCHED_FEAT_WAKEUP_PREEMPTION = 5, 31505 __SCHED_FEAT_HRTICK = 6, 31506 __SCHED_FEAT_DOUBLE_TICK = 7, 31507 __SCHED_FEAT_NONTASK_CAPACITY = 8, 31508 __SCHED_FEAT_TTWU_QUEUE = 9, 31509 __SCHED_FEAT_SIS_AVG_CPU = 10, 31510 __SCHED_FEAT_SIS_PROP = 11, 31511 __SCHED_FEAT_WARN_DOUBLE_CLOCK = 12, 31512 __SCHED_FEAT_RT_PUSH_IPI = 13, 31513 __SCHED_FEAT_RT_RUNTIME_SHARE = 14, 31514 __SCHED_FEAT_LB_MIN = 15, 31515 __SCHED_FEAT_ATTACH_AGE_LOAD = 16, 31516 __SCHED_FEAT_WA_IDLE = 17, 31517 __SCHED_FEAT_WA_WEIGHT = 18, 31518 __SCHED_FEAT_WA_BIAS = 19, 31519 __SCHED_FEAT_UTIL_EST = 20, 31520 __SCHED_FEAT_UTIL_EST_FASTUP = 21, 31521 __SCHED_FEAT_NR = 22, 31522 }; 31523 31524 struct irqtime { 31525 u64 total; 31526 u64 tick_delta; 31527 u64 irq_start_time; 31528 struct u64_stats_sync sync; 31529 }; 31530 31531 struct set_affinity_pending; 31532 31533 struct migration_arg { 31534 struct task_struct *task; 31535 int dest_cpu; 31536 struct set_affinity_pending *pending; 31537 }; 31538 31539 struct set_affinity_pending { 31540 refcount_t refs; 31541 unsigned int stop_pending; 31542 struct completion done; 31543 struct cpu_stop_work stop_work; 31544 struct migration_arg arg; 31545 }; 31546 31547 struct migration_swap_arg { 31548 struct task_struct *src_task; 31549 struct task_struct *dst_task; 31550 int src_cpu; 31551 int dst_cpu; 31552 }; 31553 31554 struct tick_work { 31555 int cpu; 31556 atomic_t state; 31557 struct delayed_work work; 31558 }; 31559 31560 struct cfs_schedulable_data { 31561 struct task_group *tg; 31562 u64 period; 31563 u64 quota; 31564 }; 31565 31566 enum { 31567 cpuset = 0, 31568 possible = 1, 31569 fail = 2, 31570 }; 31571 31572 enum tick_dep_bits { 31573 TICK_DEP_BIT_POSIX_TIMER = 0, 31574 TICK_DEP_BIT_PERF_EVENTS = 1, 31575 TICK_DEP_BIT_SCHED = 2, 31576 TICK_DEP_BIT_CLOCK_UNSTABLE = 3, 31577 TICK_DEP_BIT_RCU = 4, 31578 TICK_DEP_BIT_RCU_EXP = 5, 31579 }; 31580 31581 struct sched_clock_data { 31582 u64 tick_raw; 31583 u64 tick_gtod; 31584 u64 clock; 31585 }; 31586 31587 enum s2idle_states { 31588 S2IDLE_STATE_NONE = 0, 31589 S2IDLE_STATE_ENTER = 1, 31590 S2IDLE_STATE_WAKE = 2, 31591 }; 31592 31593 struct idle_timer { 31594 struct hrtimer timer; 31595 int done; 31596 }; 31597 31598 struct numa_group { 31599 refcount_t refcount; 31600 spinlock_t lock; 31601 int nr_tasks; 31602 pid_t gid; 31603 int active_nodes; 31604 struct callback_head rcu; 31605 long unsigned int total_faults; 31606 long unsigned int max_faults_cpu; 31607 long unsigned int *faults_cpu; 31608 long unsigned int faults[0]; 31609 }; 31610 31611 struct update_util_data { 31612 void (*func)(struct update_util_data *, u64, unsigned int); 31613 }; 31614 31615 enum numa_topology_type { 31616 NUMA_DIRECT = 0, 31617 NUMA_GLUELESS_MESH = 1, 31618 NUMA_BACKPLANE = 2, 31619 }; 31620 31621 enum numa_faults_stats { 31622 NUMA_MEM = 0, 31623 NUMA_CPU = 1, 31624 NUMA_MEMBUF = 2, 31625 NUMA_CPUBUF = 3, 31626 }; 31627 31628 enum schedutil_type { 31629 FREQUENCY_UTIL = 0, 31630 ENERGY_UTIL = 1, 31631 }; 31632 31633 enum numa_type { 31634 node_has_spare = 0, 31635 node_fully_busy = 1, 31636 node_overloaded = 2, 31637 }; 31638 31639 struct numa_stats { 31640 long unsigned int load; 31641 long unsigned int runnable; 31642 long unsigned int util; 31643 long unsigned int compute_capacity; 31644 unsigned int nr_running; 31645 unsigned int weight; 31646 enum numa_type node_type; 31647 int idle_cpu; 31648 }; 31649 31650 struct task_numa_env { 31651 struct task_struct *p; 31652 int src_cpu; 31653 int src_nid; 31654 int dst_cpu; 31655 int dst_nid; 31656 struct numa_stats src_stats; 31657 struct numa_stats dst_stats; 31658 int imbalance_pct; 31659 int dist; 31660 struct task_struct *best_task; 31661 long int best_imp; 31662 int best_cpu; 31663 }; 31664 31665 enum fbq_type { 31666 regular = 0, 31667 remote = 1, 31668 all = 2, 31669 }; 31670 31671 enum group_type { 31672 group_has_spare = 0, 31673 group_fully_busy = 1, 31674 group_misfit_task = 2, 31675 group_asym_packing = 3, 31676 group_imbalanced = 4, 31677 group_overloaded = 5, 31678 }; 31679 31680 enum migration_type { 31681 migrate_load = 0, 31682 migrate_util = 1, 31683 migrate_task = 2, 31684 migrate_misfit = 3, 31685 }; 31686 31687 struct lb_env { 31688 struct sched_domain *sd; 31689 struct rq *src_rq; 31690 int src_cpu; 31691 int dst_cpu; 31692 struct rq *dst_rq; 31693 struct cpumask *dst_grpmask; 31694 int new_dst_cpu; 31695 enum cpu_idle_type idle; 31696 long int imbalance; 31697 struct cpumask *cpus; 31698 unsigned int flags; 31699 unsigned int loop; 31700 unsigned int loop_break; 31701 unsigned int loop_max; 31702 enum fbq_type fbq_type; 31703 enum migration_type migration_type; 31704 struct list_head tasks; 31705 }; 31706 31707 struct sg_lb_stats { 31708 long unsigned int avg_load; 31709 long unsigned int group_load; 31710 long unsigned int group_capacity; 31711 long unsigned int group_util; 31712 long unsigned int group_runnable; 31713 unsigned int sum_nr_running; 31714 unsigned int sum_h_nr_running; 31715 unsigned int idle_cpus; 31716 unsigned int group_weight; 31717 enum group_type group_type; 31718 unsigned int group_asym_packing; 31719 long unsigned int group_misfit_task_load; 31720 unsigned int nr_numa_running; 31721 unsigned int nr_preferred_running; 31722 }; 31723 31724 struct sd_lb_stats { 31725 struct sched_group *busiest; 31726 struct sched_group *local; 31727 long unsigned int total_load; 31728 long unsigned int total_capacity; 31729 long unsigned int avg_load; 31730 unsigned int prefer_sibling; 31731 struct sg_lb_stats busiest_stat; 31732 struct sg_lb_stats local_stat; 31733 }; 31734 31735 typedef struct rt_rq *rt_rq_iter_t; 31736 31737 struct sd_flag_debug { 31738 unsigned int meta_flags; 31739 char *name; 31740 }; 31741 31742 struct s_data { 31743 struct sched_domain **sd; 31744 struct root_domain *rd; 31745 }; 31746 31747 enum s_alloc { 31748 sa_rootdomain = 0, 31749 sa_sd = 1, 31750 sa_sd_storage = 2, 31751 sa_none = 3, 31752 }; 31753 31754 enum cpuacct_stat_index { 31755 CPUACCT_STAT_USER = 0, 31756 CPUACCT_STAT_SYSTEM = 1, 31757 CPUACCT_STAT_NSTATS = 2, 31758 }; 31759 31760 struct cpuacct_usage { 31761 u64 usages[2]; 31762 }; 31763 31764 struct cpuacct { 31765 struct cgroup_subsys_state css; 31766 struct cpuacct_usage *cpuusage; 31767 struct kernel_cpustat *cpustat; 31768 }; 31769 31770 struct gov_attr_set { 31771 struct kobject kobj; 31772 struct list_head policy_list; 31773 struct mutex update_lock; 31774 int usage_count; 31775 }; 31776 31777 struct governor_attr { 31778 struct attribute attr; 31779 ssize_t (*show)(struct gov_attr_set *, char *); 31780 ssize_t (*store)(struct gov_attr_set *, const char *, size_t); 31781 }; 31782 31783 struct sugov_tunables { 31784 struct gov_attr_set attr_set; 31785 unsigned int rate_limit_us; 31786 }; 31787 31788 struct sugov_policy { 31789 struct cpufreq_policy *policy; 31790 struct sugov_tunables *tunables; 31791 struct list_head tunables_hook; 31792 raw_spinlock_t update_lock; 31793 u64 last_freq_update_time; 31794 s64 freq_update_delay_ns; 31795 unsigned int next_freq; 31796 unsigned int cached_raw_freq; 31797 struct irq_work irq_work; 31798 struct kthread_work work; 31799 struct mutex work_lock; 31800 struct kthread_worker worker; 31801 struct task_struct *thread; 31802 bool work_in_progress; 31803 bool limits_changed; 31804 bool need_freq_update; 31805 }; 31806 31807 struct sugov_cpu { 31808 struct update_util_data update_util; 31809 struct sugov_policy *sg_policy; 31810 unsigned int cpu; 31811 bool iowait_boost_pending; 31812 unsigned int iowait_boost; 31813 u64 last_update; 31814 long unsigned int util; 31815 long unsigned int bw_dl; 31816 long unsigned int max; 31817 long unsigned int saved_idle_calls; 31818 }; 31819 31820 enum { 31821 MEMBARRIER_FLAG_SYNC_CORE = 1, 31822 MEMBARRIER_FLAG_RSEQ = 2, 31823 }; 31824 31825 enum membarrier_cmd { 31826 MEMBARRIER_CMD_QUERY = 0, 31827 MEMBARRIER_CMD_GLOBAL = 1, 31828 MEMBARRIER_CMD_GLOBAL_EXPEDITED = 2, 31829 MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = 4, 31830 MEMBARRIER_CMD_PRIVATE_EXPEDITED = 8, 31831 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = 16, 31832 MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = 32, 31833 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = 64, 31834 MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = 128, 31835 MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = 256, 31836 MEMBARRIER_CMD_SHARED = 1, 31837 }; 31838 31839 enum membarrier_cmd_flag { 31840 MEMBARRIER_CMD_FLAG_CPU = 1, 31841 }; 31842 31843 enum psi_res { 31844 PSI_IO = 0, 31845 PSI_MEM = 1, 31846 PSI_CPU = 2, 31847 NR_PSI_RESOURCES = 3, 31848 }; 31849 31850 struct psi_window { 31851 u64 size; 31852 u64 start_time; 31853 u64 start_value; 31854 u64 prev_growth; 31855 }; 31856 31857 struct psi_trigger { 31858 enum psi_states state; 31859 u64 threshold; 31860 struct list_head node; 31861 struct psi_group *group; 31862 wait_queue_head_t event_wait; 31863 int event; 31864 struct psi_window win; 31865 u64 last_event_time; 31866 struct kref refcount; 31867 }; 31868 31869 struct ww_acquire_ctx; 31870 31871 struct ww_mutex { 31872 struct mutex base; 31873 struct ww_acquire_ctx *ctx; 31874 }; 31875 31876 struct ww_acquire_ctx { 31877 struct task_struct *task; 31878 long unsigned int stamp; 31879 unsigned int acquired; 31880 short unsigned int wounded; 31881 short unsigned int is_wait_die; 31882 }; 31883 31884 struct mutex_waiter { 31885 struct list_head list; 31886 struct task_struct *task; 31887 struct ww_acquire_ctx *ww_ctx; 31888 }; 31889 31890 enum mutex_trylock_recursive_enum { 31891 MUTEX_TRYLOCK_FAILED = 0, 31892 MUTEX_TRYLOCK_SUCCESS = 1, 31893 MUTEX_TRYLOCK_RECURSIVE = 2, 31894 }; 31895 31896 struct semaphore_waiter { 31897 struct list_head list; 31898 struct task_struct *task; 31899 bool up; 31900 }; 31901 31902 enum rwsem_waiter_type { 31903 RWSEM_WAITING_FOR_WRITE = 0, 31904 RWSEM_WAITING_FOR_READ = 1, 31905 }; 31906 31907 struct rwsem_waiter { 31908 struct list_head list; 31909 struct task_struct *task; 31910 enum rwsem_waiter_type type; 31911 long unsigned int timeout; 31912 }; 31913 31914 enum rwsem_wake_type { 31915 RWSEM_WAKE_ANY = 0, 31916 RWSEM_WAKE_READERS = 1, 31917 RWSEM_WAKE_READ_OWNED = 2, 31918 }; 31919 31920 enum writer_wait_state { 31921 WRITER_NOT_FIRST = 0, 31922 WRITER_FIRST = 1, 31923 WRITER_HANDOFF = 2, 31924 }; 31925 31926 enum owner_state { 31927 OWNER_NULL = 1, 31928 OWNER_WRITER = 2, 31929 OWNER_READER = 4, 31930 OWNER_NONSPINNABLE = 8, 31931 }; 31932 31933 struct optimistic_spin_node { 31934 struct optimistic_spin_node *next; 31935 struct optimistic_spin_node *prev; 31936 int locked; 31937 int cpu; 31938 }; 31939 31940 struct mcs_spinlock { 31941 struct mcs_spinlock *next; 31942 int locked; 31943 int count; 31944 }; 31945 31946 struct qnode { 31947 struct mcs_spinlock mcs; 31948 long int reserved[2]; 31949 }; 31950 31951 enum vcpu_state { 31952 vcpu_running = 0, 31953 vcpu_halted = 1, 31954 vcpu_hashed = 2, 31955 }; 31956 31957 struct pv_node { 31958 struct mcs_spinlock mcs; 31959 int cpu; 31960 u8 state; 31961 }; 31962 31963 struct pv_hash_entry { 31964 struct qspinlock *lock; 31965 struct pv_node *node; 31966 }; 31967 31968 struct hrtimer_sleeper { 31969 struct hrtimer timer; 31970 struct task_struct *task; 31971 }; 31972 31973 struct rt_mutex; 31974 31975 struct rt_mutex_waiter { 31976 struct rb_node tree_entry; 31977 struct rb_node pi_tree_entry; 31978 struct task_struct *task; 31979 struct rt_mutex *lock; 31980 int prio; 31981 u64 deadline; 31982 }; 31983 31984 struct rt_mutex { 31985 raw_spinlock_t wait_lock; 31986 struct rb_root_cached waiters; 31987 struct task_struct *owner; 31988 }; 31989 31990 enum rtmutex_chainwalk { 31991 RT_MUTEX_MIN_CHAINWALK = 0, 31992 RT_MUTEX_FULL_CHAINWALK = 1, 31993 }; 31994 31995 enum pm_qos_req_action { 31996 PM_QOS_ADD_REQ = 0, 31997 PM_QOS_UPDATE_REQ = 1, 31998 PM_QOS_REMOVE_REQ = 2, 31999 }; 32000 32001 typedef int suspend_state_t; 32002 32003 enum suspend_stat_step { 32004 SUSPEND_FREEZE = 1, 32005 SUSPEND_PREPARE = 2, 32006 SUSPEND_SUSPEND = 3, 32007 SUSPEND_SUSPEND_LATE = 4, 32008 SUSPEND_SUSPEND_NOIRQ = 5, 32009 SUSPEND_RESUME_NOIRQ = 6, 32010 SUSPEND_RESUME_EARLY = 7, 32011 SUSPEND_RESUME = 8, 32012 }; 32013 32014 struct suspend_stats { 32015 int success; 32016 int fail; 32017 int failed_freeze; 32018 int failed_prepare; 32019 int failed_suspend; 32020 int failed_suspend_late; 32021 int failed_suspend_noirq; 32022 int failed_resume; 32023 int failed_resume_early; 32024 int failed_resume_noirq; 32025 int last_failed_dev; 32026 char failed_devs[80]; 32027 int last_failed_errno; 32028 int errno[2]; 32029 int last_failed_step; 32030 enum suspend_stat_step failed_steps[2]; 32031 }; 32032 32033 enum { 32034 TEST_NONE = 0, 32035 TEST_CORE = 1, 32036 TEST_CPUS = 2, 32037 TEST_PLATFORM = 3, 32038 TEST_DEVICES = 4, 32039 TEST_FREEZER = 5, 32040 __TEST_AFTER_LAST = 6, 32041 }; 32042 32043 struct pm_vt_switch { 32044 struct list_head head; 32045 struct device *dev; 32046 bool required; 32047 }; 32048 32049 struct platform_suspend_ops { 32050 int (*valid)(suspend_state_t); 32051 int (*begin)(suspend_state_t); 32052 int (*prepare)(); 32053 int (*prepare_late)(); 32054 int (*enter)(suspend_state_t); 32055 void (*wake)(); 32056 void (*finish)(); 32057 bool (*suspend_again)(); 32058 void (*end)(); 32059 void (*recover)(); 32060 }; 32061 32062 struct platform_s2idle_ops { 32063 int (*begin)(); 32064 int (*prepare)(); 32065 int (*prepare_late)(); 32066 bool (*wake)(); 32067 void (*restore_early)(); 32068 void (*restore)(); 32069 void (*end)(); 32070 }; 32071 32072 typedef __u64 timeu64_t; 32073 32074 struct rtc_wkalrm { 32075 unsigned char enabled; 32076 unsigned char pending; 32077 struct rtc_time time; 32078 }; 32079 32080 struct rtc_class_ops { 32081 int (*ioctl)(struct device *, unsigned int, long unsigned int); 32082 int (*read_time)(struct device *, struct rtc_time *); 32083 int (*set_time)(struct device *, struct rtc_time *); 32084 int (*read_alarm)(struct device *, struct rtc_wkalrm *); 32085 int (*set_alarm)(struct device *, struct rtc_wkalrm *); 32086 int (*proc)(struct device *, struct seq_file *); 32087 int (*alarm_irq_enable)(struct device *, unsigned int); 32088 int (*read_offset)(struct device *, long int *); 32089 int (*set_offset)(struct device *, long int); 32090 }; 32091 32092 struct rtc_device; 32093 32094 struct rtc_timer { 32095 struct timerqueue_node node; 32096 ktime_t period; 32097 void (*func)(struct rtc_device *); 32098 struct rtc_device *rtc; 32099 int enabled; 32100 }; 32101 32102 struct rtc_device { 32103 struct device dev; 32104 struct module *owner; 32105 int id; 32106 const struct rtc_class_ops *ops; 32107 struct mutex ops_lock; 32108 struct cdev char_dev; 32109 long unsigned int flags; 32110 long unsigned int irq_data; 32111 spinlock_t irq_lock; 32112 wait_queue_head_t irq_queue; 32113 struct fasync_struct *async_queue; 32114 int irq_freq; 32115 int max_user_freq; 32116 struct timerqueue_head timerqueue; 32117 struct rtc_timer aie_timer; 32118 struct rtc_timer uie_rtctimer; 32119 struct hrtimer pie_timer; 32120 int pie_enabled; 32121 struct work_struct irqwork; 32122 int uie_unsupported; 32123 long unsigned int set_offset_nsec; 32124 time64_t range_min; 32125 timeu64_t range_max; 32126 time64_t start_secs; 32127 time64_t offset_secs; 32128 bool set_start_time; 32129 }; 32130 32131 struct platform_hibernation_ops { 32132 int (*begin)(pm_message_t); 32133 void (*end)(); 32134 int (*pre_snapshot)(); 32135 void (*finish)(); 32136 int (*prepare)(); 32137 int (*enter)(); 32138 void (*leave)(); 32139 int (*pre_restore)(); 32140 void (*restore_cleanup)(); 32141 void (*recover)(); 32142 }; 32143 32144 enum { 32145 HIBERNATION_INVALID = 0, 32146 HIBERNATION_PLATFORM = 1, 32147 HIBERNATION_SHUTDOWN = 2, 32148 HIBERNATION_REBOOT = 3, 32149 HIBERNATION_SUSPEND = 4, 32150 HIBERNATION_TEST_RESUME = 5, 32151 __HIBERNATION_AFTER_LAST = 6, 32152 }; 32153 32154 struct pbe { 32155 void *address; 32156 void *orig_address; 32157 struct pbe *next; 32158 }; 32159 32160 struct swsusp_info { 32161 struct new_utsname uts; 32162 u32 version_code; 32163 long unsigned int num_physpages; 32164 int cpus; 32165 long unsigned int image_pages; 32166 long unsigned int pages; 32167 long unsigned int size; 32168 long: 64; 32169 long: 64; 32170 long: 64; 32171 long: 64; 32172 long: 64; 32173 long: 64; 32174 long: 64; 32175 long: 64; 32176 long: 64; 32177 long: 64; 32178 long: 64; 32179 long: 64; 32180 long: 64; 32181 long: 64; 32182 long: 64; 32183 long: 64; 32184 long: 64; 32185 long: 64; 32186 long: 64; 32187 long: 64; 32188 long: 64; 32189 long: 64; 32190 long: 64; 32191 long: 64; 32192 long: 64; 32193 long: 64; 32194 long: 64; 32195 long: 64; 32196 long: 64; 32197 long: 64; 32198 long: 64; 32199 long: 64; 32200 long: 64; 32201 long: 64; 32202 long: 64; 32203 long: 64; 32204 long: 64; 32205 long: 64; 32206 long: 64; 32207 long: 64; 32208 long: 64; 32209 long: 64; 32210 long: 64; 32211 long: 64; 32212 long: 64; 32213 long: 64; 32214 long: 64; 32215 long: 64; 32216 long: 64; 32217 long: 64; 32218 long: 64; 32219 long: 64; 32220 long: 64; 32221 long: 64; 32222 long: 64; 32223 long: 64; 32224 long: 64; 32225 long: 64; 32226 long: 64; 32227 long: 64; 32228 long: 64; 32229 long: 64; 32230 long: 64; 32231 long: 64; 32232 long: 64; 32233 long: 64; 32234 long: 64; 32235 long: 64; 32236 long: 64; 32237 long: 64; 32238 long: 64; 32239 long: 64; 32240 long: 64; 32241 long: 64; 32242 long: 64; 32243 long: 64; 32244 long: 64; 32245 long: 64; 32246 long: 64; 32247 long: 64; 32248 long: 64; 32249 long: 64; 32250 long: 64; 32251 long: 64; 32252 long: 64; 32253 long: 64; 32254 long: 64; 32255 long: 64; 32256 long: 64; 32257 long: 64; 32258 long: 64; 32259 long: 64; 32260 long: 64; 32261 long: 64; 32262 long: 64; 32263 long: 64; 32264 long: 64; 32265 long: 64; 32266 long: 64; 32267 long: 64; 32268 long: 64; 32269 long: 64; 32270 long: 64; 32271 long: 64; 32272 long: 64; 32273 long: 64; 32274 long: 64; 32275 long: 64; 32276 long: 64; 32277 long: 64; 32278 long: 64; 32279 long: 64; 32280 long: 64; 32281 long: 64; 32282 long: 64; 32283 long: 64; 32284 long: 64; 32285 long: 64; 32286 long: 64; 32287 long: 64; 32288 long: 64; 32289 long: 64; 32290 long: 64; 32291 long: 64; 32292 long: 64; 32293 long: 64; 32294 long: 64; 32295 long: 64; 32296 long: 64; 32297 long: 64; 32298 long: 64; 32299 long: 64; 32300 long: 64; 32301 long: 64; 32302 long: 64; 32303 long: 64; 32304 long: 64; 32305 long: 64; 32306 long: 64; 32307 long: 64; 32308 long: 64; 32309 long: 64; 32310 long: 64; 32311 long: 64; 32312 long: 64; 32313 long: 64; 32314 long: 64; 32315 long: 64; 32316 long: 64; 32317 long: 64; 32318 long: 64; 32319 long: 64; 32320 long: 64; 32321 long: 64; 32322 long: 64; 32323 long: 64; 32324 long: 64; 32325 long: 64; 32326 long: 64; 32327 long: 64; 32328 long: 64; 32329 long: 64; 32330 long: 64; 32331 long: 64; 32332 long: 64; 32333 long: 64; 32334 long: 64; 32335 long: 64; 32336 long: 64; 32337 long: 64; 32338 long: 64; 32339 long: 64; 32340 long: 64; 32341 long: 64; 32342 long: 64; 32343 long: 64; 32344 long: 64; 32345 long: 64; 32346 long: 64; 32347 long: 64; 32348 long: 64; 32349 long: 64; 32350 long: 64; 32351 long: 64; 32352 long: 64; 32353 long: 64; 32354 long: 64; 32355 long: 64; 32356 long: 64; 32357 long: 64; 32358 long: 64; 32359 long: 64; 32360 long: 64; 32361 long: 64; 32362 long: 64; 32363 long: 64; 32364 long: 64; 32365 long: 64; 32366 long: 64; 32367 long: 64; 32368 long: 64; 32369 long: 64; 32370 long: 64; 32371 long: 64; 32372 long: 64; 32373 long: 64; 32374 long: 64; 32375 long: 64; 32376 long: 64; 32377 long: 64; 32378 long: 64; 32379 long: 64; 32380 long: 64; 32381 long: 64; 32382 long: 64; 32383 long: 64; 32384 long: 64; 32385 long: 64; 32386 long: 64; 32387 long: 64; 32388 long: 64; 32389 long: 64; 32390 long: 64; 32391 long: 64; 32392 long: 64; 32393 long: 64; 32394 long: 64; 32395 long: 64; 32396 long: 64; 32397 long: 64; 32398 long: 64; 32399 long: 64; 32400 long: 64; 32401 long: 64; 32402 long: 64; 32403 long: 64; 32404 long: 64; 32405 long: 64; 32406 long: 64; 32407 long: 64; 32408 long: 64; 32409 long: 64; 32410 long: 64; 32411 long: 64; 32412 long: 64; 32413 long: 64; 32414 long: 64; 32415 long: 64; 32416 long: 64; 32417 long: 64; 32418 long: 64; 32419 long: 64; 32420 long: 64; 32421 long: 64; 32422 long: 64; 32423 long: 64; 32424 long: 64; 32425 long: 64; 32426 long: 64; 32427 long: 64; 32428 long: 64; 32429 long: 64; 32430 long: 64; 32431 long: 64; 32432 long: 64; 32433 long: 64; 32434 long: 64; 32435 long: 64; 32436 long: 64; 32437 long: 64; 32438 long: 64; 32439 long: 64; 32440 long: 64; 32441 long: 64; 32442 long: 64; 32443 long: 64; 32444 long: 64; 32445 long: 64; 32446 long: 64; 32447 long: 64; 32448 long: 64; 32449 long: 64; 32450 long: 64; 32451 long: 64; 32452 long: 64; 32453 long: 64; 32454 long: 64; 32455 long: 64; 32456 long: 64; 32457 long: 64; 32458 long: 64; 32459 long: 64; 32460 long: 64; 32461 long: 64; 32462 long: 64; 32463 long: 64; 32464 long: 64; 32465 long: 64; 32466 long: 64; 32467 long: 64; 32468 long: 64; 32469 long: 64; 32470 long: 64; 32471 long: 64; 32472 long: 64; 32473 long: 64; 32474 long: 64; 32475 long: 64; 32476 long: 64; 32477 long: 64; 32478 long: 64; 32479 long: 64; 32480 long: 64; 32481 long: 64; 32482 long: 64; 32483 long: 64; 32484 long: 64; 32485 long: 64; 32486 long: 64; 32487 long: 64; 32488 long: 64; 32489 long: 64; 32490 long: 64; 32491 long: 64; 32492 long: 64; 32493 long: 64; 32494 long: 64; 32495 long: 64; 32496 long: 64; 32497 long: 64; 32498 long: 64; 32499 long: 64; 32500 long: 64; 32501 long: 64; 32502 long: 64; 32503 long: 64; 32504 long: 64; 32505 long: 64; 32506 long: 64; 32507 long: 64; 32508 long: 64; 32509 long: 64; 32510 long: 64; 32511 long: 64; 32512 long: 64; 32513 long: 64; 32514 long: 64; 32515 long: 64; 32516 long: 64; 32517 long: 64; 32518 long: 64; 32519 long: 64; 32520 long: 64; 32521 long: 64; 32522 long: 64; 32523 long: 64; 32524 long: 64; 32525 long: 64; 32526 long: 64; 32527 long: 64; 32528 long: 64; 32529 long: 64; 32530 long: 64; 32531 long: 64; 32532 long: 64; 32533 long: 64; 32534 long: 64; 32535 long: 64; 32536 long: 64; 32537 long: 64; 32538 long: 64; 32539 long: 64; 32540 long: 64; 32541 long: 64; 32542 long: 64; 32543 long: 64; 32544 long: 64; 32545 long: 64; 32546 long: 64; 32547 long: 64; 32548 long: 64; 32549 long: 64; 32550 long: 64; 32551 long: 64; 32552 long: 64; 32553 long: 64; 32554 long: 64; 32555 long: 64; 32556 long: 64; 32557 long: 64; 32558 long: 64; 32559 long: 64; 32560 long: 64; 32561 long: 64; 32562 long: 64; 32563 long: 64; 32564 long: 64; 32565 long: 64; 32566 long: 64; 32567 long: 64; 32568 long: 64; 32569 long: 64; 32570 long: 64; 32571 long: 64; 32572 long: 64; 32573 long: 64; 32574 long: 64; 32575 long: 64; 32576 long: 64; 32577 long: 64; 32578 long: 64; 32579 long: 64; 32580 long: 64; 32581 long: 64; 32582 long: 64; 32583 long: 64; 32584 long: 64; 32585 long: 64; 32586 long: 64; 32587 long: 64; 32588 long: 64; 32589 long: 64; 32590 long: 64; 32591 long: 64; 32592 long: 64; 32593 long: 64; 32594 long: 64; 32595 long: 64; 32596 long: 64; 32597 long: 64; 32598 long: 64; 32599 long: 64; 32600 long: 64; 32601 long: 64; 32602 long: 64; 32603 long: 64; 32604 long: 64; 32605 long: 64; 32606 long: 64; 32607 long: 64; 32608 long: 64; 32609 long: 64; 32610 long: 64; 32611 long: 64; 32612 long: 64; 32613 long: 64; 32614 long: 64; 32615 long: 64; 32616 long: 64; 32617 long: 64; 32618 long: 64; 32619 long: 64; 32620 long: 64; 32621 long: 64; 32622 long: 64; 32623 long: 64; 32624 long: 64; 32625 }; 32626 32627 struct snapshot_handle { 32628 unsigned int cur; 32629 void *buffer; 32630 int sync_read; 32631 }; 32632 32633 struct linked_page { 32634 struct linked_page *next; 32635 char data[4088]; 32636 }; 32637 32638 struct chain_allocator { 32639 struct linked_page *chain; 32640 unsigned int used_space; 32641 gfp_t gfp_mask; 32642 int safe_needed; 32643 }; 32644 32645 struct rtree_node { 32646 struct list_head list; 32647 long unsigned int *data; 32648 }; 32649 32650 struct mem_zone_bm_rtree { 32651 struct list_head list; 32652 struct list_head nodes; 32653 struct list_head leaves; 32654 long unsigned int start_pfn; 32655 long unsigned int end_pfn; 32656 struct rtree_node *rtree; 32657 int levels; 32658 unsigned int blocks; 32659 }; 32660 32661 struct bm_position { 32662 struct mem_zone_bm_rtree *zone; 32663 struct rtree_node *node; 32664 long unsigned int node_pfn; 32665 int node_bit; 32666 }; 32667 32668 struct memory_bitmap { 32669 struct list_head zones; 32670 struct linked_page *p_list; 32671 struct bm_position cur; 32672 }; 32673 32674 struct mem_extent { 32675 struct list_head hook; 32676 long unsigned int start; 32677 long unsigned int end; 32678 }; 32679 32680 struct nosave_region { 32681 struct list_head list; 32682 long unsigned int start_pfn; 32683 long unsigned int end_pfn; 32684 }; 32685 32686 typedef struct { 32687 long unsigned int val; 32688 } swp_entry_t; 32689 32690 enum { 32691 BIO_NO_PAGE_REF = 0, 32692 BIO_CLONED = 1, 32693 BIO_BOUNCED = 2, 32694 BIO_WORKINGSET = 3, 32695 BIO_QUIET = 4, 32696 BIO_CHAIN = 5, 32697 BIO_REFFED = 6, 32698 BIO_THROTTLED = 7, 32699 BIO_TRACE_COMPLETION = 8, 32700 BIO_CGROUP_ACCT = 9, 32701 BIO_TRACKED = 10, 32702 BIO_FLAG_LAST = 11, 32703 }; 32704 32705 enum req_opf { 32706 REQ_OP_READ = 0, 32707 REQ_OP_WRITE = 1, 32708 REQ_OP_FLUSH = 2, 32709 REQ_OP_DISCARD = 3, 32710 REQ_OP_SECURE_ERASE = 5, 32711 REQ_OP_WRITE_SAME = 7, 32712 REQ_OP_WRITE_ZEROES = 9, 32713 REQ_OP_ZONE_OPEN = 10, 32714 REQ_OP_ZONE_CLOSE = 11, 32715 REQ_OP_ZONE_FINISH = 12, 32716 REQ_OP_ZONE_APPEND = 13, 32717 REQ_OP_ZONE_RESET = 15, 32718 REQ_OP_ZONE_RESET_ALL = 17, 32719 REQ_OP_SCSI_IN = 32, 32720 REQ_OP_SCSI_OUT = 33, 32721 REQ_OP_DRV_IN = 34, 32722 REQ_OP_DRV_OUT = 35, 32723 REQ_OP_LAST = 36, 32724 }; 32725 32726 enum req_flag_bits { 32727 __REQ_FAILFAST_DEV = 8, 32728 __REQ_FAILFAST_TRANSPORT = 9, 32729 __REQ_FAILFAST_DRIVER = 10, 32730 __REQ_SYNC = 11, 32731 __REQ_META = 12, 32732 __REQ_PRIO = 13, 32733 __REQ_NOMERGE = 14, 32734 __REQ_IDLE = 15, 32735 __REQ_INTEGRITY = 16, 32736 __REQ_FUA = 17, 32737 __REQ_PREFLUSH = 18, 32738 __REQ_RAHEAD = 19, 32739 __REQ_BACKGROUND = 20, 32740 __REQ_NOWAIT = 21, 32741 __REQ_CGROUP_PUNT = 22, 32742 __REQ_NOUNMAP = 23, 32743 __REQ_HIPRI = 24, 32744 __REQ_DRV = 25, 32745 __REQ_SWAP = 26, 32746 __REQ_NR_BITS = 27, 32747 }; 32748 32749 struct swap_map_page { 32750 sector_t entries[511]; 32751 sector_t next_swap; 32752 }; 32753 32754 struct swap_map_page_list { 32755 struct swap_map_page *map; 32756 struct swap_map_page_list *next; 32757 }; 32758 32759 struct swap_map_handle { 32760 struct swap_map_page *cur; 32761 struct swap_map_page_list *maps; 32762 sector_t cur_swap; 32763 sector_t first_sector; 32764 unsigned int k; 32765 long unsigned int reqd_free_pages; 32766 u32 crc32; 32767 }; 32768 32769 struct swsusp_header { 32770 char reserved[4060]; 32771 u32 crc32; 32772 sector_t image; 32773 unsigned int flags; 32774 char orig_sig[10]; 32775 char sig[10]; 32776 }; 32777 32778 struct swsusp_extent { 32779 struct rb_node node; 32780 long unsigned int start; 32781 long unsigned int end; 32782 }; 32783 32784 struct hib_bio_batch { 32785 atomic_t count; 32786 wait_queue_head_t wait; 32787 blk_status_t error; 32788 struct blk_plug plug; 32789 }; 32790 32791 struct crc_data { 32792 struct task_struct *thr; 32793 atomic_t ready; 32794 atomic_t stop; 32795 unsigned int run_threads; 32796 wait_queue_head_t go; 32797 wait_queue_head_t done; 32798 u32 *crc32; 32799 size_t *unc_len[3]; 32800 unsigned char *unc[3]; 32801 }; 32802 32803 struct cmp_data { 32804 struct task_struct *thr; 32805 atomic_t ready; 32806 atomic_t stop; 32807 int ret; 32808 wait_queue_head_t go; 32809 wait_queue_head_t done; 32810 size_t unc_len; 32811 size_t cmp_len; 32812 unsigned char unc[131072]; 32813 unsigned char cmp[143360]; 32814 unsigned char wrk[16384]; 32815 }; 32816 32817 struct dec_data { 32818 struct task_struct *thr; 32819 atomic_t ready; 32820 atomic_t stop; 32821 int ret; 32822 wait_queue_head_t go; 32823 wait_queue_head_t done; 32824 size_t unc_len; 32825 size_t cmp_len; 32826 unsigned char unc[131072]; 32827 unsigned char cmp[143360]; 32828 }; 32829 32830 typedef s64 compat_loff_t; 32831 32832 struct resume_swap_area { 32833 __kernel_loff_t offset; 32834 __u32 dev; 32835 } __attribute__((packed)); 32836 32837 struct snapshot_data { 32838 struct snapshot_handle handle; 32839 int swap; 32840 int mode; 32841 bool frozen; 32842 bool ready; 32843 bool platform_support; 32844 bool free_bitmaps; 32845 dev_t dev; 32846 }; 32847 32848 struct compat_resume_swap_area { 32849 compat_loff_t offset; 32850 u32 dev; 32851 } __attribute__((packed)); 32852 32853 struct sysrq_key_op { 32854 void (* const handler)(int); 32855 const char * const help_msg; 32856 const char * const action_msg; 32857 const int enable_mask; 32858 }; 32859 32860 struct em_data_callback { 32861 int (*active_power)(long unsigned int *, long unsigned int *, struct device *); 32862 }; 32863 32864 struct dev_printk_info { 32865 char subsystem[16]; 32866 char device[48]; 32867 }; 32868 32869 struct kmsg_dumper { 32870 struct list_head list; 32871 void (*dump)(struct kmsg_dumper *, enum kmsg_dump_reason); 32872 enum kmsg_dump_reason max_reason; 32873 bool active; 32874 bool registered; 32875 u32 cur_idx; 32876 u32 next_idx; 32877 u64 cur_seq; 32878 u64 next_seq; 32879 }; 32880 32881 struct trace_event_raw_console { 32882 struct trace_entry ent; 32883 u32 __data_loc_msg; 32884 char __data[0]; 32885 }; 32886 32887 struct trace_event_data_offsets_console { 32888 u32 msg; 32889 }; 32890 32891 typedef void (*btf_trace_console)(void *, const char *, size_t); 32892 32893 struct printk_info { 32894 u64 seq; 32895 u64 ts_nsec; 32896 u16 text_len; 32897 u8 facility; 32898 u8 flags: 5; 32899 u8 level: 3; 32900 u32 caller_id; 32901 struct dev_printk_info dev_info; 32902 }; 32903 32904 struct printk_record { 32905 struct printk_info *info; 32906 char *text_buf; 32907 unsigned int text_buf_size; 32908 }; 32909 32910 struct prb_data_blk_lpos { 32911 long unsigned int begin; 32912 long unsigned int next; 32913 }; 32914 32915 struct prb_desc { 32916 atomic_long_t state_var; 32917 struct prb_data_blk_lpos text_blk_lpos; 32918 }; 32919 32920 struct prb_data_ring { 32921 unsigned int size_bits; 32922 char *data; 32923 atomic_long_t head_lpos; 32924 atomic_long_t tail_lpos; 32925 }; 32926 32927 struct prb_desc_ring { 32928 unsigned int count_bits; 32929 struct prb_desc *descs; 32930 struct printk_info *infos; 32931 atomic_long_t head_id; 32932 atomic_long_t tail_id; 32933 }; 32934 32935 struct printk_ringbuffer { 32936 struct prb_desc_ring desc_ring; 32937 struct prb_data_ring text_data_ring; 32938 atomic_long_t fail; 32939 }; 32940 32941 struct prb_reserved_entry { 32942 struct printk_ringbuffer *rb; 32943 long unsigned int irqflags; 32944 long unsigned int id; 32945 unsigned int text_space; 32946 }; 32947 32948 enum desc_state { 32949 desc_miss = 4294967295, 32950 desc_reserved = 0, 32951 desc_committed = 1, 32952 desc_finalized = 2, 32953 desc_reusable = 3, 32954 }; 32955 32956 struct console_cmdline { 32957 char name[16]; 32958 int index; 32959 bool user_specified; 32960 char *options; 32961 char *brl_options; 32962 }; 32963 32964 enum devkmsg_log_bits { 32965 __DEVKMSG_LOG_BIT_ON = 0, 32966 __DEVKMSG_LOG_BIT_OFF = 1, 32967 __DEVKMSG_LOG_BIT_LOCK = 2, 32968 }; 32969 32970 enum devkmsg_log_masks { 32971 DEVKMSG_LOG_MASK_ON = 1, 32972 DEVKMSG_LOG_MASK_OFF = 2, 32973 DEVKMSG_LOG_MASK_LOCK = 4, 32974 }; 32975 32976 enum con_msg_format_flags { 32977 MSG_FORMAT_DEFAULT = 0, 32978 MSG_FORMAT_SYSLOG = 1, 32979 }; 32980 32981 enum log_flags { 32982 LOG_NEWLINE = 2, 32983 LOG_CONT = 8, 32984 }; 32985 32986 struct devkmsg_user { 32987 u64 seq; 32988 struct ratelimit_state rs; 32989 struct mutex lock; 32990 char buf[8192]; 32991 struct printk_info info; 32992 char text_buf[8192]; 32993 struct printk_record record; 32994 }; 32995 32996 struct printk_safe_seq_buf { 32997 atomic_t len; 32998 atomic_t message_lost; 32999 struct irq_work work; 33000 unsigned char buffer[4064]; 33001 }; 33002 33003 struct dev_printk_info___2; 33004 33005 struct prb_data_block { 33006 long unsigned int id; 33007 char data[0]; 33008 }; 33009 33010 enum { 33011 IRQS_AUTODETECT = 1, 33012 IRQS_SPURIOUS_DISABLED = 2, 33013 IRQS_POLL_INPROGRESS = 8, 33014 IRQS_ONESHOT = 32, 33015 IRQS_REPLAY = 64, 33016 IRQS_WAITING = 128, 33017 IRQS_PENDING = 512, 33018 IRQS_SUSPENDED = 2048, 33019 IRQS_TIMINGS = 4096, 33020 IRQS_NMI = 8192, 33021 }; 33022 33023 enum { 33024 _IRQ_DEFAULT_INIT_FLAGS = 0, 33025 _IRQ_PER_CPU = 512, 33026 _IRQ_LEVEL = 256, 33027 _IRQ_NOPROBE = 1024, 33028 _IRQ_NOREQUEST = 2048, 33029 _IRQ_NOTHREAD = 65536, 33030 _IRQ_NOAUTOEN = 4096, 33031 _IRQ_MOVE_PCNTXT = 16384, 33032 _IRQ_NO_BALANCING = 8192, 33033 _IRQ_NESTED_THREAD = 32768, 33034 _IRQ_PER_CPU_DEVID = 131072, 33035 _IRQ_IS_POLLED = 262144, 33036 _IRQ_DISABLE_UNLAZY = 524288, 33037 _IRQ_HIDDEN = 1048576, 33038 _IRQF_MODIFY_MASK = 2096911, 33039 }; 33040 33041 enum { 33042 IRQTF_RUNTHREAD = 0, 33043 IRQTF_WARNED = 1, 33044 IRQTF_AFFINITY = 2, 33045 IRQTF_FORCED_THREAD = 3, 33046 }; 33047 33048 enum { 33049 IRQC_IS_HARDIRQ = 0, 33050 IRQC_IS_NESTED = 1, 33051 }; 33052 33053 enum { 33054 IRQ_STARTUP_NORMAL = 0, 33055 IRQ_STARTUP_MANAGED = 1, 33056 IRQ_STARTUP_ABORT = 2, 33057 }; 33058 33059 struct irq_devres { 33060 unsigned int irq; 33061 void *dev_id; 33062 }; 33063 33064 struct irq_desc_devres { 33065 unsigned int from; 33066 unsigned int cnt; 33067 }; 33068 33069 struct irqchip_fwid { 33070 struct fwnode_handle fwnode; 33071 unsigned int type; 33072 char *name; 33073 phys_addr_t *pa; 33074 }; 33075 33076 enum { 33077 AFFINITY = 0, 33078 AFFINITY_LIST = 1, 33079 EFFECTIVE = 2, 33080 EFFECTIVE_LIST = 3, 33081 }; 33082 33083 struct irq_affinity { 33084 unsigned int pre_vectors; 33085 unsigned int post_vectors; 33086 unsigned int nr_sets; 33087 unsigned int set_size[4]; 33088 void (*calc_sets)(struct irq_affinity *, unsigned int); 33089 void *priv; 33090 }; 33091 33092 struct node_vectors { 33093 unsigned int id; 33094 union { 33095 unsigned int nvectors; 33096 unsigned int ncpus; 33097 }; 33098 }; 33099 33100 struct cpumap { 33101 unsigned int available; 33102 unsigned int allocated; 33103 unsigned int managed; 33104 unsigned int managed_allocated; 33105 bool initialized; 33106 bool online; 33107 long unsigned int alloc_map[4]; 33108 long unsigned int managed_map[4]; 33109 }; 33110 33111 struct irq_matrix___2 { 33112 unsigned int matrix_bits; 33113 unsigned int alloc_start; 33114 unsigned int alloc_end; 33115 unsigned int alloc_size; 33116 unsigned int global_available; 33117 unsigned int global_reserved; 33118 unsigned int systembits_inalloc; 33119 unsigned int total_allocated; 33120 unsigned int online_maps; 33121 struct cpumap *maps; 33122 long unsigned int scratch_map[4]; 33123 long unsigned int system_map[4]; 33124 }; 33125 33126 struct trace_event_raw_irq_matrix_global { 33127 struct trace_entry ent; 33128 unsigned int online_maps; 33129 unsigned int global_available; 33130 unsigned int global_reserved; 33131 unsigned int total_allocated; 33132 char __data[0]; 33133 }; 33134 33135 struct trace_event_raw_irq_matrix_global_update { 33136 struct trace_entry ent; 33137 int bit; 33138 unsigned int online_maps; 33139 unsigned int global_available; 33140 unsigned int global_reserved; 33141 unsigned int total_allocated; 33142 char __data[0]; 33143 }; 33144 33145 struct trace_event_raw_irq_matrix_cpu { 33146 struct trace_entry ent; 33147 int bit; 33148 unsigned int cpu; 33149 bool online; 33150 unsigned int available; 33151 unsigned int allocated; 33152 unsigned int managed; 33153 unsigned int online_maps; 33154 unsigned int global_available; 33155 unsigned int global_reserved; 33156 unsigned int total_allocated; 33157 char __data[0]; 33158 }; 33159 33160 struct trace_event_data_offsets_irq_matrix_global {}; 33161 33162 struct trace_event_data_offsets_irq_matrix_global_update {}; 33163 33164 struct trace_event_data_offsets_irq_matrix_cpu {}; 33165 33166 typedef void (*btf_trace_irq_matrix_online)(void *, struct irq_matrix___2 *); 33167 33168 typedef void (*btf_trace_irq_matrix_offline)(void *, struct irq_matrix___2 *); 33169 33170 typedef void (*btf_trace_irq_matrix_reserve)(void *, struct irq_matrix___2 *); 33171 33172 typedef void (*btf_trace_irq_matrix_remove_reserved)(void *, struct irq_matrix___2 *); 33173 33174 typedef void (*btf_trace_irq_matrix_assign_system)(void *, int, struct irq_matrix___2 *); 33175 33176 typedef void (*btf_trace_irq_matrix_alloc_reserved)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33177 33178 typedef void (*btf_trace_irq_matrix_reserve_managed)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33179 33180 typedef void (*btf_trace_irq_matrix_remove_managed)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33181 33182 typedef void (*btf_trace_irq_matrix_alloc_managed)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33183 33184 typedef void (*btf_trace_irq_matrix_assign)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33185 33186 typedef void (*btf_trace_irq_matrix_alloc)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33187 33188 typedef void (*btf_trace_irq_matrix_free)(void *, int, unsigned int, struct irq_matrix___2 *, struct cpumap *); 33189 33190 typedef void (*call_rcu_func_t)(struct callback_head *, rcu_callback_t); 33191 33192 struct rcu_synchronize { 33193 struct callback_head head; 33194 struct completion completion; 33195 }; 33196 33197 struct trace_event_raw_rcu_utilization { 33198 struct trace_entry ent; 33199 const char *s; 33200 char __data[0]; 33201 }; 33202 33203 struct trace_event_data_offsets_rcu_utilization {}; 33204 33205 typedef void (*btf_trace_rcu_utilization)(void *, const char *); 33206 33207 struct rcu_tasks; 33208 33209 typedef void (*rcu_tasks_gp_func_t)(struct rcu_tasks *); 33210 33211 typedef void (*pregp_func_t)(); 33212 33213 typedef void (*pertask_func_t)(struct task_struct *, struct list_head *); 33214 33215 typedef void (*postscan_func_t)(struct list_head *); 33216 33217 typedef void (*holdouts_func_t)(struct list_head *, bool, bool *); 33218 33219 typedef void (*postgp_func_t)(struct rcu_tasks *); 33220 33221 struct rcu_tasks { 33222 struct callback_head *cbs_head; 33223 struct callback_head **cbs_tail; 33224 struct wait_queue_head cbs_wq; 33225 raw_spinlock_t cbs_lock; 33226 int gp_state; 33227 int gp_sleep; 33228 int init_fract; 33229 long unsigned int gp_jiffies; 33230 long unsigned int gp_start; 33231 long unsigned int n_gps; 33232 long unsigned int n_ipis; 33233 long unsigned int n_ipis_fails; 33234 struct task_struct *kthread_ptr; 33235 rcu_tasks_gp_func_t gp_func; 33236 pregp_func_t pregp_func; 33237 pertask_func_t pertask_func; 33238 postscan_func_t postscan_func; 33239 holdouts_func_t holdouts_func; 33240 postgp_func_t postgp_func; 33241 call_rcu_func_t call_func; 33242 char *name; 33243 char *kname; 33244 }; 33245 33246 enum { 33247 GP_IDLE = 0, 33248 GP_ENTER = 1, 33249 GP_PASSED = 2, 33250 GP_EXIT = 3, 33251 GP_REPLAY = 4, 33252 }; 33253 33254 struct rcu_cblist { 33255 struct callback_head *head; 33256 struct callback_head **tail; 33257 long int len; 33258 }; 33259 33260 enum rcutorture_type { 33261 RCU_FLAVOR = 0, 33262 RCU_TASKS_FLAVOR = 1, 33263 RCU_TASKS_RUDE_FLAVOR = 2, 33264 RCU_TASKS_TRACING_FLAVOR = 3, 33265 RCU_TRIVIAL_FLAVOR = 4, 33266 SRCU_FLAVOR = 5, 33267 INVALID_RCU_FLAVOR = 6, 33268 }; 33269 33270 struct rcu_exp_work { 33271 long unsigned int rew_s; 33272 struct work_struct rew_work; 33273 }; 33274 33275 struct rcu_node { 33276 raw_spinlock_t lock; 33277 long unsigned int gp_seq; 33278 long unsigned int gp_seq_needed; 33279 long unsigned int completedqs; 33280 long unsigned int qsmask; 33281 long unsigned int rcu_gp_init_mask; 33282 long unsigned int qsmaskinit; 33283 long unsigned int qsmaskinitnext; 33284 long unsigned int ofl_seq; 33285 long unsigned int expmask; 33286 long unsigned int expmaskinit; 33287 long unsigned int expmaskinitnext; 33288 long unsigned int cbovldmask; 33289 long unsigned int ffmask; 33290 long unsigned int grpmask; 33291 int grplo; 33292 int grphi; 33293 u8 grpnum; 33294 u8 level; 33295 bool wait_blkd_tasks; 33296 struct rcu_node *parent; 33297 struct list_head blkd_tasks; 33298 struct list_head *gp_tasks; 33299 struct list_head *exp_tasks; 33300 struct list_head *boost_tasks; 33301 struct rt_mutex boost_mtx; 33302 long unsigned int boost_time; 33303 struct task_struct *boost_kthread_task; 33304 unsigned int boost_kthread_status; 33305 struct swait_queue_head nocb_gp_wq[2]; 33306 long: 64; 33307 long: 64; 33308 long: 64; 33309 long: 64; 33310 raw_spinlock_t fqslock; 33311 long: 32; 33312 long: 64; 33313 long: 64; 33314 long: 64; 33315 long: 64; 33316 long: 64; 33317 long: 64; 33318 long: 64; 33319 spinlock_t exp_lock; 33320 long unsigned int exp_seq_rq; 33321 wait_queue_head_t exp_wq[4]; 33322 struct rcu_exp_work rew; 33323 bool exp_need_flush; 33324 long: 56; 33325 long: 64; 33326 long: 64; 33327 long: 64; 33328 long: 64; 33329 }; 33330 33331 union rcu_noqs { 33332 struct { 33333 u8 norm; 33334 u8 exp; 33335 } b; 33336 u16 s; 33337 }; 33338 33339 struct rcu_data { 33340 long unsigned int gp_seq; 33341 long unsigned int gp_seq_needed; 33342 union rcu_noqs cpu_no_qs; 33343 bool core_needs_qs; 33344 bool beenonline; 33345 bool gpwrap; 33346 bool exp_deferred_qs; 33347 bool cpu_started; 33348 struct rcu_node *mynode; 33349 long unsigned int grpmask; 33350 long unsigned int ticks_this_gp; 33351 struct irq_work defer_qs_iw; 33352 bool defer_qs_iw_pending; 33353 struct work_struct strict_work; 33354 struct rcu_segcblist cblist; 33355 long int qlen_last_fqs_check; 33356 long unsigned int n_cbs_invoked; 33357 long unsigned int n_force_qs_snap; 33358 long int blimit; 33359 int dynticks_snap; 33360 long int dynticks_nesting; 33361 long int dynticks_nmi_nesting; 33362 atomic_t dynticks; 33363 bool rcu_need_heavy_qs; 33364 bool rcu_urgent_qs; 33365 bool rcu_forced_tick; 33366 bool rcu_forced_tick_exp; 33367 struct callback_head barrier_head; 33368 int exp_dynticks_snap; 33369 struct swait_queue_head nocb_cb_wq; 33370 struct task_struct *nocb_gp_kthread; 33371 raw_spinlock_t nocb_lock; 33372 atomic_t nocb_lock_contended; 33373 int nocb_defer_wakeup; 33374 struct timer_list nocb_timer; 33375 long unsigned int nocb_gp_adv_time; 33376 raw_spinlock_t nocb_bypass_lock; 33377 struct rcu_cblist nocb_bypass; 33378 long unsigned int nocb_bypass_first; 33379 long unsigned int nocb_nobypass_last; 33380 int nocb_nobypass_count; 33381 long: 32; 33382 long: 64; 33383 raw_spinlock_t nocb_gp_lock; 33384 struct timer_list nocb_bypass_timer; 33385 u8 nocb_gp_sleep; 33386 u8 nocb_gp_bypass; 33387 u8 nocb_gp_gp; 33388 long unsigned int nocb_gp_seq; 33389 long unsigned int nocb_gp_loops; 33390 struct swait_queue_head nocb_gp_wq; 33391 bool nocb_cb_sleep; 33392 struct task_struct *nocb_cb_kthread; 33393 struct rcu_data *nocb_next_cb_rdp; 33394 long: 64; 33395 struct rcu_data *nocb_gp_rdp; 33396 struct task_struct *rcu_cpu_kthread_task; 33397 unsigned int rcu_cpu_kthread_status; 33398 char rcu_cpu_has_work; 33399 unsigned int softirq_snap; 33400 struct irq_work rcu_iw; 33401 bool rcu_iw_pending; 33402 long unsigned int rcu_iw_gp_seq; 33403 long unsigned int rcu_ofl_gp_seq; 33404 short int rcu_ofl_gp_flags; 33405 long unsigned int rcu_onl_gp_seq; 33406 short int rcu_onl_gp_flags; 33407 long unsigned int last_fqs_resched; 33408 int cpu; 33409 long: 32; 33410 long: 64; 33411 }; 33412 33413 struct rcu_state { 33414 struct rcu_node node[521]; 33415 struct rcu_node *level[4]; 33416 int ncpus; 33417 int n_online_cpus; 33418 long: 64; 33419 long: 64; 33420 long: 64; 33421 u8 boost; 33422 long unsigned int gp_seq; 33423 long unsigned int gp_max; 33424 struct task_struct *gp_kthread; 33425 struct swait_queue_head gp_wq; 33426 short int gp_flags; 33427 short int gp_state; 33428 long unsigned int gp_wake_time; 33429 long unsigned int gp_wake_seq; 33430 struct mutex barrier_mutex; 33431 atomic_t barrier_cpu_count; 33432 struct completion barrier_completion; 33433 long unsigned int barrier_sequence; 33434 struct mutex exp_mutex; 33435 struct mutex exp_wake_mutex; 33436 long unsigned int expedited_sequence; 33437 atomic_t expedited_need_qs; 33438 struct swait_queue_head expedited_wq; 33439 int ncpus_snap; 33440 u8 cbovld; 33441 u8 cbovldnext; 33442 long unsigned int jiffies_force_qs; 33443 long unsigned int jiffies_kick_kthreads; 33444 long unsigned int n_force_qs; 33445 long unsigned int gp_start; 33446 long unsigned int gp_end; 33447 long unsigned int gp_activity; 33448 long unsigned int gp_req_activity; 33449 long unsigned int jiffies_stall; 33450 long unsigned int jiffies_resched; 33451 long unsigned int n_force_qs_gpstart; 33452 const char *name; 33453 char abbr; 33454 long: 56; 33455 long: 64; 33456 long: 64; 33457 raw_spinlock_t ofl_lock; 33458 long: 32; 33459 long: 64; 33460 long: 64; 33461 long: 64; 33462 long: 64; 33463 long: 64; 33464 long: 64; 33465 long: 64; 33466 }; 33467 33468 struct kvfree_rcu_bulk_data { 33469 long unsigned int nr_records; 33470 struct kvfree_rcu_bulk_data *next; 33471 void *records[0]; 33472 }; 33473 33474 struct kfree_rcu_cpu; 33475 33476 struct kfree_rcu_cpu_work { 33477 struct rcu_work rcu_work; 33478 struct callback_head *head_free; 33479 struct kvfree_rcu_bulk_data *bkvhead_free[2]; 33480 struct kfree_rcu_cpu *krcp; 33481 }; 33482 33483 struct kfree_rcu_cpu { 33484 struct callback_head *head; 33485 struct kvfree_rcu_bulk_data *bkvhead[2]; 33486 struct kfree_rcu_cpu_work krw_arr[2]; 33487 raw_spinlock_t lock; 33488 struct delayed_work monitor_work; 33489 bool monitor_todo; 33490 bool initialized; 33491 int count; 33492 struct work_struct page_cache_work; 33493 atomic_t work_in_progress; 33494 struct hrtimer hrtimer; 33495 struct llist_head bkvcache; 33496 int nr_bkv_objs; 33497 }; 33498 33499 struct klp_func { 33500 const char *old_name; 33501 void *new_func; 33502 long unsigned int old_sympos; 33503 void *old_func; 33504 struct kobject kobj; 33505 struct list_head node; 33506 struct list_head stack_node; 33507 long unsigned int old_size; 33508 long unsigned int new_size; 33509 bool nop; 33510 bool patched; 33511 bool transition; 33512 }; 33513 33514 struct klp_object; 33515 33516 struct klp_callbacks { 33517 int (*pre_patch)(struct klp_object *); 33518 void (*post_patch)(struct klp_object *); 33519 void (*pre_unpatch)(struct klp_object *); 33520 void (*post_unpatch)(struct klp_object *); 33521 bool post_unpatch_enabled; 33522 }; 33523 33524 struct klp_object { 33525 const char *name; 33526 struct klp_func *funcs; 33527 struct klp_callbacks callbacks; 33528 struct kobject kobj; 33529 struct list_head func_list; 33530 struct list_head node; 33531 struct module *mod; 33532 bool dynamic; 33533 bool patched; 33534 }; 33535 33536 struct klp_state { 33537 long unsigned int id; 33538 unsigned int version; 33539 void *data; 33540 }; 33541 33542 struct klp_patch { 33543 struct module *mod; 33544 struct klp_object *objs; 33545 struct klp_state *states; 33546 bool replace; 33547 struct list_head list; 33548 struct kobject kobj; 33549 struct list_head obj_list; 33550 bool enabled; 33551 bool forced; 33552 struct work_struct free_work; 33553 struct completion finish; 33554 }; 33555 33556 struct klp_find_arg { 33557 const char *objname; 33558 const char *name; 33559 long unsigned int addr; 33560 long unsigned int count; 33561 long unsigned int pos; 33562 }; 33563 33564 struct klp_ops { 33565 struct list_head node; 33566 struct list_head func_stack; 33567 struct ftrace_ops fops; 33568 }; 33569 33570 typedef int (*klp_shadow_ctor_t)(void *, void *, void *); 33571 33572 typedef void (*klp_shadow_dtor_t)(void *, void *); 33573 33574 struct klp_shadow { 33575 struct hlist_node node; 33576 struct callback_head callback_head; 33577 void *obj; 33578 long unsigned int id; 33579 char data[0]; 33580 }; 33581 33582 enum dma_sync_target { 33583 SYNC_FOR_CPU = 0, 33584 SYNC_FOR_DEVICE = 1, 33585 }; 33586 33587 struct dma_devres { 33588 size_t size; 33589 void *vaddr; 33590 dma_addr_t dma_handle; 33591 long unsigned int attrs; 33592 }; 33593 33594 struct cma { 33595 long unsigned int base_pfn; 33596 long unsigned int count; 33597 long unsigned int *bitmap; 33598 unsigned int order_per_bit; 33599 struct mutex lock; 33600 char name[64]; 33601 }; 33602 33603 struct trace_event_raw_swiotlb_bounced { 33604 struct trace_entry ent; 33605 u32 __data_loc_dev_name; 33606 u64 dma_mask; 33607 dma_addr_t dev_addr; 33608 size_t size; 33609 enum swiotlb_force swiotlb_force; 33610 char __data[0]; 33611 }; 33612 33613 struct trace_event_data_offsets_swiotlb_bounced { 33614 u32 dev_name; 33615 }; 33616 33617 typedef void (*btf_trace_swiotlb_bounced)(void *, struct device *, dma_addr_t, size_t, enum swiotlb_force); 33618 33619 struct trace_event_raw_sys_enter { 33620 struct trace_entry ent; 33621 long int id; 33622 long unsigned int args[6]; 33623 char __data[0]; 33624 }; 33625 33626 struct trace_event_raw_sys_exit { 33627 struct trace_entry ent; 33628 long int id; 33629 long int ret; 33630 char __data[0]; 33631 }; 33632 33633 struct trace_event_data_offsets_sys_enter {}; 33634 33635 struct trace_event_data_offsets_sys_exit {}; 33636 33637 typedef void (*btf_trace_sys_enter)(void *, struct pt_regs *, long int); 33638 33639 typedef void (*btf_trace_sys_exit)(void *, struct pt_regs *, long int); 33640 33641 struct kvm_regs { 33642 __u64 rax; 33643 __u64 rbx; 33644 __u64 rcx; 33645 __u64 rdx; 33646 __u64 rsi; 33647 __u64 rdi; 33648 __u64 rsp; 33649 __u64 rbp; 33650 __u64 r8; 33651 __u64 r9; 33652 __u64 r10; 33653 __u64 r11; 33654 __u64 r12; 33655 __u64 r13; 33656 __u64 r14; 33657 __u64 r15; 33658 __u64 rip; 33659 __u64 rflags; 33660 }; 33661 33662 struct kvm_segment { 33663 __u64 base; 33664 __u32 limit; 33665 __u16 selector; 33666 __u8 type; 33667 __u8 present; 33668 __u8 dpl; 33669 __u8 db; 33670 __u8 s; 33671 __u8 l; 33672 __u8 g; 33673 __u8 avl; 33674 __u8 unusable; 33675 __u8 padding; 33676 }; 33677 33678 struct kvm_dtable { 33679 __u64 base; 33680 __u16 limit; 33681 __u16 padding[3]; 33682 }; 33683 33684 struct kvm_sregs { 33685 struct kvm_segment cs; 33686 struct kvm_segment ds; 33687 struct kvm_segment es; 33688 struct kvm_segment fs; 33689 struct kvm_segment gs; 33690 struct kvm_segment ss; 33691 struct kvm_segment tr; 33692 struct kvm_segment ldt; 33693 struct kvm_dtable gdt; 33694 struct kvm_dtable idt; 33695 __u64 cr0; 33696 __u64 cr2; 33697 __u64 cr3; 33698 __u64 cr4; 33699 __u64 cr8; 33700 __u64 efer; 33701 __u64 apic_base; 33702 __u64 interrupt_bitmap[4]; 33703 }; 33704 33705 struct kvm_cpuid_entry2 { 33706 __u32 function; 33707 __u32 index; 33708 __u32 flags; 33709 __u32 eax; 33710 __u32 ebx; 33711 __u32 ecx; 33712 __u32 edx; 33713 __u32 padding[3]; 33714 }; 33715 33716 struct kvm_debug_exit_arch { 33717 __u32 exception; 33718 __u32 pad; 33719 __u64 pc; 33720 __u64 dr6; 33721 __u64 dr7; 33722 }; 33723 33724 struct kvm_vcpu_events { 33725 struct { 33726 __u8 injected; 33727 __u8 nr; 33728 __u8 has_error_code; 33729 __u8 pending; 33730 __u32 error_code; 33731 } exception; 33732 struct { 33733 __u8 injected; 33734 __u8 nr; 33735 __u8 soft; 33736 __u8 shadow; 33737 } interrupt; 33738 struct { 33739 __u8 injected; 33740 __u8 pending; 33741 __u8 masked; 33742 __u8 pad; 33743 } nmi; 33744 __u32 sipi_vector; 33745 __u32 flags; 33746 struct { 33747 __u8 smm; 33748 __u8 pending; 33749 __u8 smm_inside_nmi; 33750 __u8 latched_init; 33751 } smi; 33752 __u8 reserved[27]; 33753 __u8 exception_has_payload; 33754 __u64 exception_payload; 33755 }; 33756 33757 struct kvm_sync_regs { 33758 struct kvm_regs regs; 33759 struct kvm_sregs sregs; 33760 struct kvm_vcpu_events events; 33761 }; 33762 33763 struct kvm_pmu_event_filter { 33764 __u32 action; 33765 __u32 nevents; 33766 __u32 fixed_counter_bitmap; 33767 __u32 flags; 33768 __u32 pad[4]; 33769 __u64 events[0]; 33770 }; 33771 33772 struct kvm_hyperv_exit { 33773 __u32 type; 33774 __u32 pad1; 33775 union { 33776 struct { 33777 __u32 msr; 33778 __u32 pad2; 33779 __u64 control; 33780 __u64 evt_page; 33781 __u64 msg_page; 33782 } synic; 33783 struct { 33784 __u64 input; 33785 __u64 result; 33786 __u64 params[2]; 33787 } hcall; 33788 struct { 33789 __u32 msr; 33790 __u32 pad2; 33791 __u64 control; 33792 __u64 status; 33793 __u64 send_page; 33794 __u64 recv_page; 33795 __u64 pending_page; 33796 } syndbg; 33797 } u; 33798 }; 33799 33800 struct kvm_run { 33801 __u8 request_interrupt_window; 33802 __u8 immediate_exit; 33803 __u8 padding1[6]; 33804 __u32 exit_reason; 33805 __u8 ready_for_interrupt_injection; 33806 __u8 if_flag; 33807 __u16 flags; 33808 __u64 cr8; 33809 __u64 apic_base; 33810 union { 33811 struct { 33812 __u64 hardware_exit_reason; 33813 } hw; 33814 struct { 33815 __u64 hardware_entry_failure_reason; 33816 __u32 cpu; 33817 } fail_entry; 33818 struct { 33819 __u32 exception; 33820 __u32 error_code; 33821 } ex; 33822 struct { 33823 __u8 direction; 33824 __u8 size; 33825 __u16 port; 33826 __u32 count; 33827 __u64 data_offset; 33828 } io; 33829 struct { 33830 struct kvm_debug_exit_arch arch; 33831 } debug; 33832 struct { 33833 __u64 phys_addr; 33834 __u8 data[8]; 33835 __u32 len; 33836 __u8 is_write; 33837 } mmio; 33838 struct { 33839 __u64 nr; 33840 __u64 args[6]; 33841 __u64 ret; 33842 __u32 longmode; 33843 __u32 pad; 33844 } hypercall; 33845 struct { 33846 __u64 rip; 33847 __u32 is_write; 33848 __u32 pad; 33849 } tpr_access; 33850 struct { 33851 __u8 icptcode; 33852 __u16 ipa; 33853 __u32 ipb; 33854 } s390_sieic; 33855 __u64 s390_reset_flags; 33856 struct { 33857 __u64 trans_exc_code; 33858 __u32 pgm_code; 33859 } s390_ucontrol; 33860 struct { 33861 __u32 dcrn; 33862 __u32 data; 33863 __u8 is_write; 33864 } dcr; 33865 struct { 33866 __u32 suberror; 33867 __u32 ndata; 33868 __u64 data[16]; 33869 } internal; 33870 struct { 33871 __u64 gprs[32]; 33872 } osi; 33873 struct { 33874 __u64 nr; 33875 __u64 ret; 33876 __u64 args[9]; 33877 } papr_hcall; 33878 struct { 33879 __u16 subchannel_id; 33880 __u16 subchannel_nr; 33881 __u32 io_int_parm; 33882 __u32 io_int_word; 33883 __u32 ipb; 33884 __u8 dequeued; 33885 } s390_tsch; 33886 struct { 33887 __u32 epr; 33888 } epr; 33889 struct { 33890 __u32 type; 33891 __u64 flags; 33892 } system_event; 33893 struct { 33894 __u64 addr; 33895 __u8 ar; 33896 __u8 reserved; 33897 __u8 fc; 33898 __u8 sel1; 33899 __u16 sel2; 33900 } s390_stsi; 33901 struct { 33902 __u8 vector; 33903 } eoi; 33904 struct kvm_hyperv_exit hyperv; 33905 struct { 33906 __u64 esr_iss; 33907 __u64 fault_ipa; 33908 } arm_nisv; 33909 struct { 33910 __u8 error; 33911 __u8 pad[7]; 33912 __u32 reason; 33913 __u32 index; 33914 __u64 data; 33915 } msr; 33916 char padding[256]; 33917 }; 33918 __u64 kvm_valid_regs; 33919 __u64 kvm_dirty_regs; 33920 union { 33921 struct kvm_sync_regs regs; 33922 char padding[2048]; 33923 } s; 33924 }; 33925 33926 struct kvm_coalesced_mmio { 33927 __u64 phys_addr; 33928 __u32 len; 33929 union { 33930 __u32 pad; 33931 __u32 pio; 33932 }; 33933 __u8 data[8]; 33934 }; 33935 33936 struct kvm_coalesced_mmio_ring { 33937 __u32 first; 33938 __u32 last; 33939 struct kvm_coalesced_mmio coalesced_mmio[0]; 33940 }; 33941 33942 struct kvm_xen_hvm_config { 33943 __u32 flags; 33944 __u32 msr; 33945 __u64 blob_addr_32; 33946 __u64 blob_addr_64; 33947 __u8 blob_size_32; 33948 __u8 blob_size_64; 33949 __u8 pad2[30]; 33950 }; 33951 33952 struct kvm_dirty_gfn { 33953 __u32 flags; 33954 __u32 slot; 33955 __u64 offset; 33956 }; 33957 33958 typedef long unsigned int gva_t; 33959 33960 typedef u64 gpa_t; 33961 33962 typedef u64 gfn_t; 33963 33964 typedef u64 hpa_t; 33965 33966 typedef u64 hfn_t; 33967 33968 typedef hfn_t kvm_pfn_t; 33969 33970 struct kvm_memory_slot; 33971 33972 struct gfn_to_hva_cache { 33973 u64 generation; 33974 gpa_t gpa; 33975 long unsigned int hva; 33976 long unsigned int len; 33977 struct kvm_memory_slot *memslot; 33978 }; 33979 33980 struct kvm_rmap_head; 33981 33982 struct kvm_lpage_info; 33983 33984 struct kvm_arch_memory_slot { 33985 struct kvm_rmap_head *rmap[3]; 33986 struct kvm_lpage_info *lpage_info[2]; 33987 short unsigned int *gfn_track[1]; 33988 }; 33989 33990 struct kvm_memory_slot { 33991 gfn_t base_gfn; 33992 long unsigned int npages; 33993 long unsigned int *dirty_bitmap; 33994 struct kvm_arch_memory_slot arch; 33995 long unsigned int userspace_addr; 33996 u32 flags; 33997 short int id; 33998 u16 as_id; 33999 }; 34000 34001 struct gfn_to_pfn_cache { 34002 u64 generation; 34003 gfn_t gfn; 34004 kvm_pfn_t pfn; 34005 bool dirty; 34006 }; 34007 34008 struct kvm_mmu_memory_cache { 34009 int nobjs; 34010 gfp_t gfp_zero; 34011 struct kmem_cache *kmem_cache; 34012 void *objects[40]; 34013 }; 34014 34015 struct hv_partition_assist_pg { 34016 u32 tlb_lock_count; 34017 }; 34018 34019 union hv_message_flags { 34020 __u8 asu8; 34021 struct { 34022 __u8 msg_pending: 1; 34023 __u8 reserved: 7; 34024 }; 34025 }; 34026 34027 union hv_port_id { 34028 __u32 asu32; 34029 struct { 34030 __u32 id: 24; 34031 __u32 reserved: 8; 34032 } u; 34033 }; 34034 34035 struct hv_message_header { 34036 __u32 message_type; 34037 __u8 payload_size; 34038 union hv_message_flags message_flags; 34039 __u8 reserved[2]; 34040 union { 34041 __u64 sender; 34042 union hv_port_id port; 34043 }; 34044 }; 34045 34046 struct hv_message { 34047 struct hv_message_header header; 34048 union { 34049 __u64 payload[30]; 34050 } u; 34051 }; 34052 34053 union hv_stimer_config { 34054 u64 as_uint64; 34055 struct { 34056 u64 enable: 1; 34057 u64 periodic: 1; 34058 u64 lazy: 1; 34059 u64 auto_enable: 1; 34060 u64 apic_vector: 8; 34061 u64 direct_mode: 1; 34062 u64 reserved_z0: 3; 34063 u64 sintx: 4; 34064 u64 reserved_z1: 44; 34065 }; 34066 }; 34067 34068 enum kvm_page_track_mode { 34069 KVM_PAGE_TRACK_WRITE = 0, 34070 KVM_PAGE_TRACK_MAX = 1, 34071 }; 34072 34073 struct kvm_page_track_notifier_head { 34074 struct srcu_struct track_srcu; 34075 struct hlist_head track_notifier_list; 34076 }; 34077 34078 struct kvm_vcpu; 34079 34080 struct kvm; 34081 34082 struct kvm_page_track_notifier_node { 34083 struct hlist_node node; 34084 void (*track_write)(struct kvm_vcpu *, gpa_t, const u8 *, int, struct kvm_page_track_notifier_node *); 34085 void (*track_flush_slot)(struct kvm *, struct kvm_memory_slot *, struct kvm_page_track_notifier_node *); 34086 }; 34087 34088 struct kvm_vcpu_stat { 34089 u64 pf_fixed; 34090 u64 pf_guest; 34091 u64 tlb_flush; 34092 u64 invlpg; 34093 u64 exits; 34094 u64 io_exits; 34095 u64 mmio_exits; 34096 u64 signal_exits; 34097 u64 irq_window_exits; 34098 u64 nmi_window_exits; 34099 u64 l1d_flush; 34100 u64 halt_exits; 34101 u64 halt_successful_poll; 34102 u64 halt_attempted_poll; 34103 u64 halt_poll_invalid; 34104 u64 halt_wakeup; 34105 u64 request_irq_exits; 34106 u64 irq_exits; 34107 u64 host_state_reload; 34108 u64 fpu_reload; 34109 u64 insn_emulation; 34110 u64 insn_emulation_fail; 34111 u64 hypercalls; 34112 u64 irq_injections; 34113 u64 nmi_injections; 34114 u64 req_event; 34115 u64 halt_poll_success_ns; 34116 u64 halt_poll_fail_ns; 34117 }; 34118 34119 struct kvm_mmio_fragment { 34120 gpa_t gpa; 34121 void *data; 34122 unsigned int len; 34123 }; 34124 34125 struct kvm_lapic; 34126 34127 struct x86_exception; 34128 34129 struct kvm_mmu_page; 34130 34131 union kvm_mmu_page_role { 34132 u32 word; 34133 struct { 34134 unsigned int level: 4; 34135 unsigned int gpte_is_8_bytes: 1; 34136 unsigned int quadrant: 2; 34137 unsigned int direct: 1; 34138 unsigned int access: 3; 34139 unsigned int invalid: 1; 34140 unsigned int nxe: 1; 34141 unsigned int cr0_wp: 1; 34142 unsigned int smep_andnot_wp: 1; 34143 unsigned int smap_andnot_wp: 1; 34144 unsigned int ad_disabled: 1; 34145 unsigned int guest_mode: 1; 34146 char: 6; 34147 unsigned int smm: 8; 34148 }; 34149 }; 34150 34151 union kvm_mmu_extended_role { 34152 u32 word; 34153 struct { 34154 unsigned int valid: 1; 34155 unsigned int execonly: 1; 34156 unsigned int cr0_pg: 1; 34157 unsigned int cr4_pae: 1; 34158 unsigned int cr4_pse: 1; 34159 unsigned int cr4_pke: 1; 34160 unsigned int cr4_smap: 1; 34161 unsigned int cr4_smep: 1; 34162 unsigned int maxphyaddr: 6; 34163 }; 34164 }; 34165 34166 union kvm_mmu_role { 34167 u64 as_u64; 34168 struct { 34169 union kvm_mmu_page_role base; 34170 union kvm_mmu_extended_role ext; 34171 }; 34172 }; 34173 34174 struct kvm_mmu_root_info { 34175 gpa_t pgd; 34176 hpa_t hpa; 34177 }; 34178 34179 struct rsvd_bits_validate { 34180 u64 rsvd_bits_mask[10]; 34181 u64 bad_mt_xwr; 34182 }; 34183 34184 struct kvm_mmu { 34185 long unsigned int (*get_guest_pgd)(struct kvm_vcpu *); 34186 u64 (*get_pdptr)(struct kvm_vcpu *, int); 34187 int (*page_fault)(struct kvm_vcpu *, gpa_t, u32, bool); 34188 void (*inject_page_fault)(struct kvm_vcpu *, struct x86_exception *); 34189 gpa_t (*gva_to_gpa)(struct kvm_vcpu *, gpa_t, u32, struct x86_exception *); 34190 gpa_t (*translate_gpa)(struct kvm_vcpu *, gpa_t, u32, struct x86_exception *); 34191 int (*sync_page)(struct kvm_vcpu *, struct kvm_mmu_page *); 34192 void (*invlpg)(struct kvm_vcpu *, gva_t, hpa_t); 34193 void (*update_pte)(struct kvm_vcpu *, struct kvm_mmu_page *, u64 *, const void *); 34194 hpa_t root_hpa; 34195 gpa_t root_pgd; 34196 union kvm_mmu_role mmu_role; 34197 u8 root_level; 34198 u8 shadow_root_level; 34199 u8 ept_ad; 34200 bool direct_map; 34201 struct kvm_mmu_root_info prev_roots[3]; 34202 u8 permissions[16]; 34203 u32 pkru_mask; 34204 u64 *pae_root; 34205 u64 *lm_root; 34206 struct rsvd_bits_validate shadow_zero_check; 34207 struct rsvd_bits_validate guest_rsvd_check; 34208 u8 last_nonleaf_level; 34209 bool nx; 34210 u64 pdptrs[4]; 34211 }; 34212 34213 struct kvm_pio_request { 34214 long unsigned int linear_rip; 34215 long unsigned int count; 34216 int in; 34217 int port; 34218 int size; 34219 }; 34220 34221 struct kvm_queued_exception { 34222 bool pending; 34223 bool injected; 34224 bool has_error_code; 34225 u8 nr; 34226 u32 error_code; 34227 long unsigned int payload; 34228 bool has_payload; 34229 u8 nested_apf; 34230 }; 34231 34232 struct kvm_queued_interrupt { 34233 bool injected; 34234 bool soft; 34235 u8 nr; 34236 }; 34237 34238 struct x86_emulate_ctxt; 34239 34240 struct kvm_mtrr_range { 34241 u64 base; 34242 u64 mask; 34243 struct list_head node; 34244 }; 34245 34246 struct kvm_mtrr { 34247 struct kvm_mtrr_range var_ranges[8]; 34248 mtrr_type fixed_ranges[88]; 34249 u64 deftype; 34250 struct list_head head; 34251 }; 34252 34253 enum pmc_type { 34254 KVM_PMC_GP = 0, 34255 KVM_PMC_FIXED = 1, 34256 }; 34257 34258 struct kvm_pmc { 34259 enum pmc_type type; 34260 u8 idx; 34261 u64 counter; 34262 u64 eventsel; 34263 struct perf_event *perf_event; 34264 struct kvm_vcpu *vcpu; 34265 u64 current_config; 34266 }; 34267 34268 struct kvm_pmu { 34269 unsigned int nr_arch_gp_counters; 34270 unsigned int nr_arch_fixed_counters; 34271 unsigned int available_event_types; 34272 u64 fixed_ctr_ctrl; 34273 u64 global_ctrl; 34274 u64 global_status; 34275 u64 global_ovf_ctrl; 34276 u64 counter_bitmask[2]; 34277 u64 global_ctrl_mask; 34278 u64 global_ovf_ctrl_mask; 34279 u64 reserved_bits; 34280 u8 version; 34281 struct kvm_pmc gp_counters[32]; 34282 struct kvm_pmc fixed_counters[4]; 34283 struct irq_work irq_work; 34284 long unsigned int reprogram_pmi[1]; 34285 long unsigned int all_valid_pmc_idx[1]; 34286 long unsigned int pmc_in_use[1]; 34287 bool need_cleanup; 34288 u8 event_count; 34289 }; 34290 34291 struct kvm_vcpu_hv_synic { 34292 u64 version; 34293 u64 control; 34294 u64 msg_page; 34295 u64 evt_page; 34296 atomic64_t sint[16]; 34297 atomic_t sint_to_gsi[16]; 34298 long unsigned int auto_eoi_bitmap[4]; 34299 long unsigned int vec_bitmap[4]; 34300 bool active; 34301 bool dont_zero_synic_pages; 34302 }; 34303 34304 struct kvm_vcpu_hv_stimer { 34305 struct hrtimer timer; 34306 int index; 34307 union hv_stimer_config config; 34308 u64 count; 34309 u64 exp_time; 34310 struct hv_message msg; 34311 bool msg_pending; 34312 }; 34313 34314 struct kvm_vcpu_hv { 34315 u32 vp_index; 34316 u64 hv_vapic; 34317 s64 runtime_offset; 34318 struct kvm_vcpu_hv_synic synic; 34319 struct kvm_hyperv_exit exit; 34320 struct kvm_vcpu_hv_stimer stimer[4]; 34321 long unsigned int stimer_pending_bitmap[1]; 34322 cpumask_t tlb_flush; 34323 }; 34324 34325 struct kvm_vcpu_arch { 34326 long unsigned int regs[17]; 34327 u32 regs_avail; 34328 u32 regs_dirty; 34329 long unsigned int cr0; 34330 long unsigned int cr0_guest_owned_bits; 34331 long unsigned int cr2; 34332 long unsigned int cr3; 34333 long unsigned int cr4; 34334 long unsigned int cr4_guest_owned_bits; 34335 long unsigned int cr4_guest_rsvd_bits; 34336 long unsigned int cr8; 34337 u32 host_pkru; 34338 u32 pkru; 34339 u32 hflags; 34340 u64 efer; 34341 u64 apic_base; 34342 struct kvm_lapic *apic; 34343 bool apicv_active; 34344 bool load_eoi_exitmap_pending; 34345 long unsigned int ioapic_handled_vectors[4]; 34346 long unsigned int apic_attention; 34347 int32_t apic_arb_prio; 34348 int mp_state; 34349 u64 ia32_misc_enable_msr; 34350 u64 smbase; 34351 u64 smi_count; 34352 bool tpr_access_reporting; 34353 bool xsaves_enabled; 34354 u64 ia32_xss; 34355 u64 microcode_version; 34356 u64 arch_capabilities; 34357 u64 perf_capabilities; 34358 struct kvm_mmu *mmu; 34359 struct kvm_mmu root_mmu; 34360 struct kvm_mmu guest_mmu; 34361 struct kvm_mmu nested_mmu; 34362 struct kvm_mmu *walk_mmu; 34363 struct kvm_mmu_memory_cache mmu_pte_list_desc_cache; 34364 struct kvm_mmu_memory_cache mmu_shadow_page_cache; 34365 struct kvm_mmu_memory_cache mmu_gfn_array_cache; 34366 struct kvm_mmu_memory_cache mmu_page_header_cache; 34367 struct fpu *user_fpu; 34368 struct fpu *guest_fpu; 34369 u64 xcr0; 34370 u64 guest_supported_xcr0; 34371 struct kvm_pio_request pio; 34372 void *pio_data; 34373 void *guest_ins_data; 34374 u8 event_exit_inst_len; 34375 struct kvm_queued_exception exception; 34376 struct kvm_queued_interrupt interrupt; 34377 int halt_request; 34378 int cpuid_nent; 34379 struct kvm_cpuid_entry2 *cpuid_entries; 34380 long unsigned int cr3_lm_rsvd_bits; 34381 int maxphyaddr; 34382 int max_tdp_level; 34383 struct x86_emulate_ctxt *emulate_ctxt; 34384 bool emulate_regs_need_sync_to_vcpu; 34385 bool emulate_regs_need_sync_from_vcpu; 34386 int (*complete_userspace_io)(struct kvm_vcpu *); 34387 gpa_t time; 34388 struct pvclock_vcpu_time_info hv_clock; 34389 unsigned int hw_tsc_khz; 34390 struct gfn_to_hva_cache pv_time; 34391 bool pv_time_enabled; 34392 bool pvclock_set_guest_stopped_request; 34393 struct { 34394 u8 preempted; 34395 u64 msr_val; 34396 u64 last_steal; 34397 struct gfn_to_pfn_cache cache; 34398 } st; 34399 u64 l1_tsc_offset; 34400 u64 tsc_offset; 34401 u64 last_guest_tsc; 34402 u64 last_host_tsc; 34403 u64 tsc_offset_adjustment; 34404 u64 this_tsc_nsec; 34405 u64 this_tsc_write; 34406 u64 this_tsc_generation; 34407 bool tsc_catchup; 34408 bool tsc_always_catchup; 34409 s8 virtual_tsc_shift; 34410 u32 virtual_tsc_mult; 34411 u32 virtual_tsc_khz; 34412 s64 ia32_tsc_adjust_msr; 34413 u64 msr_ia32_power_ctl; 34414 u64 tsc_scaling_ratio; 34415 atomic_t nmi_queued; 34416 unsigned int nmi_pending; 34417 bool nmi_injected; 34418 bool smi_pending; 34419 struct kvm_mtrr mtrr_state; 34420 u64 pat; 34421 unsigned int switch_db_regs; 34422 long unsigned int db[4]; 34423 long unsigned int dr6; 34424 long unsigned int dr7; 34425 long unsigned int eff_db[4]; 34426 long unsigned int guest_debug_dr7; 34427 u64 msr_platform_info; 34428 u64 msr_misc_features_enables; 34429 u64 mcg_cap; 34430 u64 mcg_status; 34431 u64 mcg_ctl; 34432 u64 mcg_ext_ctl; 34433 u64 *mce_banks; 34434 u64 mmio_gva; 34435 unsigned int mmio_access; 34436 gfn_t mmio_gfn; 34437 u64 mmio_gen; 34438 struct kvm_pmu pmu; 34439 long unsigned int singlestep_rip; 34440 struct kvm_vcpu_hv hyperv; 34441 cpumask_var_t wbinvd_dirty_mask; 34442 long unsigned int last_retry_eip; 34443 long unsigned int last_retry_addr; 34444 struct { 34445 bool halted; 34446 gfn_t gfns[64]; 34447 struct gfn_to_hva_cache data; 34448 u64 msr_en_val; 34449 u64 msr_int_val; 34450 u16 vec; 34451 u32 id; 34452 bool send_user_only; 34453 u32 host_apf_flags; 34454 long unsigned int nested_apf_token; 34455 bool delivery_as_pf_vmexit; 34456 bool pageready_pending; 34457 } apf; 34458 struct { 34459 u64 length; 34460 u64 status; 34461 } osvw; 34462 struct { 34463 u64 msr_val; 34464 struct gfn_to_hva_cache data; 34465 } pv_eoi; 34466 u64 msr_kvm_poll_control; 34467 bool write_fault_to_shadow_pgtable; 34468 long unsigned int exit_qualification; 34469 struct { 34470 bool pv_unhalted; 34471 } pv; 34472 int pending_ioapic_eoi; 34473 int pending_external_vector; 34474 bool preempted_in_kernel; 34475 bool l1tf_flush_l1d; 34476 unsigned int last_vmentry_cpu; 34477 u64 msr_hwcr; 34478 struct { 34479 u32 features; 34480 bool enforce; 34481 } pv_cpuid; 34482 bool guest_state_protected; 34483 }; 34484 34485 struct kvm_dirty_ring { 34486 u32 dirty_index; 34487 u32 reset_index; 34488 u32 size; 34489 u32 soft_limit; 34490 struct kvm_dirty_gfn *dirty_gfns; 34491 int index; 34492 }; 34493 34494 struct kvm_vcpu { 34495 struct kvm *kvm; 34496 struct preempt_notifier preempt_notifier; 34497 int cpu; 34498 int vcpu_id; 34499 int vcpu_idx; 34500 int srcu_idx; 34501 int mode; 34502 u64 requests; 34503 long unsigned int guest_debug; 34504 int pre_pcpu; 34505 struct list_head blocked_vcpu_list; 34506 struct mutex mutex; 34507 struct kvm_run *run; 34508 struct rcuwait wait; 34509 struct pid *pid; 34510 int sigset_active; 34511 sigset_t sigset; 34512 struct kvm_vcpu_stat stat; 34513 unsigned int halt_poll_ns; 34514 bool valid_wakeup; 34515 int mmio_needed; 34516 int mmio_read_completed; 34517 int mmio_is_write; 34518 int mmio_cur_fragment; 34519 int mmio_nr_fragments; 34520 struct kvm_mmio_fragment mmio_fragments[2]; 34521 struct { 34522 u32 queued; 34523 struct list_head queue; 34524 struct list_head done; 34525 spinlock_t lock; 34526 } async_pf; 34527 struct { 34528 bool in_spin_loop; 34529 bool dy_eligible; 34530 } spin_loop; 34531 bool preempted; 34532 bool ready; 34533 struct kvm_vcpu_arch arch; 34534 struct kvm_dirty_ring dirty_ring; 34535 }; 34536 34537 struct kvm_vm_stat { 34538 ulong mmu_shadow_zapped; 34539 ulong mmu_pte_write; 34540 ulong mmu_pte_updated; 34541 ulong mmu_pde_zapped; 34542 ulong mmu_flooded; 34543 ulong mmu_recycled; 34544 ulong mmu_cache_miss; 34545 ulong mmu_unsync; 34546 ulong remote_tlb_flush; 34547 ulong lpages; 34548 ulong nx_lpage_splits; 34549 ulong max_mmu_page_hash_collisions; 34550 }; 34551 34552 struct kvm_pic; 34553 34554 struct kvm_ioapic; 34555 34556 struct kvm_pit; 34557 34558 struct kvm_hv_syndbg { 34559 struct { 34560 u64 control; 34561 u64 status; 34562 u64 send_page; 34563 u64 recv_page; 34564 u64 pending_page; 34565 } control; 34566 u64 options; 34567 }; 34568 34569 struct kvm_hv { 34570 struct mutex hv_lock; 34571 u64 hv_guest_os_id; 34572 u64 hv_hypercall; 34573 u64 hv_tsc_page; 34574 u64 hv_crash_param[5]; 34575 u64 hv_crash_ctl; 34576 struct ms_hyperv_tsc_page tsc_ref; 34577 struct idr conn_to_evt; 34578 u64 hv_reenlightenment_control; 34579 u64 hv_tsc_emulation_control; 34580 u64 hv_tsc_emulation_status; 34581 atomic_t num_mismatched_vp_indexes; 34582 struct hv_partition_assist_pg *hv_pa_pg; 34583 struct kvm_hv_syndbg hv_syndbg; 34584 }; 34585 34586 enum kvm_irqchip_mode { 34587 KVM_IRQCHIP_NONE = 0, 34588 KVM_IRQCHIP_KERNEL = 1, 34589 KVM_IRQCHIP_SPLIT = 2, 34590 }; 34591 34592 struct kvm_apic_map; 34593 34594 struct kvm_x86_msr_filter; 34595 34596 struct kvm_arch { 34597 long unsigned int n_used_mmu_pages; 34598 long unsigned int n_requested_mmu_pages; 34599 long unsigned int n_max_mmu_pages; 34600 unsigned int indirect_shadow_pages; 34601 u8 mmu_valid_gen; 34602 struct hlist_head mmu_page_hash[4096]; 34603 struct list_head active_mmu_pages; 34604 struct list_head zapped_obsolete_pages; 34605 struct list_head lpage_disallowed_mmu_pages; 34606 struct kvm_page_track_notifier_node mmu_sp_tracker; 34607 struct kvm_page_track_notifier_head track_notifier_head; 34608 struct list_head assigned_dev_head; 34609 struct iommu_domain *iommu_domain; 34610 bool iommu_noncoherent; 34611 atomic_t noncoherent_dma_count; 34612 atomic_t assigned_device_count; 34613 struct kvm_pic *vpic; 34614 struct kvm_ioapic *vioapic; 34615 struct kvm_pit *vpit; 34616 atomic_t vapics_in_nmi_mode; 34617 struct mutex apic_map_lock; 34618 struct kvm_apic_map *apic_map; 34619 atomic_t apic_map_dirty; 34620 bool apic_access_page_done; 34621 long unsigned int apicv_inhibit_reasons; 34622 gpa_t wall_clock; 34623 bool mwait_in_guest; 34624 bool hlt_in_guest; 34625 bool pause_in_guest; 34626 bool cstate_in_guest; 34627 long unsigned int irq_sources_bitmap; 34628 s64 kvmclock_offset; 34629 raw_spinlock_t tsc_write_lock; 34630 u64 last_tsc_nsec; 34631 u64 last_tsc_write; 34632 u32 last_tsc_khz; 34633 u64 cur_tsc_nsec; 34634 u64 cur_tsc_write; 34635 u64 cur_tsc_offset; 34636 u64 cur_tsc_generation; 34637 int nr_vcpus_matched_tsc; 34638 spinlock_t pvclock_gtod_sync_lock; 34639 bool use_master_clock; 34640 u64 master_kernel_ns; 34641 u64 master_cycle_now; 34642 struct delayed_work kvmclock_update_work; 34643 struct delayed_work kvmclock_sync_work; 34644 struct kvm_xen_hvm_config xen_hvm_config; 34645 struct hlist_head mask_notifier_list; 34646 struct kvm_hv hyperv; 34647 int audit_point; 34648 bool backwards_tsc_observed; 34649 bool boot_vcpu_runs_old_kvmclock; 34650 u32 bsp_vcpu_id; 34651 u64 disabled_quirks; 34652 enum kvm_irqchip_mode irqchip_mode; 34653 u8 nr_reserved_ioapic_pins; 34654 bool disabled_lapic_found; 34655 bool x2apic_format; 34656 bool x2apic_broadcast_quirk_disabled; 34657 bool guest_can_read_msr_platform_info; 34658 bool exception_payload_enabled; 34659 bool bus_lock_detection_enabled; 34660 u32 user_space_msr_mask; 34661 struct kvm_x86_msr_filter *msr_filter; 34662 struct kvm_pmu_event_filter *pmu_event_filter; 34663 struct task_struct *nx_lpage_recovery_thread; 34664 bool tdp_mmu_enabled; 34665 struct list_head tdp_mmu_roots; 34666 struct list_head tdp_mmu_pages; 34667 }; 34668 34669 struct kvm_memslots; 34670 34671 struct kvm_io_bus; 34672 34673 struct kvm_irq_routing_table; 34674 34675 struct kvm_stat_data; 34676 34677 struct kvm { 34678 spinlock_t mmu_lock; 34679 struct mutex slots_lock; 34680 struct mm_struct *mm; 34681 struct kvm_memslots *memslots[2]; 34682 struct kvm_vcpu *vcpus[288]; 34683 atomic_t online_vcpus; 34684 int created_vcpus; 34685 int last_boosted_vcpu; 34686 struct list_head vm_list; 34687 struct mutex lock; 34688 struct kvm_io_bus *buses[4]; 34689 struct { 34690 spinlock_t lock; 34691 struct list_head items; 34692 struct list_head resampler_list; 34693 struct mutex resampler_lock; 34694 } irqfds; 34695 struct list_head ioeventfds; 34696 struct kvm_vm_stat stat; 34697 struct kvm_arch arch; 34698 refcount_t users_count; 34699 struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; 34700 spinlock_t ring_lock; 34701 struct list_head coalesced_zones; 34702 struct mutex irq_lock; 34703 struct kvm_irq_routing_table *irq_routing; 34704 struct hlist_head irq_ack_notifier_list; 34705 struct mmu_notifier mmu_notifier; 34706 long unsigned int mmu_notifier_seq; 34707 long int mmu_notifier_count; 34708 long int tlbs_dirty; 34709 struct list_head devices; 34710 u64 manual_dirty_log_protect; 34711 struct dentry *debugfs_dentry; 34712 struct kvm_stat_data **debugfs_stat_data; 34713 struct srcu_struct srcu; 34714 struct srcu_struct irq_srcu; 34715 pid_t userspace_pid; 34716 unsigned int max_halt_poll_ns; 34717 u32 dirty_ring_size; 34718 }; 34719 34720 enum kvm_reg { 34721 VCPU_REGS_RAX = 0, 34722 VCPU_REGS_RCX = 1, 34723 VCPU_REGS_RDX = 2, 34724 VCPU_REGS_RBX = 3, 34725 VCPU_REGS_RSP = 4, 34726 VCPU_REGS_RBP = 5, 34727 VCPU_REGS_RSI = 6, 34728 VCPU_REGS_RDI = 7, 34729 VCPU_REGS_R8 = 8, 34730 VCPU_REGS_R9 = 9, 34731 VCPU_REGS_R10 = 10, 34732 VCPU_REGS_R11 = 11, 34733 VCPU_REGS_R12 = 12, 34734 VCPU_REGS_R13 = 13, 34735 VCPU_REGS_R14 = 14, 34736 VCPU_REGS_R15 = 15, 34737 VCPU_REGS_RIP = 16, 34738 NR_VCPU_REGS = 17, 34739 VCPU_EXREG_PDPTR = 17, 34740 VCPU_EXREG_CR0 = 18, 34741 VCPU_EXREG_CR3 = 19, 34742 VCPU_EXREG_CR4 = 20, 34743 VCPU_EXREG_RFLAGS = 21, 34744 VCPU_EXREG_SEGMENTS = 22, 34745 VCPU_EXREG_EXIT_INFO_1 = 23, 34746 VCPU_EXREG_EXIT_INFO_2 = 24, 34747 }; 34748 34749 struct kvm_rmap_head { 34750 long unsigned int val; 34751 }; 34752 34753 struct kvm_lpage_info { 34754 int disallow_lpage; 34755 }; 34756 34757 struct kvm_apic_map { 34758 struct callback_head rcu; 34759 u8 mode; 34760 u32 max_apic_id; 34761 union { 34762 struct kvm_lapic *xapic_flat_map[8]; 34763 struct kvm_lapic *xapic_cluster_map[64]; 34764 }; 34765 struct kvm_lapic *phys_map[0]; 34766 }; 34767 34768 struct msr_bitmap_range { 34769 u32 flags; 34770 u32 nmsrs; 34771 u32 base; 34772 long unsigned int *bitmap; 34773 }; 34774 34775 struct kvm_x86_msr_filter { 34776 u8 count; 34777 bool default_allow: 1; 34778 struct msr_bitmap_range ranges[16]; 34779 }; 34780 34781 struct kvm_io_device; 34782 34783 struct kvm_io_range { 34784 gpa_t addr; 34785 int len; 34786 struct kvm_io_device *dev; 34787 }; 34788 34789 struct kvm_io_bus { 34790 int dev_count; 34791 int ioeventfd_count; 34792 struct kvm_io_range range[0]; 34793 }; 34794 34795 enum kvm_bus { 34796 KVM_MMIO_BUS = 0, 34797 KVM_PIO_BUS = 1, 34798 KVM_VIRTIO_CCW_NOTIFY_BUS = 2, 34799 KVM_FAST_MMIO_BUS = 3, 34800 KVM_NR_BUSES = 4, 34801 }; 34802 34803 struct kvm_irq_routing_table { 34804 int chip[72]; 34805 u32 nr_rt_entries; 34806 struct hlist_head map[0]; 34807 }; 34808 34809 struct kvm_memslots { 34810 u64 generation; 34811 short int id_to_index[512]; 34812 atomic_t lru_slot; 34813 int used_slots; 34814 struct kvm_memory_slot memslots[0]; 34815 }; 34816 34817 struct kvm_stats_debugfs_item; 34818 34819 struct kvm_stat_data { 34820 struct kvm *kvm; 34821 struct kvm_stats_debugfs_item *dbgfs_item; 34822 }; 34823 34824 enum kvm_stat_kind { 34825 KVM_STAT_VM = 0, 34826 KVM_STAT_VCPU = 1, 34827 }; 34828 34829 struct kvm_stats_debugfs_item { 34830 const char *name; 34831 int offset; 34832 enum kvm_stat_kind kind; 34833 int mode; 34834 }; 34835 34836 enum kcmp_type { 34837 KCMP_FILE = 0, 34838 KCMP_VM = 1, 34839 KCMP_FILES = 2, 34840 KCMP_FS = 3, 34841 KCMP_SIGHAND = 4, 34842 KCMP_IO = 5, 34843 KCMP_SYSVSEM = 6, 34844 KCMP_EPOLL_TFD = 7, 34845 KCMP_TYPES = 8, 34846 }; 34847 34848 struct kcmp_epoll_slot { 34849 __u32 efd; 34850 __u32 tfd; 34851 __u32 toff; 34852 }; 34853 34854 enum profile_type { 34855 PROFILE_TASK_EXIT = 0, 34856 PROFILE_MUNMAP = 1, 34857 }; 34858 34859 struct profile_hit { 34860 u32 pc; 34861 u32 hits; 34862 }; 34863 34864 struct stacktrace_cookie { 34865 long unsigned int *store; 34866 unsigned int size; 34867 unsigned int skip; 34868 unsigned int len; 34869 }; 34870 34871 typedef __kernel_long_t __kernel_suseconds_t; 34872 34873 typedef __kernel_long_t __kernel_old_time_t; 34874 34875 typedef __kernel_suseconds_t suseconds_t; 34876 34877 struct __kernel_itimerspec { 34878 struct __kernel_timespec it_interval; 34879 struct __kernel_timespec it_value; 34880 }; 34881 34882 struct timezone { 34883 int tz_minuteswest; 34884 int tz_dsttime; 34885 }; 34886 34887 struct itimerspec64 { 34888 struct timespec64 it_interval; 34889 struct timespec64 it_value; 34890 }; 34891 34892 struct old_itimerspec32 { 34893 struct old_timespec32 it_interval; 34894 struct old_timespec32 it_value; 34895 }; 34896 34897 struct old_timex32 { 34898 u32 modes; 34899 s32 offset; 34900 s32 freq; 34901 s32 maxerror; 34902 s32 esterror; 34903 s32 status; 34904 s32 constant; 34905 s32 precision; 34906 s32 tolerance; 34907 struct old_timeval32 time; 34908 s32 tick; 34909 s32 ppsfreq; 34910 s32 jitter; 34911 s32 shift; 34912 s32 stabil; 34913 s32 jitcnt; 34914 s32 calcnt; 34915 s32 errcnt; 34916 s32 stbcnt; 34917 s32 tai; 34918 long: 32; 34919 long: 64; 34920 long: 64; 34921 long: 64; 34922 long: 64; 34923 long: 64; 34924 }; 34925 34926 struct __kernel_timex_timeval { 34927 __kernel_time64_t tv_sec; 34928 long long int tv_usec; 34929 }; 34930 34931 struct __kernel_timex { 34932 unsigned int modes; 34933 long long int offset; 34934 long long int freq; 34935 long long int maxerror; 34936 long long int esterror; 34937 int status; 34938 long long int constant; 34939 long long int precision; 34940 long long int tolerance; 34941 struct __kernel_timex_timeval time; 34942 long long int tick; 34943 long long int ppsfreq; 34944 long long int jitter; 34945 int shift; 34946 long long int stabil; 34947 long long int jitcnt; 34948 long long int calcnt; 34949 long long int errcnt; 34950 long long int stbcnt; 34951 int tai; 34952 long: 32; 34953 long: 64; 34954 long: 64; 34955 long: 64; 34956 long: 64; 34957 long: 64; 34958 }; 34959 34960 struct trace_event_raw_timer_class { 34961 struct trace_entry ent; 34962 void *timer; 34963 char __data[0]; 34964 }; 34965 34966 struct trace_event_raw_timer_start { 34967 struct trace_entry ent; 34968 void *timer; 34969 void *function; 34970 long unsigned int expires; 34971 long unsigned int now; 34972 unsigned int flags; 34973 char __data[0]; 34974 }; 34975 34976 struct trace_event_raw_timer_expire_entry { 34977 struct trace_entry ent; 34978 void *timer; 34979 long unsigned int now; 34980 void *function; 34981 long unsigned int baseclk; 34982 char __data[0]; 34983 }; 34984 34985 struct trace_event_raw_hrtimer_init { 34986 struct trace_entry ent; 34987 void *hrtimer; 34988 clockid_t clockid; 34989 enum hrtimer_mode mode; 34990 char __data[0]; 34991 }; 34992 34993 struct trace_event_raw_hrtimer_start { 34994 struct trace_entry ent; 34995 void *hrtimer; 34996 void *function; 34997 s64 expires; 34998 s64 softexpires; 34999 enum hrtimer_mode mode; 35000 char __data[0]; 35001 }; 35002 35003 struct trace_event_raw_hrtimer_expire_entry { 35004 struct trace_entry ent; 35005 void *hrtimer; 35006 s64 now; 35007 void *function; 35008 char __data[0]; 35009 }; 35010 35011 struct trace_event_raw_hrtimer_class { 35012 struct trace_entry ent; 35013 void *hrtimer; 35014 char __data[0]; 35015 }; 35016 35017 struct trace_event_raw_itimer_state { 35018 struct trace_entry ent; 35019 int which; 35020 long long unsigned int expires; 35021 long int value_sec; 35022 long int value_nsec; 35023 long int interval_sec; 35024 long int interval_nsec; 35025 char __data[0]; 35026 }; 35027 35028 struct trace_event_raw_itimer_expire { 35029 struct trace_entry ent; 35030 int which; 35031 pid_t pid; 35032 long long unsigned int now; 35033 char __data[0]; 35034 }; 35035 35036 struct trace_event_raw_tick_stop { 35037 struct trace_entry ent; 35038 int success; 35039 int dependency; 35040 char __data[0]; 35041 }; 35042 35043 struct trace_event_data_offsets_timer_class {}; 35044 35045 struct trace_event_data_offsets_timer_start {}; 35046 35047 struct trace_event_data_offsets_timer_expire_entry {}; 35048 35049 struct trace_event_data_offsets_hrtimer_init {}; 35050 35051 struct trace_event_data_offsets_hrtimer_start {}; 35052 35053 struct trace_event_data_offsets_hrtimer_expire_entry {}; 35054 35055 struct trace_event_data_offsets_hrtimer_class {}; 35056 35057 struct trace_event_data_offsets_itimer_state {}; 35058 35059 struct trace_event_data_offsets_itimer_expire {}; 35060 35061 struct trace_event_data_offsets_tick_stop {}; 35062 35063 typedef void (*btf_trace_timer_init)(void *, struct timer_list *); 35064 35065 typedef void (*btf_trace_timer_start)(void *, struct timer_list *, long unsigned int, unsigned int); 35066 35067 typedef void (*btf_trace_timer_expire_entry)(void *, struct timer_list *, long unsigned int); 35068 35069 typedef void (*btf_trace_timer_expire_exit)(void *, struct timer_list *); 35070 35071 typedef void (*btf_trace_timer_cancel)(void *, struct timer_list *); 35072 35073 typedef void (*btf_trace_hrtimer_init)(void *, struct hrtimer *, clockid_t, enum hrtimer_mode); 35074 35075 typedef void (*btf_trace_hrtimer_start)(void *, struct hrtimer *, enum hrtimer_mode); 35076 35077 typedef void (*btf_trace_hrtimer_expire_entry)(void *, struct hrtimer *, ktime_t *); 35078 35079 typedef void (*btf_trace_hrtimer_expire_exit)(void *, struct hrtimer *); 35080 35081 typedef void (*btf_trace_hrtimer_cancel)(void *, struct hrtimer *); 35082 35083 typedef void (*btf_trace_itimer_state)(void *, int, const struct itimerspec64 * const, long long unsigned int); 35084 35085 typedef void (*btf_trace_itimer_expire)(void *, int, struct pid *, long long unsigned int); 35086 35087 typedef void (*btf_trace_tick_stop)(void *, int, int); 35088 35089 struct timer_base { 35090 raw_spinlock_t lock; 35091 struct timer_list *running_timer; 35092 long unsigned int clk; 35093 long unsigned int next_expiry; 35094 unsigned int cpu; 35095 bool next_expiry_recalc; 35096 bool is_idle; 35097 long unsigned int pending_map[9]; 35098 struct hlist_head vectors[576]; 35099 long: 64; 35100 long: 64; 35101 }; 35102 35103 struct process_timer { 35104 struct timer_list timer; 35105 struct task_struct *task; 35106 }; 35107 35108 enum tick_device_mode { 35109 TICKDEV_MODE_PERIODIC = 0, 35110 TICKDEV_MODE_ONESHOT = 1, 35111 }; 35112 35113 struct tick_device { 35114 struct clock_event_device *evtdev; 35115 enum tick_device_mode mode; 35116 }; 35117 35118 struct ktime_timestamps { 35119 u64 mono; 35120 u64 boot; 35121 u64 real; 35122 }; 35123 35124 struct system_time_snapshot { 35125 u64 cycles; 35126 ktime_t real; 35127 ktime_t raw; 35128 unsigned int clock_was_set_seq; 35129 u8 cs_was_changed_seq; 35130 }; 35131 35132 struct system_device_crosststamp { 35133 ktime_t device; 35134 ktime_t sys_realtime; 35135 ktime_t sys_monoraw; 35136 }; 35137 35138 struct audit_ntp_val { 35139 long long int oldval; 35140 long long int newval; 35141 }; 35142 35143 struct audit_ntp_data { 35144 struct audit_ntp_val vals[6]; 35145 }; 35146 35147 enum timekeeping_adv_mode { 35148 TK_ADV_TICK = 0, 35149 TK_ADV_FREQ = 1, 35150 }; 35151 35152 struct tk_fast { 35153 seqcount_latch_t seq; 35154 struct tk_read_base base[2]; 35155 }; 35156 35157 typedef s64 int64_t; 35158 35159 enum tick_nohz_mode { 35160 NOHZ_MODE_INACTIVE = 0, 35161 NOHZ_MODE_LOWRES = 1, 35162 NOHZ_MODE_HIGHRES = 2, 35163 }; 35164 35165 struct tick_sched { 35166 struct hrtimer sched_timer; 35167 long unsigned int check_clocks; 35168 enum tick_nohz_mode nohz_mode; 35169 unsigned int inidle: 1; 35170 unsigned int tick_stopped: 1; 35171 unsigned int idle_active: 1; 35172 unsigned int do_timer_last: 1; 35173 unsigned int got_idle_tick: 1; 35174 ktime_t last_tick; 35175 ktime_t next_tick; 35176 long unsigned int idle_jiffies; 35177 long unsigned int idle_calls; 35178 long unsigned int idle_sleeps; 35179 ktime_t idle_entrytime; 35180 ktime_t idle_waketime; 35181 ktime_t idle_exittime; 35182 ktime_t idle_sleeptime; 35183 ktime_t iowait_sleeptime; 35184 long unsigned int last_jiffies; 35185 u64 timer_expires; 35186 u64 timer_expires_base; 35187 u64 next_timer; 35188 ktime_t idle_expires; 35189 atomic_t tick_dep_mask; 35190 }; 35191 35192 struct timer_list_iter { 35193 int cpu; 35194 bool second_pass; 35195 u64 now; 35196 }; 35197 35198 struct tm { 35199 int tm_sec; 35200 int tm_min; 35201 int tm_hour; 35202 int tm_mday; 35203 int tm_mon; 35204 long int tm_year; 35205 int tm_wday; 35206 int tm_yday; 35207 }; 35208 35209 struct cyclecounter { 35210 u64 (*read)(const struct cyclecounter *); 35211 u64 mask; 35212 u32 mult; 35213 u32 shift; 35214 }; 35215 35216 struct timecounter { 35217 const struct cyclecounter *cc; 35218 u64 cycle_last; 35219 u64 nsec; 35220 u64 mask; 35221 u64 frac; 35222 }; 35223 35224 typedef __kernel_timer_t timer_t; 35225 35226 enum alarmtimer_type { 35227 ALARM_REALTIME = 0, 35228 ALARM_BOOTTIME = 1, 35229 ALARM_NUMTYPE = 2, 35230 ALARM_REALTIME_FREEZER = 3, 35231 ALARM_BOOTTIME_FREEZER = 4, 35232 }; 35233 35234 enum alarmtimer_restart { 35235 ALARMTIMER_NORESTART = 0, 35236 ALARMTIMER_RESTART = 1, 35237 }; 35238 35239 struct alarm { 35240 struct timerqueue_node node; 35241 struct hrtimer timer; 35242 enum alarmtimer_restart (*function)(struct alarm *, ktime_t); 35243 enum alarmtimer_type type; 35244 int state; 35245 void *data; 35246 }; 35247 35248 struct cpu_timer { 35249 struct timerqueue_node node; 35250 struct timerqueue_head *head; 35251 struct pid *pid; 35252 struct list_head elist; 35253 int firing; 35254 }; 35255 35256 struct k_clock; 35257 35258 struct k_itimer { 35259 struct list_head list; 35260 struct hlist_node t_hash; 35261 spinlock_t it_lock; 35262 const struct k_clock *kclock; 35263 clockid_t it_clock; 35264 timer_t it_id; 35265 int it_active; 35266 s64 it_overrun; 35267 s64 it_overrun_last; 35268 int it_requeue_pending; 35269 int it_sigev_notify; 35270 ktime_t it_interval; 35271 struct signal_struct *it_signal; 35272 union { 35273 struct pid *it_pid; 35274 struct task_struct *it_process; 35275 }; 35276 struct sigqueue *sigq; 35277 union { 35278 struct { 35279 struct hrtimer timer; 35280 } real; 35281 struct cpu_timer cpu; 35282 struct { 35283 struct alarm alarmtimer; 35284 } alarm; 35285 } it; 35286 struct callback_head rcu; 35287 }; 35288 35289 struct k_clock { 35290 int (*clock_getres)(const clockid_t, struct timespec64 *); 35291 int (*clock_set)(const clockid_t, const struct timespec64 *); 35292 int (*clock_get_timespec)(const clockid_t, struct timespec64 *); 35293 ktime_t (*clock_get_ktime)(const clockid_t); 35294 int (*clock_adj)(const clockid_t, struct __kernel_timex *); 35295 int (*timer_create)(struct k_itimer *); 35296 int (*nsleep)(const clockid_t, int, const struct timespec64 *); 35297 int (*timer_set)(struct k_itimer *, int, struct itimerspec64 *, struct itimerspec64 *); 35298 int (*timer_del)(struct k_itimer *); 35299 void (*timer_get)(struct k_itimer *, struct itimerspec64 *); 35300 void (*timer_rearm)(struct k_itimer *); 35301 s64 (*timer_forward)(struct k_itimer *, ktime_t); 35302 ktime_t (*timer_remaining)(struct k_itimer *, ktime_t); 35303 int (*timer_try_to_cancel)(struct k_itimer *); 35304 void (*timer_arm)(struct k_itimer *, ktime_t, bool, bool); 35305 void (*timer_wait_running)(struct k_itimer *); 35306 }; 35307 35308 struct class_interface { 35309 struct list_head node; 35310 struct class *class; 35311 int (*add_dev)(struct device *, struct class_interface *); 35312 void (*remove_dev)(struct device *, struct class_interface *); 35313 }; 35314 35315 struct platform_driver { 35316 int (*probe)(struct platform_device *); 35317 int (*remove)(struct platform_device *); 35318 void (*shutdown)(struct platform_device *); 35319 int (*suspend)(struct platform_device *, pm_message_t); 35320 int (*resume)(struct platform_device *); 35321 struct device_driver driver; 35322 const struct platform_device_id *id_table; 35323 bool prevent_deferred_probe; 35324 }; 35325 35326 struct trace_event_raw_alarmtimer_suspend { 35327 struct trace_entry ent; 35328 s64 expires; 35329 unsigned char alarm_type; 35330 char __data[0]; 35331 }; 35332 35333 struct trace_event_raw_alarm_class { 35334 struct trace_entry ent; 35335 void *alarm; 35336 unsigned char alarm_type; 35337 s64 expires; 35338 s64 now; 35339 char __data[0]; 35340 }; 35341 35342 struct trace_event_data_offsets_alarmtimer_suspend {}; 35343 35344 struct trace_event_data_offsets_alarm_class {}; 35345 35346 typedef void (*btf_trace_alarmtimer_suspend)(void *, ktime_t, int); 35347 35348 typedef void (*btf_trace_alarmtimer_fired)(void *, struct alarm *, ktime_t); 35349 35350 typedef void (*btf_trace_alarmtimer_start)(void *, struct alarm *, ktime_t); 35351 35352 typedef void (*btf_trace_alarmtimer_cancel)(void *, struct alarm *, ktime_t); 35353 35354 struct alarm_base { 35355 spinlock_t lock; 35356 struct timerqueue_head timerqueue; 35357 ktime_t (*get_ktime)(); 35358 void (*get_timespec)(struct timespec64 *); 35359 clockid_t base_clockid; 35360 }; 35361 35362 struct sigevent { 35363 sigval_t sigev_value; 35364 int sigev_signo; 35365 int sigev_notify; 35366 union { 35367 int _pad[12]; 35368 int _tid; 35369 struct { 35370 void (*_function)(sigval_t); 35371 void *_attribute; 35372 } _sigev_thread; 35373 } _sigev_un; 35374 }; 35375 35376 typedef struct sigevent sigevent_t; 35377 35378 struct compat_sigevent { 35379 compat_sigval_t sigev_value; 35380 compat_int_t sigev_signo; 35381 compat_int_t sigev_notify; 35382 union { 35383 compat_int_t _pad[13]; 35384 compat_int_t _tid; 35385 struct { 35386 compat_uptr_t _function; 35387 compat_uptr_t _attribute; 35388 } _sigev_thread; 35389 } _sigev_un; 35390 }; 35391 35392 struct posix_clock; 35393 35394 struct posix_clock_operations { 35395 struct module *owner; 35396 int (*clock_adjtime)(struct posix_clock *, struct __kernel_timex *); 35397 int (*clock_gettime)(struct posix_clock *, struct timespec64 *); 35398 int (*clock_getres)(struct posix_clock *, struct timespec64 *); 35399 int (*clock_settime)(struct posix_clock *, const struct timespec64 *); 35400 long int (*ioctl)(struct posix_clock *, unsigned int, long unsigned int); 35401 int (*open)(struct posix_clock *, fmode_t); 35402 __poll_t (*poll)(struct posix_clock *, struct file *, poll_table *); 35403 int (*release)(struct posix_clock *); 35404 ssize_t (*read)(struct posix_clock *, uint, char *, size_t); 35405 }; 35406 35407 struct posix_clock { 35408 struct posix_clock_operations ops; 35409 struct cdev cdev; 35410 struct device *dev; 35411 struct rw_semaphore rwsem; 35412 bool zombie; 35413 }; 35414 35415 struct posix_clock_desc { 35416 struct file *fp; 35417 struct posix_clock *clk; 35418 }; 35419 35420 struct __kernel_old_itimerval { 35421 struct __kernel_old_timeval it_interval; 35422 struct __kernel_old_timeval it_value; 35423 }; 35424 35425 struct old_itimerval32 { 35426 struct old_timeval32 it_interval; 35427 struct old_timeval32 it_value; 35428 }; 35429 35430 struct ce_unbind { 35431 struct clock_event_device *ce; 35432 int res; 35433 }; 35434 35435 struct proc_timens_offset { 35436 int clockid; 35437 struct timespec64 val; 35438 }; 35439 35440 union futex_key { 35441 struct { 35442 u64 i_seq; 35443 long unsigned int pgoff; 35444 unsigned int offset; 35445 } shared; 35446 struct { 35447 union { 35448 struct mm_struct *mm; 35449 u64 __tmp; 35450 }; 35451 long unsigned int address; 35452 unsigned int offset; 35453 } private; 35454 struct { 35455 u64 ptr; 35456 long unsigned int word; 35457 unsigned int offset; 35458 } both; 35459 }; 35460 35461 struct futex_pi_state { 35462 struct list_head list; 35463 struct rt_mutex pi_mutex; 35464 struct task_struct *owner; 35465 refcount_t refcount; 35466 union futex_key key; 35467 }; 35468 35469 struct futex_q { 35470 struct plist_node list; 35471 struct task_struct *task; 35472 spinlock_t *lock_ptr; 35473 union futex_key key; 35474 struct futex_pi_state *pi_state; 35475 struct rt_mutex_waiter *rt_waiter; 35476 union futex_key *requeue_pi_key; 35477 u32 bitset; 35478 }; 35479 35480 struct futex_hash_bucket { 35481 atomic_t waiters; 35482 spinlock_t lock; 35483 struct plist_head chain; 35484 long: 64; 35485 long: 64; 35486 long: 64; 35487 long: 64; 35488 long: 64; 35489 }; 35490 35491 enum futex_access { 35492 FUTEX_READ = 0, 35493 FUTEX_WRITE = 1, 35494 }; 35495 35496 struct dma_chan { 35497 int lock; 35498 const char *device_id; 35499 }; 35500 35501 struct call_function_data { 35502 call_single_data_t *csd; 35503 cpumask_var_t cpumask; 35504 cpumask_var_t cpumask_ipi; 35505 }; 35506 35507 struct smp_call_on_cpu_struct { 35508 struct work_struct work; 35509 struct completion done; 35510 int (*func)(void *); 35511 void *data; 35512 int ret; 35513 int cpu; 35514 }; 35515 35516 struct latch_tree_root { 35517 seqcount_latch_t seq; 35518 struct rb_root tree[2]; 35519 }; 35520 35521 struct latch_tree_ops { 35522 bool (*less)(struct latch_tree_node *, struct latch_tree_node *); 35523 int (*comp)(void *, struct latch_tree_node *); 35524 }; 35525 35526 struct module_use { 35527 struct list_head source_list; 35528 struct list_head target_list; 35529 struct module *source; 35530 struct module *target; 35531 }; 35532 35533 struct module_sect_attr { 35534 struct bin_attribute battr; 35535 long unsigned int address; 35536 }; 35537 35538 struct module_sect_attrs { 35539 struct attribute_group grp; 35540 unsigned int nsections; 35541 struct module_sect_attr attrs[0]; 35542 }; 35543 35544 struct module_notes_attrs { 35545 struct kobject *dir; 35546 unsigned int notes; 35547 struct bin_attribute attrs[0]; 35548 }; 35549 35550 enum mod_license { 35551 NOT_GPL_ONLY = 0, 35552 GPL_ONLY = 1, 35553 WILL_BE_GPL_ONLY = 2, 35554 }; 35555 35556 struct symsearch { 35557 const struct kernel_symbol *start; 35558 const struct kernel_symbol *stop; 35559 const s32 *crcs; 35560 enum mod_license license; 35561 bool unused; 35562 }; 35563 35564 enum kernel_read_file_id { 35565 READING_UNKNOWN = 0, 35566 READING_FIRMWARE = 1, 35567 READING_MODULE = 2, 35568 READING_KEXEC_IMAGE = 3, 35569 READING_KEXEC_INITRAMFS = 4, 35570 READING_POLICY = 5, 35571 READING_X509_CERTIFICATE = 6, 35572 READING_MAX_ID = 7, 35573 }; 35574 35575 enum kernel_load_data_id { 35576 LOADING_UNKNOWN = 0, 35577 LOADING_FIRMWARE = 1, 35578 LOADING_MODULE = 2, 35579 LOADING_KEXEC_IMAGE = 3, 35580 LOADING_KEXEC_INITRAMFS = 4, 35581 LOADING_POLICY = 5, 35582 LOADING_X509_CERTIFICATE = 6, 35583 LOADING_MAX_ID = 7, 35584 }; 35585 35586 enum { 35587 PROC_ENTRY_PERMANENT = 1, 35588 }; 35589 35590 struct load_info { 35591 const char *name; 35592 struct module *mod; 35593 Elf64_Ehdr *hdr; 35594 long unsigned int len; 35595 Elf64_Shdr *sechdrs; 35596 char *secstrings; 35597 char *strtab; 35598 long unsigned int symoffs; 35599 long unsigned int stroffs; 35600 long unsigned int init_typeoffs; 35601 long unsigned int core_typeoffs; 35602 struct _ddebug *debug; 35603 unsigned int num_debug; 35604 bool sig_ok; 35605 long unsigned int mod_kallsyms_init_off; 35606 struct { 35607 unsigned int sym; 35608 unsigned int str; 35609 unsigned int mod; 35610 unsigned int vers; 35611 unsigned int info; 35612 unsigned int pcpu; 35613 } index; 35614 }; 35615 35616 struct trace_event_raw_module_load { 35617 struct trace_entry ent; 35618 unsigned int taints; 35619 u32 __data_loc_name; 35620 char __data[0]; 35621 }; 35622 35623 struct trace_event_raw_module_free { 35624 struct trace_entry ent; 35625 u32 __data_loc_name; 35626 char __data[0]; 35627 }; 35628 35629 struct trace_event_raw_module_refcnt { 35630 struct trace_entry ent; 35631 long unsigned int ip; 35632 int refcnt; 35633 u32 __data_loc_name; 35634 char __data[0]; 35635 }; 35636 35637 struct trace_event_raw_module_request { 35638 struct trace_entry ent; 35639 long unsigned int ip; 35640 bool wait; 35641 u32 __data_loc_name; 35642 char __data[0]; 35643 }; 35644 35645 struct trace_event_data_offsets_module_load { 35646 u32 name; 35647 }; 35648 35649 struct trace_event_data_offsets_module_free { 35650 u32 name; 35651 }; 35652 35653 struct trace_event_data_offsets_module_refcnt { 35654 u32 name; 35655 }; 35656 35657 struct trace_event_data_offsets_module_request { 35658 u32 name; 35659 }; 35660 35661 typedef void (*btf_trace_module_load)(void *, struct module *); 35662 35663 typedef void (*btf_trace_module_free)(void *, struct module *); 35664 35665 typedef void (*btf_trace_module_get)(void *, struct module *, long unsigned int); 35666 35667 typedef void (*btf_trace_module_put)(void *, struct module *, long unsigned int); 35668 35669 typedef void (*btf_trace_module_request)(void *, char *, bool, long unsigned int); 35670 35671 struct mod_tree_root { 35672 struct latch_tree_root root; 35673 long unsigned int addr_min; 35674 long unsigned int addr_max; 35675 }; 35676 35677 struct find_symbol_arg { 35678 const char *name; 35679 bool gplok; 35680 bool warn; 35681 struct module *owner; 35682 const s32 *crc; 35683 const struct kernel_symbol *sym; 35684 enum mod_license license; 35685 }; 35686 35687 struct mod_initfree { 35688 struct llist_node node; 35689 void *module_init; 35690 }; 35691 35692 struct module_signature { 35693 u8 algo; 35694 u8 hash; 35695 u8 id_type; 35696 u8 signer_len; 35697 u8 key_id_len; 35698 u8 __pad[3]; 35699 __be32 sig_len; 35700 }; 35701 35702 enum pkey_id_type { 35703 PKEY_ID_PGP = 0, 35704 PKEY_ID_X509 = 1, 35705 PKEY_ID_PKCS7 = 2, 35706 }; 35707 35708 struct kallsym_iter { 35709 loff_t pos; 35710 loff_t pos_arch_end; 35711 loff_t pos_mod_end; 35712 loff_t pos_ftrace_mod_end; 35713 loff_t pos_bpf_end; 35714 long unsigned int value; 35715 unsigned int nameoff; 35716 char type; 35717 char name[128]; 35718 char module_name[56]; 35719 int exported; 35720 int show_value; 35721 }; 35722 35723 typedef __u16 comp_t; 35724 35725 struct acct_v3 { 35726 char ac_flag; 35727 char ac_version; 35728 __u16 ac_tty; 35729 __u32 ac_exitcode; 35730 __u32 ac_uid; 35731 __u32 ac_gid; 35732 __u32 ac_pid; 35733 __u32 ac_ppid; 35734 __u32 ac_btime; 35735 __u32 ac_etime; 35736 comp_t ac_utime; 35737 comp_t ac_stime; 35738 comp_t ac_mem; 35739 comp_t ac_io; 35740 comp_t ac_rw; 35741 comp_t ac_minflt; 35742 comp_t ac_majflt; 35743 comp_t ac_swaps; 35744 char ac_comm[16]; 35745 }; 35746 35747 typedef struct acct_v3 acct_t; 35748 35749 struct fs_pin { 35750 wait_queue_head_t wait; 35751 int done; 35752 struct hlist_node s_list; 35753 struct hlist_node m_list; 35754 void (*kill)(struct fs_pin *); 35755 }; 35756 35757 struct bsd_acct_struct { 35758 struct fs_pin pin; 35759 atomic_long_t count; 35760 struct callback_head rcu; 35761 struct mutex lock; 35762 int active; 35763 long unsigned int needcheck; 35764 struct file *file; 35765 struct pid_namespace *ns; 35766 struct work_struct work; 35767 struct completion done; 35768 }; 35769 35770 struct elf64_note { 35771 Elf64_Word n_namesz; 35772 Elf64_Word n_descsz; 35773 Elf64_Word n_type; 35774 }; 35775 35776 struct elf_note_section { 35777 struct elf64_note n_hdr; 35778 u8 n_data[0]; 35779 }; 35780 35781 typedef long unsigned int elf_greg_t; 35782 35783 typedef elf_greg_t elf_gregset_t[27]; 35784 35785 struct elf_siginfo { 35786 int si_signo; 35787 int si_code; 35788 int si_errno; 35789 }; 35790 35791 struct elf_prstatus { 35792 struct elf_siginfo pr_info; 35793 short int pr_cursig; 35794 long unsigned int pr_sigpend; 35795 long unsigned int pr_sighold; 35796 pid_t pr_pid; 35797 pid_t pr_ppid; 35798 pid_t pr_pgrp; 35799 pid_t pr_sid; 35800 struct __kernel_old_timeval pr_utime; 35801 struct __kernel_old_timeval pr_stime; 35802 struct __kernel_old_timeval pr_cutime; 35803 struct __kernel_old_timeval pr_cstime; 35804 elf_gregset_t pr_reg; 35805 int pr_fpvalid; 35806 }; 35807 35808 typedef u32 note_buf_t[92]; 35809 35810 struct compat_kexec_segment { 35811 compat_uptr_t buf; 35812 compat_size_t bufsz; 35813 compat_ulong_t mem; 35814 compat_size_t memsz; 35815 }; 35816 35817 struct elf64_phdr { 35818 Elf64_Word p_type; 35819 Elf64_Word p_flags; 35820 Elf64_Off p_offset; 35821 Elf64_Addr p_vaddr; 35822 Elf64_Addr p_paddr; 35823 Elf64_Xword p_filesz; 35824 Elf64_Xword p_memsz; 35825 Elf64_Xword p_align; 35826 }; 35827 35828 typedef struct elf64_phdr Elf64_Phdr; 35829 35830 struct shash_alg { 35831 int (*init)(struct shash_desc *); 35832 int (*update)(struct shash_desc *, const u8 *, unsigned int); 35833 int (*final)(struct shash_desc *, u8 *); 35834 int (*finup)(struct shash_desc *, const u8 *, unsigned int, u8 *); 35835 int (*digest)(struct shash_desc *, const u8 *, unsigned int, u8 *); 35836 int (*export)(struct shash_desc *, void *); 35837 int (*import)(struct shash_desc *, const void *); 35838 int (*setkey)(struct crypto_shash *, const u8 *, unsigned int); 35839 int (*init_tfm)(struct crypto_shash *); 35840 void (*exit_tfm)(struct crypto_shash *); 35841 unsigned int descsize; 35842 int: 32; 35843 unsigned int digestsize; 35844 unsigned int statesize; 35845 struct crypto_alg base; 35846 }; 35847 35848 struct kexec_sha_region { 35849 long unsigned int start; 35850 long unsigned int len; 35851 }; 35852 35853 enum migrate_reason { 35854 MR_COMPACTION = 0, 35855 MR_MEMORY_FAILURE = 1, 35856 MR_MEMORY_HOTPLUG = 2, 35857 MR_SYSCALL = 3, 35858 MR_MEMPOLICY_MBIND = 4, 35859 MR_NUMA_MISPLACED = 5, 35860 MR_CONTIG_RANGE = 6, 35861 MR_TYPES = 7, 35862 }; 35863 35864 typedef __kernel_ulong_t __kernel_ino_t; 35865 35866 typedef __kernel_ino_t ino_t; 35867 35868 enum bpf_link_type { 35869 BPF_LINK_TYPE_UNSPEC = 0, 35870 BPF_LINK_TYPE_RAW_TRACEPOINT = 1, 35871 BPF_LINK_TYPE_TRACING = 2, 35872 BPF_LINK_TYPE_CGROUP = 3, 35873 BPF_LINK_TYPE_ITER = 4, 35874 BPF_LINK_TYPE_NETNS = 5, 35875 BPF_LINK_TYPE_XDP = 6, 35876 MAX_BPF_LINK_TYPE = 7, 35877 }; 35878 35879 struct bpf_link_info { 35880 __u32 type; 35881 __u32 id; 35882 __u32 prog_id; 35883 union { 35884 struct { 35885 __u64 tp_name; 35886 __u32 tp_name_len; 35887 } raw_tracepoint; 35888 struct { 35889 __u32 attach_type; 35890 } tracing; 35891 struct { 35892 __u64 cgroup_id; 35893 __u32 attach_type; 35894 } cgroup; 35895 struct { 35896 __u64 target_name; 35897 __u32 target_name_len; 35898 union { 35899 struct { 35900 __u32 map_id; 35901 } map; 35902 }; 35903 } iter; 35904 struct { 35905 __u32 netns_ino; 35906 __u32 attach_type; 35907 } netns; 35908 struct { 35909 __u32 ifindex; 35910 } xdp; 35911 }; 35912 }; 35913 35914 struct bpf_link_ops; 35915 35916 struct bpf_link { 35917 atomic64_t refcnt; 35918 u32 id; 35919 enum bpf_link_type type; 35920 const struct bpf_link_ops *ops; 35921 struct bpf_prog *prog; 35922 struct work_struct work; 35923 }; 35924 35925 struct bpf_link_ops { 35926 void (*release)(struct bpf_link *); 35927 void (*dealloc)(struct bpf_link *); 35928 int (*detach)(struct bpf_link *); 35929 int (*update_prog)(struct bpf_link *, struct bpf_prog *, struct bpf_prog *); 35930 void (*show_fdinfo)(const struct bpf_link *, struct seq_file *); 35931 int (*fill_link_info)(const struct bpf_link *, struct bpf_link_info *); 35932 }; 35933 35934 struct bpf_cgroup_link { 35935 struct bpf_link link; 35936 struct cgroup *cgroup; 35937 enum bpf_attach_type type; 35938 }; 35939 35940 enum { 35941 CGRP_NOTIFY_ON_RELEASE = 0, 35942 CGRP_CPUSET_CLONE_CHILDREN = 1, 35943 CGRP_FREEZE = 2, 35944 CGRP_FROZEN = 3, 35945 }; 35946 35947 enum { 35948 CGRP_ROOT_NOPREFIX = 2, 35949 CGRP_ROOT_XATTR = 4, 35950 CGRP_ROOT_NS_DELEGATE = 8, 35951 CGRP_ROOT_CPUSET_V2_MODE = 16, 35952 CGRP_ROOT_MEMORY_LOCAL_EVENTS = 32, 35953 CGRP_ROOT_MEMORY_RECURSIVE_PROT = 64, 35954 }; 35955 35956 struct cgroup_taskset { 35957 struct list_head src_csets; 35958 struct list_head dst_csets; 35959 int nr_tasks; 35960 int ssid; 35961 struct list_head *csets; 35962 struct css_set *cur_cset; 35963 struct task_struct *cur_task; 35964 }; 35965 35966 struct css_task_iter { 35967 struct cgroup_subsys *ss; 35968 unsigned int flags; 35969 struct list_head *cset_pos; 35970 struct list_head *cset_head; 35971 struct list_head *tcset_pos; 35972 struct list_head *tcset_head; 35973 struct list_head *task_pos; 35974 struct list_head *cur_tasks_head; 35975 struct css_set *cur_cset; 35976 struct css_set *cur_dcset; 35977 struct task_struct *cur_task; 35978 struct list_head iters_node; 35979 }; 35980 35981 struct cgroup_fs_context { 35982 struct kernfs_fs_context kfc; 35983 struct cgroup_root *root; 35984 struct cgroup_namespace *ns; 35985 unsigned int flags; 35986 bool cpuset_clone_children; 35987 bool none; 35988 bool all_ss; 35989 u16 subsys_mask; 35990 char *name; 35991 char *release_agent; 35992 }; 35993 35994 struct cgrp_cset_link { 35995 struct cgroup *cgrp; 35996 struct css_set *cset; 35997 struct list_head cset_link; 35998 struct list_head cgrp_link; 35999 }; 36000 36001 struct cgroup_mgctx { 36002 struct list_head preloaded_src_csets; 36003 struct list_head preloaded_dst_csets; 36004 struct cgroup_taskset tset; 36005 u16 ss_mask; 36006 }; 36007 36008 struct trace_event_raw_cgroup_root { 36009 struct trace_entry ent; 36010 int root; 36011 u16 ss_mask; 36012 u32 __data_loc_name; 36013 char __data[0]; 36014 }; 36015 36016 struct trace_event_raw_cgroup { 36017 struct trace_entry ent; 36018 int root; 36019 int id; 36020 int level; 36021 u32 __data_loc_path; 36022 char __data[0]; 36023 }; 36024 36025 struct trace_event_raw_cgroup_migrate { 36026 struct trace_entry ent; 36027 int dst_root; 36028 int dst_id; 36029 int dst_level; 36030 int pid; 36031 u32 __data_loc_dst_path; 36032 u32 __data_loc_comm; 36033 char __data[0]; 36034 }; 36035 36036 struct trace_event_raw_cgroup_event { 36037 struct trace_entry ent; 36038 int root; 36039 int id; 36040 int level; 36041 u32 __data_loc_path; 36042 int val; 36043 char __data[0]; 36044 }; 36045 36046 struct trace_event_data_offsets_cgroup_root { 36047 u32 name; 36048 }; 36049 36050 struct trace_event_data_offsets_cgroup { 36051 u32 path; 36052 }; 36053 36054 struct trace_event_data_offsets_cgroup_migrate { 36055 u32 dst_path; 36056 u32 comm; 36057 }; 36058 36059 struct trace_event_data_offsets_cgroup_event { 36060 u32 path; 36061 }; 36062 36063 typedef void (*btf_trace_cgroup_setup_root)(void *, struct cgroup_root *); 36064 36065 typedef void (*btf_trace_cgroup_destroy_root)(void *, struct cgroup_root *); 36066 36067 typedef void (*btf_trace_cgroup_remount)(void *, struct cgroup_root *); 36068 36069 typedef void (*btf_trace_cgroup_mkdir)(void *, struct cgroup *, const char *); 36070 36071 typedef void (*btf_trace_cgroup_rmdir)(void *, struct cgroup *, const char *); 36072 36073 typedef void (*btf_trace_cgroup_release)(void *, struct cgroup *, const char *); 36074 36075 typedef void (*btf_trace_cgroup_rename)(void *, struct cgroup *, const char *); 36076 36077 typedef void (*btf_trace_cgroup_freeze)(void *, struct cgroup *, const char *); 36078 36079 typedef void (*btf_trace_cgroup_unfreeze)(void *, struct cgroup *, const char *); 36080 36081 typedef void (*btf_trace_cgroup_attach_task)(void *, struct cgroup *, const char *, struct task_struct *, bool); 36082 36083 typedef void (*btf_trace_cgroup_transfer_tasks)(void *, struct cgroup *, const char *, struct task_struct *, bool); 36084 36085 typedef void (*btf_trace_cgroup_notify_populated)(void *, struct cgroup *, const char *, int); 36086 36087 typedef void (*btf_trace_cgroup_notify_frozen)(void *, struct cgroup *, const char *, int); 36088 36089 enum cgroup2_param { 36090 Opt_nsdelegate = 0, 36091 Opt_memory_localevents = 1, 36092 Opt_memory_recursiveprot = 2, 36093 nr__cgroup2_params = 3, 36094 }; 36095 36096 struct cgroupstats { 36097 __u64 nr_sleeping; 36098 __u64 nr_running; 36099 __u64 nr_stopped; 36100 __u64 nr_uninterruptible; 36101 __u64 nr_io_wait; 36102 }; 36103 36104 enum cgroup_filetype { 36105 CGROUP_FILE_PROCS = 0, 36106 CGROUP_FILE_TASKS = 1, 36107 }; 36108 36109 struct cgroup_pidlist { 36110 struct { 36111 enum cgroup_filetype type; 36112 struct pid_namespace *ns; 36113 } key; 36114 pid_t *list; 36115 int length; 36116 struct list_head links; 36117 struct cgroup *owner; 36118 struct delayed_work destroy_dwork; 36119 }; 36120 36121 enum cgroup1_param { 36122 Opt_all = 0, 36123 Opt_clone_children = 1, 36124 Opt_cpuset_v2_mode = 2, 36125 Opt_name = 3, 36126 Opt_none = 4, 36127 Opt_noprefix = 5, 36128 Opt_release_agent = 6, 36129 Opt_xattr = 7, 36130 }; 36131 36132 enum freezer_state_flags { 36133 CGROUP_FREEZER_ONLINE = 1, 36134 CGROUP_FREEZING_SELF = 2, 36135 CGROUP_FREEZING_PARENT = 4, 36136 CGROUP_FROZEN = 8, 36137 CGROUP_FREEZING = 6, 36138 }; 36139 36140 struct freezer { 36141 struct cgroup_subsys_state css; 36142 unsigned int state; 36143 }; 36144 36145 struct pids_cgroup { 36146 struct cgroup_subsys_state css; 36147 atomic64_t counter; 36148 atomic64_t limit; 36149 struct cgroup_file events_file; 36150 atomic64_t events_limit; 36151 }; 36152 36153 struct root_domain___2; 36154 36155 struct fmeter { 36156 int cnt; 36157 int val; 36158 time64_t time; 36159 spinlock_t lock; 36160 }; 36161 36162 struct cpuset { 36163 struct cgroup_subsys_state css; 36164 long unsigned int flags; 36165 cpumask_var_t cpus_allowed; 36166 nodemask_t mems_allowed; 36167 cpumask_var_t effective_cpus; 36168 nodemask_t effective_mems; 36169 cpumask_var_t subparts_cpus; 36170 nodemask_t old_mems_allowed; 36171 struct fmeter fmeter; 36172 int attach_in_progress; 36173 int pn; 36174 int relax_domain_level; 36175 int nr_subparts_cpus; 36176 int partition_root_state; 36177 int use_parent_ecpus; 36178 int child_ecpus_count; 36179 }; 36180 36181 struct tmpmasks { 36182 cpumask_var_t addmask; 36183 cpumask_var_t delmask; 36184 cpumask_var_t new_cpus; 36185 }; 36186 36187 typedef enum { 36188 CS_ONLINE = 0, 36189 CS_CPU_EXCLUSIVE = 1, 36190 CS_MEM_EXCLUSIVE = 2, 36191 CS_MEM_HARDWALL = 3, 36192 CS_MEMORY_MIGRATE = 4, 36193 CS_SCHED_LOAD_BALANCE = 5, 36194 CS_SPREAD_PAGE = 6, 36195 CS_SPREAD_SLAB = 7, 36196 } cpuset_flagbits_t; 36197 36198 enum subparts_cmd { 36199 partcmd_enable = 0, 36200 partcmd_disable = 1, 36201 partcmd_update = 2, 36202 }; 36203 36204 struct cpuset_migrate_mm_work { 36205 struct work_struct work; 36206 struct mm_struct *mm; 36207 nodemask_t from; 36208 nodemask_t to; 36209 }; 36210 36211 typedef enum { 36212 FILE_MEMORY_MIGRATE = 0, 36213 FILE_CPULIST = 1, 36214 FILE_MEMLIST = 2, 36215 FILE_EFFECTIVE_CPULIST = 3, 36216 FILE_EFFECTIVE_MEMLIST = 4, 36217 FILE_SUBPARTS_CPULIST = 5, 36218 FILE_CPU_EXCLUSIVE = 6, 36219 FILE_MEM_EXCLUSIVE = 7, 36220 FILE_MEM_HARDWALL = 8, 36221 FILE_SCHED_LOAD_BALANCE = 9, 36222 FILE_PARTITION_ROOT = 10, 36223 FILE_SCHED_RELAX_DOMAIN_LEVEL = 11, 36224 FILE_MEMORY_PRESSURE_ENABLED = 12, 36225 FILE_MEMORY_PRESSURE = 13, 36226 FILE_SPREAD_PAGE = 14, 36227 FILE_SPREAD_SLAB = 15, 36228 } cpuset_filetype_t; 36229 36230 struct kernel_pkey_query { 36231 __u32 supported_ops; 36232 __u32 key_size; 36233 __u16 max_data_size; 36234 __u16 max_sig_size; 36235 __u16 max_enc_size; 36236 __u16 max_dec_size; 36237 }; 36238 36239 enum kernel_pkey_operation { 36240 kernel_pkey_encrypt = 0, 36241 kernel_pkey_decrypt = 1, 36242 kernel_pkey_sign = 2, 36243 kernel_pkey_verify = 3, 36244 }; 36245 36246 struct kernel_pkey_params { 36247 struct key *key; 36248 const char *encoding; 36249 const char *hash_algo; 36250 char *info; 36251 __u32 in_len; 36252 union { 36253 __u32 out_len; 36254 __u32 in2_len; 36255 }; 36256 enum kernel_pkey_operation op: 8; 36257 }; 36258 36259 struct key_preparsed_payload { 36260 const char *orig_description; 36261 char *description; 36262 union key_payload payload; 36263 const void *data; 36264 size_t datalen; 36265 size_t quotalen; 36266 time64_t expiry; 36267 }; 36268 36269 struct key_match_data { 36270 bool (*cmp)(const struct key *, const struct key_match_data *); 36271 const void *raw_data; 36272 void *preparsed; 36273 unsigned int lookup_type; 36274 }; 36275 36276 struct idmap_key { 36277 bool map_up; 36278 u32 id; 36279 u32 count; 36280 }; 36281 36282 struct ctl_path { 36283 const char *procname; 36284 }; 36285 36286 struct cpu_stop_done { 36287 atomic_t nr_todo; 36288 int ret; 36289 struct completion completion; 36290 }; 36291 36292 struct cpu_stopper { 36293 struct task_struct *thread; 36294 raw_spinlock_t lock; 36295 bool enabled; 36296 struct list_head works; 36297 struct cpu_stop_work stop_work; 36298 long unsigned int caller; 36299 cpu_stop_fn_t fn; 36300 }; 36301 36302 enum multi_stop_state { 36303 MULTI_STOP_NONE = 0, 36304 MULTI_STOP_PREPARE = 1, 36305 MULTI_STOP_DISABLE_IRQ = 2, 36306 MULTI_STOP_RUN = 3, 36307 MULTI_STOP_EXIT = 4, 36308 }; 36309 36310 struct multi_stop_data { 36311 cpu_stop_fn_t fn; 36312 void *data; 36313 unsigned int num_threads; 36314 const struct cpumask *active_cpus; 36315 enum multi_stop_state state; 36316 atomic_t thread_ack; 36317 }; 36318 36319 typedef int __kernel_mqd_t; 36320 36321 typedef __kernel_mqd_t mqd_t; 36322 36323 enum audit_state { 36324 AUDIT_DISABLED = 0, 36325 AUDIT_BUILD_CONTEXT = 1, 36326 AUDIT_RECORD_CONTEXT = 2, 36327 }; 36328 36329 struct audit_cap_data { 36330 kernel_cap_t permitted; 36331 kernel_cap_t inheritable; 36332 union { 36333 unsigned int fE; 36334 kernel_cap_t effective; 36335 }; 36336 kernel_cap_t ambient; 36337 kuid_t rootid; 36338 }; 36339 36340 struct audit_names { 36341 struct list_head list; 36342 struct filename *name; 36343 int name_len; 36344 bool hidden; 36345 long unsigned int ino; 36346 dev_t dev; 36347 umode_t mode; 36348 kuid_t uid; 36349 kgid_t gid; 36350 dev_t rdev; 36351 u32 osid; 36352 struct audit_cap_data fcap; 36353 unsigned int fcap_ver; 36354 unsigned char type; 36355 bool should_free; 36356 }; 36357 36358 struct mq_attr { 36359 __kernel_long_t mq_flags; 36360 __kernel_long_t mq_maxmsg; 36361 __kernel_long_t mq_msgsize; 36362 __kernel_long_t mq_curmsgs; 36363 __kernel_long_t __reserved[4]; 36364 }; 36365 36366 struct audit_proctitle { 36367 int len; 36368 char *value; 36369 }; 36370 36371 struct audit_aux_data; 36372 36373 struct __kernel_sockaddr_storage; 36374 36375 struct audit_tree_refs; 36376 36377 struct audit_context { 36378 int dummy; 36379 int in_syscall; 36380 enum audit_state state; 36381 enum audit_state current_state; 36382 unsigned int serial; 36383 int major; 36384 struct timespec64 ctime; 36385 long unsigned int argv[4]; 36386 long int return_code; 36387 u64 prio; 36388 int return_valid; 36389 struct audit_names preallocated_names[5]; 36390 int name_count; 36391 struct list_head names_list; 36392 char *filterkey; 36393 struct path pwd; 36394 struct audit_aux_data *aux; 36395 struct audit_aux_data *aux_pids; 36396 struct __kernel_sockaddr_storage *sockaddr; 36397 size_t sockaddr_len; 36398 pid_t pid; 36399 pid_t ppid; 36400 kuid_t uid; 36401 kuid_t euid; 36402 kuid_t suid; 36403 kuid_t fsuid; 36404 kgid_t gid; 36405 kgid_t egid; 36406 kgid_t sgid; 36407 kgid_t fsgid; 36408 long unsigned int personality; 36409 int arch; 36410 pid_t target_pid; 36411 kuid_t target_auid; 36412 kuid_t target_uid; 36413 unsigned int target_sessionid; 36414 u32 target_sid; 36415 char target_comm[16]; 36416 struct audit_tree_refs *trees; 36417 struct audit_tree_refs *first_trees; 36418 struct list_head killed_trees; 36419 int tree_count; 36420 int type; 36421 union { 36422 struct { 36423 int nargs; 36424 long int args[6]; 36425 } socketcall; 36426 struct { 36427 kuid_t uid; 36428 kgid_t gid; 36429 umode_t mode; 36430 u32 osid; 36431 int has_perm; 36432 uid_t perm_uid; 36433 gid_t perm_gid; 36434 umode_t perm_mode; 36435 long unsigned int qbytes; 36436 } ipc; 36437 struct { 36438 mqd_t mqdes; 36439 struct mq_attr mqstat; 36440 } mq_getsetattr; 36441 struct { 36442 mqd_t mqdes; 36443 int sigev_signo; 36444 } mq_notify; 36445 struct { 36446 mqd_t mqdes; 36447 size_t msg_len; 36448 unsigned int msg_prio; 36449 struct timespec64 abs_timeout; 36450 } mq_sendrecv; 36451 struct { 36452 int oflag; 36453 umode_t mode; 36454 struct mq_attr attr; 36455 } mq_open; 36456 struct { 36457 pid_t pid; 36458 struct audit_cap_data cap; 36459 } capset; 36460 struct { 36461 int fd; 36462 int flags; 36463 } mmap; 36464 struct { 36465 int argc; 36466 } execve; 36467 struct { 36468 char *name; 36469 } module; 36470 }; 36471 int fds[2]; 36472 struct audit_proctitle proctitle; 36473 }; 36474 36475 struct __kernel_sockaddr_storage { 36476 union { 36477 struct { 36478 __kernel_sa_family_t ss_family; 36479 char __data[126]; 36480 }; 36481 void *__align; 36482 }; 36483 }; 36484 36485 enum audit_nlgrps { 36486 AUDIT_NLGRP_NONE = 0, 36487 AUDIT_NLGRP_READLOG = 1, 36488 __AUDIT_NLGRP_MAX = 2, 36489 }; 36490 36491 struct audit_status { 36492 __u32 mask; 36493 __u32 enabled; 36494 __u32 failure; 36495 __u32 pid; 36496 __u32 rate_limit; 36497 __u32 backlog_limit; 36498 __u32 lost; 36499 __u32 backlog; 36500 union { 36501 __u32 version; 36502 __u32 feature_bitmap; 36503 }; 36504 __u32 backlog_wait_time; 36505 __u32 backlog_wait_time_actual; 36506 }; 36507 36508 struct audit_features { 36509 __u32 vers; 36510 __u32 mask; 36511 __u32 features; 36512 __u32 lock; 36513 }; 36514 36515 struct audit_tty_status { 36516 __u32 enabled; 36517 __u32 log_passwd; 36518 }; 36519 36520 struct audit_sig_info { 36521 uid_t uid; 36522 pid_t pid; 36523 char ctx[0]; 36524 }; 36525 36526 struct net_generic { 36527 union { 36528 struct { 36529 unsigned int len; 36530 struct callback_head rcu; 36531 } s; 36532 void *ptr[0]; 36533 }; 36534 }; 36535 36536 struct pernet_operations { 36537 struct list_head list; 36538 int (*init)(struct net *); 36539 void (*pre_exit)(struct net *); 36540 void (*exit)(struct net *); 36541 void (*exit_batch)(struct list_head *); 36542 unsigned int *id; 36543 size_t size; 36544 }; 36545 36546 struct scm_creds { 36547 u32 pid; 36548 kuid_t uid; 36549 kgid_t gid; 36550 }; 36551 36552 struct netlink_skb_parms { 36553 struct scm_creds creds; 36554 __u32 portid; 36555 __u32 dst_group; 36556 __u32 flags; 36557 struct sock *sk; 36558 bool nsid_is_set; 36559 int nsid; 36560 }; 36561 36562 struct netlink_kernel_cfg { 36563 unsigned int groups; 36564 unsigned int flags; 36565 void (*input)(struct sk_buff *); 36566 struct mutex *cb_mutex; 36567 int (*bind)(struct net *, int); 36568 void (*unbind)(struct net *, int); 36569 bool (*compare)(struct net *, struct sock *); 36570 }; 36571 36572 struct audit_netlink_list { 36573 __u32 portid; 36574 struct net *net; 36575 struct sk_buff_head q; 36576 }; 36577 36578 struct audit_net { 36579 struct sock *sk; 36580 }; 36581 36582 struct auditd_connection { 36583 struct pid *pid; 36584 u32 portid; 36585 struct net *net; 36586 struct callback_head rcu; 36587 }; 36588 36589 struct audit_ctl_mutex { 36590 struct mutex lock; 36591 void *owner; 36592 }; 36593 36594 struct audit_buffer { 36595 struct sk_buff *skb; 36596 struct audit_context *ctx; 36597 gfp_t gfp_mask; 36598 }; 36599 36600 struct audit_reply { 36601 __u32 portid; 36602 struct net *net; 36603 struct sk_buff *skb; 36604 }; 36605 36606 enum { 36607 Audit_equal = 0, 36608 Audit_not_equal = 1, 36609 Audit_bitmask = 2, 36610 Audit_bittest = 3, 36611 Audit_lt = 4, 36612 Audit_gt = 5, 36613 Audit_le = 6, 36614 Audit_ge = 7, 36615 Audit_bad = 8, 36616 }; 36617 36618 struct audit_rule_data { 36619 __u32 flags; 36620 __u32 action; 36621 __u32 field_count; 36622 __u32 mask[64]; 36623 __u32 fields[64]; 36624 __u32 values[64]; 36625 __u32 fieldflags[64]; 36626 __u32 buflen; 36627 char buf[0]; 36628 }; 36629 36630 struct audit_field; 36631 36632 struct audit_watch; 36633 36634 struct audit_tree; 36635 36636 struct audit_fsnotify_mark; 36637 36638 struct audit_krule { 36639 u32 pflags; 36640 u32 flags; 36641 u32 listnr; 36642 u32 action; 36643 u32 mask[64]; 36644 u32 buflen; 36645 u32 field_count; 36646 char *filterkey; 36647 struct audit_field *fields; 36648 struct audit_field *arch_f; 36649 struct audit_field *inode_f; 36650 struct audit_watch *watch; 36651 struct audit_tree *tree; 36652 struct audit_fsnotify_mark *exe; 36653 struct list_head rlist; 36654 struct list_head list; 36655 u64 prio; 36656 }; 36657 36658 struct audit_field { 36659 u32 type; 36660 union { 36661 u32 val; 36662 kuid_t uid; 36663 kgid_t gid; 36664 struct { 36665 char *lsm_str; 36666 void *lsm_rule; 36667 }; 36668 }; 36669 u32 op; 36670 }; 36671 36672 struct audit_entry { 36673 struct list_head list; 36674 struct callback_head rcu; 36675 struct audit_krule rule; 36676 }; 36677 36678 struct audit_buffer___2; 36679 36680 typedef int __kernel_key_t; 36681 36682 typedef __kernel_key_t key_t; 36683 36684 struct cpu_vfs_cap_data { 36685 __u32 magic_etc; 36686 kernel_cap_t permitted; 36687 kernel_cap_t inheritable; 36688 kuid_t rootid; 36689 }; 36690 36691 struct kern_ipc_perm { 36692 spinlock_t lock; 36693 bool deleted; 36694 int id; 36695 key_t key; 36696 kuid_t uid; 36697 kgid_t gid; 36698 kuid_t cuid; 36699 kgid_t cgid; 36700 umode_t mode; 36701 long unsigned int seq; 36702 void *security; 36703 struct rhash_head khtnode; 36704 struct callback_head rcu; 36705 refcount_t refcount; 36706 long: 32; 36707 long: 64; 36708 long: 64; 36709 long: 64; 36710 long: 64; 36711 long: 64; 36712 }; 36713 36714 typedef struct fsnotify_mark_connector *fsnotify_connp_t; 36715 36716 struct fsnotify_mark_connector { 36717 spinlock_t lock; 36718 short unsigned int type; 36719 short unsigned int flags; 36720 __kernel_fsid_t fsid; 36721 union { 36722 fsnotify_connp_t *obj; 36723 struct fsnotify_mark_connector *destroy_next; 36724 }; 36725 struct hlist_head list; 36726 }; 36727 36728 enum audit_nfcfgop { 36729 AUDIT_XT_OP_REGISTER = 0, 36730 AUDIT_XT_OP_REPLACE = 1, 36731 AUDIT_XT_OP_UNREGISTER = 2, 36732 AUDIT_NFT_OP_TABLE_REGISTER = 3, 36733 AUDIT_NFT_OP_TABLE_UNREGISTER = 4, 36734 AUDIT_NFT_OP_CHAIN_REGISTER = 5, 36735 AUDIT_NFT_OP_CHAIN_UNREGISTER = 6, 36736 AUDIT_NFT_OP_RULE_REGISTER = 7, 36737 AUDIT_NFT_OP_RULE_UNREGISTER = 8, 36738 AUDIT_NFT_OP_SET_REGISTER = 9, 36739 AUDIT_NFT_OP_SET_UNREGISTER = 10, 36740 AUDIT_NFT_OP_SETELEM_REGISTER = 11, 36741 AUDIT_NFT_OP_SETELEM_UNREGISTER = 12, 36742 AUDIT_NFT_OP_GEN_REGISTER = 13, 36743 AUDIT_NFT_OP_OBJ_REGISTER = 14, 36744 AUDIT_NFT_OP_OBJ_UNREGISTER = 15, 36745 AUDIT_NFT_OP_OBJ_RESET = 16, 36746 AUDIT_NFT_OP_FLOWTABLE_REGISTER = 17, 36747 AUDIT_NFT_OP_FLOWTABLE_UNREGISTER = 18, 36748 AUDIT_NFT_OP_INVALID = 19, 36749 }; 36750 36751 enum fsnotify_obj_type { 36752 FSNOTIFY_OBJ_TYPE_INODE = 0, 36753 FSNOTIFY_OBJ_TYPE_PARENT = 1, 36754 FSNOTIFY_OBJ_TYPE_VFSMOUNT = 2, 36755 FSNOTIFY_OBJ_TYPE_SB = 3, 36756 FSNOTIFY_OBJ_TYPE_COUNT = 4, 36757 FSNOTIFY_OBJ_TYPE_DETACHED = 4, 36758 }; 36759 36760 struct audit_aux_data { 36761 struct audit_aux_data *next; 36762 int type; 36763 }; 36764 36765 struct audit_chunk; 36766 36767 struct audit_tree_refs { 36768 struct audit_tree_refs *next; 36769 struct audit_chunk *c[31]; 36770 }; 36771 36772 struct audit_aux_data_pids { 36773 struct audit_aux_data d; 36774 pid_t target_pid[16]; 36775 kuid_t target_auid[16]; 36776 kuid_t target_uid[16]; 36777 unsigned int target_sessionid[16]; 36778 u32 target_sid[16]; 36779 char target_comm[256]; 36780 int pid_count; 36781 }; 36782 36783 struct audit_aux_data_bprm_fcaps { 36784 struct audit_aux_data d; 36785 struct audit_cap_data fcap; 36786 unsigned int fcap_ver; 36787 struct audit_cap_data old_pcap; 36788 struct audit_cap_data new_pcap; 36789 }; 36790 36791 struct audit_nfcfgop_tab { 36792 enum audit_nfcfgop op; 36793 const char *s; 36794 }; 36795 36796 struct audit_parent; 36797 36798 struct audit_watch { 36799 refcount_t count; 36800 dev_t dev; 36801 char *path; 36802 long unsigned int ino; 36803 struct audit_parent *parent; 36804 struct list_head wlist; 36805 struct list_head rules; 36806 }; 36807 36808 struct fsnotify_group; 36809 36810 struct fsnotify_iter_info; 36811 36812 struct fsnotify_mark; 36813 36814 struct fsnotify_event; 36815 36816 struct fsnotify_ops { 36817 int (*handle_event)(struct fsnotify_group *, u32, const void *, int, struct inode *, const struct qstr *, u32, struct fsnotify_iter_info *); 36818 int (*handle_inode_event)(struct fsnotify_mark *, u32, struct inode *, struct inode *, const struct qstr *, u32); 36819 void (*free_group_priv)(struct fsnotify_group *); 36820 void (*freeing_mark)(struct fsnotify_mark *, struct fsnotify_group *); 36821 void (*free_event)(struct fsnotify_event *); 36822 void (*free_mark)(struct fsnotify_mark *); 36823 }; 36824 36825 struct inotify_group_private_data { 36826 spinlock_t idr_lock; 36827 struct idr idr; 36828 struct ucounts *ucounts; 36829 }; 36830 36831 struct fanotify_group_private_data { 36832 struct list_head access_list; 36833 wait_queue_head_t access_waitq; 36834 int flags; 36835 int f_flags; 36836 unsigned int max_marks; 36837 struct user_struct *user; 36838 }; 36839 36840 struct fsnotify_group { 36841 const struct fsnotify_ops *ops; 36842 refcount_t refcnt; 36843 spinlock_t notification_lock; 36844 struct list_head notification_list; 36845 wait_queue_head_t notification_waitq; 36846 unsigned int q_len; 36847 unsigned int max_events; 36848 unsigned int priority; 36849 bool shutdown; 36850 struct mutex mark_mutex; 36851 atomic_t num_marks; 36852 atomic_t user_waits; 36853 struct list_head marks_list; 36854 struct fasync_struct *fsn_fa; 36855 struct fsnotify_event *overflow_event; 36856 struct mem_cgroup *memcg; 36857 union { 36858 void *private; 36859 struct inotify_group_private_data inotify_data; 36860 struct fanotify_group_private_data fanotify_data; 36861 }; 36862 }; 36863 36864 struct fsnotify_iter_info { 36865 struct fsnotify_mark *marks[4]; 36866 unsigned int report_mask; 36867 int srcu_idx; 36868 }; 36869 36870 struct fsnotify_mark { 36871 __u32 mask; 36872 refcount_t refcnt; 36873 struct fsnotify_group *group; 36874 struct list_head g_list; 36875 spinlock_t lock; 36876 struct hlist_node obj_list; 36877 struct fsnotify_mark_connector *connector; 36878 __u32 ignored_mask; 36879 unsigned int flags; 36880 }; 36881 36882 struct fsnotify_event { 36883 struct list_head list; 36884 long unsigned int objectid; 36885 }; 36886 36887 struct audit_parent { 36888 struct list_head watches; 36889 struct fsnotify_mark mark; 36890 }; 36891 36892 struct audit_fsnotify_mark { 36893 dev_t dev; 36894 long unsigned int ino; 36895 char *path; 36896 struct fsnotify_mark mark; 36897 struct audit_krule *rule; 36898 }; 36899 36900 struct audit_chunk___2; 36901 36902 struct audit_tree { 36903 refcount_t count; 36904 int goner; 36905 struct audit_chunk___2 *root; 36906 struct list_head chunks; 36907 struct list_head rules; 36908 struct list_head list; 36909 struct list_head same_root; 36910 struct callback_head head; 36911 char pathname[0]; 36912 }; 36913 36914 struct node { 36915 struct list_head list; 36916 struct audit_tree *owner; 36917 unsigned int index; 36918 }; 36919 36920 struct audit_chunk___2 { 36921 struct list_head hash; 36922 long unsigned int key; 36923 struct fsnotify_mark *mark; 36924 struct list_head trees; 36925 int count; 36926 atomic_long_t refs; 36927 struct callback_head head; 36928 struct node owners[0]; 36929 }; 36930 36931 struct audit_tree_mark { 36932 struct fsnotify_mark mark; 36933 struct audit_chunk___2 *chunk; 36934 }; 36935 36936 enum { 36937 HASH_SIZE = 128, 36938 }; 36939 36940 struct kprobe_blacklist_entry { 36941 struct list_head list; 36942 long unsigned int start_addr; 36943 long unsigned int end_addr; 36944 }; 36945 36946 enum perf_record_ksymbol_type { 36947 PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0, 36948 PERF_RECORD_KSYMBOL_TYPE_BPF = 1, 36949 PERF_RECORD_KSYMBOL_TYPE_OOL = 2, 36950 PERF_RECORD_KSYMBOL_TYPE_MAX = 3, 36951 }; 36952 36953 struct kprobe_insn_page { 36954 struct list_head list; 36955 kprobe_opcode_t *insns; 36956 struct kprobe_insn_cache *cache; 36957 int nused; 36958 int ngarbage; 36959 char slot_used[0]; 36960 }; 36961 36962 enum kprobe_slot_state { 36963 SLOT_CLEAN = 0, 36964 SLOT_DIRTY = 1, 36965 SLOT_USED = 2, 36966 }; 36967 36968 struct kgdb_io { 36969 const char *name; 36970 int (*read_char)(); 36971 void (*write_char)(u8); 36972 void (*flush)(); 36973 int (*init)(); 36974 void (*deinit)(); 36975 void (*pre_exception)(); 36976 void (*post_exception)(); 36977 struct console *cons; 36978 }; 36979 36980 enum { 36981 KDB_NOT_INITIALIZED = 0, 36982 KDB_INIT_EARLY = 1, 36983 KDB_INIT_FULL = 2, 36984 }; 36985 36986 struct kgdb_state { 36987 int ex_vector; 36988 int signo; 36989 int err_code; 36990 int cpu; 36991 int pass_exception; 36992 long unsigned int thr_query; 36993 long unsigned int threadid; 36994 long int kgdb_usethreadid; 36995 struct pt_regs *linux_regs; 36996 atomic_t *send_ready; 36997 }; 36998 36999 struct debuggerinfo_struct { 37000 void *debuggerinfo; 37001 struct task_struct *task; 37002 int exception_state; 37003 int ret_state; 37004 int irq_depth; 37005 int enter_kgdb; 37006 bool rounding_up; 37007 }; 37008 37009 struct seccomp_notif_sizes { 37010 __u16 seccomp_notif; 37011 __u16 seccomp_notif_resp; 37012 __u16 seccomp_data; 37013 }; 37014 37015 struct seccomp_notif { 37016 __u64 id; 37017 __u32 pid; 37018 __u32 flags; 37019 struct seccomp_data data; 37020 }; 37021 37022 struct seccomp_notif_resp { 37023 __u64 id; 37024 __s64 val; 37025 __s32 error; 37026 __u32 flags; 37027 }; 37028 37029 struct seccomp_notif_addfd { 37030 __u64 id; 37031 __u32 flags; 37032 __u32 srcfd; 37033 __u32 newfd; 37034 __u32 newfd_flags; 37035 }; 37036 37037 struct action_cache { 37038 long unsigned int allow_native[7]; 37039 long unsigned int allow_compat[7]; 37040 }; 37041 37042 struct notification; 37043 37044 struct seccomp_filter { 37045 refcount_t refs; 37046 refcount_t users; 37047 bool log; 37048 struct action_cache cache; 37049 struct seccomp_filter *prev; 37050 struct bpf_prog *prog; 37051 struct notification *notif; 37052 struct mutex notify_lock; 37053 wait_queue_head_t wqh; 37054 }; 37055 37056 struct seccomp_metadata { 37057 __u64 filter_off; 37058 __u64 flags; 37059 }; 37060 37061 struct sock_fprog { 37062 short unsigned int len; 37063 struct sock_filter *filter; 37064 }; 37065 37066 struct compat_sock_fprog { 37067 u16 len; 37068 compat_uptr_t filter; 37069 }; 37070 37071 typedef int (*bpf_aux_classic_check_t)(struct sock_filter *, unsigned int); 37072 37073 enum notify_state { 37074 SECCOMP_NOTIFY_INIT = 0, 37075 SECCOMP_NOTIFY_SENT = 1, 37076 SECCOMP_NOTIFY_REPLIED = 2, 37077 }; 37078 37079 struct seccomp_knotif { 37080 struct task_struct *task; 37081 u64 id; 37082 const struct seccomp_data *data; 37083 enum notify_state state; 37084 int error; 37085 long int val; 37086 u32 flags; 37087 struct completion ready; 37088 struct list_head list; 37089 struct list_head addfd; 37090 }; 37091 37092 struct seccomp_kaddfd { 37093 struct file *file; 37094 int fd; 37095 unsigned int flags; 37096 int ret; 37097 struct completion completion; 37098 struct list_head list; 37099 }; 37100 37101 struct notification { 37102 struct semaphore request; 37103 u64 next_id; 37104 struct list_head notifications; 37105 }; 37106 37107 struct seccomp_log_name { 37108 u32 log; 37109 const char *name; 37110 }; 37111 37112 struct rchan; 37113 37114 struct rchan_buf { 37115 void *start; 37116 void *data; 37117 size_t offset; 37118 size_t subbufs_produced; 37119 size_t subbufs_consumed; 37120 struct rchan *chan; 37121 wait_queue_head_t read_wait; 37122 struct irq_work wakeup_work; 37123 struct dentry *dentry; 37124 struct kref kref; 37125 struct page **page_array; 37126 unsigned int page_count; 37127 unsigned int finalized; 37128 size_t *padding; 37129 size_t prev_padding; 37130 size_t bytes_consumed; 37131 size_t early_bytes; 37132 unsigned int cpu; 37133 long: 32; 37134 long: 64; 37135 long: 64; 37136 long: 64; 37137 }; 37138 37139 struct rchan_callbacks; 37140 37141 struct rchan { 37142 u32 version; 37143 size_t subbuf_size; 37144 size_t n_subbufs; 37145 size_t alloc_size; 37146 const struct rchan_callbacks *cb; 37147 struct kref kref; 37148 void *private_data; 37149 size_t last_toobig; 37150 struct rchan_buf **buf; 37151 int is_global; 37152 struct list_head list; 37153 struct dentry *parent; 37154 int has_base_filename; 37155 char base_filename[255]; 37156 }; 37157 37158 struct rchan_callbacks { 37159 int (*subbuf_start)(struct rchan_buf *, void *, void *, size_t); 37160 struct dentry * (*create_buf_file)(const char *, struct dentry *, umode_t, struct rchan_buf *, int *); 37161 int (*remove_buf_file)(struct dentry *); 37162 }; 37163 37164 struct partial_page { 37165 unsigned int offset; 37166 unsigned int len; 37167 long unsigned int private; 37168 }; 37169 37170 struct splice_pipe_desc { 37171 struct page **pages; 37172 struct partial_page *partial; 37173 int nr_pages; 37174 unsigned int nr_pages_max; 37175 const struct pipe_buf_operations *ops; 37176 void (*spd_release)(struct splice_pipe_desc *, unsigned int); 37177 }; 37178 37179 struct rchan_percpu_buf_dispatcher { 37180 struct rchan_buf *buf; 37181 struct dentry *dentry; 37182 }; 37183 37184 enum { 37185 TASKSTATS_TYPE_UNSPEC = 0, 37186 TASKSTATS_TYPE_PID = 1, 37187 TASKSTATS_TYPE_TGID = 2, 37188 TASKSTATS_TYPE_STATS = 3, 37189 TASKSTATS_TYPE_AGGR_PID = 4, 37190 TASKSTATS_TYPE_AGGR_TGID = 5, 37191 TASKSTATS_TYPE_NULL = 6, 37192 __TASKSTATS_TYPE_MAX = 7, 37193 }; 37194 37195 enum { 37196 TASKSTATS_CMD_ATTR_UNSPEC = 0, 37197 TASKSTATS_CMD_ATTR_PID = 1, 37198 TASKSTATS_CMD_ATTR_TGID = 2, 37199 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 3, 37200 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 4, 37201 __TASKSTATS_CMD_ATTR_MAX = 5, 37202 }; 37203 37204 enum { 37205 CGROUPSTATS_CMD_UNSPEC = 3, 37206 CGROUPSTATS_CMD_GET = 4, 37207 CGROUPSTATS_CMD_NEW = 5, 37208 __CGROUPSTATS_CMD_MAX = 6, 37209 }; 37210 37211 enum { 37212 CGROUPSTATS_TYPE_UNSPEC = 0, 37213 CGROUPSTATS_TYPE_CGROUP_STATS = 1, 37214 __CGROUPSTATS_TYPE_MAX = 2, 37215 }; 37216 37217 enum { 37218 CGROUPSTATS_CMD_ATTR_UNSPEC = 0, 37219 CGROUPSTATS_CMD_ATTR_FD = 1, 37220 __CGROUPSTATS_CMD_ATTR_MAX = 2, 37221 }; 37222 37223 struct genlmsghdr { 37224 __u8 cmd; 37225 __u8 version; 37226 __u16 reserved; 37227 }; 37228 37229 enum { 37230 NLA_UNSPEC = 0, 37231 NLA_U8 = 1, 37232 NLA_U16 = 2, 37233 NLA_U32 = 3, 37234 NLA_U64 = 4, 37235 NLA_STRING = 5, 37236 NLA_FLAG = 6, 37237 NLA_MSECS = 7, 37238 NLA_NESTED = 8, 37239 NLA_NESTED_ARRAY = 9, 37240 NLA_NUL_STRING = 10, 37241 NLA_BINARY = 11, 37242 NLA_S8 = 12, 37243 NLA_S16 = 13, 37244 NLA_S32 = 14, 37245 NLA_S64 = 15, 37246 NLA_BITFIELD32 = 16, 37247 NLA_REJECT = 17, 37248 __NLA_TYPE_MAX = 18, 37249 }; 37250 37251 struct genl_multicast_group { 37252 char name[16]; 37253 }; 37254 37255 struct genl_ops; 37256 37257 struct genl_info; 37258 37259 struct genl_small_ops; 37260 37261 struct genl_family { 37262 int id; 37263 unsigned int hdrsize; 37264 char name[16]; 37265 unsigned int version; 37266 unsigned int maxattr; 37267 unsigned int mcgrp_offset; 37268 u8 netnsok: 1; 37269 u8 parallel_ops: 1; 37270 u8 n_ops; 37271 u8 n_small_ops; 37272 u8 n_mcgrps; 37273 const struct nla_policy *policy; 37274 int (*pre_doit)(const struct genl_ops *, struct sk_buff *, struct genl_info *); 37275 void (*post_doit)(const struct genl_ops *, struct sk_buff *, struct genl_info *); 37276 const struct genl_ops *ops; 37277 const struct genl_small_ops *small_ops; 37278 const struct genl_multicast_group *mcgrps; 37279 struct module *module; 37280 }; 37281 37282 struct genl_ops { 37283 int (*doit)(struct sk_buff *, struct genl_info *); 37284 int (*start)(struct netlink_callback *); 37285 int (*dumpit)(struct sk_buff *, struct netlink_callback *); 37286 int (*done)(struct netlink_callback *); 37287 const struct nla_policy *policy; 37288 unsigned int maxattr; 37289 u8 cmd; 37290 u8 internal_flags; 37291 u8 flags; 37292 u8 validate; 37293 }; 37294 37295 struct genl_info { 37296 u32 snd_seq; 37297 u32 snd_portid; 37298 struct nlmsghdr *nlhdr; 37299 struct genlmsghdr *genlhdr; 37300 void *userhdr; 37301 struct nlattr **attrs; 37302 possible_net_t _net; 37303 void *user_ptr[2]; 37304 struct netlink_ext_ack *extack; 37305 }; 37306 37307 struct genl_small_ops { 37308 int (*doit)(struct sk_buff *, struct genl_info *); 37309 int (*dumpit)(struct sk_buff *, struct netlink_callback *); 37310 u8 cmd; 37311 u8 internal_flags; 37312 u8 flags; 37313 u8 validate; 37314 }; 37315 37316 enum genl_validate_flags { 37317 GENL_DONT_VALIDATE_STRICT = 1, 37318 GENL_DONT_VALIDATE_DUMP = 2, 37319 GENL_DONT_VALIDATE_DUMP_STRICT = 4, 37320 }; 37321 37322 struct listener { 37323 struct list_head list; 37324 pid_t pid; 37325 char valid; 37326 }; 37327 37328 struct listener_list { 37329 struct rw_semaphore sem; 37330 struct list_head list; 37331 }; 37332 37333 enum actions { 37334 REGISTER = 0, 37335 DEREGISTER = 1, 37336 CPU_DONT_CARE = 2, 37337 }; 37338 37339 struct tp_module { 37340 struct list_head list; 37341 struct module *mod; 37342 }; 37343 37344 struct tp_probes { 37345 struct callback_head rcu; 37346 struct tracepoint_func probes[0]; 37347 }; 37348 37349 struct ftrace_hash { 37350 long unsigned int size_bits; 37351 struct hlist_head *buckets; 37352 long unsigned int count; 37353 long unsigned int flags; 37354 struct callback_head rcu; 37355 }; 37356 37357 struct ftrace_func_entry { 37358 struct hlist_node hlist; 37359 long unsigned int ip; 37360 long unsigned int direct; 37361 }; 37362 37363 enum ftrace_bug_type { 37364 FTRACE_BUG_UNKNOWN = 0, 37365 FTRACE_BUG_INIT = 1, 37366 FTRACE_BUG_NOP = 2, 37367 FTRACE_BUG_CALL = 3, 37368 FTRACE_BUG_UPDATE = 4, 37369 }; 37370 37371 enum { 37372 FTRACE_UPDATE_CALLS = 1, 37373 FTRACE_DISABLE_CALLS = 2, 37374 FTRACE_UPDATE_TRACE_FUNC = 4, 37375 FTRACE_START_FUNC_RET = 8, 37376 FTRACE_STOP_FUNC_RET = 16, 37377 FTRACE_MAY_SLEEP = 32, 37378 }; 37379 37380 enum { 37381 FTRACE_ITER_FILTER = 1, 37382 FTRACE_ITER_NOTRACE = 2, 37383 FTRACE_ITER_PRINTALL = 4, 37384 FTRACE_ITER_DO_PROBES = 8, 37385 FTRACE_ITER_PROBE = 16, 37386 FTRACE_ITER_MOD = 32, 37387 FTRACE_ITER_ENABLED = 64, 37388 }; 37389 37390 struct ftrace_graph_ent { 37391 long unsigned int func; 37392 int depth; 37393 } __attribute__((packed)); 37394 37395 struct ftrace_graph_ret { 37396 long unsigned int func; 37397 int depth; 37398 unsigned int overrun; 37399 long long unsigned int calltime; 37400 long long unsigned int rettime; 37401 }; 37402 37403 typedef void (*trace_func_graph_ret_t)(struct ftrace_graph_ret *); 37404 37405 typedef int (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); 37406 37407 struct fgraph_ops { 37408 trace_func_graph_ent_t entryfunc; 37409 trace_func_graph_ret_t retfunc; 37410 }; 37411 37412 struct prog_entry; 37413 37414 struct event_filter { 37415 struct prog_entry *prog; 37416 char *filter_string; 37417 }; 37418 37419 struct trace_array_cpu; 37420 37421 struct array_buffer { 37422 struct trace_array *tr; 37423 struct trace_buffer *buffer; 37424 struct trace_array_cpu *data; 37425 u64 time_start; 37426 int cpu; 37427 }; 37428 37429 struct trace_pid_list; 37430 37431 struct trace_options; 37432 37433 struct cond_snapshot; 37434 37435 struct trace_array { 37436 struct list_head list; 37437 char *name; 37438 struct array_buffer array_buffer; 37439 struct array_buffer max_buffer; 37440 bool allocated_snapshot; 37441 long unsigned int max_latency; 37442 struct dentry *d_max_latency; 37443 struct work_struct fsnotify_work; 37444 struct irq_work fsnotify_irqwork; 37445 struct trace_pid_list *filtered_pids; 37446 struct trace_pid_list *filtered_no_pids; 37447 arch_spinlock_t max_lock; 37448 int buffer_disabled; 37449 int sys_refcount_enter; 37450 int sys_refcount_exit; 37451 struct trace_event_file *enter_syscall_files[442]; 37452 struct trace_event_file *exit_syscall_files[442]; 37453 int stop_count; 37454 int clock_id; 37455 int nr_topts; 37456 bool clear_trace; 37457 int buffer_percent; 37458 unsigned int n_err_log_entries; 37459 struct tracer *current_trace; 37460 unsigned int trace_flags; 37461 unsigned char trace_flags_index[32]; 37462 unsigned int flags; 37463 raw_spinlock_t start_lock; 37464 struct list_head err_log; 37465 struct dentry *dir; 37466 struct dentry *options; 37467 struct dentry *percpu_dir; 37468 struct dentry *event_dir; 37469 struct trace_options *topts; 37470 struct list_head systems; 37471 struct list_head events; 37472 struct trace_event_file *trace_marker_file; 37473 cpumask_var_t tracing_cpumask; 37474 int ref; 37475 int trace_ref; 37476 struct ftrace_ops *ops; 37477 struct trace_pid_list *function_pids; 37478 struct trace_pid_list *function_no_pids; 37479 struct list_head func_probes; 37480 struct list_head mod_trace; 37481 struct list_head mod_notrace; 37482 int function_enabled; 37483 int time_stamp_abs_ref; 37484 struct list_head hist_vars; 37485 struct cond_snapshot *cond_snapshot; 37486 }; 37487 37488 struct tracer_flags; 37489 37490 struct tracer { 37491 const char *name; 37492 int (*init)(struct trace_array *); 37493 void (*reset)(struct trace_array *); 37494 void (*start)(struct trace_array *); 37495 void (*stop)(struct trace_array *); 37496 int (*update_thresh)(struct trace_array *); 37497 void (*open)(struct trace_iterator *); 37498 void (*pipe_open)(struct trace_iterator *); 37499 void (*close)(struct trace_iterator *); 37500 void (*pipe_close)(struct trace_iterator *); 37501 ssize_t (*read)(struct trace_iterator *, struct file *, char *, size_t, loff_t *); 37502 ssize_t (*splice_read)(struct trace_iterator *, struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); 37503 void (*print_header)(struct seq_file *); 37504 enum print_line_t (*print_line)(struct trace_iterator *); 37505 int (*set_flag)(struct trace_array *, u32, u32, int); 37506 int (*flag_changed)(struct trace_array *, u32, int); 37507 struct tracer *next; 37508 struct tracer_flags *flags; 37509 int enabled; 37510 bool print_max; 37511 bool allow_instances; 37512 bool use_max_tr; 37513 bool noboot; 37514 }; 37515 37516 struct event_subsystem; 37517 37518 struct trace_subsystem_dir { 37519 struct list_head list; 37520 struct event_subsystem *subsystem; 37521 struct trace_array *tr; 37522 struct dentry *entry; 37523 int ref_count; 37524 int nr_events; 37525 }; 37526 37527 struct trace_array_cpu { 37528 atomic_t disabled; 37529 void *buffer_page; 37530 long unsigned int entries; 37531 long unsigned int saved_latency; 37532 long unsigned int critical_start; 37533 long unsigned int critical_end; 37534 long unsigned int critical_sequence; 37535 long unsigned int nice; 37536 long unsigned int policy; 37537 long unsigned int rt_priority; 37538 long unsigned int skipped_entries; 37539 u64 preempt_timestamp; 37540 pid_t pid; 37541 kuid_t uid; 37542 char comm[16]; 37543 int ftrace_ignore_pid; 37544 bool ignore_pid; 37545 }; 37546 37547 struct trace_option_dentry; 37548 37549 struct trace_options { 37550 struct tracer *tracer; 37551 struct trace_option_dentry *topts; 37552 }; 37553 37554 struct tracer_opt; 37555 37556 struct trace_option_dentry { 37557 struct tracer_opt *opt; 37558 struct tracer_flags *flags; 37559 struct trace_array *tr; 37560 struct dentry *entry; 37561 }; 37562 37563 struct trace_pid_list { 37564 int pid_max; 37565 long unsigned int *pids; 37566 }; 37567 37568 enum { 37569 TRACE_PIDS = 1, 37570 TRACE_NO_PIDS = 2, 37571 }; 37572 37573 typedef bool (*cond_update_fn_t)(struct trace_array *, void *); 37574 37575 struct cond_snapshot { 37576 void *cond_data; 37577 cond_update_fn_t update; 37578 }; 37579 37580 enum { 37581 TRACE_ARRAY_FL_GLOBAL = 1, 37582 }; 37583 37584 struct tracer_opt { 37585 const char *name; 37586 u32 bit; 37587 }; 37588 37589 struct tracer_flags { 37590 u32 val; 37591 struct tracer_opt *opts; 37592 struct tracer *trace; 37593 }; 37594 37595 struct ftrace_mod_load { 37596 struct list_head list; 37597 char *func; 37598 char *module; 37599 int enable; 37600 }; 37601 37602 enum { 37603 FTRACE_HASH_FL_MOD = 1, 37604 }; 37605 37606 struct ftrace_func_command { 37607 struct list_head list; 37608 char *name; 37609 int (*func)(struct trace_array *, struct ftrace_hash *, char *, char *, char *, int); 37610 }; 37611 37612 struct ftrace_probe_ops { 37613 void (*func)(long unsigned int, long unsigned int, struct trace_array *, struct ftrace_probe_ops *, void *); 37614 int (*init)(struct ftrace_probe_ops *, struct trace_array *, long unsigned int, void *, void **); 37615 void (*free)(struct ftrace_probe_ops *, struct trace_array *, long unsigned int, void *); 37616 int (*print)(struct seq_file *, long unsigned int, struct ftrace_probe_ops *, void *); 37617 }; 37618 37619 typedef int (*ftrace_mapper_func)(void *); 37620 37621 struct trace_parser { 37622 bool cont; 37623 char *buffer; 37624 unsigned int idx; 37625 unsigned int size; 37626 }; 37627 37628 enum trace_iterator_bits { 37629 TRACE_ITER_PRINT_PARENT_BIT = 0, 37630 TRACE_ITER_SYM_OFFSET_BIT = 1, 37631 TRACE_ITER_SYM_ADDR_BIT = 2, 37632 TRACE_ITER_VERBOSE_BIT = 3, 37633 TRACE_ITER_RAW_BIT = 4, 37634 TRACE_ITER_HEX_BIT = 5, 37635 TRACE_ITER_BIN_BIT = 6, 37636 TRACE_ITER_BLOCK_BIT = 7, 37637 TRACE_ITER_PRINTK_BIT = 8, 37638 TRACE_ITER_ANNOTATE_BIT = 9, 37639 TRACE_ITER_USERSTACKTRACE_BIT = 10, 37640 TRACE_ITER_SYM_USEROBJ_BIT = 11, 37641 TRACE_ITER_PRINTK_MSGONLY_BIT = 12, 37642 TRACE_ITER_CONTEXT_INFO_BIT = 13, 37643 TRACE_ITER_LATENCY_FMT_BIT = 14, 37644 TRACE_ITER_RECORD_CMD_BIT = 15, 37645 TRACE_ITER_RECORD_TGID_BIT = 16, 37646 TRACE_ITER_OVERWRITE_BIT = 17, 37647 TRACE_ITER_STOP_ON_FREE_BIT = 18, 37648 TRACE_ITER_IRQ_INFO_BIT = 19, 37649 TRACE_ITER_MARKERS_BIT = 20, 37650 TRACE_ITER_EVENT_FORK_BIT = 21, 37651 TRACE_ITER_PAUSE_ON_TRACE_BIT = 22, 37652 TRACE_ITER_FUNCTION_BIT = 23, 37653 TRACE_ITER_FUNC_FORK_BIT = 24, 37654 TRACE_ITER_DISPLAY_GRAPH_BIT = 25, 37655 TRACE_ITER_STACKTRACE_BIT = 26, 37656 TRACE_ITER_LAST_BIT = 27, 37657 }; 37658 37659 struct event_subsystem { 37660 struct list_head list; 37661 const char *name; 37662 struct event_filter *filter; 37663 int ref_count; 37664 }; 37665 37666 enum regex_type { 37667 MATCH_FULL = 0, 37668 MATCH_FRONT_ONLY = 1, 37669 MATCH_MIDDLE_ONLY = 2, 37670 MATCH_END_ONLY = 3, 37671 MATCH_GLOB = 4, 37672 MATCH_INDEX = 5, 37673 }; 37674 37675 struct tracer_stat { 37676 const char *name; 37677 void * (*stat_start)(struct tracer_stat *); 37678 void * (*stat_next)(void *, int); 37679 cmp_func_t stat_cmp; 37680 int (*stat_show)(struct seq_file *, void *); 37681 void (*stat_release)(void *); 37682 int (*stat_headers)(struct seq_file *); 37683 }; 37684 37685 enum { 37686 FTRACE_MODIFY_ENABLE_FL = 1, 37687 FTRACE_MODIFY_MAY_SLEEP_FL = 2, 37688 }; 37689 37690 struct ftrace_profile { 37691 struct hlist_node node; 37692 long unsigned int ip; 37693 long unsigned int counter; 37694 long long unsigned int time; 37695 long long unsigned int time_squared; 37696 }; 37697 37698 struct ftrace_profile_page { 37699 struct ftrace_profile_page *next; 37700 long unsigned int index; 37701 struct ftrace_profile records[0]; 37702 }; 37703 37704 struct ftrace_profile_stat { 37705 atomic_t disabled; 37706 struct hlist_head *hash; 37707 struct ftrace_profile_page *pages; 37708 struct ftrace_profile_page *start; 37709 struct tracer_stat stat; 37710 }; 37711 37712 struct ftrace_func_probe { 37713 struct ftrace_probe_ops *probe_ops; 37714 struct ftrace_ops ops; 37715 struct trace_array *tr; 37716 struct list_head list; 37717 void *data; 37718 int ref; 37719 }; 37720 37721 struct ftrace_page { 37722 struct ftrace_page *next; 37723 struct dyn_ftrace *records; 37724 int index; 37725 int size; 37726 }; 37727 37728 struct ftrace_rec_iter___2 { 37729 struct ftrace_page *pg; 37730 int index; 37731 }; 37732 37733 struct ftrace_iterator { 37734 loff_t pos; 37735 loff_t func_pos; 37736 loff_t mod_pos; 37737 struct ftrace_page *pg; 37738 struct dyn_ftrace *func; 37739 struct ftrace_func_probe *probe; 37740 struct ftrace_func_entry *probe_entry; 37741 struct trace_parser parser; 37742 struct ftrace_hash *hash; 37743 struct ftrace_ops *ops; 37744 struct trace_array *tr; 37745 struct list_head *mod_list; 37746 int pidx; 37747 int idx; 37748 unsigned int flags; 37749 }; 37750 37751 struct ftrace_glob { 37752 char *search; 37753 unsigned int len; 37754 int type; 37755 }; 37756 37757 struct ftrace_func_map { 37758 struct ftrace_func_entry entry; 37759 void *data; 37760 }; 37761 37762 struct ftrace_func_mapper { 37763 struct ftrace_hash hash; 37764 }; 37765 37766 struct ftrace_direct_func { 37767 struct list_head next; 37768 long unsigned int addr; 37769 int count; 37770 }; 37771 37772 enum graph_filter_type { 37773 GRAPH_FILTER_NOTRACE = 0, 37774 GRAPH_FILTER_FUNCTION = 1, 37775 }; 37776 37777 struct ftrace_graph_data { 37778 struct ftrace_hash *hash; 37779 struct ftrace_func_entry *entry; 37780 int idx; 37781 enum graph_filter_type type; 37782 struct ftrace_hash *new_hash; 37783 const struct seq_operations *seq_ops; 37784 struct trace_parser parser; 37785 }; 37786 37787 struct ftrace_mod_func { 37788 struct list_head list; 37789 char *name; 37790 long unsigned int ip; 37791 unsigned int size; 37792 }; 37793 37794 struct ftrace_mod_map { 37795 struct callback_head rcu; 37796 struct list_head list; 37797 struct module *mod; 37798 long unsigned int start_addr; 37799 long unsigned int end_addr; 37800 struct list_head funcs; 37801 unsigned int num_funcs; 37802 }; 37803 37804 struct ftrace_init_func { 37805 struct list_head list; 37806 long unsigned int ip; 37807 }; 37808 37809 enum ring_buffer_type { 37810 RINGBUF_TYPE_DATA_TYPE_LEN_MAX = 28, 37811 RINGBUF_TYPE_PADDING = 29, 37812 RINGBUF_TYPE_TIME_EXTEND = 30, 37813 RINGBUF_TYPE_TIME_STAMP = 31, 37814 }; 37815 37816 enum ring_buffer_flags { 37817 RB_FL_OVERWRITE = 1, 37818 }; 37819 37820 struct ring_buffer_per_cpu; 37821 37822 struct buffer_page; 37823 37824 struct ring_buffer_iter { 37825 struct ring_buffer_per_cpu *cpu_buffer; 37826 long unsigned int head; 37827 long unsigned int next_event; 37828 struct buffer_page *head_page; 37829 struct buffer_page *cache_reader_page; 37830 long unsigned int cache_read; 37831 u64 read_stamp; 37832 u64 page_stamp; 37833 struct ring_buffer_event *event; 37834 int missed_events; 37835 }; 37836 37837 struct rb_irq_work { 37838 struct irq_work work; 37839 wait_queue_head_t waiters; 37840 wait_queue_head_t full_waiters; 37841 bool waiters_pending; 37842 bool full_waiters_pending; 37843 bool wakeup_full; 37844 }; 37845 37846 struct trace_buffer___2 { 37847 unsigned int flags; 37848 int cpus; 37849 atomic_t record_disabled; 37850 cpumask_var_t cpumask; 37851 struct lock_class_key *reader_lock_key; 37852 struct mutex mutex; 37853 struct ring_buffer_per_cpu **buffers; 37854 struct hlist_node node; 37855 u64 (*clock)(); 37856 struct rb_irq_work irq_work; 37857 bool time_stamp_abs; 37858 }; 37859 37860 enum { 37861 RB_LEN_TIME_EXTEND = 8, 37862 RB_LEN_TIME_STAMP = 8, 37863 }; 37864 37865 struct buffer_data_page { 37866 u64 time_stamp; 37867 local_t commit; 37868 unsigned char data[0]; 37869 }; 37870 37871 struct buffer_page { 37872 struct list_head list; 37873 local_t write; 37874 unsigned int read; 37875 local_t entries; 37876 long unsigned int real_end; 37877 struct buffer_data_page *page; 37878 }; 37879 37880 struct rb_event_info { 37881 u64 ts; 37882 u64 delta; 37883 u64 before; 37884 u64 after; 37885 long unsigned int length; 37886 struct buffer_page *tail_page; 37887 int add_timestamp; 37888 }; 37889 37890 enum { 37891 RB_ADD_STAMP_NONE = 0, 37892 RB_ADD_STAMP_EXTEND = 2, 37893 RB_ADD_STAMP_ABSOLUTE = 4, 37894 RB_ADD_STAMP_FORCE = 8, 37895 }; 37896 37897 enum { 37898 RB_CTX_TRANSITION = 0, 37899 RB_CTX_NMI = 1, 37900 RB_CTX_IRQ = 2, 37901 RB_CTX_SOFTIRQ = 3, 37902 RB_CTX_NORMAL = 4, 37903 RB_CTX_MAX = 5, 37904 }; 37905 37906 struct rb_time_struct { 37907 local64_t time; 37908 }; 37909 37910 typedef struct rb_time_struct rb_time_t; 37911 37912 struct ring_buffer_per_cpu { 37913 int cpu; 37914 atomic_t record_disabled; 37915 atomic_t resize_disabled; 37916 struct trace_buffer___2 *buffer; 37917 raw_spinlock_t reader_lock; 37918 arch_spinlock_t lock; 37919 struct lock_class_key lock_key; 37920 struct buffer_data_page *free_page; 37921 long unsigned int nr_pages; 37922 unsigned int current_context; 37923 struct list_head *pages; 37924 struct buffer_page *head_page; 37925 struct buffer_page *tail_page; 37926 struct buffer_page *commit_page; 37927 struct buffer_page *reader_page; 37928 long unsigned int lost_events; 37929 long unsigned int last_overrun; 37930 long unsigned int nest; 37931 local_t entries_bytes; 37932 local_t entries; 37933 local_t overrun; 37934 local_t commit_overrun; 37935 local_t dropped_events; 37936 local_t committing; 37937 local_t commits; 37938 local_t pages_touched; 37939 local_t pages_read; 37940 long int last_pages_touch; 37941 size_t shortest_full; 37942 long unsigned int read; 37943 long unsigned int read_bytes; 37944 rb_time_t write_stamp; 37945 rb_time_t before_stamp; 37946 u64 read_stamp; 37947 long int nr_pages_to_update; 37948 struct list_head new_pages; 37949 struct work_struct update_pages_work; 37950 struct completion update_done; 37951 struct rb_irq_work irq_work; 37952 }; 37953 37954 typedef struct vfsmount * (*debugfs_automount_t)(struct dentry *, void *); 37955 37956 struct trace_export { 37957 struct trace_export *next; 37958 void (*write)(struct trace_export *, const void *, unsigned int); 37959 int flags; 37960 }; 37961 37962 enum fsnotify_data_type { 37963 FSNOTIFY_EVENT_NONE = 0, 37964 FSNOTIFY_EVENT_PATH = 1, 37965 FSNOTIFY_EVENT_INODE = 2, 37966 }; 37967 37968 enum trace_iter_flags { 37969 TRACE_FILE_LAT_FMT = 1, 37970 TRACE_FILE_ANNOTATE = 2, 37971 TRACE_FILE_TIME_IN_NS = 4, 37972 }; 37973 37974 enum trace_type { 37975 __TRACE_FIRST_TYPE = 0, 37976 TRACE_FN = 1, 37977 TRACE_CTX = 2, 37978 TRACE_WAKE = 3, 37979 TRACE_STACK = 4, 37980 TRACE_PRINT = 5, 37981 TRACE_BPRINT = 6, 37982 TRACE_MMIO_RW = 7, 37983 TRACE_MMIO_MAP = 8, 37984 TRACE_BRANCH = 9, 37985 TRACE_GRAPH_RET = 10, 37986 TRACE_GRAPH_ENT = 11, 37987 TRACE_USER_STACK = 12, 37988 TRACE_BLK = 13, 37989 TRACE_BPUTS = 14, 37990 TRACE_HWLAT = 15, 37991 TRACE_RAW_DATA = 16, 37992 __TRACE_LAST_TYPE = 17, 37993 }; 37994 37995 struct ftrace_entry { 37996 struct trace_entry ent; 37997 long unsigned int ip; 37998 long unsigned int parent_ip; 37999 }; 38000 38001 struct stack_entry { 38002 struct trace_entry ent; 38003 int size; 38004 long unsigned int caller[8]; 38005 }; 38006 38007 struct userstack_entry { 38008 struct trace_entry ent; 38009 unsigned int tgid; 38010 long unsigned int caller[8]; 38011 }; 38012 38013 struct bprint_entry { 38014 struct trace_entry ent; 38015 long unsigned int ip; 38016 const char *fmt; 38017 u32 buf[0]; 38018 }; 38019 38020 struct print_entry { 38021 struct trace_entry ent; 38022 long unsigned int ip; 38023 char buf[0]; 38024 }; 38025 38026 struct raw_data_entry { 38027 struct trace_entry ent; 38028 unsigned int id; 38029 char buf[0]; 38030 }; 38031 38032 struct bputs_entry { 38033 struct trace_entry ent; 38034 long unsigned int ip; 38035 const char *str; 38036 }; 38037 38038 enum trace_flag_type { 38039 TRACE_FLAG_IRQS_OFF = 1, 38040 TRACE_FLAG_IRQS_NOSUPPORT = 2, 38041 TRACE_FLAG_NEED_RESCHED = 4, 38042 TRACE_FLAG_HARDIRQ = 8, 38043 TRACE_FLAG_SOFTIRQ = 16, 38044 TRACE_FLAG_PREEMPT_RESCHED = 32, 38045 TRACE_FLAG_NMI = 64, 38046 }; 38047 38048 enum trace_iterator_flags { 38049 TRACE_ITER_PRINT_PARENT = 1, 38050 TRACE_ITER_SYM_OFFSET = 2, 38051 TRACE_ITER_SYM_ADDR = 4, 38052 TRACE_ITER_VERBOSE = 8, 38053 TRACE_ITER_RAW = 16, 38054 TRACE_ITER_HEX = 32, 38055 TRACE_ITER_BIN = 64, 38056 TRACE_ITER_BLOCK = 128, 38057 TRACE_ITER_PRINTK = 256, 38058 TRACE_ITER_ANNOTATE = 512, 38059 TRACE_ITER_USERSTACKTRACE = 1024, 38060 TRACE_ITER_SYM_USEROBJ = 2048, 38061 TRACE_ITER_PRINTK_MSGONLY = 4096, 38062 TRACE_ITER_CONTEXT_INFO = 8192, 38063 TRACE_ITER_LATENCY_FMT = 16384, 38064 TRACE_ITER_RECORD_CMD = 32768, 38065 TRACE_ITER_RECORD_TGID = 65536, 38066 TRACE_ITER_OVERWRITE = 131072, 38067 TRACE_ITER_STOP_ON_FREE = 262144, 38068 TRACE_ITER_IRQ_INFO = 524288, 38069 TRACE_ITER_MARKERS = 1048576, 38070 TRACE_ITER_EVENT_FORK = 2097152, 38071 TRACE_ITER_PAUSE_ON_TRACE = 4194304, 38072 TRACE_ITER_FUNCTION = 8388608, 38073 TRACE_ITER_FUNC_FORK = 16777216, 38074 TRACE_ITER_DISPLAY_GRAPH = 33554432, 38075 TRACE_ITER_STACKTRACE = 67108864, 38076 }; 38077 38078 struct trace_eval_map_head { 38079 struct module *mod; 38080 long unsigned int length; 38081 }; 38082 38083 union trace_eval_map_item; 38084 38085 struct trace_eval_map_tail { 38086 union trace_eval_map_item *next; 38087 const char *end; 38088 }; 38089 38090 union trace_eval_map_item { 38091 struct trace_eval_map map; 38092 struct trace_eval_map_head head; 38093 struct trace_eval_map_tail tail; 38094 }; 38095 38096 struct saved_cmdlines_buffer { 38097 unsigned int map_pid_to_cmdline[32769]; 38098 unsigned int *map_cmdline_to_pid; 38099 unsigned int cmdline_num; 38100 int cmdline_idx; 38101 char *saved_cmdlines; 38102 }; 38103 38104 struct ftrace_stack { 38105 long unsigned int calls[1024]; 38106 }; 38107 38108 struct ftrace_stacks { 38109 struct ftrace_stack stacks[4]; 38110 }; 38111 38112 struct trace_buffer_struct { 38113 int nesting; 38114 char buffer[4096]; 38115 }; 38116 38117 struct ftrace_buffer_info { 38118 struct trace_iterator iter; 38119 void *spare; 38120 unsigned int spare_cpu; 38121 unsigned int read; 38122 }; 38123 38124 struct err_info { 38125 const char **errs; 38126 u8 type; 38127 u8 pos; 38128 u64 ts; 38129 }; 38130 38131 struct tracing_log_err { 38132 struct list_head list; 38133 struct err_info info; 38134 char loc[128]; 38135 char cmd[256]; 38136 }; 38137 38138 struct buffer_ref { 38139 struct trace_buffer *buffer; 38140 void *page; 38141 int cpu; 38142 refcount_t refcount; 38143 }; 38144 38145 struct ftrace_func_mapper___2; 38146 38147 struct ctx_switch_entry { 38148 struct trace_entry ent; 38149 unsigned int prev_pid; 38150 unsigned int next_pid; 38151 unsigned int next_cpu; 38152 unsigned char prev_prio; 38153 unsigned char prev_state; 38154 unsigned char next_prio; 38155 unsigned char next_state; 38156 }; 38157 38158 struct hwlat_entry { 38159 struct trace_entry ent; 38160 u64 duration; 38161 u64 outer_duration; 38162 u64 nmi_total_ts; 38163 struct timespec64 timestamp; 38164 unsigned int nmi_count; 38165 unsigned int seqnum; 38166 unsigned int count; 38167 }; 38168 38169 struct trace_mark { 38170 long long unsigned int val; 38171 char sym; 38172 }; 38173 38174 struct stat_node { 38175 struct rb_node node; 38176 void *stat; 38177 }; 38178 38179 struct stat_session { 38180 struct list_head session_list; 38181 struct tracer_stat *ts; 38182 struct rb_root stat_root; 38183 struct mutex stat_mutex; 38184 struct dentry *file; 38185 }; 38186 38187 struct trace_bprintk_fmt { 38188 struct list_head list; 38189 const char *fmt; 38190 }; 38191 38192 typedef int (*tracing_map_cmp_fn_t)(void *, void *); 38193 38194 struct tracing_map_field { 38195 tracing_map_cmp_fn_t cmp_fn; 38196 union { 38197 atomic64_t sum; 38198 unsigned int offset; 38199 }; 38200 }; 38201 38202 struct tracing_map; 38203 38204 struct tracing_map_elt { 38205 struct tracing_map *map; 38206 struct tracing_map_field *fields; 38207 atomic64_t *vars; 38208 bool *var_set; 38209 void *key; 38210 void *private_data; 38211 }; 38212 38213 struct tracing_map_sort_key { 38214 unsigned int field_idx; 38215 bool descending; 38216 }; 38217 38218 struct tracing_map_array; 38219 38220 struct tracing_map_ops; 38221 38222 struct tracing_map { 38223 unsigned int key_size; 38224 unsigned int map_bits; 38225 unsigned int map_size; 38226 unsigned int max_elts; 38227 atomic_t next_elt; 38228 struct tracing_map_array *elts; 38229 struct tracing_map_array *map; 38230 const struct tracing_map_ops *ops; 38231 void *private_data; 38232 struct tracing_map_field fields[6]; 38233 unsigned int n_fields; 38234 int key_idx[3]; 38235 unsigned int n_keys; 38236 struct tracing_map_sort_key sort_key; 38237 unsigned int n_vars; 38238 atomic64_t hits; 38239 atomic64_t drops; 38240 }; 38241 38242 struct tracing_map_entry { 38243 u32 key; 38244 struct tracing_map_elt *val; 38245 }; 38246 38247 struct tracing_map_sort_entry { 38248 void *key; 38249 struct tracing_map_elt *elt; 38250 bool elt_copied; 38251 bool dup; 38252 }; 38253 38254 struct tracing_map_array { 38255 unsigned int entries_per_page; 38256 unsigned int entry_size_shift; 38257 unsigned int entry_shift; 38258 unsigned int entry_mask; 38259 unsigned int n_pages; 38260 void **pages; 38261 }; 38262 38263 struct tracing_map_ops { 38264 int (*elt_alloc)(struct tracing_map_elt *); 38265 void (*elt_free)(struct tracing_map_elt *); 38266 void (*elt_clear)(struct tracing_map_elt *); 38267 void (*elt_init)(struct tracing_map_elt *); 38268 }; 38269 38270 enum { 38271 TRACE_FUNC_OPT_STACK = 1, 38272 }; 38273 38274 struct hwlat_sample { 38275 u64 seqnum; 38276 u64 duration; 38277 u64 outer_duration; 38278 u64 nmi_total_ts; 38279 struct timespec64 timestamp; 38280 int nmi_count; 38281 int count; 38282 }; 38283 38284 struct hwlat_data { 38285 struct mutex lock; 38286 u64 count; 38287 u64 sample_window; 38288 u64 sample_width; 38289 }; 38290 38291 enum { 38292 TRACE_NOP_OPT_ACCEPT = 1, 38293 TRACE_NOP_OPT_REFUSE = 2, 38294 }; 38295 38296 struct trace_mmiotrace_rw { 38297 struct trace_entry ent; 38298 struct mmiotrace_rw rw; 38299 }; 38300 38301 struct trace_mmiotrace_map { 38302 struct trace_entry ent; 38303 struct mmiotrace_map map; 38304 }; 38305 38306 struct header_iter { 38307 struct pci_dev *dev; 38308 }; 38309 38310 struct ftrace_graph_ent_entry { 38311 struct trace_entry ent; 38312 struct ftrace_graph_ent graph_ent; 38313 } __attribute__((packed)); 38314 38315 struct ftrace_graph_ret_entry { 38316 struct trace_entry ent; 38317 struct ftrace_graph_ret ret; 38318 }; 38319 38320 struct fgraph_cpu_data { 38321 pid_t last_pid; 38322 int depth; 38323 int depth_irq; 38324 int ignore; 38325 long unsigned int enter_funcs[50]; 38326 }; 38327 38328 struct fgraph_data { 38329 struct fgraph_cpu_data *cpu_data; 38330 struct ftrace_graph_ent_entry ent; 38331 struct ftrace_graph_ret_entry ret; 38332 int failed; 38333 int cpu; 38334 int: 32; 38335 } __attribute__((packed)); 38336 38337 enum { 38338 FLAGS_FILL_FULL = 268435456, 38339 FLAGS_FILL_START = 536870912, 38340 FLAGS_FILL_END = 805306368, 38341 }; 38342 38343 struct disk_stats { 38344 u64 nsecs[4]; 38345 long unsigned int sectors[4]; 38346 long unsigned int ios[4]; 38347 long unsigned int merges[4]; 38348 long unsigned int io_ticks; 38349 local_t in_flight[2]; 38350 }; 38351 38352 struct blk_crypto_key; 38353 38354 struct bio_crypt_ctx { 38355 const struct blk_crypto_key *bc_key; 38356 u64 bc_dun[4]; 38357 }; 38358 38359 typedef __u32 blk_mq_req_flags_t; 38360 38361 struct blk_mq_ctxs; 38362 38363 struct blk_mq_ctx { 38364 struct { 38365 spinlock_t lock; 38366 struct list_head rq_lists[3]; 38367 long: 64; 38368 }; 38369 unsigned int cpu; 38370 short unsigned int index_hw[3]; 38371 struct blk_mq_hw_ctx *hctxs[3]; 38372 long unsigned int rq_dispatched[2]; 38373 long unsigned int rq_merged; 38374 long unsigned int rq_completed[2]; 38375 struct request_queue *queue; 38376 struct blk_mq_ctxs *ctxs; 38377 struct kobject kobj; 38378 long: 64; 38379 long: 64; 38380 long: 64; 38381 long: 64; 38382 }; 38383 38384 struct sbitmap_word; 38385 38386 struct sbitmap { 38387 unsigned int depth; 38388 unsigned int shift; 38389 unsigned int map_nr; 38390 struct sbitmap_word *map; 38391 }; 38392 38393 struct blk_mq_tags; 38394 38395 struct blk_mq_hw_ctx { 38396 struct { 38397 spinlock_t lock; 38398 struct list_head dispatch; 38399 long unsigned int state; 38400 long: 64; 38401 long: 64; 38402 long: 64; 38403 long: 64; 38404 }; 38405 struct delayed_work run_work; 38406 cpumask_var_t cpumask; 38407 int next_cpu; 38408 int next_cpu_batch; 38409 long unsigned int flags; 38410 void *sched_data; 38411 struct request_queue *queue; 38412 struct blk_flush_queue *fq; 38413 void *driver_data; 38414 struct sbitmap ctx_map; 38415 struct blk_mq_ctx *dispatch_from; 38416 unsigned int dispatch_busy; 38417 short unsigned int type; 38418 short unsigned int nr_ctx; 38419 struct blk_mq_ctx **ctxs; 38420 spinlock_t dispatch_wait_lock; 38421 wait_queue_entry_t dispatch_wait; 38422 atomic_t wait_index; 38423 struct blk_mq_tags *tags; 38424 struct blk_mq_tags *sched_tags; 38425 long unsigned int queued; 38426 long unsigned int run; 38427 long unsigned int dispatched[7]; 38428 unsigned int numa_node; 38429 unsigned int queue_num; 38430 atomic_t nr_active; 38431 atomic_t elevator_queued; 38432 struct hlist_node cpuhp_online; 38433 struct hlist_node cpuhp_dead; 38434 struct kobject kobj; 38435 long unsigned int poll_considered; 38436 long unsigned int poll_invoked; 38437 long unsigned int poll_success; 38438 struct dentry *debugfs_dir; 38439 struct dentry *sched_debugfs_dir; 38440 struct list_head hctx_list; 38441 struct srcu_struct srcu[0]; 38442 long: 64; 38443 }; 38444 38445 struct blk_mq_alloc_data { 38446 struct request_queue *q; 38447 blk_mq_req_flags_t flags; 38448 unsigned int shallow_depth; 38449 unsigned int cmd_flags; 38450 struct blk_mq_ctx *ctx; 38451 struct blk_mq_hw_ctx *hctx; 38452 }; 38453 38454 struct blk_stat_callback { 38455 struct list_head list; 38456 struct timer_list timer; 38457 struct blk_rq_stat *cpu_stat; 38458 int (*bucket_fn)(const struct request *); 38459 unsigned int buckets; 38460 struct blk_rq_stat *stat; 38461 void (*timer_fn)(struct blk_stat_callback *); 38462 void *data; 38463 struct callback_head rcu; 38464 }; 38465 38466 struct blk_trace { 38467 int trace_state; 38468 struct rchan *rchan; 38469 long unsigned int *sequence; 38470 unsigned char *msg_data; 38471 u16 act_mask; 38472 u64 start_lba; 38473 u64 end_lba; 38474 u32 pid; 38475 u32 dev; 38476 struct dentry *dir; 38477 struct dentry *dropped_file; 38478 struct dentry *msg_file; 38479 struct list_head running_list; 38480 atomic_t dropped; 38481 }; 38482 38483 struct blk_flush_queue { 38484 unsigned int flush_pending_idx: 1; 38485 unsigned int flush_running_idx: 1; 38486 blk_status_t rq_status; 38487 long unsigned int flush_pending_since; 38488 struct list_head flush_queue[2]; 38489 struct list_head flush_data_in_flight; 38490 struct request *flush_rq; 38491 spinlock_t mq_flush_lock; 38492 }; 38493 38494 struct blk_mq_queue_map { 38495 unsigned int *mq_map; 38496 unsigned int nr_queues; 38497 unsigned int queue_offset; 38498 }; 38499 38500 struct sbq_wait_state; 38501 38502 struct sbitmap_queue { 38503 struct sbitmap sb; 38504 unsigned int *alloc_hint; 38505 unsigned int wake_batch; 38506 atomic_t wake_index; 38507 struct sbq_wait_state *ws; 38508 atomic_t ws_active; 38509 bool round_robin; 38510 unsigned int min_shallow_depth; 38511 }; 38512 38513 struct blk_mq_tag_set { 38514 struct blk_mq_queue_map map[3]; 38515 unsigned int nr_maps; 38516 const struct blk_mq_ops *ops; 38517 unsigned int nr_hw_queues; 38518 unsigned int queue_depth; 38519 unsigned int reserved_tags; 38520 unsigned int cmd_size; 38521 int numa_node; 38522 unsigned int timeout; 38523 unsigned int flags; 38524 void *driver_data; 38525 atomic_t active_queues_shared_sbitmap; 38526 struct sbitmap_queue __bitmap_tags; 38527 struct sbitmap_queue __breserved_tags; 38528 struct blk_mq_tags **tags; 38529 struct mutex tag_list_lock; 38530 struct list_head tag_list; 38531 }; 38532 38533 typedef u64 compat_u64; 38534 38535 enum blktrace_cat { 38536 BLK_TC_READ = 1, 38537 BLK_TC_WRITE = 2, 38538 BLK_TC_FLUSH = 4, 38539 BLK_TC_SYNC = 8, 38540 BLK_TC_SYNCIO = 8, 38541 BLK_TC_QUEUE = 16, 38542 BLK_TC_REQUEUE = 32, 38543 BLK_TC_ISSUE = 64, 38544 BLK_TC_COMPLETE = 128, 38545 BLK_TC_FS = 256, 38546 BLK_TC_PC = 512, 38547 BLK_TC_NOTIFY = 1024, 38548 BLK_TC_AHEAD = 2048, 38549 BLK_TC_META = 4096, 38550 BLK_TC_DISCARD = 8192, 38551 BLK_TC_DRV_DATA = 16384, 38552 BLK_TC_FUA = 32768, 38553 BLK_TC_END = 32768, 38554 }; 38555 38556 enum blktrace_act { 38557 __BLK_TA_QUEUE = 1, 38558 __BLK_TA_BACKMERGE = 2, 38559 __BLK_TA_FRONTMERGE = 3, 38560 __BLK_TA_GETRQ = 4, 38561 __BLK_TA_SLEEPRQ = 5, 38562 __BLK_TA_REQUEUE = 6, 38563 __BLK_TA_ISSUE = 7, 38564 __BLK_TA_COMPLETE = 8, 38565 __BLK_TA_PLUG = 9, 38566 __BLK_TA_UNPLUG_IO = 10, 38567 __BLK_TA_UNPLUG_TIMER = 11, 38568 __BLK_TA_INSERT = 12, 38569 __BLK_TA_SPLIT = 13, 38570 __BLK_TA_BOUNCE = 14, 38571 __BLK_TA_REMAP = 15, 38572 __BLK_TA_ABORT = 16, 38573 __BLK_TA_DRV_DATA = 17, 38574 __BLK_TA_CGROUP = 256, 38575 }; 38576 38577 enum blktrace_notify { 38578 __BLK_TN_PROCESS = 0, 38579 __BLK_TN_TIMESTAMP = 1, 38580 __BLK_TN_MESSAGE = 2, 38581 __BLK_TN_CGROUP = 256, 38582 }; 38583 38584 struct blk_io_trace { 38585 __u32 magic; 38586 __u32 sequence; 38587 __u64 time; 38588 __u64 sector; 38589 __u32 bytes; 38590 __u32 action; 38591 __u32 pid; 38592 __u32 device; 38593 __u32 cpu; 38594 __u16 error; 38595 __u16 pdu_len; 38596 }; 38597 38598 struct blk_io_trace_remap { 38599 __be32 device_from; 38600 __be32 device_to; 38601 __be64 sector_from; 38602 }; 38603 38604 enum { 38605 Blktrace_setup = 1, 38606 Blktrace_running = 2, 38607 Blktrace_stopped = 3, 38608 }; 38609 38610 struct blk_user_trace_setup { 38611 char name[32]; 38612 __u16 act_mask; 38613 __u32 buf_size; 38614 __u32 buf_nr; 38615 __u64 start_lba; 38616 __u64 end_lba; 38617 __u32 pid; 38618 }; 38619 38620 struct compat_blk_user_trace_setup { 38621 char name[32]; 38622 u16 act_mask; 38623 short: 16; 38624 u32 buf_size; 38625 u32 buf_nr; 38626 compat_u64 start_lba; 38627 compat_u64 end_lba; 38628 u32 pid; 38629 } __attribute__((packed)); 38630 38631 struct sbitmap_word { 38632 long unsigned int depth; 38633 long: 64; 38634 long: 64; 38635 long: 64; 38636 long: 64; 38637 long: 64; 38638 long: 64; 38639 long: 64; 38640 long unsigned int word; 38641 long: 64; 38642 long: 64; 38643 long: 64; 38644 long: 64; 38645 long: 64; 38646 long: 64; 38647 long: 64; 38648 long unsigned int cleared; 38649 long: 64; 38650 long: 64; 38651 long: 64; 38652 long: 64; 38653 long: 64; 38654 long: 64; 38655 long: 64; 38656 }; 38657 38658 struct sbq_wait_state { 38659 atomic_t wait_cnt; 38660 wait_queue_head_t wait; 38661 long: 64; 38662 long: 64; 38663 long: 64; 38664 long: 64; 38665 }; 38666 38667 struct blk_mq_tags { 38668 unsigned int nr_tags; 38669 unsigned int nr_reserved_tags; 38670 atomic_t active_queues; 38671 struct sbitmap_queue *bitmap_tags; 38672 struct sbitmap_queue *breserved_tags; 38673 struct sbitmap_queue __bitmap_tags; 38674 struct sbitmap_queue __breserved_tags; 38675 struct request **rqs; 38676 struct request **static_rqs; 38677 struct list_head page_list; 38678 }; 38679 38680 struct blk_mq_queue_data { 38681 struct request *rq; 38682 bool last; 38683 }; 38684 38685 enum blk_crypto_mode_num { 38686 BLK_ENCRYPTION_MODE_INVALID = 0, 38687 BLK_ENCRYPTION_MODE_AES_256_XTS = 1, 38688 BLK_ENCRYPTION_MODE_AES_128_CBC_ESSIV = 2, 38689 BLK_ENCRYPTION_MODE_ADIANTUM = 3, 38690 BLK_ENCRYPTION_MODE_MAX = 4, 38691 }; 38692 38693 struct blk_crypto_config { 38694 enum blk_crypto_mode_num crypto_mode; 38695 unsigned int data_unit_size; 38696 unsigned int dun_bytes; 38697 }; 38698 38699 struct blk_crypto_key { 38700 struct blk_crypto_config crypto_cfg; 38701 unsigned int data_unit_size_bits; 38702 unsigned int size; 38703 u8 raw[64]; 38704 }; 38705 38706 struct blk_mq_ctxs { 38707 struct kobject kobj; 38708 struct blk_mq_ctx *queue_ctx; 38709 }; 38710 38711 typedef void blk_log_action_t(struct trace_iterator *, const char *, bool); 38712 38713 struct ftrace_event_field { 38714 struct list_head link; 38715 const char *name; 38716 const char *type; 38717 int filter_type; 38718 int offset; 38719 int size; 38720 int is_signed; 38721 }; 38722 38723 enum { 38724 FORMAT_HEADER = 1, 38725 FORMAT_FIELD_SEPERATOR = 2, 38726 FORMAT_PRINTFMT = 3, 38727 }; 38728 38729 struct event_probe_data { 38730 struct trace_event_file *file; 38731 long unsigned int count; 38732 int ref; 38733 bool enable; 38734 }; 38735 38736 struct syscall_trace_enter { 38737 struct trace_entry ent; 38738 int nr; 38739 long unsigned int args[0]; 38740 }; 38741 38742 struct syscall_trace_exit { 38743 struct trace_entry ent; 38744 int nr; 38745 long int ret; 38746 }; 38747 38748 struct syscall_tp_t { 38749 long long unsigned int regs; 38750 long unsigned int syscall_nr; 38751 long unsigned int ret; 38752 }; 38753 38754 struct syscall_tp_t___2 { 38755 long long unsigned int regs; 38756 long unsigned int syscall_nr; 38757 long unsigned int args[6]; 38758 }; 38759 38760 typedef long unsigned int perf_trace_t[256]; 38761 38762 struct filter_pred; 38763 38764 struct prog_entry { 38765 int target; 38766 int when_to_branch; 38767 struct filter_pred *pred; 38768 }; 38769 38770 typedef int (*filter_pred_fn_t)(struct filter_pred *, void *); 38771 38772 struct regex; 38773 38774 typedef int (*regex_match_func)(char *, struct regex *, int); 38775 38776 struct regex { 38777 char pattern[256]; 38778 int len; 38779 int field_len; 38780 regex_match_func match; 38781 }; 38782 38783 struct filter_pred { 38784 filter_pred_fn_t fn; 38785 u64 val; 38786 struct regex regex; 38787 short unsigned int *ops; 38788 struct ftrace_event_field *field; 38789 int offset; 38790 int not; 38791 int op; 38792 }; 38793 38794 enum filter_op_ids { 38795 OP_GLOB = 0, 38796 OP_NE = 1, 38797 OP_EQ = 2, 38798 OP_LE = 3, 38799 OP_LT = 4, 38800 OP_GE = 5, 38801 OP_GT = 6, 38802 OP_BAND = 7, 38803 OP_MAX = 8, 38804 }; 38805 38806 enum { 38807 FILT_ERR_NONE = 0, 38808 FILT_ERR_INVALID_OP = 1, 38809 FILT_ERR_TOO_MANY_OPEN = 2, 38810 FILT_ERR_TOO_MANY_CLOSE = 3, 38811 FILT_ERR_MISSING_QUOTE = 4, 38812 FILT_ERR_OPERAND_TOO_LONG = 5, 38813 FILT_ERR_EXPECT_STRING = 6, 38814 FILT_ERR_EXPECT_DIGIT = 7, 38815 FILT_ERR_ILLEGAL_FIELD_OP = 8, 38816 FILT_ERR_FIELD_NOT_FOUND = 9, 38817 FILT_ERR_ILLEGAL_INTVAL = 10, 38818 FILT_ERR_BAD_SUBSYS_FILTER = 11, 38819 FILT_ERR_TOO_MANY_PREDS = 12, 38820 FILT_ERR_INVALID_FILTER = 13, 38821 FILT_ERR_IP_FIELD_ONLY = 14, 38822 FILT_ERR_INVALID_VALUE = 15, 38823 FILT_ERR_ERRNO = 16, 38824 FILT_ERR_NO_FILTER = 17, 38825 }; 38826 38827 struct filter_parse_error { 38828 int lasterr; 38829 int lasterr_pos; 38830 }; 38831 38832 typedef int (*parse_pred_fn)(const char *, void *, int, struct filter_parse_error *, struct filter_pred **); 38833 38834 enum { 38835 INVERT = 1, 38836 PROCESS_AND = 2, 38837 PROCESS_OR = 4, 38838 }; 38839 38840 enum { 38841 TOO_MANY_CLOSE = 4294967295, 38842 TOO_MANY_OPEN = 4294967294, 38843 MISSING_QUOTE = 4294967293, 38844 }; 38845 38846 struct filter_list { 38847 struct list_head list; 38848 struct event_filter *filter; 38849 }; 38850 38851 struct function_filter_data { 38852 struct ftrace_ops *ops; 38853 int first_filter; 38854 int first_notrace; 38855 }; 38856 38857 struct event_trigger_ops; 38858 38859 struct event_command; 38860 38861 struct event_trigger_data { 38862 long unsigned int count; 38863 int ref; 38864 struct event_trigger_ops *ops; 38865 struct event_command *cmd_ops; 38866 struct event_filter *filter; 38867 char *filter_str; 38868 void *private_data; 38869 bool paused; 38870 bool paused_tmp; 38871 struct list_head list; 38872 char *name; 38873 struct list_head named_list; 38874 struct event_trigger_data *named_data; 38875 }; 38876 38877 struct event_trigger_ops { 38878 void (*func)(struct event_trigger_data *, void *, struct ring_buffer_event *); 38879 int (*init)(struct event_trigger_ops *, struct event_trigger_data *); 38880 void (*free)(struct event_trigger_ops *, struct event_trigger_data *); 38881 int (*print)(struct seq_file *, struct event_trigger_ops *, struct event_trigger_data *); 38882 }; 38883 38884 struct event_command { 38885 struct list_head list; 38886 char *name; 38887 enum event_trigger_type trigger_type; 38888 int flags; 38889 int (*func)(struct event_command *, struct trace_event_file *, char *, char *, char *); 38890 int (*reg)(char *, struct event_trigger_ops *, struct event_trigger_data *, struct trace_event_file *); 38891 void (*unreg)(char *, struct event_trigger_ops *, struct event_trigger_data *, struct trace_event_file *); 38892 void (*unreg_all)(struct trace_event_file *); 38893 int (*set_filter)(char *, struct event_trigger_data *, struct trace_event_file *); 38894 struct event_trigger_ops * (*get_trigger_ops)(char *, char *); 38895 }; 38896 38897 struct enable_trigger_data { 38898 struct trace_event_file *file; 38899 bool enable; 38900 bool hist; 38901 }; 38902 38903 enum event_command_flags { 38904 EVENT_CMD_FL_POST_TRIGGER = 1, 38905 EVENT_CMD_FL_NEEDS_REC = 2, 38906 }; 38907 38908 enum dynevent_type { 38909 DYNEVENT_TYPE_SYNTH = 1, 38910 DYNEVENT_TYPE_KPROBE = 2, 38911 DYNEVENT_TYPE_NONE = 3, 38912 }; 38913 38914 struct dynevent_cmd; 38915 38916 typedef int (*dynevent_create_fn_t)(struct dynevent_cmd *); 38917 38918 struct dynevent_cmd { 38919 struct seq_buf seq; 38920 const char *event_name; 38921 unsigned int n_fields; 38922 enum dynevent_type type; 38923 dynevent_create_fn_t run_command; 38924 void *private_data; 38925 }; 38926 38927 struct synth_field_desc { 38928 const char *type; 38929 const char *name; 38930 }; 38931 38932 struct synth_trace_event; 38933 38934 struct synth_event; 38935 38936 struct synth_event_trace_state { 38937 struct trace_event_buffer fbuffer; 38938 struct synth_trace_event *entry; 38939 struct trace_buffer *buffer; 38940 struct synth_event *event; 38941 unsigned int cur_field; 38942 unsigned int n_u64; 38943 bool disabled; 38944 bool add_next; 38945 bool add_name; 38946 }; 38947 38948 struct synth_trace_event { 38949 struct trace_entry ent; 38950 u64 fields[0]; 38951 }; 38952 38953 struct dyn_event_operations; 38954 38955 struct dyn_event { 38956 struct list_head list; 38957 struct dyn_event_operations *ops; 38958 }; 38959 38960 struct synth_field; 38961 38962 struct synth_event { 38963 struct dyn_event devent; 38964 int ref; 38965 char *name; 38966 struct synth_field **fields; 38967 unsigned int n_fields; 38968 struct synth_field **dynamic_fields; 38969 unsigned int n_dynamic_fields; 38970 unsigned int n_u64; 38971 struct trace_event_class class; 38972 struct trace_event_call call; 38973 struct tracepoint *tp; 38974 struct module *mod; 38975 }; 38976 38977 struct dyn_event_operations { 38978 struct list_head list; 38979 int (*create)(int, const char **); 38980 int (*show)(struct seq_file *, struct dyn_event *); 38981 bool (*is_busy)(struct dyn_event *); 38982 int (*free)(struct dyn_event *); 38983 bool (*match)(const char *, const char *, int, const char **, struct dyn_event *); 38984 }; 38985 38986 typedef int (*dynevent_check_arg_fn_t)(void *); 38987 38988 struct dynevent_arg { 38989 const char *str; 38990 char separator; 38991 }; 38992 38993 struct dynevent_arg_pair { 38994 const char *lhs; 38995 const char *rhs; 38996 char operator; 38997 char separator; 38998 }; 38999 39000 struct synth_field { 39001 char *type; 39002 char *name; 39003 size_t size; 39004 unsigned int offset; 39005 bool is_signed; 39006 bool is_string; 39007 bool is_dynamic; 39008 bool field_pos; 39009 }; 39010 39011 enum { 39012 SYNTH_ERR_BAD_NAME = 0, 39013 SYNTH_ERR_CMD_INCOMPLETE = 1, 39014 SYNTH_ERR_EVENT_EXISTS = 2, 39015 SYNTH_ERR_TOO_MANY_FIELDS = 3, 39016 SYNTH_ERR_INCOMPLETE_TYPE = 4, 39017 SYNTH_ERR_INVALID_TYPE = 5, 39018 SYNTH_ERR_INVALID_FIELD = 6, 39019 SYNTH_ERR_CMD_TOO_LONG = 7, 39020 }; 39021 39022 enum { 39023 HIST_ERR_NONE = 0, 39024 HIST_ERR_DUPLICATE_VAR = 1, 39025 HIST_ERR_VAR_NOT_UNIQUE = 2, 39026 HIST_ERR_TOO_MANY_VARS = 3, 39027 HIST_ERR_MALFORMED_ASSIGNMENT = 4, 39028 HIST_ERR_NAMED_MISMATCH = 5, 39029 HIST_ERR_TRIGGER_EEXIST = 6, 39030 HIST_ERR_TRIGGER_ENOENT_CLEAR = 7, 39031 HIST_ERR_SET_CLOCK_FAIL = 8, 39032 HIST_ERR_BAD_FIELD_MODIFIER = 9, 39033 HIST_ERR_TOO_MANY_SUBEXPR = 10, 39034 HIST_ERR_TIMESTAMP_MISMATCH = 11, 39035 HIST_ERR_TOO_MANY_FIELD_VARS = 12, 39036 HIST_ERR_EVENT_FILE_NOT_FOUND = 13, 39037 HIST_ERR_HIST_NOT_FOUND = 14, 39038 HIST_ERR_HIST_CREATE_FAIL = 15, 39039 HIST_ERR_SYNTH_VAR_NOT_FOUND = 16, 39040 HIST_ERR_SYNTH_EVENT_NOT_FOUND = 17, 39041 HIST_ERR_SYNTH_TYPE_MISMATCH = 18, 39042 HIST_ERR_SYNTH_COUNT_MISMATCH = 19, 39043 HIST_ERR_FIELD_VAR_PARSE_FAIL = 20, 39044 HIST_ERR_VAR_CREATE_FIND_FAIL = 21, 39045 HIST_ERR_ONX_NOT_VAR = 22, 39046 HIST_ERR_ONX_VAR_NOT_FOUND = 23, 39047 HIST_ERR_ONX_VAR_CREATE_FAIL = 24, 39048 HIST_ERR_FIELD_VAR_CREATE_FAIL = 25, 39049 HIST_ERR_TOO_MANY_PARAMS = 26, 39050 HIST_ERR_PARAM_NOT_FOUND = 27, 39051 HIST_ERR_INVALID_PARAM = 28, 39052 HIST_ERR_ACTION_NOT_FOUND = 29, 39053 HIST_ERR_NO_SAVE_PARAMS = 30, 39054 HIST_ERR_TOO_MANY_SAVE_ACTIONS = 31, 39055 HIST_ERR_ACTION_MISMATCH = 32, 39056 HIST_ERR_NO_CLOSING_PAREN = 33, 39057 HIST_ERR_SUBSYS_NOT_FOUND = 34, 39058 HIST_ERR_INVALID_SUBSYS_EVENT = 35, 39059 HIST_ERR_INVALID_REF_KEY = 36, 39060 HIST_ERR_VAR_NOT_FOUND = 37, 39061 HIST_ERR_FIELD_NOT_FOUND = 38, 39062 HIST_ERR_EMPTY_ASSIGNMENT = 39, 39063 HIST_ERR_INVALID_SORT_MODIFIER = 40, 39064 HIST_ERR_EMPTY_SORT_FIELD = 41, 39065 HIST_ERR_TOO_MANY_SORT_FIELDS = 42, 39066 HIST_ERR_INVALID_SORT_FIELD = 43, 39067 }; 39068 39069 struct hist_field; 39070 39071 typedef u64 (*hist_field_fn_t)(struct hist_field *, struct tracing_map_elt *, struct ring_buffer_event *, void *); 39072 39073 struct hist_trigger_data; 39074 39075 struct hist_var { 39076 char *name; 39077 struct hist_trigger_data *hist_data; 39078 unsigned int idx; 39079 }; 39080 39081 enum field_op_id { 39082 FIELD_OP_NONE = 0, 39083 FIELD_OP_PLUS = 1, 39084 FIELD_OP_MINUS = 2, 39085 FIELD_OP_UNARY_MINUS = 3, 39086 }; 39087 39088 struct hist_field { 39089 struct ftrace_event_field *field; 39090 long unsigned int flags; 39091 hist_field_fn_t fn; 39092 unsigned int ref; 39093 unsigned int size; 39094 unsigned int offset; 39095 unsigned int is_signed; 39096 const char *type; 39097 struct hist_field *operands[2]; 39098 struct hist_trigger_data *hist_data; 39099 struct hist_var var; 39100 enum field_op_id operator; 39101 char *system; 39102 char *event_name; 39103 char *name; 39104 unsigned int var_ref_idx; 39105 bool read_once; 39106 unsigned int var_str_idx; 39107 }; 39108 39109 struct hist_trigger_attrs; 39110 39111 struct action_data; 39112 39113 struct field_var; 39114 39115 struct field_var_hist; 39116 39117 struct hist_trigger_data { 39118 struct hist_field *fields[22]; 39119 unsigned int n_vals; 39120 unsigned int n_keys; 39121 unsigned int n_fields; 39122 unsigned int n_vars; 39123 unsigned int n_var_str; 39124 unsigned int key_size; 39125 struct tracing_map_sort_key sort_keys[2]; 39126 unsigned int n_sort_keys; 39127 struct trace_event_file *event_file; 39128 struct hist_trigger_attrs *attrs; 39129 struct tracing_map *map; 39130 bool enable_timestamps; 39131 bool remove; 39132 struct hist_field *var_refs[16]; 39133 unsigned int n_var_refs; 39134 struct action_data *actions[8]; 39135 unsigned int n_actions; 39136 struct field_var *field_vars[32]; 39137 unsigned int n_field_vars; 39138 unsigned int n_field_var_str; 39139 struct field_var_hist *field_var_hists[32]; 39140 unsigned int n_field_var_hists; 39141 struct field_var *save_vars[32]; 39142 unsigned int n_save_vars; 39143 unsigned int n_save_var_str; 39144 }; 39145 39146 enum hist_field_flags { 39147 HIST_FIELD_FL_HITCOUNT = 1, 39148 HIST_FIELD_FL_KEY = 2, 39149 HIST_FIELD_FL_STRING = 4, 39150 HIST_FIELD_FL_HEX = 8, 39151 HIST_FIELD_FL_SYM = 16, 39152 HIST_FIELD_FL_SYM_OFFSET = 32, 39153 HIST_FIELD_FL_EXECNAME = 64, 39154 HIST_FIELD_FL_SYSCALL = 128, 39155 HIST_FIELD_FL_STACKTRACE = 256, 39156 HIST_FIELD_FL_LOG2 = 512, 39157 HIST_FIELD_FL_TIMESTAMP = 1024, 39158 HIST_FIELD_FL_TIMESTAMP_USECS = 2048, 39159 HIST_FIELD_FL_VAR = 4096, 39160 HIST_FIELD_FL_EXPR = 8192, 39161 HIST_FIELD_FL_VAR_REF = 16384, 39162 HIST_FIELD_FL_CPU = 32768, 39163 HIST_FIELD_FL_ALIAS = 65536, 39164 }; 39165 39166 struct var_defs { 39167 unsigned int n_vars; 39168 char *name[16]; 39169 char *expr[16]; 39170 }; 39171 39172 struct hist_trigger_attrs { 39173 char *keys_str; 39174 char *vals_str; 39175 char *sort_key_str; 39176 char *name; 39177 char *clock; 39178 bool pause; 39179 bool cont; 39180 bool clear; 39181 bool ts_in_usecs; 39182 unsigned int map_bits; 39183 char *assignment_str[16]; 39184 unsigned int n_assignments; 39185 char *action_str[8]; 39186 unsigned int n_actions; 39187 struct var_defs var_defs; 39188 }; 39189 39190 struct field_var { 39191 struct hist_field *var; 39192 struct hist_field *val; 39193 }; 39194 39195 struct field_var_hist { 39196 struct hist_trigger_data *hist_data; 39197 char *cmd; 39198 }; 39199 39200 enum handler_id { 39201 HANDLER_ONMATCH = 1, 39202 HANDLER_ONMAX = 2, 39203 HANDLER_ONCHANGE = 3, 39204 }; 39205 39206 enum action_id { 39207 ACTION_SAVE = 1, 39208 ACTION_TRACE = 2, 39209 ACTION_SNAPSHOT = 3, 39210 }; 39211 39212 typedef void (*action_fn_t)(struct hist_trigger_data *, struct tracing_map_elt *, void *, struct ring_buffer_event *, void *, struct action_data *, u64 *); 39213 39214 typedef bool (*check_track_val_fn_t)(u64, u64); 39215 39216 struct action_data { 39217 enum handler_id handler; 39218 enum action_id action; 39219 char *action_name; 39220 action_fn_t fn; 39221 unsigned int n_params; 39222 char *params[32]; 39223 unsigned int var_ref_idx[16]; 39224 struct synth_event *synth_event; 39225 bool use_trace_keyword; 39226 char *synth_event_name; 39227 union { 39228 struct { 39229 char *event; 39230 char *event_system; 39231 } match_data; 39232 struct { 39233 char *var_str; 39234 struct hist_field *var_ref; 39235 struct hist_field *track_var; 39236 check_track_val_fn_t check_val; 39237 action_fn_t save_data; 39238 } track_data; 39239 }; 39240 }; 39241 39242 struct track_data { 39243 u64 track_val; 39244 bool updated; 39245 unsigned int key_len; 39246 void *key; 39247 struct tracing_map_elt elt; 39248 struct action_data *action_data; 39249 struct hist_trigger_data *hist_data; 39250 }; 39251 39252 struct hist_elt_data { 39253 char *comm; 39254 u64 *var_ref_vals; 39255 char *field_var_str[32]; 39256 }; 39257 39258 struct snapshot_context { 39259 struct tracing_map_elt *elt; 39260 void *key; 39261 }; 39262 39263 typedef void (*synth_probe_func_t)(void *, u64 *, unsigned int *); 39264 39265 struct hist_var_data { 39266 struct list_head list; 39267 struct hist_trigger_data *hist_data; 39268 }; 39269 39270 enum bpf_func_id { 39271 BPF_FUNC_unspec = 0, 39272 BPF_FUNC_map_lookup_elem = 1, 39273 BPF_FUNC_map_update_elem = 2, 39274 BPF_FUNC_map_delete_elem = 3, 39275 BPF_FUNC_probe_read = 4, 39276 BPF_FUNC_ktime_get_ns = 5, 39277 BPF_FUNC_trace_printk = 6, 39278 BPF_FUNC_get_prandom_u32 = 7, 39279 BPF_FUNC_get_smp_processor_id = 8, 39280 BPF_FUNC_skb_store_bytes = 9, 39281 BPF_FUNC_l3_csum_replace = 10, 39282 BPF_FUNC_l4_csum_replace = 11, 39283 BPF_FUNC_tail_call = 12, 39284 BPF_FUNC_clone_redirect = 13, 39285 BPF_FUNC_get_current_pid_tgid = 14, 39286 BPF_FUNC_get_current_uid_gid = 15, 39287 BPF_FUNC_get_current_comm = 16, 39288 BPF_FUNC_get_cgroup_classid = 17, 39289 BPF_FUNC_skb_vlan_push = 18, 39290 BPF_FUNC_skb_vlan_pop = 19, 39291 BPF_FUNC_skb_get_tunnel_key = 20, 39292 BPF_FUNC_skb_set_tunnel_key = 21, 39293 BPF_FUNC_perf_event_read = 22, 39294 BPF_FUNC_redirect = 23, 39295 BPF_FUNC_get_route_realm = 24, 39296 BPF_FUNC_perf_event_output = 25, 39297 BPF_FUNC_skb_load_bytes = 26, 39298 BPF_FUNC_get_stackid = 27, 39299 BPF_FUNC_csum_diff = 28, 39300 BPF_FUNC_skb_get_tunnel_opt = 29, 39301 BPF_FUNC_skb_set_tunnel_opt = 30, 39302 BPF_FUNC_skb_change_proto = 31, 39303 BPF_FUNC_skb_change_type = 32, 39304 BPF_FUNC_skb_under_cgroup = 33, 39305 BPF_FUNC_get_hash_recalc = 34, 39306 BPF_FUNC_get_current_task = 35, 39307 BPF_FUNC_probe_write_user = 36, 39308 BPF_FUNC_current_task_under_cgroup = 37, 39309 BPF_FUNC_skb_change_tail = 38, 39310 BPF_FUNC_skb_pull_data = 39, 39311 BPF_FUNC_csum_update = 40, 39312 BPF_FUNC_set_hash_invalid = 41, 39313 BPF_FUNC_get_numa_node_id = 42, 39314 BPF_FUNC_skb_change_head = 43, 39315 BPF_FUNC_xdp_adjust_head = 44, 39316 BPF_FUNC_probe_read_str = 45, 39317 BPF_FUNC_get_socket_cookie = 46, 39318 BPF_FUNC_get_socket_uid = 47, 39319 BPF_FUNC_set_hash = 48, 39320 BPF_FUNC_setsockopt = 49, 39321 BPF_FUNC_skb_adjust_room = 50, 39322 BPF_FUNC_redirect_map = 51, 39323 BPF_FUNC_sk_redirect_map = 52, 39324 BPF_FUNC_sock_map_update = 53, 39325 BPF_FUNC_xdp_adjust_meta = 54, 39326 BPF_FUNC_perf_event_read_value = 55, 39327 BPF_FUNC_perf_prog_read_value = 56, 39328 BPF_FUNC_getsockopt = 57, 39329 BPF_FUNC_override_return = 58, 39330 BPF_FUNC_sock_ops_cb_flags_set = 59, 39331 BPF_FUNC_msg_redirect_map = 60, 39332 BPF_FUNC_msg_apply_bytes = 61, 39333 BPF_FUNC_msg_cork_bytes = 62, 39334 BPF_FUNC_msg_pull_data = 63, 39335 BPF_FUNC_bind = 64, 39336 BPF_FUNC_xdp_adjust_tail = 65, 39337 BPF_FUNC_skb_get_xfrm_state = 66, 39338 BPF_FUNC_get_stack = 67, 39339 BPF_FUNC_skb_load_bytes_relative = 68, 39340 BPF_FUNC_fib_lookup = 69, 39341 BPF_FUNC_sock_hash_update = 70, 39342 BPF_FUNC_msg_redirect_hash = 71, 39343 BPF_FUNC_sk_redirect_hash = 72, 39344 BPF_FUNC_lwt_push_encap = 73, 39345 BPF_FUNC_lwt_seg6_store_bytes = 74, 39346 BPF_FUNC_lwt_seg6_adjust_srh = 75, 39347 BPF_FUNC_lwt_seg6_action = 76, 39348 BPF_FUNC_rc_repeat = 77, 39349 BPF_FUNC_rc_keydown = 78, 39350 BPF_FUNC_skb_cgroup_id = 79, 39351 BPF_FUNC_get_current_cgroup_id = 80, 39352 BPF_FUNC_get_local_storage = 81, 39353 BPF_FUNC_sk_select_reuseport = 82, 39354 BPF_FUNC_skb_ancestor_cgroup_id = 83, 39355 BPF_FUNC_sk_lookup_tcp = 84, 39356 BPF_FUNC_sk_lookup_udp = 85, 39357 BPF_FUNC_sk_release = 86, 39358 BPF_FUNC_map_push_elem = 87, 39359 BPF_FUNC_map_pop_elem = 88, 39360 BPF_FUNC_map_peek_elem = 89, 39361 BPF_FUNC_msg_push_data = 90, 39362 BPF_FUNC_msg_pop_data = 91, 39363 BPF_FUNC_rc_pointer_rel = 92, 39364 BPF_FUNC_spin_lock = 93, 39365 BPF_FUNC_spin_unlock = 94, 39366 BPF_FUNC_sk_fullsock = 95, 39367 BPF_FUNC_tcp_sock = 96, 39368 BPF_FUNC_skb_ecn_set_ce = 97, 39369 BPF_FUNC_get_listener_sock = 98, 39370 BPF_FUNC_skc_lookup_tcp = 99, 39371 BPF_FUNC_tcp_check_syncookie = 100, 39372 BPF_FUNC_sysctl_get_name = 101, 39373 BPF_FUNC_sysctl_get_current_value = 102, 39374 BPF_FUNC_sysctl_get_new_value = 103, 39375 BPF_FUNC_sysctl_set_new_value = 104, 39376 BPF_FUNC_strtol = 105, 39377 BPF_FUNC_strtoul = 106, 39378 BPF_FUNC_sk_storage_get = 107, 39379 BPF_FUNC_sk_storage_delete = 108, 39380 BPF_FUNC_send_signal = 109, 39381 BPF_FUNC_tcp_gen_syncookie = 110, 39382 BPF_FUNC_skb_output = 111, 39383 BPF_FUNC_probe_read_user = 112, 39384 BPF_FUNC_probe_read_kernel = 113, 39385 BPF_FUNC_probe_read_user_str = 114, 39386 BPF_FUNC_probe_read_kernel_str = 115, 39387 BPF_FUNC_tcp_send_ack = 116, 39388 BPF_FUNC_send_signal_thread = 117, 39389 BPF_FUNC_jiffies64 = 118, 39390 BPF_FUNC_read_branch_records = 119, 39391 BPF_FUNC_get_ns_current_pid_tgid = 120, 39392 BPF_FUNC_xdp_output = 121, 39393 BPF_FUNC_get_netns_cookie = 122, 39394 BPF_FUNC_get_current_ancestor_cgroup_id = 123, 39395 BPF_FUNC_sk_assign = 124, 39396 BPF_FUNC_ktime_get_boot_ns = 125, 39397 BPF_FUNC_seq_printf = 126, 39398 BPF_FUNC_seq_write = 127, 39399 BPF_FUNC_sk_cgroup_id = 128, 39400 BPF_FUNC_sk_ancestor_cgroup_id = 129, 39401 BPF_FUNC_ringbuf_output = 130, 39402 BPF_FUNC_ringbuf_reserve = 131, 39403 BPF_FUNC_ringbuf_submit = 132, 39404 BPF_FUNC_ringbuf_discard = 133, 39405 BPF_FUNC_ringbuf_query = 134, 39406 BPF_FUNC_csum_level = 135, 39407 BPF_FUNC_skc_to_tcp6_sock = 136, 39408 BPF_FUNC_skc_to_tcp_sock = 137, 39409 BPF_FUNC_skc_to_tcp_timewait_sock = 138, 39410 BPF_FUNC_skc_to_tcp_request_sock = 139, 39411 BPF_FUNC_skc_to_udp6_sock = 140, 39412 BPF_FUNC_get_task_stack = 141, 39413 BPF_FUNC_load_hdr_opt = 142, 39414 BPF_FUNC_store_hdr_opt = 143, 39415 BPF_FUNC_reserve_hdr_opt = 144, 39416 BPF_FUNC_inode_storage_get = 145, 39417 BPF_FUNC_inode_storage_delete = 146, 39418 BPF_FUNC_d_path = 147, 39419 BPF_FUNC_copy_from_user = 148, 39420 BPF_FUNC_snprintf_btf = 149, 39421 BPF_FUNC_seq_printf_btf = 150, 39422 BPF_FUNC_skb_cgroup_classid = 151, 39423 BPF_FUNC_redirect_neigh = 152, 39424 BPF_FUNC_per_cpu_ptr = 153, 39425 BPF_FUNC_this_cpu_ptr = 154, 39426 BPF_FUNC_redirect_peer = 155, 39427 BPF_FUNC_task_storage_get = 156, 39428 BPF_FUNC_task_storage_delete = 157, 39429 BPF_FUNC_get_current_task_btf = 158, 39430 BPF_FUNC_bprm_opts_set = 159, 39431 BPF_FUNC_ktime_get_coarse_ns = 160, 39432 BPF_FUNC_ima_inode_hash = 161, 39433 BPF_FUNC_sock_from_file = 162, 39434 __BPF_FUNC_MAX_ID = 163, 39435 }; 39436 39437 enum { 39438 BPF_F_INDEX_MASK = 4294967295, 39439 BPF_F_CURRENT_CPU = 4294967295, 39440 BPF_F_CTXLEN_MASK = 0, 39441 }; 39442 39443 enum { 39444 BPF_F_GET_BRANCH_RECORDS_SIZE = 1, 39445 }; 39446 39447 struct bpf_perf_event_value { 39448 __u64 counter; 39449 __u64 enabled; 39450 __u64 running; 39451 }; 39452 39453 struct bpf_raw_tracepoint_args { 39454 __u64 args[0]; 39455 }; 39456 39457 enum bpf_task_fd_type { 39458 BPF_FD_TYPE_RAW_TRACEPOINT = 0, 39459 BPF_FD_TYPE_TRACEPOINT = 1, 39460 BPF_FD_TYPE_KPROBE = 2, 39461 BPF_FD_TYPE_KRETPROBE = 3, 39462 BPF_FD_TYPE_UPROBE = 4, 39463 BPF_FD_TYPE_URETPROBE = 5, 39464 }; 39465 39466 struct btf_ptr { 39467 void *ptr; 39468 __u32 type_id; 39469 __u32 flags; 39470 }; 39471 39472 enum { 39473 BTF_F_COMPACT = 1, 39474 BTF_F_NONAME = 2, 39475 BTF_F_PTR_RAW = 4, 39476 BTF_F_ZERO = 8, 39477 }; 39478 39479 struct bpf_local_storage_map_bucket; 39480 39481 struct bpf_local_storage_map { 39482 struct bpf_map map; 39483 struct bpf_local_storage_map_bucket *buckets; 39484 u32 bucket_log; 39485 u16 elem_size; 39486 u16 cache_idx; 39487 long: 64; 39488 long: 64; 39489 long: 64; 39490 long: 64; 39491 long: 64; 39492 long: 64; 39493 }; 39494 39495 struct bpf_local_storage_data; 39496 39497 struct bpf_local_storage { 39498 struct bpf_local_storage_data *cache[16]; 39499 struct hlist_head list; 39500 void *owner; 39501 struct callback_head rcu; 39502 raw_spinlock_t lock; 39503 }; 39504 39505 enum bpf_arg_type { 39506 ARG_DONTCARE = 0, 39507 ARG_CONST_MAP_PTR = 1, 39508 ARG_PTR_TO_MAP_KEY = 2, 39509 ARG_PTR_TO_MAP_VALUE = 3, 39510 ARG_PTR_TO_UNINIT_MAP_VALUE = 4, 39511 ARG_PTR_TO_MAP_VALUE_OR_NULL = 5, 39512 ARG_PTR_TO_MEM = 6, 39513 ARG_PTR_TO_MEM_OR_NULL = 7, 39514 ARG_PTR_TO_UNINIT_MEM = 8, 39515 ARG_CONST_SIZE = 9, 39516 ARG_CONST_SIZE_OR_ZERO = 10, 39517 ARG_PTR_TO_CTX = 11, 39518 ARG_PTR_TO_CTX_OR_NULL = 12, 39519 ARG_ANYTHING = 13, 39520 ARG_PTR_TO_SPIN_LOCK = 14, 39521 ARG_PTR_TO_SOCK_COMMON = 15, 39522 ARG_PTR_TO_INT = 16, 39523 ARG_PTR_TO_LONG = 17, 39524 ARG_PTR_TO_SOCKET = 18, 39525 ARG_PTR_TO_SOCKET_OR_NULL = 19, 39526 ARG_PTR_TO_BTF_ID = 20, 39527 ARG_PTR_TO_ALLOC_MEM = 21, 39528 ARG_PTR_TO_ALLOC_MEM_OR_NULL = 22, 39529 ARG_CONST_ALLOC_SIZE_OR_ZERO = 23, 39530 ARG_PTR_TO_BTF_ID_SOCK_COMMON = 24, 39531 ARG_PTR_TO_PERCPU_BTF_ID = 25, 39532 __BPF_ARG_TYPE_MAX = 26, 39533 }; 39534 39535 enum bpf_return_type { 39536 RET_INTEGER = 0, 39537 RET_VOID = 1, 39538 RET_PTR_TO_MAP_VALUE = 2, 39539 RET_PTR_TO_MAP_VALUE_OR_NULL = 3, 39540 RET_PTR_TO_SOCKET_OR_NULL = 4, 39541 RET_PTR_TO_TCP_SOCK_OR_NULL = 5, 39542 RET_PTR_TO_SOCK_COMMON_OR_NULL = 6, 39543 RET_PTR_TO_ALLOC_MEM_OR_NULL = 7, 39544 RET_PTR_TO_BTF_ID_OR_NULL = 8, 39545 RET_PTR_TO_MEM_OR_BTF_ID_OR_NULL = 9, 39546 RET_PTR_TO_MEM_OR_BTF_ID = 10, 39547 RET_PTR_TO_BTF_ID = 11, 39548 }; 39549 39550 struct bpf_func_proto { 39551 u64 (*func)(u64, u64, u64, u64, u64); 39552 bool gpl_only; 39553 bool pkt_access; 39554 enum bpf_return_type ret_type; 39555 union { 39556 struct { 39557 enum bpf_arg_type arg1_type; 39558 enum bpf_arg_type arg2_type; 39559 enum bpf_arg_type arg3_type; 39560 enum bpf_arg_type arg4_type; 39561 enum bpf_arg_type arg5_type; 39562 }; 39563 enum bpf_arg_type arg_type[5]; 39564 }; 39565 union { 39566 struct { 39567 u32 *arg1_btf_id; 39568 u32 *arg2_btf_id; 39569 u32 *arg3_btf_id; 39570 u32 *arg4_btf_id; 39571 u32 *arg5_btf_id; 39572 }; 39573 u32 *arg_btf_id[5]; 39574 }; 39575 int *ret_btf_id; 39576 bool (*allowed)(const struct bpf_prog *); 39577 }; 39578 39579 enum bpf_access_type { 39580 BPF_READ = 1, 39581 BPF_WRITE = 2, 39582 }; 39583 39584 struct bpf_verifier_log; 39585 39586 struct bpf_insn_access_aux { 39587 enum bpf_reg_type reg_type; 39588 union { 39589 int ctx_field_size; 39590 struct { 39591 struct btf *btf; 39592 u32 btf_id; 39593 }; 39594 }; 39595 struct bpf_verifier_log *log; 39596 }; 39597 39598 struct bpf_verifier_ops { 39599 const struct bpf_func_proto * (*get_func_proto)(enum bpf_func_id, const struct bpf_prog *); 39600 bool (*is_valid_access)(int, int, enum bpf_access_type, const struct bpf_prog *, struct bpf_insn_access_aux *); 39601 int (*gen_prologue)(struct bpf_insn *, bool, const struct bpf_prog *); 39602 int (*gen_ld_abs)(const struct bpf_insn *, struct bpf_insn *); 39603 u32 (*convert_ctx_access)(enum bpf_access_type, const struct bpf_insn *, struct bpf_insn *, struct bpf_prog *, u32 *); 39604 int (*btf_struct_access)(struct bpf_verifier_log *, const struct btf *, const struct btf_type *, int, int, enum bpf_access_type, u32 *); 39605 }; 39606 39607 struct bpf_event_entry { 39608 struct perf_event *event; 39609 struct file *perf_file; 39610 struct file *map_file; 39611 struct callback_head rcu; 39612 }; 39613 39614 typedef long unsigned int (*bpf_ctx_copy_t)(void *, const void *, long unsigned int, long unsigned int); 39615 39616 typedef struct pt_regs bpf_user_pt_regs_t; 39617 39618 struct bpf_perf_event_data { 39619 bpf_user_pt_regs_t regs; 39620 __u64 sample_period; 39621 __u64 addr; 39622 }; 39623 39624 struct perf_event_query_bpf { 39625 __u32 ids_len; 39626 __u32 prog_cnt; 39627 __u32 ids[0]; 39628 }; 39629 39630 struct bpf_perf_event_data_kern { 39631 bpf_user_pt_regs_t *regs; 39632 struct perf_sample_data *data; 39633 struct perf_event *event; 39634 }; 39635 39636 struct btf_id_set { 39637 u32 cnt; 39638 u32 ids[0]; 39639 }; 39640 39641 struct bpf_local_storage_map_bucket { 39642 struct hlist_head list; 39643 raw_spinlock_t lock; 39644 }; 39645 39646 struct bpf_local_storage_data { 39647 struct bpf_local_storage_map *smap; 39648 u8 data[0]; 39649 }; 39650 39651 struct trace_event_raw_bpf_trace_printk { 39652 struct trace_entry ent; 39653 u32 __data_loc_bpf_string; 39654 char __data[0]; 39655 }; 39656 39657 struct trace_event_data_offsets_bpf_trace_printk { 39658 u32 bpf_string; 39659 }; 39660 39661 typedef void (*btf_trace_bpf_trace_printk)(void *, const char *); 39662 39663 struct bpf_trace_module { 39664 struct module *module; 39665 struct list_head list; 39666 }; 39667 39668 typedef u64 (*btf_bpf_probe_read_user)(void *, u32, const void *); 39669 39670 typedef u64 (*btf_bpf_probe_read_user_str)(void *, u32, const void *); 39671 39672 typedef u64 (*btf_bpf_probe_read_kernel)(void *, u32, const void *); 39673 39674 typedef u64 (*btf_bpf_probe_read_kernel_str)(void *, u32, const void *); 39675 39676 typedef u64 (*btf_bpf_probe_read_compat)(void *, u32, const void *); 39677 39678 typedef u64 (*btf_bpf_probe_read_compat_str)(void *, u32, const void *); 39679 39680 typedef u64 (*btf_bpf_probe_write_user)(void *, const void *, u32); 39681 39682 typedef u64 (*btf_bpf_trace_printk)(char *, u32, u64, u64, u64); 39683 39684 struct bpf_seq_printf_buf { 39685 char buf[768]; 39686 }; 39687 39688 typedef u64 (*btf_bpf_seq_printf)(struct seq_file *, char *, u32, const void *, u32); 39689 39690 typedef u64 (*btf_bpf_seq_write)(struct seq_file *, const void *, u32); 39691 39692 typedef u64 (*btf_bpf_seq_printf_btf)(struct seq_file *, struct btf_ptr *, u32, u64); 39693 39694 typedef u64 (*btf_bpf_perf_event_read)(struct bpf_map *, u64); 39695 39696 typedef u64 (*btf_bpf_perf_event_read_value)(struct bpf_map *, u64, struct bpf_perf_event_value *, u32); 39697 39698 struct bpf_trace_sample_data { 39699 struct perf_sample_data sds[3]; 39700 }; 39701 39702 typedef u64 (*btf_bpf_perf_event_output)(struct pt_regs *, struct bpf_map *, u64, void *, u64); 39703 39704 struct bpf_nested_pt_regs { 39705 struct pt_regs regs[3]; 39706 }; 39707 39708 typedef u64 (*btf_bpf_get_current_task)(); 39709 39710 typedef u64 (*btf_bpf_get_current_task_btf)(); 39711 39712 typedef u64 (*btf_bpf_current_task_under_cgroup)(struct bpf_map *, u32); 39713 39714 struct send_signal_irq_work { 39715 struct irq_work irq_work; 39716 struct task_struct *task; 39717 u32 sig; 39718 enum pid_type type; 39719 }; 39720 39721 typedef u64 (*btf_bpf_send_signal)(u32); 39722 39723 typedef u64 (*btf_bpf_send_signal_thread)(u32); 39724 39725 typedef u64 (*btf_bpf_d_path)(struct path *, char *, u32); 39726 39727 typedef u64 (*btf_bpf_snprintf_btf)(char *, u32, struct btf_ptr *, u32, u64); 39728 39729 typedef u64 (*btf_bpf_perf_event_output_tp)(void *, struct bpf_map *, u64, void *, u64); 39730 39731 typedef u64 (*btf_bpf_get_stackid_tp)(void *, struct bpf_map *, u64); 39732 39733 typedef u64 (*btf_bpf_get_stack_tp)(void *, void *, u32, u64); 39734 39735 typedef u64 (*btf_bpf_perf_prog_read_value)(struct bpf_perf_event_data_kern *, struct bpf_perf_event_value *, u32); 39736 39737 typedef u64 (*btf_bpf_read_branch_records)(struct bpf_perf_event_data_kern *, void *, u32, u64); 39738 39739 struct bpf_raw_tp_regs { 39740 struct pt_regs regs[3]; 39741 }; 39742 39743 typedef u64 (*btf_bpf_perf_event_output_raw_tp)(struct bpf_raw_tracepoint_args *, struct bpf_map *, u64, void *, u64); 39744 39745 typedef u64 (*btf_bpf_get_stackid_raw_tp)(struct bpf_raw_tracepoint_args *, struct bpf_map *, u64); 39746 39747 typedef u64 (*btf_bpf_get_stack_raw_tp)(struct bpf_raw_tracepoint_args *, void *, u32, u64); 39748 39749 struct kprobe_trace_entry_head { 39750 struct trace_entry ent; 39751 long unsigned int ip; 39752 }; 39753 39754 struct kretprobe_trace_entry_head { 39755 struct trace_entry ent; 39756 long unsigned int func; 39757 long unsigned int ret_ip; 39758 }; 39759 39760 typedef int (*print_type_func_t)(struct trace_seq *, void *, void *); 39761 39762 enum fetch_op { 39763 FETCH_OP_NOP = 0, 39764 FETCH_OP_REG = 1, 39765 FETCH_OP_STACK = 2, 39766 FETCH_OP_STACKP = 3, 39767 FETCH_OP_RETVAL = 4, 39768 FETCH_OP_IMM = 5, 39769 FETCH_OP_COMM = 6, 39770 FETCH_OP_ARG = 7, 39771 FETCH_OP_FOFFS = 8, 39772 FETCH_OP_DATA = 9, 39773 FETCH_OP_DEREF = 10, 39774 FETCH_OP_UDEREF = 11, 39775 FETCH_OP_ST_RAW = 12, 39776 FETCH_OP_ST_MEM = 13, 39777 FETCH_OP_ST_UMEM = 14, 39778 FETCH_OP_ST_STRING = 15, 39779 FETCH_OP_ST_USTRING = 16, 39780 FETCH_OP_MOD_BF = 17, 39781 FETCH_OP_LP_ARRAY = 18, 39782 FETCH_OP_END = 19, 39783 FETCH_NOP_SYMBOL = 20, 39784 }; 39785 39786 struct fetch_insn { 39787 enum fetch_op op; 39788 union { 39789 unsigned int param; 39790 struct { 39791 unsigned int size; 39792 int offset; 39793 }; 39794 struct { 39795 unsigned char basesize; 39796 unsigned char lshift; 39797 unsigned char rshift; 39798 }; 39799 long unsigned int immediate; 39800 void *data; 39801 }; 39802 }; 39803 39804 struct fetch_type { 39805 const char *name; 39806 size_t size; 39807 int is_signed; 39808 print_type_func_t print; 39809 const char *fmt; 39810 const char *fmttype; 39811 }; 39812 39813 struct probe_arg { 39814 struct fetch_insn *code; 39815 bool dynamic; 39816 unsigned int offset; 39817 unsigned int count; 39818 const char *name; 39819 const char *comm; 39820 char *fmt; 39821 const struct fetch_type *type; 39822 }; 39823 39824 struct trace_uprobe_filter { 39825 rwlock_t rwlock; 39826 int nr_systemwide; 39827 struct list_head perf_events; 39828 }; 39829 39830 struct trace_probe_event { 39831 unsigned int flags; 39832 struct trace_event_class class; 39833 struct trace_event_call call; 39834 struct list_head files; 39835 struct list_head probes; 39836 struct trace_uprobe_filter filter[0]; 39837 }; 39838 39839 struct trace_probe { 39840 struct list_head list; 39841 struct trace_probe_event *event; 39842 ssize_t size; 39843 unsigned int nr_args; 39844 struct probe_arg args[0]; 39845 }; 39846 39847 struct event_file_link { 39848 struct trace_event_file *file; 39849 struct list_head list; 39850 }; 39851 39852 enum { 39853 TP_ERR_FILE_NOT_FOUND = 0, 39854 TP_ERR_NO_REGULAR_FILE = 1, 39855 TP_ERR_BAD_REFCNT = 2, 39856 TP_ERR_REFCNT_OPEN_BRACE = 3, 39857 TP_ERR_BAD_REFCNT_SUFFIX = 4, 39858 TP_ERR_BAD_UPROBE_OFFS = 5, 39859 TP_ERR_MAXACT_NO_KPROBE = 6, 39860 TP_ERR_BAD_MAXACT = 7, 39861 TP_ERR_MAXACT_TOO_BIG = 8, 39862 TP_ERR_BAD_PROBE_ADDR = 9, 39863 TP_ERR_BAD_RETPROBE = 10, 39864 TP_ERR_BAD_ADDR_SUFFIX = 11, 39865 TP_ERR_NO_GROUP_NAME = 12, 39866 TP_ERR_GROUP_TOO_LONG = 13, 39867 TP_ERR_BAD_GROUP_NAME = 14, 39868 TP_ERR_NO_EVENT_NAME = 15, 39869 TP_ERR_EVENT_TOO_LONG = 16, 39870 TP_ERR_BAD_EVENT_NAME = 17, 39871 TP_ERR_RETVAL_ON_PROBE = 18, 39872 TP_ERR_BAD_STACK_NUM = 19, 39873 TP_ERR_BAD_ARG_NUM = 20, 39874 TP_ERR_BAD_VAR = 21, 39875 TP_ERR_BAD_REG_NAME = 22, 39876 TP_ERR_BAD_MEM_ADDR = 23, 39877 TP_ERR_BAD_IMM = 24, 39878 TP_ERR_IMMSTR_NO_CLOSE = 25, 39879 TP_ERR_FILE_ON_KPROBE = 26, 39880 TP_ERR_BAD_FILE_OFFS = 27, 39881 TP_ERR_SYM_ON_UPROBE = 28, 39882 TP_ERR_TOO_MANY_OPS = 29, 39883 TP_ERR_DEREF_NEED_BRACE = 30, 39884 TP_ERR_BAD_DEREF_OFFS = 31, 39885 TP_ERR_DEREF_OPEN_BRACE = 32, 39886 TP_ERR_COMM_CANT_DEREF = 33, 39887 TP_ERR_BAD_FETCH_ARG = 34, 39888 TP_ERR_ARRAY_NO_CLOSE = 35, 39889 TP_ERR_BAD_ARRAY_SUFFIX = 36, 39890 TP_ERR_BAD_ARRAY_NUM = 37, 39891 TP_ERR_ARRAY_TOO_BIG = 38, 39892 TP_ERR_BAD_TYPE = 39, 39893 TP_ERR_BAD_STRING = 40, 39894 TP_ERR_BAD_BITFIELD = 41, 39895 TP_ERR_ARG_NAME_TOO_LONG = 42, 39896 TP_ERR_NO_ARG_NAME = 43, 39897 TP_ERR_BAD_ARG_NAME = 44, 39898 TP_ERR_USED_ARG_NAME = 45, 39899 TP_ERR_ARG_TOO_LONG = 46, 39900 TP_ERR_NO_ARG_BODY = 47, 39901 TP_ERR_BAD_INSN_BNDRY = 48, 39902 TP_ERR_FAIL_REG_PROBE = 49, 39903 TP_ERR_DIFF_PROBE_TYPE = 50, 39904 TP_ERR_DIFF_ARG_TYPE = 51, 39905 TP_ERR_SAME_PROBE = 52, 39906 }; 39907 39908 struct trace_kprobe { 39909 struct dyn_event devent; 39910 struct kretprobe rp; 39911 long unsigned int *nhit; 39912 const char *symbol; 39913 struct trace_probe tp; 39914 }; 39915 39916 struct trace_event_raw_cpu { 39917 struct trace_entry ent; 39918 u32 state; 39919 u32 cpu_id; 39920 char __data[0]; 39921 }; 39922 39923 struct trace_event_raw_powernv_throttle { 39924 struct trace_entry ent; 39925 int chip_id; 39926 u32 __data_loc_reason; 39927 int pmax; 39928 char __data[0]; 39929 }; 39930 39931 struct trace_event_raw_pstate_sample { 39932 struct trace_entry ent; 39933 u32 core_busy; 39934 u32 scaled_busy; 39935 u32 from; 39936 u32 to; 39937 u64 mperf; 39938 u64 aperf; 39939 u64 tsc; 39940 u32 freq; 39941 u32 io_boost; 39942 char __data[0]; 39943 }; 39944 39945 struct trace_event_raw_cpu_frequency_limits { 39946 struct trace_entry ent; 39947 u32 min_freq; 39948 u32 max_freq; 39949 u32 cpu_id; 39950 char __data[0]; 39951 }; 39952 39953 struct trace_event_raw_device_pm_callback_start { 39954 struct trace_entry ent; 39955 u32 __data_loc_device; 39956 u32 __data_loc_driver; 39957 u32 __data_loc_parent; 39958 u32 __data_loc_pm_ops; 39959 int event; 39960 char __data[0]; 39961 }; 39962 39963 struct trace_event_raw_device_pm_callback_end { 39964 struct trace_entry ent; 39965 u32 __data_loc_device; 39966 u32 __data_loc_driver; 39967 int error; 39968 char __data[0]; 39969 }; 39970 39971 struct trace_event_raw_suspend_resume { 39972 struct trace_entry ent; 39973 const char *action; 39974 int val; 39975 bool start; 39976 char __data[0]; 39977 }; 39978 39979 struct trace_event_raw_wakeup_source { 39980 struct trace_entry ent; 39981 u32 __data_loc_name; 39982 u64 state; 39983 char __data[0]; 39984 }; 39985 39986 struct trace_event_raw_clock { 39987 struct trace_entry ent; 39988 u32 __data_loc_name; 39989 u64 state; 39990 u64 cpu_id; 39991 char __data[0]; 39992 }; 39993 39994 struct trace_event_raw_power_domain { 39995 struct trace_entry ent; 39996 u32 __data_loc_name; 39997 u64 state; 39998 u64 cpu_id; 39999 char __data[0]; 40000 }; 40001 40002 struct trace_event_raw_cpu_latency_qos_request { 40003 struct trace_entry ent; 40004 s32 value; 40005 char __data[0]; 40006 }; 40007 40008 struct trace_event_raw_pm_qos_update { 40009 struct trace_entry ent; 40010 enum pm_qos_req_action action; 40011 int prev_value; 40012 int curr_value; 40013 char __data[0]; 40014 }; 40015 40016 struct trace_event_raw_dev_pm_qos_request { 40017 struct trace_entry ent; 40018 u32 __data_loc_name; 40019 enum dev_pm_qos_req_type type; 40020 s32 new_value; 40021 char __data[0]; 40022 }; 40023 40024 struct trace_event_data_offsets_cpu {}; 40025 40026 struct trace_event_data_offsets_powernv_throttle { 40027 u32 reason; 40028 }; 40029 40030 struct trace_event_data_offsets_pstate_sample {}; 40031 40032 struct trace_event_data_offsets_cpu_frequency_limits {}; 40033 40034 struct trace_event_data_offsets_device_pm_callback_start { 40035 u32 device; 40036 u32 driver; 40037 u32 parent; 40038 u32 pm_ops; 40039 }; 40040 40041 struct trace_event_data_offsets_device_pm_callback_end { 40042 u32 device; 40043 u32 driver; 40044 }; 40045 40046 struct trace_event_data_offsets_suspend_resume {}; 40047 40048 struct trace_event_data_offsets_wakeup_source { 40049 u32 name; 40050 }; 40051 40052 struct trace_event_data_offsets_clock { 40053 u32 name; 40054 }; 40055 40056 struct trace_event_data_offsets_power_domain { 40057 u32 name; 40058 }; 40059 40060 struct trace_event_data_offsets_cpu_latency_qos_request {}; 40061 40062 struct trace_event_data_offsets_pm_qos_update {}; 40063 40064 struct trace_event_data_offsets_dev_pm_qos_request { 40065 u32 name; 40066 }; 40067 40068 typedef void (*btf_trace_cpu_idle)(void *, unsigned int, unsigned int); 40069 40070 typedef void (*btf_trace_powernv_throttle)(void *, int, const char *, int); 40071 40072 typedef void (*btf_trace_pstate_sample)(void *, u32, u32, u32, u32, u64, u64, u64, u32, u32); 40073 40074 typedef void (*btf_trace_cpu_frequency)(void *, unsigned int, unsigned int); 40075 40076 typedef void (*btf_trace_cpu_frequency_limits)(void *, struct cpufreq_policy *); 40077 40078 typedef void (*btf_trace_device_pm_callback_start)(void *, struct device *, const char *, int); 40079 40080 typedef void (*btf_trace_device_pm_callback_end)(void *, struct device *, int); 40081 40082 typedef void (*btf_trace_suspend_resume)(void *, const char *, int, bool); 40083 40084 typedef void (*btf_trace_wakeup_source_activate)(void *, const char *, unsigned int); 40085 40086 typedef void (*btf_trace_wakeup_source_deactivate)(void *, const char *, unsigned int); 40087 40088 typedef void (*btf_trace_clock_enable)(void *, const char *, unsigned int, unsigned int); 40089 40090 typedef void (*btf_trace_clock_disable)(void *, const char *, unsigned int, unsigned int); 40091 40092 typedef void (*btf_trace_clock_set_rate)(void *, const char *, unsigned int, unsigned int); 40093 40094 typedef void (*btf_trace_power_domain_target)(void *, const char *, unsigned int, unsigned int); 40095 40096 typedef void (*btf_trace_pm_qos_add_request)(void *, s32); 40097 40098 typedef void (*btf_trace_pm_qos_update_request)(void *, s32); 40099 40100 typedef void (*btf_trace_pm_qos_remove_request)(void *, s32); 40101 40102 typedef void (*btf_trace_pm_qos_update_target)(void *, enum pm_qos_req_action, int, int); 40103 40104 typedef void (*btf_trace_pm_qos_update_flags)(void *, enum pm_qos_req_action, int, int); 40105 40106 typedef void (*btf_trace_dev_pm_qos_add_request)(void *, const char *, enum dev_pm_qos_req_type, s32); 40107 40108 typedef void (*btf_trace_dev_pm_qos_update_request)(void *, const char *, enum dev_pm_qos_req_type, s32); 40109 40110 typedef void (*btf_trace_dev_pm_qos_remove_request)(void *, const char *, enum dev_pm_qos_req_type, s32); 40111 40112 struct trace_event_raw_rpm_internal { 40113 struct trace_entry ent; 40114 u32 __data_loc_name; 40115 int flags; 40116 int usage_count; 40117 int disable_depth; 40118 int runtime_auto; 40119 int request_pending; 40120 int irq_safe; 40121 int child_count; 40122 char __data[0]; 40123 }; 40124 40125 struct trace_event_raw_rpm_return_int { 40126 struct trace_entry ent; 40127 u32 __data_loc_name; 40128 long unsigned int ip; 40129 int ret; 40130 char __data[0]; 40131 }; 40132 40133 struct trace_event_data_offsets_rpm_internal { 40134 u32 name; 40135 }; 40136 40137 struct trace_event_data_offsets_rpm_return_int { 40138 u32 name; 40139 }; 40140 40141 typedef void (*btf_trace_rpm_suspend)(void *, struct device *, int); 40142 40143 typedef void (*btf_trace_rpm_resume)(void *, struct device *, int); 40144 40145 typedef void (*btf_trace_rpm_idle)(void *, struct device *, int); 40146 40147 typedef void (*btf_trace_rpm_usage)(void *, struct device *, int); 40148 40149 typedef void (*btf_trace_rpm_return_int)(void *, struct device *, long unsigned int, int); 40150 40151 struct trace_probe_log { 40152 const char *subsystem; 40153 const char **argv; 40154 int argc; 40155 int index; 40156 }; 40157 40158 enum uprobe_filter_ctx { 40159 UPROBE_FILTER_REGISTER = 0, 40160 UPROBE_FILTER_UNREGISTER = 1, 40161 UPROBE_FILTER_MMAP = 2, 40162 }; 40163 40164 struct uprobe_consumer { 40165 int (*handler)(struct uprobe_consumer *, struct pt_regs *); 40166 int (*ret_handler)(struct uprobe_consumer *, long unsigned int, struct pt_regs *); 40167 bool (*filter)(struct uprobe_consumer *, enum uprobe_filter_ctx, struct mm_struct *); 40168 struct uprobe_consumer *next; 40169 }; 40170 40171 struct uprobe_trace_entry_head { 40172 struct trace_entry ent; 40173 long unsigned int vaddr[0]; 40174 }; 40175 40176 struct trace_uprobe { 40177 struct dyn_event devent; 40178 struct uprobe_consumer consumer; 40179 struct path path; 40180 struct inode *inode; 40181 char *filename; 40182 long unsigned int offset; 40183 long unsigned int ref_ctr_offset; 40184 long unsigned int nhit; 40185 struct trace_probe tp; 40186 }; 40187 40188 struct uprobe_dispatch_data { 40189 struct trace_uprobe *tu; 40190 long unsigned int bp_addr; 40191 }; 40192 40193 struct uprobe_cpu_buffer { 40194 struct mutex mutex; 40195 void *buf; 40196 }; 40197 40198 typedef bool (*filter_func_t)(struct uprobe_consumer *, enum uprobe_filter_ctx, struct mm_struct *); 40199 40200 struct rhash_lock_head; 40201 40202 struct bucket_table { 40203 unsigned int size; 40204 unsigned int nest; 40205 u32 hash_rnd; 40206 struct list_head walkers; 40207 struct callback_head rcu; 40208 struct bucket_table *future_tbl; 40209 struct lockdep_map dep_map; 40210 long: 64; 40211 struct rhash_lock_head *buckets[0]; 40212 }; 40213 40214 enum xdp_action { 40215 XDP_ABORTED = 0, 40216 XDP_DROP = 1, 40217 XDP_PASS = 2, 40218 XDP_TX = 3, 40219 XDP_REDIRECT = 4, 40220 }; 40221 40222 enum xdp_mem_type { 40223 MEM_TYPE_PAGE_SHARED = 0, 40224 MEM_TYPE_PAGE_ORDER0 = 1, 40225 MEM_TYPE_PAGE_POOL = 2, 40226 MEM_TYPE_XSK_BUFF_POOL = 3, 40227 MEM_TYPE_MAX = 4, 40228 }; 40229 40230 struct xdp_cpumap_stats { 40231 unsigned int redirect; 40232 unsigned int pass; 40233 unsigned int drop; 40234 }; 40235 40236 struct bpf_prog_dummy { 40237 struct bpf_prog prog; 40238 }; 40239 40240 typedef u64 (*btf_bpf_user_rnd_u32)(); 40241 40242 typedef u64 (*btf_bpf_get_raw_cpu_id)(); 40243 40244 struct _bpf_dtab_netdev { 40245 struct net_device *dev; 40246 }; 40247 40248 struct rhash_lock_head {}; 40249 40250 struct zero_copy_allocator; 40251 40252 struct page_pool; 40253 40254 struct xdp_mem_allocator { 40255 struct xdp_mem_info mem; 40256 union { 40257 void *allocator; 40258 struct page_pool *page_pool; 40259 struct zero_copy_allocator *zc_alloc; 40260 }; 40261 struct rhash_head node; 40262 struct callback_head rcu; 40263 }; 40264 40265 struct trace_event_raw_xdp_exception { 40266 struct trace_entry ent; 40267 int prog_id; 40268 u32 act; 40269 int ifindex; 40270 char __data[0]; 40271 }; 40272 40273 struct trace_event_raw_xdp_bulk_tx { 40274 struct trace_entry ent; 40275 int ifindex; 40276 u32 act; 40277 int drops; 40278 int sent; 40279 int err; 40280 char __data[0]; 40281 }; 40282 40283 struct trace_event_raw_xdp_redirect_template { 40284 struct trace_entry ent; 40285 int prog_id; 40286 u32 act; 40287 int ifindex; 40288 int err; 40289 int to_ifindex; 40290 u32 map_id; 40291 int map_index; 40292 char __data[0]; 40293 }; 40294 40295 struct trace_event_raw_xdp_cpumap_kthread { 40296 struct trace_entry ent; 40297 int map_id; 40298 u32 act; 40299 int cpu; 40300 unsigned int drops; 40301 unsigned int processed; 40302 int sched; 40303 unsigned int xdp_pass; 40304 unsigned int xdp_drop; 40305 unsigned int xdp_redirect; 40306 char __data[0]; 40307 }; 40308 40309 struct trace_event_raw_xdp_cpumap_enqueue { 40310 struct trace_entry ent; 40311 int map_id; 40312 u32 act; 40313 int cpu; 40314 unsigned int drops; 40315 unsigned int processed; 40316 int to_cpu; 40317 char __data[0]; 40318 }; 40319 40320 struct trace_event_raw_xdp_devmap_xmit { 40321 struct trace_entry ent; 40322 int from_ifindex; 40323 u32 act; 40324 int to_ifindex; 40325 int drops; 40326 int sent; 40327 int err; 40328 char __data[0]; 40329 }; 40330 40331 struct trace_event_raw_mem_disconnect { 40332 struct trace_entry ent; 40333 const struct xdp_mem_allocator *xa; 40334 u32 mem_id; 40335 u32 mem_type; 40336 const void *allocator; 40337 char __data[0]; 40338 }; 40339 40340 struct trace_event_raw_mem_connect { 40341 struct trace_entry ent; 40342 const struct xdp_mem_allocator *xa; 40343 u32 mem_id; 40344 u32 mem_type; 40345 const void *allocator; 40346 const struct xdp_rxq_info *rxq; 40347 int ifindex; 40348 char __data[0]; 40349 }; 40350 40351 struct trace_event_raw_mem_return_failed { 40352 struct trace_entry ent; 40353 const struct page *page; 40354 u32 mem_id; 40355 u32 mem_type; 40356 char __data[0]; 40357 }; 40358 40359 struct trace_event_data_offsets_xdp_exception {}; 40360 40361 struct trace_event_data_offsets_xdp_bulk_tx {}; 40362 40363 struct trace_event_data_offsets_xdp_redirect_template {}; 40364 40365 struct trace_event_data_offsets_xdp_cpumap_kthread {}; 40366 40367 struct trace_event_data_offsets_xdp_cpumap_enqueue {}; 40368 40369 struct trace_event_data_offsets_xdp_devmap_xmit {}; 40370 40371 struct trace_event_data_offsets_mem_disconnect {}; 40372 40373 struct trace_event_data_offsets_mem_connect {}; 40374 40375 struct trace_event_data_offsets_mem_return_failed {}; 40376 40377 typedef void (*btf_trace_xdp_exception)(void *, const struct net_device *, const struct bpf_prog *, u32); 40378 40379 typedef void (*btf_trace_xdp_bulk_tx)(void *, const struct net_device *, int, int, int); 40380 40381 typedef void (*btf_trace_xdp_redirect)(void *, const struct net_device *, const struct bpf_prog *, const void *, int, const struct bpf_map *, u32); 40382 40383 typedef void (*btf_trace_xdp_redirect_err)(void *, const struct net_device *, const struct bpf_prog *, const void *, int, const struct bpf_map *, u32); 40384 40385 typedef void (*btf_trace_xdp_redirect_map)(void *, const struct net_device *, const struct bpf_prog *, const void *, int, const struct bpf_map *, u32); 40386 40387 typedef void (*btf_trace_xdp_redirect_map_err)(void *, const struct net_device *, const struct bpf_prog *, const void *, int, const struct bpf_map *, u32); 40388 40389 typedef void (*btf_trace_xdp_cpumap_kthread)(void *, int, unsigned int, unsigned int, int, struct xdp_cpumap_stats *); 40390 40391 typedef void (*btf_trace_xdp_cpumap_enqueue)(void *, int, unsigned int, unsigned int, int); 40392 40393 typedef void (*btf_trace_xdp_devmap_xmit)(void *, const struct net_device *, const struct net_device *, int, int, int); 40394 40395 typedef void (*btf_trace_mem_disconnect)(void *, const struct xdp_mem_allocator *); 40396 40397 typedef void (*btf_trace_mem_connect)(void *, const struct xdp_mem_allocator *, const struct xdp_rxq_info *); 40398 40399 typedef void (*btf_trace_mem_return_failed)(void *, const struct xdp_mem_info *, const struct page *); 40400 40401 enum bpf_cmd { 40402 BPF_MAP_CREATE = 0, 40403 BPF_MAP_LOOKUP_ELEM = 1, 40404 BPF_MAP_UPDATE_ELEM = 2, 40405 BPF_MAP_DELETE_ELEM = 3, 40406 BPF_MAP_GET_NEXT_KEY = 4, 40407 BPF_PROG_LOAD = 5, 40408 BPF_OBJ_PIN = 6, 40409 BPF_OBJ_GET = 7, 40410 BPF_PROG_ATTACH = 8, 40411 BPF_PROG_DETACH = 9, 40412 BPF_PROG_TEST_RUN = 10, 40413 BPF_PROG_GET_NEXT_ID = 11, 40414 BPF_MAP_GET_NEXT_ID = 12, 40415 BPF_PROG_GET_FD_BY_ID = 13, 40416 BPF_MAP_GET_FD_BY_ID = 14, 40417 BPF_OBJ_GET_INFO_BY_FD = 15, 40418 BPF_PROG_QUERY = 16, 40419 BPF_RAW_TRACEPOINT_OPEN = 17, 40420 BPF_BTF_LOAD = 18, 40421 BPF_BTF_GET_FD_BY_ID = 19, 40422 BPF_TASK_FD_QUERY = 20, 40423 BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21, 40424 BPF_MAP_FREEZE = 22, 40425 BPF_BTF_GET_NEXT_ID = 23, 40426 BPF_MAP_LOOKUP_BATCH = 24, 40427 BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25, 40428 BPF_MAP_UPDATE_BATCH = 26, 40429 BPF_MAP_DELETE_BATCH = 27, 40430 BPF_LINK_CREATE = 28, 40431 BPF_LINK_UPDATE = 29, 40432 BPF_LINK_GET_FD_BY_ID = 30, 40433 BPF_LINK_GET_NEXT_ID = 31, 40434 BPF_ENABLE_STATS = 32, 40435 BPF_ITER_CREATE = 33, 40436 BPF_LINK_DETACH = 34, 40437 BPF_PROG_BIND_MAP = 35, 40438 }; 40439 40440 enum { 40441 BPF_ANY = 0, 40442 BPF_NOEXIST = 1, 40443 BPF_EXIST = 2, 40444 BPF_F_LOCK = 4, 40445 }; 40446 40447 enum { 40448 BPF_F_NO_PREALLOC = 1, 40449 BPF_F_NO_COMMON_LRU = 2, 40450 BPF_F_NUMA_NODE = 4, 40451 BPF_F_RDONLY = 8, 40452 BPF_F_WRONLY = 16, 40453 BPF_F_STACK_BUILD_ID = 32, 40454 BPF_F_ZERO_SEED = 64, 40455 BPF_F_RDONLY_PROG = 128, 40456 BPF_F_WRONLY_PROG = 256, 40457 BPF_F_CLONE = 512, 40458 BPF_F_MMAPABLE = 1024, 40459 BPF_F_PRESERVE_ELEMS = 2048, 40460 BPF_F_INNER_MAP = 4096, 40461 }; 40462 40463 enum bpf_stats_type { 40464 BPF_STATS_RUN_TIME = 0, 40465 }; 40466 40467 struct bpf_prog_info { 40468 __u32 type; 40469 __u32 id; 40470 __u8 tag[8]; 40471 __u32 jited_prog_len; 40472 __u32 xlated_prog_len; 40473 __u64 jited_prog_insns; 40474 __u64 xlated_prog_insns; 40475 __u64 load_time; 40476 __u32 created_by_uid; 40477 __u32 nr_map_ids; 40478 __u64 map_ids; 40479 char name[16]; 40480 __u32 ifindex; 40481 __u32 gpl_compatible: 1; 40482 __u64 netns_dev; 40483 __u64 netns_ino; 40484 __u32 nr_jited_ksyms; 40485 __u32 nr_jited_func_lens; 40486 __u64 jited_ksyms; 40487 __u64 jited_func_lens; 40488 __u32 btf_id; 40489 __u32 func_info_rec_size; 40490 __u64 func_info; 40491 __u32 nr_func_info; 40492 __u32 nr_line_info; 40493 __u64 line_info; 40494 __u64 jited_line_info; 40495 __u32 nr_jited_line_info; 40496 __u32 line_info_rec_size; 40497 __u32 jited_line_info_rec_size; 40498 __u32 nr_prog_tags; 40499 __u64 prog_tags; 40500 __u64 run_time_ns; 40501 __u64 run_cnt; 40502 }; 40503 40504 struct bpf_map_info { 40505 __u32 type; 40506 __u32 id; 40507 __u32 key_size; 40508 __u32 value_size; 40509 __u32 max_entries; 40510 __u32 map_flags; 40511 char name[16]; 40512 __u32 ifindex; 40513 __u32 btf_vmlinux_value_type_id; 40514 __u64 netns_dev; 40515 __u64 netns_ino; 40516 __u32 btf_id; 40517 __u32 btf_key_type_id; 40518 __u32 btf_value_type_id; 40519 }; 40520 40521 struct bpf_btf_info { 40522 __u64 btf; 40523 __u32 btf_size; 40524 __u32 id; 40525 __u64 name; 40526 __u32 name_len; 40527 __u32 kernel_btf; 40528 }; 40529 40530 struct bpf_spin_lock { 40531 __u32 val; 40532 }; 40533 40534 struct bpf_verifier_log { 40535 u32 level; 40536 char kbuf[1024]; 40537 char *ubuf; 40538 u32 len_used; 40539 u32 len_total; 40540 }; 40541 40542 struct bpf_attach_target_info { 40543 struct btf_func_model fmodel; 40544 long int tgt_addr; 40545 const char *tgt_name; 40546 const struct btf_type *tgt_type; 40547 }; 40548 40549 struct bpf_link_primer { 40550 struct bpf_link *link; 40551 struct file *file; 40552 int fd; 40553 u32 id; 40554 }; 40555 40556 enum perf_bpf_event_type { 40557 PERF_BPF_EVENT_UNKNOWN = 0, 40558 PERF_BPF_EVENT_PROG_LOAD = 1, 40559 PERF_BPF_EVENT_PROG_UNLOAD = 2, 40560 PERF_BPF_EVENT_MAX = 3, 40561 }; 40562 40563 enum bpf_audit { 40564 BPF_AUDIT_LOAD = 0, 40565 BPF_AUDIT_UNLOAD = 1, 40566 BPF_AUDIT_MAX = 2, 40567 }; 40568 40569 struct bpf_tracing_link { 40570 struct bpf_link link; 40571 enum bpf_attach_type attach_type; 40572 struct bpf_trampoline *trampoline; 40573 struct bpf_prog *tgt_prog; 40574 }; 40575 40576 struct bpf_raw_tp_link { 40577 struct bpf_link link; 40578 struct bpf_raw_event_map *btp; 40579 }; 40580 40581 struct btf_member { 40582 __u32 name_off; 40583 __u32 type; 40584 __u32 offset; 40585 }; 40586 40587 enum btf_func_linkage { 40588 BTF_FUNC_STATIC = 0, 40589 BTF_FUNC_GLOBAL = 1, 40590 BTF_FUNC_EXTERN = 2, 40591 }; 40592 40593 struct btf_var_secinfo { 40594 __u32 type; 40595 __u32 offset; 40596 __u32 size; 40597 }; 40598 40599 enum sk_action { 40600 SK_DROP = 0, 40601 SK_PASS = 1, 40602 }; 40603 40604 struct bpf_subprog_info { 40605 u32 start; 40606 u32 linfo_idx; 40607 u16 stack_depth; 40608 bool has_tail_call; 40609 bool tail_call_reachable; 40610 bool has_ld_abs; 40611 }; 40612 40613 struct bpf_verifier_stack_elem; 40614 40615 struct bpf_verifier_state; 40616 40617 struct bpf_verifier_state_list; 40618 40619 struct bpf_insn_aux_data; 40620 40621 struct bpf_verifier_env { 40622 u32 insn_idx; 40623 u32 prev_insn_idx; 40624 struct bpf_prog *prog; 40625 const struct bpf_verifier_ops *ops; 40626 struct bpf_verifier_stack_elem *head; 40627 int stack_size; 40628 bool strict_alignment; 40629 bool test_state_freq; 40630 struct bpf_verifier_state *cur_state; 40631 struct bpf_verifier_state_list **explored_states; 40632 struct bpf_verifier_state_list *free_list; 40633 struct bpf_map *used_maps[64]; 40634 u32 used_map_cnt; 40635 u32 id_gen; 40636 bool allow_ptr_leaks; 40637 bool allow_uninit_stack; 40638 bool allow_ptr_to_map_access; 40639 bool bpf_capable; 40640 bool bypass_spec_v1; 40641 bool bypass_spec_v4; 40642 bool seen_direct_write; 40643 struct bpf_insn_aux_data *insn_aux_data; 40644 const struct bpf_line_info *prev_linfo; 40645 struct bpf_verifier_log log; 40646 struct bpf_subprog_info subprog_info[257]; 40647 struct { 40648 int *insn_state; 40649 int *insn_stack; 40650 int cur_stack; 40651 } cfg; 40652 u32 pass_cnt; 40653 u32 subprog_cnt; 40654 u32 prev_insn_processed; 40655 u32 insn_processed; 40656 u32 prev_jmps_processed; 40657 u32 jmps_processed; 40658 u64 verification_time; 40659 u32 max_states_per_insn; 40660 u32 total_states; 40661 u32 peak_states; 40662 u32 longest_mark_read_walk; 40663 }; 40664 40665 struct bpf_struct_ops { 40666 const struct bpf_verifier_ops *verifier_ops; 40667 int (*init)(struct btf *); 40668 int (*check_member)(const struct btf_type *, const struct btf_member *); 40669 int (*init_member)(const struct btf_type *, const struct btf_member *, void *, const void *); 40670 int (*reg)(void *); 40671 void (*unreg)(void *); 40672 const struct btf_type *type; 40673 const struct btf_type *value_type; 40674 const char *name; 40675 struct btf_func_model func_models[64]; 40676 u32 type_id; 40677 u32 value_id; 40678 }; 40679 40680 typedef u32 (*bpf_convert_ctx_access_t)(enum bpf_access_type, const struct bpf_insn *, struct bpf_insn *, struct bpf_prog *, u32 *); 40681 40682 struct tnum { 40683 u64 value; 40684 u64 mask; 40685 }; 40686 40687 enum bpf_reg_liveness { 40688 REG_LIVE_NONE = 0, 40689 REG_LIVE_READ32 = 1, 40690 REG_LIVE_READ64 = 2, 40691 REG_LIVE_READ = 3, 40692 REG_LIVE_WRITTEN = 4, 40693 REG_LIVE_DONE = 8, 40694 }; 40695 40696 struct bpf_reg_state { 40697 enum bpf_reg_type type; 40698 s32 off; 40699 union { 40700 int range; 40701 struct bpf_map *map_ptr; 40702 struct { 40703 struct btf *btf; 40704 u32 btf_id; 40705 }; 40706 u32 mem_size; 40707 struct { 40708 long unsigned int raw1; 40709 long unsigned int raw2; 40710 } raw; 40711 }; 40712 u32 id; 40713 u32 ref_obj_id; 40714 struct tnum var_off; 40715 s64 smin_value; 40716 s64 smax_value; 40717 u64 umin_value; 40718 u64 umax_value; 40719 s32 s32_min_value; 40720 s32 s32_max_value; 40721 u32 u32_min_value; 40722 u32 u32_max_value; 40723 struct bpf_reg_state *parent; 40724 u32 frameno; 40725 s32 subreg_def; 40726 enum bpf_reg_liveness live; 40727 bool precise; 40728 }; 40729 40730 enum bpf_stack_slot_type { 40731 STACK_INVALID = 0, 40732 STACK_SPILL = 1, 40733 STACK_MISC = 2, 40734 STACK_ZERO = 3, 40735 }; 40736 40737 struct bpf_stack_state { 40738 struct bpf_reg_state spilled_ptr; 40739 u8 slot_type[8]; 40740 }; 40741 40742 struct bpf_reference_state { 40743 int id; 40744 int insn_idx; 40745 }; 40746 40747 struct bpf_func_state { 40748 struct bpf_reg_state regs[11]; 40749 int callsite; 40750 u32 frameno; 40751 u32 subprogno; 40752 int acquired_refs; 40753 struct bpf_reference_state *refs; 40754 int allocated_stack; 40755 struct bpf_stack_state *stack; 40756 }; 40757 40758 struct bpf_idx_pair { 40759 u32 prev_idx; 40760 u32 idx; 40761 }; 40762 40763 struct bpf_verifier_state { 40764 struct bpf_func_state *frame[8]; 40765 struct bpf_verifier_state *parent; 40766 u32 branches; 40767 u32 insn_idx; 40768 u32 curframe; 40769 u32 active_spin_lock; 40770 bool speculative; 40771 u32 first_insn_idx; 40772 u32 last_insn_idx; 40773 struct bpf_idx_pair *jmp_history; 40774 u32 jmp_history_cnt; 40775 }; 40776 40777 struct bpf_verifier_state_list { 40778 struct bpf_verifier_state state; 40779 struct bpf_verifier_state_list *next; 40780 int miss_cnt; 40781 int hit_cnt; 40782 }; 40783 40784 struct bpf_insn_aux_data { 40785 union { 40786 enum bpf_reg_type ptr_type; 40787 long unsigned int map_ptr_state; 40788 s32 call_imm; 40789 u32 alu_limit; 40790 struct { 40791 u32 map_index; 40792 u32 map_off; 40793 }; 40794 struct { 40795 enum bpf_reg_type reg_type; 40796 union { 40797 struct { 40798 struct btf *btf; 40799 u32 btf_id; 40800 }; 40801 u32 mem_size; 40802 }; 40803 } btf_var; 40804 }; 40805 u64 map_key_state; 40806 int ctx_field_size; 40807 int sanitize_stack_off; 40808 u32 seen; 40809 bool zext_dst; 40810 u8 alu_state; 40811 unsigned int orig_idx; 40812 bool prune_point; 40813 }; 40814 40815 struct bpf_verifier_stack_elem { 40816 struct bpf_verifier_state st; 40817 int insn_idx; 40818 int prev_insn_idx; 40819 struct bpf_verifier_stack_elem *next; 40820 u32 log_pos; 40821 }; 40822 40823 enum { 40824 BTF_SOCK_TYPE_INET = 0, 40825 BTF_SOCK_TYPE_INET_CONN = 1, 40826 BTF_SOCK_TYPE_INET_REQ = 2, 40827 BTF_SOCK_TYPE_INET_TW = 3, 40828 BTF_SOCK_TYPE_REQ = 4, 40829 BTF_SOCK_TYPE_SOCK = 5, 40830 BTF_SOCK_TYPE_SOCK_COMMON = 6, 40831 BTF_SOCK_TYPE_TCP = 7, 40832 BTF_SOCK_TYPE_TCP_REQ = 8, 40833 BTF_SOCK_TYPE_TCP_TW = 9, 40834 BTF_SOCK_TYPE_TCP6 = 10, 40835 BTF_SOCK_TYPE_UDP = 11, 40836 BTF_SOCK_TYPE_UDP6 = 12, 40837 MAX_BTF_SOCK_TYPE = 13, 40838 }; 40839 40840 typedef void (*bpf_insn_print_t)(void *, const char *, ...); 40841 40842 typedef const char * (*bpf_insn_revmap_call_t)(void *, const struct bpf_insn *); 40843 40844 typedef const char * (*bpf_insn_print_imm_t)(void *, const struct bpf_insn *, __u64); 40845 40846 struct bpf_insn_cbs { 40847 bpf_insn_print_t cb_print; 40848 bpf_insn_revmap_call_t cb_call; 40849 bpf_insn_print_imm_t cb_imm; 40850 void *private_data; 40851 }; 40852 40853 struct bpf_call_arg_meta { 40854 struct bpf_map *map_ptr; 40855 bool raw_mode; 40856 bool pkt_access; 40857 int regno; 40858 int access_size; 40859 int mem_size; 40860 u64 msize_max_value; 40861 int ref_obj_id; 40862 int func_id; 40863 struct btf *btf; 40864 u32 btf_id; 40865 struct btf *ret_btf; 40866 u32 ret_btf_id; 40867 }; 40868 40869 enum reg_arg_type { 40870 SRC_OP = 0, 40871 DST_OP = 1, 40872 DST_OP_NO_MARK = 2, 40873 }; 40874 40875 enum stack_access_src { 40876 ACCESS_DIRECT = 1, 40877 ACCESS_HELPER = 2, 40878 }; 40879 40880 struct bpf_reg_types { 40881 const enum bpf_reg_type types[10]; 40882 u32 *btf_id; 40883 }; 40884 40885 enum { 40886 AT_PKT_END = 4294967295, 40887 BEYOND_PKT_END = 4294967294, 40888 }; 40889 40890 enum { 40891 REASON_BOUNDS = 4294967295, 40892 REASON_TYPE = 4294967294, 40893 REASON_PATHS = 4294967293, 40894 REASON_LIMIT = 4294967292, 40895 REASON_STACK = 4294967291, 40896 }; 40897 40898 enum { 40899 DISCOVERED = 16, 40900 EXPLORED = 32, 40901 FALLTHROUGH = 1, 40902 BRANCH = 2, 40903 }; 40904 40905 enum { 40906 DONE_EXPLORING = 0, 40907 KEEP_EXPLORING = 1, 40908 }; 40909 40910 struct idpair { 40911 u32 old; 40912 u32 cur; 40913 }; 40914 40915 struct tree_descr { 40916 const char *name; 40917 const struct file_operations *ops; 40918 int mode; 40919 }; 40920 40921 struct bpf_preload_info { 40922 char link_name[16]; 40923 int link_id; 40924 }; 40925 40926 struct bpf_preload_ops { 40927 struct umd_info info; 40928 int (*preload)(struct bpf_preload_info *); 40929 int (*finish)(); 40930 struct module *owner; 40931 }; 40932 40933 enum bpf_type { 40934 BPF_TYPE_UNSPEC = 0, 40935 BPF_TYPE_PROG = 1, 40936 BPF_TYPE_MAP = 2, 40937 BPF_TYPE_LINK = 3, 40938 }; 40939 40940 struct map_iter { 40941 void *key; 40942 bool done; 40943 }; 40944 40945 enum { 40946 OPT_MODE = 0, 40947 }; 40948 40949 struct bpf_mount_opts { 40950 umode_t mode; 40951 }; 40952 40953 struct bpf_pidns_info { 40954 __u32 pid; 40955 __u32 tgid; 40956 }; 40957 40958 typedef u64 (*btf_bpf_map_lookup_elem)(struct bpf_map *, void *); 40959 40960 typedef u64 (*btf_bpf_map_update_elem)(struct bpf_map *, void *, void *, u64); 40961 40962 typedef u64 (*btf_bpf_map_delete_elem)(struct bpf_map *, void *); 40963 40964 typedef u64 (*btf_bpf_map_push_elem)(struct bpf_map *, void *, u64); 40965 40966 typedef u64 (*btf_bpf_map_pop_elem)(struct bpf_map *, void *); 40967 40968 typedef u64 (*btf_bpf_map_peek_elem)(struct bpf_map *, void *); 40969 40970 typedef u64 (*btf_bpf_get_smp_processor_id)(); 40971 40972 typedef u64 (*btf_bpf_get_numa_node_id)(); 40973 40974 typedef u64 (*btf_bpf_ktime_get_ns)(); 40975 40976 typedef u64 (*btf_bpf_ktime_get_boot_ns)(); 40977 40978 typedef u64 (*btf_bpf_ktime_get_coarse_ns)(); 40979 40980 typedef u64 (*btf_bpf_get_current_pid_tgid)(); 40981 40982 typedef u64 (*btf_bpf_get_current_uid_gid)(); 40983 40984 typedef u64 (*btf_bpf_get_current_comm)(char *, u32); 40985 40986 typedef u64 (*btf_bpf_spin_lock)(struct bpf_spin_lock *); 40987 40988 typedef u64 (*btf_bpf_spin_unlock)(struct bpf_spin_lock *); 40989 40990 typedef u64 (*btf_bpf_jiffies64)(); 40991 40992 typedef u64 (*btf_bpf_get_current_cgroup_id)(); 40993 40994 typedef u64 (*btf_bpf_get_current_ancestor_cgroup_id)(int); 40995 40996 typedef u64 (*btf_bpf_get_local_storage)(struct bpf_map *, u64); 40997 40998 typedef u64 (*btf_bpf_strtol)(const char *, size_t, u64, long int *); 40999 41000 typedef u64 (*btf_bpf_strtoul)(const char *, size_t, u64, long unsigned int *); 41001 41002 typedef u64 (*btf_bpf_get_ns_current_pid_tgid)(u64, u64, struct bpf_pidns_info *, u32); 41003 41004 typedef u64 (*btf_bpf_event_output_data)(void *, struct bpf_map *, u64, void *, u64); 41005 41006 typedef u64 (*btf_bpf_copy_from_user)(void *, u32, const void *); 41007 41008 typedef u64 (*btf_bpf_per_cpu_ptr)(const void *, u32); 41009 41010 typedef u64 (*btf_bpf_this_cpu_ptr)(const void *); 41011 41012 union bpf_iter_link_info { 41013 struct { 41014 __u32 map_fd; 41015 } map; 41016 }; 41017 41018 typedef int (*bpf_iter_attach_target_t)(struct bpf_prog *, union bpf_iter_link_info *, struct bpf_iter_aux_info *); 41019 41020 typedef void (*bpf_iter_detach_target_t)(struct bpf_iter_aux_info *); 41021 41022 typedef void (*bpf_iter_show_fdinfo_t)(const struct bpf_iter_aux_info *, struct seq_file *); 41023 41024 typedef int (*bpf_iter_fill_link_info_t)(const struct bpf_iter_aux_info *, struct bpf_link_info *); 41025 41026 enum bpf_iter_feature { 41027 BPF_ITER_RESCHED = 1, 41028 }; 41029 41030 struct bpf_iter_reg { 41031 const char *target; 41032 bpf_iter_attach_target_t attach_target; 41033 bpf_iter_detach_target_t detach_target; 41034 bpf_iter_show_fdinfo_t show_fdinfo; 41035 bpf_iter_fill_link_info_t fill_link_info; 41036 u32 ctx_arg_info_size; 41037 u32 feature; 41038 struct bpf_ctx_arg_aux ctx_arg_info[2]; 41039 const struct bpf_iter_seq_info *seq_info; 41040 }; 41041 41042 struct bpf_iter_meta { 41043 union { 41044 struct seq_file *seq; 41045 }; 41046 u64 session_id; 41047 u64 seq_num; 41048 }; 41049 41050 struct bpf_iter_target_info { 41051 struct list_head list; 41052 const struct bpf_iter_reg *reg_info; 41053 u32 btf_id; 41054 }; 41055 41056 struct bpf_iter_link { 41057 struct bpf_link link; 41058 struct bpf_iter_aux_info aux; 41059 struct bpf_iter_target_info *tinfo; 41060 }; 41061 41062 struct bpf_iter_priv_data { 41063 struct bpf_iter_target_info *tinfo; 41064 const struct bpf_iter_seq_info *seq_info; 41065 struct bpf_prog *prog; 41066 u64 session_id; 41067 u64 seq_num; 41068 bool done_stop; 41069 long: 56; 41070 u8 target_private[0]; 41071 }; 41072 41073 struct bpf_iter_seq_map_info { 41074 u32 map_id; 41075 }; 41076 41077 struct bpf_iter__bpf_map { 41078 union { 41079 struct bpf_iter_meta *meta; 41080 }; 41081 union { 41082 struct bpf_map *map; 41083 }; 41084 }; 41085 41086 struct bpf_iter_seq_task_common { 41087 struct pid_namespace *ns; 41088 }; 41089 41090 struct bpf_iter_seq_task_info { 41091 struct bpf_iter_seq_task_common common; 41092 u32 tid; 41093 }; 41094 41095 struct bpf_iter__task { 41096 union { 41097 struct bpf_iter_meta *meta; 41098 }; 41099 union { 41100 struct task_struct *task; 41101 }; 41102 }; 41103 41104 struct bpf_iter_seq_task_file_info { 41105 struct bpf_iter_seq_task_common common; 41106 struct task_struct *task; 41107 u32 tid; 41108 u32 fd; 41109 }; 41110 41111 struct bpf_iter__task_file { 41112 union { 41113 struct bpf_iter_meta *meta; 41114 }; 41115 union { 41116 struct task_struct *task; 41117 }; 41118 u32 fd; 41119 union { 41120 struct file *file; 41121 }; 41122 }; 41123 41124 struct bpf_iter_seq_prog_info { 41125 u32 prog_id; 41126 }; 41127 41128 struct bpf_iter__bpf_prog { 41129 union { 41130 struct bpf_iter_meta *meta; 41131 }; 41132 union { 41133 struct bpf_prog *prog; 41134 }; 41135 }; 41136 41137 struct bpf_iter__bpf_map_elem { 41138 union { 41139 struct bpf_iter_meta *meta; 41140 }; 41141 union { 41142 struct bpf_map *map; 41143 }; 41144 union { 41145 void *key; 41146 }; 41147 union { 41148 void *value; 41149 }; 41150 }; 41151 41152 struct pcpu_freelist_node; 41153 41154 struct pcpu_freelist_head { 41155 struct pcpu_freelist_node *first; 41156 raw_spinlock_t lock; 41157 }; 41158 41159 struct pcpu_freelist_node { 41160 struct pcpu_freelist_node *next; 41161 }; 41162 41163 struct pcpu_freelist { 41164 struct pcpu_freelist_head *freelist; 41165 struct pcpu_freelist_head extralist; 41166 }; 41167 41168 struct bpf_lru_node { 41169 struct list_head list; 41170 u16 cpu; 41171 u8 type; 41172 u8 ref; 41173 }; 41174 41175 struct bpf_lru_list { 41176 struct list_head lists[3]; 41177 unsigned int counts[2]; 41178 struct list_head *next_inactive_rotation; 41179 raw_spinlock_t lock; 41180 long: 32; 41181 long: 64; 41182 long: 64; 41183 long: 64; 41184 long: 64; 41185 long: 64; 41186 long: 64; 41187 long: 64; 41188 }; 41189 41190 struct bpf_lru_locallist { 41191 struct list_head lists[2]; 41192 u16 next_steal; 41193 raw_spinlock_t lock; 41194 }; 41195 41196 struct bpf_common_lru { 41197 struct bpf_lru_list lru_list; 41198 struct bpf_lru_locallist *local_list; 41199 long: 64; 41200 long: 64; 41201 long: 64; 41202 long: 64; 41203 long: 64; 41204 long: 64; 41205 long: 64; 41206 }; 41207 41208 typedef bool (*del_from_htab_func)(void *, struct bpf_lru_node *); 41209 41210 struct bpf_lru { 41211 union { 41212 struct bpf_common_lru common_lru; 41213 struct bpf_lru_list *percpu_lru; 41214 }; 41215 del_from_htab_func del_from_htab; 41216 void *del_arg; 41217 unsigned int hash_offset; 41218 unsigned int nr_scans; 41219 bool percpu; 41220 long: 56; 41221 long: 64; 41222 long: 64; 41223 long: 64; 41224 long: 64; 41225 }; 41226 41227 struct bucket { 41228 struct hlist_nulls_head head; 41229 union { 41230 raw_spinlock_t raw_lock; 41231 spinlock_t lock; 41232 }; 41233 }; 41234 41235 struct htab_elem; 41236 41237 struct bpf_htab { 41238 struct bpf_map map; 41239 struct bucket *buckets; 41240 void *elems; 41241 long: 64; 41242 long: 64; 41243 long: 64; 41244 long: 64; 41245 long: 64; 41246 long: 64; 41247 union { 41248 struct pcpu_freelist freelist; 41249 struct bpf_lru lru; 41250 }; 41251 struct htab_elem **extra_elems; 41252 atomic_t count; 41253 u32 n_buckets; 41254 u32 elem_size; 41255 u32 hashrnd; 41256 struct lock_class_key lockdep_key; 41257 int *map_locked[8]; 41258 long: 64; 41259 long: 64; 41260 long: 64; 41261 long: 64; 41262 long: 64; 41263 }; 41264 41265 struct htab_elem { 41266 union { 41267 struct hlist_nulls_node hash_node; 41268 struct { 41269 void *padding; 41270 union { 41271 struct bpf_htab *htab; 41272 struct pcpu_freelist_node fnode; 41273 struct htab_elem *batch_flink; 41274 }; 41275 }; 41276 }; 41277 union { 41278 struct callback_head rcu; 41279 struct bpf_lru_node lru_node; 41280 }; 41281 u32 hash; 41282 int: 32; 41283 char key[0]; 41284 }; 41285 41286 struct bpf_iter_seq_hash_map_info { 41287 struct bpf_map *map; 41288 struct bpf_htab *htab; 41289 void *percpu_value_buf; 41290 u32 bucket_id; 41291 u32 skip_elems; 41292 }; 41293 41294 struct bpf_iter_seq_array_map_info { 41295 struct bpf_map *map; 41296 void *percpu_value_buf; 41297 u32 index; 41298 }; 41299 41300 struct prog_poke_elem { 41301 struct list_head list; 41302 struct bpf_prog_aux *aux; 41303 }; 41304 41305 enum bpf_lru_list_type { 41306 BPF_LRU_LIST_T_ACTIVE = 0, 41307 BPF_LRU_LIST_T_INACTIVE = 1, 41308 BPF_LRU_LIST_T_FREE = 2, 41309 BPF_LRU_LOCAL_LIST_T_FREE = 3, 41310 BPF_LRU_LOCAL_LIST_T_PENDING = 4, 41311 }; 41312 41313 struct bpf_lpm_trie_key { 41314 __u32 prefixlen; 41315 __u8 data[0]; 41316 }; 41317 41318 struct lpm_trie_node { 41319 struct callback_head rcu; 41320 struct lpm_trie_node *child[2]; 41321 u32 prefixlen; 41322 u32 flags; 41323 u8 data[0]; 41324 }; 41325 41326 struct lpm_trie { 41327 struct bpf_map map; 41328 struct lpm_trie_node *root; 41329 size_t n_entries; 41330 size_t max_prefixlen; 41331 size_t data_size; 41332 spinlock_t lock; 41333 long: 32; 41334 long: 64; 41335 long: 64; 41336 long: 64; 41337 }; 41338 41339 struct bpf_cgroup_storage_map { 41340 struct bpf_map map; 41341 spinlock_t lock; 41342 struct rb_root root; 41343 struct list_head list; 41344 long: 64; 41345 long: 64; 41346 long: 64; 41347 long: 64; 41348 }; 41349 41350 struct bpf_queue_stack { 41351 struct bpf_map map; 41352 raw_spinlock_t lock; 41353 u32 head; 41354 u32 tail; 41355 u32 size; 41356 char elements[0]; 41357 long: 64; 41358 long: 64; 41359 long: 64; 41360 long: 64; 41361 long: 64; 41362 long: 64; 41363 }; 41364 41365 enum { 41366 BPF_RB_NO_WAKEUP = 1, 41367 BPF_RB_FORCE_WAKEUP = 2, 41368 }; 41369 41370 enum { 41371 BPF_RB_AVAIL_DATA = 0, 41372 BPF_RB_RING_SIZE = 1, 41373 BPF_RB_CONS_POS = 2, 41374 BPF_RB_PROD_POS = 3, 41375 }; 41376 41377 enum { 41378 BPF_RINGBUF_BUSY_BIT = 2147483648, 41379 BPF_RINGBUF_DISCARD_BIT = 1073741824, 41380 BPF_RINGBUF_HDR_SZ = 8, 41381 }; 41382 41383 struct bpf_ringbuf { 41384 wait_queue_head_t waitq; 41385 struct irq_work work; 41386 u64 mask; 41387 struct page **pages; 41388 int nr_pages; 41389 long: 32; 41390 long: 64; 41391 long: 64; 41392 long: 64; 41393 long: 64; 41394 long: 64; 41395 long: 64; 41396 long: 64; 41397 spinlock_t spinlock; 41398 long: 32; 41399 long: 64; 41400 long: 64; 41401 long: 64; 41402 long: 64; 41403 long: 64; 41404 long: 64; 41405 long: 64; 41406 long: 64; 41407 long: 64; 41408 long: 64; 41409 long: 64; 41410 long: 64; 41411 long: 64; 41412 long: 64; 41413 long: 64; 41414 long: 64; 41415 long: 64; 41416 long: 64; 41417 long: 64; 41418 long: 64; 41419 long: 64; 41420 long: 64; 41421 long: 64; 41422 long: 64; 41423 long: 64; 41424 long: 64; 41425 long: 64; 41426 long: 64; 41427 long: 64; 41428 long: 64; 41429 long: 64; 41430 long: 64; 41431 long: 64; 41432 long: 64; 41433 long: 64; 41434 long: 64; 41435 long: 64; 41436 long: 64; 41437 long: 64; 41438 long: 64; 41439 long: 64; 41440 long: 64; 41441 long: 64; 41442 long: 64; 41443 long: 64; 41444 long: 64; 41445 long: 64; 41446 long: 64; 41447 long: 64; 41448 long: 64; 41449 long: 64; 41450 long: 64; 41451 long: 64; 41452 long: 64; 41453 long: 64; 41454 long: 64; 41455 long: 64; 41456 long: 64; 41457 long: 64; 41458 long: 64; 41459 long: 64; 41460 long: 64; 41461 long: 64; 41462 long: 64; 41463 long: 64; 41464 long: 64; 41465 long: 64; 41466 long: 64; 41467 long: 64; 41468 long: 64; 41469 long: 64; 41470 long: 64; 41471 long: 64; 41472 long: 64; 41473 long: 64; 41474 long: 64; 41475 long: 64; 41476 long: 64; 41477 long: 64; 41478 long: 64; 41479 long: 64; 41480 long: 64; 41481 long: 64; 41482 long: 64; 41483 long: 64; 41484 long: 64; 41485 long: 64; 41486 long: 64; 41487 long: 64; 41488 long: 64; 41489 long: 64; 41490 long: 64; 41491 long: 64; 41492 long: 64; 41493 long: 64; 41494 long: 64; 41495 long: 64; 41496 long: 64; 41497 long: 64; 41498 long: 64; 41499 long: 64; 41500 long: 64; 41501 long: 64; 41502 long: 64; 41503 long: 64; 41504 long: 64; 41505 long: 64; 41506 long: 64; 41507 long: 64; 41508 long: 64; 41509 long: 64; 41510 long: 64; 41511 long: 64; 41512 long: 64; 41513 long: 64; 41514 long: 64; 41515 long: 64; 41516 long: 64; 41517 long: 64; 41518 long: 64; 41519 long: 64; 41520 long: 64; 41521 long: 64; 41522 long: 64; 41523 long: 64; 41524 long: 64; 41525 long: 64; 41526 long: 64; 41527 long: 64; 41528 long: 64; 41529 long: 64; 41530 long: 64; 41531 long: 64; 41532 long: 64; 41533 long: 64; 41534 long: 64; 41535 long: 64; 41536 long: 64; 41537 long: 64; 41538 long: 64; 41539 long: 64; 41540 long: 64; 41541 long: 64; 41542 long: 64; 41543 long: 64; 41544 long: 64; 41545 long: 64; 41546 long: 64; 41547 long: 64; 41548 long: 64; 41549 long: 64; 41550 long: 64; 41551 long: 64; 41552 long: 64; 41553 long: 64; 41554 long: 64; 41555 long: 64; 41556 long: 64; 41557 long: 64; 41558 long: 64; 41559 long: 64; 41560 long: 64; 41561 long: 64; 41562 long: 64; 41563 long: 64; 41564 long: 64; 41565 long: 64; 41566 long: 64; 41567 long: 64; 41568 long: 64; 41569 long: 64; 41570 long: 64; 41571 long: 64; 41572 long: 64; 41573 long: 64; 41574 long: 64; 41575 long: 64; 41576 long: 64; 41577 long: 64; 41578 long: 64; 41579 long: 64; 41580 long: 64; 41581 long: 64; 41582 long: 64; 41583 long: 64; 41584 long: 64; 41585 long: 64; 41586 long: 64; 41587 long: 64; 41588 long: 64; 41589 long: 64; 41590 long: 64; 41591 long: 64; 41592 long: 64; 41593 long: 64; 41594 long: 64; 41595 long: 64; 41596 long: 64; 41597 long: 64; 41598 long: 64; 41599 long: 64; 41600 long: 64; 41601 long: 64; 41602 long: 64; 41603 long: 64; 41604 long: 64; 41605 long: 64; 41606 long: 64; 41607 long: 64; 41608 long: 64; 41609 long: 64; 41610 long: 64; 41611 long: 64; 41612 long: 64; 41613 long: 64; 41614 long: 64; 41615 long: 64; 41616 long: 64; 41617 long: 64; 41618 long: 64; 41619 long: 64; 41620 long: 64; 41621 long: 64; 41622 long: 64; 41623 long: 64; 41624 long: 64; 41625 long: 64; 41626 long: 64; 41627 long: 64; 41628 long: 64; 41629 long: 64; 41630 long: 64; 41631 long: 64; 41632 long: 64; 41633 long: 64; 41634 long: 64; 41635 long: 64; 41636 long: 64; 41637 long: 64; 41638 long: 64; 41639 long: 64; 41640 long: 64; 41641 long: 64; 41642 long: 64; 41643 long: 64; 41644 long: 64; 41645 long: 64; 41646 long: 64; 41647 long: 64; 41648 long: 64; 41649 long: 64; 41650 long: 64; 41651 long: 64; 41652 long: 64; 41653 long: 64; 41654 long: 64; 41655 long: 64; 41656 long: 64; 41657 long: 64; 41658 long: 64; 41659 long: 64; 41660 long: 64; 41661 long: 64; 41662 long: 64; 41663 long: 64; 41664 long: 64; 41665 long: 64; 41666 long: 64; 41667 long: 64; 41668 long: 64; 41669 long: 64; 41670 long: 64; 41671 long: 64; 41672 long: 64; 41673 long: 64; 41674 long: 64; 41675 long: 64; 41676 long: 64; 41677 long: 64; 41678 long: 64; 41679 long: 64; 41680 long: 64; 41681 long: 64; 41682 long: 64; 41683 long: 64; 41684 long: 64; 41685 long: 64; 41686 long: 64; 41687 long: 64; 41688 long: 64; 41689 long: 64; 41690 long: 64; 41691 long: 64; 41692 long: 64; 41693 long: 64; 41694 long: 64; 41695 long: 64; 41696 long: 64; 41697 long: 64; 41698 long: 64; 41699 long: 64; 41700 long: 64; 41701 long: 64; 41702 long: 64; 41703 long: 64; 41704 long: 64; 41705 long: 64; 41706 long: 64; 41707 long: 64; 41708 long: 64; 41709 long: 64; 41710 long: 64; 41711 long: 64; 41712 long: 64; 41713 long: 64; 41714 long: 64; 41715 long: 64; 41716 long: 64; 41717 long: 64; 41718 long: 64; 41719 long: 64; 41720 long: 64; 41721 long: 64; 41722 long: 64; 41723 long: 64; 41724 long: 64; 41725 long: 64; 41726 long: 64; 41727 long: 64; 41728 long: 64; 41729 long: 64; 41730 long: 64; 41731 long: 64; 41732 long: 64; 41733 long: 64; 41734 long: 64; 41735 long: 64; 41736 long: 64; 41737 long: 64; 41738 long: 64; 41739 long: 64; 41740 long: 64; 41741 long: 64; 41742 long: 64; 41743 long: 64; 41744 long: 64; 41745 long: 64; 41746 long: 64; 41747 long: 64; 41748 long: 64; 41749 long: 64; 41750 long: 64; 41751 long: 64; 41752 long: 64; 41753 long: 64; 41754 long: 64; 41755 long: 64; 41756 long: 64; 41757 long: 64; 41758 long: 64; 41759 long: 64; 41760 long: 64; 41761 long: 64; 41762 long: 64; 41763 long: 64; 41764 long: 64; 41765 long: 64; 41766 long: 64; 41767 long: 64; 41768 long: 64; 41769 long: 64; 41770 long: 64; 41771 long: 64; 41772 long: 64; 41773 long: 64; 41774 long: 64; 41775 long: 64; 41776 long: 64; 41777 long: 64; 41778 long: 64; 41779 long: 64; 41780 long: 64; 41781 long: 64; 41782 long: 64; 41783 long: 64; 41784 long: 64; 41785 long: 64; 41786 long: 64; 41787 long: 64; 41788 long: 64; 41789 long: 64; 41790 long: 64; 41791 long: 64; 41792 long: 64; 41793 long: 64; 41794 long: 64; 41795 long: 64; 41796 long: 64; 41797 long: 64; 41798 long: 64; 41799 long: 64; 41800 long: 64; 41801 long: 64; 41802 long: 64; 41803 long: 64; 41804 long: 64; 41805 long: 64; 41806 long: 64; 41807 long: 64; 41808 long: 64; 41809 long: 64; 41810 long: 64; 41811 long: 64; 41812 long: 64; 41813 long: 64; 41814 long: 64; 41815 long: 64; 41816 long: 64; 41817 long: 64; 41818 long: 64; 41819 long: 64; 41820 long: 64; 41821 long: 64; 41822 long: 64; 41823 long: 64; 41824 long: 64; 41825 long: 64; 41826 long: 64; 41827 long: 64; 41828 long: 64; 41829 long: 64; 41830 long: 64; 41831 long: 64; 41832 long: 64; 41833 long: 64; 41834 long: 64; 41835 long: 64; 41836 long: 64; 41837 long: 64; 41838 long: 64; 41839 long: 64; 41840 long: 64; 41841 long: 64; 41842 long: 64; 41843 long: 64; 41844 long: 64; 41845 long: 64; 41846 long: 64; 41847 long: 64; 41848 long: 64; 41849 long: 64; 41850 long: 64; 41851 long: 64; 41852 long: 64; 41853 long: 64; 41854 long: 64; 41855 long: 64; 41856 long: 64; 41857 long: 64; 41858 long: 64; 41859 long: 64; 41860 long: 64; 41861 long: 64; 41862 long: 64; 41863 long: 64; 41864 long: 64; 41865 long: 64; 41866 long: 64; 41867 long: 64; 41868 long: 64; 41869 long: 64; 41870 long: 64; 41871 long: 64; 41872 long: 64; 41873 long: 64; 41874 long: 64; 41875 long: 64; 41876 long: 64; 41877 long: 64; 41878 long: 64; 41879 long: 64; 41880 long: 64; 41881 long: 64; 41882 long: 64; 41883 long: 64; 41884 long: 64; 41885 long: 64; 41886 long: 64; 41887 long: 64; 41888 long: 64; 41889 long: 64; 41890 long: 64; 41891 long: 64; 41892 long: 64; 41893 long: 64; 41894 long unsigned int consumer_pos; 41895 long: 64; 41896 long: 64; 41897 long: 64; 41898 long: 64; 41899 long: 64; 41900 long: 64; 41901 long: 64; 41902 long: 64; 41903 long: 64; 41904 long: 64; 41905 long: 64; 41906 long: 64; 41907 long: 64; 41908 long: 64; 41909 long: 64; 41910 long: 64; 41911 long: 64; 41912 long: 64; 41913 long: 64; 41914 long: 64; 41915 long: 64; 41916 long: 64; 41917 long: 64; 41918 long: 64; 41919 long: 64; 41920 long: 64; 41921 long: 64; 41922 long: 64; 41923 long: 64; 41924 long: 64; 41925 long: 64; 41926 long: 64; 41927 long: 64; 41928 long: 64; 41929 long: 64; 41930 long: 64; 41931 long: 64; 41932 long: 64; 41933 long: 64; 41934 long: 64; 41935 long: 64; 41936 long: 64; 41937 long: 64; 41938 long: 64; 41939 long: 64; 41940 long: 64; 41941 long: 64; 41942 long: 64; 41943 long: 64; 41944 long: 64; 41945 long: 64; 41946 long: 64; 41947 long: 64; 41948 long: 64; 41949 long: 64; 41950 long: 64; 41951 long: 64; 41952 long: 64; 41953 long: 64; 41954 long: 64; 41955 long: 64; 41956 long: 64; 41957 long: 64; 41958 long: 64; 41959 long: 64; 41960 long: 64; 41961 long: 64; 41962 long: 64; 41963 long: 64; 41964 long: 64; 41965 long: 64; 41966 long: 64; 41967 long: 64; 41968 long: 64; 41969 long: 64; 41970 long: 64; 41971 long: 64; 41972 long: 64; 41973 long: 64; 41974 long: 64; 41975 long: 64; 41976 long: 64; 41977 long: 64; 41978 long: 64; 41979 long: 64; 41980 long: 64; 41981 long: 64; 41982 long: 64; 41983 long: 64; 41984 long: 64; 41985 long: 64; 41986 long: 64; 41987 long: 64; 41988 long: 64; 41989 long: 64; 41990 long: 64; 41991 long: 64; 41992 long: 64; 41993 long: 64; 41994 long: 64; 41995 long: 64; 41996 long: 64; 41997 long: 64; 41998 long: 64; 41999 long: 64; 42000 long: 64; 42001 long: 64; 42002 long: 64; 42003 long: 64; 42004 long: 64; 42005 long: 64; 42006 long: 64; 42007 long: 64; 42008 long: 64; 42009 long: 64; 42010 long: 64; 42011 long: 64; 42012 long: 64; 42013 long: 64; 42014 long: 64; 42015 long: 64; 42016 long: 64; 42017 long: 64; 42018 long: 64; 42019 long: 64; 42020 long: 64; 42021 long: 64; 42022 long: 64; 42023 long: 64; 42024 long: 64; 42025 long: 64; 42026 long: 64; 42027 long: 64; 42028 long: 64; 42029 long: 64; 42030 long: 64; 42031 long: 64; 42032 long: 64; 42033 long: 64; 42034 long: 64; 42035 long: 64; 42036 long: 64; 42037 long: 64; 42038 long: 64; 42039 long: 64; 42040 long: 64; 42041 long: 64; 42042 long: 64; 42043 long: 64; 42044 long: 64; 42045 long: 64; 42046 long: 64; 42047 long: 64; 42048 long: 64; 42049 long: 64; 42050 long: 64; 42051 long: 64; 42052 long: 64; 42053 long: 64; 42054 long: 64; 42055 long: 64; 42056 long: 64; 42057 long: 64; 42058 long: 64; 42059 long: 64; 42060 long: 64; 42061 long: 64; 42062 long: 64; 42063 long: 64; 42064 long: 64; 42065 long: 64; 42066 long: 64; 42067 long: 64; 42068 long: 64; 42069 long: 64; 42070 long: 64; 42071 long: 64; 42072 long: 64; 42073 long: 64; 42074 long: 64; 42075 long: 64; 42076 long: 64; 42077 long: 64; 42078 long: 64; 42079 long: 64; 42080 long: 64; 42081 long: 64; 42082 long: 64; 42083 long: 64; 42084 long: 64; 42085 long: 64; 42086 long: 64; 42087 long: 64; 42088 long: 64; 42089 long: 64; 42090 long: 64; 42091 long: 64; 42092 long: 64; 42093 long: 64; 42094 long: 64; 42095 long: 64; 42096 long: 64; 42097 long: 64; 42098 long: 64; 42099 long: 64; 42100 long: 64; 42101 long: 64; 42102 long: 64; 42103 long: 64; 42104 long: 64; 42105 long: 64; 42106 long: 64; 42107 long: 64; 42108 long: 64; 42109 long: 64; 42110 long: 64; 42111 long: 64; 42112 long: 64; 42113 long: 64; 42114 long: 64; 42115 long: 64; 42116 long: 64; 42117 long: 64; 42118 long: 64; 42119 long: 64; 42120 long: 64; 42121 long: 64; 42122 long: 64; 42123 long: 64; 42124 long: 64; 42125 long: 64; 42126 long: 64; 42127 long: 64; 42128 long: 64; 42129 long: 64; 42130 long: 64; 42131 long: 64; 42132 long: 64; 42133 long: 64; 42134 long: 64; 42135 long: 64; 42136 long: 64; 42137 long: 64; 42138 long: 64; 42139 long: 64; 42140 long: 64; 42141 long: 64; 42142 long: 64; 42143 long: 64; 42144 long: 64; 42145 long: 64; 42146 long: 64; 42147 long: 64; 42148 long: 64; 42149 long: 64; 42150 long: 64; 42151 long: 64; 42152 long: 64; 42153 long: 64; 42154 long: 64; 42155 long: 64; 42156 long: 64; 42157 long: 64; 42158 long: 64; 42159 long: 64; 42160 long: 64; 42161 long: 64; 42162 long: 64; 42163 long: 64; 42164 long: 64; 42165 long: 64; 42166 long: 64; 42167 long: 64; 42168 long: 64; 42169 long: 64; 42170 long: 64; 42171 long: 64; 42172 long: 64; 42173 long: 64; 42174 long: 64; 42175 long: 64; 42176 long: 64; 42177 long: 64; 42178 long: 64; 42179 long: 64; 42180 long: 64; 42181 long: 64; 42182 long: 64; 42183 long: 64; 42184 long: 64; 42185 long: 64; 42186 long: 64; 42187 long: 64; 42188 long: 64; 42189 long: 64; 42190 long: 64; 42191 long: 64; 42192 long: 64; 42193 long: 64; 42194 long: 64; 42195 long: 64; 42196 long: 64; 42197 long: 64; 42198 long: 64; 42199 long: 64; 42200 long: 64; 42201 long: 64; 42202 long: 64; 42203 long: 64; 42204 long: 64; 42205 long: 64; 42206 long: 64; 42207 long: 64; 42208 long: 64; 42209 long: 64; 42210 long: 64; 42211 long: 64; 42212 long: 64; 42213 long: 64; 42214 long: 64; 42215 long: 64; 42216 long: 64; 42217 long: 64; 42218 long: 64; 42219 long: 64; 42220 long: 64; 42221 long: 64; 42222 long: 64; 42223 long: 64; 42224 long: 64; 42225 long: 64; 42226 long: 64; 42227 long: 64; 42228 long: 64; 42229 long: 64; 42230 long: 64; 42231 long: 64; 42232 long: 64; 42233 long: 64; 42234 long: 64; 42235 long: 64; 42236 long: 64; 42237 long: 64; 42238 long: 64; 42239 long: 64; 42240 long: 64; 42241 long: 64; 42242 long: 64; 42243 long: 64; 42244 long: 64; 42245 long: 64; 42246 long: 64; 42247 long: 64; 42248 long: 64; 42249 long: 64; 42250 long: 64; 42251 long: 64; 42252 long: 64; 42253 long: 64; 42254 long: 64; 42255 long: 64; 42256 long: 64; 42257 long: 64; 42258 long: 64; 42259 long: 64; 42260 long: 64; 42261 long: 64; 42262 long: 64; 42263 long: 64; 42264 long: 64; 42265 long: 64; 42266 long: 64; 42267 long: 64; 42268 long: 64; 42269 long: 64; 42270 long: 64; 42271 long: 64; 42272 long: 64; 42273 long: 64; 42274 long: 64; 42275 long: 64; 42276 long: 64; 42277 long: 64; 42278 long: 64; 42279 long: 64; 42280 long: 64; 42281 long: 64; 42282 long: 64; 42283 long: 64; 42284 long: 64; 42285 long: 64; 42286 long: 64; 42287 long: 64; 42288 long: 64; 42289 long: 64; 42290 long: 64; 42291 long: 64; 42292 long: 64; 42293 long: 64; 42294 long: 64; 42295 long: 64; 42296 long: 64; 42297 long: 64; 42298 long: 64; 42299 long: 64; 42300 long: 64; 42301 long: 64; 42302 long: 64; 42303 long: 64; 42304 long: 64; 42305 long: 64; 42306 long: 64; 42307 long: 64; 42308 long: 64; 42309 long: 64; 42310 long: 64; 42311 long: 64; 42312 long: 64; 42313 long: 64; 42314 long: 64; 42315 long: 64; 42316 long: 64; 42317 long: 64; 42318 long: 64; 42319 long: 64; 42320 long: 64; 42321 long: 64; 42322 long: 64; 42323 long: 64; 42324 long: 64; 42325 long: 64; 42326 long: 64; 42327 long: 64; 42328 long: 64; 42329 long: 64; 42330 long: 64; 42331 long: 64; 42332 long: 64; 42333 long: 64; 42334 long: 64; 42335 long: 64; 42336 long: 64; 42337 long: 64; 42338 long: 64; 42339 long: 64; 42340 long: 64; 42341 long: 64; 42342 long: 64; 42343 long: 64; 42344 long: 64; 42345 long: 64; 42346 long: 64; 42347 long: 64; 42348 long: 64; 42349 long: 64; 42350 long: 64; 42351 long: 64; 42352 long: 64; 42353 long: 64; 42354 long: 64; 42355 long: 64; 42356 long: 64; 42357 long: 64; 42358 long: 64; 42359 long: 64; 42360 long: 64; 42361 long: 64; 42362 long: 64; 42363 long: 64; 42364 long: 64; 42365 long: 64; 42366 long: 64; 42367 long: 64; 42368 long: 64; 42369 long: 64; 42370 long: 64; 42371 long: 64; 42372 long: 64; 42373 long: 64; 42374 long: 64; 42375 long: 64; 42376 long: 64; 42377 long: 64; 42378 long: 64; 42379 long: 64; 42380 long: 64; 42381 long: 64; 42382 long: 64; 42383 long: 64; 42384 long: 64; 42385 long: 64; 42386 long: 64; 42387 long: 64; 42388 long: 64; 42389 long: 64; 42390 long: 64; 42391 long: 64; 42392 long: 64; 42393 long: 64; 42394 long: 64; 42395 long: 64; 42396 long: 64; 42397 long: 64; 42398 long: 64; 42399 long: 64; 42400 long: 64; 42401 long: 64; 42402 long: 64; 42403 long: 64; 42404 long: 64; 42405 long: 64; 42406 long unsigned int producer_pos; 42407 long: 64; 42408 long: 64; 42409 long: 64; 42410 long: 64; 42411 long: 64; 42412 long: 64; 42413 long: 64; 42414 long: 64; 42415 long: 64; 42416 long: 64; 42417 long: 64; 42418 long: 64; 42419 long: 64; 42420 long: 64; 42421 long: 64; 42422 long: 64; 42423 long: 64; 42424 long: 64; 42425 long: 64; 42426 long: 64; 42427 long: 64; 42428 long: 64; 42429 long: 64; 42430 long: 64; 42431 long: 64; 42432 long: 64; 42433 long: 64; 42434 long: 64; 42435 long: 64; 42436 long: 64; 42437 long: 64; 42438 long: 64; 42439 long: 64; 42440 long: 64; 42441 long: 64; 42442 long: 64; 42443 long: 64; 42444 long: 64; 42445 long: 64; 42446 long: 64; 42447 long: 64; 42448 long: 64; 42449 long: 64; 42450 long: 64; 42451 long: 64; 42452 long: 64; 42453 long: 64; 42454 long: 64; 42455 long: 64; 42456 long: 64; 42457 long: 64; 42458 long: 64; 42459 long: 64; 42460 long: 64; 42461 long: 64; 42462 long: 64; 42463 long: 64; 42464 long: 64; 42465 long: 64; 42466 long: 64; 42467 long: 64; 42468 long: 64; 42469 long: 64; 42470 long: 64; 42471 long: 64; 42472 long: 64; 42473 long: 64; 42474 long: 64; 42475 long: 64; 42476 long: 64; 42477 long: 64; 42478 long: 64; 42479 long: 64; 42480 long: 64; 42481 long: 64; 42482 long: 64; 42483 long: 64; 42484 long: 64; 42485 long: 64; 42486 long: 64; 42487 long: 64; 42488 long: 64; 42489 long: 64; 42490 long: 64; 42491 long: 64; 42492 long: 64; 42493 long: 64; 42494 long: 64; 42495 long: 64; 42496 long: 64; 42497 long: 64; 42498 long: 64; 42499 long: 64; 42500 long: 64; 42501 long: 64; 42502 long: 64; 42503 long: 64; 42504 long: 64; 42505 long: 64; 42506 long: 64; 42507 long: 64; 42508 long: 64; 42509 long: 64; 42510 long: 64; 42511 long: 64; 42512 long: 64; 42513 long: 64; 42514 long: 64; 42515 long: 64; 42516 long: 64; 42517 long: 64; 42518 long: 64; 42519 long: 64; 42520 long: 64; 42521 long: 64; 42522 long: 64; 42523 long: 64; 42524 long: 64; 42525 long: 64; 42526 long: 64; 42527 long: 64; 42528 long: 64; 42529 long: 64; 42530 long: 64; 42531 long: 64; 42532 long: 64; 42533 long: 64; 42534 long: 64; 42535 long: 64; 42536 long: 64; 42537 long: 64; 42538 long: 64; 42539 long: 64; 42540 long: 64; 42541 long: 64; 42542 long: 64; 42543 long: 64; 42544 long: 64; 42545 long: 64; 42546 long: 64; 42547 long: 64; 42548 long: 64; 42549 long: 64; 42550 long: 64; 42551 long: 64; 42552 long: 64; 42553 long: 64; 42554 long: 64; 42555 long: 64; 42556 long: 64; 42557 long: 64; 42558 long: 64; 42559 long: 64; 42560 long: 64; 42561 long: 64; 42562 long: 64; 42563 long: 64; 42564 long: 64; 42565 long: 64; 42566 long: 64; 42567 long: 64; 42568 long: 64; 42569 long: 64; 42570 long: 64; 42571 long: 64; 42572 long: 64; 42573 long: 64; 42574 long: 64; 42575 long: 64; 42576 long: 64; 42577 long: 64; 42578 long: 64; 42579 long: 64; 42580 long: 64; 42581 long: 64; 42582 long: 64; 42583 long: 64; 42584 long: 64; 42585 long: 64; 42586 long: 64; 42587 long: 64; 42588 long: 64; 42589 long: 64; 42590 long: 64; 42591 long: 64; 42592 long: 64; 42593 long: 64; 42594 long: 64; 42595 long: 64; 42596 long: 64; 42597 long: 64; 42598 long: 64; 42599 long: 64; 42600 long: 64; 42601 long: 64; 42602 long: 64; 42603 long: 64; 42604 long: 64; 42605 long: 64; 42606 long: 64; 42607 long: 64; 42608 long: 64; 42609 long: 64; 42610 long: 64; 42611 long: 64; 42612 long: 64; 42613 long: 64; 42614 long: 64; 42615 long: 64; 42616 long: 64; 42617 long: 64; 42618 long: 64; 42619 long: 64; 42620 long: 64; 42621 long: 64; 42622 long: 64; 42623 long: 64; 42624 long: 64; 42625 long: 64; 42626 long: 64; 42627 long: 64; 42628 long: 64; 42629 long: 64; 42630 long: 64; 42631 long: 64; 42632 long: 64; 42633 long: 64; 42634 long: 64; 42635 long: 64; 42636 long: 64; 42637 long: 64; 42638 long: 64; 42639 long: 64; 42640 long: 64; 42641 long: 64; 42642 long: 64; 42643 long: 64; 42644 long: 64; 42645 long: 64; 42646 long: 64; 42647 long: 64; 42648 long: 64; 42649 long: 64; 42650 long: 64; 42651 long: 64; 42652 long: 64; 42653 long: 64; 42654 long: 64; 42655 long: 64; 42656 long: 64; 42657 long: 64; 42658 long: 64; 42659 long: 64; 42660 long: 64; 42661 long: 64; 42662 long: 64; 42663 long: 64; 42664 long: 64; 42665 long: 64; 42666 long: 64; 42667 long: 64; 42668 long: 64; 42669 long: 64; 42670 long: 64; 42671 long: 64; 42672 long: 64; 42673 long: 64; 42674 long: 64; 42675 long: 64; 42676 long: 64; 42677 long: 64; 42678 long: 64; 42679 long: 64; 42680 long: 64; 42681 long: 64; 42682 long: 64; 42683 long: 64; 42684 long: 64; 42685 long: 64; 42686 long: 64; 42687 long: 64; 42688 long: 64; 42689 long: 64; 42690 long: 64; 42691 long: 64; 42692 long: 64; 42693 long: 64; 42694 long: 64; 42695 long: 64; 42696 long: 64; 42697 long: 64; 42698 long: 64; 42699 long: 64; 42700 long: 64; 42701 long: 64; 42702 long: 64; 42703 long: 64; 42704 long: 64; 42705 long: 64; 42706 long: 64; 42707 long: 64; 42708 long: 64; 42709 long: 64; 42710 long: 64; 42711 long: 64; 42712 long: 64; 42713 long: 64; 42714 long: 64; 42715 long: 64; 42716 long: 64; 42717 long: 64; 42718 long: 64; 42719 long: 64; 42720 long: 64; 42721 long: 64; 42722 long: 64; 42723 long: 64; 42724 long: 64; 42725 long: 64; 42726 long: 64; 42727 long: 64; 42728 long: 64; 42729 long: 64; 42730 long: 64; 42731 long: 64; 42732 long: 64; 42733 long: 64; 42734 long: 64; 42735 long: 64; 42736 long: 64; 42737 long: 64; 42738 long: 64; 42739 long: 64; 42740 long: 64; 42741 long: 64; 42742 long: 64; 42743 long: 64; 42744 long: 64; 42745 long: 64; 42746 long: 64; 42747 long: 64; 42748 long: 64; 42749 long: 64; 42750 long: 64; 42751 long: 64; 42752 long: 64; 42753 long: 64; 42754 long: 64; 42755 long: 64; 42756 long: 64; 42757 long: 64; 42758 long: 64; 42759 long: 64; 42760 long: 64; 42761 long: 64; 42762 long: 64; 42763 long: 64; 42764 long: 64; 42765 long: 64; 42766 long: 64; 42767 long: 64; 42768 long: 64; 42769 long: 64; 42770 long: 64; 42771 long: 64; 42772 long: 64; 42773 long: 64; 42774 long: 64; 42775 long: 64; 42776 long: 64; 42777 long: 64; 42778 long: 64; 42779 long: 64; 42780 long: 64; 42781 long: 64; 42782 long: 64; 42783 long: 64; 42784 long: 64; 42785 long: 64; 42786 long: 64; 42787 long: 64; 42788 long: 64; 42789 long: 64; 42790 long: 64; 42791 long: 64; 42792 long: 64; 42793 long: 64; 42794 long: 64; 42795 long: 64; 42796 long: 64; 42797 long: 64; 42798 long: 64; 42799 long: 64; 42800 long: 64; 42801 long: 64; 42802 long: 64; 42803 long: 64; 42804 long: 64; 42805 long: 64; 42806 long: 64; 42807 long: 64; 42808 long: 64; 42809 long: 64; 42810 long: 64; 42811 long: 64; 42812 long: 64; 42813 long: 64; 42814 long: 64; 42815 long: 64; 42816 long: 64; 42817 long: 64; 42818 long: 64; 42819 long: 64; 42820 long: 64; 42821 long: 64; 42822 long: 64; 42823 long: 64; 42824 long: 64; 42825 long: 64; 42826 long: 64; 42827 long: 64; 42828 long: 64; 42829 long: 64; 42830 long: 64; 42831 long: 64; 42832 long: 64; 42833 long: 64; 42834 long: 64; 42835 long: 64; 42836 long: 64; 42837 long: 64; 42838 long: 64; 42839 long: 64; 42840 long: 64; 42841 long: 64; 42842 long: 64; 42843 long: 64; 42844 long: 64; 42845 long: 64; 42846 long: 64; 42847 long: 64; 42848 long: 64; 42849 long: 64; 42850 long: 64; 42851 long: 64; 42852 long: 64; 42853 long: 64; 42854 long: 64; 42855 long: 64; 42856 long: 64; 42857 long: 64; 42858 long: 64; 42859 long: 64; 42860 long: 64; 42861 long: 64; 42862 long: 64; 42863 long: 64; 42864 long: 64; 42865 long: 64; 42866 long: 64; 42867 long: 64; 42868 long: 64; 42869 long: 64; 42870 long: 64; 42871 long: 64; 42872 long: 64; 42873 long: 64; 42874 long: 64; 42875 long: 64; 42876 long: 64; 42877 long: 64; 42878 long: 64; 42879 long: 64; 42880 long: 64; 42881 long: 64; 42882 long: 64; 42883 long: 64; 42884 long: 64; 42885 long: 64; 42886 long: 64; 42887 long: 64; 42888 long: 64; 42889 long: 64; 42890 long: 64; 42891 long: 64; 42892 long: 64; 42893 long: 64; 42894 long: 64; 42895 long: 64; 42896 long: 64; 42897 long: 64; 42898 long: 64; 42899 long: 64; 42900 long: 64; 42901 long: 64; 42902 long: 64; 42903 long: 64; 42904 long: 64; 42905 long: 64; 42906 long: 64; 42907 long: 64; 42908 long: 64; 42909 long: 64; 42910 long: 64; 42911 long: 64; 42912 long: 64; 42913 long: 64; 42914 long: 64; 42915 long: 64; 42916 long: 64; 42917 long: 64; 42918 char data[0]; 42919 }; 42920 42921 struct bpf_ringbuf_map { 42922 struct bpf_map map; 42923 struct bpf_ringbuf *rb; 42924 long: 64; 42925 long: 64; 42926 long: 64; 42927 long: 64; 42928 long: 64; 42929 long: 64; 42930 long: 64; 42931 }; 42932 42933 struct bpf_ringbuf_hdr { 42934 u32 len; 42935 u32 pg_off; 42936 }; 42937 42938 typedef u64 (*btf_bpf_ringbuf_reserve)(struct bpf_map *, u64, u64); 42939 42940 typedef u64 (*btf_bpf_ringbuf_submit)(void *, u64); 42941 42942 typedef u64 (*btf_bpf_ringbuf_discard)(void *, u64); 42943 42944 typedef u64 (*btf_bpf_ringbuf_output)(struct bpf_map *, void *, u64, u64); 42945 42946 typedef u64 (*btf_bpf_ringbuf_query)(struct bpf_map *, u64); 42947 42948 enum { 42949 BPF_LOCAL_STORAGE_GET_F_CREATE = 1, 42950 BPF_SK_STORAGE_GET_F_CREATE = 1, 42951 }; 42952 42953 struct bpf_local_storage_elem { 42954 struct hlist_node map_node; 42955 struct hlist_node snode; 42956 struct bpf_local_storage *local_storage; 42957 struct callback_head rcu; 42958 long: 64; 42959 struct bpf_local_storage_data sdata; 42960 long: 64; 42961 long: 64; 42962 long: 64; 42963 long: 64; 42964 long: 64; 42965 long: 64; 42966 long: 64; 42967 }; 42968 42969 struct bpf_local_storage_cache { 42970 spinlock_t idx_lock; 42971 u64 idx_usage_counts[16]; 42972 }; 42973 42974 struct lsm_blob_sizes { 42975 int lbs_cred; 42976 int lbs_file; 42977 int lbs_inode; 42978 int lbs_ipc; 42979 int lbs_msg_msg; 42980 int lbs_task; 42981 }; 42982 42983 struct bpf_storage_blob { 42984 struct bpf_local_storage *storage; 42985 }; 42986 42987 typedef u64 (*btf_bpf_inode_storage_get)(struct bpf_map *, struct inode *, void *, u64); 42988 42989 typedef u64 (*btf_bpf_inode_storage_delete)(struct bpf_map *, struct inode *); 42990 42991 typedef u64 (*btf_bpf_task_storage_get)(struct bpf_map *, struct task_struct *, void *, u64); 42992 42993 typedef u64 (*btf_bpf_task_storage_delete)(struct bpf_map *, struct task_struct *); 42994 42995 struct btf_enum { 42996 __u32 name_off; 42997 __s32 val; 42998 }; 42999 43000 struct btf_array { 43001 __u32 type; 43002 __u32 index_type; 43003 __u32 nelems; 43004 }; 43005 43006 struct btf_param { 43007 __u32 name_off; 43008 __u32 type; 43009 }; 43010 43011 enum { 43012 BTF_VAR_STATIC = 0, 43013 BTF_VAR_GLOBAL_ALLOCATED = 1, 43014 BTF_VAR_GLOBAL_EXTERN = 2, 43015 }; 43016 43017 struct btf_var { 43018 __u32 linkage; 43019 }; 43020 43021 struct bpf_flow_keys { 43022 __u16 nhoff; 43023 __u16 thoff; 43024 __u16 addr_proto; 43025 __u8 is_frag; 43026 __u8 is_first_frag; 43027 __u8 is_encap; 43028 __u8 ip_proto; 43029 __be16 n_proto; 43030 __be16 sport; 43031 __be16 dport; 43032 union { 43033 struct { 43034 __be32 ipv4_src; 43035 __be32 ipv4_dst; 43036 }; 43037 struct { 43038 __u32 ipv6_src[4]; 43039 __u32 ipv6_dst[4]; 43040 }; 43041 }; 43042 __u32 flags; 43043 __be32 flow_label; 43044 }; 43045 43046 struct bpf_sock { 43047 __u32 bound_dev_if; 43048 __u32 family; 43049 __u32 type; 43050 __u32 protocol; 43051 __u32 mark; 43052 __u32 priority; 43053 __u32 src_ip4; 43054 __u32 src_ip6[4]; 43055 __u32 src_port; 43056 __u32 dst_port; 43057 __u32 dst_ip4; 43058 __u32 dst_ip6[4]; 43059 __u32 state; 43060 __s32 rx_queue_mapping; 43061 }; 43062 43063 struct __sk_buff { 43064 __u32 len; 43065 __u32 pkt_type; 43066 __u32 mark; 43067 __u32 queue_mapping; 43068 __u32 protocol; 43069 __u32 vlan_present; 43070 __u32 vlan_tci; 43071 __u32 vlan_proto; 43072 __u32 priority; 43073 __u32 ingress_ifindex; 43074 __u32 ifindex; 43075 __u32 tc_index; 43076 __u32 cb[5]; 43077 __u32 hash; 43078 __u32 tc_classid; 43079 __u32 data; 43080 __u32 data_end; 43081 __u32 napi_id; 43082 __u32 family; 43083 __u32 remote_ip4; 43084 __u32 local_ip4; 43085 __u32 remote_ip6[4]; 43086 __u32 local_ip6[4]; 43087 __u32 remote_port; 43088 __u32 local_port; 43089 __u32 data_meta; 43090 union { 43091 struct bpf_flow_keys *flow_keys; 43092 }; 43093 __u64 tstamp; 43094 __u32 wire_len; 43095 __u32 gso_segs; 43096 union { 43097 struct bpf_sock *sk; 43098 }; 43099 __u32 gso_size; 43100 }; 43101 43102 struct xdp_md { 43103 __u32 data; 43104 __u32 data_end; 43105 __u32 data_meta; 43106 __u32 ingress_ifindex; 43107 __u32 rx_queue_index; 43108 __u32 egress_ifindex; 43109 }; 43110 43111 struct sk_msg_md { 43112 union { 43113 void *data; 43114 }; 43115 union { 43116 void *data_end; 43117 }; 43118 __u32 family; 43119 __u32 remote_ip4; 43120 __u32 local_ip4; 43121 __u32 remote_ip6[4]; 43122 __u32 local_ip6[4]; 43123 __u32 remote_port; 43124 __u32 local_port; 43125 __u32 size; 43126 union { 43127 struct bpf_sock *sk; 43128 }; 43129 }; 43130 43131 struct sk_reuseport_md { 43132 union { 43133 void *data; 43134 }; 43135 union { 43136 void *data_end; 43137 }; 43138 __u32 len; 43139 __u32 eth_protocol; 43140 __u32 ip_protocol; 43141 __u32 bind_inany; 43142 __u32 hash; 43143 }; 43144 43145 struct bpf_sock_addr { 43146 __u32 user_family; 43147 __u32 user_ip4; 43148 __u32 user_ip6[4]; 43149 __u32 user_port; 43150 __u32 family; 43151 __u32 type; 43152 __u32 protocol; 43153 __u32 msg_src_ip4; 43154 __u32 msg_src_ip6[4]; 43155 union { 43156 struct bpf_sock *sk; 43157 }; 43158 }; 43159 43160 struct bpf_sock_ops { 43161 __u32 op; 43162 union { 43163 __u32 args[4]; 43164 __u32 reply; 43165 __u32 replylong[4]; 43166 }; 43167 __u32 family; 43168 __u32 remote_ip4; 43169 __u32 local_ip4; 43170 __u32 remote_ip6[4]; 43171 __u32 local_ip6[4]; 43172 __u32 remote_port; 43173 __u32 local_port; 43174 __u32 is_fullsock; 43175 __u32 snd_cwnd; 43176 __u32 srtt_us; 43177 __u32 bpf_sock_ops_cb_flags; 43178 __u32 state; 43179 __u32 rtt_min; 43180 __u32 snd_ssthresh; 43181 __u32 rcv_nxt; 43182 __u32 snd_nxt; 43183 __u32 snd_una; 43184 __u32 mss_cache; 43185 __u32 ecn_flags; 43186 __u32 rate_delivered; 43187 __u32 rate_interval_us; 43188 __u32 packets_out; 43189 __u32 retrans_out; 43190 __u32 total_retrans; 43191 __u32 segs_in; 43192 __u32 data_segs_in; 43193 __u32 segs_out; 43194 __u32 data_segs_out; 43195 __u32 lost_out; 43196 __u32 sacked_out; 43197 __u32 sk_txhash; 43198 __u64 bytes_received; 43199 __u64 bytes_acked; 43200 union { 43201 struct bpf_sock *sk; 43202 }; 43203 union { 43204 void *skb_data; 43205 }; 43206 union { 43207 void *skb_data_end; 43208 }; 43209 __u32 skb_len; 43210 __u32 skb_tcp_flags; 43211 }; 43212 43213 struct bpf_cgroup_dev_ctx { 43214 __u32 access_type; 43215 __u32 major; 43216 __u32 minor; 43217 }; 43218 43219 struct bpf_sysctl { 43220 __u32 write; 43221 __u32 file_pos; 43222 }; 43223 43224 struct bpf_sockopt { 43225 union { 43226 struct bpf_sock *sk; 43227 }; 43228 union { 43229 void *optval; 43230 }; 43231 union { 43232 void *optval_end; 43233 }; 43234 __s32 level; 43235 __s32 optname; 43236 __s32 optlen; 43237 __s32 retval; 43238 }; 43239 43240 struct bpf_sk_lookup { 43241 union { 43242 struct bpf_sock *sk; 43243 }; 43244 __u32 family; 43245 __u32 protocol; 43246 __u32 remote_ip4; 43247 __u32 remote_ip6[4]; 43248 __u32 remote_port; 43249 __u32 local_ip4; 43250 __u32 local_ip6[4]; 43251 __u32 local_port; 43252 }; 43253 43254 struct sk_reuseport_kern { 43255 struct sk_buff *skb; 43256 struct sock *sk; 43257 struct sock *selected_sk; 43258 void *data_end; 43259 u32 hash; 43260 u32 reuseport_id; 43261 bool bind_inany; 43262 }; 43263 43264 struct bpf_flow_dissector { 43265 struct bpf_flow_keys *flow_keys; 43266 const struct sk_buff *skb; 43267 void *data; 43268 void *data_end; 43269 }; 43270 43271 struct inet_listen_hashbucket { 43272 spinlock_t lock; 43273 unsigned int count; 43274 union { 43275 struct hlist_head head; 43276 struct hlist_nulls_head nulls_head; 43277 }; 43278 }; 43279 43280 struct inet_ehash_bucket; 43281 43282 struct inet_bind_hashbucket; 43283 43284 struct inet_hashinfo { 43285 struct inet_ehash_bucket *ehash; 43286 spinlock_t *ehash_locks; 43287 unsigned int ehash_mask; 43288 unsigned int ehash_locks_mask; 43289 struct kmem_cache *bind_bucket_cachep; 43290 struct inet_bind_hashbucket *bhash; 43291 unsigned int bhash_size; 43292 unsigned int lhash2_mask; 43293 struct inet_listen_hashbucket *lhash2; 43294 long: 64; 43295 struct inet_listen_hashbucket listening_hash[32]; 43296 }; 43297 43298 struct ip_ra_chain { 43299 struct ip_ra_chain *next; 43300 struct sock *sk; 43301 union { 43302 void (*destructor)(struct sock *); 43303 struct sock *saved_sk; 43304 }; 43305 struct callback_head rcu; 43306 }; 43307 43308 struct fib_table { 43309 struct hlist_node tb_hlist; 43310 u32 tb_id; 43311 int tb_num_default; 43312 struct callback_head rcu; 43313 long unsigned int *tb_data; 43314 long unsigned int __data[0]; 43315 }; 43316 43317 struct inet_peer_base { 43318 struct rb_root rb_root; 43319 seqlock_t lock; 43320 int total; 43321 }; 43322 43323 struct tcp_fastopen_context { 43324 siphash_key_t key[2]; 43325 int num; 43326 struct callback_head rcu; 43327 }; 43328 43329 struct xdp_txq_info { 43330 struct net_device *dev; 43331 }; 43332 43333 struct xdp_buff { 43334 void *data; 43335 void *data_end; 43336 void *data_meta; 43337 void *data_hard_start; 43338 struct xdp_rxq_info *rxq; 43339 struct xdp_txq_info *txq; 43340 u32 frame_sz; 43341 }; 43342 43343 struct bpf_sock_addr_kern { 43344 struct sock *sk; 43345 struct sockaddr *uaddr; 43346 u64 tmp_reg; 43347 void *t_ctx; 43348 }; 43349 43350 struct bpf_sock_ops_kern { 43351 struct sock *sk; 43352 union { 43353 u32 args[4]; 43354 u32 reply; 43355 u32 replylong[4]; 43356 }; 43357 struct sk_buff *syn_skb; 43358 struct sk_buff *skb; 43359 void *skb_data_end; 43360 u8 op; 43361 u8 is_fullsock; 43362 u8 remaining_opt_len; 43363 u64 temp; 43364 }; 43365 43366 struct bpf_sysctl_kern { 43367 struct ctl_table_header *head; 43368 struct ctl_table *table; 43369 void *cur_val; 43370 size_t cur_len; 43371 void *new_val; 43372 size_t new_len; 43373 int new_updated; 43374 int write; 43375 loff_t *ppos; 43376 u64 tmp_reg; 43377 }; 43378 43379 struct bpf_sockopt_kern { 43380 struct sock *sk; 43381 u8 *optval; 43382 u8 *optval_end; 43383 s32 level; 43384 s32 optname; 43385 s32 optlen; 43386 s32 retval; 43387 }; 43388 43389 struct bpf_sk_lookup_kern { 43390 u16 family; 43391 u16 protocol; 43392 __be16 sport; 43393 u16 dport; 43394 struct { 43395 __be32 saddr; 43396 __be32 daddr; 43397 } v4; 43398 struct { 43399 const struct in6_addr *saddr; 43400 const struct in6_addr *daddr; 43401 } v6; 43402 struct sock *selected_sk; 43403 bool no_reuseport; 43404 }; 43405 43406 struct sock_reuseport { 43407 struct callback_head rcu; 43408 u16 max_socks; 43409 u16 num_socks; 43410 unsigned int synq_overflow_ts; 43411 unsigned int reuseport_id; 43412 unsigned int bind_inany: 1; 43413 unsigned int has_conns: 1; 43414 struct bpf_prog *prog; 43415 struct sock *socks[0]; 43416 }; 43417 43418 struct inet_ehash_bucket { 43419 struct hlist_nulls_head chain; 43420 }; 43421 43422 struct inet_bind_hashbucket { 43423 spinlock_t lock; 43424 struct hlist_head chain; 43425 }; 43426 43427 struct ack_sample { 43428 u32 pkts_acked; 43429 s32 rtt_us; 43430 u32 in_flight; 43431 }; 43432 43433 struct rate_sample { 43434 u64 prior_mstamp; 43435 u32 prior_delivered; 43436 s32 delivered; 43437 long int interval_us; 43438 u32 snd_interval_us; 43439 u32 rcv_interval_us; 43440 long int rtt_us; 43441 int losses; 43442 u32 acked_sacked; 43443 u32 prior_in_flight; 43444 bool is_app_limited; 43445 bool is_retrans; 43446 bool is_ack_delayed; 43447 }; 43448 43449 struct sk_msg_sg { 43450 u32 start; 43451 u32 curr; 43452 u32 end; 43453 u32 size; 43454 u32 copybreak; 43455 long unsigned int copy; 43456 struct scatterlist data[19]; 43457 }; 43458 43459 struct sk_msg { 43460 struct sk_msg_sg sg; 43461 void *data; 43462 void *data_end; 43463 u32 apply_bytes; 43464 u32 cork_bytes; 43465 u32 flags; 43466 struct sk_buff *skb; 43467 struct sock *sk_redir; 43468 struct sock *sk; 43469 struct list_head list; 43470 }; 43471 43472 enum verifier_phase { 43473 CHECK_META = 0, 43474 CHECK_TYPE = 1, 43475 }; 43476 43477 struct resolve_vertex { 43478 const struct btf_type *t; 43479 u32 type_id; 43480 u16 next_member; 43481 }; 43482 43483 enum visit_state { 43484 NOT_VISITED = 0, 43485 VISITED = 1, 43486 RESOLVED = 2, 43487 }; 43488 43489 enum resolve_mode { 43490 RESOLVE_TBD = 0, 43491 RESOLVE_PTR = 1, 43492 RESOLVE_STRUCT_OR_ARRAY = 2, 43493 }; 43494 43495 struct btf_sec_info { 43496 u32 off; 43497 u32 len; 43498 }; 43499 43500 struct btf_verifier_env { 43501 struct btf *btf; 43502 u8 *visit_states; 43503 struct resolve_vertex stack[32]; 43504 struct bpf_verifier_log log; 43505 u32 log_type_id; 43506 u32 top_stack; 43507 enum verifier_phase phase; 43508 enum resolve_mode resolve_mode; 43509 }; 43510 43511 struct btf_show { 43512 u64 flags; 43513 void *target; 43514 void (*showfn)(struct btf_show *, const char *, struct __va_list_tag *); 43515 const struct btf *btf; 43516 struct { 43517 u8 depth; 43518 u8 depth_to_show; 43519 u8 depth_check; 43520 u8 array_member: 1; 43521 u8 array_terminated: 1; 43522 u16 array_encoding; 43523 u32 type_id; 43524 int status; 43525 const struct btf_type *type; 43526 const struct btf_member *member; 43527 char name[80]; 43528 } state; 43529 struct { 43530 u32 size; 43531 void *head; 43532 void *data; 43533 u8 safe[32]; 43534 } obj; 43535 }; 43536 43537 struct btf_kind_operations { 43538 s32 (*check_meta)(struct btf_verifier_env *, const struct btf_type *, u32); 43539 int (*resolve)(struct btf_verifier_env *, const struct resolve_vertex *); 43540 int (*check_member)(struct btf_verifier_env *, const struct btf_type *, const struct btf_member *, const struct btf_type *); 43541 int (*check_kflag_member)(struct btf_verifier_env *, const struct btf_type *, const struct btf_member *, const struct btf_type *); 43542 void (*log_details)(struct btf_verifier_env *, const struct btf_type *); 43543 void (*show)(const struct btf *, const struct btf_type *, u32, void *, u8, struct btf_show *); 43544 }; 43545 43546 struct bpf_ctx_convert { 43547 struct __sk_buff BPF_PROG_TYPE_SOCKET_FILTER_prog; 43548 struct sk_buff BPF_PROG_TYPE_SOCKET_FILTER_kern; 43549 struct __sk_buff BPF_PROG_TYPE_SCHED_CLS_prog; 43550 struct sk_buff BPF_PROG_TYPE_SCHED_CLS_kern; 43551 struct __sk_buff BPF_PROG_TYPE_SCHED_ACT_prog; 43552 struct sk_buff BPF_PROG_TYPE_SCHED_ACT_kern; 43553 struct xdp_md BPF_PROG_TYPE_XDP_prog; 43554 struct xdp_buff BPF_PROG_TYPE_XDP_kern; 43555 struct __sk_buff BPF_PROG_TYPE_CGROUP_SKB_prog; 43556 struct sk_buff BPF_PROG_TYPE_CGROUP_SKB_kern; 43557 struct bpf_sock BPF_PROG_TYPE_CGROUP_SOCK_prog; 43558 struct sock BPF_PROG_TYPE_CGROUP_SOCK_kern; 43559 struct bpf_sock_addr BPF_PROG_TYPE_CGROUP_SOCK_ADDR_prog; 43560 struct bpf_sock_addr_kern BPF_PROG_TYPE_CGROUP_SOCK_ADDR_kern; 43561 struct __sk_buff BPF_PROG_TYPE_LWT_IN_prog; 43562 struct sk_buff BPF_PROG_TYPE_LWT_IN_kern; 43563 struct __sk_buff BPF_PROG_TYPE_LWT_OUT_prog; 43564 struct sk_buff BPF_PROG_TYPE_LWT_OUT_kern; 43565 struct __sk_buff BPF_PROG_TYPE_LWT_XMIT_prog; 43566 struct sk_buff BPF_PROG_TYPE_LWT_XMIT_kern; 43567 struct __sk_buff BPF_PROG_TYPE_LWT_SEG6LOCAL_prog; 43568 struct sk_buff BPF_PROG_TYPE_LWT_SEG6LOCAL_kern; 43569 struct bpf_sock_ops BPF_PROG_TYPE_SOCK_OPS_prog; 43570 struct bpf_sock_ops_kern BPF_PROG_TYPE_SOCK_OPS_kern; 43571 struct __sk_buff BPF_PROG_TYPE_SK_SKB_prog; 43572 struct sk_buff BPF_PROG_TYPE_SK_SKB_kern; 43573 struct sk_msg_md BPF_PROG_TYPE_SK_MSG_prog; 43574 struct sk_msg BPF_PROG_TYPE_SK_MSG_kern; 43575 struct __sk_buff BPF_PROG_TYPE_FLOW_DISSECTOR_prog; 43576 struct bpf_flow_dissector BPF_PROG_TYPE_FLOW_DISSECTOR_kern; 43577 bpf_user_pt_regs_t BPF_PROG_TYPE_KPROBE_prog; 43578 struct pt_regs BPF_PROG_TYPE_KPROBE_kern; 43579 __u64 BPF_PROG_TYPE_TRACEPOINT_prog; 43580 u64 BPF_PROG_TYPE_TRACEPOINT_kern; 43581 struct bpf_perf_event_data BPF_PROG_TYPE_PERF_EVENT_prog; 43582 struct bpf_perf_event_data_kern BPF_PROG_TYPE_PERF_EVENT_kern; 43583 struct bpf_raw_tracepoint_args BPF_PROG_TYPE_RAW_TRACEPOINT_prog; 43584 u64 BPF_PROG_TYPE_RAW_TRACEPOINT_kern; 43585 struct bpf_raw_tracepoint_args BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE_prog; 43586 u64 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE_kern; 43587 void *BPF_PROG_TYPE_TRACING_prog; 43588 void *BPF_PROG_TYPE_TRACING_kern; 43589 struct bpf_cgroup_dev_ctx BPF_PROG_TYPE_CGROUP_DEVICE_prog; 43590 struct bpf_cgroup_dev_ctx BPF_PROG_TYPE_CGROUP_DEVICE_kern; 43591 struct bpf_sysctl BPF_PROG_TYPE_CGROUP_SYSCTL_prog; 43592 struct bpf_sysctl_kern BPF_PROG_TYPE_CGROUP_SYSCTL_kern; 43593 struct bpf_sockopt BPF_PROG_TYPE_CGROUP_SOCKOPT_prog; 43594 struct bpf_sockopt_kern BPF_PROG_TYPE_CGROUP_SOCKOPT_kern; 43595 __u32 BPF_PROG_TYPE_LIRC_MODE2_prog; 43596 u32 BPF_PROG_TYPE_LIRC_MODE2_kern; 43597 struct sk_reuseport_md BPF_PROG_TYPE_SK_REUSEPORT_prog; 43598 struct sk_reuseport_kern BPF_PROG_TYPE_SK_REUSEPORT_kern; 43599 struct bpf_sk_lookup BPF_PROG_TYPE_SK_LOOKUP_prog; 43600 struct bpf_sk_lookup_kern BPF_PROG_TYPE_SK_LOOKUP_kern; 43601 void *BPF_PROG_TYPE_STRUCT_OPS_prog; 43602 void *BPF_PROG_TYPE_STRUCT_OPS_kern; 43603 void *BPF_PROG_TYPE_EXT_prog; 43604 void *BPF_PROG_TYPE_EXT_kern; 43605 void *BPF_PROG_TYPE_LSM_prog; 43606 void *BPF_PROG_TYPE_LSM_kern; 43607 }; 43608 43609 enum { 43610 __ctx_convertBPF_PROG_TYPE_SOCKET_FILTER = 0, 43611 __ctx_convertBPF_PROG_TYPE_SCHED_CLS = 1, 43612 __ctx_convertBPF_PROG_TYPE_SCHED_ACT = 2, 43613 __ctx_convertBPF_PROG_TYPE_XDP = 3, 43614 __ctx_convertBPF_PROG_TYPE_CGROUP_SKB = 4, 43615 __ctx_convertBPF_PROG_TYPE_CGROUP_SOCK = 5, 43616 __ctx_convertBPF_PROG_TYPE_CGROUP_SOCK_ADDR = 6, 43617 __ctx_convertBPF_PROG_TYPE_LWT_IN = 7, 43618 __ctx_convertBPF_PROG_TYPE_LWT_OUT = 8, 43619 __ctx_convertBPF_PROG_TYPE_LWT_XMIT = 9, 43620 __ctx_convertBPF_PROG_TYPE_LWT_SEG6LOCAL = 10, 43621 __ctx_convertBPF_PROG_TYPE_SOCK_OPS = 11, 43622 __ctx_convertBPF_PROG_TYPE_SK_SKB = 12, 43623 __ctx_convertBPF_PROG_TYPE_SK_MSG = 13, 43624 __ctx_convertBPF_PROG_TYPE_FLOW_DISSECTOR = 14, 43625 __ctx_convertBPF_PROG_TYPE_KPROBE = 15, 43626 __ctx_convertBPF_PROG_TYPE_TRACEPOINT = 16, 43627 __ctx_convertBPF_PROG_TYPE_PERF_EVENT = 17, 43628 __ctx_convertBPF_PROG_TYPE_RAW_TRACEPOINT = 18, 43629 __ctx_convertBPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 19, 43630 __ctx_convertBPF_PROG_TYPE_TRACING = 20, 43631 __ctx_convertBPF_PROG_TYPE_CGROUP_DEVICE = 21, 43632 __ctx_convertBPF_PROG_TYPE_CGROUP_SYSCTL = 22, 43633 __ctx_convertBPF_PROG_TYPE_CGROUP_SOCKOPT = 23, 43634 __ctx_convertBPF_PROG_TYPE_LIRC_MODE2 = 24, 43635 __ctx_convertBPF_PROG_TYPE_SK_REUSEPORT = 25, 43636 __ctx_convertBPF_PROG_TYPE_SK_LOOKUP = 26, 43637 __ctx_convertBPF_PROG_TYPE_STRUCT_OPS = 27, 43638 __ctx_convertBPF_PROG_TYPE_EXT = 28, 43639 __ctx_convertBPF_PROG_TYPE_LSM = 29, 43640 __ctx_convert_unused = 30, 43641 }; 43642 43643 enum bpf_struct_walk_result { 43644 WALK_SCALAR = 0, 43645 WALK_PTR = 1, 43646 WALK_STRUCT = 2, 43647 }; 43648 43649 struct btf_show_snprintf { 43650 struct btf_show show; 43651 int len_left; 43652 int len; 43653 }; 43654 43655 struct btf_module { 43656 struct list_head list; 43657 struct module *module; 43658 struct btf *btf; 43659 struct bin_attribute *sysfs_attr; 43660 }; 43661 43662 struct bpf_dispatcher_prog { 43663 struct bpf_prog *prog; 43664 refcount_t users; 43665 }; 43666 43667 struct bpf_dispatcher { 43668 struct mutex mutex; 43669 void *func; 43670 struct bpf_dispatcher_prog progs[48]; 43671 int num_progs; 43672 void *image; 43673 u32 image_off; 43674 struct bpf_ksym ksym; 43675 }; 43676 43677 struct bpf_devmap_val { 43678 __u32 ifindex; 43679 union { 43680 int fd; 43681 __u32 id; 43682 } bpf_prog; 43683 }; 43684 43685 enum net_device_flags { 43686 IFF_UP = 1, 43687 IFF_BROADCAST = 2, 43688 IFF_DEBUG = 4, 43689 IFF_LOOPBACK = 8, 43690 IFF_POINTOPOINT = 16, 43691 IFF_NOTRAILERS = 32, 43692 IFF_RUNNING = 64, 43693 IFF_NOARP = 128, 43694 IFF_PROMISC = 256, 43695 IFF_ALLMULTI = 512, 43696 IFF_MASTER = 1024, 43697 IFF_SLAVE = 2048, 43698 IFF_MULTICAST = 4096, 43699 IFF_PORTSEL = 8192, 43700 IFF_AUTOMEDIA = 16384, 43701 IFF_DYNAMIC = 32768, 43702 IFF_LOWER_UP = 65536, 43703 IFF_DORMANT = 131072, 43704 IFF_ECHO = 262144, 43705 }; 43706 43707 struct xdp_dev_bulk_queue { 43708 struct xdp_frame *q[16]; 43709 struct list_head flush_node; 43710 struct net_device *dev; 43711 struct net_device *dev_rx; 43712 unsigned int count; 43713 }; 43714 43715 enum netdev_cmd { 43716 NETDEV_UP = 1, 43717 NETDEV_DOWN = 2, 43718 NETDEV_REBOOT = 3, 43719 NETDEV_CHANGE = 4, 43720 NETDEV_REGISTER = 5, 43721 NETDEV_UNREGISTER = 6, 43722 NETDEV_CHANGEMTU = 7, 43723 NETDEV_CHANGEADDR = 8, 43724 NETDEV_PRE_CHANGEADDR = 9, 43725 NETDEV_GOING_DOWN = 10, 43726 NETDEV_CHANGENAME = 11, 43727 NETDEV_FEAT_CHANGE = 12, 43728 NETDEV_BONDING_FAILOVER = 13, 43729 NETDEV_PRE_UP = 14, 43730 NETDEV_PRE_TYPE_CHANGE = 15, 43731 NETDEV_POST_TYPE_CHANGE = 16, 43732 NETDEV_POST_INIT = 17, 43733 NETDEV_RELEASE = 18, 43734 NETDEV_NOTIFY_PEERS = 19, 43735 NETDEV_JOIN = 20, 43736 NETDEV_CHANGEUPPER = 21, 43737 NETDEV_RESEND_IGMP = 22, 43738 NETDEV_PRECHANGEMTU = 23, 43739 NETDEV_CHANGEINFODATA = 24, 43740 NETDEV_BONDING_INFO = 25, 43741 NETDEV_PRECHANGEUPPER = 26, 43742 NETDEV_CHANGELOWERSTATE = 27, 43743 NETDEV_UDP_TUNNEL_PUSH_INFO = 28, 43744 NETDEV_UDP_TUNNEL_DROP_INFO = 29, 43745 NETDEV_CHANGE_TX_QUEUE_LEN = 30, 43746 NETDEV_CVLAN_FILTER_PUSH_INFO = 31, 43747 NETDEV_CVLAN_FILTER_DROP_INFO = 32, 43748 NETDEV_SVLAN_FILTER_PUSH_INFO = 33, 43749 NETDEV_SVLAN_FILTER_DROP_INFO = 34, 43750 }; 43751 43752 struct netdev_notifier_info { 43753 struct net_device *dev; 43754 struct netlink_ext_ack *extack; 43755 }; 43756 43757 struct bpf_dtab; 43758 43759 struct bpf_dtab_netdev { 43760 struct net_device *dev; 43761 struct hlist_node index_hlist; 43762 struct bpf_dtab *dtab; 43763 struct bpf_prog *xdp_prog; 43764 struct callback_head rcu; 43765 unsigned int idx; 43766 struct bpf_devmap_val val; 43767 }; 43768 43769 struct bpf_dtab { 43770 struct bpf_map map; 43771 struct bpf_dtab_netdev **netdev_map; 43772 struct list_head list; 43773 struct hlist_head *dev_index_head; 43774 spinlock_t index_lock; 43775 unsigned int items; 43776 u32 n_buckets; 43777 long: 32; 43778 long: 64; 43779 long: 64; 43780 }; 43781 43782 struct bpf_cpumap_val { 43783 __u32 qsize; 43784 union { 43785 int fd; 43786 __u32 id; 43787 } bpf_prog; 43788 }; 43789 43790 typedef struct bio_vec skb_frag_t; 43791 43792 struct skb_shared_hwtstamps { 43793 ktime_t hwtstamp; 43794 }; 43795 43796 struct skb_shared_info { 43797 __u8 __unused; 43798 __u8 meta_len; 43799 __u8 nr_frags; 43800 __u8 tx_flags; 43801 short unsigned int gso_size; 43802 short unsigned int gso_segs; 43803 struct sk_buff *frag_list; 43804 struct skb_shared_hwtstamps hwtstamps; 43805 unsigned int gso_type; 43806 u32 tskey; 43807 atomic_t dataref; 43808 void *destructor_arg; 43809 skb_frag_t frags[17]; 43810 }; 43811 43812 struct bpf_nh_params { 43813 u32 nh_family; 43814 union { 43815 u32 ipv4_nh; 43816 struct in6_addr ipv6_nh; 43817 }; 43818 }; 43819 43820 struct bpf_redirect_info { 43821 u32 flags; 43822 u32 tgt_index; 43823 void *tgt_value; 43824 struct bpf_map *map; 43825 u32 kern_flags; 43826 struct bpf_nh_params nh; 43827 }; 43828 43829 struct ptr_ring { 43830 int producer; 43831 spinlock_t producer_lock; 43832 long: 64; 43833 long: 64; 43834 long: 64; 43835 long: 64; 43836 long: 64; 43837 long: 64; 43838 long: 64; 43839 int consumer_head; 43840 int consumer_tail; 43841 spinlock_t consumer_lock; 43842 long: 32; 43843 long: 64; 43844 long: 64; 43845 long: 64; 43846 long: 64; 43847 long: 64; 43848 long: 64; 43849 int size; 43850 int batch; 43851 void **queue; 43852 long: 64; 43853 long: 64; 43854 long: 64; 43855 long: 64; 43856 long: 64; 43857 long: 64; 43858 }; 43859 43860 struct bpf_cpu_map_entry; 43861 43862 struct xdp_bulk_queue { 43863 void *q[8]; 43864 struct list_head flush_node; 43865 struct bpf_cpu_map_entry *obj; 43866 unsigned int count; 43867 }; 43868 43869 struct bpf_cpu_map; 43870 43871 struct bpf_cpu_map_entry { 43872 u32 cpu; 43873 int map_id; 43874 struct xdp_bulk_queue *bulkq; 43875 struct bpf_cpu_map *cmap; 43876 struct ptr_ring *queue; 43877 struct task_struct *kthread; 43878 struct bpf_cpumap_val value; 43879 struct bpf_prog *prog; 43880 atomic_t refcnt; 43881 struct callback_head rcu; 43882 struct work_struct kthread_stop_wq; 43883 }; 43884 43885 struct bpf_cpu_map { 43886 struct bpf_map map; 43887 struct bpf_cpu_map_entry **cpu_map; 43888 long: 64; 43889 long: 64; 43890 long: 64; 43891 long: 64; 43892 long: 64; 43893 long: 64; 43894 long: 64; 43895 }; 43896 43897 struct rhlist_head { 43898 struct rhash_head rhead; 43899 struct rhlist_head *next; 43900 }; 43901 43902 struct bpf_prog_offload_ops { 43903 int (*insn_hook)(struct bpf_verifier_env *, int, int); 43904 int (*finalize)(struct bpf_verifier_env *); 43905 int (*replace_insn)(struct bpf_verifier_env *, u32, struct bpf_insn *); 43906 int (*remove_insns)(struct bpf_verifier_env *, u32, u32); 43907 int (*prepare)(struct bpf_prog *); 43908 int (*translate)(struct bpf_prog *); 43909 void (*destroy)(struct bpf_prog *); 43910 }; 43911 43912 struct bpf_offload_dev { 43913 const struct bpf_prog_offload_ops *ops; 43914 struct list_head netdevs; 43915 void *priv; 43916 }; 43917 43918 typedef struct ns_common *ns_get_path_helper_t(void *); 43919 43920 struct bpf_offload_netdev { 43921 struct rhash_head l; 43922 struct net_device *netdev; 43923 struct bpf_offload_dev *offdev; 43924 struct list_head progs; 43925 struct list_head maps; 43926 struct list_head offdev_netdevs; 43927 }; 43928 43929 struct ns_get_path_bpf_prog_args { 43930 struct bpf_prog *prog; 43931 struct bpf_prog_info *info; 43932 }; 43933 43934 struct ns_get_path_bpf_map_args { 43935 struct bpf_offloaded_map *offmap; 43936 struct bpf_map_info *info; 43937 }; 43938 43939 struct bpf_netns_link { 43940 struct bpf_link link; 43941 enum bpf_attach_type type; 43942 enum netns_bpf_attach_type netns_type; 43943 struct net *net; 43944 struct list_head node; 43945 }; 43946 43947 enum bpf_stack_build_id_status { 43948 BPF_STACK_BUILD_ID_EMPTY = 0, 43949 BPF_STACK_BUILD_ID_VALID = 1, 43950 BPF_STACK_BUILD_ID_IP = 2, 43951 }; 43952 43953 struct bpf_stack_build_id { 43954 __s32 status; 43955 unsigned char build_id[20]; 43956 union { 43957 __u64 offset; 43958 __u64 ip; 43959 }; 43960 }; 43961 43962 enum { 43963 BPF_F_SKIP_FIELD_MASK = 255, 43964 BPF_F_USER_STACK = 256, 43965 BPF_F_FAST_STACK_CMP = 512, 43966 BPF_F_REUSE_STACKID = 1024, 43967 BPF_F_USER_BUILD_ID = 2048, 43968 }; 43969 43970 typedef __u32 Elf32_Addr; 43971 43972 typedef __u16 Elf32_Half; 43973 43974 typedef __u32 Elf32_Off; 43975 43976 struct elf32_hdr { 43977 unsigned char e_ident[16]; 43978 Elf32_Half e_type; 43979 Elf32_Half e_machine; 43980 Elf32_Word e_version; 43981 Elf32_Addr e_entry; 43982 Elf32_Off e_phoff; 43983 Elf32_Off e_shoff; 43984 Elf32_Word e_flags; 43985 Elf32_Half e_ehsize; 43986 Elf32_Half e_phentsize; 43987 Elf32_Half e_phnum; 43988 Elf32_Half e_shentsize; 43989 Elf32_Half e_shnum; 43990 Elf32_Half e_shstrndx; 43991 }; 43992 43993 typedef struct elf32_hdr Elf32_Ehdr; 43994 43995 struct elf32_phdr { 43996 Elf32_Word p_type; 43997 Elf32_Off p_offset; 43998 Elf32_Addr p_vaddr; 43999 Elf32_Addr p_paddr; 44000 Elf32_Word p_filesz; 44001 Elf32_Word p_memsz; 44002 Elf32_Word p_flags; 44003 Elf32_Word p_align; 44004 }; 44005 44006 typedef struct elf32_phdr Elf32_Phdr; 44007 44008 typedef struct elf32_note Elf32_Nhdr; 44009 44010 enum perf_callchain_context { 44011 PERF_CONTEXT_HV = 4294967264, 44012 PERF_CONTEXT_KERNEL = 4294967168, 44013 PERF_CONTEXT_USER = 4294966784, 44014 PERF_CONTEXT_GUEST = 4294965248, 44015 PERF_CONTEXT_GUEST_KERNEL = 4294965120, 44016 PERF_CONTEXT_GUEST_USER = 4294964736, 44017 PERF_CONTEXT_MAX = 4294963201, 44018 }; 44019 44020 struct stack_map_bucket { 44021 struct pcpu_freelist_node fnode; 44022 u32 hash; 44023 u32 nr; 44024 u64 data[0]; 44025 }; 44026 44027 struct bpf_stack_map { 44028 struct bpf_map map; 44029 void *elems; 44030 struct pcpu_freelist freelist; 44031 u32 n_buckets; 44032 struct stack_map_bucket *buckets[0]; 44033 long: 64; 44034 long: 64; 44035 long: 64; 44036 }; 44037 44038 struct stack_map_irq_work { 44039 struct irq_work irq_work; 44040 struct mm_struct *mm; 44041 }; 44042 44043 typedef u64 (*btf_bpf_get_stackid)(struct pt_regs *, struct bpf_map *, u64); 44044 44045 typedef u64 (*btf_bpf_get_stackid_pe)(struct bpf_perf_event_data_kern *, struct bpf_map *, u64); 44046 44047 typedef u64 (*btf_bpf_get_stack)(struct pt_regs *, void *, u32, u64); 44048 44049 typedef u64 (*btf_bpf_get_task_stack)(struct task_struct *, void *, u32, u64); 44050 44051 typedef u64 (*btf_bpf_get_stack_pe)(struct bpf_perf_event_data_kern *, void *, u32, u64); 44052 44053 enum { 44054 BPF_F_SYSCTL_BASE_NAME = 1, 44055 }; 44056 44057 struct bpf_prog_list { 44058 struct list_head node; 44059 struct bpf_prog *prog; 44060 struct bpf_cgroup_link *link; 44061 struct bpf_cgroup_storage *storage[2]; 44062 }; 44063 44064 struct qdisc_skb_cb { 44065 struct { 44066 unsigned int pkt_len; 44067 u16 slave_dev_queue_mapping; 44068 u16 tc_classid; 44069 }; 44070 unsigned char data[20]; 44071 u16 mru; 44072 }; 44073 44074 struct bpf_skb_data_end { 44075 struct qdisc_skb_cb qdisc_cb; 44076 void *data_meta; 44077 void *data_end; 44078 }; 44079 44080 enum { 44081 TCPF_ESTABLISHED = 2, 44082 TCPF_SYN_SENT = 4, 44083 TCPF_SYN_RECV = 8, 44084 TCPF_FIN_WAIT1 = 16, 44085 TCPF_FIN_WAIT2 = 32, 44086 TCPF_TIME_WAIT = 64, 44087 TCPF_CLOSE = 128, 44088 TCPF_CLOSE_WAIT = 256, 44089 TCPF_LAST_ACK = 512, 44090 TCPF_LISTEN = 1024, 44091 TCPF_CLOSING = 2048, 44092 TCPF_NEW_SYN_RECV = 4096, 44093 }; 44094 44095 typedef u64 (*btf_bpf_sysctl_get_name)(struct bpf_sysctl_kern *, char *, size_t, u64); 44096 44097 typedef u64 (*btf_bpf_sysctl_get_current_value)(struct bpf_sysctl_kern *, char *, size_t); 44098 44099 typedef u64 (*btf_bpf_sysctl_get_new_value)(struct bpf_sysctl_kern *, char *, size_t); 44100 44101 typedef u64 (*btf_bpf_sysctl_set_new_value)(struct bpf_sysctl_kern *, const char *, size_t); 44102 44103 enum sock_type { 44104 SOCK_STREAM = 1, 44105 SOCK_DGRAM = 2, 44106 SOCK_RAW = 3, 44107 SOCK_RDM = 4, 44108 SOCK_SEQPACKET = 5, 44109 SOCK_DCCP = 6, 44110 SOCK_PACKET = 10, 44111 }; 44112 44113 enum { 44114 IPPROTO_IP = 0, 44115 IPPROTO_ICMP = 1, 44116 IPPROTO_IGMP = 2, 44117 IPPROTO_IPIP = 4, 44118 IPPROTO_TCP = 6, 44119 IPPROTO_EGP = 8, 44120 IPPROTO_PUP = 12, 44121 IPPROTO_UDP = 17, 44122 IPPROTO_IDP = 22, 44123 IPPROTO_TP = 29, 44124 IPPROTO_DCCP = 33, 44125 IPPROTO_IPV6 = 41, 44126 IPPROTO_RSVP = 46, 44127 IPPROTO_GRE = 47, 44128 IPPROTO_ESP = 50, 44129 IPPROTO_AH = 51, 44130 IPPROTO_MTP = 92, 44131 IPPROTO_BEETPH = 94, 44132 IPPROTO_ENCAP = 98, 44133 IPPROTO_PIM = 103, 44134 IPPROTO_COMP = 108, 44135 IPPROTO_SCTP = 132, 44136 IPPROTO_UDPLITE = 136, 44137 IPPROTO_MPLS = 137, 44138 IPPROTO_ETHERNET = 143, 44139 IPPROTO_RAW = 255, 44140 IPPROTO_MPTCP = 262, 44141 IPPROTO_MAX = 263, 44142 }; 44143 44144 enum sock_flags { 44145 SOCK_DEAD = 0, 44146 SOCK_DONE = 1, 44147 SOCK_URGINLINE = 2, 44148 SOCK_KEEPOPEN = 3, 44149 SOCK_LINGER = 4, 44150 SOCK_DESTROY = 5, 44151 SOCK_BROADCAST = 6, 44152 SOCK_TIMESTAMP = 7, 44153 SOCK_ZAPPED = 8, 44154 SOCK_USE_WRITE_QUEUE = 9, 44155 SOCK_DBG = 10, 44156 SOCK_RCVTSTAMP = 11, 44157 SOCK_RCVTSTAMPNS = 12, 44158 SOCK_LOCALROUTE = 13, 44159 SOCK_MEMALLOC = 14, 44160 SOCK_TIMESTAMPING_RX_SOFTWARE = 15, 44161 SOCK_FASYNC = 16, 44162 SOCK_RXQ_OVFL = 17, 44163 SOCK_ZEROCOPY = 18, 44164 SOCK_WIFI_STATUS = 19, 44165 SOCK_NOFCS = 20, 44166 SOCK_FILTER_LOCKED = 21, 44167 SOCK_SELECT_ERR_QUEUE = 22, 44168 SOCK_RCU_FREE = 23, 44169 SOCK_TXTIME = 24, 44170 SOCK_XDP = 25, 44171 SOCK_TSTAMP_NEW = 26, 44172 }; 44173 44174 struct reuseport_array { 44175 struct bpf_map map; 44176 struct sock *ptrs[0]; 44177 }; 44178 44179 enum bpf_struct_ops_state { 44180 BPF_STRUCT_OPS_STATE_INIT = 0, 44181 BPF_STRUCT_OPS_STATE_INUSE = 1, 44182 BPF_STRUCT_OPS_STATE_TOBEFREE = 2, 44183 }; 44184 44185 struct bpf_struct_ops_value { 44186 refcount_t refcnt; 44187 enum bpf_struct_ops_state state; 44188 long: 64; 44189 long: 64; 44190 long: 64; 44191 long: 64; 44192 long: 64; 44193 long: 64; 44194 long: 64; 44195 char data[0]; 44196 }; 44197 44198 struct bpf_struct_ops_map { 44199 struct bpf_map map; 44200 const struct bpf_struct_ops *st_ops; 44201 struct mutex lock; 44202 struct bpf_prog **progs; 44203 void *image; 44204 struct bpf_struct_ops_value *uvalue; 44205 struct bpf_struct_ops_value kvalue; 44206 }; 44207 44208 struct bpf_struct_ops_tcp_congestion_ops { 44209 refcount_t refcnt; 44210 enum bpf_struct_ops_state state; 44211 long: 64; 44212 long: 64; 44213 long: 64; 44214 long: 64; 44215 long: 64; 44216 long: 64; 44217 long: 64; 44218 struct tcp_congestion_ops data; 44219 long: 64; 44220 long: 64; 44221 long: 64; 44222 long: 64; 44223 long: 64; 44224 }; 44225 44226 struct sembuf { 44227 short unsigned int sem_num; 44228 short int sem_op; 44229 short int sem_flg; 44230 }; 44231 44232 enum key_need_perm { 44233 KEY_NEED_UNSPECIFIED = 0, 44234 KEY_NEED_VIEW = 1, 44235 KEY_NEED_READ = 2, 44236 KEY_NEED_WRITE = 3, 44237 KEY_NEED_SEARCH = 4, 44238 KEY_NEED_LINK = 5, 44239 KEY_NEED_SETATTR = 6, 44240 KEY_NEED_UNLINK = 7, 44241 KEY_SYSADMIN_OVERRIDE = 8, 44242 KEY_AUTHTOKEN_OVERRIDE = 9, 44243 KEY_DEFER_PERM_CHECK = 10, 44244 }; 44245 44246 struct __key_reference_with_attributes; 44247 44248 typedef struct __key_reference_with_attributes *key_ref_t; 44249 44250 struct xfrm_sec_ctx { 44251 __u8 ctx_doi; 44252 __u8 ctx_alg; 44253 __u16 ctx_len; 44254 __u32 ctx_sid; 44255 char ctx_str[0]; 44256 }; 44257 44258 struct xfrm_user_sec_ctx { 44259 __u16 len; 44260 __u16 exttype; 44261 __u8 ctx_alg; 44262 __u8 ctx_doi; 44263 __u16 ctx_len; 44264 }; 44265 44266 enum { 44267 BPF_F_BPRM_SECUREEXEC = 1, 44268 }; 44269 44270 struct watch_notification; 44271 44272 typedef u64 (*btf_bpf_bprm_opts_set)(struct linux_binprm *, u64); 44273 44274 typedef u64 (*btf_bpf_ima_inode_hash)(struct inode *, void *, u32); 44275 44276 struct static_call_tramp_key { 44277 s32 tramp; 44278 s32 key; 44279 }; 44280 44281 enum perf_event_read_format { 44282 PERF_FORMAT_TOTAL_TIME_ENABLED = 1, 44283 PERF_FORMAT_TOTAL_TIME_RUNNING = 2, 44284 PERF_FORMAT_ID = 4, 44285 PERF_FORMAT_GROUP = 8, 44286 PERF_FORMAT_MAX = 16, 44287 }; 44288 44289 enum perf_event_ioc_flags { 44290 PERF_IOC_FLAG_GROUP = 1, 44291 }; 44292 44293 struct perf_ns_link_info { 44294 __u64 dev; 44295 __u64 ino; 44296 }; 44297 44298 enum { 44299 NET_NS_INDEX = 0, 44300 UTS_NS_INDEX = 1, 44301 IPC_NS_INDEX = 2, 44302 PID_NS_INDEX = 3, 44303 USER_NS_INDEX = 4, 44304 MNT_NS_INDEX = 5, 44305 CGROUP_NS_INDEX = 6, 44306 NR_NAMESPACES = 7, 44307 }; 44308 44309 enum perf_event_type { 44310 PERF_RECORD_MMAP = 1, 44311 PERF_RECORD_LOST = 2, 44312 PERF_RECORD_COMM = 3, 44313 PERF_RECORD_EXIT = 4, 44314 PERF_RECORD_THROTTLE = 5, 44315 PERF_RECORD_UNTHROTTLE = 6, 44316 PERF_RECORD_FORK = 7, 44317 PERF_RECORD_READ = 8, 44318 PERF_RECORD_SAMPLE = 9, 44319 PERF_RECORD_MMAP2 = 10, 44320 PERF_RECORD_AUX = 11, 44321 PERF_RECORD_ITRACE_START = 12, 44322 PERF_RECORD_LOST_SAMPLES = 13, 44323 PERF_RECORD_SWITCH = 14, 44324 PERF_RECORD_SWITCH_CPU_WIDE = 15, 44325 PERF_RECORD_NAMESPACES = 16, 44326 PERF_RECORD_KSYMBOL = 17, 44327 PERF_RECORD_BPF_EVENT = 18, 44328 PERF_RECORD_CGROUP = 19, 44329 PERF_RECORD_TEXT_POKE = 20, 44330 PERF_RECORD_MAX = 21, 44331 }; 44332 44333 struct swevent_hlist { 44334 struct hlist_head heads[256]; 44335 struct callback_head callback_head; 44336 }; 44337 44338 struct pmu_event_list { 44339 raw_spinlock_t lock; 44340 struct list_head list; 44341 }; 44342 44343 struct perf_buffer { 44344 refcount_t refcount; 44345 struct callback_head callback_head; 44346 int nr_pages; 44347 int overwrite; 44348 int paused; 44349 atomic_t poll; 44350 local_t head; 44351 unsigned int nest; 44352 local_t events; 44353 local_t wakeup; 44354 local_t lost; 44355 long int watermark; 44356 long int aux_watermark; 44357 spinlock_t event_lock; 44358 struct list_head event_list; 44359 atomic_t mmap_count; 44360 long unsigned int mmap_locked; 44361 struct user_struct *mmap_user; 44362 long int aux_head; 44363 unsigned int aux_nest; 44364 long int aux_wakeup; 44365 long unsigned int aux_pgoff; 44366 int aux_nr_pages; 44367 int aux_overwrite; 44368 atomic_t aux_mmap_count; 44369 long unsigned int aux_mmap_locked; 44370 void (*free_aux)(void *); 44371 refcount_t aux_refcount; 44372 int aux_in_sampling; 44373 void **aux_pages; 44374 void *aux_priv; 44375 struct perf_event_mmap_page *user_page; 44376 void *data_pages[0]; 44377 }; 44378 44379 struct match_token { 44380 int token; 44381 const char *pattern; 44382 }; 44383 44384 enum { 44385 MAX_OPT_ARGS = 3, 44386 }; 44387 44388 typedef struct { 44389 char *from; 44390 char *to; 44391 } substring_t; 44392 44393 struct min_heap { 44394 void *data; 44395 int nr; 44396 int size; 44397 }; 44398 44399 struct min_heap_callbacks { 44400 int elem_size; 44401 bool (*less)(const void *, const void *); 44402 void (*swp)(void *, void *); 44403 }; 44404 44405 typedef int (*remote_function_f)(void *); 44406 44407 struct remote_function_call { 44408 struct task_struct *p; 44409 remote_function_f func; 44410 void *info; 44411 int ret; 44412 }; 44413 44414 typedef void (*event_f)(struct perf_event *, struct perf_cpu_context *, struct perf_event_context *, void *); 44415 44416 struct event_function_struct { 44417 struct perf_event *event; 44418 event_f func; 44419 void *data; 44420 }; 44421 44422 enum event_type_t { 44423 EVENT_FLEXIBLE = 1, 44424 EVENT_PINNED = 2, 44425 EVENT_TIME = 4, 44426 EVENT_CPU = 8, 44427 EVENT_ALL = 3, 44428 }; 44429 44430 struct stop_event_data { 44431 struct perf_event *event; 44432 unsigned int restart; 44433 }; 44434 44435 struct perf_read_data { 44436 struct perf_event *event; 44437 bool group; 44438 int ret; 44439 }; 44440 44441 struct perf_read_event { 44442 struct perf_event_header header; 44443 u32 pid; 44444 u32 tid; 44445 }; 44446 44447 typedef void perf_iterate_f(struct perf_event *, void *); 44448 44449 struct remote_output { 44450 struct perf_buffer *rb; 44451 int err; 44452 }; 44453 44454 struct perf_task_event { 44455 struct task_struct *task; 44456 struct perf_event_context *task_ctx; 44457 struct { 44458 struct perf_event_header header; 44459 u32 pid; 44460 u32 ppid; 44461 u32 tid; 44462 u32 ptid; 44463 u64 time; 44464 } event_id; 44465 }; 44466 44467 struct perf_comm_event { 44468 struct task_struct *task; 44469 char *comm; 44470 int comm_size; 44471 struct { 44472 struct perf_event_header header; 44473 u32 pid; 44474 u32 tid; 44475 } event_id; 44476 }; 44477 44478 struct perf_namespaces_event { 44479 struct task_struct *task; 44480 struct { 44481 struct perf_event_header header; 44482 u32 pid; 44483 u32 tid; 44484 u64 nr_namespaces; 44485 struct perf_ns_link_info link_info[7]; 44486 } event_id; 44487 }; 44488 44489 struct perf_cgroup_event { 44490 char *path; 44491 int path_size; 44492 struct { 44493 struct perf_event_header header; 44494 u64 id; 44495 char path[0]; 44496 } event_id; 44497 }; 44498 44499 struct perf_mmap_event { 44500 struct vm_area_struct *vma; 44501 const char *file_name; 44502 int file_size; 44503 int maj; 44504 int min; 44505 u64 ino; 44506 u64 ino_generation; 44507 u32 prot; 44508 u32 flags; 44509 struct { 44510 struct perf_event_header header; 44511 u32 pid; 44512 u32 tid; 44513 u64 start; 44514 u64 len; 44515 u64 pgoff; 44516 } event_id; 44517 }; 44518 44519 struct perf_switch_event { 44520 struct task_struct *task; 44521 struct task_struct *next_prev; 44522 struct { 44523 struct perf_event_header header; 44524 u32 next_prev_pid; 44525 u32 next_prev_tid; 44526 } event_id; 44527 }; 44528 44529 struct perf_ksymbol_event { 44530 const char *name; 44531 int name_len; 44532 struct { 44533 struct perf_event_header header; 44534 u64 addr; 44535 u32 len; 44536 u16 ksym_type; 44537 u16 flags; 44538 } event_id; 44539 }; 44540 44541 struct perf_bpf_event { 44542 struct bpf_prog *prog; 44543 struct { 44544 struct perf_event_header header; 44545 u16 type; 44546 u16 flags; 44547 u32 id; 44548 u8 tag[8]; 44549 } event_id; 44550 }; 44551 44552 struct perf_text_poke_event { 44553 const void *old_bytes; 44554 const void *new_bytes; 44555 size_t pad; 44556 u16 old_len; 44557 u16 new_len; 44558 struct { 44559 struct perf_event_header header; 44560 u64 addr; 44561 } event_id; 44562 }; 44563 44564 struct swevent_htable { 44565 struct swevent_hlist *swevent_hlist; 44566 struct mutex hlist_mutex; 44567 int hlist_refcount; 44568 int recursion[4]; 44569 }; 44570 44571 enum perf_probe_config { 44572 PERF_PROBE_CONFIG_IS_RETPROBE = 1, 44573 PERF_UPROBE_REF_CTR_OFFSET_BITS = 32, 44574 PERF_UPROBE_REF_CTR_OFFSET_SHIFT = 32, 44575 }; 44576 44577 enum { 44578 IF_ACT_NONE = 4294967295, 44579 IF_ACT_FILTER = 0, 44580 IF_ACT_START = 1, 44581 IF_ACT_STOP = 2, 44582 IF_SRC_FILE = 3, 44583 IF_SRC_KERNEL = 4, 44584 IF_SRC_FILEADDR = 5, 44585 IF_SRC_KERNELADDR = 6, 44586 }; 44587 44588 enum { 44589 IF_STATE_ACTION = 0, 44590 IF_STATE_SOURCE = 1, 44591 IF_STATE_END = 2, 44592 }; 44593 44594 struct perf_aux_event { 44595 struct perf_event_header header; 44596 u32 pid; 44597 u32 tid; 44598 }; 44599 44600 struct perf_aux_event___2 { 44601 struct perf_event_header header; 44602 u64 offset; 44603 u64 size; 44604 u64 flags; 44605 }; 44606 44607 struct callchain_cpus_entries { 44608 struct callback_head callback_head; 44609 struct perf_callchain_entry *cpu_entries[0]; 44610 }; 44611 44612 enum bp_type_idx { 44613 TYPE_INST = 0, 44614 TYPE_DATA = 0, 44615 TYPE_MAX = 1, 44616 }; 44617 44618 struct bp_cpuinfo { 44619 unsigned int cpu_pinned; 44620 unsigned int *tsk_pinned; 44621 unsigned int flexible; 44622 }; 44623 44624 struct bp_busy_slots { 44625 unsigned int pinned; 44626 unsigned int flexible; 44627 }; 44628 44629 typedef u8 uprobe_opcode_t; 44630 44631 struct uprobe { 44632 struct rb_node rb_node; 44633 refcount_t ref; 44634 struct rw_semaphore register_rwsem; 44635 struct rw_semaphore consumer_rwsem; 44636 struct list_head pending_list; 44637 struct uprobe_consumer *consumers; 44638 struct inode *inode; 44639 loff_t offset; 44640 loff_t ref_ctr_offset; 44641 long unsigned int flags; 44642 struct arch_uprobe arch; 44643 }; 44644 44645 struct xol_area { 44646 wait_queue_head_t wq; 44647 atomic_t slot_count; 44648 long unsigned int *bitmap; 44649 struct vm_special_mapping xol_mapping; 44650 struct page *pages[2]; 44651 long unsigned int vaddr; 44652 }; 44653 44654 struct compact_control; 44655 44656 struct capture_control { 44657 struct compact_control *cc; 44658 struct page *page; 44659 }; 44660 44661 typedef int filler_t(void *, struct page *); 44662 44663 struct page_vma_mapped_walk { 44664 struct page *page; 44665 struct vm_area_struct *vma; 44666 long unsigned int address; 44667 pmd_t *pmd; 44668 pte_t *pte; 44669 spinlock_t *ptl; 44670 unsigned int flags; 44671 }; 44672 44673 struct compact_control { 44674 struct list_head freepages; 44675 struct list_head migratepages; 44676 unsigned int nr_freepages; 44677 unsigned int nr_migratepages; 44678 long unsigned int free_pfn; 44679 long unsigned int migrate_pfn; 44680 long unsigned int fast_start_pfn; 44681 struct zone *zone; 44682 long unsigned int total_migrate_scanned; 44683 long unsigned int total_free_scanned; 44684 short unsigned int fast_search_fail; 44685 short int search_order; 44686 const gfp_t gfp_mask; 44687 int order; 44688 int migratetype; 44689 const unsigned int alloc_flags; 44690 const int highest_zoneidx; 44691 enum migrate_mode mode; 44692 bool ignore_skip_hint; 44693 bool no_set_skip_hint; 44694 bool ignore_block_suitable; 44695 bool direct_compaction; 44696 bool proactive_compaction; 44697 bool whole_zone; 44698 bool contended; 44699 bool rescan; 44700 bool alloc_contig; 44701 }; 44702 44703 struct delayed_uprobe { 44704 struct list_head list; 44705 struct uprobe *uprobe; 44706 struct mm_struct *mm; 44707 }; 44708 44709 struct map_info { 44710 struct map_info *next; 44711 struct mm_struct *mm; 44712 long unsigned int vaddr; 44713 }; 44714 44715 struct user_return_notifier { 44716 void (*on_user_return)(struct user_return_notifier *); 44717 struct hlist_node link; 44718 }; 44719 44720 struct parallel_data; 44721 44722 struct padata_priv { 44723 struct list_head list; 44724 struct parallel_data *pd; 44725 int cb_cpu; 44726 unsigned int seq_nr; 44727 int info; 44728 void (*parallel)(struct padata_priv *); 44729 void (*serial)(struct padata_priv *); 44730 }; 44731 44732 struct padata_cpumask { 44733 cpumask_var_t pcpu; 44734 cpumask_var_t cbcpu; 44735 }; 44736 44737 struct padata_shell; 44738 44739 struct padata_list; 44740 44741 struct padata_serial_queue; 44742 44743 struct parallel_data { 44744 struct padata_shell *ps; 44745 struct padata_list *reorder_list; 44746 struct padata_serial_queue *squeue; 44747 atomic_t refcnt; 44748 unsigned int seq_nr; 44749 unsigned int processed; 44750 int cpu; 44751 struct padata_cpumask cpumask; 44752 struct work_struct reorder_work; 44753 long: 64; 44754 long: 64; 44755 long: 64; 44756 long: 64; 44757 long: 64; 44758 spinlock_t lock; 44759 long: 32; 44760 long: 64; 44761 long: 64; 44762 long: 64; 44763 long: 64; 44764 long: 64; 44765 long: 64; 44766 long: 64; 44767 }; 44768 44769 struct padata_list { 44770 struct list_head list; 44771 spinlock_t lock; 44772 }; 44773 44774 struct padata_serial_queue { 44775 struct padata_list serial; 44776 struct work_struct work; 44777 struct parallel_data *pd; 44778 }; 44779 44780 struct padata_instance; 44781 44782 struct padata_shell { 44783 struct padata_instance *pinst; 44784 struct parallel_data *pd; 44785 struct parallel_data *opd; 44786 struct list_head list; 44787 }; 44788 44789 struct padata_instance { 44790 struct hlist_node cpu_online_node; 44791 struct hlist_node cpu_dead_node; 44792 struct workqueue_struct *parallel_wq; 44793 struct workqueue_struct *serial_wq; 44794 struct list_head pslist; 44795 struct padata_cpumask cpumask; 44796 struct kobject kobj; 44797 struct mutex lock; 44798 u8 flags; 44799 }; 44800 44801 struct padata_mt_job { 44802 void (*thread_fn)(long unsigned int, long unsigned int, void *); 44803 void *fn_arg; 44804 long unsigned int start; 44805 long unsigned int size; 44806 long unsigned int align; 44807 long unsigned int min_chunk; 44808 int max_threads; 44809 }; 44810 44811 struct padata_work { 44812 struct work_struct pw_work; 44813 struct list_head pw_list; 44814 void *pw_data; 44815 }; 44816 44817 struct padata_mt_job_state { 44818 spinlock_t lock; 44819 struct completion completion; 44820 struct padata_mt_job *job; 44821 int nworks; 44822 int nworks_fini; 44823 long unsigned int chunk_size; 44824 }; 44825 44826 struct padata_sysfs_entry { 44827 struct attribute attr; 44828 ssize_t (*show)(struct padata_instance *, struct attribute *, char *); 44829 ssize_t (*store)(struct padata_instance *, struct attribute *, const char *, size_t); 44830 }; 44831 44832 struct static_key_mod { 44833 struct static_key_mod *next; 44834 struct jump_entry *entries; 44835 struct module *mod; 44836 }; 44837 44838 struct static_key_deferred { 44839 struct static_key key; 44840 long unsigned int timeout; 44841 struct delayed_work work; 44842 }; 44843 44844 struct trace_event_raw_context_tracking_user { 44845 struct trace_entry ent; 44846 int dummy; 44847 char __data[0]; 44848 }; 44849 44850 struct trace_event_data_offsets_context_tracking_user {}; 44851 44852 typedef void (*btf_trace_user_enter)(void *, int); 44853 44854 typedef void (*btf_trace_user_exit)(void *, int); 44855 44856 enum rseq_cpu_id_state { 44857 RSEQ_CPU_ID_UNINITIALIZED = 4294967295, 44858 RSEQ_CPU_ID_REGISTRATION_FAILED = 4294967294, 44859 }; 44860 44861 enum rseq_flags { 44862 RSEQ_FLAG_UNREGISTER = 1, 44863 }; 44864 44865 enum rseq_cs_flags { 44866 RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = 1, 44867 RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = 2, 44868 RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = 4, 44869 }; 44870 44871 struct rseq_cs { 44872 __u32 version; 44873 __u32 flags; 44874 __u64 start_ip; 44875 __u64 post_commit_offset; 44876 __u64 abort_ip; 44877 }; 44878 44879 struct trace_event_raw_rseq_update { 44880 struct trace_entry ent; 44881 s32 cpu_id; 44882 char __data[0]; 44883 }; 44884 44885 struct trace_event_raw_rseq_ip_fixup { 44886 struct trace_entry ent; 44887 long unsigned int regs_ip; 44888 long unsigned int start_ip; 44889 long unsigned int post_commit_offset; 44890 long unsigned int abort_ip; 44891 char __data[0]; 44892 }; 44893 44894 struct trace_event_data_offsets_rseq_update {}; 44895 44896 struct trace_event_data_offsets_rseq_ip_fixup {}; 44897 44898 typedef void (*btf_trace_rseq_update)(void *, struct task_struct *); 44899 44900 typedef void (*btf_trace_rseq_ip_fixup)(void *, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 44901 44902 struct watch; 44903 44904 struct watch_list { 44905 struct callback_head rcu; 44906 struct hlist_head watchers; 44907 void (*release_watch)(struct watch *); 44908 spinlock_t lock; 44909 }; 44910 44911 enum watch_notification_type { 44912 WATCH_TYPE_META = 0, 44913 WATCH_TYPE_KEY_NOTIFY = 1, 44914 WATCH_TYPE__NR = 2, 44915 }; 44916 44917 enum watch_meta_notification_subtype { 44918 WATCH_META_REMOVAL_NOTIFICATION = 0, 44919 WATCH_META_LOSS_NOTIFICATION = 1, 44920 }; 44921 44922 struct watch_notification___2 { 44923 __u32 type: 24; 44924 __u32 subtype: 8; 44925 __u32 info; 44926 }; 44927 44928 struct watch_notification_type_filter { 44929 __u32 type; 44930 __u32 info_filter; 44931 __u32 info_mask; 44932 __u32 subtype_filter[8]; 44933 }; 44934 44935 struct watch_notification_filter { 44936 __u32 nr_filters; 44937 __u32 __reserved; 44938 struct watch_notification_type_filter filters[0]; 44939 }; 44940 44941 struct watch_notification_removal { 44942 struct watch_notification___2 watch; 44943 __u64 id; 44944 }; 44945 44946 struct watch_type_filter { 44947 enum watch_notification_type type; 44948 __u32 subtype_filter[1]; 44949 __u32 info_filter; 44950 __u32 info_mask; 44951 }; 44952 44953 struct watch_filter { 44954 union { 44955 struct callback_head rcu; 44956 long unsigned int type_filter[2]; 44957 }; 44958 u32 nr_filters; 44959 struct watch_type_filter filters[0]; 44960 }; 44961 44962 struct watch_queue { 44963 struct callback_head rcu; 44964 struct watch_filter *filter; 44965 struct pipe_inode_info *pipe; 44966 struct hlist_head watches; 44967 struct page **notes; 44968 long unsigned int *notes_bitmap; 44969 struct kref usage; 44970 spinlock_t lock; 44971 unsigned int nr_notes; 44972 unsigned int nr_pages; 44973 bool defunct; 44974 }; 44975 44976 struct watch { 44977 union { 44978 struct callback_head rcu; 44979 u32 info_id; 44980 }; 44981 struct watch_queue *queue; 44982 struct hlist_node queue_node; 44983 struct watch_list *watch_list; 44984 struct hlist_node list_node; 44985 const struct cred *cred; 44986 void *private; 44987 u64 id; 44988 struct kref usage; 44989 }; 44990 44991 struct pkcs7_message; 44992 44993 typedef int __kernel_rwf_t; 44994 44995 enum positive_aop_returns { 44996 AOP_WRITEPAGE_ACTIVATE = 524288, 44997 AOP_TRUNCATED_PAGE = 524289, 44998 }; 44999 45000 struct vm_event_state { 45001 long unsigned int event[96]; 45002 }; 45003 45004 enum mapping_flags { 45005 AS_EIO = 0, 45006 AS_ENOSPC = 1, 45007 AS_MM_ALL_LOCKS = 2, 45008 AS_UNEVICTABLE = 3, 45009 AS_EXITING = 4, 45010 AS_NO_WRITEBACK_TAGS = 5, 45011 AS_THP_SUPPORT = 6, 45012 }; 45013 45014 struct wait_page_key { 45015 struct page *page; 45016 int bit_nr; 45017 int page_match; 45018 }; 45019 45020 enum iter_type { 45021 ITER_IOVEC = 4, 45022 ITER_KVEC = 8, 45023 ITER_BVEC = 16, 45024 ITER_PIPE = 32, 45025 ITER_DISCARD = 64, 45026 }; 45027 45028 struct pagevec { 45029 unsigned char nr; 45030 bool percpu_pvec_drained; 45031 struct page *pages[15]; 45032 }; 45033 45034 struct fid { 45035 union { 45036 struct { 45037 u32 ino; 45038 u32 gen; 45039 u32 parent_ino; 45040 u32 parent_gen; 45041 } i32; 45042 struct { 45043 u32 block; 45044 u16 partref; 45045 u16 parent_partref; 45046 u32 generation; 45047 u32 parent_block; 45048 u32 parent_generation; 45049 } udf; 45050 __u32 raw[0]; 45051 }; 45052 }; 45053 45054 struct trace_event_raw_mm_filemap_op_page_cache { 45055 struct trace_entry ent; 45056 long unsigned int pfn; 45057 long unsigned int i_ino; 45058 long unsigned int index; 45059 dev_t s_dev; 45060 char __data[0]; 45061 }; 45062 45063 struct trace_event_raw_filemap_set_wb_err { 45064 struct trace_entry ent; 45065 long unsigned int i_ino; 45066 dev_t s_dev; 45067 errseq_t errseq; 45068 char __data[0]; 45069 }; 45070 45071 struct trace_event_raw_file_check_and_advance_wb_err { 45072 struct trace_entry ent; 45073 struct file *file; 45074 long unsigned int i_ino; 45075 dev_t s_dev; 45076 errseq_t old; 45077 errseq_t new; 45078 char __data[0]; 45079 }; 45080 45081 struct trace_event_data_offsets_mm_filemap_op_page_cache {}; 45082 45083 struct trace_event_data_offsets_filemap_set_wb_err {}; 45084 45085 struct trace_event_data_offsets_file_check_and_advance_wb_err {}; 45086 45087 typedef void (*btf_trace_mm_filemap_delete_from_page_cache)(void *, struct page *); 45088 45089 typedef void (*btf_trace_mm_filemap_add_to_page_cache)(void *, struct page *); 45090 45091 typedef void (*btf_trace_filemap_set_wb_err)(void *, struct address_space *, errseq_t); 45092 45093 typedef void (*btf_trace_file_check_and_advance_wb_err)(void *, struct file *, errseq_t); 45094 45095 enum behavior { 45096 EXCLUSIVE = 0, 45097 SHARED = 1, 45098 DROP = 2, 45099 }; 45100 45101 struct reciprocal_value { 45102 u32 m; 45103 u8 sh1; 45104 u8 sh2; 45105 }; 45106 45107 struct kmem_cache_order_objects { 45108 unsigned int x; 45109 }; 45110 45111 struct kmem_cache_cpu; 45112 45113 struct kmem_cache_node; 45114 45115 struct kmem_cache { 45116 struct kmem_cache_cpu *cpu_slab; 45117 slab_flags_t flags; 45118 long unsigned int min_partial; 45119 unsigned int size; 45120 unsigned int object_size; 45121 struct reciprocal_value reciprocal_size; 45122 unsigned int offset; 45123 unsigned int cpu_partial; 45124 struct kmem_cache_order_objects oo; 45125 struct kmem_cache_order_objects max; 45126 struct kmem_cache_order_objects min; 45127 gfp_t allocflags; 45128 int refcount; 45129 void (*ctor)(void *); 45130 unsigned int inuse; 45131 unsigned int align; 45132 unsigned int red_left_pad; 45133 const char *name; 45134 struct list_head list; 45135 struct kobject kobj; 45136 long unsigned int random; 45137 unsigned int remote_node_defrag_ratio; 45138 unsigned int *random_seq; 45139 unsigned int useroffset; 45140 unsigned int usersize; 45141 struct kmem_cache_node *node[1024]; 45142 }; 45143 45144 struct kmem_cache_cpu { 45145 void **freelist; 45146 long unsigned int tid; 45147 struct page *page; 45148 struct page *partial; 45149 }; 45150 45151 struct kmem_cache_node { 45152 spinlock_t list_lock; 45153 long unsigned int nr_partial; 45154 struct list_head partial; 45155 atomic_long_t nr_slabs; 45156 atomic_long_t total_objects; 45157 struct list_head full; 45158 }; 45159 45160 struct zap_details { 45161 struct address_space *check_mapping; 45162 long unsigned int first_index; 45163 long unsigned int last_index; 45164 }; 45165 45166 enum oom_constraint { 45167 CONSTRAINT_NONE = 0, 45168 CONSTRAINT_CPUSET = 1, 45169 CONSTRAINT_MEMORY_POLICY = 2, 45170 CONSTRAINT_MEMCG = 3, 45171 }; 45172 45173 struct oom_control { 45174 struct zonelist *zonelist; 45175 nodemask_t *nodemask; 45176 struct mem_cgroup *memcg; 45177 const gfp_t gfp_mask; 45178 const int order; 45179 long unsigned int totalpages; 45180 struct task_struct *chosen; 45181 long int chosen_points; 45182 enum oom_constraint constraint; 45183 }; 45184 45185 enum compact_priority { 45186 COMPACT_PRIO_SYNC_FULL = 0, 45187 MIN_COMPACT_PRIORITY = 0, 45188 COMPACT_PRIO_SYNC_LIGHT = 1, 45189 MIN_COMPACT_COSTLY_PRIORITY = 1, 45190 DEF_COMPACT_PRIORITY = 1, 45191 COMPACT_PRIO_ASYNC = 2, 45192 INIT_COMPACT_PRIORITY = 2, 45193 }; 45194 45195 enum compact_result { 45196 COMPACT_NOT_SUITABLE_ZONE = 0, 45197 COMPACT_SKIPPED = 1, 45198 COMPACT_DEFERRED = 2, 45199 COMPACT_NO_SUITABLE_PAGE = 3, 45200 COMPACT_CONTINUE = 4, 45201 COMPACT_COMPLETE = 5, 45202 COMPACT_PARTIAL_SKIPPED = 6, 45203 COMPACT_CONTENDED = 7, 45204 COMPACT_SUCCESS = 8, 45205 }; 45206 45207 struct trace_event_raw_oom_score_adj_update { 45208 struct trace_entry ent; 45209 pid_t pid; 45210 char comm[16]; 45211 short int oom_score_adj; 45212 char __data[0]; 45213 }; 45214 45215 struct trace_event_raw_reclaim_retry_zone { 45216 struct trace_entry ent; 45217 int node; 45218 int zone_idx; 45219 int order; 45220 long unsigned int reclaimable; 45221 long unsigned int available; 45222 long unsigned int min_wmark; 45223 int no_progress_loops; 45224 bool wmark_check; 45225 char __data[0]; 45226 }; 45227 45228 struct trace_event_raw_mark_victim { 45229 struct trace_entry ent; 45230 int pid; 45231 char __data[0]; 45232 }; 45233 45234 struct trace_event_raw_wake_reaper { 45235 struct trace_entry ent; 45236 int pid; 45237 char __data[0]; 45238 }; 45239 45240 struct trace_event_raw_start_task_reaping { 45241 struct trace_entry ent; 45242 int pid; 45243 char __data[0]; 45244 }; 45245 45246 struct trace_event_raw_finish_task_reaping { 45247 struct trace_entry ent; 45248 int pid; 45249 char __data[0]; 45250 }; 45251 45252 struct trace_event_raw_skip_task_reaping { 45253 struct trace_entry ent; 45254 int pid; 45255 char __data[0]; 45256 }; 45257 45258 struct trace_event_raw_compact_retry { 45259 struct trace_entry ent; 45260 int order; 45261 int priority; 45262 int result; 45263 int retries; 45264 int max_retries; 45265 bool ret; 45266 char __data[0]; 45267 }; 45268 45269 struct trace_event_data_offsets_oom_score_adj_update {}; 45270 45271 struct trace_event_data_offsets_reclaim_retry_zone {}; 45272 45273 struct trace_event_data_offsets_mark_victim {}; 45274 45275 struct trace_event_data_offsets_wake_reaper {}; 45276 45277 struct trace_event_data_offsets_start_task_reaping {}; 45278 45279 struct trace_event_data_offsets_finish_task_reaping {}; 45280 45281 struct trace_event_data_offsets_skip_task_reaping {}; 45282 45283 struct trace_event_data_offsets_compact_retry {}; 45284 45285 typedef void (*btf_trace_oom_score_adj_update)(void *, struct task_struct *); 45286 45287 typedef void (*btf_trace_reclaim_retry_zone)(void *, struct zoneref *, int, long unsigned int, long unsigned int, long unsigned int, int, bool); 45288 45289 typedef void (*btf_trace_mark_victim)(void *, int); 45290 45291 typedef void (*btf_trace_wake_reaper)(void *, int); 45292 45293 typedef void (*btf_trace_start_task_reaping)(void *, int); 45294 45295 typedef void (*btf_trace_finish_task_reaping)(void *, int); 45296 45297 typedef void (*btf_trace_skip_task_reaping)(void *, int); 45298 45299 typedef void (*btf_trace_compact_retry)(void *, int, enum compact_priority, enum compact_result, int, int, bool); 45300 45301 enum wb_congested_state { 45302 WB_async_congested = 0, 45303 WB_sync_congested = 1, 45304 }; 45305 45306 enum wb_state { 45307 WB_registered = 0, 45308 WB_writeback_running = 1, 45309 WB_has_dirty_io = 2, 45310 WB_start_all = 3, 45311 }; 45312 45313 enum { 45314 BLK_RW_ASYNC = 0, 45315 BLK_RW_SYNC = 1, 45316 }; 45317 45318 struct wb_lock_cookie { 45319 bool locked; 45320 long unsigned int flags; 45321 }; 45322 45323 typedef int (*writepage_t)(struct page *, struct writeback_control *, void *); 45324 45325 enum page_memcg_data_flags { 45326 MEMCG_DATA_OBJCGS = 1, 45327 MEMCG_DATA_KMEM = 2, 45328 __NR_MEMCG_DATA_FLAGS = 4, 45329 }; 45330 45331 struct dirty_throttle_control { 45332 struct wb_domain *dom; 45333 struct dirty_throttle_control *gdtc; 45334 struct bdi_writeback *wb; 45335 struct fprop_local_percpu *wb_completions; 45336 long unsigned int avail; 45337 long unsigned int dirty; 45338 long unsigned int thresh; 45339 long unsigned int bg_thresh; 45340 long unsigned int wb_dirty; 45341 long unsigned int wb_thresh; 45342 long unsigned int wb_bg_thresh; 45343 long unsigned int pos_ratio; 45344 }; 45345 45346 typedef void compound_page_dtor(struct page *); 45347 45348 struct trace_event_raw_mm_lru_insertion { 45349 struct trace_entry ent; 45350 struct page *page; 45351 long unsigned int pfn; 45352 int lru; 45353 long unsigned int flags; 45354 char __data[0]; 45355 }; 45356 45357 struct trace_event_raw_mm_lru_activate { 45358 struct trace_entry ent; 45359 struct page *page; 45360 long unsigned int pfn; 45361 char __data[0]; 45362 }; 45363 45364 struct trace_event_data_offsets_mm_lru_insertion {}; 45365 45366 struct trace_event_data_offsets_mm_lru_activate {}; 45367 45368 typedef void (*btf_trace_mm_lru_insertion)(void *, struct page *, int); 45369 45370 typedef void (*btf_trace_mm_lru_activate)(void *, struct page *); 45371 45372 struct lru_rotate { 45373 local_lock_t lock; 45374 struct pagevec pvec; 45375 }; 45376 45377 struct lru_pvecs { 45378 local_lock_t lock; 45379 struct pagevec lru_add; 45380 struct pagevec lru_deactivate_file; 45381 struct pagevec lru_deactivate; 45382 struct pagevec lru_lazyfree; 45383 struct pagevec activate_page; 45384 }; 45385 45386 enum lruvec_flags { 45387 LRUVEC_CONGESTED = 0, 45388 }; 45389 45390 enum pgdat_flags { 45391 PGDAT_DIRTY = 0, 45392 PGDAT_WRITEBACK = 1, 45393 PGDAT_RECLAIM_LOCKED = 2, 45394 }; 45395 45396 struct reclaim_stat { 45397 unsigned int nr_dirty; 45398 unsigned int nr_unqueued_dirty; 45399 unsigned int nr_congested; 45400 unsigned int nr_writeback; 45401 unsigned int nr_immediate; 45402 unsigned int nr_pageout; 45403 unsigned int nr_activate[2]; 45404 unsigned int nr_ref_keep; 45405 unsigned int nr_unmap_fail; 45406 unsigned int nr_lazyfree_fail; 45407 }; 45408 45409 struct mem_cgroup_reclaim_cookie { 45410 pg_data_t *pgdat; 45411 unsigned int generation; 45412 }; 45413 45414 enum ttu_flags { 45415 TTU_MIGRATION = 1, 45416 TTU_MUNLOCK = 2, 45417 TTU_SPLIT_HUGE_PMD = 4, 45418 TTU_IGNORE_MLOCK = 8, 45419 TTU_IGNORE_HWPOISON = 32, 45420 TTU_BATCH_FLUSH = 64, 45421 TTU_RMAP_LOCKED = 128, 45422 TTU_SPLIT_FREEZE = 256, 45423 }; 45424 45425 struct trace_event_raw_mm_vmscan_kswapd_sleep { 45426 struct trace_entry ent; 45427 int nid; 45428 char __data[0]; 45429 }; 45430 45431 struct trace_event_raw_mm_vmscan_kswapd_wake { 45432 struct trace_entry ent; 45433 int nid; 45434 int zid; 45435 int order; 45436 char __data[0]; 45437 }; 45438 45439 struct trace_event_raw_mm_vmscan_wakeup_kswapd { 45440 struct trace_entry ent; 45441 int nid; 45442 int zid; 45443 int order; 45444 gfp_t gfp_flags; 45445 char __data[0]; 45446 }; 45447 45448 struct trace_event_raw_mm_vmscan_direct_reclaim_begin_template { 45449 struct trace_entry ent; 45450 int order; 45451 gfp_t gfp_flags; 45452 char __data[0]; 45453 }; 45454 45455 struct trace_event_raw_mm_vmscan_direct_reclaim_end_template { 45456 struct trace_entry ent; 45457 long unsigned int nr_reclaimed; 45458 char __data[0]; 45459 }; 45460 45461 struct trace_event_raw_mm_shrink_slab_start { 45462 struct trace_entry ent; 45463 struct shrinker *shr; 45464 void *shrink; 45465 int nid; 45466 long int nr_objects_to_shrink; 45467 gfp_t gfp_flags; 45468 long unsigned int cache_items; 45469 long long unsigned int delta; 45470 long unsigned int total_scan; 45471 int priority; 45472 char __data[0]; 45473 }; 45474 45475 struct trace_event_raw_mm_shrink_slab_end { 45476 struct trace_entry ent; 45477 struct shrinker *shr; 45478 int nid; 45479 void *shrink; 45480 long int unused_scan; 45481 long int new_scan; 45482 int retval; 45483 long int total_scan; 45484 char __data[0]; 45485 }; 45486 45487 struct trace_event_raw_mm_vmscan_lru_isolate { 45488 struct trace_entry ent; 45489 int highest_zoneidx; 45490 int order; 45491 long unsigned int nr_requested; 45492 long unsigned int nr_scanned; 45493 long unsigned int nr_skipped; 45494 long unsigned int nr_taken; 45495 isolate_mode_t isolate_mode; 45496 int lru; 45497 char __data[0]; 45498 }; 45499 45500 struct trace_event_raw_mm_vmscan_writepage { 45501 struct trace_entry ent; 45502 long unsigned int pfn; 45503 int reclaim_flags; 45504 char __data[0]; 45505 }; 45506 45507 struct trace_event_raw_mm_vmscan_lru_shrink_inactive { 45508 struct trace_entry ent; 45509 int nid; 45510 long unsigned int nr_scanned; 45511 long unsigned int nr_reclaimed; 45512 long unsigned int nr_dirty; 45513 long unsigned int nr_writeback; 45514 long unsigned int nr_congested; 45515 long unsigned int nr_immediate; 45516 unsigned int nr_activate0; 45517 unsigned int nr_activate1; 45518 long unsigned int nr_ref_keep; 45519 long unsigned int nr_unmap_fail; 45520 int priority; 45521 int reclaim_flags; 45522 char __data[0]; 45523 }; 45524 45525 struct trace_event_raw_mm_vmscan_lru_shrink_active { 45526 struct trace_entry ent; 45527 int nid; 45528 long unsigned int nr_taken; 45529 long unsigned int nr_active; 45530 long unsigned int nr_deactivated; 45531 long unsigned int nr_referenced; 45532 int priority; 45533 int reclaim_flags; 45534 char __data[0]; 45535 }; 45536 45537 struct trace_event_raw_mm_vmscan_inactive_list_is_low { 45538 struct trace_entry ent; 45539 int nid; 45540 int reclaim_idx; 45541 long unsigned int total_inactive; 45542 long unsigned int inactive; 45543 long unsigned int total_active; 45544 long unsigned int active; 45545 long unsigned int ratio; 45546 int reclaim_flags; 45547 char __data[0]; 45548 }; 45549 45550 struct trace_event_raw_mm_vmscan_node_reclaim_begin { 45551 struct trace_entry ent; 45552 int nid; 45553 int order; 45554 gfp_t gfp_flags; 45555 char __data[0]; 45556 }; 45557 45558 struct trace_event_data_offsets_mm_vmscan_kswapd_sleep {}; 45559 45560 struct trace_event_data_offsets_mm_vmscan_kswapd_wake {}; 45561 45562 struct trace_event_data_offsets_mm_vmscan_wakeup_kswapd {}; 45563 45564 struct trace_event_data_offsets_mm_vmscan_direct_reclaim_begin_template {}; 45565 45566 struct trace_event_data_offsets_mm_vmscan_direct_reclaim_end_template {}; 45567 45568 struct trace_event_data_offsets_mm_shrink_slab_start {}; 45569 45570 struct trace_event_data_offsets_mm_shrink_slab_end {}; 45571 45572 struct trace_event_data_offsets_mm_vmscan_lru_isolate {}; 45573 45574 struct trace_event_data_offsets_mm_vmscan_writepage {}; 45575 45576 struct trace_event_data_offsets_mm_vmscan_lru_shrink_inactive {}; 45577 45578 struct trace_event_data_offsets_mm_vmscan_lru_shrink_active {}; 45579 45580 struct trace_event_data_offsets_mm_vmscan_inactive_list_is_low {}; 45581 45582 struct trace_event_data_offsets_mm_vmscan_node_reclaim_begin {}; 45583 45584 typedef void (*btf_trace_mm_vmscan_kswapd_sleep)(void *, int); 45585 45586 typedef void (*btf_trace_mm_vmscan_kswapd_wake)(void *, int, int, int); 45587 45588 typedef void (*btf_trace_mm_vmscan_wakeup_kswapd)(void *, int, int, int, gfp_t); 45589 45590 typedef void (*btf_trace_mm_vmscan_direct_reclaim_begin)(void *, int, gfp_t); 45591 45592 typedef void (*btf_trace_mm_vmscan_memcg_reclaim_begin)(void *, int, gfp_t); 45593 45594 typedef void (*btf_trace_mm_vmscan_memcg_softlimit_reclaim_begin)(void *, int, gfp_t); 45595 45596 typedef void (*btf_trace_mm_vmscan_direct_reclaim_end)(void *, long unsigned int); 45597 45598 typedef void (*btf_trace_mm_vmscan_memcg_reclaim_end)(void *, long unsigned int); 45599 45600 typedef void (*btf_trace_mm_vmscan_memcg_softlimit_reclaim_end)(void *, long unsigned int); 45601 45602 typedef void (*btf_trace_mm_shrink_slab_start)(void *, struct shrinker *, struct shrink_control *, long int, long unsigned int, long long unsigned int, long unsigned int, int); 45603 45604 typedef void (*btf_trace_mm_shrink_slab_end)(void *, struct shrinker *, int, int, long int, long int, long int); 45605 45606 typedef void (*btf_trace_mm_vmscan_lru_isolate)(void *, int, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, isolate_mode_t, int); 45607 45608 typedef void (*btf_trace_mm_vmscan_writepage)(void *, struct page *); 45609 45610 typedef void (*btf_trace_mm_vmscan_lru_shrink_inactive)(void *, int, long unsigned int, long unsigned int, struct reclaim_stat *, int, int); 45611 45612 typedef void (*btf_trace_mm_vmscan_lru_shrink_active)(void *, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, int, int); 45613 45614 typedef void (*btf_trace_mm_vmscan_inactive_list_is_low)(void *, int, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, int); 45615 45616 typedef void (*btf_trace_mm_vmscan_node_reclaim_begin)(void *, int, int, gfp_t); 45617 45618 typedef void (*btf_trace_mm_vmscan_node_reclaim_end)(void *, long unsigned int); 45619 45620 struct scan_control { 45621 long unsigned int nr_to_reclaim; 45622 nodemask_t *nodemask; 45623 struct mem_cgroup *target_mem_cgroup; 45624 long unsigned int anon_cost; 45625 long unsigned int file_cost; 45626 unsigned int may_deactivate: 2; 45627 unsigned int force_deactivate: 1; 45628 unsigned int skipped_deactivate: 1; 45629 unsigned int may_writepage: 1; 45630 unsigned int may_unmap: 1; 45631 unsigned int may_swap: 1; 45632 unsigned int memcg_low_reclaim: 1; 45633 unsigned int memcg_low_skipped: 1; 45634 unsigned int hibernation_mode: 1; 45635 unsigned int compaction_ready: 1; 45636 unsigned int cache_trim_mode: 1; 45637 unsigned int file_is_tiny: 1; 45638 s8 order; 45639 s8 priority; 45640 s8 reclaim_idx; 45641 gfp_t gfp_mask; 45642 long unsigned int nr_scanned; 45643 long unsigned int nr_reclaimed; 45644 struct { 45645 unsigned int dirty; 45646 unsigned int unqueued_dirty; 45647 unsigned int congested; 45648 unsigned int writeback; 45649 unsigned int immediate; 45650 unsigned int file_taken; 45651 unsigned int taken; 45652 } nr; 45653 struct reclaim_state reclaim_state; 45654 }; 45655 45656 typedef enum { 45657 PAGE_KEEP = 0, 45658 PAGE_ACTIVATE = 1, 45659 PAGE_SUCCESS = 2, 45660 PAGE_CLEAN = 3, 45661 } pageout_t; 45662 45663 enum page_references { 45664 PAGEREF_RECLAIM = 0, 45665 PAGEREF_RECLAIM_CLEAN = 1, 45666 PAGEREF_KEEP = 2, 45667 PAGEREF_ACTIVATE = 3, 45668 }; 45669 45670 enum scan_balance { 45671 SCAN_EQUAL = 0, 45672 SCAN_FRACT = 1, 45673 SCAN_ANON = 2, 45674 SCAN_FILE = 3, 45675 }; 45676 45677 enum transparent_hugepage_flag { 45678 TRANSPARENT_HUGEPAGE_FLAG = 0, 45679 TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG = 1, 45680 TRANSPARENT_HUGEPAGE_DEFRAG_DIRECT_FLAG = 2, 45681 TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_FLAG = 3, 45682 TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_OR_MADV_FLAG = 4, 45683 TRANSPARENT_HUGEPAGE_DEFRAG_REQ_MADV_FLAG = 5, 45684 TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG = 6, 45685 TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG = 7, 45686 TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG = 8, 45687 }; 45688 45689 struct xattr; 45690 45691 typedef int (*initxattrs)(struct inode *, const struct xattr *, void *); 45692 45693 struct xattr { 45694 const char *name; 45695 void *value; 45696 size_t value_len; 45697 }; 45698 45699 struct constant_table { 45700 const char *name; 45701 int value; 45702 }; 45703 45704 enum { 45705 MPOL_DEFAULT = 0, 45706 MPOL_PREFERRED = 1, 45707 MPOL_BIND = 2, 45708 MPOL_INTERLEAVE = 3, 45709 MPOL_LOCAL = 4, 45710 MPOL_MAX = 5, 45711 }; 45712 45713 struct shared_policy { 45714 struct rb_root root; 45715 rwlock_t lock; 45716 }; 45717 45718 struct simple_xattrs { 45719 struct list_head head; 45720 spinlock_t lock; 45721 }; 45722 45723 struct simple_xattr { 45724 struct list_head list; 45725 char *name; 45726 size_t size; 45727 char value[0]; 45728 }; 45729 45730 struct shmem_inode_info { 45731 spinlock_t lock; 45732 unsigned int seals; 45733 long unsigned int flags; 45734 long unsigned int alloced; 45735 long unsigned int swapped; 45736 struct list_head shrinklist; 45737 struct list_head swaplist; 45738 struct shared_policy policy; 45739 struct simple_xattrs xattrs; 45740 atomic_t stop_eviction; 45741 struct inode vfs_inode; 45742 }; 45743 45744 struct shmem_sb_info { 45745 long unsigned int max_blocks; 45746 struct percpu_counter used_blocks; 45747 long unsigned int max_inodes; 45748 long unsigned int free_inodes; 45749 spinlock_t stat_lock; 45750 umode_t mode; 45751 unsigned char huge; 45752 kuid_t uid; 45753 kgid_t gid; 45754 bool full_inums; 45755 ino_t next_ino; 45756 ino_t *ino_batch; 45757 struct mempolicy *mpol; 45758 spinlock_t shrinklist_lock; 45759 struct list_head shrinklist; 45760 long unsigned int shrinklist_len; 45761 }; 45762 45763 enum sgp_type { 45764 SGP_READ = 0, 45765 SGP_CACHE = 1, 45766 SGP_NOHUGE = 2, 45767 SGP_HUGE = 3, 45768 SGP_WRITE = 4, 45769 SGP_FALLOC = 5, 45770 }; 45771 45772 enum fid_type { 45773 FILEID_ROOT = 0, 45774 FILEID_INO32_GEN = 1, 45775 FILEID_INO32_GEN_PARENT = 2, 45776 FILEID_BTRFS_WITHOUT_PARENT = 77, 45777 FILEID_BTRFS_WITH_PARENT = 78, 45778 FILEID_BTRFS_WITH_PARENT_ROOT = 79, 45779 FILEID_UDF_WITHOUT_PARENT = 81, 45780 FILEID_UDF_WITH_PARENT = 82, 45781 FILEID_NILFS_WITHOUT_PARENT = 97, 45782 FILEID_NILFS_WITH_PARENT = 98, 45783 FILEID_FAT_WITHOUT_PARENT = 113, 45784 FILEID_FAT_WITH_PARENT = 114, 45785 FILEID_LUSTRE = 151, 45786 FILEID_KERNFS = 254, 45787 FILEID_INVALID = 255, 45788 }; 45789 45790 struct shmem_falloc { 45791 wait_queue_head_t *waitq; 45792 long unsigned int start; 45793 long unsigned int next; 45794 long unsigned int nr_falloced; 45795 long unsigned int nr_unswapped; 45796 }; 45797 45798 struct shmem_options { 45799 long long unsigned int blocks; 45800 long long unsigned int inodes; 45801 struct mempolicy *mpol; 45802 kuid_t uid; 45803 kgid_t gid; 45804 umode_t mode; 45805 bool full_inums; 45806 int huge; 45807 int seen; 45808 }; 45809 45810 enum shmem_param { 45811 Opt_gid = 0, 45812 Opt_huge = 1, 45813 Opt_mode = 2, 45814 Opt_mpol = 3, 45815 Opt_nr_blocks = 4, 45816 Opt_nr_inodes = 5, 45817 Opt_size = 6, 45818 Opt_uid = 7, 45819 Opt_inode32 = 8, 45820 Opt_inode64 = 9, 45821 }; 45822 45823 enum writeback_stat_item { 45824 NR_DIRTY_THRESHOLD = 0, 45825 NR_DIRTY_BG_THRESHOLD = 1, 45826 NR_VM_WRITEBACK_STAT_ITEMS = 2, 45827 }; 45828 45829 struct contig_page_info { 45830 long unsigned int free_pages; 45831 long unsigned int free_blocks_total; 45832 long unsigned int free_blocks_suitable; 45833 }; 45834 45835 struct radix_tree_iter { 45836 long unsigned int index; 45837 long unsigned int next_index; 45838 long unsigned int tags; 45839 struct xa_node *node; 45840 }; 45841 45842 enum { 45843 RADIX_TREE_ITER_TAG_MASK = 15, 45844 RADIX_TREE_ITER_TAGGED = 16, 45845 RADIX_TREE_ITER_CONTIG = 32, 45846 }; 45847 45848 enum mminit_level { 45849 MMINIT_WARNING = 0, 45850 MMINIT_VERIFY = 1, 45851 MMINIT_TRACE = 2, 45852 }; 45853 45854 struct pcpu_group_info { 45855 int nr_units; 45856 long unsigned int base_offset; 45857 unsigned int *cpu_map; 45858 }; 45859 45860 struct pcpu_alloc_info { 45861 size_t static_size; 45862 size_t reserved_size; 45863 size_t dyn_size; 45864 size_t unit_size; 45865 size_t atom_size; 45866 size_t alloc_size; 45867 size_t __ai_size; 45868 int nr_groups; 45869 struct pcpu_group_info groups[0]; 45870 }; 45871 45872 struct trace_event_raw_percpu_alloc_percpu { 45873 struct trace_entry ent; 45874 bool reserved; 45875 bool is_atomic; 45876 size_t size; 45877 size_t align; 45878 void *base_addr; 45879 int off; 45880 void *ptr; 45881 char __data[0]; 45882 }; 45883 45884 struct trace_event_raw_percpu_free_percpu { 45885 struct trace_entry ent; 45886 void *base_addr; 45887 int off; 45888 void *ptr; 45889 char __data[0]; 45890 }; 45891 45892 struct trace_event_raw_percpu_alloc_percpu_fail { 45893 struct trace_entry ent; 45894 bool reserved; 45895 bool is_atomic; 45896 size_t size; 45897 size_t align; 45898 char __data[0]; 45899 }; 45900 45901 struct trace_event_raw_percpu_create_chunk { 45902 struct trace_entry ent; 45903 void *base_addr; 45904 char __data[0]; 45905 }; 45906 45907 struct trace_event_raw_percpu_destroy_chunk { 45908 struct trace_entry ent; 45909 void *base_addr; 45910 char __data[0]; 45911 }; 45912 45913 struct trace_event_data_offsets_percpu_alloc_percpu {}; 45914 45915 struct trace_event_data_offsets_percpu_free_percpu {}; 45916 45917 struct trace_event_data_offsets_percpu_alloc_percpu_fail {}; 45918 45919 struct trace_event_data_offsets_percpu_create_chunk {}; 45920 45921 struct trace_event_data_offsets_percpu_destroy_chunk {}; 45922 45923 typedef void (*btf_trace_percpu_alloc_percpu)(void *, bool, bool, size_t, size_t, void *, int, void *); 45924 45925 typedef void (*btf_trace_percpu_free_percpu)(void *, void *, int, void *); 45926 45927 typedef void (*btf_trace_percpu_alloc_percpu_fail)(void *, bool, bool, size_t, size_t); 45928 45929 typedef void (*btf_trace_percpu_create_chunk)(void *, void *); 45930 45931 typedef void (*btf_trace_percpu_destroy_chunk)(void *, void *); 45932 45933 enum pcpu_chunk_type { 45934 PCPU_CHUNK_ROOT = 0, 45935 PCPU_CHUNK_MEMCG = 1, 45936 PCPU_NR_CHUNK_TYPES = 2, 45937 PCPU_FAIL_ALLOC = 2, 45938 }; 45939 45940 struct pcpu_block_md { 45941 int scan_hint; 45942 int scan_hint_start; 45943 int contig_hint; 45944 int contig_hint_start; 45945 int left_free; 45946 int right_free; 45947 int first_free; 45948 int nr_bits; 45949 }; 45950 45951 struct pcpu_chunk { 45952 struct list_head list; 45953 int free_bytes; 45954 struct pcpu_block_md chunk_md; 45955 void *base_addr; 45956 long unsigned int *alloc_map; 45957 long unsigned int *bound_map; 45958 struct pcpu_block_md *md_blocks; 45959 void *data; 45960 bool immutable; 45961 int start_offset; 45962 int end_offset; 45963 struct obj_cgroup **obj_cgroups; 45964 int nr_pages; 45965 int nr_populated; 45966 int nr_empty_pop_pages; 45967 long unsigned int populated[0]; 45968 }; 45969 45970 struct trace_event_raw_kmem_alloc { 45971 struct trace_entry ent; 45972 long unsigned int call_site; 45973 const void *ptr; 45974 size_t bytes_req; 45975 size_t bytes_alloc; 45976 gfp_t gfp_flags; 45977 char __data[0]; 45978 }; 45979 45980 struct trace_event_raw_kmem_alloc_node { 45981 struct trace_entry ent; 45982 long unsigned int call_site; 45983 const void *ptr; 45984 size_t bytes_req; 45985 size_t bytes_alloc; 45986 gfp_t gfp_flags; 45987 int node; 45988 char __data[0]; 45989 }; 45990 45991 struct trace_event_raw_kmem_free { 45992 struct trace_entry ent; 45993 long unsigned int call_site; 45994 const void *ptr; 45995 char __data[0]; 45996 }; 45997 45998 struct trace_event_raw_mm_page_free { 45999 struct trace_entry ent; 46000 long unsigned int pfn; 46001 unsigned int order; 46002 char __data[0]; 46003 }; 46004 46005 struct trace_event_raw_mm_page_free_batched { 46006 struct trace_entry ent; 46007 long unsigned int pfn; 46008 char __data[0]; 46009 }; 46010 46011 struct trace_event_raw_mm_page_alloc { 46012 struct trace_entry ent; 46013 long unsigned int pfn; 46014 unsigned int order; 46015 gfp_t gfp_flags; 46016 int migratetype; 46017 char __data[0]; 46018 }; 46019 46020 struct trace_event_raw_mm_page { 46021 struct trace_entry ent; 46022 long unsigned int pfn; 46023 unsigned int order; 46024 int migratetype; 46025 char __data[0]; 46026 }; 46027 46028 struct trace_event_raw_mm_page_pcpu_drain { 46029 struct trace_entry ent; 46030 long unsigned int pfn; 46031 unsigned int order; 46032 int migratetype; 46033 char __data[0]; 46034 }; 46035 46036 struct trace_event_raw_mm_page_alloc_extfrag { 46037 struct trace_entry ent; 46038 long unsigned int pfn; 46039 int alloc_order; 46040 int fallback_order; 46041 int alloc_migratetype; 46042 int fallback_migratetype; 46043 int change_ownership; 46044 char __data[0]; 46045 }; 46046 46047 struct trace_event_raw_rss_stat { 46048 struct trace_entry ent; 46049 unsigned int mm_id; 46050 unsigned int curr; 46051 int member; 46052 long int size; 46053 char __data[0]; 46054 }; 46055 46056 struct trace_event_data_offsets_kmem_alloc {}; 46057 46058 struct trace_event_data_offsets_kmem_alloc_node {}; 46059 46060 struct trace_event_data_offsets_kmem_free {}; 46061 46062 struct trace_event_data_offsets_mm_page_free {}; 46063 46064 struct trace_event_data_offsets_mm_page_free_batched {}; 46065 46066 struct trace_event_data_offsets_mm_page_alloc {}; 46067 46068 struct trace_event_data_offsets_mm_page {}; 46069 46070 struct trace_event_data_offsets_mm_page_pcpu_drain {}; 46071 46072 struct trace_event_data_offsets_mm_page_alloc_extfrag {}; 46073 46074 struct trace_event_data_offsets_rss_stat {}; 46075 46076 typedef void (*btf_trace_kmalloc)(void *, long unsigned int, const void *, size_t, size_t, gfp_t); 46077 46078 typedef void (*btf_trace_kmem_cache_alloc)(void *, long unsigned int, const void *, size_t, size_t, gfp_t); 46079 46080 typedef void (*btf_trace_kmalloc_node)(void *, long unsigned int, const void *, size_t, size_t, gfp_t, int); 46081 46082 typedef void (*btf_trace_kmem_cache_alloc_node)(void *, long unsigned int, const void *, size_t, size_t, gfp_t, int); 46083 46084 typedef void (*btf_trace_kfree)(void *, long unsigned int, const void *); 46085 46086 typedef void (*btf_trace_kmem_cache_free)(void *, long unsigned int, const void *); 46087 46088 typedef void (*btf_trace_mm_page_free)(void *, struct page *, unsigned int); 46089 46090 typedef void (*btf_trace_mm_page_free_batched)(void *, struct page *); 46091 46092 typedef void (*btf_trace_mm_page_alloc)(void *, struct page *, unsigned int, gfp_t, int); 46093 46094 typedef void (*btf_trace_mm_page_alloc_zone_locked)(void *, struct page *, unsigned int, int); 46095 46096 typedef void (*btf_trace_mm_page_pcpu_drain)(void *, struct page *, unsigned int, int); 46097 46098 typedef void (*btf_trace_mm_page_alloc_extfrag)(void *, struct page *, int, int, int, int); 46099 46100 typedef void (*btf_trace_rss_stat)(void *, struct mm_struct *, int, long int); 46101 46102 enum slab_state { 46103 DOWN = 0, 46104 PARTIAL = 1, 46105 PARTIAL_NODE = 2, 46106 UP = 3, 46107 FULL = 4, 46108 }; 46109 46110 struct kmalloc_info_struct { 46111 const char *name[3]; 46112 unsigned int size; 46113 }; 46114 46115 struct slabinfo { 46116 long unsigned int active_objs; 46117 long unsigned int num_objs; 46118 long unsigned int active_slabs; 46119 long unsigned int num_slabs; 46120 long unsigned int shared_avail; 46121 unsigned int limit; 46122 unsigned int batchcount; 46123 unsigned int shared; 46124 unsigned int objects_per_slab; 46125 unsigned int cache_order; 46126 }; 46127 46128 enum pageblock_bits { 46129 PB_migrate = 0, 46130 PB_migrate_end = 2, 46131 PB_migrate_skip = 3, 46132 NR_PAGEBLOCK_BITS = 4, 46133 }; 46134 46135 struct node___2 { 46136 struct device dev; 46137 struct list_head access_list; 46138 struct work_struct node_work; 46139 struct list_head cache_attrs; 46140 struct device *cache_dev; 46141 }; 46142 46143 typedef struct page *new_page_t(struct page *, long unsigned int); 46144 46145 typedef void free_page_t(struct page *, long unsigned int); 46146 46147 struct alloc_context { 46148 struct zonelist *zonelist; 46149 nodemask_t *nodemask; 46150 struct zoneref *preferred_zoneref; 46151 int migratetype; 46152 enum zone_type highest_zoneidx; 46153 bool spread_dirty_pages; 46154 }; 46155 46156 struct trace_event_raw_mm_compaction_isolate_template { 46157 struct trace_entry ent; 46158 long unsigned int start_pfn; 46159 long unsigned int end_pfn; 46160 long unsigned int nr_scanned; 46161 long unsigned int nr_taken; 46162 char __data[0]; 46163 }; 46164 46165 struct trace_event_raw_mm_compaction_migratepages { 46166 struct trace_entry ent; 46167 long unsigned int nr_migrated; 46168 long unsigned int nr_failed; 46169 char __data[0]; 46170 }; 46171 46172 struct trace_event_raw_mm_compaction_begin { 46173 struct trace_entry ent; 46174 long unsigned int zone_start; 46175 long unsigned int migrate_pfn; 46176 long unsigned int free_pfn; 46177 long unsigned int zone_end; 46178 bool sync; 46179 char __data[0]; 46180 }; 46181 46182 struct trace_event_raw_mm_compaction_end { 46183 struct trace_entry ent; 46184 long unsigned int zone_start; 46185 long unsigned int migrate_pfn; 46186 long unsigned int free_pfn; 46187 long unsigned int zone_end; 46188 bool sync; 46189 int status; 46190 char __data[0]; 46191 }; 46192 46193 struct trace_event_raw_mm_compaction_try_to_compact_pages { 46194 struct trace_entry ent; 46195 int order; 46196 gfp_t gfp_mask; 46197 int prio; 46198 char __data[0]; 46199 }; 46200 46201 struct trace_event_raw_mm_compaction_suitable_template { 46202 struct trace_entry ent; 46203 int nid; 46204 enum zone_type idx; 46205 int order; 46206 int ret; 46207 char __data[0]; 46208 }; 46209 46210 struct trace_event_raw_mm_compaction_defer_template { 46211 struct trace_entry ent; 46212 int nid; 46213 enum zone_type idx; 46214 int order; 46215 unsigned int considered; 46216 unsigned int defer_shift; 46217 int order_failed; 46218 char __data[0]; 46219 }; 46220 46221 struct trace_event_raw_mm_compaction_kcompactd_sleep { 46222 struct trace_entry ent; 46223 int nid; 46224 char __data[0]; 46225 }; 46226 46227 struct trace_event_raw_kcompactd_wake_template { 46228 struct trace_entry ent; 46229 int nid; 46230 int order; 46231 enum zone_type highest_zoneidx; 46232 char __data[0]; 46233 }; 46234 46235 struct trace_event_data_offsets_mm_compaction_isolate_template {}; 46236 46237 struct trace_event_data_offsets_mm_compaction_migratepages {}; 46238 46239 struct trace_event_data_offsets_mm_compaction_begin {}; 46240 46241 struct trace_event_data_offsets_mm_compaction_end {}; 46242 46243 struct trace_event_data_offsets_mm_compaction_try_to_compact_pages {}; 46244 46245 struct trace_event_data_offsets_mm_compaction_suitable_template {}; 46246 46247 struct trace_event_data_offsets_mm_compaction_defer_template {}; 46248 46249 struct trace_event_data_offsets_mm_compaction_kcompactd_sleep {}; 46250 46251 struct trace_event_data_offsets_kcompactd_wake_template {}; 46252 46253 typedef void (*btf_trace_mm_compaction_isolate_migratepages)(void *, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 46254 46255 typedef void (*btf_trace_mm_compaction_isolate_freepages)(void *, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 46256 46257 typedef void (*btf_trace_mm_compaction_migratepages)(void *, long unsigned int, int, struct list_head *); 46258 46259 typedef void (*btf_trace_mm_compaction_begin)(void *, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool); 46260 46261 typedef void (*btf_trace_mm_compaction_end)(void *, long unsigned int, long unsigned int, long unsigned int, long unsigned int, bool, int); 46262 46263 typedef void (*btf_trace_mm_compaction_try_to_compact_pages)(void *, int, gfp_t, int); 46264 46265 typedef void (*btf_trace_mm_compaction_finished)(void *, struct zone *, int, int); 46266 46267 typedef void (*btf_trace_mm_compaction_suitable)(void *, struct zone *, int, int); 46268 46269 typedef void (*btf_trace_mm_compaction_deferred)(void *, struct zone *, int); 46270 46271 typedef void (*btf_trace_mm_compaction_defer_compaction)(void *, struct zone *, int); 46272 46273 typedef void (*btf_trace_mm_compaction_defer_reset)(void *, struct zone *, int); 46274 46275 typedef void (*btf_trace_mm_compaction_kcompactd_sleep)(void *, int); 46276 46277 typedef void (*btf_trace_mm_compaction_wakeup_kcompactd)(void *, int, int, enum zone_type); 46278 46279 typedef void (*btf_trace_mm_compaction_kcompactd_wake)(void *, int, int, enum zone_type); 46280 46281 typedef enum { 46282 ISOLATE_ABORT = 0, 46283 ISOLATE_NONE = 1, 46284 ISOLATE_SUCCESS = 2, 46285 } isolate_migrate_t; 46286 46287 struct anon_vma_chain { 46288 struct vm_area_struct *vma; 46289 struct anon_vma *anon_vma; 46290 struct list_head same_vma; 46291 struct rb_node rb; 46292 long unsigned int rb_subtree_last; 46293 }; 46294 46295 enum lru_status { 46296 LRU_REMOVED = 0, 46297 LRU_REMOVED_RETRY = 1, 46298 LRU_ROTATE = 2, 46299 LRU_SKIP = 3, 46300 LRU_RETRY = 4, 46301 }; 46302 46303 typedef enum lru_status (*list_lru_walk_cb)(struct list_head *, struct list_lru_one *, spinlock_t *, void *); 46304 46305 typedef struct { 46306 long unsigned int pd; 46307 } hugepd_t; 46308 46309 struct migration_target_control { 46310 int nid; 46311 nodemask_t *nmask; 46312 gfp_t gfp_mask; 46313 }; 46314 46315 struct follow_page_context { 46316 struct dev_pagemap *pgmap; 46317 unsigned int page_mask; 46318 }; 46319 46320 struct trace_event_raw_mmap_lock_start_locking { 46321 struct trace_entry ent; 46322 struct mm_struct *mm; 46323 u32 __data_loc_memcg_path; 46324 bool write; 46325 char __data[0]; 46326 }; 46327 46328 struct trace_event_raw_mmap_lock_acquire_returned { 46329 struct trace_entry ent; 46330 struct mm_struct *mm; 46331 u32 __data_loc_memcg_path; 46332 bool write; 46333 bool success; 46334 char __data[0]; 46335 }; 46336 46337 struct trace_event_raw_mmap_lock_released { 46338 struct trace_entry ent; 46339 struct mm_struct *mm; 46340 u32 __data_loc_memcg_path; 46341 bool write; 46342 char __data[0]; 46343 }; 46344 46345 struct trace_event_data_offsets_mmap_lock_start_locking { 46346 u32 memcg_path; 46347 }; 46348 46349 struct trace_event_data_offsets_mmap_lock_acquire_returned { 46350 u32 memcg_path; 46351 }; 46352 46353 struct trace_event_data_offsets_mmap_lock_released { 46354 u32 memcg_path; 46355 }; 46356 46357 typedef void (*btf_trace_mmap_lock_start_locking)(void *, struct mm_struct *, const char *, bool); 46358 46359 typedef void (*btf_trace_mmap_lock_acquire_returned)(void *, struct mm_struct *, const char *, bool, bool); 46360 46361 typedef void (*btf_trace_mmap_lock_released)(void *, struct mm_struct *, const char *, bool); 46362 46363 typedef unsigned int pgtbl_mod_mask; 46364 46365 enum { 46366 SWP_USED = 1, 46367 SWP_WRITEOK = 2, 46368 SWP_DISCARDABLE = 4, 46369 SWP_DISCARDING = 8, 46370 SWP_SOLIDSTATE = 16, 46371 SWP_CONTINUED = 32, 46372 SWP_BLKDEV = 64, 46373 SWP_ACTIVATED = 128, 46374 SWP_FS_OPS = 256, 46375 SWP_AREA_DISCARD = 512, 46376 SWP_PAGE_DISCARD = 1024, 46377 SWP_STABLE_WRITES = 2048, 46378 SWP_SYNCHRONOUS_IO = 4096, 46379 SWP_VALID = 8192, 46380 SWP_SCANNING = 16384, 46381 }; 46382 46383 struct copy_subpage_arg { 46384 struct page *dst; 46385 struct page *src; 46386 struct vm_area_struct *vma; 46387 }; 46388 46389 struct mm_walk; 46390 46391 struct mm_walk_ops { 46392 int (*pgd_entry)(pgd_t *, long unsigned int, long unsigned int, struct mm_walk *); 46393 int (*p4d_entry)(p4d_t *, long unsigned int, long unsigned int, struct mm_walk *); 46394 int (*pud_entry)(pud_t *, long unsigned int, long unsigned int, struct mm_walk *); 46395 int (*pmd_entry)(pmd_t *, long unsigned int, long unsigned int, struct mm_walk *); 46396 int (*pte_entry)(pte_t *, long unsigned int, long unsigned int, struct mm_walk *); 46397 int (*pte_hole)(long unsigned int, long unsigned int, int, struct mm_walk *); 46398 int (*hugetlb_entry)(pte_t *, long unsigned int, long unsigned int, long unsigned int, struct mm_walk *); 46399 int (*test_walk)(long unsigned int, long unsigned int, struct mm_walk *); 46400 int (*pre_vma)(long unsigned int, long unsigned int, struct mm_walk *); 46401 void (*post_vma)(struct mm_walk *); 46402 }; 46403 46404 enum page_walk_action { 46405 ACTION_SUBTREE = 0, 46406 ACTION_CONTINUE = 1, 46407 ACTION_AGAIN = 2, 46408 }; 46409 46410 struct mm_walk { 46411 const struct mm_walk_ops *ops; 46412 struct mm_struct *mm; 46413 pgd_t *pgd; 46414 struct vm_area_struct *vma; 46415 enum page_walk_action action; 46416 bool no_vma; 46417 void *private; 46418 }; 46419 46420 enum { 46421 HUGETLB_SHMFS_INODE = 1, 46422 HUGETLB_ANONHUGE_INODE = 2, 46423 }; 46424 46425 struct trace_event_raw_vm_unmapped_area { 46426 struct trace_entry ent; 46427 long unsigned int addr; 46428 long unsigned int total_vm; 46429 long unsigned int flags; 46430 long unsigned int length; 46431 long unsigned int low_limit; 46432 long unsigned int high_limit; 46433 long unsigned int align_mask; 46434 long unsigned int align_offset; 46435 char __data[0]; 46436 }; 46437 46438 struct trace_event_data_offsets_vm_unmapped_area {}; 46439 46440 typedef void (*btf_trace_vm_unmapped_area)(void *, long unsigned int, struct vm_unmapped_area_info *); 46441 46442 enum pgt_entry { 46443 NORMAL_PMD = 0, 46444 HPAGE_PMD = 1, 46445 NORMAL_PUD = 2, 46446 }; 46447 46448 struct rmap_walk_control { 46449 void *arg; 46450 bool (*rmap_one)(struct page *, struct vm_area_struct *, long unsigned int, void *); 46451 int (*done)(struct page *); 46452 struct anon_vma * (*anon_lock)(struct page *); 46453 bool (*invalid_vma)(struct vm_area_struct *, void *); 46454 }; 46455 46456 struct page_referenced_arg { 46457 int mapcount; 46458 int referenced; 46459 long unsigned int vm_flags; 46460 struct mem_cgroup *memcg; 46461 }; 46462 46463 struct vmap_area { 46464 long unsigned int va_start; 46465 long unsigned int va_end; 46466 struct rb_node rb_node; 46467 struct list_head list; 46468 union { 46469 long unsigned int subtree_max_size; 46470 struct vm_struct *vm; 46471 }; 46472 }; 46473 46474 struct vfree_deferred { 46475 struct llist_head list; 46476 struct work_struct wq; 46477 }; 46478 46479 enum fit_type { 46480 NOTHING_FIT = 0, 46481 FL_FIT_TYPE = 1, 46482 LE_FIT_TYPE = 2, 46483 RE_FIT_TYPE = 3, 46484 NE_FIT_TYPE = 4, 46485 }; 46486 46487 struct vmap_block_queue { 46488 spinlock_t lock; 46489 struct list_head free; 46490 }; 46491 46492 struct vmap_block { 46493 spinlock_t lock; 46494 struct vmap_area *va; 46495 long unsigned int free; 46496 long unsigned int dirty; 46497 long unsigned int dirty_min; 46498 long unsigned int dirty_max; 46499 struct list_head free_list; 46500 struct callback_head callback_head; 46501 struct list_head purge; 46502 }; 46503 46504 struct vmap_pfn_data { 46505 long unsigned int *pfns; 46506 pgprot_t prot; 46507 unsigned int idx; 46508 }; 46509 46510 struct page_frag_cache { 46511 void *va; 46512 __u16 offset; 46513 __u16 size; 46514 unsigned int pagecnt_bias; 46515 bool pfmemalloc; 46516 }; 46517 46518 enum zone_flags { 46519 ZONE_BOOSTED_WATERMARK = 0, 46520 }; 46521 46522 typedef int fpi_t; 46523 46524 struct pcpu_drain { 46525 struct zone *zone; 46526 struct work_struct work; 46527 }; 46528 46529 struct mminit_pfnnid_cache { 46530 long unsigned int last_start; 46531 long unsigned int last_end; 46532 int last_nid; 46533 }; 46534 46535 struct madvise_walk_private { 46536 struct mmu_gather *tlb; 46537 bool pageout; 46538 }; 46539 46540 struct vma_swap_readahead { 46541 short unsigned int win; 46542 short unsigned int offset; 46543 short unsigned int nr_pte; 46544 pte_t *ptes; 46545 }; 46546 46547 union swap_header { 46548 struct { 46549 char reserved[4086]; 46550 char magic[10]; 46551 } magic; 46552 struct { 46553 char bootbits[1024]; 46554 __u32 version; 46555 __u32 last_page; 46556 __u32 nr_badpages; 46557 unsigned char sws_uuid[16]; 46558 unsigned char sws_volume[16]; 46559 __u32 padding[117]; 46560 __u32 badpages[1]; 46561 } info; 46562 }; 46563 46564 struct swap_extent { 46565 struct rb_node rb_node; 46566 long unsigned int start_page; 46567 long unsigned int nr_pages; 46568 sector_t start_block; 46569 }; 46570 46571 struct swap_slots_cache { 46572 bool lock_initialized; 46573 struct mutex alloc_lock; 46574 swp_entry_t *slots; 46575 int nr; 46576 int cur; 46577 spinlock_t free_lock; 46578 swp_entry_t *slots_ret; 46579 int n_ret; 46580 }; 46581 46582 struct frontswap_ops { 46583 void (*init)(unsigned int); 46584 int (*store)(unsigned int, long unsigned int, struct page *); 46585 int (*load)(unsigned int, long unsigned int, struct page *); 46586 void (*invalidate_page)(unsigned int, long unsigned int); 46587 void (*invalidate_area)(unsigned int); 46588 struct frontswap_ops *next; 46589 }; 46590 46591 struct crypto_wait { 46592 struct completion completion; 46593 int err; 46594 }; 46595 46596 struct zpool; 46597 46598 struct zpool_ops { 46599 int (*evict)(struct zpool *, long unsigned int); 46600 }; 46601 46602 enum zpool_mapmode { 46603 ZPOOL_MM_RW = 0, 46604 ZPOOL_MM_RO = 1, 46605 ZPOOL_MM_WO = 2, 46606 ZPOOL_MM_DEFAULT = 0, 46607 }; 46608 46609 struct acomp_req { 46610 struct crypto_async_request base; 46611 struct scatterlist *src; 46612 struct scatterlist *dst; 46613 unsigned int slen; 46614 unsigned int dlen; 46615 u32 flags; 46616 void *__ctx[0]; 46617 }; 46618 46619 struct crypto_acomp { 46620 int (*compress)(struct acomp_req *); 46621 int (*decompress)(struct acomp_req *); 46622 void (*dst_free)(struct scatterlist *); 46623 unsigned int reqsize; 46624 struct crypto_tfm base; 46625 }; 46626 46627 struct crypto_acomp_ctx { 46628 struct crypto_acomp *acomp; 46629 struct acomp_req *req; 46630 struct crypto_wait wait; 46631 u8 *dstmem; 46632 struct mutex *mutex; 46633 }; 46634 46635 struct zswap_pool { 46636 struct zpool *zpool; 46637 struct crypto_acomp_ctx *acomp_ctx; 46638 struct kref kref; 46639 struct list_head list; 46640 struct work_struct release_work; 46641 struct work_struct shrink_work; 46642 struct hlist_node node; 46643 char tfm_name[128]; 46644 }; 46645 46646 struct zswap_entry { 46647 struct rb_node rbnode; 46648 long unsigned int offset; 46649 int refcount; 46650 unsigned int length; 46651 struct zswap_pool *pool; 46652 union { 46653 long unsigned int handle; 46654 long unsigned int value; 46655 }; 46656 }; 46657 46658 struct zswap_header { 46659 swp_entry_t swpentry; 46660 }; 46661 46662 struct zswap_tree { 46663 struct rb_root rbroot; 46664 spinlock_t lock; 46665 }; 46666 46667 enum zswap_get_swap_ret { 46668 ZSWAP_SWAPCACHE_NEW = 0, 46669 ZSWAP_SWAPCACHE_EXIST = 1, 46670 ZSWAP_SWAPCACHE_FAIL = 2, 46671 }; 46672 46673 struct dma_pool { 46674 struct list_head page_list; 46675 spinlock_t lock; 46676 size_t size; 46677 struct device *dev; 46678 size_t allocation; 46679 size_t boundary; 46680 char name[32]; 46681 struct list_head pools; 46682 }; 46683 46684 struct dma_page { 46685 struct list_head page_list; 46686 void *vaddr; 46687 dma_addr_t dma; 46688 unsigned int in_use; 46689 unsigned int offset; 46690 }; 46691 46692 enum string_size_units { 46693 STRING_UNITS_10 = 0, 46694 STRING_UNITS_2 = 1, 46695 }; 46696 46697 typedef void (*node_registration_func_t)(struct node___2 *); 46698 46699 struct resv_map { 46700 struct kref refs; 46701 spinlock_t lock; 46702 struct list_head regions; 46703 long int adds_in_progress; 46704 struct list_head region_cache; 46705 long int region_cache_count; 46706 struct page_counter *reservation_counter; 46707 long unsigned int pages_per_hpage; 46708 struct cgroup_subsys_state *css; 46709 }; 46710 46711 struct file_region { 46712 struct list_head link; 46713 long int from; 46714 long int to; 46715 struct page_counter *reservation_counter; 46716 struct cgroup_subsys_state *css; 46717 }; 46718 46719 struct huge_bootmem_page { 46720 struct list_head list; 46721 struct hstate *hstate; 46722 }; 46723 46724 enum hugetlb_memory_event { 46725 HUGETLB_MAX = 0, 46726 HUGETLB_NR_MEMORY_EVENTS = 1, 46727 }; 46728 46729 struct hugetlb_cgroup { 46730 struct cgroup_subsys_state css; 46731 struct page_counter hugepage[2]; 46732 struct page_counter rsvd_hugepage[2]; 46733 atomic_long_t events[2]; 46734 atomic_long_t events_local[2]; 46735 struct cgroup_file events_file[2]; 46736 struct cgroup_file events_local_file[2]; 46737 }; 46738 46739 enum vma_resv_mode { 46740 VMA_NEEDS_RESV = 0, 46741 VMA_COMMIT_RESV = 1, 46742 VMA_END_RESV = 2, 46743 VMA_ADD_RESV = 3, 46744 }; 46745 46746 struct node_hstate { 46747 struct kobject *hugepages_kobj; 46748 struct kobject *hstate_kobjs[2]; 46749 }; 46750 46751 struct nodemask_scratch { 46752 nodemask_t mask1; 46753 nodemask_t mask2; 46754 }; 46755 46756 struct sp_node { 46757 struct rb_node nd; 46758 long unsigned int start; 46759 long unsigned int end; 46760 struct mempolicy *policy; 46761 }; 46762 46763 struct mempolicy_operations { 46764 int (*create)(struct mempolicy *, const nodemask_t *); 46765 void (*rebind)(struct mempolicy *, const nodemask_t *); 46766 }; 46767 46768 struct queue_pages { 46769 struct list_head *pagelist; 46770 long unsigned int flags; 46771 nodemask_t *nmask; 46772 long unsigned int start; 46773 long unsigned int end; 46774 struct vm_area_struct *first; 46775 }; 46776 46777 struct mmu_notifier_subscriptions { 46778 struct hlist_head list; 46779 bool has_itree; 46780 spinlock_t lock; 46781 long unsigned int invalidate_seq; 46782 long unsigned int active_invalidate_ranges; 46783 struct rb_root_cached itree; 46784 wait_queue_head_t wq; 46785 struct hlist_head deferred_list; 46786 }; 46787 46788 struct interval_tree_node { 46789 struct rb_node rb; 46790 long unsigned int start; 46791 long unsigned int last; 46792 long unsigned int __subtree_last; 46793 }; 46794 46795 struct mmu_interval_notifier; 46796 46797 struct mmu_interval_notifier_ops { 46798 bool (*invalidate)(struct mmu_interval_notifier *, const struct mmu_notifier_range *, long unsigned int); 46799 }; 46800 46801 struct mmu_interval_notifier { 46802 struct interval_tree_node interval_tree; 46803 const struct mmu_interval_notifier_ops *ops; 46804 struct mm_struct *mm; 46805 struct hlist_node deferred_item; 46806 long unsigned int invalidate_seq; 46807 }; 46808 46809 struct memory_notify { 46810 long unsigned int start_pfn; 46811 long unsigned int nr_pages; 46812 int status_change_nid_normal; 46813 int status_change_nid_high; 46814 int status_change_nid; 46815 }; 46816 46817 struct rmap_item; 46818 46819 struct mm_slot { 46820 struct hlist_node link; 46821 struct list_head mm_list; 46822 struct rmap_item *rmap_list; 46823 struct mm_struct *mm; 46824 }; 46825 46826 struct stable_node; 46827 46828 struct rmap_item { 46829 struct rmap_item *rmap_list; 46830 union { 46831 struct anon_vma *anon_vma; 46832 int nid; 46833 }; 46834 struct mm_struct *mm; 46835 long unsigned int address; 46836 unsigned int oldchecksum; 46837 union { 46838 struct rb_node node; 46839 struct { 46840 struct stable_node *head; 46841 struct hlist_node hlist; 46842 }; 46843 }; 46844 }; 46845 46846 struct ksm_scan { 46847 struct mm_slot *mm_slot; 46848 long unsigned int address; 46849 struct rmap_item **rmap_list; 46850 long unsigned int seqnr; 46851 }; 46852 46853 struct stable_node { 46854 union { 46855 struct rb_node node; 46856 struct { 46857 struct list_head *head; 46858 struct { 46859 struct hlist_node hlist_dup; 46860 struct list_head list; 46861 }; 46862 }; 46863 }; 46864 struct hlist_head hlist; 46865 union { 46866 long unsigned int kpfn; 46867 long unsigned int chain_prune_time; 46868 }; 46869 int rmap_hlist_len; 46870 int nid; 46871 }; 46872 46873 enum get_ksm_page_flags { 46874 GET_KSM_PAGE_NOLOCK = 0, 46875 GET_KSM_PAGE_LOCK = 1, 46876 GET_KSM_PAGE_TRYLOCK = 2, 46877 }; 46878 46879 enum stat_item { 46880 ALLOC_FASTPATH = 0, 46881 ALLOC_SLOWPATH = 1, 46882 FREE_FASTPATH = 2, 46883 FREE_SLOWPATH = 3, 46884 FREE_FROZEN = 4, 46885 FREE_ADD_PARTIAL = 5, 46886 FREE_REMOVE_PARTIAL = 6, 46887 ALLOC_FROM_PARTIAL = 7, 46888 ALLOC_SLAB = 8, 46889 ALLOC_REFILL = 9, 46890 ALLOC_NODE_MISMATCH = 10, 46891 FREE_SLAB = 11, 46892 CPUSLAB_FLUSH = 12, 46893 DEACTIVATE_FULL = 13, 46894 DEACTIVATE_EMPTY = 14, 46895 DEACTIVATE_TO_HEAD = 15, 46896 DEACTIVATE_TO_TAIL = 16, 46897 DEACTIVATE_REMOTE_FREES = 17, 46898 DEACTIVATE_BYPASS = 18, 46899 ORDER_FALLBACK = 19, 46900 CMPXCHG_DOUBLE_CPU_FAIL = 20, 46901 CMPXCHG_DOUBLE_FAIL = 21, 46902 CPU_PARTIAL_ALLOC = 22, 46903 CPU_PARTIAL_FREE = 23, 46904 CPU_PARTIAL_NODE = 24, 46905 CPU_PARTIAL_DRAIN = 25, 46906 NR_SLUB_STAT_ITEMS = 26, 46907 }; 46908 46909 struct track { 46910 long unsigned int addr; 46911 long unsigned int addrs[16]; 46912 int cpu; 46913 int pid; 46914 long unsigned int when; 46915 }; 46916 46917 enum track_item { 46918 TRACK_ALLOC = 0, 46919 TRACK_FREE = 1, 46920 }; 46921 46922 struct detached_freelist { 46923 struct page *page; 46924 void *tail; 46925 void *freelist; 46926 int cnt; 46927 struct kmem_cache *s; 46928 }; 46929 46930 struct location { 46931 long unsigned int count; 46932 long unsigned int addr; 46933 long long int sum_time; 46934 long int min_time; 46935 long int max_time; 46936 long int min_pid; 46937 long int max_pid; 46938 long unsigned int cpus[128]; 46939 nodemask_t nodes; 46940 }; 46941 46942 struct loc_track { 46943 long unsigned int max; 46944 long unsigned int count; 46945 struct location *loc; 46946 }; 46947 46948 enum slab_stat_type { 46949 SL_ALL = 0, 46950 SL_PARTIAL = 1, 46951 SL_CPU = 2, 46952 SL_OBJECTS = 3, 46953 SL_TOTAL = 4, 46954 }; 46955 46956 struct slab_attribute { 46957 struct attribute attr; 46958 ssize_t (*show)(struct kmem_cache *, char *); 46959 ssize_t (*store)(struct kmem_cache *, const char *, size_t); 46960 }; 46961 46962 struct saved_alias { 46963 struct kmem_cache *s; 46964 const char *name; 46965 struct saved_alias *next; 46966 }; 46967 46968 enum slab_modes { 46969 M_NONE = 0, 46970 M_PARTIAL = 1, 46971 M_FULL = 2, 46972 M_FREE = 3, 46973 }; 46974 46975 enum { 46976 MMOP_OFFLINE = 0, 46977 MMOP_ONLINE = 1, 46978 MMOP_ONLINE_KERNEL = 2, 46979 MMOP_ONLINE_MOVABLE = 3, 46980 }; 46981 46982 typedef int mhp_t; 46983 46984 typedef void (*online_page_callback_t)(struct page *, unsigned int); 46985 46986 struct memory_block { 46987 long unsigned int start_section_nr; 46988 long unsigned int state; 46989 int online_type; 46990 int nid; 46991 struct device dev; 46992 }; 46993 46994 typedef int (*walk_memory_blocks_func_t)(struct memory_block *, void *); 46995 46996 struct buffer_head; 46997 46998 typedef void bh_end_io_t(struct buffer_head *, int); 46999 47000 struct buffer_head { 47001 long unsigned int b_state; 47002 struct buffer_head *b_this_page; 47003 struct page *b_page; 47004 sector_t b_blocknr; 47005 size_t b_size; 47006 char *b_data; 47007 struct block_device *b_bdev; 47008 bh_end_io_t *b_end_io; 47009 void *b_private; 47010 struct list_head b_assoc_buffers; 47011 struct address_space *b_assoc_map; 47012 atomic_t b_count; 47013 spinlock_t b_uptodate_lock; 47014 }; 47015 47016 enum migrate_vma_direction { 47017 MIGRATE_VMA_SELECT_SYSTEM = 1, 47018 MIGRATE_VMA_SELECT_DEVICE_PRIVATE = 2, 47019 }; 47020 47021 struct migrate_vma { 47022 struct vm_area_struct *vma; 47023 long unsigned int *dst; 47024 long unsigned int *src; 47025 long unsigned int cpages; 47026 long unsigned int npages; 47027 long unsigned int start; 47028 long unsigned int end; 47029 void *pgmap_owner; 47030 long unsigned int flags; 47031 }; 47032 47033 enum bh_state_bits { 47034 BH_Uptodate = 0, 47035 BH_Dirty = 1, 47036 BH_Lock = 2, 47037 BH_Req = 3, 47038 BH_Mapped = 4, 47039 BH_New = 5, 47040 BH_Async_Read = 6, 47041 BH_Async_Write = 7, 47042 BH_Delay = 8, 47043 BH_Boundary = 9, 47044 BH_Write_EIO = 10, 47045 BH_Unwritten = 11, 47046 BH_Quiet = 12, 47047 BH_Meta = 13, 47048 BH_Prio = 14, 47049 BH_Defer_Completion = 15, 47050 BH_PrivateStart = 16, 47051 }; 47052 47053 struct trace_event_raw_mm_migrate_pages { 47054 struct trace_entry ent; 47055 long unsigned int succeeded; 47056 long unsigned int failed; 47057 long unsigned int thp_succeeded; 47058 long unsigned int thp_failed; 47059 long unsigned int thp_split; 47060 enum migrate_mode mode; 47061 int reason; 47062 char __data[0]; 47063 }; 47064 47065 struct trace_event_data_offsets_mm_migrate_pages {}; 47066 47067 typedef void (*btf_trace_mm_migrate_pages)(void *, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, enum migrate_mode, int); 47068 47069 enum scan_result { 47070 SCAN_FAIL = 0, 47071 SCAN_SUCCEED = 1, 47072 SCAN_PMD_NULL = 2, 47073 SCAN_EXCEED_NONE_PTE = 3, 47074 SCAN_EXCEED_SWAP_PTE = 4, 47075 SCAN_EXCEED_SHARED_PTE = 5, 47076 SCAN_PTE_NON_PRESENT = 6, 47077 SCAN_PTE_UFFD_WP = 7, 47078 SCAN_PAGE_RO = 8, 47079 SCAN_LACK_REFERENCED_PAGE = 9, 47080 SCAN_PAGE_NULL = 10, 47081 SCAN_SCAN_ABORT = 11, 47082 SCAN_PAGE_COUNT = 12, 47083 SCAN_PAGE_LRU = 13, 47084 SCAN_PAGE_LOCK = 14, 47085 SCAN_PAGE_ANON = 15, 47086 SCAN_PAGE_COMPOUND = 16, 47087 SCAN_ANY_PROCESS = 17, 47088 SCAN_VMA_NULL = 18, 47089 SCAN_VMA_CHECK = 19, 47090 SCAN_ADDRESS_RANGE = 20, 47091 SCAN_SWAP_CACHE_PAGE = 21, 47092 SCAN_DEL_PAGE_LRU = 22, 47093 SCAN_ALLOC_HUGE_PAGE_FAIL = 23, 47094 SCAN_CGROUP_CHARGE_FAIL = 24, 47095 SCAN_TRUNCATED = 25, 47096 SCAN_PAGE_HAS_PRIVATE = 26, 47097 }; 47098 47099 struct trace_event_raw_mm_khugepaged_scan_pmd { 47100 struct trace_entry ent; 47101 struct mm_struct *mm; 47102 long unsigned int pfn; 47103 bool writable; 47104 int referenced; 47105 int none_or_zero; 47106 int status; 47107 int unmapped; 47108 char __data[0]; 47109 }; 47110 47111 struct trace_event_raw_mm_collapse_huge_page { 47112 struct trace_entry ent; 47113 struct mm_struct *mm; 47114 int isolated; 47115 int status; 47116 char __data[0]; 47117 }; 47118 47119 struct trace_event_raw_mm_collapse_huge_page_isolate { 47120 struct trace_entry ent; 47121 long unsigned int pfn; 47122 int none_or_zero; 47123 int referenced; 47124 bool writable; 47125 int status; 47126 char __data[0]; 47127 }; 47128 47129 struct trace_event_raw_mm_collapse_huge_page_swapin { 47130 struct trace_entry ent; 47131 struct mm_struct *mm; 47132 int swapped_in; 47133 int referenced; 47134 int ret; 47135 char __data[0]; 47136 }; 47137 47138 struct trace_event_data_offsets_mm_khugepaged_scan_pmd {}; 47139 47140 struct trace_event_data_offsets_mm_collapse_huge_page {}; 47141 47142 struct trace_event_data_offsets_mm_collapse_huge_page_isolate {}; 47143 47144 struct trace_event_data_offsets_mm_collapse_huge_page_swapin {}; 47145 47146 typedef void (*btf_trace_mm_khugepaged_scan_pmd)(void *, struct mm_struct *, struct page *, bool, int, int, int, int); 47147 47148 typedef void (*btf_trace_mm_collapse_huge_page)(void *, struct mm_struct *, int, int); 47149 47150 typedef void (*btf_trace_mm_collapse_huge_page_isolate)(void *, struct page *, int, int, bool, int); 47151 47152 typedef void (*btf_trace_mm_collapse_huge_page_swapin)(void *, struct mm_struct *, int, int, int); 47153 47154 struct mm_slot___2 { 47155 struct hlist_node hash; 47156 struct list_head mm_node; 47157 struct mm_struct *mm; 47158 int nr_pte_mapped_thp; 47159 long unsigned int pte_mapped_thp[8]; 47160 }; 47161 47162 struct khugepaged_scan { 47163 struct list_head mm_head; 47164 struct mm_slot___2 *mm_slot; 47165 long unsigned int address; 47166 }; 47167 47168 struct mem_cgroup_tree_per_node { 47169 struct rb_root rb_root; 47170 struct rb_node *rb_rightmost; 47171 spinlock_t lock; 47172 }; 47173 47174 struct mem_cgroup_tree { 47175 struct mem_cgroup_tree_per_node *rb_tree_per_node[1024]; 47176 }; 47177 47178 struct mem_cgroup_eventfd_list { 47179 struct list_head list; 47180 struct eventfd_ctx *eventfd; 47181 }; 47182 47183 struct mem_cgroup_event { 47184 struct mem_cgroup *memcg; 47185 struct eventfd_ctx *eventfd; 47186 struct list_head list; 47187 int (*register_event)(struct mem_cgroup *, struct eventfd_ctx *, const char *); 47188 void (*unregister_event)(struct mem_cgroup *, struct eventfd_ctx *); 47189 poll_table pt; 47190 wait_queue_head_t *wqh; 47191 wait_queue_entry_t wait; 47192 struct work_struct remove; 47193 }; 47194 47195 struct move_charge_struct { 47196 spinlock_t lock; 47197 struct mm_struct *mm; 47198 struct mem_cgroup *from; 47199 struct mem_cgroup *to; 47200 long unsigned int flags; 47201 long unsigned int precharge; 47202 long unsigned int moved_charge; 47203 long unsigned int moved_swap; 47204 struct task_struct *moving_task; 47205 wait_queue_head_t waitq; 47206 }; 47207 47208 enum res_type { 47209 _MEM = 0, 47210 _MEMSWAP = 1, 47211 _OOM_TYPE = 2, 47212 _KMEM = 3, 47213 _TCP = 4, 47214 }; 47215 47216 struct memory_stat { 47217 const char *name; 47218 unsigned int ratio; 47219 unsigned int idx; 47220 }; 47221 47222 struct oom_wait_info { 47223 struct mem_cgroup *memcg; 47224 wait_queue_entry_t wait; 47225 }; 47226 47227 enum oom_status { 47228 OOM_SUCCESS = 0, 47229 OOM_FAILED = 1, 47230 OOM_ASYNC = 2, 47231 OOM_SKIPPED = 3, 47232 }; 47233 47234 struct memcg_stock_pcp { 47235 struct mem_cgroup *cached; 47236 unsigned int nr_pages; 47237 struct obj_cgroup *cached_objcg; 47238 unsigned int nr_bytes; 47239 struct work_struct work; 47240 long unsigned int flags; 47241 }; 47242 47243 enum { 47244 RES_USAGE = 0, 47245 RES_LIMIT = 1, 47246 RES_MAX_USAGE = 2, 47247 RES_FAILCNT = 3, 47248 RES_SOFT_LIMIT = 4, 47249 }; 47250 47251 union mc_target { 47252 struct page *page; 47253 swp_entry_t ent; 47254 }; 47255 47256 enum mc_target_type { 47257 MC_TARGET_NONE = 0, 47258 MC_TARGET_PAGE = 1, 47259 MC_TARGET_SWAP = 2, 47260 MC_TARGET_DEVICE = 3, 47261 }; 47262 47263 struct uncharge_gather { 47264 struct mem_cgroup *memcg; 47265 long unsigned int nr_pages; 47266 long unsigned int pgpgout; 47267 long unsigned int nr_kmem; 47268 struct page *dummy_page; 47269 }; 47270 47271 struct numa_stat { 47272 const char *name; 47273 unsigned int lru_mask; 47274 }; 47275 47276 enum vmpressure_levels { 47277 VMPRESSURE_LOW = 0, 47278 VMPRESSURE_MEDIUM = 1, 47279 VMPRESSURE_CRITICAL = 2, 47280 VMPRESSURE_NUM_LEVELS = 3, 47281 }; 47282 47283 enum vmpressure_modes { 47284 VMPRESSURE_NO_PASSTHROUGH = 0, 47285 VMPRESSURE_HIERARCHY = 1, 47286 VMPRESSURE_LOCAL = 2, 47287 VMPRESSURE_NUM_MODES = 3, 47288 }; 47289 47290 struct vmpressure_event { 47291 struct eventfd_ctx *efd; 47292 enum vmpressure_levels level; 47293 enum vmpressure_modes mode; 47294 struct list_head node; 47295 }; 47296 47297 struct swap_cgroup_ctrl { 47298 struct page **map; 47299 long unsigned int length; 47300 spinlock_t lock; 47301 }; 47302 47303 struct swap_cgroup { 47304 short unsigned int id; 47305 }; 47306 47307 enum { 47308 RES_USAGE___2 = 0, 47309 RES_RSVD_USAGE = 1, 47310 RES_LIMIT___2 = 2, 47311 RES_RSVD_LIMIT = 3, 47312 RES_MAX_USAGE___2 = 4, 47313 RES_RSVD_MAX_USAGE = 5, 47314 RES_FAILCNT___2 = 6, 47315 RES_RSVD_FAILCNT = 7, 47316 }; 47317 47318 enum mf_result { 47319 MF_IGNORED = 0, 47320 MF_FAILED = 1, 47321 MF_DELAYED = 2, 47322 MF_RECOVERED = 3, 47323 }; 47324 47325 enum mf_action_page_type { 47326 MF_MSG_KERNEL = 0, 47327 MF_MSG_KERNEL_HIGH_ORDER = 1, 47328 MF_MSG_SLAB = 2, 47329 MF_MSG_DIFFERENT_COMPOUND = 3, 47330 MF_MSG_POISONED_HUGE = 4, 47331 MF_MSG_HUGE = 5, 47332 MF_MSG_FREE_HUGE = 6, 47333 MF_MSG_NON_PMD_HUGE = 7, 47334 MF_MSG_UNMAP_FAILED = 8, 47335 MF_MSG_DIRTY_SWAPCACHE = 9, 47336 MF_MSG_CLEAN_SWAPCACHE = 10, 47337 MF_MSG_DIRTY_MLOCKED_LRU = 11, 47338 MF_MSG_CLEAN_MLOCKED_LRU = 12, 47339 MF_MSG_DIRTY_UNEVICTABLE_LRU = 13, 47340 MF_MSG_CLEAN_UNEVICTABLE_LRU = 14, 47341 MF_MSG_DIRTY_LRU = 15, 47342 MF_MSG_CLEAN_LRU = 16, 47343 MF_MSG_TRUNCATED_LRU = 17, 47344 MF_MSG_BUDDY = 18, 47345 MF_MSG_BUDDY_2ND = 19, 47346 MF_MSG_DAX = 20, 47347 MF_MSG_UNSPLIT_THP = 21, 47348 MF_MSG_UNKNOWN = 22, 47349 }; 47350 47351 typedef long unsigned int dax_entry_t; 47352 47353 struct __kfifo { 47354 unsigned int in; 47355 unsigned int out; 47356 unsigned int mask; 47357 unsigned int esize; 47358 void *data; 47359 }; 47360 47361 struct to_kill { 47362 struct list_head nd; 47363 struct task_struct *tsk; 47364 long unsigned int addr; 47365 short int size_shift; 47366 }; 47367 47368 struct page_state { 47369 long unsigned int mask; 47370 long unsigned int res; 47371 enum mf_action_page_type type; 47372 int (*action)(struct page *, long unsigned int); 47373 }; 47374 47375 struct memory_failure_entry { 47376 long unsigned int pfn; 47377 int flags; 47378 }; 47379 47380 struct memory_failure_cpu { 47381 struct { 47382 union { 47383 struct __kfifo kfifo; 47384 struct memory_failure_entry *type; 47385 const struct memory_failure_entry *const_type; 47386 char (*rectype)[0]; 47387 struct memory_failure_entry *ptr; 47388 const struct memory_failure_entry *ptr_const; 47389 }; 47390 struct memory_failure_entry buf[16]; 47391 } fifo; 47392 spinlock_t lock; 47393 struct work_struct work; 47394 }; 47395 47396 struct cleancache_filekey { 47397 union { 47398 ino_t ino; 47399 __u32 fh[6]; 47400 u32 key[6]; 47401 } u; 47402 }; 47403 47404 struct cleancache_ops { 47405 int (*init_fs)(size_t); 47406 int (*init_shared_fs)(uuid_t *, size_t); 47407 int (*get_page)(int, struct cleancache_filekey, long unsigned int, struct page *); 47408 void (*put_page)(int, struct cleancache_filekey, long unsigned int, struct page *); 47409 void (*invalidate_page)(int, struct cleancache_filekey, long unsigned int); 47410 void (*invalidate_inode)(int, struct cleancache_filekey); 47411 void (*invalidate_fs)(int); 47412 }; 47413 47414 struct trace_event_raw_test_pages_isolated { 47415 struct trace_entry ent; 47416 long unsigned int start_pfn; 47417 long unsigned int end_pfn; 47418 long unsigned int fin_pfn; 47419 char __data[0]; 47420 }; 47421 47422 struct trace_event_data_offsets_test_pages_isolated {}; 47423 47424 typedef void (*btf_trace_test_pages_isolated)(void *, long unsigned int, long unsigned int, long unsigned int); 47425 47426 struct zpool_driver; 47427 47428 struct zpool { 47429 struct zpool_driver *driver; 47430 void *pool; 47431 const struct zpool_ops *ops; 47432 bool evictable; 47433 struct list_head list; 47434 }; 47435 47436 struct zpool_driver { 47437 char *type; 47438 struct module *owner; 47439 atomic_t refcount; 47440 struct list_head list; 47441 void * (*create)(const char *, gfp_t, const struct zpool_ops *, struct zpool *); 47442 void (*destroy)(void *); 47443 bool malloc_support_movable; 47444 int (*malloc)(void *, size_t, gfp_t, long unsigned int *); 47445 void (*free)(void *, long unsigned int); 47446 int (*shrink)(void *, unsigned int, unsigned int *); 47447 void * (*map)(void *, long unsigned int, enum zpool_mapmode); 47448 void (*unmap)(void *, long unsigned int); 47449 u64 (*total_size)(void *); 47450 }; 47451 47452 struct zbud_pool; 47453 47454 struct zbud_ops { 47455 int (*evict)(struct zbud_pool *, long unsigned int); 47456 }; 47457 47458 struct zbud_pool { 47459 spinlock_t lock; 47460 struct list_head unbuddied[63]; 47461 struct list_head buddied; 47462 struct list_head lru; 47463 u64 pages_nr; 47464 const struct zbud_ops *ops; 47465 struct zpool *zpool; 47466 const struct zpool_ops *zpool_ops; 47467 }; 47468 47469 struct zbud_header { 47470 struct list_head buddy; 47471 struct list_head lru; 47472 unsigned int first_chunks; 47473 unsigned int last_chunks; 47474 bool under_reclaim; 47475 }; 47476 47477 enum buddy { 47478 FIRST = 0, 47479 LAST = 1, 47480 }; 47481 47482 enum zs_mapmode { 47483 ZS_MM_RW = 0, 47484 ZS_MM_RO = 1, 47485 ZS_MM_WO = 2, 47486 }; 47487 47488 struct zs_pool_stats { 47489 atomic_long_t pages_compacted; 47490 }; 47491 47492 struct pseudo_fs_context { 47493 const struct super_operations *ops; 47494 const struct xattr_handler **xattr; 47495 const struct dentry_operations *dops; 47496 long unsigned int magic; 47497 }; 47498 47499 enum fullness_group { 47500 ZS_EMPTY = 0, 47501 ZS_ALMOST_EMPTY = 1, 47502 ZS_ALMOST_FULL = 2, 47503 ZS_FULL = 3, 47504 NR_ZS_FULLNESS = 4, 47505 }; 47506 47507 enum zs_stat_type { 47508 CLASS_EMPTY = 0, 47509 CLASS_ALMOST_EMPTY = 1, 47510 CLASS_ALMOST_FULL = 2, 47511 CLASS_FULL = 3, 47512 OBJ_ALLOCATED = 4, 47513 OBJ_USED = 5, 47514 NR_ZS_STAT_TYPE = 6, 47515 }; 47516 47517 struct zs_size_stat { 47518 long unsigned int objs[6]; 47519 }; 47520 47521 struct size_class { 47522 spinlock_t lock; 47523 struct list_head fullness_list[4]; 47524 int size; 47525 int objs_per_zspage; 47526 int pages_per_zspage; 47527 unsigned int index; 47528 struct zs_size_stat stats; 47529 }; 47530 47531 struct link_free { 47532 union { 47533 long unsigned int next; 47534 long unsigned int handle; 47535 }; 47536 }; 47537 47538 struct zs_pool { 47539 const char *name; 47540 struct size_class *size_class[255]; 47541 struct kmem_cache *handle_cachep; 47542 struct kmem_cache *zspage_cachep; 47543 atomic_long_t pages_allocated; 47544 struct zs_pool_stats stats; 47545 struct shrinker shrinker; 47546 struct inode *inode; 47547 struct work_struct free_work; 47548 struct wait_queue_head migration_wait; 47549 atomic_long_t isolated_pages; 47550 bool destroying; 47551 }; 47552 47553 struct zspage { 47554 struct { 47555 unsigned int fullness: 2; 47556 unsigned int class: 9; 47557 unsigned int isolated: 3; 47558 unsigned int magic: 8; 47559 }; 47560 unsigned int inuse; 47561 unsigned int freeobj; 47562 struct page *first_page; 47563 struct list_head list; 47564 rwlock_t lock; 47565 }; 47566 47567 struct mapping_area { 47568 char *vm_buf; 47569 char *vm_addr; 47570 enum zs_mapmode vm_mm; 47571 }; 47572 47573 struct zs_compact_control { 47574 struct page *s_page; 47575 struct page *d_page; 47576 int obj_idx; 47577 }; 47578 47579 struct z3fold_pool; 47580 47581 struct z3fold_ops { 47582 int (*evict)(struct z3fold_pool *, long unsigned int); 47583 }; 47584 47585 struct z3fold_pool { 47586 const char *name; 47587 spinlock_t lock; 47588 spinlock_t stale_lock; 47589 struct list_head *unbuddied; 47590 struct list_head lru; 47591 struct list_head stale; 47592 atomic64_t pages_nr; 47593 struct kmem_cache *c_handle; 47594 const struct z3fold_ops *ops; 47595 struct zpool *zpool; 47596 const struct zpool_ops *zpool_ops; 47597 struct workqueue_struct *compact_wq; 47598 struct workqueue_struct *release_wq; 47599 struct work_struct work; 47600 struct inode *inode; 47601 }; 47602 47603 enum buddy___2 { 47604 HEADLESS = 0, 47605 FIRST___2 = 1, 47606 MIDDLE = 2, 47607 LAST___2 = 3, 47608 BUDDIES_MAX = 3, 47609 }; 47610 47611 struct z3fold_buddy_slots { 47612 long unsigned int slot[4]; 47613 long unsigned int pool; 47614 rwlock_t lock; 47615 }; 47616 47617 struct z3fold_header { 47618 struct list_head buddy; 47619 spinlock_t page_lock; 47620 struct kref refcount; 47621 struct work_struct work; 47622 struct z3fold_buddy_slots *slots; 47623 struct z3fold_pool *pool; 47624 short int cpu; 47625 short unsigned int first_chunks; 47626 short unsigned int middle_chunks; 47627 short unsigned int last_chunks; 47628 short unsigned int start_middle; 47629 short unsigned int first_num: 2; 47630 short unsigned int mapped_count: 2; 47631 short unsigned int foreign_handles: 2; 47632 }; 47633 47634 enum z3fold_page_flags { 47635 PAGE_HEADLESS = 0, 47636 MIDDLE_CHUNK_MAPPED = 1, 47637 NEEDS_COMPACTING = 2, 47638 PAGE_STALE = 3, 47639 PAGE_CLAIMED = 4, 47640 }; 47641 47642 enum z3fold_handle_flags { 47643 HANDLES_NOFREE = 0, 47644 }; 47645 47646 struct trace_event_raw_cma_alloc { 47647 struct trace_entry ent; 47648 long unsigned int pfn; 47649 const struct page *page; 47650 unsigned int count; 47651 unsigned int align; 47652 char __data[0]; 47653 }; 47654 47655 struct trace_event_raw_cma_release { 47656 struct trace_entry ent; 47657 long unsigned int pfn; 47658 const struct page *page; 47659 unsigned int count; 47660 char __data[0]; 47661 }; 47662 47663 struct trace_event_data_offsets_cma_alloc {}; 47664 47665 struct trace_event_data_offsets_cma_release {}; 47666 47667 typedef void (*btf_trace_cma_alloc)(void *, long unsigned int, const struct page *, unsigned int, unsigned int); 47668 47669 typedef void (*btf_trace_cma_release)(void *, long unsigned int, const struct page *, unsigned int); 47670 47671 struct balloon_dev_info { 47672 long unsigned int isolated_pages; 47673 spinlock_t pages_lock; 47674 struct list_head pages; 47675 int (*migratepage)(struct balloon_dev_info *, struct page *, struct page *, enum migrate_mode); 47676 struct inode *inode; 47677 }; 47678 47679 struct frame_vector { 47680 unsigned int nr_allocated; 47681 unsigned int nr_frames; 47682 bool got_ref; 47683 bool is_pfns; 47684 void *ptrs[0]; 47685 }; 47686 47687 enum { 47688 BAD_STACK = 4294967295, 47689 NOT_STACK = 0, 47690 GOOD_FRAME = 1, 47691 GOOD_STACK = 2, 47692 }; 47693 47694 enum hmm_pfn_flags { 47695 HMM_PFN_VALID = 0, 47696 HMM_PFN_WRITE = 0, 47697 HMM_PFN_ERROR = 0, 47698 HMM_PFN_ORDER_SHIFT = 56, 47699 HMM_PFN_REQ_FAULT = 0, 47700 HMM_PFN_REQ_WRITE = 0, 47701 HMM_PFN_FLAGS = 0, 47702 }; 47703 47704 struct hmm_range { 47705 struct mmu_interval_notifier *notifier; 47706 long unsigned int notifier_seq; 47707 long unsigned int start; 47708 long unsigned int end; 47709 long unsigned int *hmm_pfns; 47710 long unsigned int default_flags; 47711 long unsigned int pfn_flags_mask; 47712 void *dev_private_owner; 47713 }; 47714 47715 struct hmm_vma_walk { 47716 struct hmm_range *range; 47717 long unsigned int last; 47718 }; 47719 47720 enum { 47721 HMM_NEED_FAULT = 1, 47722 HMM_NEED_WRITE_FAULT = 2, 47723 HMM_NEED_ALL_BITS = 3, 47724 }; 47725 47726 struct hugetlbfs_inode_info { 47727 struct shared_policy policy; 47728 struct inode vfs_inode; 47729 unsigned int seals; 47730 }; 47731 47732 struct wp_walk { 47733 struct mmu_notifier_range range; 47734 long unsigned int tlbflush_start; 47735 long unsigned int tlbflush_end; 47736 long unsigned int total; 47737 }; 47738 47739 struct clean_walk { 47740 struct wp_walk base; 47741 long unsigned int bitmap_pgoff; 47742 long unsigned int *bitmap; 47743 long unsigned int start; 47744 long unsigned int end; 47745 }; 47746 47747 struct page_reporting_dev_info { 47748 int (*report)(struct page_reporting_dev_info *, struct scatterlist *, unsigned int); 47749 struct delayed_work work; 47750 atomic_t state; 47751 }; 47752 47753 enum { 47754 PAGE_REPORTING_IDLE = 0, 47755 PAGE_REPORTING_REQUESTED = 1, 47756 PAGE_REPORTING_ACTIVE = 2, 47757 }; 47758 47759 struct open_how { 47760 __u64 flags; 47761 __u64 mode; 47762 __u64 resolve; 47763 }; 47764 47765 typedef s32 compat_off_t; 47766 47767 struct open_flags { 47768 int open_flag; 47769 umode_t mode; 47770 int acc_mode; 47771 int intent; 47772 int lookup_flags; 47773 }; 47774 47775 typedef __kernel_long_t __kernel_off_t; 47776 47777 typedef __kernel_off_t off_t; 47778 47779 typedef __kernel_rwf_t rwf_t; 47780 47781 struct fscrypt_policy_v1 { 47782 __u8 version; 47783 __u8 contents_encryption_mode; 47784 __u8 filenames_encryption_mode; 47785 __u8 flags; 47786 __u8 master_key_descriptor[8]; 47787 }; 47788 47789 struct fscrypt_policy_v2 { 47790 __u8 version; 47791 __u8 contents_encryption_mode; 47792 __u8 filenames_encryption_mode; 47793 __u8 flags; 47794 __u8 __reserved[4]; 47795 __u8 master_key_identifier[16]; 47796 }; 47797 47798 union fscrypt_policy { 47799 u8 version; 47800 struct fscrypt_policy_v1 v1; 47801 struct fscrypt_policy_v2 v2; 47802 }; 47803 47804 enum vfs_get_super_keying { 47805 vfs_get_single_super = 0, 47806 vfs_get_single_reconf_super = 1, 47807 vfs_get_keyed_super = 2, 47808 vfs_get_independent_super = 3, 47809 }; 47810 47811 typedef struct kobject *kobj_probe_t(dev_t, int *, void *); 47812 47813 struct kobj_map; 47814 47815 struct char_device_struct { 47816 struct char_device_struct *next; 47817 unsigned int major; 47818 unsigned int baseminor; 47819 int minorct; 47820 char name[64]; 47821 struct cdev *cdev; 47822 }; 47823 47824 struct stat { 47825 __kernel_ulong_t st_dev; 47826 __kernel_ulong_t st_ino; 47827 __kernel_ulong_t st_nlink; 47828 unsigned int st_mode; 47829 unsigned int st_uid; 47830 unsigned int st_gid; 47831 unsigned int __pad0; 47832 __kernel_ulong_t st_rdev; 47833 __kernel_long_t st_size; 47834 __kernel_long_t st_blksize; 47835 __kernel_long_t st_blocks; 47836 __kernel_ulong_t st_atime; 47837 __kernel_ulong_t st_atime_nsec; 47838 __kernel_ulong_t st_mtime; 47839 __kernel_ulong_t st_mtime_nsec; 47840 __kernel_ulong_t st_ctime; 47841 __kernel_ulong_t st_ctime_nsec; 47842 __kernel_long_t __unused[3]; 47843 }; 47844 47845 struct __old_kernel_stat { 47846 short unsigned int st_dev; 47847 short unsigned int st_ino; 47848 short unsigned int st_mode; 47849 short unsigned int st_nlink; 47850 short unsigned int st_uid; 47851 short unsigned int st_gid; 47852 short unsigned int st_rdev; 47853 unsigned int st_size; 47854 unsigned int st_atime; 47855 unsigned int st_mtime; 47856 unsigned int st_ctime; 47857 }; 47858 47859 struct statx_timestamp { 47860 __s64 tv_sec; 47861 __u32 tv_nsec; 47862 __s32 __reserved; 47863 }; 47864 47865 struct statx { 47866 __u32 stx_mask; 47867 __u32 stx_blksize; 47868 __u64 stx_attributes; 47869 __u32 stx_nlink; 47870 __u32 stx_uid; 47871 __u32 stx_gid; 47872 __u16 stx_mode; 47873 __u16 __spare0[1]; 47874 __u64 stx_ino; 47875 __u64 stx_size; 47876 __u64 stx_blocks; 47877 __u64 stx_attributes_mask; 47878 struct statx_timestamp stx_atime; 47879 struct statx_timestamp stx_btime; 47880 struct statx_timestamp stx_ctime; 47881 struct statx_timestamp stx_mtime; 47882 __u32 stx_rdev_major; 47883 __u32 stx_rdev_minor; 47884 __u32 stx_dev_major; 47885 __u32 stx_dev_minor; 47886 __u64 stx_mnt_id; 47887 __u64 __spare2; 47888 __u64 __spare3[12]; 47889 }; 47890 47891 struct mount; 47892 47893 struct mnt_namespace { 47894 struct ns_common ns; 47895 struct mount *root; 47896 struct list_head list; 47897 spinlock_t ns_lock; 47898 struct user_namespace *user_ns; 47899 struct ucounts *ucounts; 47900 u64 seq; 47901 wait_queue_head_t poll; 47902 u64 event; 47903 unsigned int mounts; 47904 unsigned int pending_mounts; 47905 }; 47906 47907 typedef u32 compat_ino_t; 47908 47909 typedef u16 __compat_uid_t; 47910 47911 typedef u16 __compat_gid_t; 47912 47913 typedef u16 compat_mode_t; 47914 47915 typedef u16 compat_dev_t; 47916 47917 typedef u16 compat_nlink_t; 47918 47919 struct compat_stat { 47920 compat_dev_t st_dev; 47921 u16 __pad1; 47922 compat_ino_t st_ino; 47923 compat_mode_t st_mode; 47924 compat_nlink_t st_nlink; 47925 __compat_uid_t st_uid; 47926 __compat_gid_t st_gid; 47927 compat_dev_t st_rdev; 47928 u16 __pad2; 47929 u32 st_size; 47930 u32 st_blksize; 47931 u32 st_blocks; 47932 u32 st_atime; 47933 u32 st_atime_nsec; 47934 u32 st_mtime; 47935 u32 st_mtime_nsec; 47936 u32 st_ctime; 47937 u32 st_ctime_nsec; 47938 u32 __unused4; 47939 u32 __unused5; 47940 }; 47941 47942 struct mnt_pcp; 47943 47944 struct mountpoint; 47945 47946 struct mount { 47947 struct hlist_node mnt_hash; 47948 struct mount *mnt_parent; 47949 struct dentry *mnt_mountpoint; 47950 struct vfsmount mnt; 47951 union { 47952 struct callback_head mnt_rcu; 47953 struct llist_node mnt_llist; 47954 }; 47955 struct mnt_pcp *mnt_pcp; 47956 struct list_head mnt_mounts; 47957 struct list_head mnt_child; 47958 struct list_head mnt_instance; 47959 const char *mnt_devname; 47960 struct list_head mnt_list; 47961 struct list_head mnt_expire; 47962 struct list_head mnt_share; 47963 struct list_head mnt_slave_list; 47964 struct list_head mnt_slave; 47965 struct mount *mnt_master; 47966 struct mnt_namespace *mnt_ns; 47967 struct mountpoint *mnt_mp; 47968 union { 47969 struct hlist_node mnt_mp_list; 47970 struct hlist_node mnt_umount; 47971 }; 47972 struct list_head mnt_umounting; 47973 struct fsnotify_mark_connector *mnt_fsnotify_marks; 47974 __u32 mnt_fsnotify_mask; 47975 int mnt_id; 47976 int mnt_group_id; 47977 int mnt_expiry_mark; 47978 struct hlist_head mnt_pins; 47979 struct hlist_head mnt_stuck_children; 47980 }; 47981 47982 struct mnt_pcp { 47983 int mnt_count; 47984 int mnt_writers; 47985 }; 47986 47987 struct mountpoint { 47988 struct hlist_node m_hash; 47989 struct dentry *m_dentry; 47990 struct hlist_head m_list; 47991 int m_count; 47992 }; 47993 47994 typedef short unsigned int ushort; 47995 47996 struct user_arg_ptr { 47997 bool is_compat; 47998 union { 47999 const char * const *native; 48000 const compat_uptr_t *compat; 48001 } ptr; 48002 }; 48003 48004 enum inode_i_mutex_lock_class { 48005 I_MUTEX_NORMAL = 0, 48006 I_MUTEX_PARENT = 1, 48007 I_MUTEX_CHILD = 2, 48008 I_MUTEX_XATTR = 3, 48009 I_MUTEX_NONDIR2 = 4, 48010 I_MUTEX_PARENT2 = 5, 48011 }; 48012 48013 struct name_snapshot { 48014 struct qstr name; 48015 unsigned char inline_name[32]; 48016 }; 48017 48018 struct saved { 48019 struct path link; 48020 struct delayed_call done; 48021 const char *name; 48022 unsigned int seq; 48023 }; 48024 48025 struct nameidata { 48026 struct path path; 48027 struct qstr last; 48028 struct path root; 48029 struct inode *inode; 48030 unsigned int flags; 48031 unsigned int seq; 48032 unsigned int m_seq; 48033 unsigned int r_seq; 48034 int last_type; 48035 unsigned int depth; 48036 int total_link_count; 48037 struct saved *stack; 48038 struct saved internal[2]; 48039 struct filename *name; 48040 struct nameidata *saved; 48041 unsigned int root_seq; 48042 int dfd; 48043 kuid_t dir_uid; 48044 umode_t dir_mode; 48045 }; 48046 48047 enum { 48048 LAST_NORM = 0, 48049 LAST_ROOT = 1, 48050 LAST_DOT = 2, 48051 LAST_DOTDOT = 3, 48052 }; 48053 48054 enum { 48055 WALK_TRAILING = 1, 48056 WALK_MORE = 2, 48057 WALK_NOFOLLOW = 4, 48058 }; 48059 48060 struct word_at_a_time { 48061 const long unsigned int one_bits; 48062 const long unsigned int high_bits; 48063 }; 48064 48065 struct f_owner_ex { 48066 int type; 48067 __kernel_pid_t pid; 48068 }; 48069 48070 struct flock { 48071 short int l_type; 48072 short int l_whence; 48073 __kernel_off_t l_start; 48074 __kernel_off_t l_len; 48075 __kernel_pid_t l_pid; 48076 }; 48077 48078 struct compat_flock { 48079 short int l_type; 48080 short int l_whence; 48081 compat_off_t l_start; 48082 compat_off_t l_len; 48083 compat_pid_t l_pid; 48084 }; 48085 48086 struct compat_flock64 { 48087 short int l_type; 48088 short int l_whence; 48089 compat_loff_t l_start; 48090 compat_loff_t l_len; 48091 compat_pid_t l_pid; 48092 } __attribute__((packed)); 48093 48094 struct file_clone_range { 48095 __s64 src_fd; 48096 __u64 src_offset; 48097 __u64 src_length; 48098 __u64 dest_offset; 48099 }; 48100 48101 struct file_dedupe_range_info { 48102 __s64 dest_fd; 48103 __u64 dest_offset; 48104 __u64 bytes_deduped; 48105 __s32 status; 48106 __u32 reserved; 48107 }; 48108 48109 struct file_dedupe_range { 48110 __u64 src_offset; 48111 __u64 src_length; 48112 __u16 dest_count; 48113 __u16 reserved1; 48114 __u32 reserved2; 48115 struct file_dedupe_range_info info[0]; 48116 }; 48117 48118 typedef int get_block_t(struct inode *, sector_t, struct buffer_head *, int); 48119 48120 struct fiemap_extent; 48121 48122 struct fiemap_extent_info { 48123 unsigned int fi_flags; 48124 unsigned int fi_extents_mapped; 48125 unsigned int fi_extents_max; 48126 struct fiemap_extent *fi_extents_start; 48127 }; 48128 48129 struct space_resv { 48130 __s16 l_type; 48131 __s16 l_whence; 48132 __s64 l_start; 48133 __s64 l_len; 48134 __s32 l_sysid; 48135 __u32 l_pid; 48136 __s32 l_pad[4]; 48137 }; 48138 48139 struct space_resv_32 { 48140 __s16 l_type; 48141 __s16 l_whence; 48142 __s64 l_start; 48143 __s64 l_len; 48144 __s32 l_sysid; 48145 __u32 l_pid; 48146 __s32 l_pad[4]; 48147 } __attribute__((packed)); 48148 48149 struct fiemap_extent { 48150 __u64 fe_logical; 48151 __u64 fe_physical; 48152 __u64 fe_length; 48153 __u64 fe_reserved64[2]; 48154 __u32 fe_flags; 48155 __u32 fe_reserved[3]; 48156 }; 48157 48158 struct fiemap { 48159 __u64 fm_start; 48160 __u64 fm_length; 48161 __u32 fm_flags; 48162 __u32 fm_mapped_extents; 48163 __u32 fm_extent_count; 48164 __u32 fm_reserved; 48165 struct fiemap_extent fm_extents[0]; 48166 }; 48167 48168 struct linux_dirent64 { 48169 u64 d_ino; 48170 s64 d_off; 48171 short unsigned int d_reclen; 48172 unsigned char d_type; 48173 char d_name[0]; 48174 }; 48175 48176 struct old_linux_dirent { 48177 long unsigned int d_ino; 48178 long unsigned int d_offset; 48179 short unsigned int d_namlen; 48180 char d_name[1]; 48181 }; 48182 48183 struct readdir_callback { 48184 struct dir_context ctx; 48185 struct old_linux_dirent *dirent; 48186 int result; 48187 }; 48188 48189 struct linux_dirent { 48190 long unsigned int d_ino; 48191 long unsigned int d_off; 48192 short unsigned int d_reclen; 48193 char d_name[1]; 48194 }; 48195 48196 struct getdents_callback { 48197 struct dir_context ctx; 48198 struct linux_dirent *current_dir; 48199 int prev_reclen; 48200 int count; 48201 int error; 48202 }; 48203 48204 struct getdents_callback64 { 48205 struct dir_context ctx; 48206 struct linux_dirent64 *current_dir; 48207 int prev_reclen; 48208 int count; 48209 int error; 48210 }; 48211 48212 struct compat_old_linux_dirent { 48213 compat_ulong_t d_ino; 48214 compat_ulong_t d_offset; 48215 short unsigned int d_namlen; 48216 char d_name[1]; 48217 }; 48218 48219 struct compat_readdir_callback { 48220 struct dir_context ctx; 48221 struct compat_old_linux_dirent *dirent; 48222 int result; 48223 }; 48224 48225 struct compat_linux_dirent { 48226 compat_ulong_t d_ino; 48227 compat_ulong_t d_off; 48228 short unsigned int d_reclen; 48229 char d_name[1]; 48230 }; 48231 48232 struct compat_getdents_callback { 48233 struct dir_context ctx; 48234 struct compat_linux_dirent *current_dir; 48235 int prev_reclen; 48236 int count; 48237 int error; 48238 }; 48239 48240 typedef struct { 48241 long unsigned int fds_bits[16]; 48242 } __kernel_fd_set; 48243 48244 typedef __kernel_fd_set fd_set; 48245 48246 struct poll_table_entry { 48247 struct file *filp; 48248 __poll_t key; 48249 wait_queue_entry_t wait; 48250 wait_queue_head_t *wait_address; 48251 }; 48252 48253 struct poll_table_page; 48254 48255 struct poll_wqueues { 48256 poll_table pt; 48257 struct poll_table_page *table; 48258 struct task_struct *polling_task; 48259 int triggered; 48260 int error; 48261 int inline_index; 48262 struct poll_table_entry inline_entries[9]; 48263 }; 48264 48265 struct poll_table_page { 48266 struct poll_table_page *next; 48267 struct poll_table_entry *entry; 48268 struct poll_table_entry entries[0]; 48269 }; 48270 48271 enum poll_time_type { 48272 PT_TIMEVAL = 0, 48273 PT_OLD_TIMEVAL = 1, 48274 PT_TIMESPEC = 2, 48275 PT_OLD_TIMESPEC = 3, 48276 }; 48277 48278 typedef struct { 48279 long unsigned int *in; 48280 long unsigned int *out; 48281 long unsigned int *ex; 48282 long unsigned int *res_in; 48283 long unsigned int *res_out; 48284 long unsigned int *res_ex; 48285 } fd_set_bits; 48286 48287 struct sigset_argpack { 48288 sigset_t *p; 48289 size_t size; 48290 }; 48291 48292 struct poll_list { 48293 struct poll_list *next; 48294 int len; 48295 struct pollfd entries[0]; 48296 }; 48297 48298 struct compat_sel_arg_struct { 48299 compat_ulong_t n; 48300 compat_uptr_t inp; 48301 compat_uptr_t outp; 48302 compat_uptr_t exp; 48303 compat_uptr_t tvp; 48304 }; 48305 48306 struct compat_sigset_argpack { 48307 compat_uptr_t p; 48308 compat_size_t size; 48309 }; 48310 48311 enum dentry_d_lock_class { 48312 DENTRY_D_LOCK_NORMAL = 0, 48313 DENTRY_D_LOCK_NESTED = 1, 48314 }; 48315 48316 struct external_name { 48317 union { 48318 atomic_t count; 48319 struct callback_head head; 48320 } u; 48321 unsigned char name[0]; 48322 }; 48323 48324 enum d_walk_ret { 48325 D_WALK_CONTINUE = 0, 48326 D_WALK_QUIT = 1, 48327 D_WALK_NORETRY = 2, 48328 D_WALK_SKIP = 3, 48329 }; 48330 48331 struct check_mount { 48332 struct vfsmount *mnt; 48333 unsigned int mounted; 48334 }; 48335 48336 struct select_data { 48337 struct dentry *start; 48338 union { 48339 long int found; 48340 struct dentry *victim; 48341 }; 48342 struct list_head dispose; 48343 }; 48344 48345 struct fsxattr { 48346 __u32 fsx_xflags; 48347 __u32 fsx_extsize; 48348 __u32 fsx_nextents; 48349 __u32 fsx_projid; 48350 __u32 fsx_cowextsize; 48351 unsigned char fsx_pad[8]; 48352 }; 48353 48354 enum file_time_flags { 48355 S_ATIME = 1, 48356 S_MTIME = 2, 48357 S_CTIME = 4, 48358 S_VERSION = 8, 48359 }; 48360 48361 struct proc_mounts { 48362 struct mnt_namespace *ns; 48363 struct path root; 48364 int (*show)(struct seq_file *, struct vfsmount *); 48365 struct mount cursor; 48366 }; 48367 48368 enum umount_tree_flags { 48369 UMOUNT_SYNC = 1, 48370 UMOUNT_PROPAGATE = 2, 48371 UMOUNT_CONNECTED = 4, 48372 }; 48373 48374 struct unicode_map { 48375 const char *charset; 48376 int version; 48377 }; 48378 48379 struct simple_transaction_argresp { 48380 ssize_t size; 48381 char data[0]; 48382 }; 48383 48384 struct simple_attr { 48385 int (*get)(void *, u64 *); 48386 int (*set)(void *, u64); 48387 char get_buf[24]; 48388 char set_buf[24]; 48389 void *data; 48390 const char *fmt; 48391 struct mutex mutex; 48392 }; 48393 48394 struct wb_writeback_work { 48395 long int nr_pages; 48396 struct super_block *sb; 48397 enum writeback_sync_modes sync_mode; 48398 unsigned int tagged_writepages: 1; 48399 unsigned int for_kupdate: 1; 48400 unsigned int range_cyclic: 1; 48401 unsigned int for_background: 1; 48402 unsigned int for_sync: 1; 48403 unsigned int auto_free: 1; 48404 enum wb_reason reason; 48405 struct list_head list; 48406 struct wb_completion *done; 48407 }; 48408 48409 struct trace_event_raw_writeback_page_template { 48410 struct trace_entry ent; 48411 char name[32]; 48412 ino_t ino; 48413 long unsigned int index; 48414 char __data[0]; 48415 }; 48416 48417 struct trace_event_raw_writeback_dirty_inode_template { 48418 struct trace_entry ent; 48419 char name[32]; 48420 ino_t ino; 48421 long unsigned int state; 48422 long unsigned int flags; 48423 char __data[0]; 48424 }; 48425 48426 struct trace_event_raw_inode_foreign_history { 48427 struct trace_entry ent; 48428 char name[32]; 48429 ino_t ino; 48430 ino_t cgroup_ino; 48431 unsigned int history; 48432 char __data[0]; 48433 }; 48434 48435 struct trace_event_raw_inode_switch_wbs { 48436 struct trace_entry ent; 48437 char name[32]; 48438 ino_t ino; 48439 ino_t old_cgroup_ino; 48440 ino_t new_cgroup_ino; 48441 char __data[0]; 48442 }; 48443 48444 struct trace_event_raw_track_foreign_dirty { 48445 struct trace_entry ent; 48446 char name[32]; 48447 u64 bdi_id; 48448 ino_t ino; 48449 unsigned int memcg_id; 48450 ino_t cgroup_ino; 48451 ino_t page_cgroup_ino; 48452 char __data[0]; 48453 }; 48454 48455 struct trace_event_raw_flush_foreign { 48456 struct trace_entry ent; 48457 char name[32]; 48458 ino_t cgroup_ino; 48459 unsigned int frn_bdi_id; 48460 unsigned int frn_memcg_id; 48461 char __data[0]; 48462 }; 48463 48464 struct trace_event_raw_writeback_write_inode_template { 48465 struct trace_entry ent; 48466 char name[32]; 48467 ino_t ino; 48468 int sync_mode; 48469 ino_t cgroup_ino; 48470 char __data[0]; 48471 }; 48472 48473 struct trace_event_raw_writeback_work_class { 48474 struct trace_entry ent; 48475 char name[32]; 48476 long int nr_pages; 48477 dev_t sb_dev; 48478 int sync_mode; 48479 int for_kupdate; 48480 int range_cyclic; 48481 int for_background; 48482 int reason; 48483 ino_t cgroup_ino; 48484 char __data[0]; 48485 }; 48486 48487 struct trace_event_raw_writeback_pages_written { 48488 struct trace_entry ent; 48489 long int pages; 48490 char __data[0]; 48491 }; 48492 48493 struct trace_event_raw_writeback_class { 48494 struct trace_entry ent; 48495 char name[32]; 48496 ino_t cgroup_ino; 48497 char __data[0]; 48498 }; 48499 48500 struct trace_event_raw_writeback_bdi_register { 48501 struct trace_entry ent; 48502 char name[32]; 48503 char __data[0]; 48504 }; 48505 48506 struct trace_event_raw_wbc_class { 48507 struct trace_entry ent; 48508 char name[32]; 48509 long int nr_to_write; 48510 long int pages_skipped; 48511 int sync_mode; 48512 int for_kupdate; 48513 int for_background; 48514 int for_reclaim; 48515 int range_cyclic; 48516 long int range_start; 48517 long int range_end; 48518 ino_t cgroup_ino; 48519 char __data[0]; 48520 }; 48521 48522 struct trace_event_raw_writeback_queue_io { 48523 struct trace_entry ent; 48524 char name[32]; 48525 long unsigned int older; 48526 long int age; 48527 int moved; 48528 int reason; 48529 ino_t cgroup_ino; 48530 char __data[0]; 48531 }; 48532 48533 struct trace_event_raw_global_dirty_state { 48534 struct trace_entry ent; 48535 long unsigned int nr_dirty; 48536 long unsigned int nr_writeback; 48537 long unsigned int background_thresh; 48538 long unsigned int dirty_thresh; 48539 long unsigned int dirty_limit; 48540 long unsigned int nr_dirtied; 48541 long unsigned int nr_written; 48542 char __data[0]; 48543 }; 48544 48545 struct trace_event_raw_bdi_dirty_ratelimit { 48546 struct trace_entry ent; 48547 char bdi[32]; 48548 long unsigned int write_bw; 48549 long unsigned int avg_write_bw; 48550 long unsigned int dirty_rate; 48551 long unsigned int dirty_ratelimit; 48552 long unsigned int task_ratelimit; 48553 long unsigned int balanced_dirty_ratelimit; 48554 ino_t cgroup_ino; 48555 char __data[0]; 48556 }; 48557 48558 struct trace_event_raw_balance_dirty_pages { 48559 struct trace_entry ent; 48560 char bdi[32]; 48561 long unsigned int limit; 48562 long unsigned int setpoint; 48563 long unsigned int dirty; 48564 long unsigned int bdi_setpoint; 48565 long unsigned int bdi_dirty; 48566 long unsigned int dirty_ratelimit; 48567 long unsigned int task_ratelimit; 48568 unsigned int dirtied; 48569 unsigned int dirtied_pause; 48570 long unsigned int paused; 48571 long int pause; 48572 long unsigned int period; 48573 long int think; 48574 ino_t cgroup_ino; 48575 char __data[0]; 48576 }; 48577 48578 struct trace_event_raw_writeback_sb_inodes_requeue { 48579 struct trace_entry ent; 48580 char name[32]; 48581 ino_t ino; 48582 long unsigned int state; 48583 long unsigned int dirtied_when; 48584 ino_t cgroup_ino; 48585 char __data[0]; 48586 }; 48587 48588 struct trace_event_raw_writeback_congest_waited_template { 48589 struct trace_entry ent; 48590 unsigned int usec_timeout; 48591 unsigned int usec_delayed; 48592 char __data[0]; 48593 }; 48594 48595 struct trace_event_raw_writeback_single_inode_template { 48596 struct trace_entry ent; 48597 char name[32]; 48598 ino_t ino; 48599 long unsigned int state; 48600 long unsigned int dirtied_when; 48601 long unsigned int writeback_index; 48602 long int nr_to_write; 48603 long unsigned int wrote; 48604 ino_t cgroup_ino; 48605 char __data[0]; 48606 }; 48607 48608 struct trace_event_raw_writeback_inode_template { 48609 struct trace_entry ent; 48610 dev_t dev; 48611 ino_t ino; 48612 long unsigned int state; 48613 __u16 mode; 48614 long unsigned int dirtied_when; 48615 char __data[0]; 48616 }; 48617 48618 struct trace_event_data_offsets_writeback_page_template {}; 48619 48620 struct trace_event_data_offsets_writeback_dirty_inode_template {}; 48621 48622 struct trace_event_data_offsets_inode_foreign_history {}; 48623 48624 struct trace_event_data_offsets_inode_switch_wbs {}; 48625 48626 struct trace_event_data_offsets_track_foreign_dirty {}; 48627 48628 struct trace_event_data_offsets_flush_foreign {}; 48629 48630 struct trace_event_data_offsets_writeback_write_inode_template {}; 48631 48632 struct trace_event_data_offsets_writeback_work_class {}; 48633 48634 struct trace_event_data_offsets_writeback_pages_written {}; 48635 48636 struct trace_event_data_offsets_writeback_class {}; 48637 48638 struct trace_event_data_offsets_writeback_bdi_register {}; 48639 48640 struct trace_event_data_offsets_wbc_class {}; 48641 48642 struct trace_event_data_offsets_writeback_queue_io {}; 48643 48644 struct trace_event_data_offsets_global_dirty_state {}; 48645 48646 struct trace_event_data_offsets_bdi_dirty_ratelimit {}; 48647 48648 struct trace_event_data_offsets_balance_dirty_pages {}; 48649 48650 struct trace_event_data_offsets_writeback_sb_inodes_requeue {}; 48651 48652 struct trace_event_data_offsets_writeback_congest_waited_template {}; 48653 48654 struct trace_event_data_offsets_writeback_single_inode_template {}; 48655 48656 struct trace_event_data_offsets_writeback_inode_template {}; 48657 48658 typedef void (*btf_trace_writeback_dirty_page)(void *, struct page *, struct address_space *); 48659 48660 typedef void (*btf_trace_wait_on_page_writeback)(void *, struct page *, struct address_space *); 48661 48662 typedef void (*btf_trace_writeback_mark_inode_dirty)(void *, struct inode *, int); 48663 48664 typedef void (*btf_trace_writeback_dirty_inode_start)(void *, struct inode *, int); 48665 48666 typedef void (*btf_trace_writeback_dirty_inode)(void *, struct inode *, int); 48667 48668 typedef void (*btf_trace_inode_foreign_history)(void *, struct inode *, struct writeback_control *, unsigned int); 48669 48670 typedef void (*btf_trace_inode_switch_wbs)(void *, struct inode *, struct bdi_writeback *, struct bdi_writeback *); 48671 48672 typedef void (*btf_trace_track_foreign_dirty)(void *, struct page *, struct bdi_writeback *); 48673 48674 typedef void (*btf_trace_flush_foreign)(void *, struct bdi_writeback *, unsigned int, unsigned int); 48675 48676 typedef void (*btf_trace_writeback_write_inode_start)(void *, struct inode *, struct writeback_control *); 48677 48678 typedef void (*btf_trace_writeback_write_inode)(void *, struct inode *, struct writeback_control *); 48679 48680 typedef void (*btf_trace_writeback_queue)(void *, struct bdi_writeback *, struct wb_writeback_work *); 48681 48682 typedef void (*btf_trace_writeback_exec)(void *, struct bdi_writeback *, struct wb_writeback_work *); 48683 48684 typedef void (*btf_trace_writeback_start)(void *, struct bdi_writeback *, struct wb_writeback_work *); 48685 48686 typedef void (*btf_trace_writeback_written)(void *, struct bdi_writeback *, struct wb_writeback_work *); 48687 48688 typedef void (*btf_trace_writeback_wait)(void *, struct bdi_writeback *, struct wb_writeback_work *); 48689 48690 typedef void (*btf_trace_writeback_pages_written)(void *, long int); 48691 48692 typedef void (*btf_trace_writeback_wake_background)(void *, struct bdi_writeback *); 48693 48694 typedef void (*btf_trace_writeback_bdi_register)(void *, struct backing_dev_info *); 48695 48696 typedef void (*btf_trace_wbc_writepage)(void *, struct writeback_control *, struct backing_dev_info *); 48697 48698 typedef void (*btf_trace_writeback_queue_io)(void *, struct bdi_writeback *, struct wb_writeback_work *, long unsigned int, int); 48699 48700 typedef void (*btf_trace_global_dirty_state)(void *, long unsigned int, long unsigned int); 48701 48702 typedef void (*btf_trace_bdi_dirty_ratelimit)(void *, struct bdi_writeback *, long unsigned int, long unsigned int); 48703 48704 typedef void (*btf_trace_balance_dirty_pages)(void *, struct bdi_writeback *, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, long int, long unsigned int); 48705 48706 typedef void (*btf_trace_writeback_sb_inodes_requeue)(void *, struct inode *); 48707 48708 typedef void (*btf_trace_writeback_congestion_wait)(void *, unsigned int, unsigned int); 48709 48710 typedef void (*btf_trace_writeback_wait_iff_congested)(void *, unsigned int, unsigned int); 48711 48712 typedef void (*btf_trace_writeback_single_inode_start)(void *, struct inode *, struct writeback_control *, long unsigned int); 48713 48714 typedef void (*btf_trace_writeback_single_inode)(void *, struct inode *, struct writeback_control *, long unsigned int); 48715 48716 typedef void (*btf_trace_writeback_lazytime)(void *, struct inode *); 48717 48718 typedef void (*btf_trace_writeback_lazytime_iput)(void *, struct inode *); 48719 48720 typedef void (*btf_trace_writeback_dirty_inode_enqueue)(void *, struct inode *); 48721 48722 typedef void (*btf_trace_sb_mark_inode_writeback)(void *, struct inode *); 48723 48724 typedef void (*btf_trace_sb_clear_inode_writeback)(void *, struct inode *); 48725 48726 struct inode_switch_wbs_context { 48727 struct inode *inode; 48728 struct bdi_writeback *new_wb; 48729 struct callback_head callback_head; 48730 struct work_struct work; 48731 }; 48732 48733 struct splice_desc { 48734 size_t total_len; 48735 unsigned int len; 48736 unsigned int flags; 48737 union { 48738 void *userptr; 48739 struct file *file; 48740 void *data; 48741 } u; 48742 loff_t pos; 48743 loff_t *opos; 48744 size_t num_spliced; 48745 bool need_wakeup; 48746 }; 48747 48748 typedef int splice_actor(struct pipe_inode_info *, struct pipe_buffer *, struct splice_desc *); 48749 48750 typedef int splice_direct_actor(struct pipe_inode_info *, struct splice_desc *); 48751 48752 struct old_utimbuf32 { 48753 old_time32_t actime; 48754 old_time32_t modtime; 48755 }; 48756 48757 struct utimbuf { 48758 __kernel_old_time_t actime; 48759 __kernel_old_time_t modtime; 48760 }; 48761 48762 typedef int __kernel_daddr_t; 48763 48764 struct ustat { 48765 __kernel_daddr_t f_tfree; 48766 __kernel_ino_t f_tinode; 48767 char f_fname[6]; 48768 char f_fpack[6]; 48769 }; 48770 48771 typedef s32 compat_daddr_t; 48772 48773 typedef __kernel_fsid_t compat_fsid_t; 48774 48775 struct compat_statfs { 48776 int f_type; 48777 int f_bsize; 48778 int f_blocks; 48779 int f_bfree; 48780 int f_bavail; 48781 int f_files; 48782 int f_ffree; 48783 compat_fsid_t f_fsid; 48784 int f_namelen; 48785 int f_frsize; 48786 int f_flags; 48787 int f_spare[4]; 48788 }; 48789 48790 struct compat_ustat { 48791 compat_daddr_t f_tfree; 48792 compat_ino_t f_tinode; 48793 char f_fname[6]; 48794 char f_fpack[6]; 48795 }; 48796 48797 struct statfs { 48798 __kernel_long_t f_type; 48799 __kernel_long_t f_bsize; 48800 __kernel_long_t f_blocks; 48801 __kernel_long_t f_bfree; 48802 __kernel_long_t f_bavail; 48803 __kernel_long_t f_files; 48804 __kernel_long_t f_ffree; 48805 __kernel_fsid_t f_fsid; 48806 __kernel_long_t f_namelen; 48807 __kernel_long_t f_frsize; 48808 __kernel_long_t f_flags; 48809 __kernel_long_t f_spare[4]; 48810 }; 48811 48812 struct statfs64 { 48813 __kernel_long_t f_type; 48814 __kernel_long_t f_bsize; 48815 __u64 f_blocks; 48816 __u64 f_bfree; 48817 __u64 f_bavail; 48818 __u64 f_files; 48819 __u64 f_ffree; 48820 __kernel_fsid_t f_fsid; 48821 __kernel_long_t f_namelen; 48822 __kernel_long_t f_frsize; 48823 __kernel_long_t f_flags; 48824 __kernel_long_t f_spare[4]; 48825 }; 48826 48827 struct compat_statfs64 { 48828 __u32 f_type; 48829 __u32 f_bsize; 48830 __u64 f_blocks; 48831 __u64 f_bfree; 48832 __u64 f_bavail; 48833 __u64 f_files; 48834 __u64 f_ffree; 48835 __kernel_fsid_t f_fsid; 48836 __u32 f_namelen; 48837 __u32 f_frsize; 48838 __u32 f_flags; 48839 __u32 f_spare[4]; 48840 } __attribute__((packed)); 48841 48842 struct ns_get_path_task_args { 48843 const struct proc_ns_operations *ns_ops; 48844 struct task_struct *task; 48845 }; 48846 48847 enum legacy_fs_param { 48848 LEGACY_FS_UNSET_PARAMS = 0, 48849 LEGACY_FS_MONOLITHIC_PARAMS = 1, 48850 LEGACY_FS_INDIVIDUAL_PARAMS = 2, 48851 }; 48852 48853 struct legacy_fs_context { 48854 char *legacy_data; 48855 size_t data_size; 48856 enum legacy_fs_param param_type; 48857 }; 48858 48859 enum fsconfig_command { 48860 FSCONFIG_SET_FLAG = 0, 48861 FSCONFIG_SET_STRING = 1, 48862 FSCONFIG_SET_BINARY = 2, 48863 FSCONFIG_SET_PATH = 3, 48864 FSCONFIG_SET_PATH_EMPTY = 4, 48865 FSCONFIG_SET_FD = 5, 48866 FSCONFIG_CMD_CREATE = 6, 48867 FSCONFIG_CMD_RECONFIGURE = 7, 48868 }; 48869 48870 struct dax_device; 48871 48872 struct iomap_page_ops; 48873 48874 struct iomap { 48875 u64 addr; 48876 loff_t offset; 48877 u64 length; 48878 u16 type; 48879 u16 flags; 48880 struct block_device *bdev; 48881 struct dax_device *dax_dev; 48882 void *inline_data; 48883 void *private; 48884 const struct iomap_page_ops *page_ops; 48885 }; 48886 48887 struct iomap_page_ops { 48888 int (*page_prepare)(struct inode *, loff_t, unsigned int, struct iomap *); 48889 void (*page_done)(struct inode *, loff_t, unsigned int, struct page *, struct iomap *); 48890 }; 48891 48892 struct decrypt_bh_ctx { 48893 struct work_struct work; 48894 struct buffer_head *bh; 48895 }; 48896 48897 struct bh_lru { 48898 struct buffer_head *bhs[16]; 48899 }; 48900 48901 struct bh_accounting { 48902 int nr; 48903 int ratelimit; 48904 }; 48905 48906 enum stat_group { 48907 STAT_READ = 0, 48908 STAT_WRITE = 1, 48909 STAT_DISCARD = 2, 48910 STAT_FLUSH = 3, 48911 NR_STAT_GROUPS = 4, 48912 }; 48913 48914 enum { 48915 DISK_EVENT_MEDIA_CHANGE = 1, 48916 DISK_EVENT_EJECT_REQUEST = 2, 48917 }; 48918 48919 enum { 48920 BIOSET_NEED_BVECS = 1, 48921 BIOSET_NEED_RESCUER = 2, 48922 }; 48923 48924 struct bdev_inode { 48925 struct block_device bdev; 48926 struct inode vfs_inode; 48927 }; 48928 48929 struct blkdev_dio { 48930 union { 48931 struct kiocb *iocb; 48932 struct task_struct *waiter; 48933 }; 48934 size_t size; 48935 atomic_t ref; 48936 bool multi_bio: 1; 48937 bool should_dirty: 1; 48938 bool is_sync: 1; 48939 struct bio bio; 48940 }; 48941 48942 struct bd_holder_disk { 48943 struct list_head list; 48944 struct gendisk *disk; 48945 int refcnt; 48946 }; 48947 48948 typedef int dio_iodone_t(struct kiocb *, loff_t, ssize_t, void *); 48949 48950 typedef void dio_submit_t(struct bio *, struct inode *, loff_t); 48951 48952 enum { 48953 DIO_LOCKING = 1, 48954 DIO_SKIP_HOLES = 2, 48955 }; 48956 48957 struct dio_submit { 48958 struct bio *bio; 48959 unsigned int blkbits; 48960 unsigned int blkfactor; 48961 unsigned int start_zero_done; 48962 int pages_in_io; 48963 sector_t block_in_file; 48964 unsigned int blocks_available; 48965 int reap_counter; 48966 sector_t final_block_in_request; 48967 int boundary; 48968 get_block_t *get_block; 48969 dio_submit_t *submit_io; 48970 loff_t logical_offset_in_bio; 48971 sector_t final_block_in_bio; 48972 sector_t next_block_for_io; 48973 struct page *cur_page; 48974 unsigned int cur_page_offset; 48975 unsigned int cur_page_len; 48976 sector_t cur_page_block; 48977 loff_t cur_page_fs_offset; 48978 struct iov_iter *iter; 48979 unsigned int head; 48980 unsigned int tail; 48981 size_t from; 48982 size_t to; 48983 }; 48984 48985 struct dio { 48986 int flags; 48987 int op; 48988 int op_flags; 48989 blk_qc_t bio_cookie; 48990 struct gendisk *bio_disk; 48991 struct inode *inode; 48992 loff_t i_size; 48993 dio_iodone_t *end_io; 48994 void *private; 48995 spinlock_t bio_lock; 48996 int page_errors; 48997 int is_async; 48998 bool defer_completion; 48999 bool should_dirty; 49000 int io_error; 49001 long unsigned int refcount; 49002 struct bio *bio_list; 49003 struct task_struct *waiter; 49004 struct kiocb *iocb; 49005 ssize_t result; 49006 union { 49007 struct page *pages[64]; 49008 struct work_struct complete_work; 49009 }; 49010 long: 64; 49011 }; 49012 49013 struct bvec_iter_all { 49014 struct bio_vec bv; 49015 int idx; 49016 unsigned int done; 49017 }; 49018 49019 struct mpage_readpage_args { 49020 struct bio *bio; 49021 struct page *page; 49022 unsigned int nr_pages; 49023 bool is_readahead; 49024 sector_t last_block_in_bio; 49025 struct buffer_head map_bh; 49026 long unsigned int first_logical_block; 49027 get_block_t *get_block; 49028 }; 49029 49030 struct mpage_data { 49031 struct bio *bio; 49032 sector_t last_block_in_bio; 49033 get_block_t *get_block; 49034 unsigned int use_writepage; 49035 }; 49036 49037 typedef u32 nlink_t; 49038 49039 typedef int (*proc_write_t)(struct file *, char *, size_t); 49040 49041 struct proc_dir_entry { 49042 atomic_t in_use; 49043 refcount_t refcnt; 49044 struct list_head pde_openers; 49045 spinlock_t pde_unload_lock; 49046 struct completion *pde_unload_completion; 49047 const struct inode_operations *proc_iops; 49048 union { 49049 const struct proc_ops *proc_ops; 49050 const struct file_operations *proc_dir_ops; 49051 }; 49052 const struct dentry_operations *proc_dops; 49053 union { 49054 const struct seq_operations *seq_ops; 49055 int (*single_show)(struct seq_file *, void *); 49056 }; 49057 proc_write_t write; 49058 void *data; 49059 unsigned int state_size; 49060 unsigned int low_ino; 49061 nlink_t nlink; 49062 kuid_t uid; 49063 kgid_t gid; 49064 loff_t size; 49065 struct proc_dir_entry *parent; 49066 struct rb_root subdir; 49067 struct rb_node subdir_node; 49068 char *name; 49069 umode_t mode; 49070 u8 flags; 49071 u8 namelen; 49072 char inline_name[0]; 49073 }; 49074 49075 union proc_op { 49076 int (*proc_get_link)(struct dentry *, struct path *); 49077 int (*proc_show)(struct seq_file *, struct pid_namespace *, struct pid *, struct task_struct *); 49078 const char *lsm; 49079 }; 49080 49081 struct proc_inode { 49082 struct pid *pid; 49083 unsigned int fd; 49084 union proc_op op; 49085 struct proc_dir_entry *pde; 49086 struct ctl_table_header *sysctl; 49087 struct ctl_table *sysctl_entry; 49088 struct hlist_node sibling_inodes; 49089 const struct proc_ns_operations *ns_ops; 49090 struct inode vfs_inode; 49091 }; 49092 49093 struct proc_fs_opts { 49094 int flag; 49095 const char *str; 49096 }; 49097 49098 struct file_handle { 49099 __u32 handle_bytes; 49100 int handle_type; 49101 unsigned char f_handle[0]; 49102 }; 49103 49104 struct inotify_inode_mark { 49105 struct fsnotify_mark fsn_mark; 49106 int wd; 49107 }; 49108 49109 struct dnotify_struct { 49110 struct dnotify_struct *dn_next; 49111 __u32 dn_mask; 49112 int dn_fd; 49113 struct file *dn_filp; 49114 fl_owner_t dn_owner; 49115 }; 49116 49117 struct dnotify_mark { 49118 struct fsnotify_mark fsn_mark; 49119 struct dnotify_struct *dn; 49120 }; 49121 49122 struct inotify_event_info { 49123 struct fsnotify_event fse; 49124 u32 mask; 49125 int wd; 49126 u32 sync_cookie; 49127 int name_len; 49128 char name[0]; 49129 }; 49130 49131 struct inotify_event { 49132 __s32 wd; 49133 __u32 mask; 49134 __u32 cookie; 49135 __u32 len; 49136 char name[0]; 49137 }; 49138 49139 enum { 49140 FAN_EVENT_INIT = 0, 49141 FAN_EVENT_REPORTED = 1, 49142 FAN_EVENT_ANSWERED = 2, 49143 FAN_EVENT_CANCELED = 3, 49144 }; 49145 49146 struct fanotify_fh { 49147 u8 type; 49148 u8 len; 49149 u8 flags; 49150 u8 pad; 49151 unsigned char buf[0]; 49152 }; 49153 49154 struct fanotify_info { 49155 u8 dir_fh_totlen; 49156 u8 file_fh_totlen; 49157 u8 name_len; 49158 u8 pad; 49159 unsigned char buf[0]; 49160 }; 49161 49162 enum fanotify_event_type { 49163 FANOTIFY_EVENT_TYPE_FID = 0, 49164 FANOTIFY_EVENT_TYPE_FID_NAME = 1, 49165 FANOTIFY_EVENT_TYPE_PATH = 2, 49166 FANOTIFY_EVENT_TYPE_PATH_PERM = 3, 49167 FANOTIFY_EVENT_TYPE_OVERFLOW = 4, 49168 }; 49169 49170 struct fanotify_event { 49171 struct fsnotify_event fse; 49172 u32 mask; 49173 enum fanotify_event_type type; 49174 struct pid *pid; 49175 }; 49176 49177 struct fanotify_fid_event { 49178 struct fanotify_event fae; 49179 __kernel_fsid_t fsid; 49180 struct fanotify_fh object_fh; 49181 unsigned char _inline_fh_buf[12]; 49182 }; 49183 49184 struct fanotify_name_event { 49185 struct fanotify_event fae; 49186 __kernel_fsid_t fsid; 49187 struct fanotify_info info; 49188 }; 49189 49190 struct fanotify_path_event { 49191 struct fanotify_event fae; 49192 struct path path; 49193 }; 49194 49195 struct fanotify_perm_event { 49196 struct fanotify_event fae; 49197 struct path path; 49198 short unsigned int response; 49199 short unsigned int state; 49200 int fd; 49201 }; 49202 49203 struct fanotify_event_metadata { 49204 __u32 event_len; 49205 __u8 vers; 49206 __u8 reserved; 49207 __u16 metadata_len; 49208 __u64 mask; 49209 __s32 fd; 49210 __s32 pid; 49211 }; 49212 49213 struct fanotify_event_info_header { 49214 __u8 info_type; 49215 __u8 pad; 49216 __u16 len; 49217 }; 49218 49219 struct fanotify_event_info_fid { 49220 struct fanotify_event_info_header hdr; 49221 __kernel_fsid_t fsid; 49222 unsigned char handle[0]; 49223 }; 49224 49225 struct fanotify_response { 49226 __s32 fd; 49227 __u32 response; 49228 }; 49229 49230 struct epoll_event { 49231 __poll_t events; 49232 __u64 data; 49233 } __attribute__((packed)); 49234 49235 struct epoll_filefd { 49236 struct file *file; 49237 int fd; 49238 } __attribute__((packed)); 49239 49240 struct epitem; 49241 49242 struct eppoll_entry { 49243 struct eppoll_entry *next; 49244 struct epitem *base; 49245 wait_queue_entry_t wait; 49246 wait_queue_head_t *whead; 49247 }; 49248 49249 struct eventpoll; 49250 49251 struct epitem { 49252 union { 49253 struct rb_node rbn; 49254 struct callback_head rcu; 49255 }; 49256 struct list_head rdllink; 49257 struct epitem *next; 49258 struct epoll_filefd ffd; 49259 struct eppoll_entry *pwqlist; 49260 struct eventpoll *ep; 49261 struct hlist_node fllink; 49262 struct wakeup_source *ws; 49263 struct epoll_event event; 49264 }; 49265 49266 struct eventpoll { 49267 struct mutex mtx; 49268 wait_queue_head_t wq; 49269 wait_queue_head_t poll_wait; 49270 struct list_head rdllist; 49271 rwlock_t lock; 49272 struct rb_root_cached rbr; 49273 struct epitem *ovflist; 49274 struct wakeup_source *ws; 49275 struct user_struct *user; 49276 struct file *file; 49277 u64 gen; 49278 struct hlist_head refs; 49279 unsigned int napi_id; 49280 }; 49281 49282 struct ep_pqueue { 49283 poll_table pt; 49284 struct epitem *epi; 49285 }; 49286 49287 struct epitems_head { 49288 struct hlist_head epitems; 49289 struct epitems_head *next; 49290 }; 49291 49292 struct signalfd_siginfo { 49293 __u32 ssi_signo; 49294 __s32 ssi_errno; 49295 __s32 ssi_code; 49296 __u32 ssi_pid; 49297 __u32 ssi_uid; 49298 __s32 ssi_fd; 49299 __u32 ssi_tid; 49300 __u32 ssi_band; 49301 __u32 ssi_overrun; 49302 __u32 ssi_trapno; 49303 __s32 ssi_status; 49304 __s32 ssi_int; 49305 __u64 ssi_ptr; 49306 __u64 ssi_utime; 49307 __u64 ssi_stime; 49308 __u64 ssi_addr; 49309 __u16 ssi_addr_lsb; 49310 __u16 __pad2; 49311 __s32 ssi_syscall; 49312 __u64 ssi_call_addr; 49313 __u32 ssi_arch; 49314 __u8 __pad[28]; 49315 }; 49316 49317 struct signalfd_ctx { 49318 sigset_t sigmask; 49319 }; 49320 49321 struct timerfd_ctx { 49322 union { 49323 struct hrtimer tmr; 49324 struct alarm alarm; 49325 } t; 49326 ktime_t tintv; 49327 ktime_t moffs; 49328 wait_queue_head_t wqh; 49329 u64 ticks; 49330 int clockid; 49331 short unsigned int expired; 49332 short unsigned int settime_flags; 49333 struct callback_head rcu; 49334 struct list_head clist; 49335 spinlock_t cancel_lock; 49336 bool might_cancel; 49337 }; 49338 49339 struct eventfd_ctx___2 { 49340 struct kref kref; 49341 wait_queue_head_t wqh; 49342 __u64 count; 49343 unsigned int flags; 49344 int id; 49345 }; 49346 49347 enum userfaultfd_state { 49348 UFFD_STATE_WAIT_API = 0, 49349 UFFD_STATE_RUNNING = 1, 49350 }; 49351 49352 struct userfaultfd_ctx { 49353 wait_queue_head_t fault_pending_wqh; 49354 wait_queue_head_t fault_wqh; 49355 wait_queue_head_t fd_wqh; 49356 wait_queue_head_t event_wqh; 49357 seqcount_spinlock_t refile_seq; 49358 refcount_t refcount; 49359 unsigned int flags; 49360 unsigned int features; 49361 enum userfaultfd_state state; 49362 bool released; 49363 bool mmap_changing; 49364 struct mm_struct *mm; 49365 }; 49366 49367 struct uffd_msg { 49368 __u8 event; 49369 __u8 reserved1; 49370 __u16 reserved2; 49371 __u32 reserved3; 49372 union { 49373 struct { 49374 __u64 flags; 49375 __u64 address; 49376 union { 49377 __u32 ptid; 49378 } feat; 49379 } pagefault; 49380 struct { 49381 __u32 ufd; 49382 } fork; 49383 struct { 49384 __u64 from; 49385 __u64 to; 49386 __u64 len; 49387 } remap; 49388 struct { 49389 __u64 start; 49390 __u64 end; 49391 } remove; 49392 struct { 49393 __u64 reserved1; 49394 __u64 reserved2; 49395 __u64 reserved3; 49396 } reserved; 49397 } arg; 49398 }; 49399 49400 struct uffdio_api { 49401 __u64 api; 49402 __u64 features; 49403 __u64 ioctls; 49404 }; 49405 49406 struct uffdio_range { 49407 __u64 start; 49408 __u64 len; 49409 }; 49410 49411 struct uffdio_register { 49412 struct uffdio_range range; 49413 __u64 mode; 49414 __u64 ioctls; 49415 }; 49416 49417 struct uffdio_copy { 49418 __u64 dst; 49419 __u64 src; 49420 __u64 len; 49421 __u64 mode; 49422 __s64 copy; 49423 }; 49424 49425 struct uffdio_zeropage { 49426 struct uffdio_range range; 49427 __u64 mode; 49428 __s64 zeropage; 49429 }; 49430 49431 struct uffdio_writeprotect { 49432 struct uffdio_range range; 49433 __u64 mode; 49434 }; 49435 49436 struct userfaultfd_fork_ctx { 49437 struct userfaultfd_ctx *orig; 49438 struct userfaultfd_ctx *new; 49439 struct list_head list; 49440 }; 49441 49442 struct userfaultfd_unmap_ctx { 49443 struct userfaultfd_ctx *ctx; 49444 long unsigned int start; 49445 long unsigned int end; 49446 struct list_head list; 49447 }; 49448 49449 struct userfaultfd_wait_queue { 49450 struct uffd_msg msg; 49451 wait_queue_entry_t wq; 49452 struct userfaultfd_ctx *ctx; 49453 bool waken; 49454 }; 49455 49456 struct userfaultfd_wake_range { 49457 long unsigned int start; 49458 long unsigned int len; 49459 }; 49460 49461 struct kioctx; 49462 49463 struct kioctx_table { 49464 struct callback_head rcu; 49465 unsigned int nr; 49466 struct kioctx *table[0]; 49467 }; 49468 49469 typedef __kernel_ulong_t aio_context_t; 49470 49471 enum { 49472 IOCB_CMD_PREAD = 0, 49473 IOCB_CMD_PWRITE = 1, 49474 IOCB_CMD_FSYNC = 2, 49475 IOCB_CMD_FDSYNC = 3, 49476 IOCB_CMD_POLL = 5, 49477 IOCB_CMD_NOOP = 6, 49478 IOCB_CMD_PREADV = 7, 49479 IOCB_CMD_PWRITEV = 8, 49480 }; 49481 49482 struct io_event { 49483 __u64 data; 49484 __u64 obj; 49485 __s64 res; 49486 __s64 res2; 49487 }; 49488 49489 struct iocb { 49490 __u64 aio_data; 49491 __u32 aio_key; 49492 __kernel_rwf_t aio_rw_flags; 49493 __u16 aio_lio_opcode; 49494 __s16 aio_reqprio; 49495 __u32 aio_fildes; 49496 __u64 aio_buf; 49497 __u64 aio_nbytes; 49498 __s64 aio_offset; 49499 __u64 aio_reserved2; 49500 __u32 aio_flags; 49501 __u32 aio_resfd; 49502 }; 49503 49504 typedef u32 compat_aio_context_t; 49505 49506 typedef int kiocb_cancel_fn(struct kiocb *); 49507 49508 struct aio_ring { 49509 unsigned int id; 49510 unsigned int nr; 49511 unsigned int head; 49512 unsigned int tail; 49513 unsigned int magic; 49514 unsigned int compat_features; 49515 unsigned int incompat_features; 49516 unsigned int header_length; 49517 struct io_event io_events[0]; 49518 }; 49519 49520 struct kioctx_cpu; 49521 49522 struct ctx_rq_wait; 49523 49524 struct kioctx { 49525 struct percpu_ref users; 49526 atomic_t dead; 49527 struct percpu_ref reqs; 49528 long unsigned int user_id; 49529 struct kioctx_cpu *cpu; 49530 unsigned int req_batch; 49531 unsigned int max_reqs; 49532 unsigned int nr_events; 49533 long unsigned int mmap_base; 49534 long unsigned int mmap_size; 49535 struct page **ring_pages; 49536 long int nr_pages; 49537 struct rcu_work free_rwork; 49538 struct ctx_rq_wait *rq_wait; 49539 long: 64; 49540 long: 64; 49541 long: 64; 49542 struct { 49543 atomic_t reqs_available; 49544 long: 32; 49545 long: 64; 49546 long: 64; 49547 long: 64; 49548 long: 64; 49549 long: 64; 49550 long: 64; 49551 long: 64; 49552 }; 49553 struct { 49554 spinlock_t ctx_lock; 49555 struct list_head active_reqs; 49556 long: 64; 49557 long: 64; 49558 long: 64; 49559 long: 64; 49560 long: 64; 49561 }; 49562 struct { 49563 struct mutex ring_lock; 49564 wait_queue_head_t wait; 49565 long: 64; 49566 }; 49567 struct { 49568 unsigned int tail; 49569 unsigned int completed_events; 49570 spinlock_t completion_lock; 49571 long: 32; 49572 long: 64; 49573 long: 64; 49574 long: 64; 49575 long: 64; 49576 long: 64; 49577 long: 64; 49578 }; 49579 struct page *internal_pages[8]; 49580 struct file *aio_ring_file; 49581 unsigned int id; 49582 long: 32; 49583 long: 64; 49584 long: 64; 49585 long: 64; 49586 long: 64; 49587 long: 64; 49588 long: 64; 49589 }; 49590 49591 struct kioctx_cpu { 49592 unsigned int reqs_available; 49593 }; 49594 49595 struct ctx_rq_wait { 49596 struct completion comp; 49597 atomic_t count; 49598 }; 49599 49600 struct fsync_iocb { 49601 struct file *file; 49602 struct work_struct work; 49603 bool datasync; 49604 struct cred *creds; 49605 }; 49606 49607 struct poll_iocb { 49608 struct file *file; 49609 struct wait_queue_head *head; 49610 __poll_t events; 49611 bool done; 49612 bool cancelled; 49613 struct wait_queue_entry wait; 49614 struct work_struct work; 49615 }; 49616 49617 struct aio_kiocb { 49618 union { 49619 struct file *ki_filp; 49620 struct kiocb rw; 49621 struct fsync_iocb fsync; 49622 struct poll_iocb poll; 49623 }; 49624 struct kioctx *ki_ctx; 49625 kiocb_cancel_fn *ki_cancel; 49626 struct io_event ki_res; 49627 struct list_head ki_list; 49628 refcount_t ki_refcnt; 49629 struct eventfd_ctx *ki_eventfd; 49630 }; 49631 49632 struct aio_poll_table { 49633 struct poll_table_struct pt; 49634 struct aio_kiocb *iocb; 49635 int error; 49636 }; 49637 49638 struct __aio_sigset { 49639 const sigset_t *sigmask; 49640 size_t sigsetsize; 49641 }; 49642 49643 struct __compat_aio_sigset { 49644 compat_uptr_t sigmask; 49645 compat_size_t sigsetsize; 49646 }; 49647 49648 enum { 49649 PERCPU_REF_INIT_ATOMIC = 1, 49650 PERCPU_REF_INIT_DEAD = 2, 49651 PERCPU_REF_ALLOW_REINIT = 4, 49652 }; 49653 49654 struct user_msghdr { 49655 void *msg_name; 49656 int msg_namelen; 49657 struct iovec *msg_iov; 49658 __kernel_size_t msg_iovlen; 49659 void *msg_control; 49660 __kernel_size_t msg_controllen; 49661 unsigned int msg_flags; 49662 }; 49663 49664 typedef s32 compat_ssize_t; 49665 49666 struct compat_msghdr { 49667 compat_uptr_t msg_name; 49668 compat_int_t msg_namelen; 49669 compat_uptr_t msg_iov; 49670 compat_size_t msg_iovlen; 49671 compat_uptr_t msg_control; 49672 compat_size_t msg_controllen; 49673 compat_uint_t msg_flags; 49674 }; 49675 49676 struct scm_fp_list { 49677 short int count; 49678 short int max; 49679 struct user_struct *user; 49680 struct file *fp[253]; 49681 }; 49682 49683 struct unix_skb_parms { 49684 struct pid *pid; 49685 kuid_t uid; 49686 kgid_t gid; 49687 struct scm_fp_list *fp; 49688 u32 secid; 49689 u32 consumed; 49690 }; 49691 49692 struct trace_event_raw_io_uring_create { 49693 struct trace_entry ent; 49694 int fd; 49695 void *ctx; 49696 u32 sq_entries; 49697 u32 cq_entries; 49698 u32 flags; 49699 char __data[0]; 49700 }; 49701 49702 struct trace_event_raw_io_uring_register { 49703 struct trace_entry ent; 49704 void *ctx; 49705 unsigned int opcode; 49706 unsigned int nr_files; 49707 unsigned int nr_bufs; 49708 bool eventfd; 49709 long int ret; 49710 char __data[0]; 49711 }; 49712 49713 struct trace_event_raw_io_uring_file_get { 49714 struct trace_entry ent; 49715 void *ctx; 49716 int fd; 49717 char __data[0]; 49718 }; 49719 49720 struct io_wq_work; 49721 49722 struct trace_event_raw_io_uring_queue_async_work { 49723 struct trace_entry ent; 49724 void *ctx; 49725 int rw; 49726 void *req; 49727 struct io_wq_work *work; 49728 unsigned int flags; 49729 char __data[0]; 49730 }; 49731 49732 struct io_wq_work_node { 49733 struct io_wq_work_node *next; 49734 }; 49735 49736 struct io_wq_work { 49737 struct io_wq_work_node list; 49738 struct io_identity *identity; 49739 unsigned int flags; 49740 }; 49741 49742 struct trace_event_raw_io_uring_defer { 49743 struct trace_entry ent; 49744 void *ctx; 49745 void *req; 49746 long long unsigned int data; 49747 char __data[0]; 49748 }; 49749 49750 struct trace_event_raw_io_uring_link { 49751 struct trace_entry ent; 49752 void *ctx; 49753 void *req; 49754 void *target_req; 49755 char __data[0]; 49756 }; 49757 49758 struct trace_event_raw_io_uring_cqring_wait { 49759 struct trace_entry ent; 49760 void *ctx; 49761 int min_events; 49762 char __data[0]; 49763 }; 49764 49765 struct trace_event_raw_io_uring_fail_link { 49766 struct trace_entry ent; 49767 void *req; 49768 void *link; 49769 char __data[0]; 49770 }; 49771 49772 struct trace_event_raw_io_uring_complete { 49773 struct trace_entry ent; 49774 void *ctx; 49775 u64 user_data; 49776 long int res; 49777 char __data[0]; 49778 }; 49779 49780 struct trace_event_raw_io_uring_submit_sqe { 49781 struct trace_entry ent; 49782 void *ctx; 49783 u8 opcode; 49784 u64 user_data; 49785 bool force_nonblock; 49786 bool sq_thread; 49787 char __data[0]; 49788 }; 49789 49790 struct trace_event_raw_io_uring_poll_arm { 49791 struct trace_entry ent; 49792 void *ctx; 49793 u8 opcode; 49794 u64 user_data; 49795 int mask; 49796 int events; 49797 char __data[0]; 49798 }; 49799 49800 struct trace_event_raw_io_uring_poll_wake { 49801 struct trace_entry ent; 49802 void *ctx; 49803 u8 opcode; 49804 u64 user_data; 49805 int mask; 49806 char __data[0]; 49807 }; 49808 49809 struct trace_event_raw_io_uring_task_add { 49810 struct trace_entry ent; 49811 void *ctx; 49812 u8 opcode; 49813 u64 user_data; 49814 int mask; 49815 char __data[0]; 49816 }; 49817 49818 struct trace_event_raw_io_uring_task_run { 49819 struct trace_entry ent; 49820 void *ctx; 49821 u8 opcode; 49822 u64 user_data; 49823 char __data[0]; 49824 }; 49825 49826 struct trace_event_data_offsets_io_uring_create {}; 49827 49828 struct trace_event_data_offsets_io_uring_register {}; 49829 49830 struct trace_event_data_offsets_io_uring_file_get {}; 49831 49832 struct trace_event_data_offsets_io_uring_queue_async_work {}; 49833 49834 struct trace_event_data_offsets_io_uring_defer {}; 49835 49836 struct trace_event_data_offsets_io_uring_link {}; 49837 49838 struct trace_event_data_offsets_io_uring_cqring_wait {}; 49839 49840 struct trace_event_data_offsets_io_uring_fail_link {}; 49841 49842 struct trace_event_data_offsets_io_uring_complete {}; 49843 49844 struct trace_event_data_offsets_io_uring_submit_sqe {}; 49845 49846 struct trace_event_data_offsets_io_uring_poll_arm {}; 49847 49848 struct trace_event_data_offsets_io_uring_poll_wake {}; 49849 49850 struct trace_event_data_offsets_io_uring_task_add {}; 49851 49852 struct trace_event_data_offsets_io_uring_task_run {}; 49853 49854 typedef void (*btf_trace_io_uring_create)(void *, int, void *, u32, u32, u32); 49855 49856 typedef void (*btf_trace_io_uring_register)(void *, void *, unsigned int, unsigned int, unsigned int, bool, long int); 49857 49858 typedef void (*btf_trace_io_uring_file_get)(void *, void *, int); 49859 49860 typedef void (*btf_trace_io_uring_queue_async_work)(void *, void *, int, void *, struct io_wq_work *, unsigned int); 49861 49862 typedef void (*btf_trace_io_uring_defer)(void *, void *, void *, long long unsigned int); 49863 49864 typedef void (*btf_trace_io_uring_link)(void *, void *, void *, void *); 49865 49866 typedef void (*btf_trace_io_uring_cqring_wait)(void *, void *, int); 49867 49868 typedef void (*btf_trace_io_uring_fail_link)(void *, void *, void *); 49869 49870 typedef void (*btf_trace_io_uring_complete)(void *, void *, u64, long int); 49871 49872 typedef void (*btf_trace_io_uring_submit_sqe)(void *, void *, u8, u64, bool, bool); 49873 49874 typedef void (*btf_trace_io_uring_poll_arm)(void *, void *, u8, u64, int, int); 49875 49876 typedef void (*btf_trace_io_uring_poll_wake)(void *, void *, u8, u64, int); 49877 49878 typedef void (*btf_trace_io_uring_task_add)(void *, void *, u8, u64, int); 49879 49880 typedef void (*btf_trace_io_uring_task_run)(void *, void *, u8, u64); 49881 49882 struct io_uring_sqe { 49883 __u8 opcode; 49884 __u8 flags; 49885 __u16 ioprio; 49886 __s32 fd; 49887 union { 49888 __u64 off; 49889 __u64 addr2; 49890 }; 49891 union { 49892 __u64 addr; 49893 __u64 splice_off_in; 49894 }; 49895 __u32 len; 49896 union { 49897 __kernel_rwf_t rw_flags; 49898 __u32 fsync_flags; 49899 __u16 poll_events; 49900 __u32 poll32_events; 49901 __u32 sync_range_flags; 49902 __u32 msg_flags; 49903 __u32 timeout_flags; 49904 __u32 accept_flags; 49905 __u32 cancel_flags; 49906 __u32 open_flags; 49907 __u32 statx_flags; 49908 __u32 fadvise_advice; 49909 __u32 splice_flags; 49910 __u32 rename_flags; 49911 __u32 unlink_flags; 49912 }; 49913 __u64 user_data; 49914 union { 49915 struct { 49916 union { 49917 __u16 buf_index; 49918 __u16 buf_group; 49919 }; 49920 __u16 personality; 49921 __s32 splice_fd_in; 49922 }; 49923 __u64 __pad2[3]; 49924 }; 49925 }; 49926 49927 enum { 49928 IOSQE_FIXED_FILE_BIT = 0, 49929 IOSQE_IO_DRAIN_BIT = 1, 49930 IOSQE_IO_LINK_BIT = 2, 49931 IOSQE_IO_HARDLINK_BIT = 3, 49932 IOSQE_ASYNC_BIT = 4, 49933 IOSQE_BUFFER_SELECT_BIT = 5, 49934 }; 49935 49936 enum { 49937 IORING_OP_NOP = 0, 49938 IORING_OP_READV = 1, 49939 IORING_OP_WRITEV = 2, 49940 IORING_OP_FSYNC = 3, 49941 IORING_OP_READ_FIXED = 4, 49942 IORING_OP_WRITE_FIXED = 5, 49943 IORING_OP_POLL_ADD = 6, 49944 IORING_OP_POLL_REMOVE = 7, 49945 IORING_OP_SYNC_FILE_RANGE = 8, 49946 IORING_OP_SENDMSG = 9, 49947 IORING_OP_RECVMSG = 10, 49948 IORING_OP_TIMEOUT = 11, 49949 IORING_OP_TIMEOUT_REMOVE = 12, 49950 IORING_OP_ACCEPT = 13, 49951 IORING_OP_ASYNC_CANCEL = 14, 49952 IORING_OP_LINK_TIMEOUT = 15, 49953 IORING_OP_CONNECT = 16, 49954 IORING_OP_FALLOCATE = 17, 49955 IORING_OP_OPENAT = 18, 49956 IORING_OP_CLOSE = 19, 49957 IORING_OP_FILES_UPDATE = 20, 49958 IORING_OP_STATX = 21, 49959 IORING_OP_READ = 22, 49960 IORING_OP_WRITE = 23, 49961 IORING_OP_FADVISE = 24, 49962 IORING_OP_MADVISE = 25, 49963 IORING_OP_SEND = 26, 49964 IORING_OP_RECV = 27, 49965 IORING_OP_OPENAT2 = 28, 49966 IORING_OP_EPOLL_CTL = 29, 49967 IORING_OP_SPLICE = 30, 49968 IORING_OP_PROVIDE_BUFFERS = 31, 49969 IORING_OP_REMOVE_BUFFERS = 32, 49970 IORING_OP_TEE = 33, 49971 IORING_OP_SHUTDOWN = 34, 49972 IORING_OP_RENAMEAT = 35, 49973 IORING_OP_UNLINKAT = 36, 49974 IORING_OP_LAST = 37, 49975 }; 49976 49977 struct io_uring_cqe { 49978 __u64 user_data; 49979 __s32 res; 49980 __u32 flags; 49981 }; 49982 49983 enum { 49984 IORING_CQE_BUFFER_SHIFT = 16, 49985 }; 49986 49987 struct io_sqring_offsets { 49988 __u32 head; 49989 __u32 tail; 49990 __u32 ring_mask; 49991 __u32 ring_entries; 49992 __u32 flags; 49993 __u32 dropped; 49994 __u32 array; 49995 __u32 resv1; 49996 __u64 resv2; 49997 }; 49998 49999 struct io_cqring_offsets { 50000 __u32 head; 50001 __u32 tail; 50002 __u32 ring_mask; 50003 __u32 ring_entries; 50004 __u32 overflow; 50005 __u32 cqes; 50006 __u32 flags; 50007 __u32 resv1; 50008 __u64 resv2; 50009 }; 50010 50011 struct io_uring_params { 50012 __u32 sq_entries; 50013 __u32 cq_entries; 50014 __u32 flags; 50015 __u32 sq_thread_cpu; 50016 __u32 sq_thread_idle; 50017 __u32 features; 50018 __u32 wq_fd; 50019 __u32 resv[3]; 50020 struct io_sqring_offsets sq_off; 50021 struct io_cqring_offsets cq_off; 50022 }; 50023 50024 enum { 50025 IORING_REGISTER_BUFFERS = 0, 50026 IORING_UNREGISTER_BUFFERS = 1, 50027 IORING_REGISTER_FILES = 2, 50028 IORING_UNREGISTER_FILES = 3, 50029 IORING_REGISTER_EVENTFD = 4, 50030 IORING_UNREGISTER_EVENTFD = 5, 50031 IORING_REGISTER_FILES_UPDATE = 6, 50032 IORING_REGISTER_EVENTFD_ASYNC = 7, 50033 IORING_REGISTER_PROBE = 8, 50034 IORING_REGISTER_PERSONALITY = 9, 50035 IORING_UNREGISTER_PERSONALITY = 10, 50036 IORING_REGISTER_RESTRICTIONS = 11, 50037 IORING_REGISTER_ENABLE_RINGS = 12, 50038 IORING_REGISTER_LAST = 13, 50039 }; 50040 50041 struct io_uring_files_update { 50042 __u32 offset; 50043 __u32 resv; 50044 __u64 fds; 50045 }; 50046 50047 struct io_uring_probe_op { 50048 __u8 op; 50049 __u8 resv; 50050 __u16 flags; 50051 __u32 resv2; 50052 }; 50053 50054 struct io_uring_probe { 50055 __u8 last_op; 50056 __u8 ops_len; 50057 __u16 resv; 50058 __u32 resv2[3]; 50059 struct io_uring_probe_op ops[0]; 50060 }; 50061 50062 struct io_uring_restriction { 50063 __u16 opcode; 50064 union { 50065 __u8 register_op; 50066 __u8 sqe_op; 50067 __u8 sqe_flags; 50068 }; 50069 __u8 resv; 50070 __u32 resv2[3]; 50071 }; 50072 50073 enum { 50074 IORING_RESTRICTION_REGISTER_OP = 0, 50075 IORING_RESTRICTION_SQE_OP = 1, 50076 IORING_RESTRICTION_SQE_FLAGS_ALLOWED = 2, 50077 IORING_RESTRICTION_SQE_FLAGS_REQUIRED = 3, 50078 IORING_RESTRICTION_LAST = 4, 50079 }; 50080 50081 struct io_uring_getevents_arg { 50082 __u64 sigmask; 50083 __u32 sigmask_sz; 50084 __u32 pad; 50085 __u64 ts; 50086 }; 50087 50088 enum { 50089 IO_WQ_WORK_CANCEL = 1, 50090 IO_WQ_WORK_HASHED = 2, 50091 IO_WQ_WORK_UNBOUND = 4, 50092 IO_WQ_WORK_CONCURRENT = 16, 50093 IO_WQ_WORK_FILES = 32, 50094 IO_WQ_WORK_FS = 64, 50095 IO_WQ_WORK_MM = 128, 50096 IO_WQ_WORK_CREDS = 256, 50097 IO_WQ_WORK_BLKCG = 512, 50098 IO_WQ_WORK_FSIZE = 1024, 50099 IO_WQ_HASH_SHIFT = 24, 50100 }; 50101 50102 enum io_wq_cancel { 50103 IO_WQ_CANCEL_OK = 0, 50104 IO_WQ_CANCEL_RUNNING = 1, 50105 IO_WQ_CANCEL_NOTFOUND = 2, 50106 }; 50107 50108 typedef struct io_wq_work *free_work_fn(struct io_wq_work *); 50109 50110 typedef void io_wq_work_fn(struct io_wq_work *); 50111 50112 struct io_wq_data { 50113 struct user_struct *user; 50114 io_wq_work_fn *do_work; 50115 free_work_fn *free_work; 50116 }; 50117 50118 typedef bool work_cancel_fn(struct io_wq_work *, void *); 50119 50120 struct io_uring { 50121 u32 head; 50122 long: 32; 50123 long: 64; 50124 long: 64; 50125 long: 64; 50126 long: 64; 50127 long: 64; 50128 long: 64; 50129 long: 64; 50130 u32 tail; 50131 long: 32; 50132 long: 64; 50133 long: 64; 50134 long: 64; 50135 long: 64; 50136 long: 64; 50137 long: 64; 50138 long: 64; 50139 }; 50140 50141 struct io_rings { 50142 struct io_uring sq; 50143 struct io_uring cq; 50144 u32 sq_ring_mask; 50145 u32 cq_ring_mask; 50146 u32 sq_ring_entries; 50147 u32 cq_ring_entries; 50148 u32 sq_dropped; 50149 u32 sq_flags; 50150 u32 cq_flags; 50151 u32 cq_overflow; 50152 long: 64; 50153 long: 64; 50154 long: 64; 50155 long: 64; 50156 struct io_uring_cqe cqes[0]; 50157 }; 50158 50159 struct io_mapped_ubuf { 50160 u64 ubuf; 50161 size_t len; 50162 struct bio_vec *bvec; 50163 unsigned int nr_bvecs; 50164 long unsigned int acct_pages; 50165 }; 50166 50167 struct fixed_file_table { 50168 struct file **files; 50169 }; 50170 50171 struct fixed_file_data; 50172 50173 struct fixed_file_ref_node { 50174 struct percpu_ref refs; 50175 struct list_head node; 50176 struct list_head file_list; 50177 struct fixed_file_data *file_data; 50178 struct llist_node llist; 50179 bool done; 50180 }; 50181 50182 struct io_ring_ctx; 50183 50184 struct fixed_file_data { 50185 struct fixed_file_table *table; 50186 struct io_ring_ctx *ctx; 50187 struct fixed_file_ref_node *node; 50188 struct percpu_ref refs; 50189 struct completion done; 50190 struct list_head ref_list; 50191 spinlock_t lock; 50192 }; 50193 50194 struct io_wq; 50195 50196 struct io_restriction { 50197 long unsigned int register_op[1]; 50198 long unsigned int sqe_op[1]; 50199 u8 sqe_flags_allowed; 50200 u8 sqe_flags_required; 50201 bool registered; 50202 }; 50203 50204 struct io_sq_data; 50205 50206 struct io_kiocb; 50207 50208 struct io_ring_ctx { 50209 struct { 50210 struct percpu_ref refs; 50211 long: 64; 50212 long: 64; 50213 long: 64; 50214 long: 64; 50215 long: 64; 50216 long: 64; 50217 }; 50218 struct { 50219 unsigned int flags; 50220 unsigned int compat: 1; 50221 unsigned int limit_mem: 1; 50222 unsigned int cq_overflow_flushed: 1; 50223 unsigned int drain_next: 1; 50224 unsigned int eventfd_async: 1; 50225 unsigned int restricted: 1; 50226 unsigned int sqo_dead: 1; 50227 u32 *sq_array; 50228 unsigned int cached_sq_head; 50229 unsigned int sq_entries; 50230 unsigned int sq_mask; 50231 unsigned int sq_thread_idle; 50232 unsigned int cached_sq_dropped; 50233 unsigned int cached_cq_overflow; 50234 long unsigned int sq_check_overflow; 50235 struct list_head defer_list; 50236 struct list_head timeout_list; 50237 struct list_head cq_overflow_list; 50238 struct io_uring_sqe *sq_sqes; 50239 long: 64; 50240 long: 64; 50241 long: 64; 50242 }; 50243 struct io_rings *rings; 50244 struct io_wq *io_wq; 50245 struct task_struct *sqo_task; 50246 struct mm_struct *mm_account; 50247 struct cgroup_subsys_state *sqo_blkcg_css; 50248 struct io_sq_data *sq_data; 50249 struct wait_queue_head sqo_sq_wait; 50250 struct list_head sqd_list; 50251 struct fixed_file_data *file_data; 50252 unsigned int nr_user_files; 50253 unsigned int nr_user_bufs; 50254 struct io_mapped_ubuf *user_bufs; 50255 struct user_struct *user; 50256 const struct cred *creds; 50257 kuid_t loginuid; 50258 unsigned int sessionid; 50259 struct completion ref_comp; 50260 struct completion sq_thread_comp; 50261 struct io_kiocb *fallback_req; 50262 struct socket *ring_sock; 50263 struct idr io_buffer_idr; 50264 struct idr personality_idr; 50265 long: 64; 50266 long: 64; 50267 long: 64; 50268 long: 64; 50269 long: 64; 50270 long: 64; 50271 long: 64; 50272 struct { 50273 unsigned int cached_cq_tail; 50274 unsigned int cq_entries; 50275 unsigned int cq_mask; 50276 atomic_t cq_timeouts; 50277 unsigned int cq_last_tm_flush; 50278 long unsigned int cq_check_overflow; 50279 struct wait_queue_head cq_wait; 50280 struct fasync_struct *cq_fasync; 50281 struct eventfd_ctx *cq_ev_fd; 50282 long: 64; 50283 long: 64; 50284 long: 64; 50285 long: 64; 50286 long: 64; 50287 long: 64; 50288 long: 64; 50289 }; 50290 struct { 50291 struct mutex uring_lock; 50292 wait_queue_head_t wait; 50293 long: 64; 50294 }; 50295 struct { 50296 spinlock_t completion_lock; 50297 struct list_head iopoll_list; 50298 struct hlist_head *cancel_hash; 50299 unsigned int cancel_hash_bits; 50300 bool poll_multi_file; 50301 spinlock_t inflight_lock; 50302 struct list_head inflight_list; 50303 }; 50304 struct delayed_work file_put_work; 50305 struct llist_head file_put_llist; 50306 struct work_struct exit_work; 50307 struct io_restriction restrictions; 50308 long: 64; 50309 long: 64; 50310 long: 64; 50311 long: 64; 50312 long: 64; 50313 }; 50314 50315 struct io_buffer { 50316 struct list_head list; 50317 __u64 addr; 50318 __s32 len; 50319 __u16 bid; 50320 }; 50321 50322 struct io_sq_data { 50323 refcount_t refs; 50324 struct mutex lock; 50325 struct list_head ctx_list; 50326 struct list_head ctx_new_list; 50327 struct mutex ctx_lock; 50328 struct task_struct *thread; 50329 struct wait_queue_head wait; 50330 unsigned int sq_thread_idle; 50331 }; 50332 50333 struct io_rw { 50334 struct kiocb kiocb; 50335 u64 addr; 50336 u64 len; 50337 }; 50338 50339 struct io_poll_iocb { 50340 struct file *file; 50341 struct wait_queue_head *head; 50342 __poll_t events; 50343 bool done; 50344 bool canceled; 50345 struct wait_queue_entry wait; 50346 }; 50347 50348 struct io_poll_remove { 50349 struct file *file; 50350 u64 addr; 50351 }; 50352 50353 struct io_accept { 50354 struct file *file; 50355 struct sockaddr *addr; 50356 int *addr_len; 50357 int flags; 50358 long unsigned int nofile; 50359 }; 50360 50361 struct io_sync { 50362 struct file *file; 50363 loff_t len; 50364 loff_t off; 50365 int flags; 50366 int mode; 50367 }; 50368 50369 struct io_cancel { 50370 struct file *file; 50371 u64 addr; 50372 }; 50373 50374 struct io_timeout { 50375 struct file *file; 50376 u32 off; 50377 u32 target_seq; 50378 struct list_head list; 50379 struct io_kiocb *head; 50380 }; 50381 50382 struct io_timeout_rem { 50383 struct file *file; 50384 u64 addr; 50385 struct timespec64 ts; 50386 u32 flags; 50387 }; 50388 50389 struct io_connect { 50390 struct file *file; 50391 struct sockaddr *addr; 50392 int addr_len; 50393 }; 50394 50395 struct io_sr_msg { 50396 struct file *file; 50397 union { 50398 struct user_msghdr *umsg; 50399 void *buf; 50400 }; 50401 int msg_flags; 50402 int bgid; 50403 size_t len; 50404 struct io_buffer *kbuf; 50405 }; 50406 50407 struct io_open { 50408 struct file *file; 50409 int dfd; 50410 bool ignore_nonblock; 50411 struct filename *filename; 50412 struct open_how how; 50413 long unsigned int nofile; 50414 }; 50415 50416 struct io_close { 50417 struct file *file; 50418 int fd; 50419 }; 50420 50421 struct io_files_update { 50422 struct file *file; 50423 u64 arg; 50424 u32 nr_args; 50425 u32 offset; 50426 }; 50427 50428 struct io_fadvise { 50429 struct file *file; 50430 u64 offset; 50431 u32 len; 50432 u32 advice; 50433 }; 50434 50435 struct io_madvise { 50436 struct file *file; 50437 u64 addr; 50438 u32 len; 50439 u32 advice; 50440 }; 50441 50442 struct io_epoll { 50443 struct file *file; 50444 int epfd; 50445 int op; 50446 int fd; 50447 struct epoll_event event; 50448 } __attribute__((packed)); 50449 50450 struct io_splice { 50451 struct file *file_out; 50452 struct file *file_in; 50453 loff_t off_out; 50454 loff_t off_in; 50455 u64 len; 50456 unsigned int flags; 50457 }; 50458 50459 struct io_provide_buf { 50460 struct file *file; 50461 __u64 addr; 50462 __s32 len; 50463 __u32 bgid; 50464 __u16 nbufs; 50465 __u16 bid; 50466 }; 50467 50468 struct io_statx { 50469 struct file *file; 50470 int dfd; 50471 unsigned int mask; 50472 unsigned int flags; 50473 const char *filename; 50474 struct statx *buffer; 50475 }; 50476 50477 struct io_shutdown { 50478 struct file *file; 50479 int how; 50480 }; 50481 50482 struct io_rename { 50483 struct file *file; 50484 int old_dfd; 50485 int new_dfd; 50486 struct filename *oldpath; 50487 struct filename *newpath; 50488 int flags; 50489 }; 50490 50491 struct io_unlink { 50492 struct file *file; 50493 int dfd; 50494 int flags; 50495 struct filename *filename; 50496 }; 50497 50498 struct io_completion { 50499 struct file *file; 50500 struct list_head list; 50501 int cflags; 50502 }; 50503 50504 struct async_poll; 50505 50506 struct io_kiocb { 50507 union { 50508 struct file *file; 50509 struct io_rw rw; 50510 struct io_poll_iocb poll; 50511 struct io_poll_remove poll_remove; 50512 struct io_accept accept; 50513 struct io_sync sync; 50514 struct io_cancel cancel; 50515 struct io_timeout timeout; 50516 struct io_timeout_rem timeout_rem; 50517 struct io_connect connect; 50518 struct io_sr_msg sr_msg; 50519 struct io_open open; 50520 struct io_close close; 50521 struct io_files_update files_update; 50522 struct io_fadvise fadvise; 50523 struct io_madvise madvise; 50524 struct io_epoll epoll; 50525 struct io_splice splice; 50526 struct io_provide_buf pbuf; 50527 struct io_statx statx; 50528 struct io_shutdown shutdown; 50529 struct io_rename rename; 50530 struct io_unlink unlink; 50531 struct io_completion compl; 50532 }; 50533 void *async_data; 50534 u8 opcode; 50535 u8 iopoll_completed; 50536 u16 buf_index; 50537 u32 result; 50538 struct io_ring_ctx *ctx; 50539 unsigned int flags; 50540 refcount_t refs; 50541 struct task_struct *task; 50542 u64 user_data; 50543 struct io_kiocb *link; 50544 struct percpu_ref *fixed_file_refs; 50545 struct list_head inflight_entry; 50546 struct callback_head task_work; 50547 struct hlist_node hash_node; 50548 struct async_poll *apoll; 50549 struct io_wq_work work; 50550 }; 50551 50552 struct io_timeout_data { 50553 struct io_kiocb *req; 50554 struct hrtimer timer; 50555 struct timespec64 ts; 50556 enum hrtimer_mode mode; 50557 }; 50558 50559 struct io_async_connect { 50560 struct __kernel_sockaddr_storage address; 50561 }; 50562 50563 struct io_async_msghdr { 50564 struct iovec fast_iov[8]; 50565 struct iovec *iov; 50566 struct sockaddr *uaddr; 50567 struct msghdr msg; 50568 struct __kernel_sockaddr_storage addr; 50569 }; 50570 50571 struct io_async_rw { 50572 struct iovec fast_iov[8]; 50573 const struct iovec *free_iovec; 50574 struct iov_iter iter; 50575 size_t bytes_done; 50576 struct wait_page_queue wpq; 50577 }; 50578 50579 enum { 50580 REQ_F_FIXED_FILE_BIT = 0, 50581 REQ_F_IO_DRAIN_BIT = 1, 50582 REQ_F_LINK_BIT = 2, 50583 REQ_F_HARDLINK_BIT = 3, 50584 REQ_F_FORCE_ASYNC_BIT = 4, 50585 REQ_F_BUFFER_SELECT_BIT = 5, 50586 REQ_F_FAIL_LINK_BIT = 6, 50587 REQ_F_INFLIGHT_BIT = 7, 50588 REQ_F_CUR_POS_BIT = 8, 50589 REQ_F_NOWAIT_BIT = 9, 50590 REQ_F_LINK_TIMEOUT_BIT = 10, 50591 REQ_F_ISREG_BIT = 11, 50592 REQ_F_NEED_CLEANUP_BIT = 12, 50593 REQ_F_POLLED_BIT = 13, 50594 REQ_F_BUFFER_SELECTED_BIT = 14, 50595 REQ_F_NO_FILE_TABLE_BIT = 15, 50596 REQ_F_WORK_INITIALIZED_BIT = 16, 50597 REQ_F_LTIMEOUT_ACTIVE_BIT = 17, 50598 __REQ_F_LAST_BIT = 18, 50599 }; 50600 50601 enum { 50602 REQ_F_FIXED_FILE = 1, 50603 REQ_F_IO_DRAIN = 2, 50604 REQ_F_LINK = 4, 50605 REQ_F_HARDLINK = 8, 50606 REQ_F_FORCE_ASYNC = 16, 50607 REQ_F_BUFFER_SELECT = 32, 50608 REQ_F_FAIL_LINK = 64, 50609 REQ_F_INFLIGHT = 128, 50610 REQ_F_CUR_POS = 256, 50611 REQ_F_NOWAIT = 512, 50612 REQ_F_LINK_TIMEOUT = 1024, 50613 REQ_F_ISREG = 2048, 50614 REQ_F_NEED_CLEANUP = 4096, 50615 REQ_F_POLLED = 8192, 50616 REQ_F_BUFFER_SELECTED = 16384, 50617 REQ_F_NO_FILE_TABLE = 32768, 50618 REQ_F_WORK_INITIALIZED = 65536, 50619 REQ_F_LTIMEOUT_ACTIVE = 131072, 50620 }; 50621 50622 struct async_poll { 50623 struct io_poll_iocb poll; 50624 struct io_poll_iocb *double_poll; 50625 }; 50626 50627 struct io_defer_entry { 50628 struct list_head list; 50629 struct io_kiocb *req; 50630 u32 seq; 50631 }; 50632 50633 struct io_comp_state { 50634 unsigned int nr; 50635 struct list_head list; 50636 struct io_ring_ctx *ctx; 50637 }; 50638 50639 struct io_submit_state { 50640 struct blk_plug plug; 50641 void *reqs[8]; 50642 unsigned int free_reqs; 50643 bool plug_started; 50644 struct io_comp_state comp; 50645 struct file *file; 50646 unsigned int fd; 50647 unsigned int file_refs; 50648 unsigned int ios_left; 50649 }; 50650 50651 struct io_op_def { 50652 unsigned int needs_file: 1; 50653 unsigned int needs_file_no_error: 1; 50654 unsigned int hash_reg_file: 1; 50655 unsigned int unbound_nonreg_file: 1; 50656 unsigned int not_supported: 1; 50657 unsigned int pollin: 1; 50658 unsigned int pollout: 1; 50659 unsigned int buffer_select: 1; 50660 unsigned int needs_async_data: 1; 50661 unsigned int plug: 1; 50662 short unsigned int async_size; 50663 unsigned int work_flags; 50664 }; 50665 50666 enum io_mem_account { 50667 ACCT_LOCKED = 0, 50668 ACCT_PINNED = 1, 50669 }; 50670 50671 struct req_batch { 50672 void *reqs[8]; 50673 int to_free; 50674 struct task_struct *task; 50675 int task_refs; 50676 }; 50677 50678 struct io_poll_table { 50679 struct poll_table_struct pt; 50680 struct io_kiocb *req; 50681 int error; 50682 }; 50683 50684 struct io_submit_link { 50685 struct io_kiocb *head; 50686 struct io_kiocb *last; 50687 }; 50688 50689 struct io_wait_queue { 50690 struct wait_queue_entry wq; 50691 struct io_ring_ctx *ctx; 50692 unsigned int to_wait; 50693 unsigned int nr_timeouts; 50694 }; 50695 50696 struct io_file_put { 50697 struct list_head list; 50698 struct file *file; 50699 }; 50700 50701 struct io_task_cancel { 50702 struct task_struct *task; 50703 struct files_struct *files; 50704 }; 50705 50706 struct io_wq_work_list { 50707 struct io_wq_work_node *first; 50708 struct io_wq_work_node *last; 50709 }; 50710 50711 enum { 50712 IO_WORKER_F_UP = 1, 50713 IO_WORKER_F_RUNNING = 2, 50714 IO_WORKER_F_FREE = 4, 50715 IO_WORKER_F_FIXED = 8, 50716 IO_WORKER_F_BOUND = 16, 50717 }; 50718 50719 enum { 50720 IO_WQ_BIT_EXIT = 0, 50721 IO_WQ_BIT_ERROR = 1, 50722 }; 50723 50724 enum { 50725 IO_WQE_FLAG_STALLED = 1, 50726 }; 50727 50728 struct io_wqe; 50729 50730 struct io_worker { 50731 refcount_t ref; 50732 unsigned int flags; 50733 struct hlist_nulls_node nulls_node; 50734 struct list_head all_list; 50735 struct task_struct *task; 50736 struct io_wqe *wqe; 50737 struct io_wq_work *cur_work; 50738 spinlock_t lock; 50739 struct callback_head rcu; 50740 struct mm_struct *mm; 50741 struct cgroup_subsys_state *blkcg_css; 50742 const struct cred *cur_creds; 50743 const struct cred *saved_creds; 50744 struct files_struct *restore_files; 50745 struct nsproxy *restore_nsproxy; 50746 struct fs_struct *restore_fs; 50747 }; 50748 50749 struct io_wqe_acct { 50750 unsigned int nr_workers; 50751 unsigned int max_workers; 50752 atomic_t nr_running; 50753 }; 50754 50755 struct io_wq___2; 50756 50757 struct io_wqe { 50758 struct { 50759 raw_spinlock_t lock; 50760 struct io_wq_work_list work_list; 50761 long unsigned int hash_map; 50762 unsigned int flags; 50763 long: 32; 50764 long: 64; 50765 long: 64; 50766 long: 64; 50767 }; 50768 int node; 50769 struct io_wqe_acct acct[2]; 50770 struct hlist_nulls_head free_list; 50771 struct list_head all_list; 50772 struct io_wq___2 *wq; 50773 struct io_wq_work *hash_tail[64]; 50774 }; 50775 50776 enum { 50777 IO_WQ_ACCT_BOUND = 0, 50778 IO_WQ_ACCT_UNBOUND = 1, 50779 }; 50780 50781 struct io_wq___2 { 50782 struct io_wqe **wqes; 50783 long unsigned int state; 50784 free_work_fn *free_work; 50785 io_wq_work_fn *do_work; 50786 struct task_struct *manager; 50787 struct user_struct *user; 50788 refcount_t refs; 50789 struct completion done; 50790 struct hlist_node cpuhp_node; 50791 refcount_t use_refs; 50792 }; 50793 50794 struct io_cb_cancel_data { 50795 work_cancel_fn *fn; 50796 void *data; 50797 int nr_running; 50798 int nr_pending; 50799 bool cancel_all; 50800 }; 50801 50802 struct iomap_ops { 50803 int (*iomap_begin)(struct inode *, loff_t, loff_t, unsigned int, struct iomap *, struct iomap *); 50804 int (*iomap_end)(struct inode *, loff_t, loff_t, ssize_t, unsigned int, struct iomap *); 50805 }; 50806 50807 typedef loff_t (*iomap_actor_t)(struct inode *, loff_t, loff_t, void *, struct iomap *, struct iomap *); 50808 50809 struct trace_event_raw_dax_pmd_fault_class { 50810 struct trace_entry ent; 50811 long unsigned int ino; 50812 long unsigned int vm_start; 50813 long unsigned int vm_end; 50814 long unsigned int vm_flags; 50815 long unsigned int address; 50816 long unsigned int pgoff; 50817 long unsigned int max_pgoff; 50818 dev_t dev; 50819 unsigned int flags; 50820 int result; 50821 char __data[0]; 50822 }; 50823 50824 struct trace_event_raw_dax_pmd_load_hole_class { 50825 struct trace_entry ent; 50826 long unsigned int ino; 50827 long unsigned int vm_flags; 50828 long unsigned int address; 50829 struct page *zero_page; 50830 void *radix_entry; 50831 dev_t dev; 50832 char __data[0]; 50833 }; 50834 50835 struct trace_event_raw_dax_pmd_insert_mapping_class { 50836 struct trace_entry ent; 50837 long unsigned int ino; 50838 long unsigned int vm_flags; 50839 long unsigned int address; 50840 long int length; 50841 u64 pfn_val; 50842 void *radix_entry; 50843 dev_t dev; 50844 int write; 50845 char __data[0]; 50846 }; 50847 50848 struct trace_event_raw_dax_pte_fault_class { 50849 struct trace_entry ent; 50850 long unsigned int ino; 50851 long unsigned int vm_flags; 50852 long unsigned int address; 50853 long unsigned int pgoff; 50854 dev_t dev; 50855 unsigned int flags; 50856 int result; 50857 char __data[0]; 50858 }; 50859 50860 struct trace_event_raw_dax_insert_mapping { 50861 struct trace_entry ent; 50862 long unsigned int ino; 50863 long unsigned int vm_flags; 50864 long unsigned int address; 50865 void *radix_entry; 50866 dev_t dev; 50867 int write; 50868 char __data[0]; 50869 }; 50870 50871 struct trace_event_raw_dax_writeback_range_class { 50872 struct trace_entry ent; 50873 long unsigned int ino; 50874 long unsigned int start_index; 50875 long unsigned int end_index; 50876 dev_t dev; 50877 char __data[0]; 50878 }; 50879 50880 struct trace_event_raw_dax_writeback_one { 50881 struct trace_entry ent; 50882 long unsigned int ino; 50883 long unsigned int pgoff; 50884 long unsigned int pglen; 50885 dev_t dev; 50886 char __data[0]; 50887 }; 50888 50889 struct trace_event_data_offsets_dax_pmd_fault_class {}; 50890 50891 struct trace_event_data_offsets_dax_pmd_load_hole_class {}; 50892 50893 struct trace_event_data_offsets_dax_pmd_insert_mapping_class {}; 50894 50895 struct trace_event_data_offsets_dax_pte_fault_class {}; 50896 50897 struct trace_event_data_offsets_dax_insert_mapping {}; 50898 50899 struct trace_event_data_offsets_dax_writeback_range_class {}; 50900 50901 struct trace_event_data_offsets_dax_writeback_one {}; 50902 50903 typedef void (*btf_trace_dax_pmd_fault)(void *, struct inode *, struct vm_fault *, long unsigned int, int); 50904 50905 typedef void (*btf_trace_dax_pmd_fault_done)(void *, struct inode *, struct vm_fault *, long unsigned int, int); 50906 50907 typedef void (*btf_trace_dax_pmd_load_hole)(void *, struct inode *, struct vm_fault *, struct page *, void *); 50908 50909 typedef void (*btf_trace_dax_pmd_load_hole_fallback)(void *, struct inode *, struct vm_fault *, struct page *, void *); 50910 50911 typedef void (*btf_trace_dax_pmd_insert_mapping)(void *, struct inode *, struct vm_fault *, long int, pfn_t, void *); 50912 50913 typedef void (*btf_trace_dax_pte_fault)(void *, struct inode *, struct vm_fault *, int); 50914 50915 typedef void (*btf_trace_dax_pte_fault_done)(void *, struct inode *, struct vm_fault *, int); 50916 50917 typedef void (*btf_trace_dax_load_hole)(void *, struct inode *, struct vm_fault *, int); 50918 50919 typedef void (*btf_trace_dax_insert_pfn_mkwrite_no_entry)(void *, struct inode *, struct vm_fault *, int); 50920 50921 typedef void (*btf_trace_dax_insert_pfn_mkwrite)(void *, struct inode *, struct vm_fault *, int); 50922 50923 typedef void (*btf_trace_dax_insert_mapping)(void *, struct inode *, struct vm_fault *, void *); 50924 50925 typedef void (*btf_trace_dax_writeback_range)(void *, struct inode *, long unsigned int, long unsigned int); 50926 50927 typedef void (*btf_trace_dax_writeback_range_done)(void *, struct inode *, long unsigned int, long unsigned int); 50928 50929 typedef void (*btf_trace_dax_writeback_one)(void *, struct inode *, long unsigned int, long unsigned int); 50930 50931 struct exceptional_entry_key { 50932 struct xarray *xa; 50933 long unsigned int entry_start; 50934 }; 50935 50936 struct wait_exceptional_entry_queue { 50937 wait_queue_entry_t wait; 50938 struct exceptional_entry_key key; 50939 }; 50940 50941 struct fscrypt_blk_crypto_key; 50942 50943 struct fscrypt_prepared_key { 50944 struct crypto_skcipher *tfm; 50945 struct fscrypt_blk_crypto_key *blk_key; 50946 }; 50947 50948 struct fscrypt_mode; 50949 50950 struct fscrypt_direct_key; 50951 50952 struct fscrypt_info { 50953 struct fscrypt_prepared_key ci_enc_key; 50954 bool ci_owns_key; 50955 bool ci_inlinecrypt; 50956 struct fscrypt_mode *ci_mode; 50957 struct inode *ci_inode; 50958 struct key *ci_master_key; 50959 struct list_head ci_master_key_link; 50960 struct fscrypt_direct_key *ci_direct_key; 50961 siphash_key_t ci_dirhash_key; 50962 bool ci_dirhash_key_initialized; 50963 union fscrypt_policy ci_policy; 50964 u8 ci_nonce[16]; 50965 u32 ci_hashed_ino; 50966 }; 50967 50968 struct fscrypt_mode { 50969 const char *friendly_name; 50970 const char *cipher_str; 50971 int keysize; 50972 int ivsize; 50973 int logged_impl_name; 50974 enum blk_crypto_mode_num blk_crypto_mode; 50975 }; 50976 50977 typedef enum { 50978 FS_DECRYPT = 0, 50979 FS_ENCRYPT = 1, 50980 } fscrypt_direction_t; 50981 50982 union fscrypt_iv { 50983 struct { 50984 __le64 lblk_num; 50985 u8 nonce[16]; 50986 }; 50987 u8 raw[32]; 50988 __le64 dun[4]; 50989 }; 50990 50991 struct fscrypt_str { 50992 unsigned char *name; 50993 u32 len; 50994 }; 50995 50996 struct fscrypt_name { 50997 const struct qstr *usr_fname; 50998 struct fscrypt_str disk_name; 50999 u32 hash; 51000 u32 minor_hash; 51001 struct fscrypt_str crypto_buf; 51002 bool is_nokey_name; 51003 }; 51004 51005 struct fscrypt_nokey_name { 51006 u32 dirhash[2]; 51007 u8 bytes[149]; 51008 u8 sha256[32]; 51009 }; 51010 51011 struct fscrypt_hkdf { 51012 struct crypto_shash *hmac_tfm; 51013 }; 51014 51015 struct fscrypt_key_specifier { 51016 __u32 type; 51017 __u32 __reserved; 51018 union { 51019 __u8 __reserved[32]; 51020 __u8 descriptor[8]; 51021 __u8 identifier[16]; 51022 } u; 51023 }; 51024 51025 struct fscrypt_symlink_data { 51026 __le16 len; 51027 char encrypted_path[1]; 51028 } __attribute__((packed)); 51029 51030 struct fscrypt_master_key_secret { 51031 struct fscrypt_hkdf hkdf; 51032 u32 size; 51033 u8 raw[64]; 51034 }; 51035 51036 struct fscrypt_master_key { 51037 struct fscrypt_master_key_secret mk_secret; 51038 struct fscrypt_key_specifier mk_spec; 51039 struct key *mk_users; 51040 refcount_t mk_refcount; 51041 struct list_head mk_decrypted_inodes; 51042 spinlock_t mk_decrypted_inodes_lock; 51043 struct fscrypt_prepared_key mk_direct_keys[10]; 51044 struct fscrypt_prepared_key mk_iv_ino_lblk_64_keys[10]; 51045 struct fscrypt_prepared_key mk_iv_ino_lblk_32_keys[10]; 51046 siphash_key_t mk_ino_hash_key; 51047 bool mk_ino_hash_key_initialized; 51048 }; 51049 51050 enum key_state { 51051 KEY_IS_UNINSTANTIATED = 0, 51052 KEY_IS_POSITIVE = 1, 51053 }; 51054 51055 struct fscrypt_provisioning_key_payload { 51056 __u32 type; 51057 __u32 __reserved; 51058 __u8 raw[0]; 51059 }; 51060 51061 struct fscrypt_add_key_arg { 51062 struct fscrypt_key_specifier key_spec; 51063 __u32 raw_size; 51064 __u32 key_id; 51065 __u32 __reserved[8]; 51066 __u8 raw[0]; 51067 }; 51068 51069 struct fscrypt_remove_key_arg { 51070 struct fscrypt_key_specifier key_spec; 51071 __u32 removal_status_flags; 51072 __u32 __reserved[5]; 51073 }; 51074 51075 struct fscrypt_get_key_status_arg { 51076 struct fscrypt_key_specifier key_spec; 51077 __u32 __reserved[6]; 51078 __u32 status; 51079 __u32 status_flags; 51080 __u32 user_count; 51081 __u32 __out_reserved[13]; 51082 }; 51083 51084 struct fscrypt_context_v1 { 51085 u8 version; 51086 u8 contents_encryption_mode; 51087 u8 filenames_encryption_mode; 51088 u8 flags; 51089 u8 master_key_descriptor[8]; 51090 u8 nonce[16]; 51091 }; 51092 51093 struct fscrypt_context_v2 { 51094 u8 version; 51095 u8 contents_encryption_mode; 51096 u8 filenames_encryption_mode; 51097 u8 flags; 51098 u8 __reserved[4]; 51099 u8 master_key_identifier[16]; 51100 u8 nonce[16]; 51101 }; 51102 51103 union fscrypt_context { 51104 u8 version; 51105 struct fscrypt_context_v1 v1; 51106 struct fscrypt_context_v2 v2; 51107 }; 51108 51109 struct user_key_payload { 51110 struct callback_head rcu; 51111 short unsigned int datalen; 51112 long: 48; 51113 char data[0]; 51114 }; 51115 51116 struct fscrypt_key { 51117 __u32 mode; 51118 __u8 raw[64]; 51119 __u32 size; 51120 }; 51121 51122 struct fscrypt_direct_key { 51123 struct hlist_node dk_node; 51124 refcount_t dk_refcount; 51125 const struct fscrypt_mode *dk_mode; 51126 struct fscrypt_prepared_key dk_key; 51127 u8 dk_descriptor[8]; 51128 u8 dk_raw[64]; 51129 }; 51130 51131 struct fscrypt_get_policy_ex_arg { 51132 __u64 policy_size; 51133 union { 51134 __u8 version; 51135 struct fscrypt_policy_v1 v1; 51136 struct fscrypt_policy_v2 v2; 51137 } policy; 51138 }; 51139 51140 struct fscrypt_dummy_policy { 51141 const union fscrypt_policy *policy; 51142 }; 51143 51144 struct fscrypt_blk_crypto_key { 51145 struct blk_crypto_key base; 51146 int num_devs; 51147 struct request_queue *devs[0]; 51148 }; 51149 51150 struct fsverity_hash_alg; 51151 51152 struct merkle_tree_params { 51153 struct fsverity_hash_alg *hash_alg; 51154 const u8 *hashstate; 51155 unsigned int digest_size; 51156 unsigned int block_size; 51157 unsigned int hashes_per_block; 51158 unsigned int log_blocksize; 51159 unsigned int log_arity; 51160 unsigned int num_levels; 51161 u64 tree_size; 51162 long unsigned int level0_blocks; 51163 u64 level_start[8]; 51164 }; 51165 51166 struct fsverity_info { 51167 struct merkle_tree_params tree_params; 51168 u8 root_hash[64]; 51169 u8 file_digest[64]; 51170 const struct inode *inode; 51171 }; 51172 51173 struct fsverity_enable_arg { 51174 __u32 version; 51175 __u32 hash_algorithm; 51176 __u32 block_size; 51177 __u32 salt_size; 51178 __u64 salt_ptr; 51179 __u32 sig_size; 51180 __u32 __reserved1; 51181 __u64 sig_ptr; 51182 __u64 __reserved2[11]; 51183 }; 51184 51185 struct fsverity_descriptor { 51186 __u8 version; 51187 __u8 hash_algorithm; 51188 __u8 log_blocksize; 51189 __u8 salt_size; 51190 __le32 sig_size; 51191 __le64 data_size; 51192 __u8 root_hash[64]; 51193 __u8 salt[32]; 51194 __u8 __reserved[144]; 51195 __u8 signature[0]; 51196 }; 51197 51198 struct crypto_ahash; 51199 51200 struct fsverity_hash_alg { 51201 struct crypto_ahash *tfm; 51202 const char *name; 51203 unsigned int digest_size; 51204 unsigned int block_size; 51205 mempool_t req_pool; 51206 }; 51207 51208 struct ahash_request; 51209 51210 struct crypto_ahash { 51211 int (*init)(struct ahash_request *); 51212 int (*update)(struct ahash_request *); 51213 int (*final)(struct ahash_request *); 51214 int (*finup)(struct ahash_request *); 51215 int (*digest)(struct ahash_request *); 51216 int (*export)(struct ahash_request *, void *); 51217 int (*import)(struct ahash_request *, const void *); 51218 int (*setkey)(struct crypto_ahash *, const u8 *, unsigned int); 51219 unsigned int reqsize; 51220 struct crypto_tfm base; 51221 }; 51222 51223 struct ahash_request { 51224 struct crypto_async_request base; 51225 unsigned int nbytes; 51226 struct scatterlist *src; 51227 u8 *result; 51228 void *priv; 51229 void *__ctx[0]; 51230 }; 51231 51232 struct hash_alg_common { 51233 unsigned int digestsize; 51234 unsigned int statesize; 51235 struct crypto_alg base; 51236 }; 51237 51238 struct fsverity_digest { 51239 __u16 digest_algorithm; 51240 __u16 digest_size; 51241 __u8 digest[0]; 51242 }; 51243 51244 struct flock64 { 51245 short int l_type; 51246 short int l_whence; 51247 __kernel_loff_t l_start; 51248 __kernel_loff_t l_len; 51249 __kernel_pid_t l_pid; 51250 }; 51251 51252 struct trace_event_raw_locks_get_lock_context { 51253 struct trace_entry ent; 51254 long unsigned int i_ino; 51255 dev_t s_dev; 51256 unsigned char type; 51257 struct file_lock_context *ctx; 51258 char __data[0]; 51259 }; 51260 51261 struct trace_event_raw_filelock_lock { 51262 struct trace_entry ent; 51263 struct file_lock *fl; 51264 long unsigned int i_ino; 51265 dev_t s_dev; 51266 struct file_lock *fl_blocker; 51267 fl_owner_t fl_owner; 51268 unsigned int fl_pid; 51269 unsigned int fl_flags; 51270 unsigned char fl_type; 51271 loff_t fl_start; 51272 loff_t fl_end; 51273 int ret; 51274 char __data[0]; 51275 }; 51276 51277 struct trace_event_raw_filelock_lease { 51278 struct trace_entry ent; 51279 struct file_lock *fl; 51280 long unsigned int i_ino; 51281 dev_t s_dev; 51282 struct file_lock *fl_blocker; 51283 fl_owner_t fl_owner; 51284 unsigned int fl_flags; 51285 unsigned char fl_type; 51286 long unsigned int fl_break_time; 51287 long unsigned int fl_downgrade_time; 51288 char __data[0]; 51289 }; 51290 51291 struct trace_event_raw_generic_add_lease { 51292 struct trace_entry ent; 51293 long unsigned int i_ino; 51294 int wcount; 51295 int rcount; 51296 int icount; 51297 dev_t s_dev; 51298 fl_owner_t fl_owner; 51299 unsigned int fl_flags; 51300 unsigned char fl_type; 51301 char __data[0]; 51302 }; 51303 51304 struct trace_event_raw_leases_conflict { 51305 struct trace_entry ent; 51306 void *lease; 51307 void *breaker; 51308 unsigned int l_fl_flags; 51309 unsigned int b_fl_flags; 51310 unsigned char l_fl_type; 51311 unsigned char b_fl_type; 51312 bool conflict; 51313 char __data[0]; 51314 }; 51315 51316 struct trace_event_data_offsets_locks_get_lock_context {}; 51317 51318 struct trace_event_data_offsets_filelock_lock {}; 51319 51320 struct trace_event_data_offsets_filelock_lease {}; 51321 51322 struct trace_event_data_offsets_generic_add_lease {}; 51323 51324 struct trace_event_data_offsets_leases_conflict {}; 51325 51326 typedef void (*btf_trace_locks_get_lock_context)(void *, struct inode *, int, struct file_lock_context *); 51327 51328 typedef void (*btf_trace_posix_lock_inode)(void *, struct inode *, struct file_lock *, int); 51329 51330 typedef void (*btf_trace_fcntl_setlk)(void *, struct inode *, struct file_lock *, int); 51331 51332 typedef void (*btf_trace_locks_remove_posix)(void *, struct inode *, struct file_lock *, int); 51333 51334 typedef void (*btf_trace_flock_lock_inode)(void *, struct inode *, struct file_lock *, int); 51335 51336 typedef void (*btf_trace_break_lease_noblock)(void *, struct inode *, struct file_lock *); 51337 51338 typedef void (*btf_trace_break_lease_block)(void *, struct inode *, struct file_lock *); 51339 51340 typedef void (*btf_trace_break_lease_unblock)(void *, struct inode *, struct file_lock *); 51341 51342 typedef void (*btf_trace_generic_delete_lease)(void *, struct inode *, struct file_lock *); 51343 51344 typedef void (*btf_trace_time_out_leases)(void *, struct inode *, struct file_lock *); 51345 51346 typedef void (*btf_trace_generic_add_lease)(void *, struct inode *, struct file_lock *); 51347 51348 typedef void (*btf_trace_leases_conflict)(void *, bool, struct file_lock *, struct file_lock *); 51349 51350 struct file_lock_list_struct { 51351 spinlock_t lock; 51352 struct hlist_head hlist; 51353 }; 51354 51355 struct locks_iterator { 51356 int li_cpu; 51357 loff_t li_pos; 51358 }; 51359 51360 typedef unsigned int __kernel_uid_t; 51361 51362 typedef unsigned int __kernel_gid_t; 51363 51364 struct elf_prpsinfo { 51365 char pr_state; 51366 char pr_sname; 51367 char pr_zomb; 51368 char pr_nice; 51369 long unsigned int pr_flag; 51370 __kernel_uid_t pr_uid; 51371 __kernel_gid_t pr_gid; 51372 pid_t pr_pid; 51373 pid_t pr_ppid; 51374 pid_t pr_pgrp; 51375 pid_t pr_sid; 51376 char pr_fname[16]; 51377 char pr_psargs[80]; 51378 }; 51379 51380 struct core_vma_metadata { 51381 long unsigned int start; 51382 long unsigned int end; 51383 long unsigned int flags; 51384 long unsigned int dump_size; 51385 }; 51386 51387 struct arch_elf_state {}; 51388 51389 struct memelfnote { 51390 const char *name; 51391 int type; 51392 unsigned int datasz; 51393 void *data; 51394 }; 51395 51396 struct elf_thread_core_info { 51397 struct elf_thread_core_info *next; 51398 struct task_struct *task; 51399 struct elf_prstatus prstatus; 51400 struct memelfnote notes[0]; 51401 }; 51402 51403 struct elf_note_info { 51404 struct elf_thread_core_info *thread; 51405 struct memelfnote psinfo; 51406 struct memelfnote signote; 51407 struct memelfnote auxv; 51408 struct memelfnote files; 51409 siginfo_t csigdata; 51410 size_t size; 51411 int thread_notes; 51412 }; 51413 51414 struct user_regs_struct { 51415 long unsigned int r15; 51416 long unsigned int r14; 51417 long unsigned int r13; 51418 long unsigned int r12; 51419 long unsigned int bp; 51420 long unsigned int bx; 51421 long unsigned int r11; 51422 long unsigned int r10; 51423 long unsigned int r9; 51424 long unsigned int r8; 51425 long unsigned int ax; 51426 long unsigned int cx; 51427 long unsigned int dx; 51428 long unsigned int si; 51429 long unsigned int di; 51430 long unsigned int orig_ax; 51431 long unsigned int ip; 51432 long unsigned int cs; 51433 long unsigned int flags; 51434 long unsigned int sp; 51435 long unsigned int ss; 51436 long unsigned int fs_base; 51437 long unsigned int gs_base; 51438 long unsigned int ds; 51439 long unsigned int es; 51440 long unsigned int fs; 51441 long unsigned int gs; 51442 }; 51443 51444 struct elf32_shdr { 51445 Elf32_Word sh_name; 51446 Elf32_Word sh_type; 51447 Elf32_Word sh_flags; 51448 Elf32_Addr sh_addr; 51449 Elf32_Off sh_offset; 51450 Elf32_Word sh_size; 51451 Elf32_Word sh_link; 51452 Elf32_Word sh_info; 51453 Elf32_Word sh_addralign; 51454 Elf32_Word sh_entsize; 51455 }; 51456 51457 typedef struct user_regs_struct compat_elf_gregset_t; 51458 51459 struct compat_elf_siginfo { 51460 compat_int_t si_signo; 51461 compat_int_t si_code; 51462 compat_int_t si_errno; 51463 }; 51464 51465 struct compat_elf_prstatus { 51466 struct compat_elf_siginfo pr_info; 51467 short int pr_cursig; 51468 compat_ulong_t pr_sigpend; 51469 compat_ulong_t pr_sighold; 51470 compat_pid_t pr_pid; 51471 compat_pid_t pr_ppid; 51472 compat_pid_t pr_pgrp; 51473 compat_pid_t pr_sid; 51474 struct old_timeval32 pr_utime; 51475 struct old_timeval32 pr_stime; 51476 struct old_timeval32 pr_cutime; 51477 struct old_timeval32 pr_cstime; 51478 compat_elf_gregset_t pr_reg; 51479 compat_int_t pr_fpvalid; 51480 }; 51481 51482 struct compat_elf_prpsinfo { 51483 char pr_state; 51484 char pr_sname; 51485 char pr_zomb; 51486 char pr_nice; 51487 compat_ulong_t pr_flag; 51488 __compat_uid_t pr_uid; 51489 __compat_gid_t pr_gid; 51490 compat_pid_t pr_pid; 51491 compat_pid_t pr_ppid; 51492 compat_pid_t pr_pgrp; 51493 compat_pid_t pr_sid; 51494 char pr_fname[16]; 51495 char pr_psargs[80]; 51496 }; 51497 51498 struct elf_thread_core_info___2 { 51499 struct elf_thread_core_info___2 *next; 51500 struct task_struct *task; 51501 struct compat_elf_prstatus prstatus; 51502 struct memelfnote notes[0]; 51503 }; 51504 51505 struct elf_note_info___2 { 51506 struct elf_thread_core_info___2 *thread; 51507 struct memelfnote psinfo; 51508 struct memelfnote signote; 51509 struct memelfnote auxv; 51510 struct memelfnote files; 51511 compat_siginfo_t csigdata; 51512 size_t size; 51513 int thread_notes; 51514 }; 51515 51516 struct mb_cache_entry { 51517 struct list_head e_list; 51518 struct hlist_bl_node e_hash_list; 51519 atomic_t e_refcnt; 51520 u32 e_key; 51521 u32 e_referenced: 1; 51522 u32 e_reusable: 1; 51523 u64 e_value; 51524 }; 51525 51526 struct mb_cache { 51527 struct hlist_bl_head *c_hash; 51528 int c_bucket_bits; 51529 long unsigned int c_max_entries; 51530 spinlock_t c_list_lock; 51531 struct list_head c_list; 51532 long unsigned int c_entry_count; 51533 struct shrinker c_shrink; 51534 struct work_struct c_shrink_work; 51535 }; 51536 51537 struct posix_acl_xattr_entry { 51538 __le16 e_tag; 51539 __le16 e_perm; 51540 __le32 e_id; 51541 }; 51542 51543 struct posix_acl_xattr_header { 51544 __le32 a_version; 51545 }; 51546 51547 struct core_name { 51548 char *corename; 51549 int used; 51550 int size; 51551 }; 51552 51553 struct trace_event_raw_iomap_readpage_class { 51554 struct trace_entry ent; 51555 dev_t dev; 51556 u64 ino; 51557 int nr_pages; 51558 char __data[0]; 51559 }; 51560 51561 struct trace_event_raw_iomap_range_class { 51562 struct trace_entry ent; 51563 dev_t dev; 51564 u64 ino; 51565 loff_t size; 51566 long unsigned int offset; 51567 unsigned int length; 51568 char __data[0]; 51569 }; 51570 51571 struct trace_event_raw_iomap_class { 51572 struct trace_entry ent; 51573 dev_t dev; 51574 u64 ino; 51575 u64 addr; 51576 loff_t offset; 51577 u64 length; 51578 u16 type; 51579 u16 flags; 51580 dev_t bdev; 51581 char __data[0]; 51582 }; 51583 51584 struct trace_event_raw_iomap_apply { 51585 struct trace_entry ent; 51586 dev_t dev; 51587 u64 ino; 51588 loff_t pos; 51589 loff_t length; 51590 unsigned int flags; 51591 const void *ops; 51592 void *actor; 51593 long unsigned int caller; 51594 char __data[0]; 51595 }; 51596 51597 struct trace_event_data_offsets_iomap_readpage_class {}; 51598 51599 struct trace_event_data_offsets_iomap_range_class {}; 51600 51601 struct trace_event_data_offsets_iomap_class {}; 51602 51603 struct trace_event_data_offsets_iomap_apply {}; 51604 51605 typedef void (*btf_trace_iomap_readpage)(void *, struct inode *, int); 51606 51607 typedef void (*btf_trace_iomap_readahead)(void *, struct inode *, int); 51608 51609 typedef void (*btf_trace_iomap_writepage)(void *, struct inode *, long unsigned int, unsigned int); 51610 51611 typedef void (*btf_trace_iomap_releasepage)(void *, struct inode *, long unsigned int, unsigned int); 51612 51613 typedef void (*btf_trace_iomap_invalidatepage)(void *, struct inode *, long unsigned int, unsigned int); 51614 51615 typedef void (*btf_trace_iomap_dio_invalidate_fail)(void *, struct inode *, long unsigned int, unsigned int); 51616 51617 typedef void (*btf_trace_iomap_apply_dstmap)(void *, struct inode *, struct iomap *); 51618 51619 typedef void (*btf_trace_iomap_apply_srcmap)(void *, struct inode *, struct iomap *); 51620 51621 typedef void (*btf_trace_iomap_apply)(void *, struct inode *, loff_t, loff_t, unsigned int, const void *, void *, long unsigned int); 51622 51623 struct iomap_ioend { 51624 struct list_head io_list; 51625 u16 io_type; 51626 u16 io_flags; 51627 struct inode *io_inode; 51628 size_t io_size; 51629 loff_t io_offset; 51630 void *io_private; 51631 struct bio *io_bio; 51632 struct bio io_inline_bio; 51633 }; 51634 51635 struct iomap_writepage_ctx; 51636 51637 struct iomap_writeback_ops { 51638 int (*map_blocks)(struct iomap_writepage_ctx *, struct inode *, loff_t); 51639 int (*prepare_ioend)(struct iomap_ioend *, int); 51640 void (*discard_page)(struct page *, loff_t); 51641 }; 51642 51643 struct iomap_writepage_ctx { 51644 struct iomap iomap; 51645 struct iomap_ioend *ioend; 51646 const struct iomap_writeback_ops *ops; 51647 }; 51648 51649 struct iomap_page { 51650 atomic_t read_bytes_pending; 51651 atomic_t write_bytes_pending; 51652 spinlock_t uptodate_lock; 51653 long unsigned int uptodate[0]; 51654 }; 51655 51656 struct iomap_readpage_ctx { 51657 struct page *cur_page; 51658 bool cur_page_in_bio; 51659 struct bio *bio; 51660 struct readahead_control *rac; 51661 }; 51662 51663 enum { 51664 IOMAP_WRITE_F_UNSHARE = 1, 51665 }; 51666 51667 struct iomap_dio_ops { 51668 int (*end_io)(struct kiocb *, ssize_t, int, unsigned int); 51669 blk_qc_t (*submit_io)(struct inode *, struct iomap *, struct bio *, loff_t); 51670 }; 51671 51672 struct iomap_dio { 51673 struct kiocb *iocb; 51674 const struct iomap_dio_ops *dops; 51675 loff_t i_size; 51676 loff_t size; 51677 atomic_t ref; 51678 unsigned int flags; 51679 int error; 51680 bool wait_for_completion; 51681 union { 51682 struct { 51683 struct iov_iter *iter; 51684 struct task_struct *waiter; 51685 struct request_queue *last_queue; 51686 blk_qc_t cookie; 51687 } submit; 51688 struct { 51689 struct work_struct work; 51690 } aio; 51691 }; 51692 }; 51693 51694 struct fiemap_ctx { 51695 struct fiemap_extent_info *fi; 51696 struct iomap prev; 51697 }; 51698 51699 struct iomap_swapfile_info { 51700 struct iomap iomap; 51701 struct swap_info_struct *sis; 51702 uint64_t lowest_ppage; 51703 uint64_t highest_ppage; 51704 long unsigned int nr_pages; 51705 int nr_extents; 51706 }; 51707 51708 enum { 51709 QIF_BLIMITS_B = 0, 51710 QIF_SPACE_B = 1, 51711 QIF_ILIMITS_B = 2, 51712 QIF_INODES_B = 3, 51713 QIF_BTIME_B = 4, 51714 QIF_ITIME_B = 5, 51715 }; 51716 51717 typedef __kernel_uid32_t qid_t; 51718 51719 enum { 51720 DQF_INFO_DIRTY_B = 17, 51721 }; 51722 51723 struct dqstats { 51724 long unsigned int stat[8]; 51725 struct percpu_counter counter[8]; 51726 }; 51727 51728 enum { 51729 _DQUOT_USAGE_ENABLED = 0, 51730 _DQUOT_LIMITS_ENABLED = 1, 51731 _DQUOT_SUSPENDED = 2, 51732 _DQUOT_STATE_FLAGS = 3, 51733 }; 51734 51735 struct quota_module_name { 51736 int qm_fmt_id; 51737 char *qm_mod_name; 51738 }; 51739 51740 struct dquot_warn { 51741 struct super_block *w_sb; 51742 struct kqid w_dq_id; 51743 short int w_type; 51744 }; 51745 51746 struct qtree_fmt_operations { 51747 void (*mem2disk_dqblk)(void *, struct dquot *); 51748 void (*disk2mem_dqblk)(struct dquot *, void *); 51749 int (*is_id)(void *, struct dquot *); 51750 }; 51751 51752 struct qtree_mem_dqinfo { 51753 struct super_block *dqi_sb; 51754 int dqi_type; 51755 unsigned int dqi_blocks; 51756 unsigned int dqi_free_blk; 51757 unsigned int dqi_free_entry; 51758 unsigned int dqi_blocksize_bits; 51759 unsigned int dqi_entry_size; 51760 unsigned int dqi_usable_bs; 51761 unsigned int dqi_qtree_depth; 51762 const struct qtree_fmt_operations *dqi_ops; 51763 }; 51764 51765 struct v2_disk_dqheader { 51766 __le32 dqh_magic; 51767 __le32 dqh_version; 51768 }; 51769 51770 struct v2r0_disk_dqblk { 51771 __le32 dqb_id; 51772 __le32 dqb_ihardlimit; 51773 __le32 dqb_isoftlimit; 51774 __le32 dqb_curinodes; 51775 __le32 dqb_bhardlimit; 51776 __le32 dqb_bsoftlimit; 51777 __le64 dqb_curspace; 51778 __le64 dqb_btime; 51779 __le64 dqb_itime; 51780 }; 51781 51782 struct v2r1_disk_dqblk { 51783 __le32 dqb_id; 51784 __le32 dqb_pad; 51785 __le64 dqb_ihardlimit; 51786 __le64 dqb_isoftlimit; 51787 __le64 dqb_curinodes; 51788 __le64 dqb_bhardlimit; 51789 __le64 dqb_bsoftlimit; 51790 __le64 dqb_curspace; 51791 __le64 dqb_btime; 51792 __le64 dqb_itime; 51793 }; 51794 51795 struct v2_disk_dqinfo { 51796 __le32 dqi_bgrace; 51797 __le32 dqi_igrace; 51798 __le32 dqi_flags; 51799 __le32 dqi_blocks; 51800 __le32 dqi_free_blk; 51801 __le32 dqi_free_entry; 51802 }; 51803 51804 struct qt_disk_dqdbheader { 51805 __le32 dqdh_next_free; 51806 __le32 dqdh_prev_free; 51807 __le16 dqdh_entries; 51808 __le16 dqdh_pad1; 51809 __le32 dqdh_pad2; 51810 }; 51811 51812 struct fs_disk_quota { 51813 __s8 d_version; 51814 __s8 d_flags; 51815 __u16 d_fieldmask; 51816 __u32 d_id; 51817 __u64 d_blk_hardlimit; 51818 __u64 d_blk_softlimit; 51819 __u64 d_ino_hardlimit; 51820 __u64 d_ino_softlimit; 51821 __u64 d_bcount; 51822 __u64 d_icount; 51823 __s32 d_itimer; 51824 __s32 d_btimer; 51825 __u16 d_iwarns; 51826 __u16 d_bwarns; 51827 __s8 d_itimer_hi; 51828 __s8 d_btimer_hi; 51829 __s8 d_rtbtimer_hi; 51830 __s8 d_padding2; 51831 __u64 d_rtb_hardlimit; 51832 __u64 d_rtb_softlimit; 51833 __u64 d_rtbcount; 51834 __s32 d_rtbtimer; 51835 __u16 d_rtbwarns; 51836 __s16 d_padding3; 51837 char d_padding4[8]; 51838 }; 51839 51840 struct fs_qfilestat { 51841 __u64 qfs_ino; 51842 __u64 qfs_nblks; 51843 __u32 qfs_nextents; 51844 }; 51845 51846 typedef struct fs_qfilestat fs_qfilestat_t; 51847 51848 struct fs_quota_stat { 51849 __s8 qs_version; 51850 __u16 qs_flags; 51851 __s8 qs_pad; 51852 fs_qfilestat_t qs_uquota; 51853 fs_qfilestat_t qs_gquota; 51854 __u32 qs_incoredqs; 51855 __s32 qs_btimelimit; 51856 __s32 qs_itimelimit; 51857 __s32 qs_rtbtimelimit; 51858 __u16 qs_bwarnlimit; 51859 __u16 qs_iwarnlimit; 51860 }; 51861 51862 struct fs_qfilestatv { 51863 __u64 qfs_ino; 51864 __u64 qfs_nblks; 51865 __u32 qfs_nextents; 51866 __u32 qfs_pad; 51867 }; 51868 51869 struct fs_quota_statv { 51870 __s8 qs_version; 51871 __u8 qs_pad1; 51872 __u16 qs_flags; 51873 __u32 qs_incoredqs; 51874 struct fs_qfilestatv qs_uquota; 51875 struct fs_qfilestatv qs_gquota; 51876 struct fs_qfilestatv qs_pquota; 51877 __s32 qs_btimelimit; 51878 __s32 qs_itimelimit; 51879 __s32 qs_rtbtimelimit; 51880 __u16 qs_bwarnlimit; 51881 __u16 qs_iwarnlimit; 51882 __u64 qs_pad2[8]; 51883 }; 51884 51885 struct if_dqblk { 51886 __u64 dqb_bhardlimit; 51887 __u64 dqb_bsoftlimit; 51888 __u64 dqb_curspace; 51889 __u64 dqb_ihardlimit; 51890 __u64 dqb_isoftlimit; 51891 __u64 dqb_curinodes; 51892 __u64 dqb_btime; 51893 __u64 dqb_itime; 51894 __u32 dqb_valid; 51895 }; 51896 51897 struct if_nextdqblk { 51898 __u64 dqb_bhardlimit; 51899 __u64 dqb_bsoftlimit; 51900 __u64 dqb_curspace; 51901 __u64 dqb_ihardlimit; 51902 __u64 dqb_isoftlimit; 51903 __u64 dqb_curinodes; 51904 __u64 dqb_btime; 51905 __u64 dqb_itime; 51906 __u32 dqb_valid; 51907 __u32 dqb_id; 51908 }; 51909 51910 struct if_dqinfo { 51911 __u64 dqi_bgrace; 51912 __u64 dqi_igrace; 51913 __u32 dqi_flags; 51914 __u32 dqi_valid; 51915 }; 51916 51917 struct compat_if_dqblk { 51918 compat_u64 dqb_bhardlimit; 51919 compat_u64 dqb_bsoftlimit; 51920 compat_u64 dqb_curspace; 51921 compat_u64 dqb_ihardlimit; 51922 compat_u64 dqb_isoftlimit; 51923 compat_u64 dqb_curinodes; 51924 compat_u64 dqb_btime; 51925 compat_u64 dqb_itime; 51926 compat_uint_t dqb_valid; 51927 } __attribute__((packed)); 51928 51929 struct compat_fs_qfilestat { 51930 compat_u64 dqb_bhardlimit; 51931 compat_u64 qfs_nblks; 51932 compat_uint_t qfs_nextents; 51933 } __attribute__((packed)); 51934 51935 struct compat_fs_quota_stat { 51936 __s8 qs_version; 51937 char: 8; 51938 __u16 qs_flags; 51939 __s8 qs_pad; 51940 int: 24; 51941 struct compat_fs_qfilestat qs_uquota; 51942 struct compat_fs_qfilestat qs_gquota; 51943 compat_uint_t qs_incoredqs; 51944 compat_int_t qs_btimelimit; 51945 compat_int_t qs_itimelimit; 51946 compat_int_t qs_rtbtimelimit; 51947 __u16 qs_bwarnlimit; 51948 __u16 qs_iwarnlimit; 51949 } __attribute__((packed)); 51950 51951 enum { 51952 QUOTA_NL_C_UNSPEC = 0, 51953 QUOTA_NL_C_WARNING = 1, 51954 __QUOTA_NL_C_MAX = 2, 51955 }; 51956 51957 enum { 51958 QUOTA_NL_A_UNSPEC = 0, 51959 QUOTA_NL_A_QTYPE = 1, 51960 QUOTA_NL_A_EXCESS_ID = 2, 51961 QUOTA_NL_A_WARNING = 3, 51962 QUOTA_NL_A_DEV_MAJOR = 4, 51963 QUOTA_NL_A_DEV_MINOR = 5, 51964 QUOTA_NL_A_CAUSED_ID = 6, 51965 QUOTA_NL_A_PAD = 7, 51966 __QUOTA_NL_A_MAX = 8, 51967 }; 51968 51969 struct proc_maps_private { 51970 struct inode *inode; 51971 struct task_struct *task; 51972 struct mm_struct *mm; 51973 struct vm_area_struct *tail_vma; 51974 struct mempolicy *task_mempolicy; 51975 }; 51976 51977 struct mem_size_stats { 51978 long unsigned int resident; 51979 long unsigned int shared_clean; 51980 long unsigned int shared_dirty; 51981 long unsigned int private_clean; 51982 long unsigned int private_dirty; 51983 long unsigned int referenced; 51984 long unsigned int anonymous; 51985 long unsigned int lazyfree; 51986 long unsigned int anonymous_thp; 51987 long unsigned int shmem_thp; 51988 long unsigned int file_thp; 51989 long unsigned int swap; 51990 long unsigned int shared_hugetlb; 51991 long unsigned int private_hugetlb; 51992 u64 pss; 51993 u64 pss_anon; 51994 u64 pss_file; 51995 u64 pss_shmem; 51996 u64 pss_locked; 51997 u64 swap_pss; 51998 bool check_shmem_swap; 51999 }; 52000 52001 enum clear_refs_types { 52002 CLEAR_REFS_ALL = 1, 52003 CLEAR_REFS_ANON = 2, 52004 CLEAR_REFS_MAPPED = 3, 52005 CLEAR_REFS_SOFT_DIRTY = 4, 52006 CLEAR_REFS_MM_HIWATER_RSS = 5, 52007 CLEAR_REFS_LAST = 6, 52008 }; 52009 52010 struct clear_refs_private { 52011 enum clear_refs_types type; 52012 }; 52013 52014 typedef struct { 52015 u64 pme; 52016 } pagemap_entry_t; 52017 52018 struct pagemapread { 52019 int pos; 52020 int len; 52021 pagemap_entry_t *buffer; 52022 bool show_pfn; 52023 }; 52024 52025 struct numa_maps { 52026 long unsigned int pages; 52027 long unsigned int anon; 52028 long unsigned int active; 52029 long unsigned int writeback; 52030 long unsigned int mapcount_max; 52031 long unsigned int dirty; 52032 long unsigned int swapcache; 52033 long unsigned int node[1024]; 52034 }; 52035 52036 struct numa_maps_private { 52037 struct proc_maps_private proc_maps; 52038 struct numa_maps md; 52039 }; 52040 52041 struct pde_opener { 52042 struct list_head lh; 52043 struct file *file; 52044 bool closing; 52045 struct completion *c; 52046 }; 52047 52048 enum { 52049 BIAS = 2147483648, 52050 }; 52051 52052 struct proc_fs_context { 52053 struct pid_namespace *pid_ns; 52054 unsigned int mask; 52055 enum proc_hidepid hidepid; 52056 int gid; 52057 enum proc_pidonly pidonly; 52058 }; 52059 52060 enum proc_param { 52061 Opt_gid___2 = 0, 52062 Opt_hidepid = 1, 52063 Opt_subset = 2, 52064 }; 52065 52066 struct genradix_root; 52067 52068 struct __genradix { 52069 struct genradix_root *root; 52070 }; 52071 52072 struct syscall_info { 52073 __u64 sp; 52074 struct seccomp_data data; 52075 }; 52076 52077 typedef struct dentry *instantiate_t(struct dentry *, struct task_struct *, const void *); 52078 52079 struct pid_entry { 52080 const char *name; 52081 unsigned int len; 52082 umode_t mode; 52083 const struct inode_operations *iop; 52084 const struct file_operations *fop; 52085 union proc_op op; 52086 }; 52087 52088 struct limit_names { 52089 const char *name; 52090 const char *unit; 52091 }; 52092 52093 struct map_files_info { 52094 long unsigned int start; 52095 long unsigned int end; 52096 fmode_t mode; 52097 }; 52098 52099 struct timers_private { 52100 struct pid *pid; 52101 struct task_struct *task; 52102 struct sighand_struct *sighand; 52103 struct pid_namespace *ns; 52104 long unsigned int flags; 52105 }; 52106 52107 struct tgid_iter { 52108 unsigned int tgid; 52109 struct task_struct *task; 52110 }; 52111 52112 struct fd_data { 52113 fmode_t mode; 52114 unsigned int fd; 52115 }; 52116 52117 struct sysctl_alias { 52118 const char *kernel_param; 52119 const char *sysctl_param; 52120 }; 52121 52122 struct seq_net_private { 52123 struct net *net; 52124 }; 52125 52126 struct bpf_iter_aux_info___2; 52127 52128 struct vmcore { 52129 struct list_head list; 52130 long long unsigned int paddr; 52131 long long unsigned int size; 52132 loff_t offset; 52133 }; 52134 52135 struct vmcoredd_node { 52136 struct list_head list; 52137 void *buf; 52138 unsigned int size; 52139 }; 52140 52141 typedef struct elf64_note Elf64_Nhdr; 52142 52143 struct vmcoredd_header { 52144 __u32 n_namesz; 52145 __u32 n_descsz; 52146 __u32 n_type; 52147 __u8 name[8]; 52148 __u8 dump_name[44]; 52149 }; 52150 52151 struct vmcoredd_data { 52152 char dump_name[44]; 52153 unsigned int size; 52154 int (*vmcoredd_callback)(struct vmcoredd_data *, void *); 52155 }; 52156 52157 struct kernfs_iattrs { 52158 kuid_t ia_uid; 52159 kgid_t ia_gid; 52160 struct timespec64 ia_atime; 52161 struct timespec64 ia_mtime; 52162 struct timespec64 ia_ctime; 52163 struct simple_xattrs xattrs; 52164 atomic_t nr_user_xattrs; 52165 atomic_t user_xattr_size; 52166 }; 52167 52168 struct kernfs_super_info { 52169 struct super_block *sb; 52170 struct kernfs_root *root; 52171 const void *ns; 52172 struct list_head node; 52173 }; 52174 52175 enum kernfs_node_flag { 52176 KERNFS_ACTIVATED = 16, 52177 KERNFS_NS = 32, 52178 KERNFS_HAS_SEQ_SHOW = 64, 52179 KERNFS_HAS_MMAP = 128, 52180 KERNFS_LOCKDEP = 256, 52181 KERNFS_SUICIDAL = 1024, 52182 KERNFS_SUICIDED = 2048, 52183 KERNFS_EMPTY_DIR = 4096, 52184 KERNFS_HAS_RELEASE = 8192, 52185 }; 52186 52187 struct kernfs_open_node { 52188 atomic_t refcnt; 52189 atomic_t event; 52190 wait_queue_head_t poll; 52191 struct list_head files; 52192 }; 52193 52194 struct config_group; 52195 52196 struct config_item_type; 52197 52198 struct config_item { 52199 char *ci_name; 52200 char ci_namebuf[20]; 52201 struct kref ci_kref; 52202 struct list_head ci_entry; 52203 struct config_item *ci_parent; 52204 struct config_group *ci_group; 52205 const struct config_item_type *ci_type; 52206 struct dentry *ci_dentry; 52207 }; 52208 52209 struct configfs_subsystem; 52210 52211 struct config_group { 52212 struct config_item cg_item; 52213 struct list_head cg_children; 52214 struct configfs_subsystem *cg_subsys; 52215 struct list_head default_groups; 52216 struct list_head group_entry; 52217 }; 52218 52219 struct configfs_item_operations; 52220 52221 struct configfs_group_operations; 52222 52223 struct configfs_attribute; 52224 52225 struct configfs_bin_attribute; 52226 52227 struct config_item_type { 52228 struct module *ct_owner; 52229 struct configfs_item_operations *ct_item_ops; 52230 struct configfs_group_operations *ct_group_ops; 52231 struct configfs_attribute **ct_attrs; 52232 struct configfs_bin_attribute **ct_bin_attrs; 52233 }; 52234 52235 struct configfs_item_operations { 52236 void (*release)(struct config_item *); 52237 int (*allow_link)(struct config_item *, struct config_item *); 52238 void (*drop_link)(struct config_item *, struct config_item *); 52239 }; 52240 52241 struct configfs_group_operations { 52242 struct config_item * (*make_item)(struct config_group *, const char *); 52243 struct config_group * (*make_group)(struct config_group *, const char *); 52244 int (*commit_item)(struct config_item *); 52245 void (*disconnect_notify)(struct config_group *, struct config_item *); 52246 void (*drop_item)(struct config_group *, struct config_item *); 52247 }; 52248 52249 struct configfs_attribute { 52250 const char *ca_name; 52251 struct module *ca_owner; 52252 umode_t ca_mode; 52253 ssize_t (*show)(struct config_item *, char *); 52254 ssize_t (*store)(struct config_item *, const char *, size_t); 52255 }; 52256 52257 struct configfs_bin_attribute { 52258 struct configfs_attribute cb_attr; 52259 void *cb_private; 52260 size_t cb_max_size; 52261 ssize_t (*read)(struct config_item *, void *, size_t); 52262 ssize_t (*write)(struct config_item *, const void *, size_t); 52263 }; 52264 52265 struct configfs_subsystem { 52266 struct config_group su_group; 52267 struct mutex su_mutex; 52268 }; 52269 52270 struct configfs_fragment { 52271 atomic_t frag_count; 52272 struct rw_semaphore frag_sem; 52273 bool frag_dead; 52274 }; 52275 52276 struct configfs_dirent { 52277 atomic_t s_count; 52278 int s_dependent_count; 52279 struct list_head s_sibling; 52280 struct list_head s_children; 52281 int s_links; 52282 void *s_element; 52283 int s_type; 52284 umode_t s_mode; 52285 struct dentry *s_dentry; 52286 struct iattr *s_iattr; 52287 struct configfs_fragment *s_frag; 52288 }; 52289 52290 struct configfs_buffer { 52291 size_t count; 52292 loff_t pos; 52293 char *page; 52294 struct configfs_item_operations *ops; 52295 struct mutex mutex; 52296 int needs_read_fill; 52297 bool read_in_progress; 52298 bool write_in_progress; 52299 char *bin_buffer; 52300 int bin_buffer_size; 52301 int cb_max_size; 52302 struct config_item *item; 52303 struct module *owner; 52304 union { 52305 struct configfs_attribute *attr; 52306 struct configfs_bin_attribute *bin_attr; 52307 }; 52308 }; 52309 52310 struct pts_mount_opts { 52311 int setuid; 52312 int setgid; 52313 kuid_t uid; 52314 kgid_t gid; 52315 umode_t mode; 52316 umode_t ptmxmode; 52317 int reserve; 52318 int max; 52319 }; 52320 52321 enum { 52322 Opt_uid___2 = 0, 52323 Opt_gid___3 = 1, 52324 Opt_mode___2 = 2, 52325 Opt_ptmxmode = 3, 52326 Opt_newinstance = 4, 52327 Opt_max = 5, 52328 Opt_err = 6, 52329 }; 52330 52331 struct pts_fs_info { 52332 struct ida allocated_ptys; 52333 struct pts_mount_opts mount_opts; 52334 struct super_block *sb; 52335 struct dentry *ptmx_dentry; 52336 }; 52337 52338 struct dcookie_struct { 52339 struct path path; 52340 struct list_head hash_list; 52341 }; 52342 52343 struct dcookie_user { 52344 struct list_head next; 52345 }; 52346 52347 typedef unsigned int tid_t; 52348 52349 struct transaction_chp_stats_s { 52350 long unsigned int cs_chp_time; 52351 __u32 cs_forced_to_close; 52352 __u32 cs_written; 52353 __u32 cs_dropped; 52354 }; 52355 52356 struct journal_s; 52357 52358 typedef struct journal_s journal_t; 52359 52360 struct journal_head; 52361 52362 struct transaction_s; 52363 52364 typedef struct transaction_s transaction_t; 52365 52366 struct transaction_s { 52367 journal_t *t_journal; 52368 tid_t t_tid; 52369 enum { 52370 T_RUNNING = 0, 52371 T_LOCKED = 1, 52372 T_SWITCH = 2, 52373 T_FLUSH = 3, 52374 T_COMMIT = 4, 52375 T_COMMIT_DFLUSH = 5, 52376 T_COMMIT_JFLUSH = 6, 52377 T_COMMIT_CALLBACK = 7, 52378 T_FINISHED = 8, 52379 } t_state; 52380 long unsigned int t_log_start; 52381 int t_nr_buffers; 52382 struct journal_head *t_reserved_list; 52383 struct journal_head *t_buffers; 52384 struct journal_head *t_forget; 52385 struct journal_head *t_checkpoint_list; 52386 struct journal_head *t_checkpoint_io_list; 52387 struct journal_head *t_shadow_list; 52388 struct list_head t_inode_list; 52389 spinlock_t t_handle_lock; 52390 long unsigned int t_max_wait; 52391 long unsigned int t_start; 52392 long unsigned int t_requested; 52393 struct transaction_chp_stats_s t_chp_stats; 52394 atomic_t t_updates; 52395 atomic_t t_outstanding_credits; 52396 atomic_t t_outstanding_revokes; 52397 atomic_t t_handle_count; 52398 transaction_t *t_cpnext; 52399 transaction_t *t_cpprev; 52400 long unsigned int t_expires; 52401 ktime_t t_start_time; 52402 unsigned int t_synchronous_commit: 1; 52403 int t_need_data_flush; 52404 struct list_head t_private_list; 52405 }; 52406 52407 struct jbd2_buffer_trigger_type; 52408 52409 struct journal_head { 52410 struct buffer_head *b_bh; 52411 spinlock_t b_state_lock; 52412 int b_jcount; 52413 unsigned int b_jlist; 52414 unsigned int b_modified; 52415 char *b_frozen_data; 52416 char *b_committed_data; 52417 transaction_t *b_transaction; 52418 transaction_t *b_next_transaction; 52419 struct journal_head *b_tnext; 52420 struct journal_head *b_tprev; 52421 transaction_t *b_cp_transaction; 52422 struct journal_head *b_cpnext; 52423 struct journal_head *b_cpprev; 52424 struct jbd2_buffer_trigger_type *b_triggers; 52425 struct jbd2_buffer_trigger_type *b_frozen_triggers; 52426 }; 52427 52428 struct jbd2_buffer_trigger_type { 52429 void (*t_frozen)(struct jbd2_buffer_trigger_type *, struct buffer_head *, void *, size_t); 52430 void (*t_abort)(struct jbd2_buffer_trigger_type *, struct buffer_head *); 52431 }; 52432 52433 struct jbd2_journal_handle; 52434 52435 typedef struct jbd2_journal_handle handle_t; 52436 52437 struct jbd2_journal_handle { 52438 union { 52439 transaction_t *h_transaction; 52440 journal_t *h_journal; 52441 }; 52442 handle_t *h_rsv_handle; 52443 int h_total_credits; 52444 int h_revoke_credits; 52445 int h_revoke_credits_requested; 52446 int h_ref; 52447 int h_err; 52448 unsigned int h_sync: 1; 52449 unsigned int h_jdata: 1; 52450 unsigned int h_reserved: 1; 52451 unsigned int h_aborted: 1; 52452 unsigned int h_type: 8; 52453 unsigned int h_line_no: 16; 52454 long unsigned int h_start_jiffies; 52455 unsigned int h_requested_credits; 52456 unsigned int saved_alloc_context; 52457 }; 52458 52459 struct transaction_run_stats_s { 52460 long unsigned int rs_wait; 52461 long unsigned int rs_request_delay; 52462 long unsigned int rs_running; 52463 long unsigned int rs_locked; 52464 long unsigned int rs_flushing; 52465 long unsigned int rs_logging; 52466 __u32 rs_handle_count; 52467 __u32 rs_blocks; 52468 __u32 rs_blocks_logged; 52469 }; 52470 52471 struct transaction_stats_s { 52472 long unsigned int ts_tid; 52473 long unsigned int ts_requested; 52474 struct transaction_run_stats_s run; 52475 }; 52476 52477 enum passtype { 52478 PASS_SCAN = 0, 52479 PASS_REVOKE = 1, 52480 PASS_REPLAY = 2, 52481 }; 52482 52483 struct journal_superblock_s; 52484 52485 typedef struct journal_superblock_s journal_superblock_t; 52486 52487 struct jbd2_revoke_table_s; 52488 52489 struct jbd2_inode; 52490 52491 struct journal_s { 52492 long unsigned int j_flags; 52493 int j_errno; 52494 struct mutex j_abort_mutex; 52495 struct buffer_head *j_sb_buffer; 52496 journal_superblock_t *j_superblock; 52497 int j_format_version; 52498 rwlock_t j_state_lock; 52499 int j_barrier_count; 52500 struct mutex j_barrier; 52501 transaction_t *j_running_transaction; 52502 transaction_t *j_committing_transaction; 52503 transaction_t *j_checkpoint_transactions; 52504 wait_queue_head_t j_wait_transaction_locked; 52505 wait_queue_head_t j_wait_done_commit; 52506 wait_queue_head_t j_wait_commit; 52507 wait_queue_head_t j_wait_updates; 52508 wait_queue_head_t j_wait_reserved; 52509 wait_queue_head_t j_fc_wait; 52510 struct mutex j_checkpoint_mutex; 52511 struct buffer_head *j_chkpt_bhs[64]; 52512 long unsigned int j_head; 52513 long unsigned int j_tail; 52514 long unsigned int j_free; 52515 long unsigned int j_first; 52516 long unsigned int j_last; 52517 long unsigned int j_fc_first; 52518 long unsigned int j_fc_off; 52519 long unsigned int j_fc_last; 52520 struct block_device *j_dev; 52521 int j_blocksize; 52522 long long unsigned int j_blk_offset; 52523 char j_devname[56]; 52524 struct block_device *j_fs_dev; 52525 unsigned int j_total_len; 52526 atomic_t j_reserved_credits; 52527 spinlock_t j_list_lock; 52528 struct inode *j_inode; 52529 tid_t j_tail_sequence; 52530 tid_t j_transaction_sequence; 52531 tid_t j_commit_sequence; 52532 tid_t j_commit_request; 52533 __u8 j_uuid[16]; 52534 struct task_struct *j_task; 52535 int j_max_transaction_buffers; 52536 int j_revoke_records_per_block; 52537 long unsigned int j_commit_interval; 52538 struct timer_list j_commit_timer; 52539 spinlock_t j_revoke_lock; 52540 struct jbd2_revoke_table_s *j_revoke; 52541 struct jbd2_revoke_table_s *j_revoke_table[2]; 52542 struct buffer_head **j_wbuf; 52543 struct buffer_head **j_fc_wbuf; 52544 int j_wbufsize; 52545 int j_fc_wbufsize; 52546 pid_t j_last_sync_writer; 52547 u64 j_average_commit_time; 52548 u32 j_min_batch_time; 52549 u32 j_max_batch_time; 52550 void (*j_commit_callback)(journal_t *, transaction_t *); 52551 int (*j_submit_inode_data_buffers)(struct jbd2_inode *); 52552 int (*j_finish_inode_data_buffers)(struct jbd2_inode *); 52553 spinlock_t j_history_lock; 52554 struct proc_dir_entry *j_proc_entry; 52555 struct transaction_stats_s j_stats; 52556 unsigned int j_failed_commit; 52557 void *j_private; 52558 struct crypto_shash *j_chksum_driver; 52559 __u32 j_csum_seed; 52560 void (*j_fc_cleanup_callback)(struct journal_s *, int); 52561 int (*j_fc_replay_callback)(struct journal_s *, struct buffer_head *, enum passtype, int, tid_t); 52562 }; 52563 52564 struct journal_header_s { 52565 __be32 h_magic; 52566 __be32 h_blocktype; 52567 __be32 h_sequence; 52568 }; 52569 52570 typedef struct journal_header_s journal_header_t; 52571 52572 struct journal_superblock_s { 52573 journal_header_t s_header; 52574 __be32 s_blocksize; 52575 __be32 s_maxlen; 52576 __be32 s_first; 52577 __be32 s_sequence; 52578 __be32 s_start; 52579 __be32 s_errno; 52580 __be32 s_feature_compat; 52581 __be32 s_feature_incompat; 52582 __be32 s_feature_ro_compat; 52583 __u8 s_uuid[16]; 52584 __be32 s_nr_users; 52585 __be32 s_dynsuper; 52586 __be32 s_max_transaction; 52587 __be32 s_max_trans_data; 52588 __u8 s_checksum_type; 52589 __u8 s_padding2[3]; 52590 __be32 s_num_fc_blks; 52591 __u32 s_padding[41]; 52592 __be32 s_checksum; 52593 __u8 s_users[768]; 52594 }; 52595 52596 enum jbd_state_bits { 52597 BH_JBD = 16, 52598 BH_JWrite = 17, 52599 BH_Freed = 18, 52600 BH_Revoked = 19, 52601 BH_RevokeValid = 20, 52602 BH_JBDDirty = 21, 52603 BH_JournalHead = 22, 52604 BH_Shadow = 23, 52605 BH_Verified = 24, 52606 BH_JBDPrivateStart = 25, 52607 }; 52608 52609 struct jbd2_inode { 52610 transaction_t *i_transaction; 52611 transaction_t *i_next_transaction; 52612 struct list_head i_list; 52613 struct inode *i_vfs_inode; 52614 long unsigned int i_flags; 52615 loff_t i_dirty_start; 52616 loff_t i_dirty_end; 52617 }; 52618 52619 struct bgl_lock { 52620 spinlock_t lock; 52621 long: 32; 52622 long: 64; 52623 long: 64; 52624 long: 64; 52625 long: 64; 52626 long: 64; 52627 long: 64; 52628 long: 64; 52629 }; 52630 52631 struct blockgroup_lock { 52632 struct bgl_lock locks[128]; 52633 }; 52634 52635 typedef int ext4_grpblk_t; 52636 52637 typedef long long unsigned int ext4_fsblk_t; 52638 52639 typedef __u32 ext4_lblk_t; 52640 52641 typedef unsigned int ext4_group_t; 52642 52643 struct ext4_allocation_request { 52644 struct inode *inode; 52645 unsigned int len; 52646 ext4_lblk_t logical; 52647 ext4_lblk_t lleft; 52648 ext4_lblk_t lright; 52649 ext4_fsblk_t goal; 52650 ext4_fsblk_t pleft; 52651 ext4_fsblk_t pright; 52652 unsigned int flags; 52653 }; 52654 52655 struct ext4_system_blocks { 52656 struct rb_root root; 52657 struct callback_head rcu; 52658 }; 52659 52660 struct ext4_group_desc { 52661 __le32 bg_block_bitmap_lo; 52662 __le32 bg_inode_bitmap_lo; 52663 __le32 bg_inode_table_lo; 52664 __le16 bg_free_blocks_count_lo; 52665 __le16 bg_free_inodes_count_lo; 52666 __le16 bg_used_dirs_count_lo; 52667 __le16 bg_flags; 52668 __le32 bg_exclude_bitmap_lo; 52669 __le16 bg_block_bitmap_csum_lo; 52670 __le16 bg_inode_bitmap_csum_lo; 52671 __le16 bg_itable_unused_lo; 52672 __le16 bg_checksum; 52673 __le32 bg_block_bitmap_hi; 52674 __le32 bg_inode_bitmap_hi; 52675 __le32 bg_inode_table_hi; 52676 __le16 bg_free_blocks_count_hi; 52677 __le16 bg_free_inodes_count_hi; 52678 __le16 bg_used_dirs_count_hi; 52679 __le16 bg_itable_unused_hi; 52680 __le32 bg_exclude_bitmap_hi; 52681 __le16 bg_block_bitmap_csum_hi; 52682 __le16 bg_inode_bitmap_csum_hi; 52683 __u32 bg_reserved; 52684 }; 52685 52686 struct flex_groups { 52687 atomic64_t free_clusters; 52688 atomic_t free_inodes; 52689 atomic_t used_dirs; 52690 }; 52691 52692 struct extent_status { 52693 struct rb_node rb_node; 52694 ext4_lblk_t es_lblk; 52695 ext4_lblk_t es_len; 52696 ext4_fsblk_t es_pblk; 52697 }; 52698 52699 struct ext4_es_tree { 52700 struct rb_root root; 52701 struct extent_status *cache_es; 52702 }; 52703 52704 struct ext4_es_stats { 52705 long unsigned int es_stats_shrunk; 52706 struct percpu_counter es_stats_cache_hits; 52707 struct percpu_counter es_stats_cache_misses; 52708 u64 es_stats_scan_time; 52709 u64 es_stats_max_scan_time; 52710 struct percpu_counter es_stats_all_cnt; 52711 struct percpu_counter es_stats_shk_cnt; 52712 }; 52713 52714 struct ext4_pending_tree { 52715 struct rb_root root; 52716 }; 52717 52718 struct ext4_fc_stats { 52719 unsigned int fc_ineligible_reason_count[10]; 52720 long unsigned int fc_num_commits; 52721 long unsigned int fc_ineligible_commits; 52722 long unsigned int fc_numblks; 52723 }; 52724 52725 struct ext4_fc_alloc_region { 52726 ext4_lblk_t lblk; 52727 ext4_fsblk_t pblk; 52728 int ino; 52729 int len; 52730 }; 52731 52732 struct ext4_fc_replay_state { 52733 int fc_replay_num_tags; 52734 int fc_replay_expected_off; 52735 int fc_current_pass; 52736 int fc_cur_tag; 52737 int fc_crc; 52738 struct ext4_fc_alloc_region *fc_regions; 52739 int fc_regions_size; 52740 int fc_regions_used; 52741 int fc_regions_valid; 52742 int *fc_modified_inodes; 52743 int fc_modified_inodes_used; 52744 int fc_modified_inodes_size; 52745 }; 52746 52747 struct ext4_inode_info { 52748 __le32 i_data[15]; 52749 __u32 i_dtime; 52750 ext4_fsblk_t i_file_acl; 52751 ext4_group_t i_block_group; 52752 ext4_lblk_t i_dir_start_lookup; 52753 long unsigned int i_flags; 52754 struct rw_semaphore xattr_sem; 52755 struct list_head i_orphan; 52756 struct list_head i_fc_list; 52757 ext4_lblk_t i_fc_lblk_start; 52758 ext4_lblk_t i_fc_lblk_len; 52759 atomic_t i_fc_updates; 52760 wait_queue_head_t i_fc_wait; 52761 struct mutex i_fc_lock; 52762 loff_t i_disksize; 52763 struct rw_semaphore i_data_sem; 52764 struct rw_semaphore i_mmap_sem; 52765 struct inode vfs_inode; 52766 struct jbd2_inode *jinode; 52767 spinlock_t i_raw_lock; 52768 struct timespec64 i_crtime; 52769 atomic_t i_prealloc_active; 52770 struct list_head i_prealloc_list; 52771 spinlock_t i_prealloc_lock; 52772 struct ext4_es_tree i_es_tree; 52773 rwlock_t i_es_lock; 52774 struct list_head i_es_list; 52775 unsigned int i_es_all_nr; 52776 unsigned int i_es_shk_nr; 52777 ext4_lblk_t i_es_shrink_lblk; 52778 ext4_group_t i_last_alloc_group; 52779 unsigned int i_reserved_data_blocks; 52780 struct ext4_pending_tree i_pending_tree; 52781 __u16 i_extra_isize; 52782 u16 i_inline_off; 52783 u16 i_inline_size; 52784 qsize_t i_reserved_quota; 52785 spinlock_t i_completed_io_lock; 52786 struct list_head i_rsv_conversion_list; 52787 struct work_struct i_rsv_conversion_work; 52788 atomic_t i_unwritten; 52789 spinlock_t i_block_reservation_lock; 52790 tid_t i_sync_tid; 52791 tid_t i_datasync_tid; 52792 struct dquot *i_dquot[3]; 52793 __u32 i_csum_seed; 52794 kprojid_t i_projid; 52795 }; 52796 52797 struct ext4_super_block { 52798 __le32 s_inodes_count; 52799 __le32 s_blocks_count_lo; 52800 __le32 s_r_blocks_count_lo; 52801 __le32 s_free_blocks_count_lo; 52802 __le32 s_free_inodes_count; 52803 __le32 s_first_data_block; 52804 __le32 s_log_block_size; 52805 __le32 s_log_cluster_size; 52806 __le32 s_blocks_per_group; 52807 __le32 s_clusters_per_group; 52808 __le32 s_inodes_per_group; 52809 __le32 s_mtime; 52810 __le32 s_wtime; 52811 __le16 s_mnt_count; 52812 __le16 s_max_mnt_count; 52813 __le16 s_magic; 52814 __le16 s_state; 52815 __le16 s_errors; 52816 __le16 s_minor_rev_level; 52817 __le32 s_lastcheck; 52818 __le32 s_checkinterval; 52819 __le32 s_creator_os; 52820 __le32 s_rev_level; 52821 __le16 s_def_resuid; 52822 __le16 s_def_resgid; 52823 __le32 s_first_ino; 52824 __le16 s_inode_size; 52825 __le16 s_block_group_nr; 52826 __le32 s_feature_compat; 52827 __le32 s_feature_incompat; 52828 __le32 s_feature_ro_compat; 52829 __u8 s_uuid[16]; 52830 char s_volume_name[16]; 52831 char s_last_mounted[64]; 52832 __le32 s_algorithm_usage_bitmap; 52833 __u8 s_prealloc_blocks; 52834 __u8 s_prealloc_dir_blocks; 52835 __le16 s_reserved_gdt_blocks; 52836 __u8 s_journal_uuid[16]; 52837 __le32 s_journal_inum; 52838 __le32 s_journal_dev; 52839 __le32 s_last_orphan; 52840 __le32 s_hash_seed[4]; 52841 __u8 s_def_hash_version; 52842 __u8 s_jnl_backup_type; 52843 __le16 s_desc_size; 52844 __le32 s_default_mount_opts; 52845 __le32 s_first_meta_bg; 52846 __le32 s_mkfs_time; 52847 __le32 s_jnl_blocks[17]; 52848 __le32 s_blocks_count_hi; 52849 __le32 s_r_blocks_count_hi; 52850 __le32 s_free_blocks_count_hi; 52851 __le16 s_min_extra_isize; 52852 __le16 s_want_extra_isize; 52853 __le32 s_flags; 52854 __le16 s_raid_stride; 52855 __le16 s_mmp_update_interval; 52856 __le64 s_mmp_block; 52857 __le32 s_raid_stripe_width; 52858 __u8 s_log_groups_per_flex; 52859 __u8 s_checksum_type; 52860 __u8 s_encryption_level; 52861 __u8 s_reserved_pad; 52862 __le64 s_kbytes_written; 52863 __le32 s_snapshot_inum; 52864 __le32 s_snapshot_id; 52865 __le64 s_snapshot_r_blocks_count; 52866 __le32 s_snapshot_list; 52867 __le32 s_error_count; 52868 __le32 s_first_error_time; 52869 __le32 s_first_error_ino; 52870 __le64 s_first_error_block; 52871 __u8 s_first_error_func[32]; 52872 __le32 s_first_error_line; 52873 __le32 s_last_error_time; 52874 __le32 s_last_error_ino; 52875 __le32 s_last_error_line; 52876 __le64 s_last_error_block; 52877 __u8 s_last_error_func[32]; 52878 __u8 s_mount_opts[64]; 52879 __le32 s_usr_quota_inum; 52880 __le32 s_grp_quota_inum; 52881 __le32 s_overhead_clusters; 52882 __le32 s_backup_bgs[2]; 52883 __u8 s_encrypt_algos[4]; 52884 __u8 s_encrypt_pw_salt[16]; 52885 __le32 s_lpf_ino; 52886 __le32 s_prj_quota_inum; 52887 __le32 s_checksum_seed; 52888 __u8 s_wtime_hi; 52889 __u8 s_mtime_hi; 52890 __u8 s_mkfs_time_hi; 52891 __u8 s_lastcheck_hi; 52892 __u8 s_first_error_time_hi; 52893 __u8 s_last_error_time_hi; 52894 __u8 s_first_error_errcode; 52895 __u8 s_last_error_errcode; 52896 __le16 s_encoding; 52897 __le16 s_encoding_flags; 52898 __le32 s_reserved[95]; 52899 __le32 s_checksum; 52900 }; 52901 52902 struct mb_cache___2; 52903 52904 struct ext4_group_info; 52905 52906 struct ext4_locality_group; 52907 52908 struct ext4_li_request; 52909 52910 struct ext4_sb_info { 52911 long unsigned int s_desc_size; 52912 long unsigned int s_inodes_per_block; 52913 long unsigned int s_blocks_per_group; 52914 long unsigned int s_clusters_per_group; 52915 long unsigned int s_inodes_per_group; 52916 long unsigned int s_itb_per_group; 52917 long unsigned int s_gdb_count; 52918 long unsigned int s_desc_per_block; 52919 ext4_group_t s_groups_count; 52920 ext4_group_t s_blockfile_groups; 52921 long unsigned int s_overhead; 52922 unsigned int s_cluster_ratio; 52923 unsigned int s_cluster_bits; 52924 loff_t s_bitmap_maxbytes; 52925 struct buffer_head *s_sbh; 52926 struct ext4_super_block *s_es; 52927 struct buffer_head **s_group_desc; 52928 unsigned int s_mount_opt; 52929 unsigned int s_mount_opt2; 52930 long unsigned int s_mount_flags; 52931 unsigned int s_def_mount_opt; 52932 ext4_fsblk_t s_sb_block; 52933 atomic64_t s_resv_clusters; 52934 kuid_t s_resuid; 52935 kgid_t s_resgid; 52936 short unsigned int s_mount_state; 52937 short unsigned int s_pad; 52938 int s_addr_per_block_bits; 52939 int s_desc_per_block_bits; 52940 int s_inode_size; 52941 int s_first_ino; 52942 unsigned int s_inode_readahead_blks; 52943 unsigned int s_inode_goal; 52944 u32 s_hash_seed[4]; 52945 int s_def_hash_version; 52946 int s_hash_unsigned; 52947 struct percpu_counter s_freeclusters_counter; 52948 struct percpu_counter s_freeinodes_counter; 52949 struct percpu_counter s_dirs_counter; 52950 struct percpu_counter s_dirtyclusters_counter; 52951 struct percpu_counter s_sra_exceeded_retry_limit; 52952 struct blockgroup_lock *s_blockgroup_lock; 52953 struct proc_dir_entry *s_proc; 52954 struct kobject s_kobj; 52955 struct completion s_kobj_unregister; 52956 struct super_block *s_sb; 52957 struct journal_s *s_journal; 52958 struct list_head s_orphan; 52959 struct mutex s_orphan_lock; 52960 long unsigned int s_ext4_flags; 52961 long unsigned int s_commit_interval; 52962 u32 s_max_batch_time; 52963 u32 s_min_batch_time; 52964 struct block_device *s_journal_bdev; 52965 char *s_qf_names[3]; 52966 int s_jquota_fmt; 52967 unsigned int s_want_extra_isize; 52968 struct ext4_system_blocks *s_system_blks; 52969 struct ext4_group_info ***s_group_info; 52970 struct inode *s_buddy_cache; 52971 spinlock_t s_md_lock; 52972 short unsigned int *s_mb_offsets; 52973 unsigned int *s_mb_maxs; 52974 unsigned int s_group_info_size; 52975 unsigned int s_mb_free_pending; 52976 struct list_head s_freed_data_list; 52977 long unsigned int s_stripe; 52978 unsigned int s_mb_stream_request; 52979 unsigned int s_mb_max_to_scan; 52980 unsigned int s_mb_min_to_scan; 52981 unsigned int s_mb_stats; 52982 unsigned int s_mb_order2_reqs; 52983 unsigned int s_mb_group_prealloc; 52984 unsigned int s_mb_max_inode_prealloc; 52985 unsigned int s_max_dir_size_kb; 52986 long unsigned int s_mb_last_group; 52987 long unsigned int s_mb_last_start; 52988 unsigned int s_mb_prefetch; 52989 unsigned int s_mb_prefetch_limit; 52990 atomic_t s_bal_reqs; 52991 atomic_t s_bal_success; 52992 atomic_t s_bal_allocated; 52993 atomic_t s_bal_ex_scanned; 52994 atomic_t s_bal_goals; 52995 atomic_t s_bal_breaks; 52996 atomic_t s_bal_2orders; 52997 spinlock_t s_bal_lock; 52998 long unsigned int s_mb_buddies_generated; 52999 long long unsigned int s_mb_generation_time; 53000 atomic_t s_mb_lost_chunks; 53001 atomic_t s_mb_preallocated; 53002 atomic_t s_mb_discarded; 53003 atomic_t s_lock_busy; 53004 struct ext4_locality_group *s_locality_groups; 53005 long unsigned int s_sectors_written_start; 53006 u64 s_kbytes_written; 53007 unsigned int s_extent_max_zeroout_kb; 53008 unsigned int s_log_groups_per_flex; 53009 struct flex_groups **s_flex_groups; 53010 ext4_group_t s_flex_groups_allocated; 53011 struct workqueue_struct *rsv_conversion_wq; 53012 struct timer_list s_err_report; 53013 struct ext4_li_request *s_li_request; 53014 unsigned int s_li_wait_mult; 53015 struct task_struct *s_mmp_tsk; 53016 atomic_t s_last_trim_minblks; 53017 struct crypto_shash *s_chksum_driver; 53018 __u32 s_csum_seed; 53019 struct shrinker s_es_shrinker; 53020 struct list_head s_es_list; 53021 long int s_es_nr_inode; 53022 struct ext4_es_stats s_es_stats; 53023 struct mb_cache___2 *s_ea_block_cache; 53024 struct mb_cache___2 *s_ea_inode_cache; 53025 long: 64; 53026 long: 64; 53027 long: 64; 53028 long: 64; 53029 long: 64; 53030 long: 64; 53031 spinlock_t s_es_lock; 53032 struct ratelimit_state s_err_ratelimit_state; 53033 struct ratelimit_state s_warning_ratelimit_state; 53034 struct ratelimit_state s_msg_ratelimit_state; 53035 atomic_t s_warning_count; 53036 atomic_t s_msg_count; 53037 struct fscrypt_dummy_policy s_dummy_enc_policy; 53038 struct percpu_rw_semaphore s_writepages_rwsem; 53039 struct dax_device *s_daxdev; 53040 errseq_t s_bdev_wb_err; 53041 spinlock_t s_bdev_wb_lock; 53042 spinlock_t s_error_lock; 53043 int s_add_error_count; 53044 int s_first_error_code; 53045 __u32 s_first_error_line; 53046 __u32 s_first_error_ino; 53047 __u64 s_first_error_block; 53048 const char *s_first_error_func; 53049 time64_t s_first_error_time; 53050 int s_last_error_code; 53051 __u32 s_last_error_line; 53052 __u32 s_last_error_ino; 53053 __u64 s_last_error_block; 53054 const char *s_last_error_func; 53055 time64_t s_last_error_time; 53056 struct work_struct s_error_work; 53057 atomic_t s_fc_subtid; 53058 atomic_t s_fc_ineligible_updates; 53059 struct list_head s_fc_q[2]; 53060 struct list_head s_fc_dentry_q[2]; 53061 unsigned int s_fc_bytes; 53062 spinlock_t s_fc_lock; 53063 struct buffer_head *s_fc_bh; 53064 struct ext4_fc_stats s_fc_stats; 53065 u64 s_fc_avg_commit_time; 53066 struct ext4_fc_replay_state s_fc_replay_state; 53067 long: 64; 53068 long: 64; 53069 long: 64; 53070 long: 64; 53071 long: 64; 53072 }; 53073 53074 struct ext4_group_info { 53075 long unsigned int bb_state; 53076 struct rb_root bb_free_root; 53077 ext4_grpblk_t bb_first_free; 53078 ext4_grpblk_t bb_free; 53079 ext4_grpblk_t bb_fragments; 53080 ext4_grpblk_t bb_largest_free_order; 53081 struct list_head bb_prealloc_list; 53082 struct rw_semaphore alloc_sem; 53083 ext4_grpblk_t bb_counters[0]; 53084 }; 53085 53086 struct ext4_locality_group { 53087 struct mutex lg_mutex; 53088 struct list_head lg_prealloc_list[10]; 53089 spinlock_t lg_prealloc_lock; 53090 }; 53091 53092 enum ext4_li_mode { 53093 EXT4_LI_MODE_PREFETCH_BBITMAP = 0, 53094 EXT4_LI_MODE_ITABLE = 1, 53095 }; 53096 53097 struct ext4_li_request { 53098 struct super_block *lr_super; 53099 enum ext4_li_mode lr_mode; 53100 ext4_group_t lr_first_not_zeroed; 53101 ext4_group_t lr_next_group; 53102 struct list_head lr_request; 53103 long unsigned int lr_next_sched; 53104 long unsigned int lr_timeout; 53105 }; 53106 53107 struct ext4_map_blocks { 53108 ext4_fsblk_t m_pblk; 53109 ext4_lblk_t m_lblk; 53110 unsigned int m_len; 53111 unsigned int m_flags; 53112 }; 53113 53114 typedef enum { 53115 EXT4_IGET_NORMAL = 0, 53116 EXT4_IGET_SPECIAL = 1, 53117 EXT4_IGET_HANDLE = 2, 53118 } ext4_iget_flags; 53119 53120 struct ext4_system_zone { 53121 struct rb_node node; 53122 ext4_fsblk_t start_blk; 53123 unsigned int count; 53124 u32 ino; 53125 }; 53126 53127 enum { 53128 EXT4_INODE_SECRM = 0, 53129 EXT4_INODE_UNRM = 1, 53130 EXT4_INODE_COMPR = 2, 53131 EXT4_INODE_SYNC = 3, 53132 EXT4_INODE_IMMUTABLE = 4, 53133 EXT4_INODE_APPEND = 5, 53134 EXT4_INODE_NODUMP = 6, 53135 EXT4_INODE_NOATIME = 7, 53136 EXT4_INODE_DIRTY = 8, 53137 EXT4_INODE_COMPRBLK = 9, 53138 EXT4_INODE_NOCOMPR = 10, 53139 EXT4_INODE_ENCRYPT = 11, 53140 EXT4_INODE_INDEX = 12, 53141 EXT4_INODE_IMAGIC = 13, 53142 EXT4_INODE_JOURNAL_DATA = 14, 53143 EXT4_INODE_NOTAIL = 15, 53144 EXT4_INODE_DIRSYNC = 16, 53145 EXT4_INODE_TOPDIR = 17, 53146 EXT4_INODE_HUGE_FILE = 18, 53147 EXT4_INODE_EXTENTS = 19, 53148 EXT4_INODE_VERITY = 20, 53149 EXT4_INODE_EA_INODE = 21, 53150 EXT4_INODE_DAX = 25, 53151 EXT4_INODE_INLINE_DATA = 28, 53152 EXT4_INODE_PROJINHERIT = 29, 53153 EXT4_INODE_CASEFOLD = 30, 53154 EXT4_INODE_RESERVED = 31, 53155 }; 53156 53157 enum { 53158 EXT4_FC_REASON_OK = 0, 53159 EXT4_FC_REASON_INELIGIBLE = 1, 53160 EXT4_FC_REASON_ALREADY_COMMITTED = 2, 53161 EXT4_FC_REASON_FC_START_FAILED = 3, 53162 EXT4_FC_REASON_FC_FAILED = 4, 53163 EXT4_FC_REASON_XATTR = 0, 53164 EXT4_FC_REASON_CROSS_RENAME = 1, 53165 EXT4_FC_REASON_JOURNAL_FLAG_CHANGE = 2, 53166 EXT4_FC_REASON_NOMEM = 3, 53167 EXT4_FC_REASON_SWAP_BOOT = 4, 53168 EXT4_FC_REASON_RESIZE = 5, 53169 EXT4_FC_REASON_RENAME_DIR = 6, 53170 EXT4_FC_REASON_FALLOC_RANGE = 7, 53171 EXT4_FC_REASON_INODE_JOURNAL_DATA = 8, 53172 EXT4_FC_COMMIT_FAILED = 9, 53173 EXT4_FC_REASON_MAX = 10, 53174 }; 53175 53176 struct ext4_dir_entry_2 { 53177 __le32 inode; 53178 __le16 rec_len; 53179 __u8 name_len; 53180 __u8 file_type; 53181 char name[255]; 53182 }; 53183 53184 struct fname; 53185 53186 struct dir_private_info { 53187 struct rb_root root; 53188 struct rb_node *curr_node; 53189 struct fname *extra_fname; 53190 loff_t last_pos; 53191 __u32 curr_hash; 53192 __u32 curr_minor_hash; 53193 __u32 next_hash; 53194 }; 53195 53196 struct fname { 53197 __u32 hash; 53198 __u32 minor_hash; 53199 struct rb_node rb_hash; 53200 struct fname *next; 53201 __u32 inode; 53202 __u8 name_len; 53203 __u8 file_type; 53204 char name[0]; 53205 }; 53206 53207 enum SHIFT_DIRECTION { 53208 SHIFT_LEFT = 0, 53209 SHIFT_RIGHT = 1, 53210 }; 53211 53212 struct ext4_io_end_vec { 53213 struct list_head list; 53214 loff_t offset; 53215 ssize_t size; 53216 }; 53217 53218 struct ext4_io_end { 53219 struct list_head list; 53220 handle_t *handle; 53221 struct inode *inode; 53222 struct bio *bio; 53223 unsigned int flag; 53224 atomic_t count; 53225 struct list_head list_vec; 53226 }; 53227 53228 typedef struct ext4_io_end ext4_io_end_t; 53229 53230 enum { 53231 ES_WRITTEN_B = 0, 53232 ES_UNWRITTEN_B = 1, 53233 ES_DELAYED_B = 2, 53234 ES_HOLE_B = 3, 53235 ES_REFERENCED_B = 4, 53236 ES_FLAGS = 5, 53237 }; 53238 53239 enum { 53240 EXT4_STATE_JDATA = 0, 53241 EXT4_STATE_NEW = 1, 53242 EXT4_STATE_XATTR = 2, 53243 EXT4_STATE_NO_EXPAND = 3, 53244 EXT4_STATE_DA_ALLOC_CLOSE = 4, 53245 EXT4_STATE_EXT_MIGRATE = 5, 53246 EXT4_STATE_NEWENTRY = 6, 53247 EXT4_STATE_MAY_INLINE_DATA = 7, 53248 EXT4_STATE_EXT_PRECACHED = 8, 53249 EXT4_STATE_LUSTRE_EA_INODE = 9, 53250 EXT4_STATE_VERITY_IN_PROGRESS = 10, 53251 EXT4_STATE_FC_COMMITTING = 11, 53252 }; 53253 53254 struct ext4_iloc { 53255 struct buffer_head *bh; 53256 long unsigned int offset; 53257 ext4_group_t block_group; 53258 }; 53259 53260 struct ext4_extent_tail { 53261 __le32 et_checksum; 53262 }; 53263 53264 struct ext4_extent { 53265 __le32 ee_block; 53266 __le16 ee_len; 53267 __le16 ee_start_hi; 53268 __le32 ee_start_lo; 53269 }; 53270 53271 struct ext4_extent_idx { 53272 __le32 ei_block; 53273 __le32 ei_leaf_lo; 53274 __le16 ei_leaf_hi; 53275 __u16 ei_unused; 53276 }; 53277 53278 struct ext4_extent_header { 53279 __le16 eh_magic; 53280 __le16 eh_entries; 53281 __le16 eh_max; 53282 __le16 eh_depth; 53283 __le32 eh_generation; 53284 }; 53285 53286 struct ext4_ext_path { 53287 ext4_fsblk_t p_block; 53288 __u16 p_depth; 53289 __u16 p_maxdepth; 53290 struct ext4_extent *p_ext; 53291 struct ext4_extent_idx *p_idx; 53292 struct ext4_extent_header *p_hdr; 53293 struct buffer_head *p_bh; 53294 }; 53295 53296 struct partial_cluster { 53297 ext4_fsblk_t pclu; 53298 ext4_lblk_t lblk; 53299 enum { 53300 initial = 0, 53301 tofree = 1, 53302 nofree = 2, 53303 } state; 53304 }; 53305 53306 struct pending_reservation { 53307 struct rb_node rb_node; 53308 ext4_lblk_t lclu; 53309 }; 53310 53311 struct rsvd_count { 53312 int ndelonly; 53313 bool first_do_lblk_found; 53314 ext4_lblk_t first_do_lblk; 53315 ext4_lblk_t last_do_lblk; 53316 struct extent_status *left_es; 53317 bool partial; 53318 ext4_lblk_t lclu; 53319 }; 53320 53321 enum { 53322 EXT4_MF_MNTDIR_SAMPLED = 0, 53323 EXT4_MF_FS_ABORTED = 1, 53324 EXT4_MF_FC_INELIGIBLE = 2, 53325 EXT4_MF_FC_COMMITTING = 3, 53326 }; 53327 53328 struct fsmap { 53329 __u32 fmr_device; 53330 __u32 fmr_flags; 53331 __u64 fmr_physical; 53332 __u64 fmr_owner; 53333 __u64 fmr_offset; 53334 __u64 fmr_length; 53335 __u64 fmr_reserved[3]; 53336 }; 53337 53338 struct ext4_fsmap { 53339 struct list_head fmr_list; 53340 dev_t fmr_device; 53341 uint32_t fmr_flags; 53342 uint64_t fmr_physical; 53343 uint64_t fmr_owner; 53344 uint64_t fmr_length; 53345 }; 53346 53347 struct ext4_fsmap_head { 53348 uint32_t fmh_iflags; 53349 uint32_t fmh_oflags; 53350 unsigned int fmh_count; 53351 unsigned int fmh_entries; 53352 struct ext4_fsmap fmh_keys[2]; 53353 }; 53354 53355 typedef int (*ext4_fsmap_format_t)(struct ext4_fsmap *, void *); 53356 53357 typedef int (*ext4_mballoc_query_range_fn)(struct super_block *, ext4_group_t, ext4_grpblk_t, ext4_grpblk_t, void *); 53358 53359 struct ext4_getfsmap_info { 53360 struct ext4_fsmap_head *gfi_head; 53361 ext4_fsmap_format_t gfi_formatter; 53362 void *gfi_format_arg; 53363 ext4_fsblk_t gfi_next_fsblk; 53364 u32 gfi_dev; 53365 ext4_group_t gfi_agno; 53366 struct ext4_fsmap gfi_low; 53367 struct ext4_fsmap gfi_high; 53368 struct ext4_fsmap gfi_lastfree; 53369 struct list_head gfi_meta_list; 53370 bool gfi_last; 53371 }; 53372 53373 struct ext4_getfsmap_dev { 53374 int (*gfd_fn)(struct super_block *, struct ext4_fsmap *, struct ext4_getfsmap_info *); 53375 u32 gfd_dev; 53376 }; 53377 53378 struct dx_hash_info { 53379 u32 hash; 53380 u32 minor_hash; 53381 int hash_version; 53382 u32 *seed; 53383 }; 53384 53385 typedef unsigned int __kernel_mode_t; 53386 53387 typedef __kernel_mode_t mode_t; 53388 53389 struct ext4_inode { 53390 __le16 i_mode; 53391 __le16 i_uid; 53392 __le32 i_size_lo; 53393 __le32 i_atime; 53394 __le32 i_ctime; 53395 __le32 i_mtime; 53396 __le32 i_dtime; 53397 __le16 i_gid; 53398 __le16 i_links_count; 53399 __le32 i_blocks_lo; 53400 __le32 i_flags; 53401 union { 53402 struct { 53403 __le32 l_i_version; 53404 } linux1; 53405 struct { 53406 __u32 h_i_translator; 53407 } hurd1; 53408 struct { 53409 __u32 m_i_reserved1; 53410 } masix1; 53411 } osd1; 53412 __le32 i_block[15]; 53413 __le32 i_generation; 53414 __le32 i_file_acl_lo; 53415 __le32 i_size_high; 53416 __le32 i_obso_faddr; 53417 union { 53418 struct { 53419 __le16 l_i_blocks_high; 53420 __le16 l_i_file_acl_high; 53421 __le16 l_i_uid_high; 53422 __le16 l_i_gid_high; 53423 __le16 l_i_checksum_lo; 53424 __le16 l_i_reserved; 53425 } linux2; 53426 struct { 53427 __le16 h_i_reserved1; 53428 __u16 h_i_mode_high; 53429 __u16 h_i_uid_high; 53430 __u16 h_i_gid_high; 53431 __u32 h_i_author; 53432 } hurd2; 53433 struct { 53434 __le16 h_i_reserved1; 53435 __le16 m_i_file_acl_high; 53436 __u32 m_i_reserved2[2]; 53437 } masix2; 53438 } osd2; 53439 __le16 i_extra_isize; 53440 __le16 i_checksum_hi; 53441 __le32 i_ctime_extra; 53442 __le32 i_mtime_extra; 53443 __le32 i_atime_extra; 53444 __le32 i_crtime; 53445 __le32 i_crtime_extra; 53446 __le32 i_version_hi; 53447 __le32 i_projid; 53448 }; 53449 53450 struct orlov_stats { 53451 __u64 free_clusters; 53452 __u32 free_inodes; 53453 __u32 used_dirs; 53454 }; 53455 53456 typedef struct { 53457 __le32 *p; 53458 __le32 key; 53459 struct buffer_head *bh; 53460 } Indirect; 53461 53462 struct ext4_filename { 53463 const struct qstr *usr_fname; 53464 struct fscrypt_str disk_name; 53465 struct dx_hash_info hinfo; 53466 struct fscrypt_str crypto_buf; 53467 struct fscrypt_str cf_name; 53468 }; 53469 53470 struct ext4_xattr_ibody_header { 53471 __le32 h_magic; 53472 }; 53473 53474 struct ext4_xattr_entry { 53475 __u8 e_name_len; 53476 __u8 e_name_index; 53477 __le16 e_value_offs; 53478 __le32 e_value_inum; 53479 __le32 e_value_size; 53480 __le32 e_hash; 53481 char e_name[0]; 53482 }; 53483 53484 struct ext4_xattr_info { 53485 const char *name; 53486 const void *value; 53487 size_t value_len; 53488 int name_index; 53489 int in_inode; 53490 }; 53491 53492 struct ext4_xattr_search { 53493 struct ext4_xattr_entry *first; 53494 void *base; 53495 void *end; 53496 struct ext4_xattr_entry *here; 53497 int not_found; 53498 }; 53499 53500 struct ext4_xattr_ibody_find { 53501 struct ext4_xattr_search s; 53502 struct ext4_iloc iloc; 53503 }; 53504 53505 typedef short unsigned int __kernel_uid16_t; 53506 53507 typedef short unsigned int __kernel_gid16_t; 53508 53509 typedef __kernel_uid16_t uid16_t; 53510 53511 typedef __kernel_gid16_t gid16_t; 53512 53513 struct ext4_io_submit { 53514 struct writeback_control *io_wbc; 53515 struct bio *io_bio; 53516 ext4_io_end_t *io_end; 53517 sector_t io_next_block; 53518 }; 53519 53520 struct ext4_xattr_inode_array { 53521 unsigned int count; 53522 struct inode *inodes[0]; 53523 }; 53524 53525 struct mpage_da_data { 53526 struct inode *inode; 53527 struct writeback_control *wbc; 53528 long unsigned int first_page; 53529 long unsigned int next_page; 53530 long unsigned int last_page; 53531 struct ext4_map_blocks map; 53532 struct ext4_io_submit io_submit; 53533 unsigned int do_map: 1; 53534 unsigned int scanned_until_end: 1; 53535 }; 53536 53537 struct fstrim_range { 53538 __u64 start; 53539 __u64 len; 53540 __u64 minlen; 53541 }; 53542 53543 struct ext4_new_group_input { 53544 __u32 group; 53545 __u64 block_bitmap; 53546 __u64 inode_bitmap; 53547 __u64 inode_table; 53548 __u32 blocks_count; 53549 __u16 reserved_blocks; 53550 __u16 unused; 53551 }; 53552 53553 struct compat_ext4_new_group_input { 53554 u32 group; 53555 compat_u64 block_bitmap; 53556 compat_u64 inode_bitmap; 53557 compat_u64 inode_table; 53558 u32 blocks_count; 53559 u16 reserved_blocks; 53560 u16 unused; 53561 } __attribute__((packed)); 53562 53563 struct ext4_new_group_data { 53564 __u32 group; 53565 __u64 block_bitmap; 53566 __u64 inode_bitmap; 53567 __u64 inode_table; 53568 __u32 blocks_count; 53569 __u16 reserved_blocks; 53570 __u16 mdata_blocks; 53571 __u32 free_clusters_count; 53572 }; 53573 53574 struct move_extent { 53575 __u32 reserved; 53576 __u32 donor_fd; 53577 __u64 orig_start; 53578 __u64 donor_start; 53579 __u64 len; 53580 __u64 moved_len; 53581 }; 53582 53583 struct fsmap_head { 53584 __u32 fmh_iflags; 53585 __u32 fmh_oflags; 53586 __u32 fmh_count; 53587 __u32 fmh_entries; 53588 __u64 fmh_reserved[6]; 53589 struct fsmap fmh_keys[2]; 53590 struct fsmap fmh_recs[0]; 53591 }; 53592 53593 struct getfsmap_info { 53594 struct super_block *gi_sb; 53595 struct fsmap_head *gi_data; 53596 unsigned int gi_idx; 53597 __u32 gi_last_flags; 53598 }; 53599 53600 enum blk_default_limits { 53601 BLK_MAX_SEGMENTS = 128, 53602 BLK_SAFE_MAX_SECTORS = 255, 53603 BLK_DEF_MAX_SECTORS = 2560, 53604 BLK_MAX_SEGMENT_SIZE = 65536, 53605 BLK_SEG_BOUNDARY_MASK = 4294967295, 53606 }; 53607 53608 struct ext4_free_data { 53609 struct list_head efd_list; 53610 struct rb_node efd_node; 53611 ext4_group_t efd_group; 53612 ext4_grpblk_t efd_start_cluster; 53613 ext4_grpblk_t efd_count; 53614 tid_t efd_tid; 53615 }; 53616 53617 struct ext4_prealloc_space { 53618 struct list_head pa_inode_list; 53619 struct list_head pa_group_list; 53620 union { 53621 struct list_head pa_tmp_list; 53622 struct callback_head pa_rcu; 53623 } u; 53624 spinlock_t pa_lock; 53625 atomic_t pa_count; 53626 unsigned int pa_deleted; 53627 ext4_fsblk_t pa_pstart; 53628 ext4_lblk_t pa_lstart; 53629 ext4_grpblk_t pa_len; 53630 ext4_grpblk_t pa_free; 53631 short unsigned int pa_type; 53632 spinlock_t *pa_obj_lock; 53633 struct inode *pa_inode; 53634 }; 53635 53636 enum { 53637 MB_INODE_PA = 0, 53638 MB_GROUP_PA = 1, 53639 }; 53640 53641 struct ext4_free_extent { 53642 ext4_lblk_t fe_logical; 53643 ext4_grpblk_t fe_start; 53644 ext4_group_t fe_group; 53645 ext4_grpblk_t fe_len; 53646 }; 53647 53648 struct ext4_allocation_context { 53649 struct inode *ac_inode; 53650 struct super_block *ac_sb; 53651 struct ext4_free_extent ac_o_ex; 53652 struct ext4_free_extent ac_g_ex; 53653 struct ext4_free_extent ac_b_ex; 53654 struct ext4_free_extent ac_f_ex; 53655 __u16 ac_groups_scanned; 53656 __u16 ac_found; 53657 __u16 ac_tail; 53658 __u16 ac_buddy; 53659 __u16 ac_flags; 53660 __u8 ac_status; 53661 __u8 ac_criteria; 53662 __u8 ac_2order; 53663 __u8 ac_op; 53664 struct page *ac_bitmap_page; 53665 struct page *ac_buddy_page; 53666 struct ext4_prealloc_space *ac_pa; 53667 struct ext4_locality_group *ac_lg; 53668 }; 53669 53670 struct ext4_buddy { 53671 struct page *bd_buddy_page; 53672 void *bd_buddy; 53673 struct page *bd_bitmap_page; 53674 void *bd_bitmap; 53675 struct ext4_group_info *bd_info; 53676 struct super_block *bd_sb; 53677 __u16 bd_blkbits; 53678 ext4_group_t bd_group; 53679 }; 53680 53681 struct sg { 53682 struct ext4_group_info info; 53683 ext4_grpblk_t counters[18]; 53684 }; 53685 53686 struct migrate_struct { 53687 ext4_lblk_t first_block; 53688 ext4_lblk_t last_block; 53689 ext4_lblk_t curr_block; 53690 ext4_fsblk_t first_pblock; 53691 ext4_fsblk_t last_pblock; 53692 }; 53693 53694 struct mmp_struct { 53695 __le32 mmp_magic; 53696 __le32 mmp_seq; 53697 __le64 mmp_time; 53698 char mmp_nodename[64]; 53699 char mmp_bdevname[32]; 53700 __le16 mmp_check_interval; 53701 __le16 mmp_pad1; 53702 __le32 mmp_pad2[226]; 53703 __le32 mmp_checksum; 53704 }; 53705 53706 struct mmpd_data { 53707 struct buffer_head *bh; 53708 struct super_block *sb; 53709 }; 53710 53711 struct ext4_dir_entry { 53712 __le32 inode; 53713 __le16 rec_len; 53714 __le16 name_len; 53715 char name[255]; 53716 }; 53717 53718 struct ext4_dir_entry_tail { 53719 __le32 det_reserved_zero1; 53720 __le16 det_rec_len; 53721 __u8 det_reserved_zero2; 53722 __u8 det_reserved_ft; 53723 __le32 det_checksum; 53724 }; 53725 53726 typedef enum { 53727 EITHER = 0, 53728 INDEX = 1, 53729 DIRENT = 2, 53730 DIRENT_HTREE = 3, 53731 } dirblock_type_t; 53732 53733 struct fake_dirent { 53734 __le32 inode; 53735 __le16 rec_len; 53736 u8 name_len; 53737 u8 file_type; 53738 }; 53739 53740 struct dx_countlimit { 53741 __le16 limit; 53742 __le16 count; 53743 }; 53744 53745 struct dx_entry { 53746 __le32 hash; 53747 __le32 block; 53748 }; 53749 53750 struct dx_root_info { 53751 __le32 reserved_zero; 53752 u8 hash_version; 53753 u8 info_length; 53754 u8 indirect_levels; 53755 u8 unused_flags; 53756 }; 53757 53758 struct dx_root { 53759 struct fake_dirent dot; 53760 char dot_name[4]; 53761 struct fake_dirent dotdot; 53762 char dotdot_name[4]; 53763 struct dx_root_info info; 53764 struct dx_entry entries[0]; 53765 }; 53766 53767 struct dx_node { 53768 struct fake_dirent fake; 53769 struct dx_entry entries[0]; 53770 }; 53771 53772 struct dx_frame { 53773 struct buffer_head *bh; 53774 struct dx_entry *entries; 53775 struct dx_entry *at; 53776 }; 53777 53778 struct dx_map_entry { 53779 u32 hash; 53780 u16 offs; 53781 u16 size; 53782 }; 53783 53784 struct dx_tail { 53785 u32 dt_reserved; 53786 __le32 dt_checksum; 53787 }; 53788 53789 struct ext4_renament { 53790 struct inode *dir; 53791 struct dentry *dentry; 53792 struct inode *inode; 53793 bool is_dir; 53794 int dir_nlink_delta; 53795 struct buffer_head *bh; 53796 struct ext4_dir_entry_2 *de; 53797 int inlined; 53798 struct buffer_head *dir_bh; 53799 struct ext4_dir_entry_2 *parent_de; 53800 int dir_inlined; 53801 }; 53802 53803 enum bio_post_read_step { 53804 STEP_INITIAL = 0, 53805 STEP_DECRYPT = 1, 53806 STEP_VERITY = 2, 53807 STEP_MAX = 3, 53808 }; 53809 53810 struct bio_post_read_ctx { 53811 struct bio *bio; 53812 struct work_struct work; 53813 unsigned int cur_step; 53814 unsigned int enabled_steps; 53815 }; 53816 53817 enum { 53818 BLOCK_BITMAP = 0, 53819 INODE_BITMAP = 1, 53820 INODE_TABLE = 2, 53821 GROUP_TABLE_COUNT = 3, 53822 }; 53823 53824 struct ext4_rcu_ptr { 53825 struct callback_head rcu; 53826 void *ptr; 53827 }; 53828 53829 struct ext4_new_flex_group_data { 53830 struct ext4_new_group_data *groups; 53831 __u16 *bg_flags; 53832 ext4_group_t count; 53833 }; 53834 53835 enum { 53836 I_DATA_SEM_NORMAL = 0, 53837 I_DATA_SEM_OTHER = 1, 53838 I_DATA_SEM_QUOTA = 2, 53839 }; 53840 53841 struct ext4_lazy_init { 53842 long unsigned int li_state; 53843 struct list_head li_request_list; 53844 struct mutex li_list_mtx; 53845 }; 53846 53847 struct ext4_journal_cb_entry { 53848 struct list_head jce_list; 53849 void (*jce_func)(struct super_block *, struct ext4_journal_cb_entry *, int); 53850 }; 53851 53852 struct trace_event_raw_ext4_other_inode_update_time { 53853 struct trace_entry ent; 53854 dev_t dev; 53855 ino_t ino; 53856 ino_t orig_ino; 53857 uid_t uid; 53858 gid_t gid; 53859 __u16 mode; 53860 char __data[0]; 53861 }; 53862 53863 struct trace_event_raw_ext4_free_inode { 53864 struct trace_entry ent; 53865 dev_t dev; 53866 ino_t ino; 53867 uid_t uid; 53868 gid_t gid; 53869 __u64 blocks; 53870 __u16 mode; 53871 char __data[0]; 53872 }; 53873 53874 struct trace_event_raw_ext4_request_inode { 53875 struct trace_entry ent; 53876 dev_t dev; 53877 ino_t dir; 53878 __u16 mode; 53879 char __data[0]; 53880 }; 53881 53882 struct trace_event_raw_ext4_allocate_inode { 53883 struct trace_entry ent; 53884 dev_t dev; 53885 ino_t ino; 53886 ino_t dir; 53887 __u16 mode; 53888 char __data[0]; 53889 }; 53890 53891 struct trace_event_raw_ext4_evict_inode { 53892 struct trace_entry ent; 53893 dev_t dev; 53894 ino_t ino; 53895 int nlink; 53896 char __data[0]; 53897 }; 53898 53899 struct trace_event_raw_ext4_drop_inode { 53900 struct trace_entry ent; 53901 dev_t dev; 53902 ino_t ino; 53903 int drop; 53904 char __data[0]; 53905 }; 53906 53907 struct trace_event_raw_ext4_nfs_commit_metadata { 53908 struct trace_entry ent; 53909 dev_t dev; 53910 ino_t ino; 53911 char __data[0]; 53912 }; 53913 53914 struct trace_event_raw_ext4_mark_inode_dirty { 53915 struct trace_entry ent; 53916 dev_t dev; 53917 ino_t ino; 53918 long unsigned int ip; 53919 char __data[0]; 53920 }; 53921 53922 struct trace_event_raw_ext4_begin_ordered_truncate { 53923 struct trace_entry ent; 53924 dev_t dev; 53925 ino_t ino; 53926 loff_t new_size; 53927 char __data[0]; 53928 }; 53929 53930 struct trace_event_raw_ext4__write_begin { 53931 struct trace_entry ent; 53932 dev_t dev; 53933 ino_t ino; 53934 loff_t pos; 53935 unsigned int len; 53936 unsigned int flags; 53937 char __data[0]; 53938 }; 53939 53940 struct trace_event_raw_ext4__write_end { 53941 struct trace_entry ent; 53942 dev_t dev; 53943 ino_t ino; 53944 loff_t pos; 53945 unsigned int len; 53946 unsigned int copied; 53947 char __data[0]; 53948 }; 53949 53950 struct trace_event_raw_ext4_writepages { 53951 struct trace_entry ent; 53952 dev_t dev; 53953 ino_t ino; 53954 long int nr_to_write; 53955 long int pages_skipped; 53956 loff_t range_start; 53957 loff_t range_end; 53958 long unsigned int writeback_index; 53959 int sync_mode; 53960 char for_kupdate; 53961 char range_cyclic; 53962 char __data[0]; 53963 }; 53964 53965 struct trace_event_raw_ext4_da_write_pages { 53966 struct trace_entry ent; 53967 dev_t dev; 53968 ino_t ino; 53969 long unsigned int first_page; 53970 long int nr_to_write; 53971 int sync_mode; 53972 char __data[0]; 53973 }; 53974 53975 struct trace_event_raw_ext4_da_write_pages_extent { 53976 struct trace_entry ent; 53977 dev_t dev; 53978 ino_t ino; 53979 __u64 lblk; 53980 __u32 len; 53981 __u32 flags; 53982 char __data[0]; 53983 }; 53984 53985 struct trace_event_raw_ext4_writepages_result { 53986 struct trace_entry ent; 53987 dev_t dev; 53988 ino_t ino; 53989 int ret; 53990 int pages_written; 53991 long int pages_skipped; 53992 long unsigned int writeback_index; 53993 int sync_mode; 53994 char __data[0]; 53995 }; 53996 53997 struct trace_event_raw_ext4__page_op { 53998 struct trace_entry ent; 53999 dev_t dev; 54000 ino_t ino; 54001 long unsigned int index; 54002 char __data[0]; 54003 }; 54004 54005 struct trace_event_raw_ext4_invalidatepage_op { 54006 struct trace_entry ent; 54007 dev_t dev; 54008 ino_t ino; 54009 long unsigned int index; 54010 unsigned int offset; 54011 unsigned int length; 54012 char __data[0]; 54013 }; 54014 54015 struct trace_event_raw_ext4_discard_blocks { 54016 struct trace_entry ent; 54017 dev_t dev; 54018 __u64 blk; 54019 __u64 count; 54020 char __data[0]; 54021 }; 54022 54023 struct trace_event_raw_ext4__mb_new_pa { 54024 struct trace_entry ent; 54025 dev_t dev; 54026 ino_t ino; 54027 __u64 pa_pstart; 54028 __u64 pa_lstart; 54029 __u32 pa_len; 54030 char __data[0]; 54031 }; 54032 54033 struct trace_event_raw_ext4_mb_release_inode_pa { 54034 struct trace_entry ent; 54035 dev_t dev; 54036 ino_t ino; 54037 __u64 block; 54038 __u32 count; 54039 char __data[0]; 54040 }; 54041 54042 struct trace_event_raw_ext4_mb_release_group_pa { 54043 struct trace_entry ent; 54044 dev_t dev; 54045 __u64 pa_pstart; 54046 __u32 pa_len; 54047 char __data[0]; 54048 }; 54049 54050 struct trace_event_raw_ext4_discard_preallocations { 54051 struct trace_entry ent; 54052 dev_t dev; 54053 ino_t ino; 54054 unsigned int len; 54055 unsigned int needed; 54056 char __data[0]; 54057 }; 54058 54059 struct trace_event_raw_ext4_mb_discard_preallocations { 54060 struct trace_entry ent; 54061 dev_t dev; 54062 int needed; 54063 char __data[0]; 54064 }; 54065 54066 struct trace_event_raw_ext4_request_blocks { 54067 struct trace_entry ent; 54068 dev_t dev; 54069 ino_t ino; 54070 unsigned int len; 54071 __u32 logical; 54072 __u32 lleft; 54073 __u32 lright; 54074 __u64 goal; 54075 __u64 pleft; 54076 __u64 pright; 54077 unsigned int flags; 54078 char __data[0]; 54079 }; 54080 54081 struct trace_event_raw_ext4_allocate_blocks { 54082 struct trace_entry ent; 54083 dev_t dev; 54084 ino_t ino; 54085 __u64 block; 54086 unsigned int len; 54087 __u32 logical; 54088 __u32 lleft; 54089 __u32 lright; 54090 __u64 goal; 54091 __u64 pleft; 54092 __u64 pright; 54093 unsigned int flags; 54094 char __data[0]; 54095 }; 54096 54097 struct trace_event_raw_ext4_free_blocks { 54098 struct trace_entry ent; 54099 dev_t dev; 54100 ino_t ino; 54101 __u64 block; 54102 long unsigned int count; 54103 int flags; 54104 __u16 mode; 54105 char __data[0]; 54106 }; 54107 54108 struct trace_event_raw_ext4_sync_file_enter { 54109 struct trace_entry ent; 54110 dev_t dev; 54111 ino_t ino; 54112 ino_t parent; 54113 int datasync; 54114 char __data[0]; 54115 }; 54116 54117 struct trace_event_raw_ext4_sync_file_exit { 54118 struct trace_entry ent; 54119 dev_t dev; 54120 ino_t ino; 54121 int ret; 54122 char __data[0]; 54123 }; 54124 54125 struct trace_event_raw_ext4_sync_fs { 54126 struct trace_entry ent; 54127 dev_t dev; 54128 int wait; 54129 char __data[0]; 54130 }; 54131 54132 struct trace_event_raw_ext4_alloc_da_blocks { 54133 struct trace_entry ent; 54134 dev_t dev; 54135 ino_t ino; 54136 unsigned int data_blocks; 54137 char __data[0]; 54138 }; 54139 54140 struct trace_event_raw_ext4_mballoc_alloc { 54141 struct trace_entry ent; 54142 dev_t dev; 54143 ino_t ino; 54144 __u32 orig_logical; 54145 int orig_start; 54146 __u32 orig_group; 54147 int orig_len; 54148 __u32 goal_logical; 54149 int goal_start; 54150 __u32 goal_group; 54151 int goal_len; 54152 __u32 result_logical; 54153 int result_start; 54154 __u32 result_group; 54155 int result_len; 54156 __u16 found; 54157 __u16 groups; 54158 __u16 buddy; 54159 __u16 flags; 54160 __u16 tail; 54161 __u8 cr; 54162 char __data[0]; 54163 }; 54164 54165 struct trace_event_raw_ext4_mballoc_prealloc { 54166 struct trace_entry ent; 54167 dev_t dev; 54168 ino_t ino; 54169 __u32 orig_logical; 54170 int orig_start; 54171 __u32 orig_group; 54172 int orig_len; 54173 __u32 result_logical; 54174 int result_start; 54175 __u32 result_group; 54176 int result_len; 54177 char __data[0]; 54178 }; 54179 54180 struct trace_event_raw_ext4__mballoc { 54181 struct trace_entry ent; 54182 dev_t dev; 54183 ino_t ino; 54184 int result_start; 54185 __u32 result_group; 54186 int result_len; 54187 char __data[0]; 54188 }; 54189 54190 struct trace_event_raw_ext4_forget { 54191 struct trace_entry ent; 54192 dev_t dev; 54193 ino_t ino; 54194 __u64 block; 54195 int is_metadata; 54196 __u16 mode; 54197 char __data[0]; 54198 }; 54199 54200 struct trace_event_raw_ext4_da_update_reserve_space { 54201 struct trace_entry ent; 54202 dev_t dev; 54203 ino_t ino; 54204 __u64 i_blocks; 54205 int used_blocks; 54206 int reserved_data_blocks; 54207 int quota_claim; 54208 __u16 mode; 54209 char __data[0]; 54210 }; 54211 54212 struct trace_event_raw_ext4_da_reserve_space { 54213 struct trace_entry ent; 54214 dev_t dev; 54215 ino_t ino; 54216 __u64 i_blocks; 54217 int reserved_data_blocks; 54218 __u16 mode; 54219 char __data[0]; 54220 }; 54221 54222 struct trace_event_raw_ext4_da_release_space { 54223 struct trace_entry ent; 54224 dev_t dev; 54225 ino_t ino; 54226 __u64 i_blocks; 54227 int freed_blocks; 54228 int reserved_data_blocks; 54229 __u16 mode; 54230 char __data[0]; 54231 }; 54232 54233 struct trace_event_raw_ext4__bitmap_load { 54234 struct trace_entry ent; 54235 dev_t dev; 54236 __u32 group; 54237 char __data[0]; 54238 }; 54239 54240 struct trace_event_raw_ext4_read_block_bitmap_load { 54241 struct trace_entry ent; 54242 dev_t dev; 54243 __u32 group; 54244 bool prefetch; 54245 char __data[0]; 54246 }; 54247 54248 struct trace_event_raw_ext4_direct_IO_enter { 54249 struct trace_entry ent; 54250 dev_t dev; 54251 ino_t ino; 54252 loff_t pos; 54253 long unsigned int len; 54254 int rw; 54255 char __data[0]; 54256 }; 54257 54258 struct trace_event_raw_ext4_direct_IO_exit { 54259 struct trace_entry ent; 54260 dev_t dev; 54261 ino_t ino; 54262 loff_t pos; 54263 long unsigned int len; 54264 int rw; 54265 int ret; 54266 char __data[0]; 54267 }; 54268 54269 struct trace_event_raw_ext4__fallocate_mode { 54270 struct trace_entry ent; 54271 dev_t dev; 54272 ino_t ino; 54273 loff_t offset; 54274 loff_t len; 54275 int mode; 54276 char __data[0]; 54277 }; 54278 54279 struct trace_event_raw_ext4_fallocate_exit { 54280 struct trace_entry ent; 54281 dev_t dev; 54282 ino_t ino; 54283 loff_t pos; 54284 unsigned int blocks; 54285 int ret; 54286 char __data[0]; 54287 }; 54288 54289 struct trace_event_raw_ext4_unlink_enter { 54290 struct trace_entry ent; 54291 dev_t dev; 54292 ino_t ino; 54293 ino_t parent; 54294 loff_t size; 54295 char __data[0]; 54296 }; 54297 54298 struct trace_event_raw_ext4_unlink_exit { 54299 struct trace_entry ent; 54300 dev_t dev; 54301 ino_t ino; 54302 int ret; 54303 char __data[0]; 54304 }; 54305 54306 struct trace_event_raw_ext4__truncate { 54307 struct trace_entry ent; 54308 dev_t dev; 54309 ino_t ino; 54310 __u64 blocks; 54311 char __data[0]; 54312 }; 54313 54314 struct trace_event_raw_ext4_ext_convert_to_initialized_enter { 54315 struct trace_entry ent; 54316 dev_t dev; 54317 ino_t ino; 54318 ext4_lblk_t m_lblk; 54319 unsigned int m_len; 54320 ext4_lblk_t u_lblk; 54321 unsigned int u_len; 54322 ext4_fsblk_t u_pblk; 54323 char __data[0]; 54324 }; 54325 54326 struct trace_event_raw_ext4_ext_convert_to_initialized_fastpath { 54327 struct trace_entry ent; 54328 dev_t dev; 54329 ino_t ino; 54330 ext4_lblk_t m_lblk; 54331 unsigned int m_len; 54332 ext4_lblk_t u_lblk; 54333 unsigned int u_len; 54334 ext4_fsblk_t u_pblk; 54335 ext4_lblk_t i_lblk; 54336 unsigned int i_len; 54337 ext4_fsblk_t i_pblk; 54338 char __data[0]; 54339 }; 54340 54341 struct trace_event_raw_ext4__map_blocks_enter { 54342 struct trace_entry ent; 54343 dev_t dev; 54344 ino_t ino; 54345 ext4_lblk_t lblk; 54346 unsigned int len; 54347 unsigned int flags; 54348 char __data[0]; 54349 }; 54350 54351 struct trace_event_raw_ext4__map_blocks_exit { 54352 struct trace_entry ent; 54353 dev_t dev; 54354 ino_t ino; 54355 unsigned int flags; 54356 ext4_fsblk_t pblk; 54357 ext4_lblk_t lblk; 54358 unsigned int len; 54359 unsigned int mflags; 54360 int ret; 54361 char __data[0]; 54362 }; 54363 54364 struct trace_event_raw_ext4_ext_load_extent { 54365 struct trace_entry ent; 54366 dev_t dev; 54367 ino_t ino; 54368 ext4_fsblk_t pblk; 54369 ext4_lblk_t lblk; 54370 char __data[0]; 54371 }; 54372 54373 struct trace_event_raw_ext4_load_inode { 54374 struct trace_entry ent; 54375 dev_t dev; 54376 ino_t ino; 54377 char __data[0]; 54378 }; 54379 54380 struct trace_event_raw_ext4_journal_start { 54381 struct trace_entry ent; 54382 dev_t dev; 54383 long unsigned int ip; 54384 int blocks; 54385 int rsv_blocks; 54386 int revoke_creds; 54387 char __data[0]; 54388 }; 54389 54390 struct trace_event_raw_ext4_journal_start_reserved { 54391 struct trace_entry ent; 54392 dev_t dev; 54393 long unsigned int ip; 54394 int blocks; 54395 char __data[0]; 54396 }; 54397 54398 struct trace_event_raw_ext4__trim { 54399 struct trace_entry ent; 54400 int dev_major; 54401 int dev_minor; 54402 __u32 group; 54403 int start; 54404 int len; 54405 char __data[0]; 54406 }; 54407 54408 struct trace_event_raw_ext4_ext_handle_unwritten_extents { 54409 struct trace_entry ent; 54410 dev_t dev; 54411 ino_t ino; 54412 int flags; 54413 ext4_lblk_t lblk; 54414 ext4_fsblk_t pblk; 54415 unsigned int len; 54416 unsigned int allocated; 54417 ext4_fsblk_t newblk; 54418 char __data[0]; 54419 }; 54420 54421 struct trace_event_raw_ext4_get_implied_cluster_alloc_exit { 54422 struct trace_entry ent; 54423 dev_t dev; 54424 unsigned int flags; 54425 ext4_lblk_t lblk; 54426 ext4_fsblk_t pblk; 54427 unsigned int len; 54428 int ret; 54429 char __data[0]; 54430 }; 54431 54432 struct trace_event_raw_ext4_ext_put_in_cache { 54433 struct trace_entry ent; 54434 dev_t dev; 54435 ino_t ino; 54436 ext4_lblk_t lblk; 54437 unsigned int len; 54438 ext4_fsblk_t start; 54439 char __data[0]; 54440 }; 54441 54442 struct trace_event_raw_ext4_ext_in_cache { 54443 struct trace_entry ent; 54444 dev_t dev; 54445 ino_t ino; 54446 ext4_lblk_t lblk; 54447 int ret; 54448 char __data[0]; 54449 }; 54450 54451 struct trace_event_raw_ext4_find_delalloc_range { 54452 struct trace_entry ent; 54453 dev_t dev; 54454 ino_t ino; 54455 ext4_lblk_t from; 54456 ext4_lblk_t to; 54457 int reverse; 54458 int found; 54459 ext4_lblk_t found_blk; 54460 char __data[0]; 54461 }; 54462 54463 struct trace_event_raw_ext4_get_reserved_cluster_alloc { 54464 struct trace_entry ent; 54465 dev_t dev; 54466 ino_t ino; 54467 ext4_lblk_t lblk; 54468 unsigned int len; 54469 char __data[0]; 54470 }; 54471 54472 struct trace_event_raw_ext4_ext_show_extent { 54473 struct trace_entry ent; 54474 dev_t dev; 54475 ino_t ino; 54476 ext4_fsblk_t pblk; 54477 ext4_lblk_t lblk; 54478 short unsigned int len; 54479 char __data[0]; 54480 }; 54481 54482 struct trace_event_raw_ext4_remove_blocks { 54483 struct trace_entry ent; 54484 dev_t dev; 54485 ino_t ino; 54486 ext4_lblk_t from; 54487 ext4_lblk_t to; 54488 ext4_fsblk_t ee_pblk; 54489 ext4_lblk_t ee_lblk; 54490 short unsigned int ee_len; 54491 ext4_fsblk_t pc_pclu; 54492 ext4_lblk_t pc_lblk; 54493 int pc_state; 54494 char __data[0]; 54495 }; 54496 54497 struct trace_event_raw_ext4_ext_rm_leaf { 54498 struct trace_entry ent; 54499 dev_t dev; 54500 ino_t ino; 54501 ext4_lblk_t start; 54502 ext4_lblk_t ee_lblk; 54503 ext4_fsblk_t ee_pblk; 54504 short int ee_len; 54505 ext4_fsblk_t pc_pclu; 54506 ext4_lblk_t pc_lblk; 54507 int pc_state; 54508 char __data[0]; 54509 }; 54510 54511 struct trace_event_raw_ext4_ext_rm_idx { 54512 struct trace_entry ent; 54513 dev_t dev; 54514 ino_t ino; 54515 ext4_fsblk_t pblk; 54516 char __data[0]; 54517 }; 54518 54519 struct trace_event_raw_ext4_ext_remove_space { 54520 struct trace_entry ent; 54521 dev_t dev; 54522 ino_t ino; 54523 ext4_lblk_t start; 54524 ext4_lblk_t end; 54525 int depth; 54526 char __data[0]; 54527 }; 54528 54529 struct trace_event_raw_ext4_ext_remove_space_done { 54530 struct trace_entry ent; 54531 dev_t dev; 54532 ino_t ino; 54533 ext4_lblk_t start; 54534 ext4_lblk_t end; 54535 int depth; 54536 ext4_fsblk_t pc_pclu; 54537 ext4_lblk_t pc_lblk; 54538 int pc_state; 54539 short unsigned int eh_entries; 54540 char __data[0]; 54541 }; 54542 54543 struct trace_event_raw_ext4__es_extent { 54544 struct trace_entry ent; 54545 dev_t dev; 54546 ino_t ino; 54547 ext4_lblk_t lblk; 54548 ext4_lblk_t len; 54549 ext4_fsblk_t pblk; 54550 char status; 54551 char __data[0]; 54552 }; 54553 54554 struct trace_event_raw_ext4_es_remove_extent { 54555 struct trace_entry ent; 54556 dev_t dev; 54557 ino_t ino; 54558 loff_t lblk; 54559 loff_t len; 54560 char __data[0]; 54561 }; 54562 54563 struct trace_event_raw_ext4_es_find_extent_range_enter { 54564 struct trace_entry ent; 54565 dev_t dev; 54566 ino_t ino; 54567 ext4_lblk_t lblk; 54568 char __data[0]; 54569 }; 54570 54571 struct trace_event_raw_ext4_es_find_extent_range_exit { 54572 struct trace_entry ent; 54573 dev_t dev; 54574 ino_t ino; 54575 ext4_lblk_t lblk; 54576 ext4_lblk_t len; 54577 ext4_fsblk_t pblk; 54578 char status; 54579 char __data[0]; 54580 }; 54581 54582 struct trace_event_raw_ext4_es_lookup_extent_enter { 54583 struct trace_entry ent; 54584 dev_t dev; 54585 ino_t ino; 54586 ext4_lblk_t lblk; 54587 char __data[0]; 54588 }; 54589 54590 struct trace_event_raw_ext4_es_lookup_extent_exit { 54591 struct trace_entry ent; 54592 dev_t dev; 54593 ino_t ino; 54594 ext4_lblk_t lblk; 54595 ext4_lblk_t len; 54596 ext4_fsblk_t pblk; 54597 char status; 54598 int found; 54599 char __data[0]; 54600 }; 54601 54602 struct trace_event_raw_ext4__es_shrink_enter { 54603 struct trace_entry ent; 54604 dev_t dev; 54605 int nr_to_scan; 54606 int cache_cnt; 54607 char __data[0]; 54608 }; 54609 54610 struct trace_event_raw_ext4_es_shrink_scan_exit { 54611 struct trace_entry ent; 54612 dev_t dev; 54613 int nr_shrunk; 54614 int cache_cnt; 54615 char __data[0]; 54616 }; 54617 54618 struct trace_event_raw_ext4_collapse_range { 54619 struct trace_entry ent; 54620 dev_t dev; 54621 ino_t ino; 54622 loff_t offset; 54623 loff_t len; 54624 char __data[0]; 54625 }; 54626 54627 struct trace_event_raw_ext4_insert_range { 54628 struct trace_entry ent; 54629 dev_t dev; 54630 ino_t ino; 54631 loff_t offset; 54632 loff_t len; 54633 char __data[0]; 54634 }; 54635 54636 struct trace_event_raw_ext4_es_shrink { 54637 struct trace_entry ent; 54638 dev_t dev; 54639 int nr_shrunk; 54640 long long unsigned int scan_time; 54641 int nr_skipped; 54642 int retried; 54643 char __data[0]; 54644 }; 54645 54646 struct trace_event_raw_ext4_es_insert_delayed_block { 54647 struct trace_entry ent; 54648 dev_t dev; 54649 ino_t ino; 54650 ext4_lblk_t lblk; 54651 ext4_lblk_t len; 54652 ext4_fsblk_t pblk; 54653 char status; 54654 bool allocated; 54655 char __data[0]; 54656 }; 54657 54658 struct trace_event_raw_ext4_fsmap_class { 54659 struct trace_entry ent; 54660 dev_t dev; 54661 dev_t keydev; 54662 u32 agno; 54663 u64 bno; 54664 u64 len; 54665 u64 owner; 54666 char __data[0]; 54667 }; 54668 54669 struct trace_event_raw_ext4_getfsmap_class { 54670 struct trace_entry ent; 54671 dev_t dev; 54672 dev_t keydev; 54673 u64 block; 54674 u64 len; 54675 u64 owner; 54676 u64 flags; 54677 char __data[0]; 54678 }; 54679 54680 struct trace_event_raw_ext4_shutdown { 54681 struct trace_entry ent; 54682 dev_t dev; 54683 unsigned int flags; 54684 char __data[0]; 54685 }; 54686 54687 struct trace_event_raw_ext4_error { 54688 struct trace_entry ent; 54689 dev_t dev; 54690 const char *function; 54691 unsigned int line; 54692 char __data[0]; 54693 }; 54694 54695 struct trace_event_raw_ext4_prefetch_bitmaps { 54696 struct trace_entry ent; 54697 dev_t dev; 54698 __u32 group; 54699 __u32 next; 54700 __u32 ios; 54701 char __data[0]; 54702 }; 54703 54704 struct trace_event_raw_ext4_lazy_itable_init { 54705 struct trace_entry ent; 54706 dev_t dev; 54707 __u32 group; 54708 char __data[0]; 54709 }; 54710 54711 struct trace_event_raw_ext4_fc_replay_scan { 54712 struct trace_entry ent; 54713 dev_t dev; 54714 int error; 54715 int off; 54716 char __data[0]; 54717 }; 54718 54719 struct trace_event_raw_ext4_fc_replay { 54720 struct trace_entry ent; 54721 dev_t dev; 54722 int tag; 54723 int ino; 54724 int priv1; 54725 int priv2; 54726 char __data[0]; 54727 }; 54728 54729 struct trace_event_raw_ext4_fc_commit_start { 54730 struct trace_entry ent; 54731 dev_t dev; 54732 char __data[0]; 54733 }; 54734 54735 struct trace_event_raw_ext4_fc_commit_stop { 54736 struct trace_entry ent; 54737 dev_t dev; 54738 int nblks; 54739 int reason; 54740 int num_fc; 54741 int num_fc_ineligible; 54742 int nblks_agg; 54743 char __data[0]; 54744 }; 54745 54746 struct trace_event_raw_ext4_fc_stats { 54747 struct trace_entry ent; 54748 dev_t dev; 54749 struct ext4_sb_info *sbi; 54750 int count; 54751 char __data[0]; 54752 }; 54753 54754 struct trace_event_raw_ext4_fc_track_create { 54755 struct trace_entry ent; 54756 dev_t dev; 54757 int ino; 54758 int error; 54759 char __data[0]; 54760 }; 54761 54762 struct trace_event_raw_ext4_fc_track_link { 54763 struct trace_entry ent; 54764 dev_t dev; 54765 int ino; 54766 int error; 54767 char __data[0]; 54768 }; 54769 54770 struct trace_event_raw_ext4_fc_track_unlink { 54771 struct trace_entry ent; 54772 dev_t dev; 54773 int ino; 54774 int error; 54775 char __data[0]; 54776 }; 54777 54778 struct trace_event_raw_ext4_fc_track_inode { 54779 struct trace_entry ent; 54780 dev_t dev; 54781 int ino; 54782 int error; 54783 char __data[0]; 54784 }; 54785 54786 struct trace_event_raw_ext4_fc_track_range { 54787 struct trace_entry ent; 54788 dev_t dev; 54789 int ino; 54790 long int start; 54791 long int end; 54792 int error; 54793 char __data[0]; 54794 }; 54795 54796 struct trace_event_data_offsets_ext4_other_inode_update_time {}; 54797 54798 struct trace_event_data_offsets_ext4_free_inode {}; 54799 54800 struct trace_event_data_offsets_ext4_request_inode {}; 54801 54802 struct trace_event_data_offsets_ext4_allocate_inode {}; 54803 54804 struct trace_event_data_offsets_ext4_evict_inode {}; 54805 54806 struct trace_event_data_offsets_ext4_drop_inode {}; 54807 54808 struct trace_event_data_offsets_ext4_nfs_commit_metadata {}; 54809 54810 struct trace_event_data_offsets_ext4_mark_inode_dirty {}; 54811 54812 struct trace_event_data_offsets_ext4_begin_ordered_truncate {}; 54813 54814 struct trace_event_data_offsets_ext4__write_begin {}; 54815 54816 struct trace_event_data_offsets_ext4__write_end {}; 54817 54818 struct trace_event_data_offsets_ext4_writepages {}; 54819 54820 struct trace_event_data_offsets_ext4_da_write_pages {}; 54821 54822 struct trace_event_data_offsets_ext4_da_write_pages_extent {}; 54823 54824 struct trace_event_data_offsets_ext4_writepages_result {}; 54825 54826 struct trace_event_data_offsets_ext4__page_op {}; 54827 54828 struct trace_event_data_offsets_ext4_invalidatepage_op {}; 54829 54830 struct trace_event_data_offsets_ext4_discard_blocks {}; 54831 54832 struct trace_event_data_offsets_ext4__mb_new_pa {}; 54833 54834 struct trace_event_data_offsets_ext4_mb_release_inode_pa {}; 54835 54836 struct trace_event_data_offsets_ext4_mb_release_group_pa {}; 54837 54838 struct trace_event_data_offsets_ext4_discard_preallocations {}; 54839 54840 struct trace_event_data_offsets_ext4_mb_discard_preallocations {}; 54841 54842 struct trace_event_data_offsets_ext4_request_blocks {}; 54843 54844 struct trace_event_data_offsets_ext4_allocate_blocks {}; 54845 54846 struct trace_event_data_offsets_ext4_free_blocks {}; 54847 54848 struct trace_event_data_offsets_ext4_sync_file_enter {}; 54849 54850 struct trace_event_data_offsets_ext4_sync_file_exit {}; 54851 54852 struct trace_event_data_offsets_ext4_sync_fs {}; 54853 54854 struct trace_event_data_offsets_ext4_alloc_da_blocks {}; 54855 54856 struct trace_event_data_offsets_ext4_mballoc_alloc {}; 54857 54858 struct trace_event_data_offsets_ext4_mballoc_prealloc {}; 54859 54860 struct trace_event_data_offsets_ext4__mballoc {}; 54861 54862 struct trace_event_data_offsets_ext4_forget {}; 54863 54864 struct trace_event_data_offsets_ext4_da_update_reserve_space {}; 54865 54866 struct trace_event_data_offsets_ext4_da_reserve_space {}; 54867 54868 struct trace_event_data_offsets_ext4_da_release_space {}; 54869 54870 struct trace_event_data_offsets_ext4__bitmap_load {}; 54871 54872 struct trace_event_data_offsets_ext4_read_block_bitmap_load {}; 54873 54874 struct trace_event_data_offsets_ext4_direct_IO_enter {}; 54875 54876 struct trace_event_data_offsets_ext4_direct_IO_exit {}; 54877 54878 struct trace_event_data_offsets_ext4__fallocate_mode {}; 54879 54880 struct trace_event_data_offsets_ext4_fallocate_exit {}; 54881 54882 struct trace_event_data_offsets_ext4_unlink_enter {}; 54883 54884 struct trace_event_data_offsets_ext4_unlink_exit {}; 54885 54886 struct trace_event_data_offsets_ext4__truncate {}; 54887 54888 struct trace_event_data_offsets_ext4_ext_convert_to_initialized_enter {}; 54889 54890 struct trace_event_data_offsets_ext4_ext_convert_to_initialized_fastpath {}; 54891 54892 struct trace_event_data_offsets_ext4__map_blocks_enter {}; 54893 54894 struct trace_event_data_offsets_ext4__map_blocks_exit {}; 54895 54896 struct trace_event_data_offsets_ext4_ext_load_extent {}; 54897 54898 struct trace_event_data_offsets_ext4_load_inode {}; 54899 54900 struct trace_event_data_offsets_ext4_journal_start {}; 54901 54902 struct trace_event_data_offsets_ext4_journal_start_reserved {}; 54903 54904 struct trace_event_data_offsets_ext4__trim {}; 54905 54906 struct trace_event_data_offsets_ext4_ext_handle_unwritten_extents {}; 54907 54908 struct trace_event_data_offsets_ext4_get_implied_cluster_alloc_exit {}; 54909 54910 struct trace_event_data_offsets_ext4_ext_put_in_cache {}; 54911 54912 struct trace_event_data_offsets_ext4_ext_in_cache {}; 54913 54914 struct trace_event_data_offsets_ext4_find_delalloc_range {}; 54915 54916 struct trace_event_data_offsets_ext4_get_reserved_cluster_alloc {}; 54917 54918 struct trace_event_data_offsets_ext4_ext_show_extent {}; 54919 54920 struct trace_event_data_offsets_ext4_remove_blocks {}; 54921 54922 struct trace_event_data_offsets_ext4_ext_rm_leaf {}; 54923 54924 struct trace_event_data_offsets_ext4_ext_rm_idx {}; 54925 54926 struct trace_event_data_offsets_ext4_ext_remove_space {}; 54927 54928 struct trace_event_data_offsets_ext4_ext_remove_space_done {}; 54929 54930 struct trace_event_data_offsets_ext4__es_extent {}; 54931 54932 struct trace_event_data_offsets_ext4_es_remove_extent {}; 54933 54934 struct trace_event_data_offsets_ext4_es_find_extent_range_enter {}; 54935 54936 struct trace_event_data_offsets_ext4_es_find_extent_range_exit {}; 54937 54938 struct trace_event_data_offsets_ext4_es_lookup_extent_enter {}; 54939 54940 struct trace_event_data_offsets_ext4_es_lookup_extent_exit {}; 54941 54942 struct trace_event_data_offsets_ext4__es_shrink_enter {}; 54943 54944 struct trace_event_data_offsets_ext4_es_shrink_scan_exit {}; 54945 54946 struct trace_event_data_offsets_ext4_collapse_range {}; 54947 54948 struct trace_event_data_offsets_ext4_insert_range {}; 54949 54950 struct trace_event_data_offsets_ext4_es_shrink {}; 54951 54952 struct trace_event_data_offsets_ext4_es_insert_delayed_block {}; 54953 54954 struct trace_event_data_offsets_ext4_fsmap_class {}; 54955 54956 struct trace_event_data_offsets_ext4_getfsmap_class {}; 54957 54958 struct trace_event_data_offsets_ext4_shutdown {}; 54959 54960 struct trace_event_data_offsets_ext4_error {}; 54961 54962 struct trace_event_data_offsets_ext4_prefetch_bitmaps {}; 54963 54964 struct trace_event_data_offsets_ext4_lazy_itable_init {}; 54965 54966 struct trace_event_data_offsets_ext4_fc_replay_scan {}; 54967 54968 struct trace_event_data_offsets_ext4_fc_replay {}; 54969 54970 struct trace_event_data_offsets_ext4_fc_commit_start {}; 54971 54972 struct trace_event_data_offsets_ext4_fc_commit_stop {}; 54973 54974 struct trace_event_data_offsets_ext4_fc_stats {}; 54975 54976 struct trace_event_data_offsets_ext4_fc_track_create {}; 54977 54978 struct trace_event_data_offsets_ext4_fc_track_link {}; 54979 54980 struct trace_event_data_offsets_ext4_fc_track_unlink {}; 54981 54982 struct trace_event_data_offsets_ext4_fc_track_inode {}; 54983 54984 struct trace_event_data_offsets_ext4_fc_track_range {}; 54985 54986 typedef void (*btf_trace_ext4_other_inode_update_time)(void *, struct inode *, ino_t); 54987 54988 typedef void (*btf_trace_ext4_free_inode)(void *, struct inode *); 54989 54990 typedef void (*btf_trace_ext4_request_inode)(void *, struct inode *, int); 54991 54992 typedef void (*btf_trace_ext4_allocate_inode)(void *, struct inode *, struct inode *, int); 54993 54994 typedef void (*btf_trace_ext4_evict_inode)(void *, struct inode *); 54995 54996 typedef void (*btf_trace_ext4_drop_inode)(void *, struct inode *, int); 54997 54998 typedef void (*btf_trace_ext4_nfs_commit_metadata)(void *, struct inode *); 54999 55000 typedef void (*btf_trace_ext4_mark_inode_dirty)(void *, struct inode *, long unsigned int); 55001 55002 typedef void (*btf_trace_ext4_begin_ordered_truncate)(void *, struct inode *, loff_t); 55003 55004 typedef void (*btf_trace_ext4_write_begin)(void *, struct inode *, loff_t, unsigned int, unsigned int); 55005 55006 typedef void (*btf_trace_ext4_da_write_begin)(void *, struct inode *, loff_t, unsigned int, unsigned int); 55007 55008 typedef void (*btf_trace_ext4_write_end)(void *, struct inode *, loff_t, unsigned int, unsigned int); 55009 55010 typedef void (*btf_trace_ext4_journalled_write_end)(void *, struct inode *, loff_t, unsigned int, unsigned int); 55011 55012 typedef void (*btf_trace_ext4_da_write_end)(void *, struct inode *, loff_t, unsigned int, unsigned int); 55013 55014 typedef void (*btf_trace_ext4_writepages)(void *, struct inode *, struct writeback_control *); 55015 55016 typedef void (*btf_trace_ext4_da_write_pages)(void *, struct inode *, long unsigned int, struct writeback_control *); 55017 55018 typedef void (*btf_trace_ext4_da_write_pages_extent)(void *, struct inode *, struct ext4_map_blocks *); 55019 55020 typedef void (*btf_trace_ext4_writepages_result)(void *, struct inode *, struct writeback_control *, int, int); 55021 55022 typedef void (*btf_trace_ext4_writepage)(void *, struct page *); 55023 55024 typedef void (*btf_trace_ext4_readpage)(void *, struct page *); 55025 55026 typedef void (*btf_trace_ext4_releasepage)(void *, struct page *); 55027 55028 typedef void (*btf_trace_ext4_invalidatepage)(void *, struct page *, unsigned int, unsigned int); 55029 55030 typedef void (*btf_trace_ext4_journalled_invalidatepage)(void *, struct page *, unsigned int, unsigned int); 55031 55032 typedef void (*btf_trace_ext4_discard_blocks)(void *, struct super_block *, long long unsigned int, long long unsigned int); 55033 55034 typedef void (*btf_trace_ext4_mb_new_inode_pa)(void *, struct ext4_allocation_context *, struct ext4_prealloc_space *); 55035 55036 typedef void (*btf_trace_ext4_mb_new_group_pa)(void *, struct ext4_allocation_context *, struct ext4_prealloc_space *); 55037 55038 typedef void (*btf_trace_ext4_mb_release_inode_pa)(void *, struct ext4_prealloc_space *, long long unsigned int, unsigned int); 55039 55040 typedef void (*btf_trace_ext4_mb_release_group_pa)(void *, struct super_block *, struct ext4_prealloc_space *); 55041 55042 typedef void (*btf_trace_ext4_discard_preallocations)(void *, struct inode *, unsigned int, unsigned int); 55043 55044 typedef void (*btf_trace_ext4_mb_discard_preallocations)(void *, struct super_block *, int); 55045 55046 typedef void (*btf_trace_ext4_request_blocks)(void *, struct ext4_allocation_request *); 55047 55048 typedef void (*btf_trace_ext4_allocate_blocks)(void *, struct ext4_allocation_request *, long long unsigned int); 55049 55050 typedef void (*btf_trace_ext4_free_blocks)(void *, struct inode *, __u64, long unsigned int, int); 55051 55052 typedef void (*btf_trace_ext4_sync_file_enter)(void *, struct file *, int); 55053 55054 typedef void (*btf_trace_ext4_sync_file_exit)(void *, struct inode *, int); 55055 55056 typedef void (*btf_trace_ext4_sync_fs)(void *, struct super_block *, int); 55057 55058 typedef void (*btf_trace_ext4_alloc_da_blocks)(void *, struct inode *); 55059 55060 typedef void (*btf_trace_ext4_mballoc_alloc)(void *, struct ext4_allocation_context *); 55061 55062 typedef void (*btf_trace_ext4_mballoc_prealloc)(void *, struct ext4_allocation_context *); 55063 55064 typedef void (*btf_trace_ext4_mballoc_discard)(void *, struct super_block *, struct inode *, ext4_group_t, ext4_grpblk_t, ext4_grpblk_t); 55065 55066 typedef void (*btf_trace_ext4_mballoc_free)(void *, struct super_block *, struct inode *, ext4_group_t, ext4_grpblk_t, ext4_grpblk_t); 55067 55068 typedef void (*btf_trace_ext4_forget)(void *, struct inode *, int, __u64); 55069 55070 typedef void (*btf_trace_ext4_da_update_reserve_space)(void *, struct inode *, int, int); 55071 55072 typedef void (*btf_trace_ext4_da_reserve_space)(void *, struct inode *); 55073 55074 typedef void (*btf_trace_ext4_da_release_space)(void *, struct inode *, int); 55075 55076 typedef void (*btf_trace_ext4_mb_bitmap_load)(void *, struct super_block *, long unsigned int); 55077 55078 typedef void (*btf_trace_ext4_mb_buddy_bitmap_load)(void *, struct super_block *, long unsigned int); 55079 55080 typedef void (*btf_trace_ext4_load_inode_bitmap)(void *, struct super_block *, long unsigned int); 55081 55082 typedef void (*btf_trace_ext4_read_block_bitmap_load)(void *, struct super_block *, long unsigned int, bool); 55083 55084 typedef void (*btf_trace_ext4_direct_IO_enter)(void *, struct inode *, loff_t, long unsigned int, int); 55085 55086 typedef void (*btf_trace_ext4_direct_IO_exit)(void *, struct inode *, loff_t, long unsigned int, int, int); 55087 55088 typedef void (*btf_trace_ext4_fallocate_enter)(void *, struct inode *, loff_t, loff_t, int); 55089 55090 typedef void (*btf_trace_ext4_punch_hole)(void *, struct inode *, loff_t, loff_t, int); 55091 55092 typedef void (*btf_trace_ext4_zero_range)(void *, struct inode *, loff_t, loff_t, int); 55093 55094 typedef void (*btf_trace_ext4_fallocate_exit)(void *, struct inode *, loff_t, unsigned int, int); 55095 55096 typedef void (*btf_trace_ext4_unlink_enter)(void *, struct inode *, struct dentry *); 55097 55098 typedef void (*btf_trace_ext4_unlink_exit)(void *, struct dentry *, int); 55099 55100 typedef void (*btf_trace_ext4_truncate_enter)(void *, struct inode *); 55101 55102 typedef void (*btf_trace_ext4_truncate_exit)(void *, struct inode *); 55103 55104 typedef void (*btf_trace_ext4_ext_convert_to_initialized_enter)(void *, struct inode *, struct ext4_map_blocks *, struct ext4_extent *); 55105 55106 typedef void (*btf_trace_ext4_ext_convert_to_initialized_fastpath)(void *, struct inode *, struct ext4_map_blocks *, struct ext4_extent *, struct ext4_extent *); 55107 55108 typedef void (*btf_trace_ext4_ext_map_blocks_enter)(void *, struct inode *, ext4_lblk_t, unsigned int, unsigned int); 55109 55110 typedef void (*btf_trace_ext4_ind_map_blocks_enter)(void *, struct inode *, ext4_lblk_t, unsigned int, unsigned int); 55111 55112 typedef void (*btf_trace_ext4_ext_map_blocks_exit)(void *, struct inode *, unsigned int, struct ext4_map_blocks *, int); 55113 55114 typedef void (*btf_trace_ext4_ind_map_blocks_exit)(void *, struct inode *, unsigned int, struct ext4_map_blocks *, int); 55115 55116 typedef void (*btf_trace_ext4_ext_load_extent)(void *, struct inode *, ext4_lblk_t, ext4_fsblk_t); 55117 55118 typedef void (*btf_trace_ext4_load_inode)(void *, struct super_block *, long unsigned int); 55119 55120 typedef void (*btf_trace_ext4_journal_start)(void *, struct super_block *, int, int, int, long unsigned int); 55121 55122 typedef void (*btf_trace_ext4_journal_start_reserved)(void *, struct super_block *, int, long unsigned int); 55123 55124 typedef void (*btf_trace_ext4_trim_extent)(void *, struct super_block *, ext4_group_t, ext4_grpblk_t, ext4_grpblk_t); 55125 55126 typedef void (*btf_trace_ext4_trim_all_free)(void *, struct super_block *, ext4_group_t, ext4_grpblk_t, ext4_grpblk_t); 55127 55128 typedef void (*btf_trace_ext4_ext_handle_unwritten_extents)(void *, struct inode *, struct ext4_map_blocks *, int, unsigned int, ext4_fsblk_t); 55129 55130 typedef void (*btf_trace_ext4_get_implied_cluster_alloc_exit)(void *, struct super_block *, struct ext4_map_blocks *, int); 55131 55132 typedef void (*btf_trace_ext4_ext_put_in_cache)(void *, struct inode *, ext4_lblk_t, unsigned int, ext4_fsblk_t); 55133 55134 typedef void (*btf_trace_ext4_ext_in_cache)(void *, struct inode *, ext4_lblk_t, int); 55135 55136 typedef void (*btf_trace_ext4_find_delalloc_range)(void *, struct inode *, ext4_lblk_t, ext4_lblk_t, int, int, ext4_lblk_t); 55137 55138 typedef void (*btf_trace_ext4_get_reserved_cluster_alloc)(void *, struct inode *, ext4_lblk_t, unsigned int); 55139 55140 typedef void (*btf_trace_ext4_ext_show_extent)(void *, struct inode *, ext4_lblk_t, ext4_fsblk_t, short unsigned int); 55141 55142 typedef void (*btf_trace_ext4_remove_blocks)(void *, struct inode *, struct ext4_extent *, ext4_lblk_t, ext4_fsblk_t, struct partial_cluster *); 55143 55144 typedef void (*btf_trace_ext4_ext_rm_leaf)(void *, struct inode *, ext4_lblk_t, struct ext4_extent *, struct partial_cluster *); 55145 55146 typedef void (*btf_trace_ext4_ext_rm_idx)(void *, struct inode *, ext4_fsblk_t); 55147 55148 typedef void (*btf_trace_ext4_ext_remove_space)(void *, struct inode *, ext4_lblk_t, ext4_lblk_t, int); 55149 55150 typedef void (*btf_trace_ext4_ext_remove_space_done)(void *, struct inode *, ext4_lblk_t, ext4_lblk_t, int, struct partial_cluster *, __le16); 55151 55152 typedef void (*btf_trace_ext4_es_insert_extent)(void *, struct inode *, struct extent_status *); 55153 55154 typedef void (*btf_trace_ext4_es_cache_extent)(void *, struct inode *, struct extent_status *); 55155 55156 typedef void (*btf_trace_ext4_es_remove_extent)(void *, struct inode *, ext4_lblk_t, ext4_lblk_t); 55157 55158 typedef void (*btf_trace_ext4_es_find_extent_range_enter)(void *, struct inode *, ext4_lblk_t); 55159 55160 typedef void (*btf_trace_ext4_es_find_extent_range_exit)(void *, struct inode *, struct extent_status *); 55161 55162 typedef void (*btf_trace_ext4_es_lookup_extent_enter)(void *, struct inode *, ext4_lblk_t); 55163 55164 typedef void (*btf_trace_ext4_es_lookup_extent_exit)(void *, struct inode *, struct extent_status *, int); 55165 55166 typedef void (*btf_trace_ext4_es_shrink_count)(void *, struct super_block *, int, int); 55167 55168 typedef void (*btf_trace_ext4_es_shrink_scan_enter)(void *, struct super_block *, int, int); 55169 55170 typedef void (*btf_trace_ext4_es_shrink_scan_exit)(void *, struct super_block *, int, int); 55171 55172 typedef void (*btf_trace_ext4_collapse_range)(void *, struct inode *, loff_t, loff_t); 55173 55174 typedef void (*btf_trace_ext4_insert_range)(void *, struct inode *, loff_t, loff_t); 55175 55176 typedef void (*btf_trace_ext4_es_shrink)(void *, struct super_block *, int, u64, int, int); 55177 55178 typedef void (*btf_trace_ext4_es_insert_delayed_block)(void *, struct inode *, struct extent_status *, bool); 55179 55180 typedef void (*btf_trace_ext4_fsmap_low_key)(void *, struct super_block *, u32, u32, u64, u64, u64); 55181 55182 typedef void (*btf_trace_ext4_fsmap_high_key)(void *, struct super_block *, u32, u32, u64, u64, u64); 55183 55184 typedef void (*btf_trace_ext4_fsmap_mapping)(void *, struct super_block *, u32, u32, u64, u64, u64); 55185 55186 typedef void (*btf_trace_ext4_getfsmap_low_key)(void *, struct super_block *, struct ext4_fsmap *); 55187 55188 typedef void (*btf_trace_ext4_getfsmap_high_key)(void *, struct super_block *, struct ext4_fsmap *); 55189 55190 typedef void (*btf_trace_ext4_getfsmap_mapping)(void *, struct super_block *, struct ext4_fsmap *); 55191 55192 typedef void (*btf_trace_ext4_shutdown)(void *, struct super_block *, long unsigned int); 55193 55194 typedef void (*btf_trace_ext4_error)(void *, struct super_block *, const char *, unsigned int); 55195 55196 typedef void (*btf_trace_ext4_prefetch_bitmaps)(void *, struct super_block *, ext4_group_t, ext4_group_t, unsigned int); 55197 55198 typedef void (*btf_trace_ext4_lazy_itable_init)(void *, struct super_block *, ext4_group_t); 55199 55200 typedef void (*btf_trace_ext4_fc_replay_scan)(void *, struct super_block *, int, int); 55201 55202 typedef void (*btf_trace_ext4_fc_replay)(void *, struct super_block *, int, int, int, int); 55203 55204 typedef void (*btf_trace_ext4_fc_commit_start)(void *, struct super_block *); 55205 55206 typedef void (*btf_trace_ext4_fc_commit_stop)(void *, struct super_block *, int, int); 55207 55208 typedef void (*btf_trace_ext4_fc_stats)(void *, struct super_block *); 55209 55210 typedef void (*btf_trace_ext4_fc_track_create)(void *, struct inode *, struct dentry *, int); 55211 55212 typedef void (*btf_trace_ext4_fc_track_link)(void *, struct inode *, struct dentry *, int); 55213 55214 typedef void (*btf_trace_ext4_fc_track_unlink)(void *, struct inode *, struct dentry *, int); 55215 55216 typedef void (*btf_trace_ext4_fc_track_inode)(void *, struct inode *, int); 55217 55218 typedef void (*btf_trace_ext4_fc_track_range)(void *, struct inode *, long int, long int, int); 55219 55220 struct ext4_err_translation { 55221 int code; 55222 int errno; 55223 }; 55224 55225 enum { 55226 Opt_bsd_df = 0, 55227 Opt_minix_df = 1, 55228 Opt_grpid = 2, 55229 Opt_nogrpid = 3, 55230 Opt_resgid = 4, 55231 Opt_resuid = 5, 55232 Opt_sb = 6, 55233 Opt_err_cont = 7, 55234 Opt_err_panic = 8, 55235 Opt_err_ro = 9, 55236 Opt_nouid32 = 10, 55237 Opt_debug = 11, 55238 Opt_removed = 12, 55239 Opt_user_xattr = 13, 55240 Opt_nouser_xattr = 14, 55241 Opt_acl = 15, 55242 Opt_noacl = 16, 55243 Opt_auto_da_alloc = 17, 55244 Opt_noauto_da_alloc = 18, 55245 Opt_noload = 19, 55246 Opt_commit = 20, 55247 Opt_min_batch_time = 21, 55248 Opt_max_batch_time = 22, 55249 Opt_journal_dev = 23, 55250 Opt_journal_path = 24, 55251 Opt_journal_checksum = 25, 55252 Opt_journal_async_commit = 26, 55253 Opt_abort = 27, 55254 Opt_data_journal = 28, 55255 Opt_data_ordered = 29, 55256 Opt_data_writeback = 30, 55257 Opt_data_err_abort = 31, 55258 Opt_data_err_ignore = 32, 55259 Opt_test_dummy_encryption = 33, 55260 Opt_inlinecrypt = 34, 55261 Opt_usrjquota = 35, 55262 Opt_grpjquota = 36, 55263 Opt_offusrjquota = 37, 55264 Opt_offgrpjquota = 38, 55265 Opt_jqfmt_vfsold = 39, 55266 Opt_jqfmt_vfsv0 = 40, 55267 Opt_jqfmt_vfsv1 = 41, 55268 Opt_quota = 42, 55269 Opt_noquota = 43, 55270 Opt_barrier = 44, 55271 Opt_nobarrier = 45, 55272 Opt_err___2 = 46, 55273 Opt_usrquota = 47, 55274 Opt_grpquota = 48, 55275 Opt_prjquota = 49, 55276 Opt_i_version = 50, 55277 Opt_dax = 51, 55278 Opt_dax_always = 52, 55279 Opt_dax_inode = 53, 55280 Opt_dax_never = 54, 55281 Opt_stripe = 55, 55282 Opt_delalloc = 56, 55283 Opt_nodelalloc = 57, 55284 Opt_warn_on_error = 58, 55285 Opt_nowarn_on_error = 59, 55286 Opt_mblk_io_submit = 60, 55287 Opt_lazytime = 61, 55288 Opt_nolazytime = 62, 55289 Opt_debug_want_extra_isize = 63, 55290 Opt_nomblk_io_submit = 64, 55291 Opt_block_validity = 65, 55292 Opt_noblock_validity = 66, 55293 Opt_inode_readahead_blks = 67, 55294 Opt_journal_ioprio = 68, 55295 Opt_dioread_nolock = 69, 55296 Opt_dioread_lock = 70, 55297 Opt_discard = 71, 55298 Opt_nodiscard = 72, 55299 Opt_init_itable = 73, 55300 Opt_noinit_itable = 74, 55301 Opt_max_dir_size_kb = 75, 55302 Opt_nojournal_checksum = 76, 55303 Opt_nombcache = 77, 55304 Opt_prefetch_block_bitmaps = 78, 55305 }; 55306 55307 struct mount_opts { 55308 int token; 55309 int mount_opt; 55310 int flags; 55311 }; 55312 55313 struct ext4_sb_encodings { 55314 __u16 magic; 55315 char *name; 55316 char *version; 55317 }; 55318 55319 struct ext4_mount_options { 55320 long unsigned int s_mount_opt; 55321 long unsigned int s_mount_opt2; 55322 kuid_t s_resuid; 55323 kgid_t s_resgid; 55324 long unsigned int s_commit_interval; 55325 u32 s_min_batch_time; 55326 u32 s_max_batch_time; 55327 int s_jquota_fmt; 55328 char *s_qf_names[3]; 55329 }; 55330 55331 enum { 55332 attr_noop = 0, 55333 attr_delayed_allocation_blocks = 1, 55334 attr_session_write_kbytes = 2, 55335 attr_lifetime_write_kbytes = 3, 55336 attr_reserved_clusters = 4, 55337 attr_sra_exceeded_retry_limit = 5, 55338 attr_inode_readahead = 6, 55339 attr_trigger_test_error = 7, 55340 attr_first_error_time = 8, 55341 attr_last_error_time = 9, 55342 attr_feature = 10, 55343 attr_pointer_ui = 11, 55344 attr_pointer_ul = 12, 55345 attr_pointer_u64 = 13, 55346 attr_pointer_u8 = 14, 55347 attr_pointer_string = 15, 55348 attr_pointer_atomic = 16, 55349 attr_journal_task = 17, 55350 }; 55351 55352 enum { 55353 ptr_explicit = 0, 55354 ptr_ext4_sb_info_offset = 1, 55355 ptr_ext4_super_block_offset = 2, 55356 }; 55357 55358 struct ext4_attr { 55359 struct attribute attr; 55360 short int attr_id; 55361 short int attr_ptr; 55362 short unsigned int attr_size; 55363 union { 55364 int offset; 55365 void *explicit_ptr; 55366 } u; 55367 }; 55368 55369 struct ext4_xattr_header { 55370 __le32 h_magic; 55371 __le32 h_refcount; 55372 __le32 h_blocks; 55373 __le32 h_hash; 55374 __le32 h_checksum; 55375 __u32 h_reserved[3]; 55376 }; 55377 55378 struct ext4_xattr_block_find { 55379 struct ext4_xattr_search s; 55380 struct buffer_head *bh; 55381 }; 55382 55383 struct ext4_fc_tl { 55384 __le16 fc_tag; 55385 __le16 fc_len; 55386 }; 55387 55388 struct ext4_fc_head { 55389 __le32 fc_features; 55390 __le32 fc_tid; 55391 }; 55392 55393 struct ext4_fc_add_range { 55394 __le32 fc_ino; 55395 __u8 fc_ex[12]; 55396 }; 55397 55398 struct ext4_fc_del_range { 55399 __le32 fc_ino; 55400 __le32 fc_lblk; 55401 __le32 fc_len; 55402 }; 55403 55404 struct ext4_fc_dentry_info { 55405 __le32 fc_parent_ino; 55406 __le32 fc_ino; 55407 __u8 fc_dname[0]; 55408 }; 55409 55410 struct ext4_fc_inode { 55411 __le32 fc_ino; 55412 __u8 fc_raw_inode[0]; 55413 }; 55414 55415 struct ext4_fc_tail { 55416 __le32 fc_tid; 55417 __le32 fc_crc; 55418 }; 55419 55420 struct ext4_fc_dentry_update { 55421 int fcd_op; 55422 int fcd_parent; 55423 int fcd_ino; 55424 struct qstr fcd_name; 55425 unsigned char fcd_iname[32]; 55426 struct list_head fcd_list; 55427 }; 55428 55429 struct __track_dentry_update_args { 55430 struct dentry *dentry; 55431 int op; 55432 }; 55433 55434 struct __track_range_args { 55435 ext4_lblk_t start; 55436 ext4_lblk_t end; 55437 }; 55438 55439 struct dentry_info_args { 55440 int parent_ino; 55441 int dname_len; 55442 int ino; 55443 int inode_len; 55444 char *dname; 55445 }; 55446 55447 typedef struct { 55448 __le16 e_tag; 55449 __le16 e_perm; 55450 __le32 e_id; 55451 } ext4_acl_entry; 55452 55453 typedef struct { 55454 __le32 a_version; 55455 } ext4_acl_header; 55456 55457 struct commit_header { 55458 __be32 h_magic; 55459 __be32 h_blocktype; 55460 __be32 h_sequence; 55461 unsigned char h_chksum_type; 55462 unsigned char h_chksum_size; 55463 unsigned char h_padding[2]; 55464 __be32 h_chksum[8]; 55465 __be64 h_commit_sec; 55466 __be32 h_commit_nsec; 55467 }; 55468 55469 struct journal_block_tag3_s { 55470 __be32 t_blocknr; 55471 __be32 t_flags; 55472 __be32 t_blocknr_high; 55473 __be32 t_checksum; 55474 }; 55475 55476 typedef struct journal_block_tag3_s journal_block_tag3_t; 55477 55478 struct journal_block_tag_s { 55479 __be32 t_blocknr; 55480 __be16 t_checksum; 55481 __be16 t_flags; 55482 __be32 t_blocknr_high; 55483 }; 55484 55485 typedef struct journal_block_tag_s journal_block_tag_t; 55486 55487 struct jbd2_journal_block_tail { 55488 __be32 t_checksum; 55489 }; 55490 55491 struct jbd2_journal_revoke_header_s { 55492 journal_header_t r_header; 55493 __be32 r_count; 55494 }; 55495 55496 typedef struct jbd2_journal_revoke_header_s jbd2_journal_revoke_header_t; 55497 55498 struct recovery_info { 55499 tid_t start_transaction; 55500 tid_t end_transaction; 55501 int nr_replays; 55502 int nr_revokes; 55503 int nr_revoke_hits; 55504 }; 55505 55506 struct jbd2_revoke_table_s { 55507 int hash_size; 55508 int hash_shift; 55509 struct list_head *hash_table; 55510 }; 55511 55512 struct jbd2_revoke_record_s { 55513 struct list_head hash; 55514 tid_t sequence; 55515 long long unsigned int blocknr; 55516 }; 55517 55518 struct trace_event_raw_jbd2_checkpoint { 55519 struct trace_entry ent; 55520 dev_t dev; 55521 int result; 55522 char __data[0]; 55523 }; 55524 55525 struct trace_event_raw_jbd2_commit { 55526 struct trace_entry ent; 55527 dev_t dev; 55528 char sync_commit; 55529 int transaction; 55530 char __data[0]; 55531 }; 55532 55533 struct trace_event_raw_jbd2_end_commit { 55534 struct trace_entry ent; 55535 dev_t dev; 55536 char sync_commit; 55537 int transaction; 55538 int head; 55539 char __data[0]; 55540 }; 55541 55542 struct trace_event_raw_jbd2_submit_inode_data { 55543 struct trace_entry ent; 55544 dev_t dev; 55545 ino_t ino; 55546 char __data[0]; 55547 }; 55548 55549 struct trace_event_raw_jbd2_handle_start_class { 55550 struct trace_entry ent; 55551 dev_t dev; 55552 long unsigned int tid; 55553 unsigned int type; 55554 unsigned int line_no; 55555 int requested_blocks; 55556 char __data[0]; 55557 }; 55558 55559 struct trace_event_raw_jbd2_handle_extend { 55560 struct trace_entry ent; 55561 dev_t dev; 55562 long unsigned int tid; 55563 unsigned int type; 55564 unsigned int line_no; 55565 int buffer_credits; 55566 int requested_blocks; 55567 char __data[0]; 55568 }; 55569 55570 struct trace_event_raw_jbd2_handle_stats { 55571 struct trace_entry ent; 55572 dev_t dev; 55573 long unsigned int tid; 55574 unsigned int type; 55575 unsigned int line_no; 55576 int interval; 55577 int sync; 55578 int requested_blocks; 55579 int dirtied_blocks; 55580 char __data[0]; 55581 }; 55582 55583 struct trace_event_raw_jbd2_run_stats { 55584 struct trace_entry ent; 55585 dev_t dev; 55586 long unsigned int tid; 55587 long unsigned int wait; 55588 long unsigned int request_delay; 55589 long unsigned int running; 55590 long unsigned int locked; 55591 long unsigned int flushing; 55592 long unsigned int logging; 55593 __u32 handle_count; 55594 __u32 blocks; 55595 __u32 blocks_logged; 55596 char __data[0]; 55597 }; 55598 55599 struct trace_event_raw_jbd2_checkpoint_stats { 55600 struct trace_entry ent; 55601 dev_t dev; 55602 long unsigned int tid; 55603 long unsigned int chp_time; 55604 __u32 forced_to_close; 55605 __u32 written; 55606 __u32 dropped; 55607 char __data[0]; 55608 }; 55609 55610 struct trace_event_raw_jbd2_update_log_tail { 55611 struct trace_entry ent; 55612 dev_t dev; 55613 tid_t tail_sequence; 55614 tid_t first_tid; 55615 long unsigned int block_nr; 55616 long unsigned int freed; 55617 char __data[0]; 55618 }; 55619 55620 struct trace_event_raw_jbd2_write_superblock { 55621 struct trace_entry ent; 55622 dev_t dev; 55623 int write_op; 55624 char __data[0]; 55625 }; 55626 55627 struct trace_event_raw_jbd2_lock_buffer_stall { 55628 struct trace_entry ent; 55629 dev_t dev; 55630 long unsigned int stall_ms; 55631 char __data[0]; 55632 }; 55633 55634 struct trace_event_data_offsets_jbd2_checkpoint {}; 55635 55636 struct trace_event_data_offsets_jbd2_commit {}; 55637 55638 struct trace_event_data_offsets_jbd2_end_commit {}; 55639 55640 struct trace_event_data_offsets_jbd2_submit_inode_data {}; 55641 55642 struct trace_event_data_offsets_jbd2_handle_start_class {}; 55643 55644 struct trace_event_data_offsets_jbd2_handle_extend {}; 55645 55646 struct trace_event_data_offsets_jbd2_handle_stats {}; 55647 55648 struct trace_event_data_offsets_jbd2_run_stats {}; 55649 55650 struct trace_event_data_offsets_jbd2_checkpoint_stats {}; 55651 55652 struct trace_event_data_offsets_jbd2_update_log_tail {}; 55653 55654 struct trace_event_data_offsets_jbd2_write_superblock {}; 55655 55656 struct trace_event_data_offsets_jbd2_lock_buffer_stall {}; 55657 55658 typedef void (*btf_trace_jbd2_checkpoint)(void *, journal_t *, int); 55659 55660 typedef void (*btf_trace_jbd2_start_commit)(void *, journal_t *, transaction_t *); 55661 55662 typedef void (*btf_trace_jbd2_commit_locking)(void *, journal_t *, transaction_t *); 55663 55664 typedef void (*btf_trace_jbd2_commit_flushing)(void *, journal_t *, transaction_t *); 55665 55666 typedef void (*btf_trace_jbd2_commit_logging)(void *, journal_t *, transaction_t *); 55667 55668 typedef void (*btf_trace_jbd2_drop_transaction)(void *, journal_t *, transaction_t *); 55669 55670 typedef void (*btf_trace_jbd2_end_commit)(void *, journal_t *, transaction_t *); 55671 55672 typedef void (*btf_trace_jbd2_submit_inode_data)(void *, struct inode *); 55673 55674 typedef void (*btf_trace_jbd2_handle_start)(void *, dev_t, long unsigned int, unsigned int, unsigned int, int); 55675 55676 typedef void (*btf_trace_jbd2_handle_restart)(void *, dev_t, long unsigned int, unsigned int, unsigned int, int); 55677 55678 typedef void (*btf_trace_jbd2_handle_extend)(void *, dev_t, long unsigned int, unsigned int, unsigned int, int, int); 55679 55680 typedef void (*btf_trace_jbd2_handle_stats)(void *, dev_t, long unsigned int, unsigned int, unsigned int, int, int, int, int); 55681 55682 typedef void (*btf_trace_jbd2_run_stats)(void *, dev_t, long unsigned int, struct transaction_run_stats_s *); 55683 55684 typedef void (*btf_trace_jbd2_checkpoint_stats)(void *, dev_t, long unsigned int, struct transaction_chp_stats_s *); 55685 55686 typedef void (*btf_trace_jbd2_update_log_tail)(void *, journal_t *, tid_t, long unsigned int, long unsigned int); 55687 55688 typedef void (*btf_trace_jbd2_write_superblock)(void *, journal_t *, int); 55689 55690 typedef void (*btf_trace_jbd2_lock_buffer_stall)(void *, dev_t, long unsigned int); 55691 55692 struct jbd2_stats_proc_session { 55693 journal_t *journal; 55694 struct transaction_stats_s *stats; 55695 int start; 55696 int max; 55697 }; 55698 55699 struct ramfs_mount_opts { 55700 umode_t mode; 55701 }; 55702 55703 struct ramfs_fs_info { 55704 struct ramfs_mount_opts mount_opts; 55705 }; 55706 55707 enum ramfs_param { 55708 Opt_mode___3 = 0, 55709 }; 55710 55711 enum hugetlbfs_size_type { 55712 NO_SIZE = 0, 55713 SIZE_STD = 1, 55714 SIZE_PERCENT = 2, 55715 }; 55716 55717 struct hugetlbfs_fs_context { 55718 struct hstate *hstate; 55719 long long unsigned int max_size_opt; 55720 long long unsigned int min_size_opt; 55721 long int max_hpages; 55722 long int nr_inodes; 55723 long int min_hpages; 55724 enum hugetlbfs_size_type max_val_type; 55725 enum hugetlbfs_size_type min_val_type; 55726 kuid_t uid; 55727 kgid_t gid; 55728 umode_t mode; 55729 }; 55730 55731 enum hugetlb_param { 55732 Opt_gid___4 = 0, 55733 Opt_min_size = 1, 55734 Opt_mode___4 = 2, 55735 Opt_nr_inodes___2 = 3, 55736 Opt_pagesize = 4, 55737 Opt_size___2 = 5, 55738 Opt_uid___3 = 6, 55739 }; 55740 55741 struct getdents_callback___2 { 55742 struct dir_context ctx; 55743 char *name; 55744 u64 ino; 55745 int found; 55746 int sequence; 55747 }; 55748 55749 typedef u16 wchar_t; 55750 55751 typedef u32 unicode_t; 55752 55753 struct nls_table { 55754 const char *charset; 55755 const char *alias; 55756 int (*uni2char)(wchar_t, unsigned char *, int); 55757 int (*char2uni)(const unsigned char *, int, wchar_t *); 55758 const unsigned char *charset2lower; 55759 const unsigned char *charset2upper; 55760 struct module *owner; 55761 struct nls_table *next; 55762 }; 55763 55764 enum utf16_endian { 55765 UTF16_HOST_ENDIAN = 0, 55766 UTF16_LITTLE_ENDIAN = 1, 55767 UTF16_BIG_ENDIAN = 2, 55768 }; 55769 55770 struct utf8_table { 55771 int cmask; 55772 int cval; 55773 int shift; 55774 long int lmask; 55775 long int lval; 55776 }; 55777 55778 struct utf8data; 55779 55780 struct utf8cursor { 55781 const struct utf8data *data; 55782 const char *s; 55783 const char *p; 55784 const char *ss; 55785 const char *sp; 55786 unsigned int len; 55787 unsigned int slen; 55788 short int ccc; 55789 short int nccc; 55790 unsigned char hangul[12]; 55791 }; 55792 55793 struct utf8data { 55794 unsigned int maxage; 55795 unsigned int offset; 55796 }; 55797 55798 typedef const unsigned char utf8trie_t; 55799 55800 typedef const unsigned char utf8leaf_t; 55801 55802 typedef unsigned int autofs_wqt_t; 55803 55804 struct autofs_sb_info; 55805 55806 struct autofs_info { 55807 struct dentry *dentry; 55808 struct inode *inode; 55809 int flags; 55810 struct completion expire_complete; 55811 struct list_head active; 55812 struct list_head expiring; 55813 struct autofs_sb_info *sbi; 55814 long unsigned int last_used; 55815 int count; 55816 kuid_t uid; 55817 kgid_t gid; 55818 struct callback_head rcu; 55819 }; 55820 55821 struct autofs_wait_queue; 55822 55823 struct autofs_sb_info { 55824 u32 magic; 55825 int pipefd; 55826 struct file *pipe; 55827 struct pid *oz_pgrp; 55828 int version; 55829 int sub_version; 55830 int min_proto; 55831 int max_proto; 55832 unsigned int flags; 55833 long unsigned int exp_timeout; 55834 unsigned int type; 55835 struct super_block *sb; 55836 struct mutex wq_mutex; 55837 struct mutex pipe_mutex; 55838 spinlock_t fs_lock; 55839 struct autofs_wait_queue *queues; 55840 spinlock_t lookup_lock; 55841 struct list_head active_list; 55842 struct list_head expiring_list; 55843 struct callback_head rcu; 55844 }; 55845 55846 struct autofs_wait_queue { 55847 wait_queue_head_t queue; 55848 struct autofs_wait_queue *next; 55849 autofs_wqt_t wait_queue_token; 55850 struct qstr name; 55851 u32 dev; 55852 u64 ino; 55853 kuid_t uid; 55854 kgid_t gid; 55855 pid_t pid; 55856 pid_t tgid; 55857 int status; 55858 unsigned int wait_ctr; 55859 }; 55860 55861 enum { 55862 Opt_err___3 = 0, 55863 Opt_fd = 1, 55864 Opt_uid___4 = 2, 55865 Opt_gid___5 = 3, 55866 Opt_pgrp = 4, 55867 Opt_minproto = 5, 55868 Opt_maxproto = 6, 55869 Opt_indirect = 7, 55870 Opt_direct = 8, 55871 Opt_offset = 9, 55872 Opt_strictexpire = 10, 55873 Opt_ignore = 11, 55874 }; 55875 55876 struct autofs_packet_hdr { 55877 int proto_version; 55878 int type; 55879 }; 55880 55881 struct autofs_packet_expire { 55882 struct autofs_packet_hdr hdr; 55883 int len; 55884 char name[256]; 55885 }; 55886 55887 enum { 55888 AUTOFS_IOC_READY_CMD = 96, 55889 AUTOFS_IOC_FAIL_CMD = 97, 55890 AUTOFS_IOC_CATATONIC_CMD = 98, 55891 AUTOFS_IOC_PROTOVER_CMD = 99, 55892 AUTOFS_IOC_SETTIMEOUT_CMD = 100, 55893 AUTOFS_IOC_EXPIRE_CMD = 101, 55894 }; 55895 55896 enum autofs_notify { 55897 NFY_NONE = 0, 55898 NFY_MOUNT = 1, 55899 NFY_EXPIRE = 2, 55900 }; 55901 55902 enum { 55903 AUTOFS_IOC_EXPIRE_MULTI_CMD = 102, 55904 AUTOFS_IOC_PROTOSUBVER_CMD = 103, 55905 AUTOFS_IOC_ASKUMOUNT_CMD = 112, 55906 }; 55907 55908 struct autofs_packet_missing { 55909 struct autofs_packet_hdr hdr; 55910 autofs_wqt_t wait_queue_token; 55911 int len; 55912 char name[256]; 55913 }; 55914 55915 struct autofs_packet_expire_multi { 55916 struct autofs_packet_hdr hdr; 55917 autofs_wqt_t wait_queue_token; 55918 int len; 55919 char name[256]; 55920 }; 55921 55922 union autofs_packet_union { 55923 struct autofs_packet_hdr hdr; 55924 struct autofs_packet_missing missing; 55925 struct autofs_packet_expire expire; 55926 struct autofs_packet_expire_multi expire_multi; 55927 }; 55928 55929 struct autofs_v5_packet { 55930 struct autofs_packet_hdr hdr; 55931 autofs_wqt_t wait_queue_token; 55932 __u32 dev; 55933 __u64 ino; 55934 __u32 uid; 55935 __u32 gid; 55936 __u32 pid; 55937 __u32 tgid; 55938 __u32 len; 55939 char name[256]; 55940 }; 55941 55942 typedef struct autofs_v5_packet autofs_packet_missing_indirect_t; 55943 55944 typedef struct autofs_v5_packet autofs_packet_expire_indirect_t; 55945 55946 typedef struct autofs_v5_packet autofs_packet_missing_direct_t; 55947 55948 typedef struct autofs_v5_packet autofs_packet_expire_direct_t; 55949 55950 union autofs_v5_packet_union { 55951 struct autofs_packet_hdr hdr; 55952 struct autofs_v5_packet v5_packet; 55953 autofs_packet_missing_indirect_t missing_indirect; 55954 autofs_packet_expire_indirect_t expire_indirect; 55955 autofs_packet_missing_direct_t missing_direct; 55956 autofs_packet_expire_direct_t expire_direct; 55957 }; 55958 55959 struct args_protover { 55960 __u32 version; 55961 }; 55962 55963 struct args_protosubver { 55964 __u32 sub_version; 55965 }; 55966 55967 struct args_openmount { 55968 __u32 devid; 55969 }; 55970 55971 struct args_ready { 55972 __u32 token; 55973 }; 55974 55975 struct args_fail { 55976 __u32 token; 55977 __s32 status; 55978 }; 55979 55980 struct args_setpipefd { 55981 __s32 pipefd; 55982 }; 55983 55984 struct args_timeout { 55985 __u64 timeout; 55986 }; 55987 55988 struct args_requester { 55989 __u32 uid; 55990 __u32 gid; 55991 }; 55992 55993 struct args_expire { 55994 __u32 how; 55995 }; 55996 55997 struct args_askumount { 55998 __u32 may_umount; 55999 }; 56000 56001 struct args_in { 56002 __u32 type; 56003 }; 56004 56005 struct args_out { 56006 __u32 devid; 56007 __u32 magic; 56008 }; 56009 56010 struct args_ismountpoint { 56011 union { 56012 struct args_in in; 56013 struct args_out out; 56014 }; 56015 }; 56016 56017 struct autofs_dev_ioctl { 56018 __u32 ver_major; 56019 __u32 ver_minor; 56020 __u32 size; 56021 __s32 ioctlfd; 56022 union { 56023 struct args_protover protover; 56024 struct args_protosubver protosubver; 56025 struct args_openmount openmount; 56026 struct args_ready ready; 56027 struct args_fail fail; 56028 struct args_setpipefd setpipefd; 56029 struct args_timeout timeout; 56030 struct args_requester requester; 56031 struct args_expire expire; 56032 struct args_askumount askumount; 56033 struct args_ismountpoint ismountpoint; 56034 }; 56035 char path[0]; 56036 }; 56037 56038 enum { 56039 AUTOFS_DEV_IOCTL_VERSION_CMD = 113, 56040 AUTOFS_DEV_IOCTL_PROTOVER_CMD = 114, 56041 AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD = 115, 56042 AUTOFS_DEV_IOCTL_OPENMOUNT_CMD = 116, 56043 AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD = 117, 56044 AUTOFS_DEV_IOCTL_READY_CMD = 118, 56045 AUTOFS_DEV_IOCTL_FAIL_CMD = 119, 56046 AUTOFS_DEV_IOCTL_SETPIPEFD_CMD = 120, 56047 AUTOFS_DEV_IOCTL_CATATONIC_CMD = 121, 56048 AUTOFS_DEV_IOCTL_TIMEOUT_CMD = 122, 56049 AUTOFS_DEV_IOCTL_REQUESTER_CMD = 123, 56050 AUTOFS_DEV_IOCTL_EXPIRE_CMD = 124, 56051 AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD = 125, 56052 AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD = 126, 56053 }; 56054 56055 typedef int (*ioctl_fn)(struct file *, struct autofs_sb_info *, struct autofs_dev_ioctl *); 56056 56057 struct debugfs_fsdata { 56058 const struct file_operations *real_fops; 56059 refcount_t active_users; 56060 struct completion active_users_drained; 56061 }; 56062 56063 struct debugfs_mount_opts { 56064 kuid_t uid; 56065 kgid_t gid; 56066 umode_t mode; 56067 }; 56068 56069 enum { 56070 Opt_uid___5 = 0, 56071 Opt_gid___6 = 1, 56072 Opt_mode___5 = 2, 56073 Opt_err___4 = 3, 56074 }; 56075 56076 struct debugfs_fs_info { 56077 struct debugfs_mount_opts mount_opts; 56078 }; 56079 56080 struct debugfs_reg32 { 56081 char *name; 56082 long unsigned int offset; 56083 }; 56084 56085 struct debugfs_regset32 { 56086 const struct debugfs_reg32 *regs; 56087 int nregs; 56088 void *base; 56089 struct device *dev; 56090 }; 56091 56092 struct debugfs_u32_array { 56093 u32 *array; 56094 u32 n_elements; 56095 }; 56096 56097 struct debugfs_devm_entry { 56098 int (*read)(struct seq_file *, void *); 56099 struct device *dev; 56100 }; 56101 56102 struct tracefs_dir_ops { 56103 int (*mkdir)(const char *); 56104 int (*rmdir)(const char *); 56105 }; 56106 56107 struct tracefs_mount_opts { 56108 kuid_t uid; 56109 kgid_t gid; 56110 umode_t mode; 56111 }; 56112 56113 struct tracefs_fs_info { 56114 struct tracefs_mount_opts mount_opts; 56115 }; 56116 56117 struct btrfs_ioctl_vol_args { 56118 __s64 fd; 56119 char name[4088]; 56120 }; 56121 56122 struct btrfs_scrub_progress { 56123 __u64 data_extents_scrubbed; 56124 __u64 tree_extents_scrubbed; 56125 __u64 data_bytes_scrubbed; 56126 __u64 tree_bytes_scrubbed; 56127 __u64 read_errors; 56128 __u64 csum_errors; 56129 __u64 verify_errors; 56130 __u64 no_csum; 56131 __u64 csum_discards; 56132 __u64 super_errors; 56133 __u64 malloc_errors; 56134 __u64 uncorrectable_errors; 56135 __u64 corrected_errors; 56136 __u64 last_physical; 56137 __u64 unverified_errors; 56138 }; 56139 56140 struct btrfs_balance_args { 56141 __u64 profiles; 56142 union { 56143 __u64 usage; 56144 struct { 56145 __u32 usage_min; 56146 __u32 usage_max; 56147 }; 56148 }; 56149 __u64 devid; 56150 __u64 pstart; 56151 __u64 pend; 56152 __u64 vstart; 56153 __u64 vend; 56154 __u64 target; 56155 __u64 flags; 56156 union { 56157 __u64 limit; 56158 struct { 56159 __u32 limit_min; 56160 __u32 limit_max; 56161 }; 56162 }; 56163 __u32 stripes_min; 56164 __u32 stripes_max; 56165 __u64 unused[6]; 56166 }; 56167 56168 struct btrfs_balance_progress { 56169 __u64 expected; 56170 __u64 considered; 56171 __u64 completed; 56172 }; 56173 56174 enum btrfs_dev_stat_values { 56175 BTRFS_DEV_STAT_WRITE_ERRS = 0, 56176 BTRFS_DEV_STAT_READ_ERRS = 1, 56177 BTRFS_DEV_STAT_FLUSH_ERRS = 2, 56178 BTRFS_DEV_STAT_CORRUPTION_ERRS = 3, 56179 BTRFS_DEV_STAT_GENERATION_ERRS = 4, 56180 BTRFS_DEV_STAT_VALUES_MAX = 5, 56181 }; 56182 56183 struct btrfs_disk_key { 56184 __le64 objectid; 56185 __u8 type; 56186 __le64 offset; 56187 } __attribute__((packed)); 56188 56189 struct btrfs_key { 56190 __u64 objectid; 56191 __u8 type; 56192 __u64 offset; 56193 } __attribute__((packed)); 56194 56195 struct btrfs_dev_item { 56196 __le64 devid; 56197 __le64 total_bytes; 56198 __le64 bytes_used; 56199 __le32 io_align; 56200 __le32 io_width; 56201 __le32 sector_size; 56202 __le64 type; 56203 __le64 generation; 56204 __le64 start_offset; 56205 __le32 dev_group; 56206 __u8 seek_speed; 56207 __u8 bandwidth; 56208 __u8 uuid[16]; 56209 __u8 fsid[16]; 56210 } __attribute__((packed)); 56211 56212 struct btrfs_inode_ref { 56213 __le64 index; 56214 __le16 name_len; 56215 } __attribute__((packed)); 56216 56217 struct btrfs_timespec { 56218 __le64 sec; 56219 __le32 nsec; 56220 } __attribute__((packed)); 56221 56222 struct btrfs_inode_item { 56223 __le64 generation; 56224 __le64 transid; 56225 __le64 size; 56226 __le64 nbytes; 56227 __le64 block_group; 56228 __le32 nlink; 56229 __le32 uid; 56230 __le32 gid; 56231 __le32 mode; 56232 __le64 rdev; 56233 __le64 flags; 56234 __le64 sequence; 56235 __le64 reserved[4]; 56236 struct btrfs_timespec atime; 56237 struct btrfs_timespec ctime; 56238 struct btrfs_timespec mtime; 56239 struct btrfs_timespec otime; 56240 } __attribute__((packed)); 56241 56242 struct btrfs_dir_item { 56243 struct btrfs_disk_key location; 56244 __le64 transid; 56245 __le16 data_len; 56246 __le16 name_len; 56247 __u8 type; 56248 } __attribute__((packed)); 56249 56250 struct btrfs_root_item { 56251 struct btrfs_inode_item inode; 56252 __le64 generation; 56253 __le64 root_dirid; 56254 __le64 bytenr; 56255 __le64 byte_limit; 56256 __le64 bytes_used; 56257 __le64 last_snapshot; 56258 __le64 flags; 56259 __le32 refs; 56260 struct btrfs_disk_key drop_progress; 56261 __u8 drop_level; 56262 __u8 level; 56263 __le64 generation_v2; 56264 __u8 uuid[16]; 56265 __u8 parent_uuid[16]; 56266 __u8 received_uuid[16]; 56267 __le64 ctransid; 56268 __le64 otransid; 56269 __le64 stransid; 56270 __le64 rtransid; 56271 struct btrfs_timespec ctime; 56272 struct btrfs_timespec otime; 56273 struct btrfs_timespec stime; 56274 struct btrfs_timespec rtime; 56275 __le64 reserved[8]; 56276 } __attribute__((packed)); 56277 56278 struct btrfs_root_ref { 56279 __le64 dirid; 56280 __le64 sequence; 56281 __le16 name_len; 56282 } __attribute__((packed)); 56283 56284 enum { 56285 BTRFS_FILE_EXTENT_INLINE = 0, 56286 BTRFS_FILE_EXTENT_REG = 1, 56287 BTRFS_FILE_EXTENT_PREALLOC = 2, 56288 BTRFS_NR_FILE_EXTENT_TYPES = 3, 56289 }; 56290 56291 struct btrfs_file_extent_item { 56292 __le64 generation; 56293 __le64 ram_bytes; 56294 __u8 compression; 56295 __u8 encryption; 56296 __le16 other_encoding; 56297 __u8 type; 56298 __le64 disk_bytenr; 56299 __le64 disk_num_bytes; 56300 __le64 offset; 56301 __le64 num_bytes; 56302 } __attribute__((packed)); 56303 56304 enum btrfs_raid_types { 56305 BTRFS_RAID_RAID10 = 0, 56306 BTRFS_RAID_RAID1 = 1, 56307 BTRFS_RAID_DUP = 2, 56308 BTRFS_RAID_RAID0 = 3, 56309 BTRFS_RAID_SINGLE = 4, 56310 BTRFS_RAID_RAID5 = 5, 56311 BTRFS_RAID_RAID6 = 6, 56312 BTRFS_RAID_RAID1C3 = 7, 56313 BTRFS_RAID_RAID1C4 = 8, 56314 BTRFS_NR_RAID_TYPES = 9, 56315 }; 56316 56317 enum { 56318 IO_TREE_FS_PINNED_EXTENTS = 0, 56319 IO_TREE_FS_EXCLUDED_EXTENTS = 1, 56320 IO_TREE_BTREE_INODE_IO = 2, 56321 IO_TREE_INODE_IO = 3, 56322 IO_TREE_INODE_IO_FAILURE = 4, 56323 IO_TREE_RELOC_BLOCKS = 5, 56324 IO_TREE_TRANS_DIRTY_PAGES = 6, 56325 IO_TREE_ROOT_DIRTY_LOG_PAGES = 7, 56326 IO_TREE_INODE_FILE_EXTENT = 8, 56327 IO_TREE_LOG_CSUM_RANGE = 9, 56328 IO_TREE_SELFTEST = 10, 56329 IO_TREE_DEVICE_ALLOC_STATE = 11, 56330 }; 56331 56332 struct btrfs_fs_info; 56333 56334 struct extent_io_tree { 56335 struct rb_root state; 56336 struct btrfs_fs_info *fs_info; 56337 void *private_data; 56338 u64 dirty_bytes; 56339 bool track_uptodate; 56340 u8 owner; 56341 spinlock_t lock; 56342 }; 56343 56344 struct extent_map_tree { 56345 struct rb_root_cached map; 56346 struct list_head modified_extents; 56347 rwlock_t lock; 56348 }; 56349 56350 struct btrfs_space_info; 56351 56352 struct btrfs_block_rsv { 56353 u64 size; 56354 u64 reserved; 56355 struct btrfs_space_info *space_info; 56356 spinlock_t lock; 56357 short unsigned int full; 56358 short unsigned int type; 56359 short unsigned int failfast; 56360 u64 qgroup_rsv_size; 56361 u64 qgroup_rsv_reserved; 56362 }; 56363 56364 struct btrfs_block_group; 56365 56366 struct btrfs_free_cluster { 56367 spinlock_t lock; 56368 spinlock_t refill_lock; 56369 struct rb_root root; 56370 u64 max_size; 56371 u64 window_start; 56372 bool fragmented; 56373 struct btrfs_block_group *block_group; 56374 struct list_head block_group_list; 56375 }; 56376 56377 struct btrfs_discard_ctl { 56378 struct workqueue_struct *discard_workers; 56379 struct delayed_work work; 56380 spinlock_t lock; 56381 struct btrfs_block_group *block_group; 56382 struct list_head discard_list[3]; 56383 u64 prev_discard; 56384 u64 prev_discard_time; 56385 atomic_t discardable_extents; 56386 atomic64_t discardable_bytes; 56387 u64 max_discard_size; 56388 u64 delay_ms; 56389 u32 iops_limit; 56390 u32 kbps_limit; 56391 u64 discard_extent_bytes; 56392 u64 discard_bitmap_bytes; 56393 atomic64_t discard_bytes_saved; 56394 }; 56395 56396 struct btrfs_work; 56397 56398 typedef void (*btrfs_func_t)(struct btrfs_work *); 56399 56400 struct __btrfs_workqueue; 56401 56402 struct btrfs_work { 56403 btrfs_func_t func; 56404 btrfs_func_t ordered_func; 56405 btrfs_func_t ordered_free; 56406 struct work_struct normal_work; 56407 struct list_head ordered_list; 56408 struct __btrfs_workqueue *wq; 56409 long unsigned int flags; 56410 }; 56411 56412 struct btrfs_device; 56413 56414 struct btrfs_dev_replace { 56415 u64 replace_state; 56416 time64_t time_started; 56417 time64_t time_stopped; 56418 atomic64_t num_write_errors; 56419 atomic64_t num_uncorrectable_read_errors; 56420 u64 cursor_left; 56421 u64 committed_cursor_left; 56422 u64 cursor_left_last_write_of_item; 56423 u64 cursor_right; 56424 u64 cont_reading_from_srcdev_mode; 56425 int is_valid; 56426 int item_needs_writeback; 56427 struct btrfs_device *srcdev; 56428 struct btrfs_device *tgtdev; 56429 struct mutex lock_finishing_cancel_unmount; 56430 struct rw_semaphore rwsem; 56431 struct btrfs_scrub_progress scrub_progress; 56432 struct percpu_counter bio_counter; 56433 wait_queue_head_t replace_wait; 56434 }; 56435 56436 struct btrfs_root; 56437 56438 struct btrfs_transaction; 56439 56440 struct btrfs_super_block; 56441 56442 struct btrfs_stripe_hash_table; 56443 56444 struct btrfs_workqueue; 56445 56446 struct btrfs_fs_devices; 56447 56448 struct reloc_control; 56449 56450 struct btrfs_balance_control; 56451 56452 struct ulist; 56453 56454 struct btrfs_delayed_root; 56455 56456 struct btrfs_fs_info { 56457 u8 chunk_tree_uuid[16]; 56458 long unsigned int flags; 56459 struct btrfs_root *extent_root; 56460 struct btrfs_root *tree_root; 56461 struct btrfs_root *chunk_root; 56462 struct btrfs_root *dev_root; 56463 struct btrfs_root *fs_root; 56464 struct btrfs_root *csum_root; 56465 struct btrfs_root *quota_root; 56466 struct btrfs_root *uuid_root; 56467 struct btrfs_root *free_space_root; 56468 struct btrfs_root *data_reloc_root; 56469 struct btrfs_root *log_root_tree; 56470 spinlock_t fs_roots_radix_lock; 56471 struct xarray fs_roots_radix; 56472 spinlock_t block_group_cache_lock; 56473 u64 first_logical_byte; 56474 struct rb_root block_group_cache_tree; 56475 atomic64_t free_chunk_space; 56476 struct extent_io_tree excluded_extents; 56477 struct extent_map_tree mapping_tree; 56478 struct btrfs_block_rsv global_block_rsv; 56479 struct btrfs_block_rsv trans_block_rsv; 56480 struct btrfs_block_rsv chunk_block_rsv; 56481 struct btrfs_block_rsv delayed_block_rsv; 56482 struct btrfs_block_rsv delayed_refs_rsv; 56483 struct btrfs_block_rsv empty_block_rsv; 56484 u64 generation; 56485 u64 last_trans_committed; 56486 u64 avg_delayed_ref_runtime; 56487 u64 last_trans_log_full_commit; 56488 long unsigned int mount_opt; 56489 long unsigned int pending_changes; 56490 long unsigned int compress_type: 4; 56491 unsigned int compress_level; 56492 u32 commit_interval; 56493 u64 max_inline; 56494 struct btrfs_transaction *running_transaction; 56495 wait_queue_head_t transaction_throttle; 56496 wait_queue_head_t transaction_wait; 56497 wait_queue_head_t transaction_blocked_wait; 56498 wait_queue_head_t async_submit_wait; 56499 spinlock_t super_lock; 56500 struct btrfs_super_block *super_copy; 56501 struct btrfs_super_block *super_for_commit; 56502 struct super_block *sb; 56503 struct inode *btree_inode; 56504 struct mutex tree_log_mutex; 56505 struct mutex transaction_kthread_mutex; 56506 struct mutex cleaner_mutex; 56507 struct mutex chunk_mutex; 56508 struct mutex ro_block_group_mutex; 56509 struct btrfs_stripe_hash_table *stripe_hash_table; 56510 struct mutex ordered_operations_mutex; 56511 struct rw_semaphore commit_root_sem; 56512 struct rw_semaphore cleanup_work_sem; 56513 struct rw_semaphore subvol_sem; 56514 spinlock_t trans_lock; 56515 struct mutex reloc_mutex; 56516 struct list_head trans_list; 56517 struct list_head dead_roots; 56518 struct list_head caching_block_groups; 56519 spinlock_t delayed_iput_lock; 56520 struct list_head delayed_iputs; 56521 atomic_t nr_delayed_iputs; 56522 wait_queue_head_t delayed_iputs_wait; 56523 atomic64_t tree_mod_seq; 56524 rwlock_t tree_mod_log_lock; 56525 struct rb_root tree_mod_log; 56526 struct list_head tree_mod_seq_list; 56527 atomic_t async_delalloc_pages; 56528 spinlock_t ordered_root_lock; 56529 struct list_head ordered_roots; 56530 struct mutex delalloc_root_mutex; 56531 spinlock_t delalloc_root_lock; 56532 struct list_head delalloc_roots; 56533 struct btrfs_workqueue *workers; 56534 struct btrfs_workqueue *delalloc_workers; 56535 struct btrfs_workqueue *flush_workers; 56536 struct btrfs_workqueue *endio_workers; 56537 struct btrfs_workqueue *endio_meta_workers; 56538 struct btrfs_workqueue *endio_raid56_workers; 56539 struct btrfs_workqueue *rmw_workers; 56540 struct btrfs_workqueue *endio_meta_write_workers; 56541 struct btrfs_workqueue *endio_write_workers; 56542 struct btrfs_workqueue *endio_freespace_worker; 56543 struct btrfs_workqueue *caching_workers; 56544 struct btrfs_workqueue *readahead_workers; 56545 struct btrfs_workqueue *fixup_workers; 56546 struct btrfs_workqueue *delayed_workers; 56547 struct task_struct *transaction_kthread; 56548 struct task_struct *cleaner_kthread; 56549 u32 thread_pool_size; 56550 struct kobject *space_info_kobj; 56551 struct kobject *qgroups_kobj; 56552 u64 total_pinned; 56553 struct percpu_counter dirty_metadata_bytes; 56554 struct percpu_counter delalloc_bytes; 56555 struct percpu_counter dio_bytes; 56556 s32 dirty_metadata_batch; 56557 s32 delalloc_batch; 56558 struct list_head dirty_cowonly_roots; 56559 struct btrfs_fs_devices *fs_devices; 56560 struct list_head space_info; 56561 struct btrfs_space_info *data_sinfo; 56562 struct reloc_control *reloc_ctl; 56563 struct btrfs_free_cluster data_alloc_cluster; 56564 struct btrfs_free_cluster meta_alloc_cluster; 56565 spinlock_t defrag_inodes_lock; 56566 struct rb_root defrag_inodes; 56567 atomic_t defrag_running; 56568 seqlock_t profiles_lock; 56569 u64 avail_data_alloc_bits; 56570 u64 avail_metadata_alloc_bits; 56571 u64 avail_system_alloc_bits; 56572 spinlock_t balance_lock; 56573 struct mutex balance_mutex; 56574 atomic_t balance_pause_req; 56575 atomic_t balance_cancel_req; 56576 struct btrfs_balance_control *balance_ctl; 56577 wait_queue_head_t balance_wait_q; 56578 u32 data_chunk_allocations; 56579 u32 metadata_ratio; 56580 void *bdev_holder; 56581 struct mutex scrub_lock; 56582 atomic_t scrubs_running; 56583 atomic_t scrub_pause_req; 56584 atomic_t scrubs_paused; 56585 atomic_t scrub_cancel_req; 56586 wait_queue_head_t scrub_pause_wait; 56587 refcount_t scrub_workers_refcnt; 56588 struct btrfs_workqueue *scrub_workers; 56589 struct btrfs_workqueue *scrub_wr_completion_workers; 56590 struct btrfs_workqueue *scrub_parity_workers; 56591 struct btrfs_discard_ctl discard_ctl; 56592 u64 qgroup_flags; 56593 struct rb_root qgroup_tree; 56594 spinlock_t qgroup_lock; 56595 struct ulist *qgroup_ulist; 56596 struct mutex qgroup_ioctl_lock; 56597 struct list_head dirty_qgroups; 56598 u64 qgroup_seq; 56599 struct mutex qgroup_rescan_lock; 56600 struct btrfs_key qgroup_rescan_progress; 56601 struct btrfs_workqueue *qgroup_rescan_workers; 56602 struct completion qgroup_rescan_completion; 56603 struct btrfs_work qgroup_rescan_work; 56604 bool qgroup_rescan_running; 56605 long unsigned int fs_state; 56606 struct btrfs_delayed_root *delayed_root; 56607 spinlock_t reada_lock; 56608 struct xarray reada_tree; 56609 atomic_t reada_works_cnt; 56610 spinlock_t buffer_lock; 56611 struct xarray buffer_radix; 56612 int backup_root_index; 56613 struct btrfs_dev_replace dev_replace; 56614 struct semaphore uuid_tree_rescan_sem; 56615 struct work_struct async_reclaim_work; 56616 struct work_struct async_data_reclaim_work; 56617 spinlock_t unused_bgs_lock; 56618 struct list_head unused_bgs; 56619 struct mutex unused_bg_unpin_mutex; 56620 struct mutex delete_unused_bgs_mutex; 56621 u32 nodesize; 56622 u32 sectorsize; 56623 u32 sectorsize_bits; 56624 u32 csum_size; 56625 u32 csums_per_leaf; 56626 u32 stripesize; 56627 spinlock_t swapfile_pins_lock; 56628 struct rb_root swapfile_pins; 56629 struct crypto_shash *csum_shash; 56630 int send_in_progress; 56631 long unsigned int exclusive_operation; 56632 union { 56633 u64 zone_size; 56634 u64 zoned; 56635 }; 56636 u64 max_zone_append_size; 56637 }; 56638 56639 struct io_failure_record; 56640 56641 struct extent_state { 56642 u64 start; 56643 u64 end; 56644 struct rb_node rb_node; 56645 wait_queue_head_t wq; 56646 refcount_t refs; 56647 u32 state; 56648 struct io_failure_record *failrec; 56649 }; 56650 56651 struct io_failure_record { 56652 struct page *page; 56653 u64 start; 56654 u64 len; 56655 u64 logical; 56656 long unsigned int bio_flags; 56657 int this_mirror; 56658 int failed_mirror; 56659 int in_validation; 56660 }; 56661 56662 struct ulist { 56663 long unsigned int nnodes; 56664 struct list_head nodes; 56665 struct rb_root root; 56666 }; 56667 56668 struct extent_buffer { 56669 u64 start; 56670 long unsigned int len; 56671 long unsigned int bflags; 56672 struct btrfs_fs_info *fs_info; 56673 spinlock_t refs_lock; 56674 atomic_t refs; 56675 atomic_t io_pages; 56676 int read_mirror; 56677 struct callback_head callback_head; 56678 pid_t lock_owner; 56679 s8 log_index; 56680 struct rw_semaphore lock; 56681 struct page *pages[16]; 56682 }; 56683 56684 struct map_lookup; 56685 56686 struct extent_map { 56687 struct rb_node rb_node; 56688 u64 start; 56689 u64 len; 56690 u64 mod_start; 56691 u64 mod_len; 56692 u64 orig_start; 56693 u64 orig_block_len; 56694 u64 ram_bytes; 56695 u64 block_start; 56696 u64 block_len; 56697 u64 generation; 56698 long unsigned int flags; 56699 struct map_lookup *map_lookup; 56700 refcount_t refs; 56701 unsigned int compress_type; 56702 struct list_head list; 56703 }; 56704 56705 struct btrfs_ordered_inode_tree { 56706 spinlock_t lock; 56707 struct rb_root tree; 56708 struct rb_node *last; 56709 }; 56710 56711 struct btrfs_delayed_node; 56712 56713 struct btrfs_inode { 56714 struct btrfs_root *root; 56715 struct btrfs_key location; 56716 spinlock_t lock; 56717 struct extent_map_tree extent_tree; 56718 struct extent_io_tree io_tree; 56719 struct extent_io_tree io_failure_tree; 56720 struct extent_io_tree file_extent_tree; 56721 struct mutex log_mutex; 56722 struct btrfs_ordered_inode_tree ordered_tree; 56723 struct list_head delalloc_inodes; 56724 struct rb_node rb_node; 56725 long unsigned int runtime_flags; 56726 atomic_t sync_writers; 56727 u64 generation; 56728 u64 last_trans; 56729 u64 logged_trans; 56730 int last_sub_trans; 56731 int last_log_commit; 56732 u64 delalloc_bytes; 56733 u64 new_delalloc_bytes; 56734 u64 defrag_bytes; 56735 u64 disk_i_size; 56736 u64 index_cnt; 56737 u64 dir_index; 56738 u64 last_unlink_trans; 56739 u64 last_reflink_trans; 56740 u64 csum_bytes; 56741 u32 flags; 56742 unsigned int outstanding_extents; 56743 struct btrfs_block_rsv block_rsv; 56744 unsigned int prop_compress; 56745 unsigned int defrag_compress; 56746 struct btrfs_delayed_node *delayed_node; 56747 struct timespec64 i_otime; 56748 struct list_head delayed_iput; 56749 struct inode vfs_inode; 56750 }; 56751 56752 enum { 56753 EXTENT_FLAG_PINNED = 0, 56754 EXTENT_FLAG_COMPRESSED = 1, 56755 EXTENT_FLAG_PREALLOC = 2, 56756 EXTENT_FLAG_LOGGING = 3, 56757 EXTENT_FLAG_FILLING = 4, 56758 EXTENT_FLAG_FS_MAPPING = 5, 56759 }; 56760 56761 struct btrfs_bio_stripe { 56762 struct btrfs_device *dev; 56763 u64 physical; 56764 u64 length; 56765 }; 56766 56767 struct map_lookup { 56768 u64 type; 56769 int io_align; 56770 int io_width; 56771 u64 stripe_len; 56772 int num_stripes; 56773 int sub_stripes; 56774 int verified_stripes; 56775 struct btrfs_bio_stripe stripes[0]; 56776 }; 56777 56778 struct __btrfs_workqueue { 56779 struct workqueue_struct *normal_wq; 56780 struct btrfs_fs_info *fs_info; 56781 struct list_head ordered_list; 56782 spinlock_t list_lock; 56783 atomic_t pending; 56784 int limit_active; 56785 int current_active; 56786 int thresh; 56787 unsigned int count; 56788 spinlock_t thres_lock; 56789 }; 56790 56791 struct btrfs_space_info { 56792 spinlock_t lock; 56793 u64 total_bytes; 56794 u64 bytes_used; 56795 u64 bytes_pinned; 56796 u64 bytes_reserved; 56797 u64 bytes_may_use; 56798 u64 bytes_readonly; 56799 u64 max_extent_size; 56800 unsigned int full: 1; 56801 unsigned int chunk_alloc: 1; 56802 unsigned int flush: 1; 56803 unsigned int force_alloc; 56804 u64 disk_used; 56805 u64 disk_total; 56806 u64 flags; 56807 struct percpu_counter total_bytes_pinned; 56808 struct list_head list; 56809 struct list_head ro_bgs; 56810 struct list_head priority_tickets; 56811 struct list_head tickets; 56812 u64 reclaim_size; 56813 u64 tickets_id; 56814 struct rw_semaphore groups_sem; 56815 struct list_head block_groups[9]; 56816 struct kobject kobj; 56817 struct kobject *block_group_kobjs[9]; 56818 }; 56819 56820 enum btrfs_lock_nesting { 56821 BTRFS_NESTING_NORMAL = 0, 56822 BTRFS_NESTING_COW = 1, 56823 BTRFS_NESTING_LEFT = 2, 56824 BTRFS_NESTING_RIGHT = 3, 56825 BTRFS_NESTING_LEFT_COW = 4, 56826 BTRFS_NESTING_RIGHT_COW = 5, 56827 BTRFS_NESTING_SPLIT = 6, 56828 BTRFS_NESTING_NEW_ROOT = 7, 56829 BTRFS_NESTING_MAX = 8, 56830 }; 56831 56832 struct btrfs_drew_lock { 56833 atomic_t readers; 56834 struct percpu_counter writers; 56835 wait_queue_head_t pending_writers; 56836 wait_queue_head_t pending_readers; 56837 }; 56838 56839 enum { 56840 BTRFS_FS_STATE_ERROR = 0, 56841 BTRFS_FS_STATE_REMOUNTING = 1, 56842 BTRFS_FS_STATE_RO = 2, 56843 BTRFS_FS_STATE_TRANS_ABORTED = 3, 56844 BTRFS_FS_STATE_DEV_REPLACING = 4, 56845 BTRFS_FS_STATE_DUMMY_FS_INFO = 5, 56846 }; 56847 56848 struct btrfs_header { 56849 u8 csum[32]; 56850 u8 fsid[16]; 56851 __le64 bytenr; 56852 __le64 flags; 56853 u8 chunk_tree_uuid[16]; 56854 __le64 generation; 56855 __le64 owner; 56856 __le32 nritems; 56857 u8 level; 56858 } __attribute__((packed)); 56859 56860 struct btrfs_root_backup { 56861 __le64 tree_root; 56862 __le64 tree_root_gen; 56863 __le64 chunk_root; 56864 __le64 chunk_root_gen; 56865 __le64 extent_root; 56866 __le64 extent_root_gen; 56867 __le64 fs_root; 56868 __le64 fs_root_gen; 56869 __le64 dev_root; 56870 __le64 dev_root_gen; 56871 __le64 csum_root; 56872 __le64 csum_root_gen; 56873 __le64 total_bytes; 56874 __le64 bytes_used; 56875 __le64 num_devices; 56876 __le64 unused_64[4]; 56877 u8 tree_root_level; 56878 u8 chunk_root_level; 56879 u8 extent_root_level; 56880 u8 fs_root_level; 56881 u8 dev_root_level; 56882 u8 csum_root_level; 56883 u8 unused_8[10]; 56884 }; 56885 56886 struct btrfs_super_block { 56887 u8 csum[32]; 56888 u8 fsid[16]; 56889 __le64 bytenr; 56890 __le64 flags; 56891 __le64 magic; 56892 __le64 generation; 56893 __le64 root; 56894 __le64 chunk_root; 56895 __le64 log_root; 56896 __le64 log_root_transid; 56897 __le64 total_bytes; 56898 __le64 bytes_used; 56899 __le64 root_dir_objectid; 56900 __le64 num_devices; 56901 __le32 sectorsize; 56902 __le32 nodesize; 56903 __le32 __unused_leafsize; 56904 __le32 stripesize; 56905 __le32 sys_chunk_array_size; 56906 __le64 chunk_root_generation; 56907 __le64 compat_flags; 56908 __le64 compat_ro_flags; 56909 __le64 incompat_flags; 56910 __le16 csum_type; 56911 u8 root_level; 56912 u8 chunk_root_level; 56913 u8 log_root_level; 56914 struct btrfs_dev_item dev_item; 56915 char label[256]; 56916 __le64 cache_generation; 56917 __le64 uuid_tree_generation; 56918 u8 metadata_uuid[16]; 56919 __le64 reserved[28]; 56920 u8 sys_chunk_array[2048]; 56921 struct btrfs_root_backup super_roots[4]; 56922 } __attribute__((packed)); 56923 56924 struct btrfs_item { 56925 struct btrfs_disk_key key; 56926 __le32 offset; 56927 __le32 size; 56928 } __attribute__((packed)); 56929 56930 struct btrfs_path { 56931 struct extent_buffer *nodes[8]; 56932 int slots[8]; 56933 u8 locks[8]; 56934 u8 reada; 56935 u8 lowest_level; 56936 unsigned int search_for_split: 1; 56937 unsigned int keep_locks: 1; 56938 unsigned int skip_locking: 1; 56939 unsigned int search_commit_root: 1; 56940 unsigned int need_commit_sem: 1; 56941 unsigned int skip_release_on_error: 1; 56942 unsigned int search_for_extension: 1; 56943 }; 56944 56945 struct rcu_string; 56946 56947 struct btrfs_zoned_device_info; 56948 56949 struct scrub_ctx; 56950 56951 struct reada_zone; 56952 56953 struct btrfs_device { 56954 struct list_head dev_list; 56955 struct list_head dev_alloc_list; 56956 struct list_head post_commit_list; 56957 struct btrfs_fs_devices *fs_devices; 56958 struct btrfs_fs_info *fs_info; 56959 struct rcu_string *name; 56960 u64 generation; 56961 struct block_device *bdev; 56962 struct btrfs_zoned_device_info *zone_info; 56963 fmode_t mode; 56964 long unsigned int dev_state; 56965 blk_status_t last_flush_error; 56966 u64 devid; 56967 u64 total_bytes; 56968 u64 disk_total_bytes; 56969 u64 bytes_used; 56970 u32 io_align; 56971 u32 io_width; 56972 u64 type; 56973 u32 sector_size; 56974 u8 uuid[16]; 56975 u64 commit_total_bytes; 56976 u64 commit_bytes_used; 56977 struct bio *flush_bio; 56978 struct completion flush_wait; 56979 struct scrub_ctx *scrub_ctx; 56980 atomic_t reada_in_flight; 56981 u64 reada_next; 56982 struct reada_zone *reada_curr_zone; 56983 struct xarray reada_zones; 56984 struct xarray reada_extents; 56985 int dev_stats_valid; 56986 atomic_t dev_stats_ccnt; 56987 atomic_t dev_stat_values[5]; 56988 struct extent_io_tree alloc_state; 56989 struct completion kobj_unregister; 56990 struct kobject devid_kobj; 56991 }; 56992 56993 enum btrfs_discard_state { 56994 BTRFS_DISCARD_EXTENTS = 0, 56995 BTRFS_DISCARD_BITMAPS = 1, 56996 BTRFS_DISCARD_RESET_CURSOR = 2, 56997 }; 56998 56999 struct btrfs_io_ctl { 57000 void *cur; 57001 void *orig; 57002 struct page *page; 57003 struct page **pages; 57004 struct btrfs_fs_info *fs_info; 57005 struct inode *inode; 57006 long unsigned int size; 57007 int index; 57008 int num_pages; 57009 int entries; 57010 int bitmaps; 57011 }; 57012 57013 struct btrfs_full_stripe_locks_tree { 57014 struct rb_root root; 57015 struct mutex lock; 57016 }; 57017 57018 struct btrfs_caching_control; 57019 57020 struct btrfs_free_space_ctl; 57021 57022 struct btrfs_block_group { 57023 struct btrfs_fs_info *fs_info; 57024 struct inode *inode; 57025 spinlock_t lock; 57026 u64 start; 57027 u64 length; 57028 u64 pinned; 57029 u64 reserved; 57030 u64 used; 57031 u64 delalloc_bytes; 57032 u64 bytes_super; 57033 u64 flags; 57034 u64 cache_generation; 57035 u32 bitmap_high_thresh; 57036 u32 bitmap_low_thresh; 57037 struct rw_semaphore data_rwsem; 57038 long unsigned int full_stripe_len; 57039 unsigned int ro; 57040 unsigned int iref: 1; 57041 unsigned int has_caching_ctl: 1; 57042 unsigned int removed: 1; 57043 int disk_cache_state; 57044 int cached; 57045 struct btrfs_caching_control *caching_ctl; 57046 u64 last_byte_to_unpin; 57047 struct btrfs_space_info *space_info; 57048 struct btrfs_free_space_ctl *free_space_ctl; 57049 struct rb_node cache_node; 57050 struct list_head list; 57051 refcount_t refs; 57052 struct list_head cluster_list; 57053 struct list_head bg_list; 57054 struct list_head ro_list; 57055 atomic_t frozen; 57056 struct list_head discard_list; 57057 int discard_index; 57058 u64 discard_eligible_time; 57059 u64 discard_cursor; 57060 enum btrfs_discard_state discard_state; 57061 struct list_head dirty_list; 57062 struct list_head io_list; 57063 struct btrfs_io_ctl io_ctl; 57064 atomic_t reservations; 57065 atomic_t nocow_writers; 57066 struct mutex free_space_lock; 57067 int needs_free_space; 57068 int swap_extents; 57069 struct btrfs_full_stripe_locks_tree full_stripe_locks_root; 57070 }; 57071 57072 enum { 57073 BTRFS_FS_BARRIER = 0, 57074 BTRFS_FS_CLOSING_START = 1, 57075 BTRFS_FS_CLOSING_DONE = 2, 57076 BTRFS_FS_LOG_RECOVERING = 3, 57077 BTRFS_FS_OPEN = 4, 57078 BTRFS_FS_QUOTA_ENABLED = 5, 57079 BTRFS_FS_UPDATE_UUID_TREE_GEN = 6, 57080 BTRFS_FS_CREATING_FREE_SPACE_TREE = 7, 57081 BTRFS_FS_BTREE_ERR = 8, 57082 BTRFS_FS_LOG1_ERR = 9, 57083 BTRFS_FS_LOG2_ERR = 10, 57084 BTRFS_FS_QUOTA_OVERRIDE = 11, 57085 BTRFS_FS_FROZEN = 12, 57086 BTRFS_FS_BALANCE_RUNNING = 13, 57087 BTRFS_FS_CLEANER_RUNNING = 14, 57088 BTRFS_FS_CSUM_IMPL_FAST = 15, 57089 BTRFS_FS_DISCARD_RUNNING = 16, 57090 BTRFS_FS_CLEANUP_SPACE_CACHE_V1 = 17, 57091 BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED = 18, 57092 }; 57093 57094 struct btrfs_qgroup_swapped_blocks { 57095 spinlock_t lock; 57096 bool swapped; 57097 struct rb_root blocks[8]; 57098 }; 57099 57100 struct btrfs_root { 57101 struct extent_buffer *node; 57102 struct extent_buffer *commit_root; 57103 struct btrfs_root *log_root; 57104 struct btrfs_root *reloc_root; 57105 long unsigned int state; 57106 struct btrfs_root_item root_item; 57107 struct btrfs_key root_key; 57108 struct btrfs_fs_info *fs_info; 57109 struct extent_io_tree dirty_log_pages; 57110 struct mutex objectid_mutex; 57111 spinlock_t accounting_lock; 57112 int: 32; 57113 struct btrfs_block_rsv *block_rsv; 57114 struct mutex log_mutex; 57115 wait_queue_head_t log_writer_wait; 57116 wait_queue_head_t log_commit_wait[2]; 57117 struct list_head log_ctxs[2]; 57118 atomic_t log_writers; 57119 atomic_t log_commit[2]; 57120 atomic_t log_batch; 57121 int log_transid; 57122 int log_transid_committed; 57123 int last_log_commit; 57124 pid_t log_start_pid; 57125 u64 last_trans; 57126 u32 type; 57127 int: 32; 57128 u64 highest_objectid; 57129 struct btrfs_key defrag_progress; 57130 struct btrfs_key defrag_max; 57131 long: 48; 57132 struct list_head dirty_list; 57133 struct list_head root_list; 57134 spinlock_t log_extents_lock[2]; 57135 struct list_head logged_list[2]; 57136 int orphan_cleanup_state; 57137 spinlock_t inode_lock; 57138 struct rb_root inode_tree; 57139 struct xarray delayed_nodes_tree; 57140 dev_t anon_dev; 57141 spinlock_t root_item_lock; 57142 refcount_t refs; 57143 int: 32; 57144 struct mutex delalloc_mutex; 57145 spinlock_t delalloc_lock; 57146 int: 32; 57147 struct list_head delalloc_inodes; 57148 struct list_head delalloc_root; 57149 u64 nr_delalloc_inodes; 57150 struct mutex ordered_extent_mutex; 57151 spinlock_t ordered_extent_lock; 57152 int: 32; 57153 struct list_head ordered_extents; 57154 struct list_head ordered_root; 57155 u64 nr_ordered_extents; 57156 struct list_head reloc_dirty_list; 57157 int send_in_progress; 57158 int dedupe_in_progress; 57159 struct btrfs_drew_lock snapshot_lock; 57160 atomic_t snapshot_force_cow; 57161 spinlock_t qgroup_meta_rsv_lock; 57162 u64 qgroup_meta_rsv_pertrans; 57163 u64 qgroup_meta_rsv_prealloc; 57164 wait_queue_head_t qgroup_flush_wait; 57165 atomic_t nr_swapfiles; 57166 int: 32; 57167 struct btrfs_qgroup_swapped_blocks swapped_blocks; 57168 struct extent_io_tree log_csum_range; 57169 } __attribute__((packed)); 57170 57171 enum btrfs_trans_state { 57172 TRANS_STATE_RUNNING = 0, 57173 TRANS_STATE_COMMIT_START = 1, 57174 TRANS_STATE_COMMIT_DOING = 2, 57175 TRANS_STATE_UNBLOCKED = 3, 57176 TRANS_STATE_COMPLETED = 4, 57177 TRANS_STATE_MAX = 5, 57178 }; 57179 57180 struct btrfs_delayed_ref_root { 57181 struct rb_root_cached href_root; 57182 struct rb_root dirty_extent_root; 57183 spinlock_t lock; 57184 atomic_t num_entries; 57185 long unsigned int num_heads; 57186 long unsigned int num_heads_ready; 57187 u64 pending_csums; 57188 int flushing; 57189 u64 run_delayed_start; 57190 u64 qgroup_to_skip; 57191 }; 57192 57193 struct btrfs_transaction { 57194 u64 transid; 57195 atomic_t num_extwriters; 57196 atomic_t num_writers; 57197 refcount_t use_count; 57198 long unsigned int flags; 57199 enum btrfs_trans_state state; 57200 int aborted; 57201 struct list_head list; 57202 struct extent_io_tree dirty_pages; 57203 time64_t start_time; 57204 wait_queue_head_t writer_wait; 57205 wait_queue_head_t commit_wait; 57206 struct list_head pending_snapshots; 57207 struct list_head dev_update_list; 57208 struct list_head switch_commits; 57209 struct list_head dirty_bgs; 57210 struct list_head io_bgs; 57211 struct list_head dropped_roots; 57212 struct extent_io_tree pinned_extents; 57213 struct mutex cache_write_mutex; 57214 spinlock_t dirty_bgs_lock; 57215 struct list_head deleted_bgs; 57216 spinlock_t dropped_roots_lock; 57217 struct btrfs_delayed_ref_root delayed_refs; 57218 struct btrfs_fs_info *fs_info; 57219 atomic_t pending_ordered; 57220 wait_queue_head_t pending_wait; 57221 }; 57222 57223 enum btrfs_chunk_allocation_policy { 57224 BTRFS_CHUNK_ALLOC_REGULAR = 0, 57225 }; 57226 57227 enum btrfs_read_policy { 57228 BTRFS_READ_POLICY_PID = 0, 57229 BTRFS_NR_READ_POLICY = 1, 57230 }; 57231 57232 struct btrfs_fs_devices { 57233 u8 fsid[16]; 57234 u8 metadata_uuid[16]; 57235 bool fsid_change; 57236 struct list_head fs_list; 57237 u64 num_devices; 57238 u64 open_devices; 57239 u64 rw_devices; 57240 u64 missing_devices; 57241 u64 total_rw_bytes; 57242 u64 total_devices; 57243 u64 latest_generation; 57244 struct block_device *latest_bdev; 57245 struct mutex device_list_mutex; 57246 struct list_head devices; 57247 struct list_head alloc_list; 57248 struct list_head seed_list; 57249 bool seeding; 57250 int opened; 57251 bool rotating; 57252 struct btrfs_fs_info *fs_info; 57253 struct kobject fsid_kobj; 57254 struct kobject *devices_kobj; 57255 struct kobject *devinfo_kobj; 57256 struct completion kobj_unregister; 57257 enum btrfs_chunk_allocation_policy chunk_alloc_policy; 57258 enum btrfs_read_policy read_policy; 57259 }; 57260 57261 struct btrfs_balance_control { 57262 struct btrfs_balance_args data; 57263 struct btrfs_balance_args meta; 57264 struct btrfs_balance_args sys; 57265 u64 flags; 57266 struct btrfs_balance_progress stat; 57267 }; 57268 57269 struct btrfs_delayed_root { 57270 spinlock_t lock; 57271 struct list_head node_list; 57272 struct list_head prepare_list; 57273 atomic_t items; 57274 atomic_t items_seq; 57275 int nodes; 57276 wait_queue_head_t wait; 57277 }; 57278 57279 enum btrfs_reserve_flush_enum { 57280 BTRFS_RESERVE_NO_FLUSH = 0, 57281 BTRFS_RESERVE_FLUSH_LIMIT = 1, 57282 BTRFS_RESERVE_FLUSH_EVICT = 2, 57283 BTRFS_RESERVE_FLUSH_DATA = 3, 57284 BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE = 4, 57285 BTRFS_RESERVE_FLUSH_ALL = 5, 57286 BTRFS_RESERVE_FLUSH_ALL_STEAL = 6, 57287 }; 57288 57289 enum btrfs_flush_state { 57290 FLUSH_DELAYED_ITEMS_NR = 1, 57291 FLUSH_DELAYED_ITEMS = 2, 57292 FLUSH_DELAYED_REFS_NR = 3, 57293 FLUSH_DELAYED_REFS = 4, 57294 FLUSH_DELALLOC = 5, 57295 FLUSH_DELALLOC_WAIT = 6, 57296 ALLOC_CHUNK = 7, 57297 ALLOC_CHUNK_FORCE = 8, 57298 RUN_DELAYED_IPUTS = 9, 57299 COMMIT_TRANS = 10, 57300 }; 57301 57302 struct btrfs_delayed_node { 57303 u64 inode_id; 57304 u64 bytes_reserved; 57305 struct btrfs_root *root; 57306 struct list_head n_list; 57307 struct list_head p_list; 57308 struct rb_root_cached ins_root; 57309 struct rb_root_cached del_root; 57310 struct mutex mutex; 57311 struct btrfs_inode_item inode_item; 57312 refcount_t refs; 57313 u64 index_cnt; 57314 long unsigned int flags; 57315 int count; 57316 }; 57317 57318 enum { 57319 BTRFS_ORDERED_IO_DONE = 0, 57320 BTRFS_ORDERED_COMPLETE = 1, 57321 BTRFS_ORDERED_NOCOW = 2, 57322 BTRFS_ORDERED_COMPRESSED = 3, 57323 BTRFS_ORDERED_PREALLOC = 4, 57324 BTRFS_ORDERED_DIRECT = 5, 57325 BTRFS_ORDERED_IOERR = 6, 57326 BTRFS_ORDERED_TRUNCATED = 7, 57327 BTRFS_ORDERED_REGULAR = 8, 57328 BTRFS_ORDERED_LOGGED = 9, 57329 BTRFS_ORDERED_LOGGED_CSUM = 10, 57330 BTRFS_ORDERED_PENDING = 11, 57331 }; 57332 57333 struct btrfs_ordered_extent { 57334 u64 file_offset; 57335 u64 disk_bytenr; 57336 u64 num_bytes; 57337 u64 disk_num_bytes; 57338 u64 bytes_left; 57339 u64 outstanding_isize; 57340 u64 truncated_len; 57341 long unsigned int flags; 57342 int compress_type; 57343 int qgroup_rsv; 57344 refcount_t refs; 57345 struct inode *inode; 57346 struct list_head list; 57347 struct list_head log_list; 57348 wait_queue_head_t wait; 57349 struct rb_node rb_node; 57350 struct list_head root_extent_list; 57351 struct btrfs_work work; 57352 struct completion completion; 57353 struct btrfs_work flush_work; 57354 struct list_head work_list; 57355 }; 57356 57357 struct btrfs_delayed_ref_node { 57358 struct rb_node ref_node; 57359 struct list_head add_list; 57360 u64 bytenr; 57361 u64 num_bytes; 57362 u64 seq; 57363 refcount_t refs; 57364 int ref_mod; 57365 unsigned int action: 8; 57366 unsigned int type: 8; 57367 unsigned int is_head: 1; 57368 unsigned int in_tree: 1; 57369 }; 57370 57371 struct btrfs_delayed_extent_op { 57372 struct btrfs_disk_key key; 57373 u8 level; 57374 bool update_key; 57375 bool update_flags; 57376 bool is_data; 57377 u64 flags_to_set; 57378 }; 57379 57380 struct btrfs_delayed_ref_head { 57381 u64 bytenr; 57382 u64 num_bytes; 57383 refcount_t refs; 57384 struct mutex mutex; 57385 spinlock_t lock; 57386 struct rb_root_cached ref_tree; 57387 struct list_head ref_add_list; 57388 struct rb_node href_node; 57389 struct btrfs_delayed_extent_op *extent_op; 57390 int total_ref_mod; 57391 int ref_mod; 57392 unsigned int must_insert_reserved: 1; 57393 unsigned int is_data: 1; 57394 unsigned int is_system: 1; 57395 unsigned int processing: 1; 57396 }; 57397 57398 struct btrfs_delayed_tree_ref { 57399 struct btrfs_delayed_ref_node node; 57400 u64 root; 57401 u64 parent; 57402 int level; 57403 }; 57404 57405 struct btrfs_delayed_data_ref { 57406 struct btrfs_delayed_ref_node node; 57407 u64 root; 57408 u64 parent; 57409 u64 objectid; 57410 u64 offset; 57411 }; 57412 57413 struct btrfs_trans_handle { 57414 u64 transid; 57415 u64 bytes_reserved; 57416 u64 chunk_bytes_reserved; 57417 long unsigned int delayed_ref_updates; 57418 struct btrfs_transaction *transaction; 57419 struct btrfs_block_rsv *block_rsv; 57420 struct btrfs_block_rsv *orig_rsv; 57421 refcount_t use_count; 57422 unsigned int type; 57423 short int aborted; 57424 bool adding_csums; 57425 bool allocating_chunk; 57426 bool can_flush_pending_bgs; 57427 bool reloc_reserved; 57428 bool dirty; 57429 struct btrfs_root *root; 57430 struct btrfs_fs_info *fs_info; 57431 struct list_head new_bgs; 57432 }; 57433 57434 struct rcu_string { 57435 struct callback_head rcu; 57436 char str[0]; 57437 }; 57438 57439 struct btrfs_zoned_device_info { 57440 u64 zone_size; 57441 u8 zone_size_shift; 57442 u64 max_zone_append_size; 57443 u32 nr_zones; 57444 long unsigned int *seq_zones; 57445 long unsigned int *empty_zones; 57446 struct blk_zone sb_zones[6]; 57447 }; 57448 57449 struct btrfs_device_info { 57450 struct btrfs_device *dev; 57451 u64 dev_offset; 57452 u64 max_avail; 57453 u64 total_avail; 57454 }; 57455 57456 struct btrfs_raid_attr { 57457 u8 sub_stripes; 57458 u8 dev_stripes; 57459 u8 devs_max; 57460 u8 devs_min; 57461 u8 tolerated_failures; 57462 u8 devs_increment; 57463 u8 ncopies; 57464 u8 nparity; 57465 u8 mindev_error; 57466 const char raid_name[8]; 57467 u64 bg_flag; 57468 }; 57469 57470 enum btrfs_compression_type { 57471 BTRFS_COMPRESS_NONE = 0, 57472 BTRFS_COMPRESS_ZLIB = 1, 57473 BTRFS_COMPRESS_LZO = 2, 57474 BTRFS_COMPRESS_ZSTD = 3, 57475 BTRFS_NR_COMPRESS_TYPES = 4, 57476 }; 57477 57478 enum btrfs_trim_state { 57479 BTRFS_TRIM_STATE_UNTRIMMED = 0, 57480 BTRFS_TRIM_STATE_TRIMMED = 1, 57481 BTRFS_TRIM_STATE_TRIMMING = 2, 57482 }; 57483 57484 struct btrfs_free_space { 57485 struct rb_node offset_index; 57486 u64 offset; 57487 u64 bytes; 57488 u64 max_extent_size; 57489 long unsigned int *bitmap; 57490 struct list_head list; 57491 enum btrfs_trim_state trim_state; 57492 s32 bitmap_extents; 57493 }; 57494 57495 struct btrfs_free_space_op; 57496 57497 struct btrfs_free_space_ctl { 57498 spinlock_t tree_lock; 57499 struct rb_root free_space_offset; 57500 u64 free_space; 57501 int extents_thresh; 57502 int free_extents; 57503 int total_bitmaps; 57504 int unit; 57505 u64 start; 57506 s32 discardable_extents[2]; 57507 s64 discardable_bytes[2]; 57508 const struct btrfs_free_space_op *op; 57509 void *private; 57510 struct mutex cache_writeout_mutex; 57511 struct list_head trimming_ranges; 57512 }; 57513 57514 struct btrfs_free_space_op { 57515 bool (*use_bitmap)(struct btrfs_free_space_ctl *, struct btrfs_free_space *); 57516 }; 57517 57518 struct extent_inode_elem; 57519 57520 struct prelim_ref { 57521 struct rb_node rbnode; 57522 u64 root_id; 57523 struct btrfs_key key_for_search; 57524 int level; 57525 int count; 57526 struct extent_inode_elem *inode_list; 57527 u64 parent; 57528 u64 wanted_disk_byte; 57529 }; 57530 57531 struct btrfs_caching_control { 57532 struct list_head list; 57533 struct mutex mutex; 57534 wait_queue_head_t wait; 57535 struct btrfs_work work; 57536 struct btrfs_block_group *block_group; 57537 u64 progress; 57538 refcount_t count; 57539 }; 57540 57541 struct btrfs_qgroup_extent_record { 57542 struct rb_node node; 57543 u64 bytenr; 57544 u64 num_bytes; 57545 u32 data_rsv; 57546 u64 data_rsv_refroot; 57547 struct ulist *old_roots; 57548 }; 57549 57550 enum btrfs_qgroup_rsv_type { 57551 BTRFS_QGROUP_RSV_DATA = 0, 57552 BTRFS_QGROUP_RSV_META_PERTRANS = 1, 57553 BTRFS_QGROUP_RSV_META_PREALLOC = 2, 57554 BTRFS_QGROUP_RSV_LAST = 3, 57555 }; 57556 57557 struct btrfs_qgroup_rsv { 57558 u64 values[3]; 57559 }; 57560 57561 struct btrfs_qgroup { 57562 u64 qgroupid; 57563 u64 rfer; 57564 u64 rfer_cmpr; 57565 u64 excl; 57566 u64 excl_cmpr; 57567 u64 lim_flags; 57568 u64 max_rfer; 57569 u64 max_excl; 57570 u64 rsv_rfer; 57571 u64 rsv_excl; 57572 struct btrfs_qgroup_rsv rsv; 57573 struct list_head groups; 57574 struct list_head members; 57575 struct list_head dirty; 57576 struct rb_node node; 57577 u64 old_refcnt; 57578 u64 new_refcnt; 57579 struct kobject kobj; 57580 }; 57581 57582 struct trace_event_raw_btrfs_transaction_commit { 57583 struct trace_entry ent; 57584 u8 fsid[16]; 57585 u64 generation; 57586 u64 root_objectid; 57587 char __data[0]; 57588 }; 57589 57590 struct trace_event_raw_btrfs__inode { 57591 struct trace_entry ent; 57592 u8 fsid[16]; 57593 u64 ino; 57594 u64 blocks; 57595 u64 disk_i_size; 57596 u64 generation; 57597 u64 last_trans; 57598 u64 logged_trans; 57599 u64 root_objectid; 57600 char __data[0]; 57601 }; 57602 57603 struct trace_event_raw_btrfs_get_extent { 57604 struct trace_entry ent; 57605 u8 fsid[16]; 57606 u64 root_objectid; 57607 u64 ino; 57608 u64 start; 57609 u64 len; 57610 u64 orig_start; 57611 u64 block_start; 57612 u64 block_len; 57613 long unsigned int flags; 57614 int refs; 57615 unsigned int compress_type; 57616 char __data[0]; 57617 }; 57618 57619 struct trace_event_raw_btrfs_handle_em_exist { 57620 struct trace_entry ent; 57621 u8 fsid[16]; 57622 u64 e_start; 57623 u64 e_len; 57624 u64 map_start; 57625 u64 map_len; 57626 u64 start; 57627 u64 len; 57628 char __data[0]; 57629 }; 57630 57631 struct trace_event_raw_btrfs__file_extent_item_regular { 57632 struct trace_entry ent; 57633 u8 fsid[16]; 57634 u64 root_obj; 57635 u64 ino; 57636 loff_t isize; 57637 u64 disk_isize; 57638 u64 num_bytes; 57639 u64 ram_bytes; 57640 u64 disk_bytenr; 57641 u64 disk_num_bytes; 57642 u64 extent_offset; 57643 u8 extent_type; 57644 u8 compression; 57645 u64 extent_start; 57646 u64 extent_end; 57647 char __data[0]; 57648 }; 57649 57650 struct trace_event_raw_btrfs__file_extent_item_inline { 57651 struct trace_entry ent; 57652 u8 fsid[16]; 57653 u64 root_obj; 57654 u64 ino; 57655 loff_t isize; 57656 u64 disk_isize; 57657 u8 extent_type; 57658 u8 compression; 57659 u64 extent_start; 57660 u64 extent_end; 57661 char __data[0]; 57662 }; 57663 57664 struct trace_event_raw_btrfs__ordered_extent { 57665 struct trace_entry ent; 57666 u8 fsid[16]; 57667 u64 ino; 57668 u64 file_offset; 57669 u64 start; 57670 u64 len; 57671 u64 disk_len; 57672 u64 bytes_left; 57673 long unsigned int flags; 57674 int compress_type; 57675 int refs; 57676 u64 root_objectid; 57677 u64 truncated_len; 57678 char __data[0]; 57679 }; 57680 57681 struct trace_event_raw_btrfs__writepage { 57682 struct trace_entry ent; 57683 u8 fsid[16]; 57684 u64 ino; 57685 long unsigned int index; 57686 long int nr_to_write; 57687 long int pages_skipped; 57688 loff_t range_start; 57689 loff_t range_end; 57690 char for_kupdate; 57691 char for_reclaim; 57692 char range_cyclic; 57693 long unsigned int writeback_index; 57694 u64 root_objectid; 57695 char __data[0]; 57696 }; 57697 57698 struct trace_event_raw_btrfs_writepage_end_io_hook { 57699 struct trace_entry ent; 57700 u8 fsid[16]; 57701 u64 ino; 57702 long unsigned int index; 57703 u64 start; 57704 u64 end; 57705 int uptodate; 57706 u64 root_objectid; 57707 char __data[0]; 57708 }; 57709 57710 struct trace_event_raw_btrfs_sync_file { 57711 struct trace_entry ent; 57712 u8 fsid[16]; 57713 u64 ino; 57714 u64 parent; 57715 int datasync; 57716 u64 root_objectid; 57717 char __data[0]; 57718 }; 57719 57720 struct trace_event_raw_btrfs_sync_fs { 57721 struct trace_entry ent; 57722 u8 fsid[16]; 57723 int wait; 57724 char __data[0]; 57725 }; 57726 57727 struct trace_event_raw_btrfs_add_block_group { 57728 struct trace_entry ent; 57729 u8 fsid[16]; 57730 u64 offset; 57731 u64 size; 57732 u64 flags; 57733 u64 bytes_used; 57734 u64 bytes_super; 57735 int create; 57736 char __data[0]; 57737 }; 57738 57739 struct trace_event_raw_btrfs_delayed_tree_ref { 57740 struct trace_entry ent; 57741 u8 fsid[16]; 57742 u64 bytenr; 57743 u64 num_bytes; 57744 int action; 57745 u64 parent; 57746 u64 ref_root; 57747 int level; 57748 int type; 57749 u64 seq; 57750 char __data[0]; 57751 }; 57752 57753 struct trace_event_raw_btrfs_delayed_data_ref { 57754 struct trace_entry ent; 57755 u8 fsid[16]; 57756 u64 bytenr; 57757 u64 num_bytes; 57758 int action; 57759 u64 parent; 57760 u64 ref_root; 57761 u64 owner; 57762 u64 offset; 57763 int type; 57764 u64 seq; 57765 char __data[0]; 57766 }; 57767 57768 struct trace_event_raw_btrfs_delayed_ref_head { 57769 struct trace_entry ent; 57770 u8 fsid[16]; 57771 u64 bytenr; 57772 u64 num_bytes; 57773 int action; 57774 int is_data; 57775 char __data[0]; 57776 }; 57777 57778 struct trace_event_raw_btrfs__chunk { 57779 struct trace_entry ent; 57780 u8 fsid[16]; 57781 int num_stripes; 57782 u64 type; 57783 int sub_stripes; 57784 u64 offset; 57785 u64 size; 57786 u64 root_objectid; 57787 char __data[0]; 57788 }; 57789 57790 struct trace_event_raw_btrfs_cow_block { 57791 struct trace_entry ent; 57792 u8 fsid[16]; 57793 u64 root_objectid; 57794 u64 buf_start; 57795 int refs; 57796 u64 cow_start; 57797 int buf_level; 57798 int cow_level; 57799 char __data[0]; 57800 }; 57801 57802 struct trace_event_raw_btrfs_space_reservation { 57803 struct trace_entry ent; 57804 u8 fsid[16]; 57805 u32 __data_loc_type; 57806 u64 val; 57807 u64 bytes; 57808 int reserve; 57809 char __data[0]; 57810 }; 57811 57812 struct trace_event_raw_btrfs_trigger_flush { 57813 struct trace_entry ent; 57814 u8 fsid[16]; 57815 u64 flags; 57816 u64 bytes; 57817 int flush; 57818 u32 __data_loc_reason; 57819 char __data[0]; 57820 }; 57821 57822 struct trace_event_raw_btrfs_flush_space { 57823 struct trace_entry ent; 57824 u8 fsid[16]; 57825 u64 flags; 57826 u64 num_bytes; 57827 int state; 57828 int ret; 57829 char __data[0]; 57830 }; 57831 57832 struct trace_event_raw_btrfs__reserved_extent { 57833 struct trace_entry ent; 57834 u8 fsid[16]; 57835 u64 start; 57836 u64 len; 57837 char __data[0]; 57838 }; 57839 57840 struct trace_event_raw_find_free_extent { 57841 struct trace_entry ent; 57842 u8 fsid[16]; 57843 u64 root_objectid; 57844 u64 num_bytes; 57845 u64 empty_size; 57846 u64 data; 57847 char __data[0]; 57848 }; 57849 57850 struct trace_event_raw_btrfs__reserve_extent { 57851 struct trace_entry ent; 57852 u8 fsid[16]; 57853 u64 bg_objectid; 57854 u64 flags; 57855 u64 start; 57856 u64 len; 57857 char __data[0]; 57858 }; 57859 57860 struct trace_event_raw_btrfs_find_cluster { 57861 struct trace_entry ent; 57862 u8 fsid[16]; 57863 u64 bg_objectid; 57864 u64 flags; 57865 u64 start; 57866 u64 bytes; 57867 u64 empty_size; 57868 u64 min_bytes; 57869 char __data[0]; 57870 }; 57871 57872 struct trace_event_raw_btrfs_failed_cluster_setup { 57873 struct trace_entry ent; 57874 u8 fsid[16]; 57875 u64 bg_objectid; 57876 char __data[0]; 57877 }; 57878 57879 struct trace_event_raw_btrfs_setup_cluster { 57880 struct trace_entry ent; 57881 u8 fsid[16]; 57882 u64 bg_objectid; 57883 u64 flags; 57884 u64 start; 57885 u64 max_size; 57886 u64 size; 57887 int bitmap; 57888 char __data[0]; 57889 }; 57890 57891 struct trace_event_raw_alloc_extent_state { 57892 struct trace_entry ent; 57893 const struct extent_state *state; 57894 gfp_t mask; 57895 const void *ip; 57896 char __data[0]; 57897 }; 57898 57899 struct trace_event_raw_free_extent_state { 57900 struct trace_entry ent; 57901 const struct extent_state *state; 57902 const void *ip; 57903 char __data[0]; 57904 }; 57905 57906 struct trace_event_raw_btrfs__work { 57907 struct trace_entry ent; 57908 u8 fsid[16]; 57909 const void *work; 57910 const void *wq; 57911 const void *func; 57912 const void *ordered_func; 57913 const void *ordered_free; 57914 const void *normal_work; 57915 char __data[0]; 57916 }; 57917 57918 struct trace_event_raw_btrfs__work__done { 57919 struct trace_entry ent; 57920 u8 fsid[16]; 57921 const void *wtag; 57922 char __data[0]; 57923 }; 57924 57925 struct trace_event_raw_btrfs__workqueue { 57926 struct trace_entry ent; 57927 u8 fsid[16]; 57928 const void *wq; 57929 u32 __data_loc_name; 57930 int high; 57931 char __data[0]; 57932 }; 57933 57934 struct trace_event_raw_btrfs__workqueue_done { 57935 struct trace_entry ent; 57936 u8 fsid[16]; 57937 const void *wq; 57938 char __data[0]; 57939 }; 57940 57941 struct trace_event_raw_btrfs__qgroup_rsv_data { 57942 struct trace_entry ent; 57943 u8 fsid[16]; 57944 u64 rootid; 57945 u64 ino; 57946 u64 start; 57947 u64 len; 57948 u64 reserved; 57949 int op; 57950 char __data[0]; 57951 }; 57952 57953 struct trace_event_raw_btrfs_qgroup_extent { 57954 struct trace_entry ent; 57955 u8 fsid[16]; 57956 u64 bytenr; 57957 u64 num_bytes; 57958 char __data[0]; 57959 }; 57960 57961 struct trace_event_raw_qgroup_num_dirty_extents { 57962 struct trace_entry ent; 57963 u8 fsid[16]; 57964 u64 transid; 57965 u64 num_dirty_extents; 57966 char __data[0]; 57967 }; 57968 57969 struct trace_event_raw_btrfs_qgroup_account_extent { 57970 struct trace_entry ent; 57971 u8 fsid[16]; 57972 u64 transid; 57973 u64 bytenr; 57974 u64 num_bytes; 57975 u64 nr_old_roots; 57976 u64 nr_new_roots; 57977 char __data[0]; 57978 }; 57979 57980 struct trace_event_raw_qgroup_update_counters { 57981 struct trace_entry ent; 57982 u8 fsid[16]; 57983 u64 qgid; 57984 u64 old_rfer; 57985 u64 old_excl; 57986 u64 cur_old_count; 57987 u64 cur_new_count; 57988 char __data[0]; 57989 }; 57990 57991 struct trace_event_raw_qgroup_update_reserve { 57992 struct trace_entry ent; 57993 u8 fsid[16]; 57994 u64 qgid; 57995 u64 cur_reserved; 57996 s64 diff; 57997 int type; 57998 char __data[0]; 57999 }; 58000 58001 struct trace_event_raw_qgroup_meta_reserve { 58002 struct trace_entry ent; 58003 u8 fsid[16]; 58004 u64 refroot; 58005 s64 diff; 58006 int type; 58007 char __data[0]; 58008 }; 58009 58010 struct trace_event_raw_qgroup_meta_convert { 58011 struct trace_entry ent; 58012 u8 fsid[16]; 58013 u64 refroot; 58014 s64 diff; 58015 char __data[0]; 58016 }; 58017 58018 struct trace_event_raw_qgroup_meta_free_all_pertrans { 58019 struct trace_entry ent; 58020 u8 fsid[16]; 58021 u64 refroot; 58022 s64 diff; 58023 int type; 58024 char __data[0]; 58025 }; 58026 58027 struct trace_event_raw_btrfs__prelim_ref { 58028 struct trace_entry ent; 58029 u8 fsid[16]; 58030 u64 root_id; 58031 u64 objectid; 58032 u8 type; 58033 u64 offset; 58034 int level; 58035 int old_count; 58036 u64 parent; 58037 u64 bytenr; 58038 int mod_count; 58039 u64 tree_size; 58040 char __data[0]; 58041 }; 58042 58043 struct trace_event_raw_btrfs_inode_mod_outstanding_extents { 58044 struct trace_entry ent; 58045 u8 fsid[16]; 58046 u64 root_objectid; 58047 u64 ino; 58048 int mod; 58049 char __data[0]; 58050 }; 58051 58052 struct trace_event_raw_btrfs__block_group { 58053 struct trace_entry ent; 58054 u8 fsid[16]; 58055 u64 bytenr; 58056 u64 len; 58057 u64 used; 58058 u64 flags; 58059 char __data[0]; 58060 }; 58061 58062 struct trace_event_raw_btrfs_set_extent_bit { 58063 struct trace_entry ent; 58064 u8 fsid[16]; 58065 unsigned int owner; 58066 u64 ino; 58067 u64 rootid; 58068 u64 start; 58069 u64 len; 58070 unsigned int set_bits; 58071 char __data[0]; 58072 }; 58073 58074 struct trace_event_raw_btrfs_clear_extent_bit { 58075 struct trace_entry ent; 58076 u8 fsid[16]; 58077 unsigned int owner; 58078 u64 ino; 58079 u64 rootid; 58080 u64 start; 58081 u64 len; 58082 unsigned int clear_bits; 58083 char __data[0]; 58084 }; 58085 58086 struct trace_event_raw_btrfs_convert_extent_bit { 58087 struct trace_entry ent; 58088 u8 fsid[16]; 58089 unsigned int owner; 58090 u64 ino; 58091 u64 rootid; 58092 u64 start; 58093 u64 len; 58094 unsigned int set_bits; 58095 unsigned int clear_bits; 58096 char __data[0]; 58097 }; 58098 58099 struct trace_event_raw_btrfs_sleep_tree_lock { 58100 struct trace_entry ent; 58101 u8 fsid[16]; 58102 u64 block; 58103 u64 generation; 58104 u64 start_ns; 58105 u64 end_ns; 58106 u64 diff_ns; 58107 u64 owner; 58108 int is_log_tree; 58109 char __data[0]; 58110 }; 58111 58112 struct trace_event_raw_btrfs_locking_events { 58113 struct trace_entry ent; 58114 u8 fsid[16]; 58115 u64 block; 58116 u64 generation; 58117 u64 owner; 58118 int is_log_tree; 58119 char __data[0]; 58120 }; 58121 58122 struct trace_event_raw_btrfs__space_info_update { 58123 struct trace_entry ent; 58124 u8 fsid[16]; 58125 u64 type; 58126 u64 old; 58127 s64 diff; 58128 char __data[0]; 58129 }; 58130 58131 struct trace_event_data_offsets_btrfs_transaction_commit {}; 58132 58133 struct trace_event_data_offsets_btrfs__inode {}; 58134 58135 struct trace_event_data_offsets_btrfs_get_extent {}; 58136 58137 struct trace_event_data_offsets_btrfs_handle_em_exist {}; 58138 58139 struct trace_event_data_offsets_btrfs__file_extent_item_regular {}; 58140 58141 struct trace_event_data_offsets_btrfs__file_extent_item_inline {}; 58142 58143 struct trace_event_data_offsets_btrfs__ordered_extent {}; 58144 58145 struct trace_event_data_offsets_btrfs__writepage {}; 58146 58147 struct trace_event_data_offsets_btrfs_writepage_end_io_hook {}; 58148 58149 struct trace_event_data_offsets_btrfs_sync_file {}; 58150 58151 struct trace_event_data_offsets_btrfs_sync_fs {}; 58152 58153 struct trace_event_data_offsets_btrfs_add_block_group {}; 58154 58155 struct trace_event_data_offsets_btrfs_delayed_tree_ref {}; 58156 58157 struct trace_event_data_offsets_btrfs_delayed_data_ref {}; 58158 58159 struct trace_event_data_offsets_btrfs_delayed_ref_head {}; 58160 58161 struct trace_event_data_offsets_btrfs__chunk {}; 58162 58163 struct trace_event_data_offsets_btrfs_cow_block {}; 58164 58165 struct trace_event_data_offsets_btrfs_space_reservation { 58166 u32 type; 58167 }; 58168 58169 struct trace_event_data_offsets_btrfs_trigger_flush { 58170 u32 reason; 58171 }; 58172 58173 struct trace_event_data_offsets_btrfs_flush_space {}; 58174 58175 struct trace_event_data_offsets_btrfs__reserved_extent {}; 58176 58177 struct trace_event_data_offsets_find_free_extent {}; 58178 58179 struct trace_event_data_offsets_btrfs__reserve_extent {}; 58180 58181 struct trace_event_data_offsets_btrfs_find_cluster {}; 58182 58183 struct trace_event_data_offsets_btrfs_failed_cluster_setup {}; 58184 58185 struct trace_event_data_offsets_btrfs_setup_cluster {}; 58186 58187 struct trace_event_data_offsets_alloc_extent_state {}; 58188 58189 struct trace_event_data_offsets_free_extent_state {}; 58190 58191 struct trace_event_data_offsets_btrfs__work {}; 58192 58193 struct trace_event_data_offsets_btrfs__work__done {}; 58194 58195 struct trace_event_data_offsets_btrfs__workqueue { 58196 u32 name; 58197 }; 58198 58199 struct trace_event_data_offsets_btrfs__workqueue_done {}; 58200 58201 struct trace_event_data_offsets_btrfs__qgroup_rsv_data {}; 58202 58203 struct trace_event_data_offsets_btrfs_qgroup_extent {}; 58204 58205 struct trace_event_data_offsets_qgroup_num_dirty_extents {}; 58206 58207 struct trace_event_data_offsets_btrfs_qgroup_account_extent {}; 58208 58209 struct trace_event_data_offsets_qgroup_update_counters {}; 58210 58211 struct trace_event_data_offsets_qgroup_update_reserve {}; 58212 58213 struct trace_event_data_offsets_qgroup_meta_reserve {}; 58214 58215 struct trace_event_data_offsets_qgroup_meta_convert {}; 58216 58217 struct trace_event_data_offsets_qgroup_meta_free_all_pertrans {}; 58218 58219 struct trace_event_data_offsets_btrfs__prelim_ref {}; 58220 58221 struct trace_event_data_offsets_btrfs_inode_mod_outstanding_extents {}; 58222 58223 struct trace_event_data_offsets_btrfs__block_group {}; 58224 58225 struct trace_event_data_offsets_btrfs_set_extent_bit {}; 58226 58227 struct trace_event_data_offsets_btrfs_clear_extent_bit {}; 58228 58229 struct trace_event_data_offsets_btrfs_convert_extent_bit {}; 58230 58231 struct trace_event_data_offsets_btrfs_sleep_tree_lock {}; 58232 58233 struct trace_event_data_offsets_btrfs_locking_events {}; 58234 58235 struct trace_event_data_offsets_btrfs__space_info_update {}; 58236 58237 typedef void (*btf_trace_btrfs_transaction_commit)(void *, const struct btrfs_root *); 58238 58239 typedef void (*btf_trace_btrfs_inode_new)(void *, const struct inode *); 58240 58241 typedef void (*btf_trace_btrfs_inode_request)(void *, const struct inode *); 58242 58243 typedef void (*btf_trace_btrfs_inode_evict)(void *, const struct inode *); 58244 58245 typedef void (*btf_trace_btrfs_get_extent)(void *, const struct btrfs_root *, const struct btrfs_inode *, const struct extent_map *); 58246 58247 typedef void (*btf_trace_btrfs_handle_em_exist)(void *, const struct btrfs_fs_info *, const struct extent_map *, const struct extent_map *, u64, u64); 58248 58249 typedef void (*btf_trace_btrfs_get_extent_show_fi_regular)(void *, const struct btrfs_inode *, const struct extent_buffer *, const struct btrfs_file_extent_item *, u64); 58250 58251 typedef void (*btf_trace_btrfs_truncate_show_fi_regular)(void *, const struct btrfs_inode *, const struct extent_buffer *, const struct btrfs_file_extent_item *, u64); 58252 58253 typedef void (*btf_trace_btrfs_get_extent_show_fi_inline)(void *, const struct btrfs_inode *, const struct extent_buffer *, const struct btrfs_file_extent_item *, int, u64); 58254 58255 typedef void (*btf_trace_btrfs_truncate_show_fi_inline)(void *, const struct btrfs_inode *, const struct extent_buffer *, const struct btrfs_file_extent_item *, int, u64); 58256 58257 typedef void (*btf_trace_btrfs_ordered_extent_add)(void *, const struct btrfs_inode *, const struct btrfs_ordered_extent *); 58258 58259 typedef void (*btf_trace_btrfs_ordered_extent_remove)(void *, const struct btrfs_inode *, const struct btrfs_ordered_extent *); 58260 58261 typedef void (*btf_trace_btrfs_ordered_extent_start)(void *, const struct btrfs_inode *, const struct btrfs_ordered_extent *); 58262 58263 typedef void (*btf_trace_btrfs_ordered_extent_put)(void *, const struct btrfs_inode *, const struct btrfs_ordered_extent *); 58264 58265 typedef void (*btf_trace___extent_writepage)(void *, const struct page *, const struct inode *, const struct writeback_control *); 58266 58267 typedef void (*btf_trace_btrfs_writepage_end_io_hook)(void *, const struct page *, u64, u64, int); 58268 58269 typedef void (*btf_trace_btrfs_sync_file)(void *, const struct file *, int); 58270 58271 typedef void (*btf_trace_btrfs_sync_fs)(void *, const struct btrfs_fs_info *, int); 58272 58273 typedef void (*btf_trace_btrfs_add_block_group)(void *, const struct btrfs_fs_info *, const struct btrfs_block_group *, int); 58274 58275 typedef void (*btf_trace_add_delayed_tree_ref)(void *, const struct btrfs_fs_info *, const struct btrfs_delayed_ref_node *, const struct btrfs_delayed_tree_ref *, int); 58276 58277 typedef void (*btf_trace_run_delayed_tree_ref)(void *, const struct btrfs_fs_info *, const struct btrfs_delayed_ref_node *, const struct btrfs_delayed_tree_ref *, int); 58278 58279 typedef void (*btf_trace_add_delayed_data_ref)(void *, const struct btrfs_fs_info *, const struct btrfs_delayed_ref_node *, const struct btrfs_delayed_data_ref *, int); 58280 58281 typedef void (*btf_trace_run_delayed_data_ref)(void *, const struct btrfs_fs_info *, const struct btrfs_delayed_ref_node *, const struct btrfs_delayed_data_ref *, int); 58282 58283 typedef void (*btf_trace_add_delayed_ref_head)(void *, const struct btrfs_fs_info *, const struct btrfs_delayed_ref_head *, int); 58284 58285 typedef void (*btf_trace_run_delayed_ref_head)(void *, const struct btrfs_fs_info *, const struct btrfs_delayed_ref_head *, int); 58286 58287 typedef void (*btf_trace_btrfs_chunk_alloc)(void *, const struct btrfs_fs_info *, const struct map_lookup *, u64, u64); 58288 58289 typedef void (*btf_trace_btrfs_chunk_free)(void *, const struct btrfs_fs_info *, const struct map_lookup *, u64, u64); 58290 58291 typedef void (*btf_trace_btrfs_cow_block)(void *, const struct btrfs_root *, const struct extent_buffer *, const struct extent_buffer *); 58292 58293 typedef void (*btf_trace_btrfs_space_reservation)(void *, const struct btrfs_fs_info *, const char *, u64, u64, int); 58294 58295 typedef void (*btf_trace_btrfs_trigger_flush)(void *, const struct btrfs_fs_info *, u64, u64, int, const char *); 58296 58297 typedef void (*btf_trace_btrfs_flush_space)(void *, const struct btrfs_fs_info *, u64, u64, int, int); 58298 58299 typedef void (*btf_trace_btrfs_reserved_extent_alloc)(void *, const struct btrfs_fs_info *, u64, u64); 58300 58301 typedef void (*btf_trace_btrfs_reserved_extent_free)(void *, const struct btrfs_fs_info *, u64, u64); 58302 58303 typedef void (*btf_trace_find_free_extent)(void *, const struct btrfs_root *, u64, u64, u64); 58304 58305 typedef void (*btf_trace_btrfs_reserve_extent)(void *, const struct btrfs_block_group *, u64, u64); 58306 58307 typedef void (*btf_trace_btrfs_reserve_extent_cluster)(void *, const struct btrfs_block_group *, u64, u64); 58308 58309 typedef void (*btf_trace_btrfs_find_cluster)(void *, const struct btrfs_block_group *, u64, u64, u64, u64); 58310 58311 typedef void (*btf_trace_btrfs_failed_cluster_setup)(void *, const struct btrfs_block_group *); 58312 58313 typedef void (*btf_trace_btrfs_setup_cluster)(void *, const struct btrfs_block_group *, const struct btrfs_free_cluster *, u64, int); 58314 58315 typedef void (*btf_trace_alloc_extent_state)(void *, const struct extent_state *, gfp_t, long unsigned int); 58316 58317 typedef void (*btf_trace_free_extent_state)(void *, const struct extent_state *, long unsigned int); 58318 58319 typedef void (*btf_trace_btrfs_work_queued)(void *, const struct btrfs_work *); 58320 58321 typedef void (*btf_trace_btrfs_work_sched)(void *, const struct btrfs_work *); 58322 58323 typedef void (*btf_trace_btrfs_all_work_done)(void *, const struct btrfs_fs_info *, const void *); 58324 58325 typedef void (*btf_trace_btrfs_ordered_sched)(void *, const struct btrfs_work *); 58326 58327 typedef void (*btf_trace_btrfs_workqueue_alloc)(void *, const struct __btrfs_workqueue *, const char *, int); 58328 58329 typedef void (*btf_trace_btrfs_workqueue_destroy)(void *, const struct __btrfs_workqueue *); 58330 58331 typedef void (*btf_trace_btrfs_qgroup_reserve_data)(void *, const struct inode *, u64, u64, u64, int); 58332 58333 typedef void (*btf_trace_btrfs_qgroup_release_data)(void *, const struct inode *, u64, u64, u64, int); 58334 58335 typedef void (*btf_trace_btrfs_qgroup_account_extents)(void *, const struct btrfs_fs_info *, const struct btrfs_qgroup_extent_record *); 58336 58337 typedef void (*btf_trace_btrfs_qgroup_trace_extent)(void *, const struct btrfs_fs_info *, const struct btrfs_qgroup_extent_record *); 58338 58339 typedef void (*btf_trace_qgroup_num_dirty_extents)(void *, const struct btrfs_fs_info *, u64, u64); 58340 58341 typedef void (*btf_trace_btrfs_qgroup_account_extent)(void *, const struct btrfs_fs_info *, u64, u64, u64, u64, u64); 58342 58343 typedef void (*btf_trace_qgroup_update_counters)(void *, const struct btrfs_fs_info *, const struct btrfs_qgroup *, u64, u64); 58344 58345 typedef void (*btf_trace_qgroup_update_reserve)(void *, struct btrfs_fs_info *, struct btrfs_qgroup *, s64, int); 58346 58347 typedef void (*btf_trace_qgroup_meta_reserve)(void *, struct btrfs_root *, s64, int); 58348 58349 typedef void (*btf_trace_qgroup_meta_convert)(void *, struct btrfs_root *, s64); 58350 58351 typedef void (*btf_trace_qgroup_meta_free_all_pertrans)(void *, struct btrfs_root *); 58352 58353 typedef void (*btf_trace_btrfs_prelim_ref_merge)(void *, const struct btrfs_fs_info *, const struct prelim_ref *, const struct prelim_ref *, u64); 58354 58355 typedef void (*btf_trace_btrfs_prelim_ref_insert)(void *, const struct btrfs_fs_info *, const struct prelim_ref *, const struct prelim_ref *, u64); 58356 58357 typedef void (*btf_trace_btrfs_inode_mod_outstanding_extents)(void *, const struct btrfs_root *, u64, int); 58358 58359 typedef void (*btf_trace_btrfs_remove_block_group)(void *, const struct btrfs_block_group *); 58360 58361 typedef void (*btf_trace_btrfs_add_unused_block_group)(void *, const struct btrfs_block_group *); 58362 58363 typedef void (*btf_trace_btrfs_skip_unused_block_group)(void *, const struct btrfs_block_group *); 58364 58365 typedef void (*btf_trace_btrfs_set_extent_bit)(void *, const struct extent_io_tree *, u64, u64, unsigned int); 58366 58367 typedef void (*btf_trace_btrfs_clear_extent_bit)(void *, const struct extent_io_tree *, u64, u64, unsigned int); 58368 58369 typedef void (*btf_trace_btrfs_convert_extent_bit)(void *, const struct extent_io_tree *, u64, u64, unsigned int, unsigned int); 58370 58371 typedef void (*btf_trace_btrfs_tree_read_lock)(void *, const struct extent_buffer *, u64); 58372 58373 typedef void (*btf_trace_btrfs_tree_lock)(void *, const struct extent_buffer *, u64); 58374 58375 typedef void (*btf_trace_btrfs_tree_unlock)(void *, const struct extent_buffer *); 58376 58377 typedef void (*btf_trace_btrfs_tree_read_unlock)(void *, const struct extent_buffer *); 58378 58379 typedef void (*btf_trace_btrfs_tree_read_unlock_blocking)(void *, const struct extent_buffer *); 58380 58381 typedef void (*btf_trace_btrfs_set_lock_blocking_read)(void *, const struct extent_buffer *); 58382 58383 typedef void (*btf_trace_btrfs_set_lock_blocking_write)(void *, const struct extent_buffer *); 58384 58385 typedef void (*btf_trace_btrfs_try_tree_read_lock)(void *, const struct extent_buffer *); 58386 58387 typedef void (*btf_trace_btrfs_try_tree_write_lock)(void *, const struct extent_buffer *); 58388 58389 typedef void (*btf_trace_btrfs_tree_read_lock_atomic)(void *, const struct extent_buffer *); 58390 58391 typedef void (*btf_trace_update_bytes_may_use)(void *, const struct btrfs_fs_info *, const struct btrfs_space_info *, u64, s64); 58392 58393 typedef void (*btf_trace_update_bytes_pinned)(void *, const struct btrfs_fs_info *, const struct btrfs_space_info *, u64, s64); 58394 58395 enum { 58396 Opt_acl___2 = 0, 58397 Opt_noacl___2 = 1, 58398 Opt_clear_cache = 2, 58399 Opt_commit_interval = 3, 58400 Opt_compress = 4, 58401 Opt_compress_force = 5, 58402 Opt_compress_force_type = 6, 58403 Opt_compress_type = 7, 58404 Opt_degraded = 8, 58405 Opt_device = 9, 58406 Opt_fatal_errors = 10, 58407 Opt_flushoncommit = 11, 58408 Opt_noflushoncommit = 12, 58409 Opt_max_inline = 13, 58410 Opt_barrier___2 = 14, 58411 Opt_nobarrier___2 = 15, 58412 Opt_datacow = 16, 58413 Opt_nodatacow = 17, 58414 Opt_datasum = 18, 58415 Opt_nodatasum = 19, 58416 Opt_defrag = 20, 58417 Opt_nodefrag = 21, 58418 Opt_discard___2 = 22, 58419 Opt_nodiscard___2 = 23, 58420 Opt_discard_mode = 24, 58421 Opt_norecovery = 25, 58422 Opt_ratio = 26, 58423 Opt_rescan_uuid_tree = 27, 58424 Opt_skip_balance = 28, 58425 Opt_space_cache = 29, 58426 Opt_no_space_cache = 30, 58427 Opt_space_cache_version = 31, 58428 Opt_ssd = 32, 58429 Opt_nossd = 33, 58430 Opt_ssd_spread = 34, 58431 Opt_nossd_spread = 35, 58432 Opt_subvol = 36, 58433 Opt_subvol_empty = 37, 58434 Opt_subvolid = 38, 58435 Opt_thread_pool = 39, 58436 Opt_treelog = 40, 58437 Opt_notreelog = 41, 58438 Opt_user_subvol_rm_allowed = 42, 58439 Opt_rescue = 43, 58440 Opt_usebackuproot = 44, 58441 Opt_nologreplay = 45, 58442 Opt_ignorebadroots = 46, 58443 Opt_ignoredatacsums = 47, 58444 Opt_rescue_all = 48, 58445 Opt_recovery = 49, 58446 Opt_inode_cache = 50, 58447 Opt_noinode_cache = 51, 58448 Opt_check_integrity = 52, 58449 Opt_check_integrity_including_extent_data = 53, 58450 Opt_check_integrity_print_mask = 54, 58451 Opt_enospc_debug = 55, 58452 Opt_noenospc_debug = 56, 58453 Opt_err___5 = 57, 58454 }; 58455 58456 enum btrfs_csum_type { 58457 BTRFS_CSUM_TYPE_CRC32 = 0, 58458 BTRFS_CSUM_TYPE_XXHASH = 1, 58459 BTRFS_CSUM_TYPE_SHA256 = 2, 58460 BTRFS_CSUM_TYPE_BLAKE2 = 3, 58461 }; 58462 58463 enum { 58464 EXTENT_BUFFER_UPTODATE = 0, 58465 EXTENT_BUFFER_DIRTY = 1, 58466 EXTENT_BUFFER_CORRUPT = 2, 58467 EXTENT_BUFFER_READAHEAD = 3, 58468 EXTENT_BUFFER_TREE_REF = 4, 58469 EXTENT_BUFFER_STALE = 5, 58470 EXTENT_BUFFER_WRITEBACK = 6, 58471 EXTENT_BUFFER_READ_ERR = 7, 58472 EXTENT_BUFFER_UNMAPPED = 8, 58473 EXTENT_BUFFER_IN_TREE = 9, 58474 EXTENT_BUFFER_WRITE_ERR = 10, 58475 }; 58476 58477 struct btrfs_key_ptr { 58478 struct btrfs_disk_key key; 58479 __le64 blockptr; 58480 __le64 generation; 58481 } __attribute__((packed)); 58482 58483 enum { 58484 READA_NONE = 0, 58485 READA_BACK = 1, 58486 READA_FORWARD = 2, 58487 }; 58488 58489 struct seq_list { 58490 struct list_head list; 58491 u64 seq; 58492 }; 58493 58494 enum { 58495 BTRFS_ROOT_IN_TRANS_SETUP = 0, 58496 BTRFS_ROOT_SHAREABLE = 1, 58497 BTRFS_ROOT_TRACK_DIRTY = 2, 58498 BTRFS_ROOT_IN_RADIX = 3, 58499 BTRFS_ROOT_ORPHAN_ITEM_INSERTED = 4, 58500 BTRFS_ROOT_DEFRAG_RUNNING = 5, 58501 BTRFS_ROOT_FORCE_COW = 6, 58502 BTRFS_ROOT_MULTI_LOG_TASKS = 7, 58503 BTRFS_ROOT_DIRTY = 8, 58504 BTRFS_ROOT_DELETING = 9, 58505 BTRFS_ROOT_DEAD_RELOC_TREE = 10, 58506 BTRFS_ROOT_DEAD_TREE = 11, 58507 BTRFS_ROOT_HAS_LOG_TREE = 12, 58508 BTRFS_ROOT_QGROUP_FLUSHING = 13, 58509 }; 58510 58511 struct btrfs_map_token { 58512 struct extent_buffer *eb; 58513 char *kaddr; 58514 long unsigned int offset; 58515 }; 58516 58517 struct btrfs_csums { 58518 u16 size; 58519 const char name[10]; 58520 const char driver[12]; 58521 }; 58522 58523 enum mod_log_op { 58524 MOD_LOG_KEY_REPLACE = 0, 58525 MOD_LOG_KEY_ADD = 1, 58526 MOD_LOG_KEY_REMOVE = 2, 58527 MOD_LOG_KEY_REMOVE_WHILE_FREEING = 3, 58528 MOD_LOG_KEY_REMOVE_WHILE_MOVING = 4, 58529 MOD_LOG_MOVE_KEYS = 5, 58530 MOD_LOG_ROOT_REPLACE = 6, 58531 }; 58532 58533 struct tree_mod_root { 58534 u64 logical; 58535 u8 level; 58536 }; 58537 58538 struct tree_mod_elem { 58539 struct rb_node node; 58540 u64 logical; 58541 u64 seq; 58542 enum mod_log_op op; 58543 int slot; 58544 u64 generation; 58545 struct btrfs_disk_key key; 58546 u64 blockptr; 58547 struct { 58548 int dst_slot; 58549 int nr_items; 58550 } move; 58551 struct tree_mod_root old_root; 58552 }; 58553 58554 struct btrfs_extent_item { 58555 __le64 refs; 58556 __le64 generation; 58557 __le64 flags; 58558 }; 58559 58560 struct btrfs_tree_block_info { 58561 struct btrfs_disk_key key; 58562 __u8 level; 58563 } __attribute__((packed)); 58564 58565 struct btrfs_extent_data_ref { 58566 __le64 root; 58567 __le64 objectid; 58568 __le64 offset; 58569 __le32 count; 58570 } __attribute__((packed)); 58571 58572 struct btrfs_shared_data_ref { 58573 __le32 count; 58574 }; 58575 58576 struct btrfs_extent_inline_ref { 58577 __u8 type; 58578 __le64 offset; 58579 } __attribute__((packed)); 58580 58581 struct extent_changeset { 58582 unsigned int bytes_changed; 58583 struct ulist range_changed; 58584 }; 58585 58586 enum btrfs_caching_type { 58587 BTRFS_CACHE_NO = 0, 58588 BTRFS_CACHE_STARTED = 1, 58589 BTRFS_CACHE_FAST = 2, 58590 BTRFS_CACHE_FINISHED = 3, 58591 BTRFS_CACHE_ERROR = 4, 58592 }; 58593 58594 enum btrfs_inline_ref_type { 58595 BTRFS_REF_TYPE_INVALID = 0, 58596 BTRFS_REF_TYPE_BLOCK = 1, 58597 BTRFS_REF_TYPE_DATA = 2, 58598 BTRFS_REF_TYPE_ANY = 3, 58599 }; 58600 58601 enum btrfs_ref_type { 58602 BTRFS_REF_NOT_SET = 0, 58603 BTRFS_REF_DATA = 1, 58604 BTRFS_REF_METADATA = 2, 58605 BTRFS_REF_LAST = 3, 58606 }; 58607 58608 struct btrfs_data_ref { 58609 u64 ref_root; 58610 u64 ino; 58611 u64 offset; 58612 }; 58613 58614 struct btrfs_tree_ref { 58615 int level; 58616 u64 root; 58617 }; 58618 58619 struct btrfs_ref { 58620 enum btrfs_ref_type type; 58621 int action; 58622 bool skip_qgroup; 58623 u64 real_root; 58624 u64 bytenr; 58625 u64 len; 58626 u64 parent; 58627 union { 58628 struct btrfs_data_ref data_ref; 58629 struct btrfs_tree_ref tree_ref; 58630 }; 58631 }; 58632 58633 struct btrfs_bio { 58634 refcount_t refs; 58635 atomic_t stripes_pending; 58636 struct btrfs_fs_info *fs_info; 58637 u64 map_type; 58638 bio_end_io_t *end_io; 58639 struct bio *orig_bio; 58640 void *private; 58641 atomic_t error; 58642 int max_errors; 58643 int num_stripes; 58644 int mirror_num; 58645 int num_tgtdevs; 58646 int *tgtdev_map; 58647 u64 *raid_map; 58648 struct btrfs_bio_stripe stripes[0]; 58649 }; 58650 58651 enum btrfs_map_op { 58652 BTRFS_MAP_READ = 0, 58653 BTRFS_MAP_WRITE = 1, 58654 BTRFS_MAP_DISCARD = 2, 58655 BTRFS_MAP_GET_READ_MIRRORS = 3, 58656 }; 58657 58658 enum btrfs_chunk_alloc_enum { 58659 CHUNK_ALLOC_NO_FORCE = 0, 58660 CHUNK_ALLOC_LIMITED = 1, 58661 CHUNK_ALLOC_FORCE = 2, 58662 }; 58663 58664 enum btrfs_loop_type { 58665 LOOP_CACHING_NOWAIT = 0, 58666 LOOP_CACHING_WAIT = 1, 58667 LOOP_ALLOC_CHUNK = 2, 58668 LOOP_NO_EMPTY_SIZE = 3, 58669 }; 58670 58671 enum btrfs_extent_allocation_policy { 58672 BTRFS_EXTENT_ALLOC_CLUSTERED = 0, 58673 }; 58674 58675 struct find_free_extent_ctl { 58676 u64 num_bytes; 58677 u64 empty_size; 58678 u64 flags; 58679 int delalloc; 58680 u64 search_start; 58681 u64 empty_cluster; 58682 struct btrfs_free_cluster *last_ptr; 58683 bool use_cluster; 58684 bool have_caching_bg; 58685 bool orig_have_caching_bg; 58686 int index; 58687 int loop; 58688 bool retry_clustered; 58689 bool retry_unclustered; 58690 int cached; 58691 u64 max_extent_size; 58692 u64 total_free_space; 58693 u64 found_offset; 58694 u64 hint_byte; 58695 enum btrfs_extent_allocation_policy policy; 58696 }; 58697 58698 struct walk_control { 58699 u64 refs[8]; 58700 u64 flags[8]; 58701 struct btrfs_key update_progress; 58702 struct btrfs_key drop_progress; 58703 short: 16; 58704 int drop_level; 58705 int stage; 58706 int level; 58707 int shared_level; 58708 int update_ref; 58709 int keep_locks; 58710 int reada_slot; 58711 int reada_count; 58712 int restarted; 58713 } __attribute__((packed)); 58714 58715 struct btrfs_stripe { 58716 __le64 devid; 58717 __le64 offset; 58718 __u8 dev_uuid[16]; 58719 }; 58720 58721 struct btrfs_chunk { 58722 __le64 length; 58723 __le64 owner; 58724 __le64 stripe_len; 58725 __le64 type; 58726 __le32 io_align; 58727 __le32 io_width; 58728 __le32 sector_size; 58729 __le16 num_stripes; 58730 __le16 sub_stripes; 58731 struct btrfs_stripe stripe; 58732 }; 58733 58734 struct btrfs_dev_extent { 58735 __le64 chunk_tree; 58736 __le64 chunk_objectid; 58737 __le64 chunk_offset; 58738 __le64 length; 58739 __u8 chunk_tree_uuid[16]; 58740 }; 58741 58742 struct btrfs_block_group_item { 58743 __le64 used; 58744 __le64 chunk_objectid; 58745 __le64 flags; 58746 }; 58747 58748 struct root_name_map { 58749 u64 id; 58750 char name[16]; 58751 }; 58752 58753 struct btrfs_csum_item { 58754 __u8 csum; 58755 }; 58756 58757 struct btrfs_ordered_sum { 58758 u64 bytenr; 58759 int len; 58760 struct list_head list; 58761 u8 sums[0]; 58762 }; 58763 58764 struct btrfs_io_bio { 58765 unsigned int mirror_num; 58766 struct btrfs_device *device; 58767 u64 logical; 58768 u8 *csum; 58769 u8 csum_inline[64]; 58770 struct bvec_iter iter; 58771 struct bio bio; 58772 }; 58773 58774 struct btrfs_inode_extref { 58775 __le64 parent_objectid; 58776 __le64 index; 58777 __le16 name_len; 58778 __u8 name[0]; 58779 } __attribute__((packed)); 58780 58781 typedef blk_status_t extent_submit_bio_start_t(struct inode *, struct bio *, u64); 58782 58783 enum { 58784 BTRFS_BLOCK_RSV_GLOBAL = 0, 58785 BTRFS_BLOCK_RSV_DELALLOC = 1, 58786 BTRFS_BLOCK_RSV_TRANS = 2, 58787 BTRFS_BLOCK_RSV_CHUNK = 3, 58788 BTRFS_BLOCK_RSV_DELOPS = 4, 58789 BTRFS_BLOCK_RSV_DELREFS = 5, 58790 BTRFS_BLOCK_RSV_EMPTY = 6, 58791 BTRFS_BLOCK_RSV_TEMP = 7, 58792 }; 58793 58794 enum btrfs_wq_endio_type { 58795 BTRFS_WQ_ENDIO_DATA = 0, 58796 BTRFS_WQ_ENDIO_METADATA = 1, 58797 BTRFS_WQ_ENDIO_FREE_SPACE = 2, 58798 BTRFS_WQ_ENDIO_RAID56 = 3, 58799 }; 58800 58801 enum { 58802 BTRFS_INODE_FLUSH_ON_CLOSE = 0, 58803 BTRFS_INODE_DUMMY = 1, 58804 BTRFS_INODE_IN_DEFRAG = 2, 58805 BTRFS_INODE_HAS_ASYNC_EXTENT = 3, 58806 BTRFS_INODE_NEEDS_FULL_SYNC = 4, 58807 BTRFS_INODE_COPY_EVERYTHING = 5, 58808 BTRFS_INODE_IN_DELALLOC_LIST = 6, 58809 BTRFS_INODE_HAS_PROPS = 7, 58810 BTRFS_INODE_SNAPSHOT_FLUSH = 8, 58811 BTRFS_INODE_NO_XATTRS = 9, 58812 BTRFS_INODE_NO_DELALLOC_FLUSH = 10, 58813 }; 58814 58815 enum btrfs_disk_cache_state { 58816 BTRFS_DC_WRITTEN = 0, 58817 BTRFS_DC_ERROR = 1, 58818 BTRFS_DC_CLEAR = 2, 58819 BTRFS_DC_SETUP = 3, 58820 }; 58821 58822 struct btrfs_end_io_wq { 58823 struct bio *bio; 58824 bio_end_io_t *end_io; 58825 void *private; 58826 struct btrfs_fs_info *info; 58827 blk_status_t status; 58828 enum btrfs_wq_endio_type metadata; 58829 struct btrfs_work work; 58830 }; 58831 58832 struct async_submit_bio { 58833 struct inode *inode; 58834 struct bio *bio; 58835 extent_submit_bio_start_t *submit_bio_start; 58836 int mirror_num; 58837 u64 dio_file_offset; 58838 struct btrfs_work work; 58839 blk_status_t status; 58840 }; 58841 58842 struct btrfs_qgroup_limit { 58843 __u64 flags; 58844 __u64 max_rfer; 58845 __u64 max_excl; 58846 __u64 rsv_rfer; 58847 __u64 rsv_excl; 58848 }; 58849 58850 struct btrfs_qgroup_inherit { 58851 __u64 flags; 58852 __u64 num_qgroups; 58853 __u64 num_ref_copies; 58854 __u64 num_excl_copies; 58855 struct btrfs_qgroup_limit lim; 58856 __u64 qgroups[0]; 58857 }; 58858 58859 struct btrfs_pending_snapshot { 58860 struct dentry *dentry; 58861 struct inode *dir; 58862 struct btrfs_root *root; 58863 struct btrfs_root_item *root_item; 58864 struct btrfs_root *snap; 58865 struct btrfs_qgroup_inherit *inherit; 58866 struct btrfs_path *path; 58867 struct btrfs_block_rsv block_rsv; 58868 int error; 58869 dev_t anon_dev; 58870 bool readonly; 58871 struct list_head list; 58872 }; 58873 58874 struct btrfs_async_commit { 58875 struct btrfs_trans_handle *newtrans; 58876 struct work_struct work; 58877 }; 58878 58879 typedef blk_status_t submit_bio_hook_t(struct inode *, struct bio *, int, long unsigned int); 58880 58881 enum btrfs_orphan_cleanup_state { 58882 ORPHAN_CLEANUP_STARTED = 1, 58883 ORPHAN_CLEANUP_DONE = 2, 58884 }; 58885 58886 struct btrfs_swapfile_pin { 58887 struct rb_node node; 58888 void *ptr; 58889 struct inode *inode; 58890 bool is_block_group; 58891 int bg_extent_count; 58892 }; 58893 58894 enum btrfs_exclusive_operation { 58895 BTRFS_EXCLOP_NONE = 0, 58896 BTRFS_EXCLOP_BALANCE = 1, 58897 BTRFS_EXCLOP_DEV_ADD = 2, 58898 BTRFS_EXCLOP_DEV_REMOVE = 3, 58899 BTRFS_EXCLOP_DEV_REPLACE = 4, 58900 BTRFS_EXCLOP_RESIZE = 5, 58901 BTRFS_EXCLOP_SWAP_ACTIVATE = 6, 58902 }; 58903 58904 struct btrfs_replace_extent_info { 58905 u64 disk_offset; 58906 u64 disk_len; 58907 u64 data_offset; 58908 u64 data_len; 58909 u64 file_offset; 58910 char *extent_buf; 58911 bool is_new_extent; 58912 int qgroup_reserved; 58913 int insertions; 58914 }; 58915 58916 struct btrfs_drop_extents_args { 58917 struct btrfs_path *path; 58918 u64 start; 58919 u64 end; 58920 bool drop_cache; 58921 bool replace_extent; 58922 u32 extent_item_size; 58923 u64 drop_end; 58924 u64 bytes_found; 58925 bool extent_inserted; 58926 }; 58927 58928 struct btrfs_file_private { 58929 void *filldir_buf; 58930 }; 58931 58932 struct btrfs_dio_private { 58933 struct inode *inode; 58934 u64 logical_offset; 58935 u64 disk_bytenr; 58936 u64 bytes; 58937 refcount_t refs; 58938 struct bio *dio_bio; 58939 u8 csums[0]; 58940 }; 58941 58942 struct btrfs_io_geometry { 58943 u64 len; 58944 u64 offset; 58945 u64 stripe_len; 58946 u64 stripe_nr; 58947 u64 stripe_offset; 58948 u64 raid56_stripe_offset; 58949 }; 58950 58951 struct btrfs_iget_args { 58952 u64 ino; 58953 struct btrfs_root *root; 58954 }; 58955 58956 struct btrfs_dio_data { 58957 u64 reserve; 58958 loff_t length; 58959 ssize_t submitted; 58960 struct extent_changeset *data_reserved; 58961 }; 58962 58963 struct async_extent { 58964 u64 start; 58965 u64 ram_size; 58966 u64 compressed_size; 58967 struct page **pages; 58968 long unsigned int nr_pages; 58969 int compress_type; 58970 struct list_head list; 58971 }; 58972 58973 struct async_chunk { 58974 struct inode *inode; 58975 struct page *locked_page; 58976 u64 start; 58977 u64 end; 58978 unsigned int write_flags; 58979 struct list_head extents; 58980 struct cgroup_subsys_state *blkcg_css; 58981 struct btrfs_work work; 58982 atomic_t *pending; 58983 }; 58984 58985 struct async_cow { 58986 atomic_t num_chunks; 58987 struct async_chunk chunks[0]; 58988 }; 58989 58990 struct btrfs_writepage_fixup { 58991 struct page *page; 58992 struct inode *inode; 58993 struct btrfs_work work; 58994 }; 58995 58996 struct dir_entry___2 { 58997 u64 ino; 58998 u64 offset; 58999 unsigned int type; 59000 int name_len; 59001 }; 59002 59003 struct btrfs_delalloc_work { 59004 struct inode *inode; 59005 struct completion completion; 59006 struct list_head list; 59007 struct btrfs_work work; 59008 }; 59009 59010 struct btrfs_swap_info { 59011 u64 start; 59012 u64 block_start; 59013 u64 block_len; 59014 u64 lowest_ppage; 59015 u64 highest_ppage; 59016 long unsigned int nr_pages; 59017 int nr_extents; 59018 }; 59019 59020 struct btrfs_ioctl_defrag_range_args { 59021 __u64 start; 59022 __u64 len; 59023 __u64 flags; 59024 __u32 extent_thresh; 59025 __u32 compress_type; 59026 __u32 unused[4]; 59027 }; 59028 59029 struct btrfs_log_ctx { 59030 int log_ret; 59031 int log_transid; 59032 bool log_new_dentries; 59033 bool logging_new_name; 59034 struct inode *inode; 59035 struct list_head list; 59036 struct list_head ordered_extents; 59037 }; 59038 59039 struct inode_defrag { 59040 struct rb_node rb_node; 59041 u64 ino; 59042 u64 transid; 59043 u64 root; 59044 u64 last_offset; 59045 int cycled; 59046 }; 59047 59048 struct falloc_range { 59049 struct list_head list; 59050 u64 start; 59051 u64 len; 59052 }; 59053 59054 enum { 59055 RANGE_BOUNDARY_WRITTEN_EXTENT = 0, 59056 RANGE_BOUNDARY_PREALLOC_EXTENT = 1, 59057 RANGE_BOUNDARY_HOLE = 2, 59058 }; 59059 59060 struct iomap_dio___2; 59061 59062 enum btrfs_feature_set { 59063 FEAT_COMPAT = 0, 59064 FEAT_COMPAT_RO = 1, 59065 FEAT_INCOMPAT = 2, 59066 FEAT_MAX = 3, 59067 }; 59068 59069 struct btrfs_feature_attr { 59070 struct kobj_attribute kobj_attr; 59071 enum btrfs_feature_set feature_set; 59072 u64 feature_bit; 59073 }; 59074 59075 struct raid_kobject { 59076 u64 flags; 59077 struct kobject kobj; 59078 }; 59079 59080 struct tree_entry { 59081 u64 start; 59082 u64 end; 59083 struct rb_node rb_node; 59084 }; 59085 59086 struct extent_page_data { 59087 struct bio *bio; 59088 unsigned int extent_locked: 1; 59089 unsigned int sync_io: 1; 59090 }; 59091 59092 struct processed_extent { 59093 struct btrfs_inode *inode; 59094 u64 start; 59095 u64 end; 59096 bool uptodate; 59097 }; 59098 59099 struct fiemap_cache { 59100 u64 offset; 59101 u64 phys; 59102 u64 len; 59103 u32 flags; 59104 bool cached; 59105 }; 59106 59107 struct btrfs_trans_handle___2; 59108 59109 struct btrfs_ioctl_balance_args { 59110 __u64 flags; 59111 __u64 state; 59112 struct btrfs_balance_args data; 59113 struct btrfs_balance_args meta; 59114 struct btrfs_balance_args sys; 59115 struct btrfs_balance_progress stat; 59116 __u64 unused[72]; 59117 }; 59118 59119 struct btrfs_ioctl_get_dev_stats { 59120 __u64 devid; 59121 __u64 nr_items; 59122 __u64 flags; 59123 __u64 values[5]; 59124 __u64 unused[121]; 59125 }; 59126 59127 enum btrfs_err_code { 59128 BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET = 1, 59129 BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET = 2, 59130 BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET = 3, 59131 BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET = 4, 59132 BTRFS_ERROR_DEV_TGT_REPLACE = 5, 59133 BTRFS_ERROR_DEV_MISSING_NOT_FOUND = 6, 59134 BTRFS_ERROR_DEV_ONLY_WRITABLE = 7, 59135 BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS = 8, 59136 BTRFS_ERROR_DEV_RAID1C3_MIN_NOT_MET = 9, 59137 BTRFS_ERROR_DEV_RAID1C4_MIN_NOT_MET = 10, 59138 }; 59139 59140 struct btrfs_disk_balance_args { 59141 __le64 profiles; 59142 union { 59143 __le64 usage; 59144 struct { 59145 __le32 usage_min; 59146 __le32 usage_max; 59147 }; 59148 }; 59149 __le64 devid; 59150 __le64 pstart; 59151 __le64 pend; 59152 __le64 vstart; 59153 __le64 vend; 59154 __le64 target; 59155 __le64 flags; 59156 union { 59157 __le64 limit; 59158 struct { 59159 __le32 limit_min; 59160 __le32 limit_max; 59161 }; 59162 }; 59163 __le32 stripes_min; 59164 __le32 stripes_max; 59165 __le64 unused[6]; 59166 }; 59167 59168 struct btrfs_balance_item { 59169 __le64 flags; 59170 struct btrfs_disk_balance_args data; 59171 struct btrfs_disk_balance_args meta; 59172 struct btrfs_disk_balance_args sys; 59173 __le64 unused[4]; 59174 }; 59175 59176 struct btrfs_dev_stats_item { 59177 __le64 values[5]; 59178 }; 59179 59180 struct alloc_chunk_ctl { 59181 u64 start; 59182 u64 type; 59183 int num_stripes; 59184 int sub_stripes; 59185 int dev_stripes; 59186 int devs_max; 59187 int devs_min; 59188 int devs_increment; 59189 int ncopies; 59190 int nparity; 59191 u64 max_stripe_size; 59192 u64 max_chunk_size; 59193 u64 dev_extent_min; 59194 u64 stripe_size; 59195 u64 chunk_size; 59196 int ndevs; 59197 }; 59198 59199 struct btrfs_workqueue { 59200 struct __btrfs_workqueue *normal; 59201 struct __btrfs_workqueue *high; 59202 }; 59203 59204 enum { 59205 WORK_DONE_BIT = 0, 59206 WORK_ORDER_DONE_BIT = 1, 59207 WORK_HIGH_PRIO_BIT = 2, 59208 }; 59209 59210 struct btrfs_ioctl_qgroup_limit_args { 59211 __u64 qgroupid; 59212 struct btrfs_qgroup_limit lim; 59213 }; 59214 59215 struct btrfs_ioctl_vol_args_v2 { 59216 __s64 fd; 59217 __u64 transid; 59218 __u64 flags; 59219 union { 59220 struct { 59221 __u64 size; 59222 struct btrfs_qgroup_inherit *qgroup_inherit; 59223 }; 59224 __u64 unused[4]; 59225 }; 59226 union { 59227 char name[4040]; 59228 __u64 devid; 59229 __u64 subvolid; 59230 }; 59231 }; 59232 59233 struct btrfs_ioctl_scrub_args { 59234 __u64 devid; 59235 __u64 start; 59236 __u64 end; 59237 __u64 flags; 59238 struct btrfs_scrub_progress progress; 59239 __u64 unused[109]; 59240 }; 59241 59242 struct btrfs_ioctl_dev_replace_start_params { 59243 __u64 srcdevid; 59244 __u64 cont_reading_from_srcdev_mode; 59245 __u8 srcdev_name[1025]; 59246 __u8 tgtdev_name[1025]; 59247 }; 59248 59249 struct btrfs_ioctl_dev_replace_status_params { 59250 __u64 replace_state; 59251 __u64 progress_1000; 59252 __u64 time_started; 59253 __u64 time_stopped; 59254 __u64 num_write_errors; 59255 __u64 num_uncorrectable_read_errors; 59256 }; 59257 59258 struct btrfs_ioctl_dev_replace_args { 59259 __u64 cmd; 59260 __u64 result; 59261 union { 59262 struct btrfs_ioctl_dev_replace_start_params start; 59263 struct btrfs_ioctl_dev_replace_status_params status; 59264 }; 59265 __u64 spare[64]; 59266 }; 59267 59268 struct btrfs_ioctl_dev_info_args { 59269 __u64 devid; 59270 __u8 uuid[16]; 59271 __u64 bytes_used; 59272 __u64 total_bytes; 59273 __u64 unused[379]; 59274 __u8 path[1024]; 59275 }; 59276 59277 struct btrfs_ioctl_fs_info_args { 59278 __u64 max_id; 59279 __u64 num_devices; 59280 __u8 fsid[16]; 59281 __u32 nodesize; 59282 __u32 sectorsize; 59283 __u32 clone_alignment; 59284 __u16 csum_type; 59285 __u16 csum_size; 59286 __u64 flags; 59287 __u64 generation; 59288 __u8 metadata_uuid[16]; 59289 __u8 reserved[944]; 59290 }; 59291 59292 struct btrfs_ioctl_feature_flags { 59293 __u64 compat_flags; 59294 __u64 compat_ro_flags; 59295 __u64 incompat_flags; 59296 }; 59297 59298 struct btrfs_ioctl_ino_lookup_args { 59299 __u64 treeid; 59300 __u64 objectid; 59301 char name[4080]; 59302 }; 59303 59304 struct btrfs_ioctl_ino_lookup_user_args { 59305 __u64 dirid; 59306 __u64 treeid; 59307 char name[256]; 59308 char path[3824]; 59309 }; 59310 59311 struct btrfs_ioctl_search_key { 59312 __u64 tree_id; 59313 __u64 min_objectid; 59314 __u64 max_objectid; 59315 __u64 min_offset; 59316 __u64 max_offset; 59317 __u64 min_transid; 59318 __u64 max_transid; 59319 __u32 min_type; 59320 __u32 max_type; 59321 __u32 nr_items; 59322 __u32 unused; 59323 __u64 unused1; 59324 __u64 unused2; 59325 __u64 unused3; 59326 __u64 unused4; 59327 }; 59328 59329 struct btrfs_ioctl_search_header { 59330 __u64 transid; 59331 __u64 objectid; 59332 __u64 offset; 59333 __u32 type; 59334 __u32 len; 59335 }; 59336 59337 struct btrfs_ioctl_search_args { 59338 struct btrfs_ioctl_search_key key; 59339 char buf[3992]; 59340 }; 59341 59342 struct btrfs_ioctl_search_args_v2 { 59343 struct btrfs_ioctl_search_key key; 59344 __u64 buf_size; 59345 __u64 buf[0]; 59346 }; 59347 59348 struct btrfs_ioctl_space_info { 59349 __u64 flags; 59350 __u64 total_bytes; 59351 __u64 used_bytes; 59352 }; 59353 59354 struct btrfs_ioctl_space_args { 59355 __u64 space_slots; 59356 __u64 total_spaces; 59357 struct btrfs_ioctl_space_info spaces[0]; 59358 }; 59359 59360 struct btrfs_data_container { 59361 __u32 bytes_left; 59362 __u32 bytes_missing; 59363 __u32 elem_cnt; 59364 __u32 elem_missed; 59365 __u64 val[0]; 59366 }; 59367 59368 struct btrfs_ioctl_ino_path_args { 59369 __u64 inum; 59370 __u64 size; 59371 __u64 reserved[4]; 59372 __u64 fspath; 59373 }; 59374 59375 struct btrfs_ioctl_logical_ino_args { 59376 __u64 logical; 59377 __u64 size; 59378 __u64 reserved[3]; 59379 __u64 flags; 59380 __u64 inodes; 59381 }; 59382 59383 struct btrfs_ioctl_quota_ctl_args { 59384 __u64 cmd; 59385 __u64 status; 59386 }; 59387 59388 struct btrfs_ioctl_quota_rescan_args { 59389 __u64 flags; 59390 __u64 progress; 59391 __u64 reserved[6]; 59392 }; 59393 59394 struct btrfs_ioctl_qgroup_assign_args { 59395 __u64 assign; 59396 __u64 src; 59397 __u64 dst; 59398 }; 59399 59400 struct btrfs_ioctl_qgroup_create_args { 59401 __u64 create; 59402 __u64 qgroupid; 59403 }; 59404 59405 struct btrfs_ioctl_timespec { 59406 __u64 sec; 59407 __u32 nsec; 59408 }; 59409 59410 struct btrfs_ioctl_received_subvol_args { 59411 char uuid[16]; 59412 __u64 stransid; 59413 __u64 rtransid; 59414 struct btrfs_ioctl_timespec stime; 59415 struct btrfs_ioctl_timespec rtime; 59416 __u64 flags; 59417 __u64 reserved[16]; 59418 }; 59419 59420 struct btrfs_ioctl_send_args { 59421 __s64 send_fd; 59422 __u64 clone_sources_count; 59423 __u64 *clone_sources; 59424 __u64 parent_root; 59425 __u64 flags; 59426 __u64 reserved[4]; 59427 }; 59428 59429 struct btrfs_ioctl_get_subvol_info_args { 59430 __u64 treeid; 59431 char name[256]; 59432 __u64 parent_id; 59433 __u64 dirid; 59434 __u64 generation; 59435 __u64 flags; 59436 __u8 uuid[16]; 59437 __u8 parent_uuid[16]; 59438 __u8 received_uuid[16]; 59439 __u64 ctransid; 59440 __u64 otransid; 59441 __u64 stransid; 59442 __u64 rtransid; 59443 struct btrfs_ioctl_timespec ctime; 59444 struct btrfs_ioctl_timespec otime; 59445 struct btrfs_ioctl_timespec stime; 59446 struct btrfs_ioctl_timespec rtime; 59447 __u64 reserved[8]; 59448 }; 59449 59450 struct btrfs_ioctl_get_subvol_rootref_args { 59451 __u64 min_treeid; 59452 struct { 59453 __u64 treeid; 59454 __u64 dirid; 59455 } rootref[255]; 59456 __u8 num_items; 59457 __u8 align[7]; 59458 }; 59459 59460 struct inode_fs_paths { 59461 struct btrfs_path *btrfs_path; 59462 struct btrfs_root *fs_root; 59463 struct btrfs_data_container *fspath; 59464 }; 59465 59466 typedef int iterate_extent_inodes_t(u64, u64, u64, void *); 59467 59468 struct btrfs_ioctl_timespec_32 { 59469 __u64 sec; 59470 __u32 nsec; 59471 } __attribute__((packed)); 59472 59473 struct btrfs_ioctl_received_subvol_args_32 { 59474 char uuid[16]; 59475 __u64 stransid; 59476 __u64 rtransid; 59477 struct btrfs_ioctl_timespec_32 stime; 59478 struct btrfs_ioctl_timespec_32 rtime; 59479 __u64 flags; 59480 __u64 reserved[16]; 59481 } __attribute__((packed)); 59482 59483 struct btrfs_ioctl_send_args_32 { 59484 __s64 send_fd; 59485 __u64 clone_sources_count; 59486 compat_uptr_t clone_sources; 59487 __u64 parent_root; 59488 __u64 flags; 59489 __u64 reserved[4]; 59490 } __attribute__((packed)); 59491 59492 struct btrfs_fid { 59493 u64 objectid; 59494 u64 root_objectid; 59495 u32 gen; 59496 u64 parent_objectid; 59497 u32 parent_gen; 59498 u64 parent_root_objectid; 59499 } __attribute__((packed)); 59500 59501 struct btrfs_dir_log_item { 59502 __le64 end; 59503 }; 59504 59505 enum { 59506 LOG_INODE_ALL = 0, 59507 LOG_INODE_EXISTS = 1, 59508 LOG_OTHER_INODE = 2, 59509 LOG_OTHER_INODE_ALL = 3, 59510 }; 59511 59512 enum { 59513 LOG_WALK_PIN_ONLY = 0, 59514 LOG_WALK_REPLAY_INODES = 1, 59515 LOG_WALK_REPLAY_DIR_INDEX = 2, 59516 LOG_WALK_REPLAY_ALL = 3, 59517 }; 59518 59519 struct walk_control___2 { 59520 int free; 59521 int write; 59522 int wait; 59523 int pin; 59524 int stage; 59525 bool ignore_cur_inode; 59526 struct btrfs_root *replay_dest; 59527 struct btrfs_trans_handle *trans; 59528 int (*process_func)(struct btrfs_root *, struct extent_buffer *, struct walk_control___2 *, u64, int); 59529 }; 59530 59531 struct btrfs_ino_list { 59532 u64 ino; 59533 u64 parent; 59534 struct list_head list; 59535 }; 59536 59537 struct btrfs_dir_list { 59538 u64 ino; 59539 struct list_head list; 59540 }; 59541 59542 struct btrfs_free_space_entry { 59543 __le64 offset; 59544 __le64 bytes; 59545 __u8 type; 59546 } __attribute__((packed)); 59547 59548 struct btrfs_free_space_header { 59549 struct btrfs_disk_key location; 59550 __le64 generation; 59551 __le64 num_entries; 59552 __le64 num_bitmaps; 59553 } __attribute__((packed)); 59554 59555 struct btrfs_trim_range { 59556 u64 start; 59557 u64 bytes; 59558 struct list_head list; 59559 }; 59560 59561 typedef unsigned char Byte; 59562 59563 typedef long unsigned int uLong; 59564 59565 struct internal_state; 59566 59567 struct z_stream_s { 59568 const Byte *next_in; 59569 uLong avail_in; 59570 uLong total_in; 59571 Byte *next_out; 59572 uLong avail_out; 59573 uLong total_out; 59574 char *msg; 59575 struct internal_state *state; 59576 void *workspace; 59577 int data_type; 59578 uLong adler; 59579 uLong reserved; 59580 }; 59581 59582 struct internal_state { 59583 int dummy; 59584 }; 59585 59586 typedef struct z_stream_s z_stream; 59587 59588 typedef z_stream *z_streamp; 59589 59590 struct compressed_bio { 59591 refcount_t pending_bios; 59592 struct page **compressed_pages; 59593 struct inode *inode; 59594 u64 start; 59595 long unsigned int len; 59596 long unsigned int compressed_len; 59597 int compress_type; 59598 long unsigned int nr_pages; 59599 int errors; 59600 int mirror_num; 59601 struct bio *orig_bio; 59602 u8 sums[0]; 59603 }; 59604 59605 struct workspace_manager { 59606 struct list_head idle_ws; 59607 spinlock_t ws_lock; 59608 int free_ws; 59609 atomic_t total_ws; 59610 wait_queue_head_t ws_wait; 59611 }; 59612 59613 struct btrfs_compress_op { 59614 struct workspace_manager *workspace_manager; 59615 unsigned int max_level; 59616 unsigned int default_level; 59617 }; 59618 59619 struct workspace { 59620 z_stream strm; 59621 char *buf; 59622 unsigned int buf_size; 59623 struct list_head list; 59624 int level; 59625 }; 59626 59627 struct workspace___2 { 59628 void *mem; 59629 void *buf; 59630 void *cbuf; 59631 struct list_head list; 59632 }; 59633 59634 typedef enum { 59635 ZSTD_error_no_error = 0, 59636 ZSTD_error_GENERIC = 1, 59637 ZSTD_error_prefix_unknown = 2, 59638 ZSTD_error_version_unsupported = 3, 59639 ZSTD_error_parameter_unknown = 4, 59640 ZSTD_error_frameParameter_unsupported = 5, 59641 ZSTD_error_frameParameter_unsupportedBy32bits = 6, 59642 ZSTD_error_frameParameter_windowTooLarge = 7, 59643 ZSTD_error_compressionParameter_unsupported = 8, 59644 ZSTD_error_init_missing = 9, 59645 ZSTD_error_memory_allocation = 10, 59646 ZSTD_error_stage_wrong = 11, 59647 ZSTD_error_dstSize_tooSmall = 12, 59648 ZSTD_error_srcSize_wrong = 13, 59649 ZSTD_error_corruption_detected = 14, 59650 ZSTD_error_checksum_wrong = 15, 59651 ZSTD_error_tableLog_tooLarge = 16, 59652 ZSTD_error_maxSymbolValue_tooLarge = 17, 59653 ZSTD_error_maxSymbolValue_tooSmall = 18, 59654 ZSTD_error_dictionary_corrupted = 19, 59655 ZSTD_error_dictionary_wrong = 20, 59656 ZSTD_error_dictionaryCreation_failed = 21, 59657 ZSTD_error_maxCode = 22, 59658 } ZSTD_ErrorCode; 59659 59660 typedef enum { 59661 ZSTD_fast = 0, 59662 ZSTD_dfast = 1, 59663 ZSTD_greedy = 2, 59664 ZSTD_lazy = 3, 59665 ZSTD_lazy2 = 4, 59666 ZSTD_btlazy2 = 5, 59667 ZSTD_btopt = 6, 59668 ZSTD_btopt2 = 7, 59669 } ZSTD_strategy; 59670 59671 typedef struct { 59672 unsigned int windowLog; 59673 unsigned int chainLog; 59674 unsigned int hashLog; 59675 unsigned int searchLog; 59676 unsigned int searchLength; 59677 unsigned int targetLength; 59678 ZSTD_strategy strategy; 59679 } ZSTD_compressionParameters; 59680 59681 typedef struct { 59682 unsigned int contentSizeFlag; 59683 unsigned int checksumFlag; 59684 unsigned int noDictIDFlag; 59685 } ZSTD_frameParameters; 59686 59687 typedef struct { 59688 ZSTD_compressionParameters cParams; 59689 ZSTD_frameParameters fParams; 59690 } ZSTD_parameters; 59691 59692 struct ZSTD_inBuffer_s { 59693 const void *src; 59694 size_t size; 59695 size_t pos; 59696 }; 59697 59698 typedef struct ZSTD_inBuffer_s ZSTD_inBuffer; 59699 59700 struct ZSTD_outBuffer_s { 59701 void *dst; 59702 size_t size; 59703 size_t pos; 59704 }; 59705 59706 typedef struct ZSTD_outBuffer_s ZSTD_outBuffer; 59707 59708 struct ZSTD_CStream_s; 59709 59710 typedef struct ZSTD_CStream_s ZSTD_CStream; 59711 59712 struct ZSTD_DStream_s; 59713 59714 typedef struct ZSTD_DStream_s ZSTD_DStream; 59715 59716 struct workspace___3 { 59717 void *mem; 59718 size_t size; 59719 char *buf; 59720 unsigned int level; 59721 unsigned int req_level; 59722 long unsigned int last_used; 59723 struct list_head list; 59724 struct list_head lru_list; 59725 ZSTD_inBuffer in_buf; 59726 ZSTD_outBuffer out_buf; 59727 }; 59728 59729 struct zstd_workspace_manager { 59730 const struct btrfs_compress_op *ops; 59731 spinlock_t lock; 59732 struct list_head lru_list; 59733 struct list_head idle_ws[15]; 59734 long unsigned int active_map; 59735 wait_queue_head_t wait; 59736 struct timer_list timer; 59737 }; 59738 59739 struct bucket_item { 59740 u32 count; 59741 }; 59742 59743 struct heuristic_ws { 59744 u8 *sample; 59745 u32 sample_size; 59746 struct bucket_item *bucket; 59747 struct bucket_item *bucket_b; 59748 struct list_head list; 59749 }; 59750 59751 struct ulist_iterator { 59752 struct list_head *cur_list; 59753 }; 59754 59755 struct ulist_node { 59756 u64 val; 59757 u64 aux; 59758 struct list_head list; 59759 struct rb_node rb_node; 59760 }; 59761 59762 struct btrfs_backref_node; 59763 59764 struct btrfs_backref_cache { 59765 struct rb_root rb_root; 59766 struct btrfs_backref_node *path[8]; 59767 struct list_head pending[8]; 59768 struct list_head leaves; 59769 struct list_head changed; 59770 struct list_head detached; 59771 u64 last_trans; 59772 int nr_nodes; 59773 int nr_edges; 59774 struct list_head pending_edge; 59775 struct list_head useless_node; 59776 struct btrfs_fs_info *fs_info; 59777 unsigned int is_reloc; 59778 }; 59779 59780 struct file_extent_cluster { 59781 u64 start; 59782 u64 end; 59783 u64 boundary[128]; 59784 unsigned int nr; 59785 }; 59786 59787 struct mapping_tree { 59788 struct rb_root rb_root; 59789 spinlock_t lock; 59790 }; 59791 59792 struct reloc_control { 59793 struct btrfs_block_group *block_group; 59794 struct btrfs_root *extent_root; 59795 struct inode *data_inode; 59796 struct btrfs_block_rsv *block_rsv; 59797 struct btrfs_backref_cache backref_cache; 59798 struct file_extent_cluster cluster; 59799 struct extent_io_tree processed_blocks; 59800 struct mapping_tree reloc_root_tree; 59801 struct list_head reloc_roots; 59802 struct list_head dirty_subvol_roots; 59803 u64 merging_rsv_size; 59804 u64 nodes_relocated; 59805 u64 reserved_bytes; 59806 u64 search_start; 59807 u64 extents_found; 59808 unsigned int stage: 8; 59809 unsigned int create_reloc_tree: 1; 59810 unsigned int merge_reloc_tree: 1; 59811 unsigned int found_file_extent: 1; 59812 }; 59813 59814 struct btrfs_backref_iter { 59815 u64 bytenr; 59816 struct btrfs_path *path; 59817 struct btrfs_fs_info *fs_info; 59818 struct btrfs_key cur_key; 59819 u32 item_ptr; 59820 u32 cur_ptr; 59821 u32 end_ptr; 59822 }; 59823 59824 struct btrfs_backref_node { 59825 struct { 59826 struct rb_node rb_node; 59827 u64 bytenr; 59828 }; 59829 u64 new_bytenr; 59830 u64 owner; 59831 struct list_head list; 59832 struct list_head upper; 59833 struct list_head lower; 59834 struct btrfs_root *root; 59835 struct extent_buffer *eb; 59836 unsigned int level: 8; 59837 unsigned int cowonly: 1; 59838 unsigned int lowest: 1; 59839 unsigned int locked: 1; 59840 unsigned int processed: 1; 59841 unsigned int checked: 1; 59842 unsigned int pending: 1; 59843 unsigned int detached: 1; 59844 unsigned int is_reloc_root: 1; 59845 }; 59846 59847 struct btrfs_backref_edge { 59848 struct list_head list[2]; 59849 struct btrfs_backref_node *node[2]; 59850 }; 59851 59852 struct rb_simple_node { 59853 struct rb_node rb_node; 59854 u64 bytenr; 59855 }; 59856 59857 struct mapping_node { 59858 struct { 59859 struct rb_node rb_node; 59860 u64 bytenr; 59861 }; 59862 void *data; 59863 }; 59864 59865 struct tree_block { 59866 struct { 59867 struct rb_node rb_node; 59868 u64 bytenr; 59869 }; 59870 struct btrfs_key key; 59871 unsigned int level: 8; 59872 unsigned int key_ready: 1; 59873 }; 59874 59875 struct btrfs_delayed_item { 59876 struct rb_node rb_node; 59877 struct btrfs_key key; 59878 struct list_head tree_list; 59879 struct list_head readdir_list; 59880 u64 bytes_reserved; 59881 struct btrfs_delayed_node *delayed_node; 59882 refcount_t refs; 59883 int ins_or_del; 59884 u32 data_len; 59885 char data[0]; 59886 }; 59887 59888 struct btrfs_async_delayed_work { 59889 struct btrfs_delayed_root *delayed_root; 59890 int nr; 59891 struct btrfs_work work; 59892 }; 59893 59894 struct reada_control { 59895 struct btrfs_fs_info *fs_info; 59896 struct btrfs_key key_start; 59897 struct btrfs_key key_end; 59898 short: 16; 59899 atomic_t elems; 59900 struct kref refcnt; 59901 int: 32; 59902 wait_queue_head_t wait; 59903 } __attribute__((packed)); 59904 59905 struct scrub_bio; 59906 59907 struct scrub_ctx { 59908 struct scrub_bio *bios[64]; 59909 struct btrfs_fs_info *fs_info; 59910 int first_free; 59911 int curr; 59912 atomic_t bios_in_flight; 59913 atomic_t workers_pending; 59914 spinlock_t list_lock; 59915 wait_queue_head_t list_wait; 59916 struct list_head csum_list; 59917 atomic_t cancel_req; 59918 int readonly; 59919 int pages_per_rd_bio; 59920 int is_dev_replace; 59921 struct scrub_bio *wr_curr_bio; 59922 struct mutex wr_lock; 59923 int pages_per_wr_bio; 59924 struct btrfs_device *wr_tgtdev; 59925 bool flush_all_writes; 59926 struct btrfs_scrub_progress stat; 59927 spinlock_t stat_lock; 59928 refcount_t refs; 59929 }; 59930 59931 struct scrub_recover { 59932 refcount_t refs; 59933 struct btrfs_bio *bbio; 59934 u64 map_length; 59935 }; 59936 59937 struct scrub_block; 59938 59939 struct scrub_page { 59940 struct scrub_block *sblock; 59941 struct page *page; 59942 struct btrfs_device *dev; 59943 struct list_head list; 59944 u64 flags; 59945 u64 generation; 59946 u64 logical; 59947 u64 physical; 59948 u64 physical_for_dev_replace; 59949 atomic_t refs; 59950 u8 mirror_num; 59951 int have_csum: 1; 59952 int io_error: 1; 59953 u8 csum[32]; 59954 struct scrub_recover *recover; 59955 }; 59956 59957 struct scrub_parity; 59958 59959 struct scrub_block { 59960 struct scrub_page *pagev[16]; 59961 int page_count; 59962 atomic_t outstanding_pages; 59963 refcount_t refs; 59964 struct scrub_ctx *sctx; 59965 struct scrub_parity *sparity; 59966 struct { 59967 unsigned int header_error: 1; 59968 unsigned int checksum_error: 1; 59969 unsigned int no_io_error_seen: 1; 59970 unsigned int generation_error: 1; 59971 unsigned int data_corrected: 1; 59972 }; 59973 struct btrfs_work work; 59974 }; 59975 59976 struct scrub_bio { 59977 int index; 59978 struct scrub_ctx *sctx; 59979 struct btrfs_device *dev; 59980 struct bio *bio; 59981 blk_status_t status; 59982 u64 logical; 59983 u64 physical; 59984 struct scrub_page *pagev[32]; 59985 int page_count; 59986 int next_free; 59987 struct btrfs_work work; 59988 }; 59989 59990 struct scrub_parity { 59991 struct scrub_ctx *sctx; 59992 struct btrfs_device *scrub_dev; 59993 u64 logic_start; 59994 u64 logic_end; 59995 int nsectors; 59996 u32 stripe_len; 59997 refcount_t refs; 59998 struct list_head spages; 59999 struct btrfs_work work; 60000 long unsigned int *dbitmap; 60001 long unsigned int *ebitmap; 60002 long unsigned int bitmap[0]; 60003 }; 60004 60005 struct scrub_warning { 60006 struct btrfs_path *path; 60007 u64 extent_item_size; 60008 const char *errstr; 60009 u64 physical; 60010 u64 logical; 60011 struct btrfs_device *dev; 60012 }; 60013 60014 struct full_stripe_lock { 60015 struct rb_node node; 60016 u64 logical; 60017 u64 refs; 60018 struct mutex mutex; 60019 }; 60020 60021 struct btrfs_raid_bio; 60022 60023 struct reada_zone { 60024 u64 start; 60025 u64 end; 60026 u64 elems; 60027 struct list_head list; 60028 spinlock_t lock; 60029 int locked; 60030 struct btrfs_device *device; 60031 struct btrfs_device *devs[5]; 60032 int ndevs; 60033 struct kref refcnt; 60034 }; 60035 60036 struct reada_extctl { 60037 struct list_head list; 60038 struct reada_control *rc; 60039 u64 generation; 60040 }; 60041 60042 struct reada_extent { 60043 u64 logical; 60044 u64 owner_root; 60045 struct btrfs_key top; 60046 struct list_head extctl; 60047 int refcnt; 60048 spinlock_t lock; 60049 struct reada_zone *zones[5]; 60050 int nzones; 60051 int scheduled; 60052 int level; 60053 }; 60054 60055 struct reada_machine_work { 60056 struct btrfs_work work; 60057 struct btrfs_fs_info *fs_info; 60058 }; 60059 60060 struct extent_inode_elem { 60061 u64 inum; 60062 u64 offset; 60063 struct extent_inode_elem *next; 60064 }; 60065 60066 struct preftree { 60067 struct rb_root_cached root; 60068 unsigned int count; 60069 }; 60070 60071 struct preftrees { 60072 struct preftree direct; 60073 struct preftree indirect; 60074 struct preftree indirect_missing_keys; 60075 }; 60076 60077 struct share_check { 60078 u64 root_objectid; 60079 u64 inum; 60080 int share_count; 60081 }; 60082 60083 typedef int iterate_irefs_t(u64, u32, long unsigned int, struct extent_buffer *, void *); 60084 60085 struct btrfs_qgroup_status_item { 60086 __le64 version; 60087 __le64 generation; 60088 __le64 flags; 60089 __le64 rescan; 60090 }; 60091 60092 struct btrfs_qgroup_info_item { 60093 __le64 generation; 60094 __le64 rfer; 60095 __le64 rfer_cmpr; 60096 __le64 excl; 60097 __le64 excl_cmpr; 60098 }; 60099 60100 struct btrfs_qgroup_limit_item { 60101 __le64 flags; 60102 __le64 max_rfer; 60103 __le64 max_excl; 60104 __le64 rsv_rfer; 60105 __le64 rsv_excl; 60106 }; 60107 60108 struct btrfs_qgroup_swapped_block { 60109 struct rb_node node; 60110 int level; 60111 bool trace_leaf; 60112 u64 subvol_bytenr; 60113 u64 subvol_generation; 60114 u64 reloc_bytenr; 60115 u64 reloc_generation; 60116 u64 last_snapshot; 60117 struct btrfs_key first_key; 60118 }; 60119 60120 struct btrfs_qgroup_list { 60121 struct list_head next_group; 60122 struct list_head next_member; 60123 struct btrfs_qgroup *group; 60124 struct btrfs_qgroup *member; 60125 }; 60126 60127 struct btrfs_stream_header { 60128 char magic[13]; 60129 __le32 version; 60130 } __attribute__((packed)); 60131 60132 struct btrfs_cmd_header { 60133 __le32 len; 60134 __le16 cmd; 60135 __le32 crc; 60136 } __attribute__((packed)); 60137 60138 struct btrfs_tlv_header { 60139 __le16 tlv_type; 60140 __le16 tlv_len; 60141 }; 60142 60143 enum btrfs_send_cmd { 60144 BTRFS_SEND_C_UNSPEC = 0, 60145 BTRFS_SEND_C_SUBVOL = 1, 60146 BTRFS_SEND_C_SNAPSHOT = 2, 60147 BTRFS_SEND_C_MKFILE = 3, 60148 BTRFS_SEND_C_MKDIR = 4, 60149 BTRFS_SEND_C_MKNOD = 5, 60150 BTRFS_SEND_C_MKFIFO = 6, 60151 BTRFS_SEND_C_MKSOCK = 7, 60152 BTRFS_SEND_C_SYMLINK = 8, 60153 BTRFS_SEND_C_RENAME = 9, 60154 BTRFS_SEND_C_LINK = 10, 60155 BTRFS_SEND_C_UNLINK = 11, 60156 BTRFS_SEND_C_RMDIR = 12, 60157 BTRFS_SEND_C_SET_XATTR = 13, 60158 BTRFS_SEND_C_REMOVE_XATTR = 14, 60159 BTRFS_SEND_C_WRITE = 15, 60160 BTRFS_SEND_C_CLONE = 16, 60161 BTRFS_SEND_C_TRUNCATE = 17, 60162 BTRFS_SEND_C_CHMOD = 18, 60163 BTRFS_SEND_C_CHOWN = 19, 60164 BTRFS_SEND_C_UTIMES = 20, 60165 BTRFS_SEND_C_END = 21, 60166 BTRFS_SEND_C_UPDATE_EXTENT = 22, 60167 __BTRFS_SEND_C_MAX = 23, 60168 }; 60169 60170 enum { 60171 BTRFS_SEND_A_UNSPEC = 0, 60172 BTRFS_SEND_A_UUID = 1, 60173 BTRFS_SEND_A_CTRANSID = 2, 60174 BTRFS_SEND_A_INO = 3, 60175 BTRFS_SEND_A_SIZE = 4, 60176 BTRFS_SEND_A_MODE = 5, 60177 BTRFS_SEND_A_UID = 6, 60178 BTRFS_SEND_A_GID = 7, 60179 BTRFS_SEND_A_RDEV = 8, 60180 BTRFS_SEND_A_CTIME = 9, 60181 BTRFS_SEND_A_MTIME = 10, 60182 BTRFS_SEND_A_ATIME = 11, 60183 BTRFS_SEND_A_OTIME = 12, 60184 BTRFS_SEND_A_XATTR_NAME = 13, 60185 BTRFS_SEND_A_XATTR_DATA = 14, 60186 BTRFS_SEND_A_PATH = 15, 60187 BTRFS_SEND_A_PATH_TO = 16, 60188 BTRFS_SEND_A_PATH_LINK = 17, 60189 BTRFS_SEND_A_FILE_OFFSET = 18, 60190 BTRFS_SEND_A_DATA = 19, 60191 BTRFS_SEND_A_CLONE_UUID = 20, 60192 BTRFS_SEND_A_CLONE_CTRANSID = 21, 60193 BTRFS_SEND_A_CLONE_PATH = 22, 60194 BTRFS_SEND_A_CLONE_OFFSET = 23, 60195 BTRFS_SEND_A_CLONE_LEN = 24, 60196 __BTRFS_SEND_A_MAX = 25, 60197 }; 60198 60199 struct fs_path { 60200 union { 60201 struct { 60202 char *start; 60203 char *end; 60204 char *buf; 60205 short unsigned int buf_len: 15; 60206 short unsigned int reversed: 1; 60207 char inline_buf[0]; 60208 }; 60209 char pad[256]; 60210 }; 60211 }; 60212 60213 struct clone_root { 60214 struct btrfs_root *root; 60215 u64 ino; 60216 u64 offset; 60217 u64 found_refs; 60218 }; 60219 60220 struct send_ctx { 60221 struct file *send_filp; 60222 loff_t send_off; 60223 char *send_buf; 60224 u32 send_size; 60225 u32 send_max_size; 60226 u64 total_send_size; 60227 u64 cmd_send_size[23]; 60228 u64 flags; 60229 struct btrfs_root *send_root; 60230 struct btrfs_root *parent_root; 60231 struct clone_root *clone_roots; 60232 int clone_roots_cnt; 60233 struct btrfs_path *left_path; 60234 struct btrfs_path *right_path; 60235 struct btrfs_key *cmp_key; 60236 u64 cur_ino; 60237 u64 cur_inode_gen; 60238 int cur_inode_new; 60239 int cur_inode_new_gen; 60240 int cur_inode_deleted; 60241 u64 cur_inode_size; 60242 u64 cur_inode_mode; 60243 u64 cur_inode_rdev; 60244 u64 cur_inode_last_extent; 60245 u64 cur_inode_next_write_offset; 60246 bool ignore_cur_inode; 60247 u64 send_progress; 60248 struct list_head new_refs; 60249 struct list_head deleted_refs; 60250 struct xarray name_cache; 60251 struct list_head name_cache_list; 60252 int name_cache_size; 60253 struct file_ra_state ra; 60254 struct rb_root pending_dir_moves; 60255 struct rb_root waiting_dir_moves; 60256 struct rb_root orphan_dirs; 60257 }; 60258 60259 struct pending_dir_move { 60260 struct rb_node node; 60261 struct list_head list; 60262 u64 parent_ino; 60263 u64 ino; 60264 u64 gen; 60265 struct list_head update_refs; 60266 }; 60267 60268 struct waiting_dir_move { 60269 struct rb_node node; 60270 u64 ino; 60271 u64 rmdir_ino; 60272 u64 rmdir_gen; 60273 bool orphanized; 60274 }; 60275 60276 struct orphan_dir_info { 60277 struct rb_node node; 60278 u64 ino; 60279 u64 gen; 60280 u64 last_dir_index_offset; 60281 }; 60282 60283 struct name_cache_entry { 60284 struct list_head list; 60285 struct list_head radix_list; 60286 u64 ino; 60287 u64 gen; 60288 u64 parent_ino; 60289 u64 parent_gen; 60290 int ret; 60291 int need_later_update; 60292 int name_len; 60293 char name[0]; 60294 }; 60295 60296 enum btrfs_compare_tree_result { 60297 BTRFS_COMPARE_TREE_NEW = 0, 60298 BTRFS_COMPARE_TREE_DELETED = 1, 60299 BTRFS_COMPARE_TREE_CHANGED = 2, 60300 BTRFS_COMPARE_TREE_SAME = 3, 60301 }; 60302 60303 typedef int (*iterate_inode_ref_t)(int, u64, int, struct fs_path *, void *); 60304 60305 typedef int (*iterate_dir_item_t)(int, struct btrfs_key *, const char *, int, const char *, int, u8, void *); 60306 60307 struct backref_ctx { 60308 struct send_ctx *sctx; 60309 u64 found; 60310 u64 cur_objectid; 60311 u64 cur_offset; 60312 u64 extent_len; 60313 u64 data_offset; 60314 int found_itself; 60315 }; 60316 60317 enum inode_state { 60318 inode_state_no_change = 0, 60319 inode_state_will_create = 1, 60320 inode_state_did_create = 2, 60321 inode_state_will_delete = 3, 60322 inode_state_did_delete = 4, 60323 }; 60324 60325 struct recorded_ref { 60326 struct list_head list; 60327 char *name; 60328 struct fs_path *full_path; 60329 u64 dir; 60330 u64 dir_gen; 60331 int name_len; 60332 }; 60333 60334 struct find_ref_ctx { 60335 u64 dir; 60336 u64 dir_gen; 60337 struct btrfs_root *root; 60338 struct fs_path *name; 60339 int found_idx; 60340 }; 60341 60342 struct find_xattr_ctx { 60343 const char *name; 60344 int name_len; 60345 int found_idx; 60346 char *found_data; 60347 int found_data_len; 60348 }; 60349 60350 struct parent_paths_ctx { 60351 struct list_head *refs; 60352 struct send_ctx *sctx; 60353 }; 60354 60355 struct btrfs_dev_replace_item { 60356 __le64 src_devid; 60357 __le64 cursor_left; 60358 __le64 cursor_right; 60359 __le64 cont_reading_from_srcdev_mode; 60360 __le64 replace_state; 60361 __le64 time_started; 60362 __le64 time_stopped; 60363 __le64 num_write_errors; 60364 __le64 num_uncorrectable_read_errors; 60365 }; 60366 60367 struct blk_plug_cb; 60368 60369 typedef void (*blk_plug_cb_fn)(struct blk_plug_cb *, bool); 60370 60371 struct blk_plug_cb { 60372 struct list_head list; 60373 blk_plug_cb_fn callback; 60374 void *data; 60375 }; 60376 60377 struct raid6_calls { 60378 void (*gen_syndrome)(int, size_t, void **); 60379 void (*xor_syndrome)(int, int, int, size_t, void **); 60380 int (*valid)(); 60381 const char *name; 60382 int prefer; 60383 }; 60384 60385 struct btrfs_stripe_hash { 60386 struct list_head hash_list; 60387 spinlock_t lock; 60388 }; 60389 60390 struct btrfs_stripe_hash_table { 60391 struct list_head stripe_cache; 60392 spinlock_t cache_lock; 60393 int cache_size; 60394 struct btrfs_stripe_hash table[0]; 60395 }; 60396 60397 enum btrfs_rbio_ops { 60398 BTRFS_RBIO_WRITE = 0, 60399 BTRFS_RBIO_READ_REBUILD = 1, 60400 BTRFS_RBIO_PARITY_SCRUB = 2, 60401 BTRFS_RBIO_REBUILD_MISSING = 3, 60402 }; 60403 60404 struct btrfs_raid_bio___2 { 60405 struct btrfs_fs_info *fs_info; 60406 struct btrfs_bio *bbio; 60407 struct list_head hash_list; 60408 struct list_head stripe_cache; 60409 struct btrfs_work work; 60410 struct bio_list bio_list; 60411 spinlock_t bio_list_lock; 60412 struct list_head plug_list; 60413 long unsigned int flags; 60414 int stripe_len; 60415 int nr_data; 60416 int real_stripes; 60417 int stripe_npages; 60418 enum btrfs_rbio_ops operation; 60419 int faila; 60420 int failb; 60421 int scrubp; 60422 int nr_pages; 60423 int bio_list_bytes; 60424 int generic_bio_cnt; 60425 refcount_t refs; 60426 atomic_t stripes_pending; 60427 atomic_t error; 60428 struct page **stripe_pages; 60429 struct page **bio_pages; 60430 long unsigned int *dbitmap; 60431 void **finish_pointers; 60432 long unsigned int *finish_pbitmap; 60433 }; 60434 60435 struct btrfs_plug_cb { 60436 struct blk_plug_cb cb; 60437 struct btrfs_fs_info *info; 60438 struct list_head rbio_list; 60439 struct btrfs_work work; 60440 }; 60441 60442 struct prop_handler { 60443 struct hlist_node node; 60444 const char *xattr_name; 60445 int (*validate)(const char *, size_t); 60446 int (*apply)(struct inode *, const char *, size_t); 60447 const char * (*extract)(struct inode *); 60448 int inheritable; 60449 }; 60450 60451 struct btrfs_free_space_info { 60452 __le32 extent_count; 60453 __le32 flags; 60454 }; 60455 60456 struct reserve_ticket { 60457 u64 bytes; 60458 int error; 60459 bool steal; 60460 struct list_head list; 60461 wait_queue_head_t wait; 60462 }; 60463 60464 enum blk_zone_type { 60465 BLK_ZONE_TYPE_CONVENTIONAL = 1, 60466 BLK_ZONE_TYPE_SEQWRITE_REQ = 2, 60467 BLK_ZONE_TYPE_SEQWRITE_PREF = 3, 60468 }; 60469 60470 enum blk_zone_cond { 60471 BLK_ZONE_COND_NOT_WP = 0, 60472 BLK_ZONE_COND_EMPTY = 1, 60473 BLK_ZONE_COND_IMP_OPEN = 2, 60474 BLK_ZONE_COND_EXP_OPEN = 3, 60475 BLK_ZONE_COND_CLOSED = 4, 60476 BLK_ZONE_COND_READONLY = 13, 60477 BLK_ZONE_COND_FULL = 14, 60478 BLK_ZONE_COND_OFFLINE = 15, 60479 }; 60480 60481 enum pstore_type_id { 60482 PSTORE_TYPE_DMESG = 0, 60483 PSTORE_TYPE_MCE = 1, 60484 PSTORE_TYPE_CONSOLE = 2, 60485 PSTORE_TYPE_FTRACE = 3, 60486 PSTORE_TYPE_PPC_RTAS = 4, 60487 PSTORE_TYPE_PPC_OF = 5, 60488 PSTORE_TYPE_PPC_COMMON = 6, 60489 PSTORE_TYPE_PMSG = 7, 60490 PSTORE_TYPE_PPC_OPAL = 8, 60491 PSTORE_TYPE_MAX = 9, 60492 }; 60493 60494 struct pstore_info; 60495 60496 struct pstore_record { 60497 struct pstore_info *psi; 60498 enum pstore_type_id type; 60499 u64 id; 60500 struct timespec64 time; 60501 char *buf; 60502 ssize_t size; 60503 ssize_t ecc_notice_size; 60504 int count; 60505 enum kmsg_dump_reason reason; 60506 unsigned int part; 60507 bool compressed; 60508 }; 60509 60510 struct pstore_info { 60511 struct module *owner; 60512 const char *name; 60513 struct semaphore buf_lock; 60514 char *buf; 60515 size_t bufsize; 60516 struct mutex read_mutex; 60517 int flags; 60518 int max_reason; 60519 void *data; 60520 int (*open)(struct pstore_info *); 60521 int (*close)(struct pstore_info *); 60522 ssize_t (*read)(struct pstore_record *); 60523 int (*write)(struct pstore_record *); 60524 int (*write_user)(struct pstore_record *, const char *); 60525 int (*erase)(struct pstore_record *); 60526 }; 60527 60528 struct pstore_ftrace_record { 60529 long unsigned int ip; 60530 long unsigned int parent_ip; 60531 u64 ts; 60532 }; 60533 60534 struct pstore_private { 60535 struct list_head list; 60536 struct dentry *dentry; 60537 struct pstore_record *record; 60538 size_t total_size; 60539 }; 60540 60541 struct pstore_ftrace_seq_data { 60542 const void *ptr; 60543 size_t off; 60544 size_t size; 60545 }; 60546 60547 enum { 60548 Opt_kmsg_bytes = 0, 60549 Opt_err___6 = 1, 60550 }; 60551 60552 struct crypto_comp { 60553 struct crypto_tfm base; 60554 }; 60555 60556 struct pstore_zbackend { 60557 int (*zbufsize)(size_t); 60558 const char *name; 60559 }; 60560 60561 struct efi_variable { 60562 efi_char16_t VariableName[512]; 60563 efi_guid_t VendorGuid; 60564 long unsigned int DataSize; 60565 __u8 Data[1024]; 60566 efi_status_t Status; 60567 __u32 Attributes; 60568 } __attribute__((packed)); 60569 60570 struct efivar_entry { 60571 struct efi_variable var; 60572 struct list_head list; 60573 struct kobject kobj; 60574 bool scanning; 60575 bool deleting; 60576 }; 60577 60578 struct ipc64_perm { 60579 __kernel_key_t key; 60580 __kernel_uid32_t uid; 60581 __kernel_gid32_t gid; 60582 __kernel_uid32_t cuid; 60583 __kernel_gid32_t cgid; 60584 __kernel_mode_t mode; 60585 unsigned char __pad1[0]; 60586 short unsigned int seq; 60587 short unsigned int __pad2; 60588 __kernel_ulong_t __unused1; 60589 __kernel_ulong_t __unused2; 60590 }; 60591 60592 typedef s32 compat_key_t; 60593 60594 typedef u32 __compat_gid32_t; 60595 60596 struct compat_ipc64_perm { 60597 compat_key_t key; 60598 __compat_uid32_t uid; 60599 __compat_gid32_t gid; 60600 __compat_uid32_t cuid; 60601 __compat_gid32_t cgid; 60602 short unsigned int mode; 60603 short unsigned int __pad1; 60604 short unsigned int seq; 60605 short unsigned int __pad2; 60606 compat_ulong_t unused1; 60607 compat_ulong_t unused2; 60608 }; 60609 60610 struct compat_ipc_perm { 60611 key_t key; 60612 __compat_uid_t uid; 60613 __compat_gid_t gid; 60614 __compat_uid_t cuid; 60615 __compat_gid_t cgid; 60616 compat_mode_t mode; 60617 short unsigned int seq; 60618 }; 60619 60620 struct ipc_perm { 60621 __kernel_key_t key; 60622 __kernel_uid_t uid; 60623 __kernel_gid_t gid; 60624 __kernel_uid_t cuid; 60625 __kernel_gid_t cgid; 60626 __kernel_mode_t mode; 60627 short unsigned int seq; 60628 }; 60629 60630 struct ipc_params { 60631 key_t key; 60632 int flg; 60633 union { 60634 size_t size; 60635 int nsems; 60636 } u; 60637 }; 60638 60639 struct ipc_ops { 60640 int (*getnew)(struct ipc_namespace *, struct ipc_params *); 60641 int (*associate)(struct kern_ipc_perm *, int); 60642 int (*more_checks)(struct kern_ipc_perm *, struct ipc_params *); 60643 }; 60644 60645 struct ipc_proc_iface { 60646 const char *path; 60647 const char *header; 60648 int ids; 60649 int (*show)(struct seq_file *, void *); 60650 }; 60651 60652 struct ipc_proc_iter { 60653 struct ipc_namespace *ns; 60654 struct pid_namespace *pid_ns; 60655 struct ipc_proc_iface *iface; 60656 }; 60657 60658 struct msg_msgseg; 60659 60660 struct msg_msg { 60661 struct list_head m_list; 60662 long int m_type; 60663 size_t m_ts; 60664 struct msg_msgseg *next; 60665 void *security; 60666 }; 60667 60668 struct msg_msgseg { 60669 struct msg_msgseg *next; 60670 }; 60671 60672 typedef int __kernel_ipc_pid_t; 60673 60674 struct msgbuf { 60675 __kernel_long_t mtype; 60676 char mtext[1]; 60677 }; 60678 60679 struct msg; 60680 60681 struct msqid_ds { 60682 struct ipc_perm msg_perm; 60683 struct msg *msg_first; 60684 struct msg *msg_last; 60685 __kernel_old_time_t msg_stime; 60686 __kernel_old_time_t msg_rtime; 60687 __kernel_old_time_t msg_ctime; 60688 long unsigned int msg_lcbytes; 60689 long unsigned int msg_lqbytes; 60690 short unsigned int msg_cbytes; 60691 short unsigned int msg_qnum; 60692 short unsigned int msg_qbytes; 60693 __kernel_ipc_pid_t msg_lspid; 60694 __kernel_ipc_pid_t msg_lrpid; 60695 }; 60696 60697 struct msqid64_ds { 60698 struct ipc64_perm msg_perm; 60699 long int msg_stime; 60700 long int msg_rtime; 60701 long int msg_ctime; 60702 long unsigned int msg_cbytes; 60703 long unsigned int msg_qnum; 60704 long unsigned int msg_qbytes; 60705 __kernel_pid_t msg_lspid; 60706 __kernel_pid_t msg_lrpid; 60707 long unsigned int __unused4; 60708 long unsigned int __unused5; 60709 }; 60710 60711 struct msginfo { 60712 int msgpool; 60713 int msgmap; 60714 int msgmax; 60715 int msgmnb; 60716 int msgmni; 60717 int msgssz; 60718 int msgtql; 60719 short unsigned int msgseg; 60720 }; 60721 60722 typedef u16 compat_ipc_pid_t; 60723 60724 struct compat_msqid64_ds { 60725 struct compat_ipc64_perm msg_perm; 60726 compat_ulong_t msg_stime; 60727 compat_ulong_t msg_stime_high; 60728 compat_ulong_t msg_rtime; 60729 compat_ulong_t msg_rtime_high; 60730 compat_ulong_t msg_ctime; 60731 compat_ulong_t msg_ctime_high; 60732 compat_ulong_t msg_cbytes; 60733 compat_ulong_t msg_qnum; 60734 compat_ulong_t msg_qbytes; 60735 compat_pid_t msg_lspid; 60736 compat_pid_t msg_lrpid; 60737 compat_ulong_t __unused4; 60738 compat_ulong_t __unused5; 60739 }; 60740 60741 struct msg_queue { 60742 struct kern_ipc_perm q_perm; 60743 time64_t q_stime; 60744 time64_t q_rtime; 60745 time64_t q_ctime; 60746 long unsigned int q_cbytes; 60747 long unsigned int q_qnum; 60748 long unsigned int q_qbytes; 60749 struct pid *q_lspid; 60750 struct pid *q_lrpid; 60751 struct list_head q_messages; 60752 struct list_head q_receivers; 60753 struct list_head q_senders; 60754 long: 64; 60755 long: 64; 60756 }; 60757 60758 struct msg_receiver { 60759 struct list_head r_list; 60760 struct task_struct *r_tsk; 60761 int r_mode; 60762 long int r_msgtype; 60763 long int r_maxsize; 60764 struct msg_msg *r_msg; 60765 }; 60766 60767 struct msg_sender { 60768 struct list_head list; 60769 struct task_struct *tsk; 60770 size_t msgsz; 60771 }; 60772 60773 struct compat_msqid_ds { 60774 struct compat_ipc_perm msg_perm; 60775 compat_uptr_t msg_first; 60776 compat_uptr_t msg_last; 60777 old_time32_t msg_stime; 60778 old_time32_t msg_rtime; 60779 old_time32_t msg_ctime; 60780 compat_ulong_t msg_lcbytes; 60781 compat_ulong_t msg_lqbytes; 60782 short unsigned int msg_cbytes; 60783 short unsigned int msg_qnum; 60784 short unsigned int msg_qbytes; 60785 compat_ipc_pid_t msg_lspid; 60786 compat_ipc_pid_t msg_lrpid; 60787 }; 60788 60789 struct compat_msgbuf { 60790 compat_long_t mtype; 60791 char mtext[1]; 60792 }; 60793 60794 struct sem; 60795 60796 struct sem_queue; 60797 60798 struct sem_undo; 60799 60800 struct semid_ds { 60801 struct ipc_perm sem_perm; 60802 __kernel_old_time_t sem_otime; 60803 __kernel_old_time_t sem_ctime; 60804 struct sem *sem_base; 60805 struct sem_queue *sem_pending; 60806 struct sem_queue **sem_pending_last; 60807 struct sem_undo *undo; 60808 short unsigned int sem_nsems; 60809 }; 60810 60811 struct sem { 60812 int semval; 60813 struct pid *sempid; 60814 spinlock_t lock; 60815 struct list_head pending_alter; 60816 struct list_head pending_const; 60817 time64_t sem_otime; 60818 }; 60819 60820 struct sem_queue { 60821 struct list_head list; 60822 struct task_struct *sleeper; 60823 struct sem_undo *undo; 60824 struct pid *pid; 60825 int status; 60826 struct sembuf *sops; 60827 struct sembuf *blocking; 60828 int nsops; 60829 bool alter; 60830 bool dupsop; 60831 }; 60832 60833 struct sem_undo { 60834 struct list_head list_proc; 60835 struct callback_head rcu; 60836 struct sem_undo_list *ulp; 60837 struct list_head list_id; 60838 int semid; 60839 short int *semadj; 60840 }; 60841 60842 struct semid64_ds { 60843 struct ipc64_perm sem_perm; 60844 __kernel_long_t sem_otime; 60845 __kernel_ulong_t __unused1; 60846 __kernel_long_t sem_ctime; 60847 __kernel_ulong_t __unused2; 60848 __kernel_ulong_t sem_nsems; 60849 __kernel_ulong_t __unused3; 60850 __kernel_ulong_t __unused4; 60851 }; 60852 60853 struct seminfo { 60854 int semmap; 60855 int semmni; 60856 int semmns; 60857 int semmnu; 60858 int semmsl; 60859 int semopm; 60860 int semume; 60861 int semusz; 60862 int semvmx; 60863 int semaem; 60864 }; 60865 60866 struct sem_undo_list { 60867 refcount_t refcnt; 60868 spinlock_t lock; 60869 struct list_head list_proc; 60870 }; 60871 60872 struct compat_semid64_ds { 60873 struct compat_ipc64_perm sem_perm; 60874 compat_ulong_t sem_otime; 60875 compat_ulong_t sem_otime_high; 60876 compat_ulong_t sem_ctime; 60877 compat_ulong_t sem_ctime_high; 60878 compat_ulong_t sem_nsems; 60879 compat_ulong_t __unused3; 60880 compat_ulong_t __unused4; 60881 }; 60882 60883 struct sem_array { 60884 struct kern_ipc_perm sem_perm; 60885 time64_t sem_ctime; 60886 struct list_head pending_alter; 60887 struct list_head pending_const; 60888 struct list_head list_id; 60889 int sem_nsems; 60890 int complex_count; 60891 unsigned int use_global_lock; 60892 long: 32; 60893 long: 64; 60894 long: 64; 60895 long: 64; 60896 long: 64; 60897 long: 64; 60898 long: 64; 60899 long: 64; 60900 struct sem sems[0]; 60901 }; 60902 60903 struct compat_semid_ds { 60904 struct compat_ipc_perm sem_perm; 60905 old_time32_t sem_otime; 60906 old_time32_t sem_ctime; 60907 compat_uptr_t sem_base; 60908 compat_uptr_t sem_pending; 60909 compat_uptr_t sem_pending_last; 60910 compat_uptr_t undo; 60911 short unsigned int sem_nsems; 60912 }; 60913 60914 struct shmid_ds { 60915 struct ipc_perm shm_perm; 60916 int shm_segsz; 60917 __kernel_old_time_t shm_atime; 60918 __kernel_old_time_t shm_dtime; 60919 __kernel_old_time_t shm_ctime; 60920 __kernel_ipc_pid_t shm_cpid; 60921 __kernel_ipc_pid_t shm_lpid; 60922 short unsigned int shm_nattch; 60923 short unsigned int shm_unused; 60924 void *shm_unused2; 60925 void *shm_unused3; 60926 }; 60927 60928 struct shmid64_ds { 60929 struct ipc64_perm shm_perm; 60930 size_t shm_segsz; 60931 long int shm_atime; 60932 long int shm_dtime; 60933 long int shm_ctime; 60934 __kernel_pid_t shm_cpid; 60935 __kernel_pid_t shm_lpid; 60936 long unsigned int shm_nattch; 60937 long unsigned int __unused4; 60938 long unsigned int __unused5; 60939 }; 60940 60941 struct shminfo64 { 60942 long unsigned int shmmax; 60943 long unsigned int shmmin; 60944 long unsigned int shmmni; 60945 long unsigned int shmseg; 60946 long unsigned int shmall; 60947 long unsigned int __unused1; 60948 long unsigned int __unused2; 60949 long unsigned int __unused3; 60950 long unsigned int __unused4; 60951 }; 60952 60953 struct shminfo { 60954 int shmmax; 60955 int shmmin; 60956 int shmmni; 60957 int shmseg; 60958 int shmall; 60959 }; 60960 60961 struct shm_info { 60962 int used_ids; 60963 __kernel_ulong_t shm_tot; 60964 __kernel_ulong_t shm_rss; 60965 __kernel_ulong_t shm_swp; 60966 __kernel_ulong_t swap_attempts; 60967 __kernel_ulong_t swap_successes; 60968 }; 60969 60970 struct compat_shmid64_ds { 60971 struct compat_ipc64_perm shm_perm; 60972 compat_size_t shm_segsz; 60973 compat_ulong_t shm_atime; 60974 compat_ulong_t shm_atime_high; 60975 compat_ulong_t shm_dtime; 60976 compat_ulong_t shm_dtime_high; 60977 compat_ulong_t shm_ctime; 60978 compat_ulong_t shm_ctime_high; 60979 compat_pid_t shm_cpid; 60980 compat_pid_t shm_lpid; 60981 compat_ulong_t shm_nattch; 60982 compat_ulong_t __unused4; 60983 compat_ulong_t __unused5; 60984 }; 60985 60986 struct shmid_kernel { 60987 struct kern_ipc_perm shm_perm; 60988 struct file *shm_file; 60989 long unsigned int shm_nattch; 60990 long unsigned int shm_segsz; 60991 time64_t shm_atim; 60992 time64_t shm_dtim; 60993 time64_t shm_ctim; 60994 struct pid *shm_cprid; 60995 struct pid *shm_lprid; 60996 struct user_struct *mlock_user; 60997 struct task_struct *shm_creator; 60998 struct list_head shm_clist; 60999 long: 64; 61000 long: 64; 61001 long: 64; 61002 long: 64; 61003 }; 61004 61005 struct shm_file_data { 61006 int id; 61007 struct ipc_namespace *ns; 61008 struct file *file; 61009 const struct vm_operations_struct *vm_ops; 61010 }; 61011 61012 struct compat_shmid_ds { 61013 struct compat_ipc_perm shm_perm; 61014 int shm_segsz; 61015 old_time32_t shm_atime; 61016 old_time32_t shm_dtime; 61017 old_time32_t shm_ctime; 61018 compat_ipc_pid_t shm_cpid; 61019 compat_ipc_pid_t shm_lpid; 61020 short unsigned int shm_nattch; 61021 short unsigned int shm_unused; 61022 compat_uptr_t shm_unused2; 61023 compat_uptr_t shm_unused3; 61024 }; 61025 61026 struct compat_shminfo64 { 61027 compat_ulong_t shmmax; 61028 compat_ulong_t shmmin; 61029 compat_ulong_t shmmni; 61030 compat_ulong_t shmseg; 61031 compat_ulong_t shmall; 61032 compat_ulong_t __unused1; 61033 compat_ulong_t __unused2; 61034 compat_ulong_t __unused3; 61035 compat_ulong_t __unused4; 61036 }; 61037 61038 struct compat_shm_info { 61039 compat_int_t used_ids; 61040 compat_ulong_t shm_tot; 61041 compat_ulong_t shm_rss; 61042 compat_ulong_t shm_swp; 61043 compat_ulong_t swap_attempts; 61044 compat_ulong_t swap_successes; 61045 }; 61046 61047 struct compat_ipc_kludge { 61048 compat_uptr_t msgp; 61049 compat_long_t msgtyp; 61050 }; 61051 61052 struct mqueue_fs_context { 61053 struct ipc_namespace *ipc_ns; 61054 }; 61055 61056 struct posix_msg_tree_node { 61057 struct rb_node rb_node; 61058 struct list_head msg_list; 61059 int priority; 61060 }; 61061 61062 struct ext_wait_queue { 61063 struct task_struct *task; 61064 struct list_head list; 61065 struct msg_msg *msg; 61066 int state; 61067 }; 61068 61069 struct mqueue_inode_info { 61070 spinlock_t lock; 61071 struct inode vfs_inode; 61072 wait_queue_head_t wait_q; 61073 struct rb_root msg_tree; 61074 struct rb_node *msg_tree_rightmost; 61075 struct posix_msg_tree_node *node_cache; 61076 struct mq_attr attr; 61077 struct sigevent notify; 61078 struct pid *notify_owner; 61079 u32 notify_self_exec_id; 61080 struct user_namespace *notify_user_ns; 61081 struct user_struct *user; 61082 struct sock *notify_sock; 61083 struct sk_buff *notify_cookie; 61084 struct ext_wait_queue e_wait_q[2]; 61085 long unsigned int qsize; 61086 }; 61087 61088 struct compat_mq_attr { 61089 compat_long_t mq_flags; 61090 compat_long_t mq_maxmsg; 61091 compat_long_t mq_msgsize; 61092 compat_long_t mq_curmsgs; 61093 compat_long_t __reserved[4]; 61094 }; 61095 61096 struct key_user { 61097 struct rb_node node; 61098 struct mutex cons_lock; 61099 spinlock_t lock; 61100 refcount_t usage; 61101 atomic_t nkeys; 61102 atomic_t nikeys; 61103 kuid_t uid; 61104 int qnkeys; 61105 int qnbytes; 61106 }; 61107 61108 enum key_notification_subtype { 61109 NOTIFY_KEY_INSTANTIATED = 0, 61110 NOTIFY_KEY_UPDATED = 1, 61111 NOTIFY_KEY_LINKED = 2, 61112 NOTIFY_KEY_UNLINKED = 3, 61113 NOTIFY_KEY_CLEARED = 4, 61114 NOTIFY_KEY_REVOKED = 5, 61115 NOTIFY_KEY_INVALIDATED = 6, 61116 NOTIFY_KEY_SETATTR = 7, 61117 }; 61118 61119 struct key_notification { 61120 struct watch_notification___2 watch; 61121 __u32 key_id; 61122 __u32 aux; 61123 }; 61124 61125 struct assoc_array_edit; 61126 61127 struct assoc_array_ops { 61128 long unsigned int (*get_key_chunk)(const void *, int); 61129 long unsigned int (*get_object_key_chunk)(const void *, int); 61130 bool (*compare_object)(const void *, const void *); 61131 int (*diff_objects)(const void *, const void *); 61132 void (*free_object)(void *); 61133 }; 61134 61135 struct assoc_array_node { 61136 struct assoc_array_ptr *back_pointer; 61137 u8 parent_slot; 61138 struct assoc_array_ptr *slots[16]; 61139 long unsigned int nr_leaves_on_branch; 61140 }; 61141 61142 struct assoc_array_shortcut { 61143 struct assoc_array_ptr *back_pointer; 61144 int parent_slot; 61145 int skip_to_level; 61146 struct assoc_array_ptr *next_node; 61147 long unsigned int index_key[0]; 61148 }; 61149 61150 struct assoc_array_edit___2 { 61151 struct callback_head rcu; 61152 struct assoc_array *array; 61153 const struct assoc_array_ops *ops; 61154 const struct assoc_array_ops *ops_for_excised_subtree; 61155 struct assoc_array_ptr *leaf; 61156 struct assoc_array_ptr **leaf_p; 61157 struct assoc_array_ptr *dead_leaf; 61158 struct assoc_array_ptr *new_meta[3]; 61159 struct assoc_array_ptr *excised_meta[1]; 61160 struct assoc_array_ptr *excised_subtree; 61161 struct assoc_array_ptr **set_backpointers[16]; 61162 struct assoc_array_ptr *set_backpointers_to; 61163 struct assoc_array_node *adjust_count_on; 61164 long int adjust_count_by; 61165 struct { 61166 struct assoc_array_ptr **ptr; 61167 struct assoc_array_ptr *to; 61168 } set[2]; 61169 struct { 61170 u8 *p; 61171 u8 to; 61172 } set_parent_slot[1]; 61173 u8 segment_cache[17]; 61174 }; 61175 61176 struct keyring_search_context { 61177 struct keyring_index_key index_key; 61178 const struct cred *cred; 61179 struct key_match_data match_data; 61180 unsigned int flags; 61181 int (*iterator)(const void *, void *); 61182 int skipped_ret; 61183 bool possessed; 61184 key_ref_t result; 61185 time64_t now; 61186 }; 61187 61188 struct keyring_read_iterator_context { 61189 size_t buflen; 61190 size_t count; 61191 key_serial_t *buffer; 61192 }; 61193 61194 struct keyctl_dh_params { 61195 union { 61196 __s32 private; 61197 __s32 priv; 61198 }; 61199 __s32 prime; 61200 __s32 base; 61201 }; 61202 61203 struct keyctl_kdf_params { 61204 char *hashname; 61205 char *otherinfo; 61206 __u32 otherinfolen; 61207 __u32 __spare[8]; 61208 }; 61209 61210 struct keyctl_pkey_query { 61211 __u32 supported_ops; 61212 __u32 key_size; 61213 __u16 max_data_size; 61214 __u16 max_sig_size; 61215 __u16 max_enc_size; 61216 __u16 max_dec_size; 61217 __u32 __spare[10]; 61218 }; 61219 61220 struct keyctl_pkey_params { 61221 __s32 key_id; 61222 __u32 in_len; 61223 union { 61224 __u32 out_len; 61225 __u32 in2_len; 61226 }; 61227 __u32 __spare[7]; 61228 }; 61229 61230 struct request_key_auth { 61231 struct callback_head rcu; 61232 struct key *target_key; 61233 struct key *dest_keyring; 61234 const struct cred *cred; 61235 void *callout_info; 61236 size_t callout_len; 61237 pid_t pid; 61238 char op[8]; 61239 }; 61240 61241 struct compat_keyctl_kdf_params { 61242 compat_uptr_t hashname; 61243 compat_uptr_t otherinfo; 61244 __u32 otherinfolen; 61245 __u32 __spare[8]; 61246 }; 61247 61248 struct kpp_request { 61249 struct crypto_async_request base; 61250 struct scatterlist *src; 61251 struct scatterlist *dst; 61252 unsigned int src_len; 61253 unsigned int dst_len; 61254 void *__ctx[0]; 61255 }; 61256 61257 struct crypto_kpp { 61258 struct crypto_tfm base; 61259 }; 61260 61261 struct kpp_alg { 61262 int (*set_secret)(struct crypto_kpp *, const void *, unsigned int); 61263 int (*generate_public_key)(struct kpp_request *); 61264 int (*compute_shared_secret)(struct kpp_request *); 61265 unsigned int (*max_size)(struct crypto_kpp *); 61266 int (*init)(struct crypto_kpp *); 61267 void (*exit)(struct crypto_kpp *); 61268 unsigned int reqsize; 61269 struct crypto_alg base; 61270 }; 61271 61272 struct dh { 61273 void *key; 61274 void *p; 61275 void *q; 61276 void *g; 61277 unsigned int key_size; 61278 unsigned int p_size; 61279 unsigned int q_size; 61280 unsigned int g_size; 61281 }; 61282 61283 struct dh_completion { 61284 struct completion completion; 61285 int err; 61286 }; 61287 61288 struct kdf_sdesc { 61289 struct shash_desc shash; 61290 char ctx[0]; 61291 }; 61292 61293 enum { 61294 Opt_err___7 = 0, 61295 Opt_enc = 1, 61296 Opt_hash = 2, 61297 }; 61298 61299 enum hash_algo { 61300 HASH_ALGO_MD4 = 0, 61301 HASH_ALGO_MD5 = 1, 61302 HASH_ALGO_SHA1 = 2, 61303 HASH_ALGO_RIPE_MD_160 = 3, 61304 HASH_ALGO_SHA256 = 4, 61305 HASH_ALGO_SHA384 = 5, 61306 HASH_ALGO_SHA512 = 6, 61307 HASH_ALGO_SHA224 = 7, 61308 HASH_ALGO_RIPE_MD_128 = 8, 61309 HASH_ALGO_RIPE_MD_256 = 9, 61310 HASH_ALGO_RIPE_MD_320 = 10, 61311 HASH_ALGO_WP_256 = 11, 61312 HASH_ALGO_WP_384 = 12, 61313 HASH_ALGO_WP_512 = 13, 61314 HASH_ALGO_TGR_128 = 14, 61315 HASH_ALGO_TGR_160 = 15, 61316 HASH_ALGO_TGR_192 = 16, 61317 HASH_ALGO_SM3_256 = 17, 61318 HASH_ALGO_STREEBOG_256 = 18, 61319 HASH_ALGO_STREEBOG_512 = 19, 61320 HASH_ALGO__LAST = 20, 61321 }; 61322 61323 enum tpm_duration { 61324 TPM_SHORT = 0, 61325 TPM_MEDIUM = 1, 61326 TPM_LONG = 2, 61327 TPM_LONG_LONG = 3, 61328 TPM_UNDEFINED = 4, 61329 TPM_NUM_DURATIONS = 4, 61330 }; 61331 61332 struct encrypted_key_payload { 61333 struct callback_head rcu; 61334 char *format; 61335 char *master_desc; 61336 char *datalen; 61337 u8 *iv; 61338 u8 *encrypted_data; 61339 short unsigned int datablob_len; 61340 short unsigned int decrypted_datalen; 61341 short unsigned int payload_datalen; 61342 short unsigned int encrypted_key_format; 61343 u8 *decrypted_data; 61344 u8 payload_data[0]; 61345 }; 61346 61347 struct ecryptfs_session_key { 61348 u32 flags; 61349 u32 encrypted_key_size; 61350 u32 decrypted_key_size; 61351 u8 encrypted_key[512]; 61352 u8 decrypted_key[64]; 61353 }; 61354 61355 struct ecryptfs_password { 61356 u32 password_bytes; 61357 s32 hash_algo; 61358 u32 hash_iterations; 61359 u32 session_key_encryption_key_bytes; 61360 u32 flags; 61361 u8 session_key_encryption_key[64]; 61362 u8 signature[17]; 61363 u8 salt[8]; 61364 }; 61365 61366 struct ecryptfs_private_key { 61367 u32 key_size; 61368 u32 data_len; 61369 u8 signature[17]; 61370 char pki_type[17]; 61371 u8 data[0]; 61372 }; 61373 61374 struct ecryptfs_auth_tok { 61375 u16 version; 61376 u16 token_type; 61377 u32 flags; 61378 struct ecryptfs_session_key session_key; 61379 u8 reserved[32]; 61380 union { 61381 struct ecryptfs_password password; 61382 struct ecryptfs_private_key private_key; 61383 } token; 61384 }; 61385 61386 enum { 61387 Opt_new = 0, 61388 Opt_load = 1, 61389 Opt_update = 2, 61390 Opt_err___8 = 3, 61391 }; 61392 61393 enum { 61394 Opt_default = 0, 61395 Opt_ecryptfs = 1, 61396 Opt_enc32 = 2, 61397 Opt_error = 3, 61398 }; 61399 61400 enum derived_key_type { 61401 ENC_KEY = 0, 61402 AUTH_KEY = 1, 61403 }; 61404 61405 enum ecryptfs_token_types { 61406 ECRYPTFS_PASSWORD = 0, 61407 ECRYPTFS_PRIVATE_KEY = 1, 61408 }; 61409 61410 struct vfs_cap_data { 61411 __le32 magic_etc; 61412 struct { 61413 __le32 permitted; 61414 __le32 inheritable; 61415 } data[2]; 61416 }; 61417 61418 struct vfs_ns_cap_data { 61419 __le32 magic_etc; 61420 struct { 61421 __le32 permitted; 61422 __le32 inheritable; 61423 } data[2]; 61424 __le32 rootid; 61425 }; 61426 61427 struct sctp_endpoint; 61428 61429 union security_list_options { 61430 int (*binder_set_context_mgr)(struct task_struct *); 61431 int (*binder_transaction)(struct task_struct *, struct task_struct *); 61432 int (*binder_transfer_binder)(struct task_struct *, struct task_struct *); 61433 int (*binder_transfer_file)(struct task_struct *, struct task_struct *, struct file *); 61434 int (*ptrace_access_check)(struct task_struct *, unsigned int); 61435 int (*ptrace_traceme)(struct task_struct *); 61436 int (*capget)(struct task_struct *, kernel_cap_t *, kernel_cap_t *, kernel_cap_t *); 61437 int (*capset)(struct cred *, const struct cred *, const kernel_cap_t *, const kernel_cap_t *, const kernel_cap_t *); 61438 int (*capable)(const struct cred *, struct user_namespace *, int, unsigned int); 61439 int (*quotactl)(int, int, int, struct super_block *); 61440 int (*quota_on)(struct dentry *); 61441 int (*syslog)(int); 61442 int (*settime)(const struct timespec64 *, const struct timezone *); 61443 int (*vm_enough_memory)(struct mm_struct *, long int); 61444 int (*bprm_creds_for_exec)(struct linux_binprm *); 61445 int (*bprm_creds_from_file)(struct linux_binprm *, struct file *); 61446 int (*bprm_check_security)(struct linux_binprm *); 61447 void (*bprm_committing_creds)(struct linux_binprm *); 61448 void (*bprm_committed_creds)(struct linux_binprm *); 61449 int (*fs_context_dup)(struct fs_context *, struct fs_context *); 61450 int (*fs_context_parse_param)(struct fs_context *, struct fs_parameter *); 61451 int (*sb_alloc_security)(struct super_block *); 61452 void (*sb_free_security)(struct super_block *); 61453 void (*sb_free_mnt_opts)(void *); 61454 int (*sb_eat_lsm_opts)(char *, void **); 61455 int (*sb_remount)(struct super_block *, void *); 61456 int (*sb_kern_mount)(struct super_block *); 61457 int (*sb_show_options)(struct seq_file *, struct super_block *); 61458 int (*sb_statfs)(struct dentry *); 61459 int (*sb_mount)(const char *, const struct path *, const char *, long unsigned int, void *); 61460 int (*sb_umount)(struct vfsmount *, int); 61461 int (*sb_pivotroot)(const struct path *, const struct path *); 61462 int (*sb_set_mnt_opts)(struct super_block *, void *, long unsigned int, long unsigned int *); 61463 int (*sb_clone_mnt_opts)(const struct super_block *, struct super_block *, long unsigned int, long unsigned int *); 61464 int (*sb_add_mnt_opt)(const char *, const char *, int, void **); 61465 int (*move_mount)(const struct path *, const struct path *); 61466 int (*dentry_init_security)(struct dentry *, int, const struct qstr *, void **, u32 *); 61467 int (*dentry_create_files_as)(struct dentry *, int, struct qstr *, const struct cred *, struct cred *); 61468 int (*path_notify)(const struct path *, u64, unsigned int); 61469 int (*inode_alloc_security)(struct inode *); 61470 void (*inode_free_security)(struct inode *); 61471 int (*inode_init_security)(struct inode *, struct inode *, const struct qstr *, const char **, void **, size_t *); 61472 int (*inode_create)(struct inode *, struct dentry *, umode_t); 61473 int (*inode_link)(struct dentry *, struct inode *, struct dentry *); 61474 int (*inode_unlink)(struct inode *, struct dentry *); 61475 int (*inode_symlink)(struct inode *, struct dentry *, const char *); 61476 int (*inode_mkdir)(struct inode *, struct dentry *, umode_t); 61477 int (*inode_rmdir)(struct inode *, struct dentry *); 61478 int (*inode_mknod)(struct inode *, struct dentry *, umode_t, dev_t); 61479 int (*inode_rename)(struct inode *, struct dentry *, struct inode *, struct dentry *); 61480 int (*inode_readlink)(struct dentry *); 61481 int (*inode_follow_link)(struct dentry *, struct inode *, bool); 61482 int (*inode_permission)(struct inode *, int); 61483 int (*inode_setattr)(struct dentry *, struct iattr *); 61484 int (*inode_getattr)(const struct path *); 61485 int (*inode_setxattr)(struct dentry *, const char *, const void *, size_t, int); 61486 void (*inode_post_setxattr)(struct dentry *, const char *, const void *, size_t, int); 61487 int (*inode_getxattr)(struct dentry *, const char *); 61488 int (*inode_listxattr)(struct dentry *); 61489 int (*inode_removexattr)(struct dentry *, const char *); 61490 int (*inode_need_killpriv)(struct dentry *); 61491 int (*inode_killpriv)(struct dentry *); 61492 int (*inode_getsecurity)(struct inode *, const char *, void **, bool); 61493 int (*inode_setsecurity)(struct inode *, const char *, const void *, size_t, int); 61494 int (*inode_listsecurity)(struct inode *, char *, size_t); 61495 void (*inode_getsecid)(struct inode *, u32 *); 61496 int (*inode_copy_up)(struct dentry *, struct cred **); 61497 int (*inode_copy_up_xattr)(const char *); 61498 int (*kernfs_init_security)(struct kernfs_node *, struct kernfs_node *); 61499 int (*file_permission)(struct file *, int); 61500 int (*file_alloc_security)(struct file *); 61501 void (*file_free_security)(struct file *); 61502 int (*file_ioctl)(struct file *, unsigned int, long unsigned int); 61503 int (*mmap_addr)(long unsigned int); 61504 int (*mmap_file)(struct file *, long unsigned int, long unsigned int, long unsigned int); 61505 int (*file_mprotect)(struct vm_area_struct *, long unsigned int, long unsigned int); 61506 int (*file_lock)(struct file *, unsigned int); 61507 int (*file_fcntl)(struct file *, unsigned int, long unsigned int); 61508 void (*file_set_fowner)(struct file *); 61509 int (*file_send_sigiotask)(struct task_struct *, struct fown_struct *, int); 61510 int (*file_receive)(struct file *); 61511 int (*file_open)(struct file *); 61512 int (*task_alloc)(struct task_struct *, long unsigned int); 61513 void (*task_free)(struct task_struct *); 61514 int (*cred_alloc_blank)(struct cred *, gfp_t); 61515 void (*cred_free)(struct cred *); 61516 int (*cred_prepare)(struct cred *, const struct cred *, gfp_t); 61517 void (*cred_transfer)(struct cred *, const struct cred *); 61518 void (*cred_getsecid)(const struct cred *, u32 *); 61519 int (*kernel_act_as)(struct cred *, u32); 61520 int (*kernel_create_files_as)(struct cred *, struct inode *); 61521 int (*kernel_module_request)(char *); 61522 int (*kernel_load_data)(enum kernel_load_data_id, bool); 61523 int (*kernel_post_load_data)(char *, loff_t, enum kernel_load_data_id, char *); 61524 int (*kernel_read_file)(struct file *, enum kernel_read_file_id, bool); 61525 int (*kernel_post_read_file)(struct file *, char *, loff_t, enum kernel_read_file_id); 61526 int (*task_fix_setuid)(struct cred *, const struct cred *, int); 61527 int (*task_fix_setgid)(struct cred *, const struct cred *, int); 61528 int (*task_setpgid)(struct task_struct *, pid_t); 61529 int (*task_getpgid)(struct task_struct *); 61530 int (*task_getsid)(struct task_struct *); 61531 void (*task_getsecid)(struct task_struct *, u32 *); 61532 int (*task_setnice)(struct task_struct *, int); 61533 int (*task_setioprio)(struct task_struct *, int); 61534 int (*task_getioprio)(struct task_struct *); 61535 int (*task_prlimit)(const struct cred *, const struct cred *, unsigned int); 61536 int (*task_setrlimit)(struct task_struct *, unsigned int, struct rlimit *); 61537 int (*task_setscheduler)(struct task_struct *); 61538 int (*task_getscheduler)(struct task_struct *); 61539 int (*task_movememory)(struct task_struct *); 61540 int (*task_kill)(struct task_struct *, struct kernel_siginfo *, int, const struct cred *); 61541 int (*task_prctl)(int, long unsigned int, long unsigned int, long unsigned int, long unsigned int); 61542 void (*task_to_inode)(struct task_struct *, struct inode *); 61543 int (*ipc_permission)(struct kern_ipc_perm *, short int); 61544 void (*ipc_getsecid)(struct kern_ipc_perm *, u32 *); 61545 int (*msg_msg_alloc_security)(struct msg_msg *); 61546 void (*msg_msg_free_security)(struct msg_msg *); 61547 int (*msg_queue_alloc_security)(struct kern_ipc_perm *); 61548 void (*msg_queue_free_security)(struct kern_ipc_perm *); 61549 int (*msg_queue_associate)(struct kern_ipc_perm *, int); 61550 int (*msg_queue_msgctl)(struct kern_ipc_perm *, int); 61551 int (*msg_queue_msgsnd)(struct kern_ipc_perm *, struct msg_msg *, int); 61552 int (*msg_queue_msgrcv)(struct kern_ipc_perm *, struct msg_msg *, struct task_struct *, long int, int); 61553 int (*shm_alloc_security)(struct kern_ipc_perm *); 61554 void (*shm_free_security)(struct kern_ipc_perm *); 61555 int (*shm_associate)(struct kern_ipc_perm *, int); 61556 int (*shm_shmctl)(struct kern_ipc_perm *, int); 61557 int (*shm_shmat)(struct kern_ipc_perm *, char *, int); 61558 int (*sem_alloc_security)(struct kern_ipc_perm *); 61559 void (*sem_free_security)(struct kern_ipc_perm *); 61560 int (*sem_associate)(struct kern_ipc_perm *, int); 61561 int (*sem_semctl)(struct kern_ipc_perm *, int); 61562 int (*sem_semop)(struct kern_ipc_perm *, struct sembuf *, unsigned int, int); 61563 int (*netlink_send)(struct sock *, struct sk_buff *); 61564 void (*d_instantiate)(struct dentry *, struct inode *); 61565 int (*getprocattr)(struct task_struct *, char *, char **); 61566 int (*setprocattr)(const char *, void *, size_t); 61567 int (*ismaclabel)(const char *); 61568 int (*secid_to_secctx)(u32, char **, u32 *); 61569 int (*secctx_to_secid)(const char *, u32, u32 *); 61570 void (*release_secctx)(char *, u32); 61571 void (*inode_invalidate_secctx)(struct inode *); 61572 int (*inode_notifysecctx)(struct inode *, void *, u32); 61573 int (*inode_setsecctx)(struct dentry *, void *, u32); 61574 int (*inode_getsecctx)(struct inode *, void **, u32 *); 61575 int (*post_notification)(const struct cred *, const struct cred *, struct watch_notification *); 61576 int (*watch_key)(struct key *); 61577 int (*unix_stream_connect)(struct sock *, struct sock *, struct sock *); 61578 int (*unix_may_send)(struct socket *, struct socket *); 61579 int (*socket_create)(int, int, int, int); 61580 int (*socket_post_create)(struct socket *, int, int, int, int); 61581 int (*socket_socketpair)(struct socket *, struct socket *); 61582 int (*socket_bind)(struct socket *, struct sockaddr *, int); 61583 int (*socket_connect)(struct socket *, struct sockaddr *, int); 61584 int (*socket_listen)(struct socket *, int); 61585 int (*socket_accept)(struct socket *, struct socket *); 61586 int (*socket_sendmsg)(struct socket *, struct msghdr *, int); 61587 int (*socket_recvmsg)(struct socket *, struct msghdr *, int, int); 61588 int (*socket_getsockname)(struct socket *); 61589 int (*socket_getpeername)(struct socket *); 61590 int (*socket_getsockopt)(struct socket *, int, int); 61591 int (*socket_setsockopt)(struct socket *, int, int); 61592 int (*socket_shutdown)(struct socket *, int); 61593 int (*socket_sock_rcv_skb)(struct sock *, struct sk_buff *); 61594 int (*socket_getpeersec_stream)(struct socket *, char *, int *, unsigned int); 61595 int (*socket_getpeersec_dgram)(struct socket *, struct sk_buff *, u32 *); 61596 int (*sk_alloc_security)(struct sock *, int, gfp_t); 61597 void (*sk_free_security)(struct sock *); 61598 void (*sk_clone_security)(const struct sock *, struct sock *); 61599 void (*sk_getsecid)(struct sock *, u32 *); 61600 void (*sock_graft)(struct sock *, struct socket *); 61601 int (*inet_conn_request)(const struct sock *, struct sk_buff *, struct request_sock *); 61602 void (*inet_csk_clone)(struct sock *, const struct request_sock *); 61603 void (*inet_conn_established)(struct sock *, struct sk_buff *); 61604 int (*secmark_relabel_packet)(u32); 61605 void (*secmark_refcount_inc)(); 61606 void (*secmark_refcount_dec)(); 61607 void (*req_classify_flow)(const struct request_sock *, struct flowi_common *); 61608 int (*tun_dev_alloc_security)(void **); 61609 void (*tun_dev_free_security)(void *); 61610 int (*tun_dev_create)(); 61611 int (*tun_dev_attach_queue)(void *); 61612 int (*tun_dev_attach)(struct sock *, void *); 61613 int (*tun_dev_open)(void *); 61614 int (*sctp_assoc_request)(struct sctp_endpoint *, struct sk_buff *); 61615 int (*sctp_bind_connect)(struct sock *, int, struct sockaddr *, int); 61616 void (*sctp_sk_clone)(struct sctp_endpoint *, struct sock *, struct sock *); 61617 int (*ib_pkey_access)(void *, u64, u16); 61618 int (*ib_endport_manage_subnet)(void *, const char *, u8); 61619 int (*ib_alloc_security)(void **); 61620 void (*ib_free_security)(void *); 61621 int (*xfrm_policy_alloc_security)(struct xfrm_sec_ctx **, struct xfrm_user_sec_ctx *, gfp_t); 61622 int (*xfrm_policy_clone_security)(struct xfrm_sec_ctx *, struct xfrm_sec_ctx **); 61623 void (*xfrm_policy_free_security)(struct xfrm_sec_ctx *); 61624 int (*xfrm_policy_delete_security)(struct xfrm_sec_ctx *); 61625 int (*xfrm_state_alloc)(struct xfrm_state *, struct xfrm_user_sec_ctx *); 61626 int (*xfrm_state_alloc_acquire)(struct xfrm_state *, struct xfrm_sec_ctx *, u32); 61627 void (*xfrm_state_free_security)(struct xfrm_state *); 61628 int (*xfrm_state_delete_security)(struct xfrm_state *); 61629 int (*xfrm_policy_lookup)(struct xfrm_sec_ctx *, u32, u8); 61630 int (*xfrm_state_pol_flow_match)(struct xfrm_state *, struct xfrm_policy *, const struct flowi_common *); 61631 int (*xfrm_decode_session)(struct sk_buff *, u32 *, int); 61632 int (*key_alloc)(struct key *, const struct cred *, long unsigned int); 61633 void (*key_free)(struct key *); 61634 int (*key_permission)(key_ref_t, const struct cred *, enum key_need_perm); 61635 int (*key_getsecurity)(struct key *, char **); 61636 int (*audit_rule_init)(u32, u32, char *, void **); 61637 int (*audit_rule_known)(struct audit_krule *); 61638 int (*audit_rule_match)(u32, u32, u32, void *); 61639 void (*audit_rule_free)(void *); 61640 int (*bpf)(int, union bpf_attr *, unsigned int); 61641 int (*bpf_map)(struct bpf_map *, fmode_t); 61642 int (*bpf_prog)(struct bpf_prog *); 61643 int (*bpf_map_alloc_security)(struct bpf_map *); 61644 void (*bpf_map_free_security)(struct bpf_map *); 61645 int (*bpf_prog_alloc_security)(struct bpf_prog_aux *); 61646 void (*bpf_prog_free_security)(struct bpf_prog_aux *); 61647 int (*locked_down)(enum lockdown_reason); 61648 int (*lock_kernel_down)(const char *, enum lockdown_reason); 61649 int (*perf_event_open)(struct perf_event_attr *, int); 61650 int (*perf_event_alloc)(struct perf_event *); 61651 void (*perf_event_free)(struct perf_event *); 61652 int (*perf_event_read)(struct perf_event *); 61653 int (*perf_event_write)(struct perf_event *); 61654 }; 61655 61656 struct security_hook_heads { 61657 struct hlist_head binder_set_context_mgr; 61658 struct hlist_head binder_transaction; 61659 struct hlist_head binder_transfer_binder; 61660 struct hlist_head binder_transfer_file; 61661 struct hlist_head ptrace_access_check; 61662 struct hlist_head ptrace_traceme; 61663 struct hlist_head capget; 61664 struct hlist_head capset; 61665 struct hlist_head capable; 61666 struct hlist_head quotactl; 61667 struct hlist_head quota_on; 61668 struct hlist_head syslog; 61669 struct hlist_head settime; 61670 struct hlist_head vm_enough_memory; 61671 struct hlist_head bprm_creds_for_exec; 61672 struct hlist_head bprm_creds_from_file; 61673 struct hlist_head bprm_check_security; 61674 struct hlist_head bprm_committing_creds; 61675 struct hlist_head bprm_committed_creds; 61676 struct hlist_head fs_context_dup; 61677 struct hlist_head fs_context_parse_param; 61678 struct hlist_head sb_alloc_security; 61679 struct hlist_head sb_free_security; 61680 struct hlist_head sb_free_mnt_opts; 61681 struct hlist_head sb_eat_lsm_opts; 61682 struct hlist_head sb_remount; 61683 struct hlist_head sb_kern_mount; 61684 struct hlist_head sb_show_options; 61685 struct hlist_head sb_statfs; 61686 struct hlist_head sb_mount; 61687 struct hlist_head sb_umount; 61688 struct hlist_head sb_pivotroot; 61689 struct hlist_head sb_set_mnt_opts; 61690 struct hlist_head sb_clone_mnt_opts; 61691 struct hlist_head sb_add_mnt_opt; 61692 struct hlist_head move_mount; 61693 struct hlist_head dentry_init_security; 61694 struct hlist_head dentry_create_files_as; 61695 struct hlist_head path_notify; 61696 struct hlist_head inode_alloc_security; 61697 struct hlist_head inode_free_security; 61698 struct hlist_head inode_init_security; 61699 struct hlist_head inode_create; 61700 struct hlist_head inode_link; 61701 struct hlist_head inode_unlink; 61702 struct hlist_head inode_symlink; 61703 struct hlist_head inode_mkdir; 61704 struct hlist_head inode_rmdir; 61705 struct hlist_head inode_mknod; 61706 struct hlist_head inode_rename; 61707 struct hlist_head inode_readlink; 61708 struct hlist_head inode_follow_link; 61709 struct hlist_head inode_permission; 61710 struct hlist_head inode_setattr; 61711 struct hlist_head inode_getattr; 61712 struct hlist_head inode_setxattr; 61713 struct hlist_head inode_post_setxattr; 61714 struct hlist_head inode_getxattr; 61715 struct hlist_head inode_listxattr; 61716 struct hlist_head inode_removexattr; 61717 struct hlist_head inode_need_killpriv; 61718 struct hlist_head inode_killpriv; 61719 struct hlist_head inode_getsecurity; 61720 struct hlist_head inode_setsecurity; 61721 struct hlist_head inode_listsecurity; 61722 struct hlist_head inode_getsecid; 61723 struct hlist_head inode_copy_up; 61724 struct hlist_head inode_copy_up_xattr; 61725 struct hlist_head kernfs_init_security; 61726 struct hlist_head file_permission; 61727 struct hlist_head file_alloc_security; 61728 struct hlist_head file_free_security; 61729 struct hlist_head file_ioctl; 61730 struct hlist_head mmap_addr; 61731 struct hlist_head mmap_file; 61732 struct hlist_head file_mprotect; 61733 struct hlist_head file_lock; 61734 struct hlist_head file_fcntl; 61735 struct hlist_head file_set_fowner; 61736 struct hlist_head file_send_sigiotask; 61737 struct hlist_head file_receive; 61738 struct hlist_head file_open; 61739 struct hlist_head task_alloc; 61740 struct hlist_head task_free; 61741 struct hlist_head cred_alloc_blank; 61742 struct hlist_head cred_free; 61743 struct hlist_head cred_prepare; 61744 struct hlist_head cred_transfer; 61745 struct hlist_head cred_getsecid; 61746 struct hlist_head kernel_act_as; 61747 struct hlist_head kernel_create_files_as; 61748 struct hlist_head kernel_module_request; 61749 struct hlist_head kernel_load_data; 61750 struct hlist_head kernel_post_load_data; 61751 struct hlist_head kernel_read_file; 61752 struct hlist_head kernel_post_read_file; 61753 struct hlist_head task_fix_setuid; 61754 struct hlist_head task_fix_setgid; 61755 struct hlist_head task_setpgid; 61756 struct hlist_head task_getpgid; 61757 struct hlist_head task_getsid; 61758 struct hlist_head task_getsecid; 61759 struct hlist_head task_setnice; 61760 struct hlist_head task_setioprio; 61761 struct hlist_head task_getioprio; 61762 struct hlist_head task_prlimit; 61763 struct hlist_head task_setrlimit; 61764 struct hlist_head task_setscheduler; 61765 struct hlist_head task_getscheduler; 61766 struct hlist_head task_movememory; 61767 struct hlist_head task_kill; 61768 struct hlist_head task_prctl; 61769 struct hlist_head task_to_inode; 61770 struct hlist_head ipc_permission; 61771 struct hlist_head ipc_getsecid; 61772 struct hlist_head msg_msg_alloc_security; 61773 struct hlist_head msg_msg_free_security; 61774 struct hlist_head msg_queue_alloc_security; 61775 struct hlist_head msg_queue_free_security; 61776 struct hlist_head msg_queue_associate; 61777 struct hlist_head msg_queue_msgctl; 61778 struct hlist_head msg_queue_msgsnd; 61779 struct hlist_head msg_queue_msgrcv; 61780 struct hlist_head shm_alloc_security; 61781 struct hlist_head shm_free_security; 61782 struct hlist_head shm_associate; 61783 struct hlist_head shm_shmctl; 61784 struct hlist_head shm_shmat; 61785 struct hlist_head sem_alloc_security; 61786 struct hlist_head sem_free_security; 61787 struct hlist_head sem_associate; 61788 struct hlist_head sem_semctl; 61789 struct hlist_head sem_semop; 61790 struct hlist_head netlink_send; 61791 struct hlist_head d_instantiate; 61792 struct hlist_head getprocattr; 61793 struct hlist_head setprocattr; 61794 struct hlist_head ismaclabel; 61795 struct hlist_head secid_to_secctx; 61796 struct hlist_head secctx_to_secid; 61797 struct hlist_head release_secctx; 61798 struct hlist_head inode_invalidate_secctx; 61799 struct hlist_head inode_notifysecctx; 61800 struct hlist_head inode_setsecctx; 61801 struct hlist_head inode_getsecctx; 61802 struct hlist_head post_notification; 61803 struct hlist_head watch_key; 61804 struct hlist_head unix_stream_connect; 61805 struct hlist_head unix_may_send; 61806 struct hlist_head socket_create; 61807 struct hlist_head socket_post_create; 61808 struct hlist_head socket_socketpair; 61809 struct hlist_head socket_bind; 61810 struct hlist_head socket_connect; 61811 struct hlist_head socket_listen; 61812 struct hlist_head socket_accept; 61813 struct hlist_head socket_sendmsg; 61814 struct hlist_head socket_recvmsg; 61815 struct hlist_head socket_getsockname; 61816 struct hlist_head socket_getpeername; 61817 struct hlist_head socket_getsockopt; 61818 struct hlist_head socket_setsockopt; 61819 struct hlist_head socket_shutdown; 61820 struct hlist_head socket_sock_rcv_skb; 61821 struct hlist_head socket_getpeersec_stream; 61822 struct hlist_head socket_getpeersec_dgram; 61823 struct hlist_head sk_alloc_security; 61824 struct hlist_head sk_free_security; 61825 struct hlist_head sk_clone_security; 61826 struct hlist_head sk_getsecid; 61827 struct hlist_head sock_graft; 61828 struct hlist_head inet_conn_request; 61829 struct hlist_head inet_csk_clone; 61830 struct hlist_head inet_conn_established; 61831 struct hlist_head secmark_relabel_packet; 61832 struct hlist_head secmark_refcount_inc; 61833 struct hlist_head secmark_refcount_dec; 61834 struct hlist_head req_classify_flow; 61835 struct hlist_head tun_dev_alloc_security; 61836 struct hlist_head tun_dev_free_security; 61837 struct hlist_head tun_dev_create; 61838 struct hlist_head tun_dev_attach_queue; 61839 struct hlist_head tun_dev_attach; 61840 struct hlist_head tun_dev_open; 61841 struct hlist_head sctp_assoc_request; 61842 struct hlist_head sctp_bind_connect; 61843 struct hlist_head sctp_sk_clone; 61844 struct hlist_head ib_pkey_access; 61845 struct hlist_head ib_endport_manage_subnet; 61846 struct hlist_head ib_alloc_security; 61847 struct hlist_head ib_free_security; 61848 struct hlist_head xfrm_policy_alloc_security; 61849 struct hlist_head xfrm_policy_clone_security; 61850 struct hlist_head xfrm_policy_free_security; 61851 struct hlist_head xfrm_policy_delete_security; 61852 struct hlist_head xfrm_state_alloc; 61853 struct hlist_head xfrm_state_alloc_acquire; 61854 struct hlist_head xfrm_state_free_security; 61855 struct hlist_head xfrm_state_delete_security; 61856 struct hlist_head xfrm_policy_lookup; 61857 struct hlist_head xfrm_state_pol_flow_match; 61858 struct hlist_head xfrm_decode_session; 61859 struct hlist_head key_alloc; 61860 struct hlist_head key_free; 61861 struct hlist_head key_permission; 61862 struct hlist_head key_getsecurity; 61863 struct hlist_head audit_rule_init; 61864 struct hlist_head audit_rule_known; 61865 struct hlist_head audit_rule_match; 61866 struct hlist_head audit_rule_free; 61867 struct hlist_head bpf; 61868 struct hlist_head bpf_map; 61869 struct hlist_head bpf_prog; 61870 struct hlist_head bpf_map_alloc_security; 61871 struct hlist_head bpf_map_free_security; 61872 struct hlist_head bpf_prog_alloc_security; 61873 struct hlist_head bpf_prog_free_security; 61874 struct hlist_head locked_down; 61875 struct hlist_head lock_kernel_down; 61876 struct hlist_head perf_event_open; 61877 struct hlist_head perf_event_alloc; 61878 struct hlist_head perf_event_free; 61879 struct hlist_head perf_event_read; 61880 struct hlist_head perf_event_write; 61881 }; 61882 61883 struct security_hook_list { 61884 struct hlist_node list; 61885 struct hlist_head *head; 61886 union security_list_options hook; 61887 char *lsm; 61888 }; 61889 61890 enum lsm_order { 61891 LSM_ORDER_FIRST = 4294967295, 61892 LSM_ORDER_MUTABLE = 0, 61893 }; 61894 61895 struct lsm_info { 61896 const char *name; 61897 enum lsm_order order; 61898 long unsigned int flags; 61899 int *enabled; 61900 int (*init)(); 61901 struct lsm_blob_sizes *blobs; 61902 }; 61903 61904 enum lsm_event { 61905 LSM_POLICY_CHANGE = 0, 61906 }; 61907 61908 struct ethhdr { 61909 unsigned char h_dest[6]; 61910 unsigned char h_source[6]; 61911 __be16 h_proto; 61912 }; 61913 61914 struct ethtool_drvinfo { 61915 __u32 cmd; 61916 char driver[32]; 61917 char version[32]; 61918 char fw_version[32]; 61919 char bus_info[32]; 61920 char erom_version[32]; 61921 char reserved2[12]; 61922 __u32 n_priv_flags; 61923 __u32 n_stats; 61924 __u32 testinfo_len; 61925 __u32 eedump_len; 61926 __u32 regdump_len; 61927 }; 61928 61929 struct ethtool_wolinfo { 61930 __u32 cmd; 61931 __u32 supported; 61932 __u32 wolopts; 61933 __u8 sopass[6]; 61934 }; 61935 61936 struct ethtool_tunable { 61937 __u32 cmd; 61938 __u32 id; 61939 __u32 type_id; 61940 __u32 len; 61941 void *data[0]; 61942 }; 61943 61944 struct ethtool_regs { 61945 __u32 cmd; 61946 __u32 version; 61947 __u32 len; 61948 __u8 data[0]; 61949 }; 61950 61951 struct ethtool_eeprom { 61952 __u32 cmd; 61953 __u32 magic; 61954 __u32 offset; 61955 __u32 len; 61956 __u8 data[0]; 61957 }; 61958 61959 struct ethtool_eee { 61960 __u32 cmd; 61961 __u32 supported; 61962 __u32 advertised; 61963 __u32 lp_advertised; 61964 __u32 eee_active; 61965 __u32 eee_enabled; 61966 __u32 tx_lpi_enabled; 61967 __u32 tx_lpi_timer; 61968 __u32 reserved[2]; 61969 }; 61970 61971 struct ethtool_modinfo { 61972 __u32 cmd; 61973 __u32 type; 61974 __u32 eeprom_len; 61975 __u32 reserved[8]; 61976 }; 61977 61978 struct ethtool_coalesce { 61979 __u32 cmd; 61980 __u32 rx_coalesce_usecs; 61981 __u32 rx_max_coalesced_frames; 61982 __u32 rx_coalesce_usecs_irq; 61983 __u32 rx_max_coalesced_frames_irq; 61984 __u32 tx_coalesce_usecs; 61985 __u32 tx_max_coalesced_frames; 61986 __u32 tx_coalesce_usecs_irq; 61987 __u32 tx_max_coalesced_frames_irq; 61988 __u32 stats_block_coalesce_usecs; 61989 __u32 use_adaptive_rx_coalesce; 61990 __u32 use_adaptive_tx_coalesce; 61991 __u32 pkt_rate_low; 61992 __u32 rx_coalesce_usecs_low; 61993 __u32 rx_max_coalesced_frames_low; 61994 __u32 tx_coalesce_usecs_low; 61995 __u32 tx_max_coalesced_frames_low; 61996 __u32 pkt_rate_high; 61997 __u32 rx_coalesce_usecs_high; 61998 __u32 rx_max_coalesced_frames_high; 61999 __u32 tx_coalesce_usecs_high; 62000 __u32 tx_max_coalesced_frames_high; 62001 __u32 rate_sample_interval; 62002 }; 62003 62004 struct ethtool_ringparam { 62005 __u32 cmd; 62006 __u32 rx_max_pending; 62007 __u32 rx_mini_max_pending; 62008 __u32 rx_jumbo_max_pending; 62009 __u32 tx_max_pending; 62010 __u32 rx_pending; 62011 __u32 rx_mini_pending; 62012 __u32 rx_jumbo_pending; 62013 __u32 tx_pending; 62014 }; 62015 62016 struct ethtool_channels { 62017 __u32 cmd; 62018 __u32 max_rx; 62019 __u32 max_tx; 62020 __u32 max_other; 62021 __u32 max_combined; 62022 __u32 rx_count; 62023 __u32 tx_count; 62024 __u32 other_count; 62025 __u32 combined_count; 62026 }; 62027 62028 struct ethtool_pauseparam { 62029 __u32 cmd; 62030 __u32 autoneg; 62031 __u32 rx_pause; 62032 __u32 tx_pause; 62033 }; 62034 62035 enum ethtool_link_ext_state { 62036 ETHTOOL_LINK_EXT_STATE_AUTONEG = 0, 62037 ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE = 1, 62038 ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH = 2, 62039 ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY = 3, 62040 ETHTOOL_LINK_EXT_STATE_NO_CABLE = 4, 62041 ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE = 5, 62042 ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE = 6, 62043 ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE = 7, 62044 ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED = 8, 62045 ETHTOOL_LINK_EXT_STATE_OVERHEAT = 9, 62046 }; 62047 62048 enum ethtool_link_ext_substate_autoneg { 62049 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1, 62050 ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED = 2, 62051 ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED = 3, 62052 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE = 4, 62053 ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE = 5, 62054 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD = 6, 62055 }; 62056 62057 enum ethtool_link_ext_substate_link_training { 62058 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1, 62059 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT = 2, 62060 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY = 3, 62061 ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT = 4, 62062 }; 62063 62064 enum ethtool_link_ext_substate_link_logical_mismatch { 62065 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1, 62066 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK = 2, 62067 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS = 3, 62068 ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED = 4, 62069 ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED = 5, 62070 }; 62071 62072 enum ethtool_link_ext_substate_bad_signal_integrity { 62073 ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1, 62074 ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE = 2, 62075 }; 62076 62077 enum ethtool_link_ext_substate_cable_issue { 62078 ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1, 62079 ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE = 2, 62080 }; 62081 62082 struct ethtool_test { 62083 __u32 cmd; 62084 __u32 flags; 62085 __u32 reserved; 62086 __u32 len; 62087 __u64 data[0]; 62088 }; 62089 62090 struct ethtool_stats { 62091 __u32 cmd; 62092 __u32 n_stats; 62093 __u64 data[0]; 62094 }; 62095 62096 struct ethtool_tcpip4_spec { 62097 __be32 ip4src; 62098 __be32 ip4dst; 62099 __be16 psrc; 62100 __be16 pdst; 62101 __u8 tos; 62102 }; 62103 62104 struct ethtool_ah_espip4_spec { 62105 __be32 ip4src; 62106 __be32 ip4dst; 62107 __be32 spi; 62108 __u8 tos; 62109 }; 62110 62111 struct ethtool_usrip4_spec { 62112 __be32 ip4src; 62113 __be32 ip4dst; 62114 __be32 l4_4_bytes; 62115 __u8 tos; 62116 __u8 ip_ver; 62117 __u8 proto; 62118 }; 62119 62120 struct ethtool_tcpip6_spec { 62121 __be32 ip6src[4]; 62122 __be32 ip6dst[4]; 62123 __be16 psrc; 62124 __be16 pdst; 62125 __u8 tclass; 62126 }; 62127 62128 struct ethtool_ah_espip6_spec { 62129 __be32 ip6src[4]; 62130 __be32 ip6dst[4]; 62131 __be32 spi; 62132 __u8 tclass; 62133 }; 62134 62135 struct ethtool_usrip6_spec { 62136 __be32 ip6src[4]; 62137 __be32 ip6dst[4]; 62138 __be32 l4_4_bytes; 62139 __u8 tclass; 62140 __u8 l4_proto; 62141 }; 62142 62143 union ethtool_flow_union { 62144 struct ethtool_tcpip4_spec tcp_ip4_spec; 62145 struct ethtool_tcpip4_spec udp_ip4_spec; 62146 struct ethtool_tcpip4_spec sctp_ip4_spec; 62147 struct ethtool_ah_espip4_spec ah_ip4_spec; 62148 struct ethtool_ah_espip4_spec esp_ip4_spec; 62149 struct ethtool_usrip4_spec usr_ip4_spec; 62150 struct ethtool_tcpip6_spec tcp_ip6_spec; 62151 struct ethtool_tcpip6_spec udp_ip6_spec; 62152 struct ethtool_tcpip6_spec sctp_ip6_spec; 62153 struct ethtool_ah_espip6_spec ah_ip6_spec; 62154 struct ethtool_ah_espip6_spec esp_ip6_spec; 62155 struct ethtool_usrip6_spec usr_ip6_spec; 62156 struct ethhdr ether_spec; 62157 __u8 hdata[52]; 62158 }; 62159 62160 struct ethtool_flow_ext { 62161 __u8 padding[2]; 62162 unsigned char h_dest[6]; 62163 __be16 vlan_etype; 62164 __be16 vlan_tci; 62165 __be32 data[2]; 62166 }; 62167 62168 struct ethtool_rx_flow_spec { 62169 __u32 flow_type; 62170 union ethtool_flow_union h_u; 62171 struct ethtool_flow_ext h_ext; 62172 union ethtool_flow_union m_u; 62173 struct ethtool_flow_ext m_ext; 62174 __u64 ring_cookie; 62175 __u32 location; 62176 }; 62177 62178 struct ethtool_rxnfc { 62179 __u32 cmd; 62180 __u32 flow_type; 62181 __u64 data; 62182 struct ethtool_rx_flow_spec fs; 62183 union { 62184 __u32 rule_cnt; 62185 __u32 rss_context; 62186 }; 62187 __u32 rule_locs[0]; 62188 }; 62189 62190 struct ethtool_flash { 62191 __u32 cmd; 62192 __u32 region; 62193 char data[128]; 62194 }; 62195 62196 struct ethtool_dump { 62197 __u32 cmd; 62198 __u32 version; 62199 __u32 flag; 62200 __u32 len; 62201 __u8 data[0]; 62202 }; 62203 62204 struct ethtool_ts_info { 62205 __u32 cmd; 62206 __u32 so_timestamping; 62207 __s32 phc_index; 62208 __u32 tx_types; 62209 __u32 tx_reserved[3]; 62210 __u32 rx_filters; 62211 __u32 rx_reserved[3]; 62212 }; 62213 62214 struct ethtool_fecparam { 62215 __u32 cmd; 62216 __u32 active_fec; 62217 __u32 fec; 62218 __u32 reserved; 62219 }; 62220 62221 enum ethtool_link_mode_bit_indices { 62222 ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0, 62223 ETHTOOL_LINK_MODE_10baseT_Full_BIT = 1, 62224 ETHTOOL_LINK_MODE_100baseT_Half_BIT = 2, 62225 ETHTOOL_LINK_MODE_100baseT_Full_BIT = 3, 62226 ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 4, 62227 ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 5, 62228 ETHTOOL_LINK_MODE_Autoneg_BIT = 6, 62229 ETHTOOL_LINK_MODE_TP_BIT = 7, 62230 ETHTOOL_LINK_MODE_AUI_BIT = 8, 62231 ETHTOOL_LINK_MODE_MII_BIT = 9, 62232 ETHTOOL_LINK_MODE_FIBRE_BIT = 10, 62233 ETHTOOL_LINK_MODE_BNC_BIT = 11, 62234 ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 12, 62235 ETHTOOL_LINK_MODE_Pause_BIT = 13, 62236 ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14, 62237 ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 15, 62238 ETHTOOL_LINK_MODE_Backplane_BIT = 16, 62239 ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 17, 62240 ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18, 62241 ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 19, 62242 ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 20, 62243 ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21, 62244 ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22, 62245 ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23, 62246 ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24, 62247 ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25, 62248 ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26, 62249 ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27, 62250 ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28, 62251 ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29, 62252 ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30, 62253 ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 31, 62254 ETHTOOL_LINK_MODE_25000baseKR_Full_BIT = 32, 62255 ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 33, 62256 ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 34, 62257 ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 35, 62258 ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT = 36, 62259 ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 37, 62260 ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 38, 62261 ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39, 62262 ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40, 62263 ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 41, 62264 ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42, 62265 ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43, 62266 ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44, 62267 ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45, 62268 ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 46, 62269 ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47, 62270 ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48, 62271 ETHTOOL_LINK_MODE_FEC_NONE_BIT = 49, 62272 ETHTOOL_LINK_MODE_FEC_RS_BIT = 50, 62273 ETHTOOL_LINK_MODE_FEC_BASER_BIT = 51, 62274 ETHTOOL_LINK_MODE_50000baseKR_Full_BIT = 52, 62275 ETHTOOL_LINK_MODE_50000baseSR_Full_BIT = 53, 62276 ETHTOOL_LINK_MODE_50000baseCR_Full_BIT = 54, 62277 ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT = 55, 62278 ETHTOOL_LINK_MODE_50000baseDR_Full_BIT = 56, 62279 ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT = 57, 62280 ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT = 58, 62281 ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT = 59, 62282 ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 60, 62283 ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT = 61, 62284 ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT = 62, 62285 ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT = 63, 62286 ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64, 62287 ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 65, 62288 ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66, 62289 ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 67, 62290 ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 68, 62291 ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT = 69, 62292 ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT = 70, 62293 ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 71, 62294 ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72, 62295 ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73, 62296 ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 74, 62297 ETHTOOL_LINK_MODE_100000baseKR_Full_BIT = 75, 62298 ETHTOOL_LINK_MODE_100000baseSR_Full_BIT = 76, 62299 ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT = 77, 62300 ETHTOOL_LINK_MODE_100000baseCR_Full_BIT = 78, 62301 ETHTOOL_LINK_MODE_100000baseDR_Full_BIT = 79, 62302 ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT = 80, 62303 ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT = 81, 62304 ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 82, 62305 ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT = 83, 62306 ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT = 84, 62307 ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT = 85, 62308 ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT = 86, 62309 ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87, 62310 ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 88, 62311 ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 89, 62312 ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 90, 62313 ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 91, 62314 __ETHTOOL_LINK_MODE_MASK_NBITS = 92, 62315 }; 62316 62317 struct ethtool_link_settings { 62318 __u32 cmd; 62319 __u32 speed; 62320 __u8 duplex; 62321 __u8 port; 62322 __u8 phy_address; 62323 __u8 autoneg; 62324 __u8 mdio_support; 62325 __u8 eth_tp_mdix; 62326 __u8 eth_tp_mdix_ctrl; 62327 __s8 link_mode_masks_nwords; 62328 __u8 transceiver; 62329 __u8 master_slave_cfg; 62330 __u8 master_slave_state; 62331 __u8 reserved1[1]; 62332 __u32 reserved[7]; 62333 __u32 link_mode_masks[0]; 62334 }; 62335 62336 struct ethtool_link_ext_state_info { 62337 enum ethtool_link_ext_state link_ext_state; 62338 union { 62339 enum ethtool_link_ext_substate_autoneg autoneg; 62340 enum ethtool_link_ext_substate_link_training link_training; 62341 enum ethtool_link_ext_substate_link_logical_mismatch link_logical_mismatch; 62342 enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity; 62343 enum ethtool_link_ext_substate_cable_issue cable_issue; 62344 u8 __link_ext_substate; 62345 }; 62346 }; 62347 62348 struct ethtool_link_ksettings { 62349 struct ethtool_link_settings base; 62350 struct { 62351 long unsigned int supported[2]; 62352 long unsigned int advertising[2]; 62353 long unsigned int lp_advertising[2]; 62354 } link_modes; 62355 }; 62356 62357 struct ethtool_pause_stats { 62358 u64 tx_pause_frames; 62359 u64 rx_pause_frames; 62360 }; 62361 62362 enum ib_uverbs_write_cmds { 62363 IB_USER_VERBS_CMD_GET_CONTEXT = 0, 62364 IB_USER_VERBS_CMD_QUERY_DEVICE = 1, 62365 IB_USER_VERBS_CMD_QUERY_PORT = 2, 62366 IB_USER_VERBS_CMD_ALLOC_PD = 3, 62367 IB_USER_VERBS_CMD_DEALLOC_PD = 4, 62368 IB_USER_VERBS_CMD_CREATE_AH = 5, 62369 IB_USER_VERBS_CMD_MODIFY_AH = 6, 62370 IB_USER_VERBS_CMD_QUERY_AH = 7, 62371 IB_USER_VERBS_CMD_DESTROY_AH = 8, 62372 IB_USER_VERBS_CMD_REG_MR = 9, 62373 IB_USER_VERBS_CMD_REG_SMR = 10, 62374 IB_USER_VERBS_CMD_REREG_MR = 11, 62375 IB_USER_VERBS_CMD_QUERY_MR = 12, 62376 IB_USER_VERBS_CMD_DEREG_MR = 13, 62377 IB_USER_VERBS_CMD_ALLOC_MW = 14, 62378 IB_USER_VERBS_CMD_BIND_MW = 15, 62379 IB_USER_VERBS_CMD_DEALLOC_MW = 16, 62380 IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL = 17, 62381 IB_USER_VERBS_CMD_CREATE_CQ = 18, 62382 IB_USER_VERBS_CMD_RESIZE_CQ = 19, 62383 IB_USER_VERBS_CMD_DESTROY_CQ = 20, 62384 IB_USER_VERBS_CMD_POLL_CQ = 21, 62385 IB_USER_VERBS_CMD_PEEK_CQ = 22, 62386 IB_USER_VERBS_CMD_REQ_NOTIFY_CQ = 23, 62387 IB_USER_VERBS_CMD_CREATE_QP = 24, 62388 IB_USER_VERBS_CMD_QUERY_QP = 25, 62389 IB_USER_VERBS_CMD_MODIFY_QP = 26, 62390 IB_USER_VERBS_CMD_DESTROY_QP = 27, 62391 IB_USER_VERBS_CMD_POST_SEND = 28, 62392 IB_USER_VERBS_CMD_POST_RECV = 29, 62393 IB_USER_VERBS_CMD_ATTACH_MCAST = 30, 62394 IB_USER_VERBS_CMD_DETACH_MCAST = 31, 62395 IB_USER_VERBS_CMD_CREATE_SRQ = 32, 62396 IB_USER_VERBS_CMD_MODIFY_SRQ = 33, 62397 IB_USER_VERBS_CMD_QUERY_SRQ = 34, 62398 IB_USER_VERBS_CMD_DESTROY_SRQ = 35, 62399 IB_USER_VERBS_CMD_POST_SRQ_RECV = 36, 62400 IB_USER_VERBS_CMD_OPEN_XRCD = 37, 62401 IB_USER_VERBS_CMD_CLOSE_XRCD = 38, 62402 IB_USER_VERBS_CMD_CREATE_XSRQ = 39, 62403 IB_USER_VERBS_CMD_OPEN_QP = 40, 62404 }; 62405 62406 enum ib_uverbs_wc_opcode { 62407 IB_UVERBS_WC_SEND = 0, 62408 IB_UVERBS_WC_RDMA_WRITE = 1, 62409 IB_UVERBS_WC_RDMA_READ = 2, 62410 IB_UVERBS_WC_COMP_SWAP = 3, 62411 IB_UVERBS_WC_FETCH_ADD = 4, 62412 IB_UVERBS_WC_BIND_MW = 5, 62413 IB_UVERBS_WC_LOCAL_INV = 6, 62414 IB_UVERBS_WC_TSO = 7, 62415 }; 62416 62417 enum ib_uverbs_create_qp_mask { 62418 IB_UVERBS_CREATE_QP_MASK_IND_TABLE = 1, 62419 }; 62420 62421 enum ib_uverbs_wr_opcode { 62422 IB_UVERBS_WR_RDMA_WRITE = 0, 62423 IB_UVERBS_WR_RDMA_WRITE_WITH_IMM = 1, 62424 IB_UVERBS_WR_SEND = 2, 62425 IB_UVERBS_WR_SEND_WITH_IMM = 3, 62426 IB_UVERBS_WR_RDMA_READ = 4, 62427 IB_UVERBS_WR_ATOMIC_CMP_AND_SWP = 5, 62428 IB_UVERBS_WR_ATOMIC_FETCH_AND_ADD = 6, 62429 IB_UVERBS_WR_LOCAL_INV = 7, 62430 IB_UVERBS_WR_BIND_MW = 8, 62431 IB_UVERBS_WR_SEND_WITH_INV = 9, 62432 IB_UVERBS_WR_TSO = 10, 62433 IB_UVERBS_WR_RDMA_READ_WITH_INV = 11, 62434 IB_UVERBS_WR_MASKED_ATOMIC_CMP_AND_SWP = 12, 62435 IB_UVERBS_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13, 62436 }; 62437 62438 enum ib_uverbs_access_flags { 62439 IB_UVERBS_ACCESS_LOCAL_WRITE = 1, 62440 IB_UVERBS_ACCESS_REMOTE_WRITE = 2, 62441 IB_UVERBS_ACCESS_REMOTE_READ = 4, 62442 IB_UVERBS_ACCESS_REMOTE_ATOMIC = 8, 62443 IB_UVERBS_ACCESS_MW_BIND = 16, 62444 IB_UVERBS_ACCESS_ZERO_BASED = 32, 62445 IB_UVERBS_ACCESS_ON_DEMAND = 64, 62446 IB_UVERBS_ACCESS_HUGETLB = 128, 62447 IB_UVERBS_ACCESS_RELAXED_ORDERING = 1048576, 62448 IB_UVERBS_ACCESS_OPTIONAL_RANGE = 1072693248, 62449 }; 62450 62451 enum ib_uverbs_srq_type { 62452 IB_UVERBS_SRQT_BASIC = 0, 62453 IB_UVERBS_SRQT_XRC = 1, 62454 IB_UVERBS_SRQT_TM = 2, 62455 }; 62456 62457 enum ib_uverbs_wq_type { 62458 IB_UVERBS_WQT_RQ = 0, 62459 }; 62460 62461 enum ib_uverbs_wq_flags { 62462 IB_UVERBS_WQ_FLAGS_CVLAN_STRIPPING = 1, 62463 IB_UVERBS_WQ_FLAGS_SCATTER_FCS = 2, 62464 IB_UVERBS_WQ_FLAGS_DELAY_DROP = 4, 62465 IB_UVERBS_WQ_FLAGS_PCI_WRITE_END_PADDING = 8, 62466 }; 62467 62468 enum ib_uverbs_qp_type { 62469 IB_UVERBS_QPT_RC = 2, 62470 IB_UVERBS_QPT_UC = 3, 62471 IB_UVERBS_QPT_UD = 4, 62472 IB_UVERBS_QPT_RAW_PACKET = 8, 62473 IB_UVERBS_QPT_XRC_INI = 9, 62474 IB_UVERBS_QPT_XRC_TGT = 10, 62475 IB_UVERBS_QPT_DRIVER = 255, 62476 }; 62477 62478 enum ib_uverbs_qp_create_flags { 62479 IB_UVERBS_QP_CREATE_BLOCK_MULTICAST_LOOPBACK = 2, 62480 IB_UVERBS_QP_CREATE_SCATTER_FCS = 256, 62481 IB_UVERBS_QP_CREATE_CVLAN_STRIPPING = 512, 62482 IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING = 2048, 62483 IB_UVERBS_QP_CREATE_SQ_SIG_ALL = 4096, 62484 }; 62485 62486 enum ib_uverbs_gid_type { 62487 IB_UVERBS_GID_TYPE_IB = 0, 62488 IB_UVERBS_GID_TYPE_ROCE_V1 = 1, 62489 IB_UVERBS_GID_TYPE_ROCE_V2 = 2, 62490 }; 62491 62492 enum ib_poll_context { 62493 IB_POLL_SOFTIRQ = 0, 62494 IB_POLL_WORKQUEUE = 1, 62495 IB_POLL_UNBOUND_WORKQUEUE = 2, 62496 IB_POLL_LAST_POOL_TYPE = 2, 62497 IB_POLL_DIRECT = 3, 62498 }; 62499 62500 struct lsm_network_audit { 62501 int netif; 62502 const struct sock *sk; 62503 u16 family; 62504 __be16 dport; 62505 __be16 sport; 62506 union { 62507 struct { 62508 __be32 daddr; 62509 __be32 saddr; 62510 } v4; 62511 struct { 62512 struct in6_addr daddr; 62513 struct in6_addr saddr; 62514 } v6; 62515 } fam; 62516 }; 62517 62518 struct lsm_ioctlop_audit { 62519 struct path path; 62520 u16 cmd; 62521 }; 62522 62523 struct lsm_ibpkey_audit { 62524 u64 subnet_prefix; 62525 u16 pkey; 62526 }; 62527 62528 struct lsm_ibendport_audit { 62529 char dev_name[64]; 62530 u8 port; 62531 }; 62532 62533 struct selinux_state; 62534 62535 struct selinux_audit_data { 62536 u32 ssid; 62537 u32 tsid; 62538 u16 tclass; 62539 u32 requested; 62540 u32 audited; 62541 u32 denied; 62542 int result; 62543 struct selinux_state *state; 62544 }; 62545 62546 struct common_audit_data { 62547 char type; 62548 union { 62549 struct path path; 62550 struct dentry *dentry; 62551 struct inode *inode; 62552 struct lsm_network_audit *net; 62553 int cap; 62554 int ipc_id; 62555 struct task_struct *tsk; 62556 struct { 62557 key_serial_t key; 62558 char *key_desc; 62559 } key_struct; 62560 char *kmod_name; 62561 struct lsm_ioctlop_audit *op; 62562 struct file *file; 62563 struct lsm_ibpkey_audit *ibpkey; 62564 struct lsm_ibendport_audit *ibendport; 62565 int reason; 62566 } u; 62567 union { 62568 struct selinux_audit_data *selinux_audit_data; 62569 }; 62570 }; 62571 62572 enum { 62573 POLICYDB_CAPABILITY_NETPEER = 0, 62574 POLICYDB_CAPABILITY_OPENPERM = 1, 62575 POLICYDB_CAPABILITY_EXTSOCKCLASS = 2, 62576 POLICYDB_CAPABILITY_ALWAYSNETWORK = 3, 62577 POLICYDB_CAPABILITY_CGROUPSECLABEL = 4, 62578 POLICYDB_CAPABILITY_NNP_NOSUID_TRANSITION = 5, 62579 POLICYDB_CAPABILITY_GENFS_SECLABEL_SYMLINKS = 6, 62580 __POLICYDB_CAPABILITY_MAX = 7, 62581 }; 62582 62583 struct selinux_avc; 62584 62585 struct selinux_policy; 62586 62587 struct selinux_state { 62588 bool enforcing; 62589 bool checkreqprot; 62590 bool initialized; 62591 bool policycap[7]; 62592 struct page *status_page; 62593 struct mutex status_lock; 62594 struct selinux_avc *avc; 62595 struct selinux_policy *policy; 62596 struct mutex policy_mutex; 62597 }; 62598 62599 struct avc_cache { 62600 struct hlist_head slots[512]; 62601 spinlock_t slots_lock[512]; 62602 atomic_t lru_hint; 62603 atomic_t active_nodes; 62604 u32 latest_notif; 62605 }; 62606 62607 struct selinux_avc { 62608 unsigned int avc_cache_threshold; 62609 struct avc_cache avc_cache; 62610 }; 62611 62612 struct av_decision { 62613 u32 allowed; 62614 u32 auditallow; 62615 u32 auditdeny; 62616 u32 seqno; 62617 u32 flags; 62618 }; 62619 62620 struct extended_perms_data { 62621 u32 p[8]; 62622 }; 62623 62624 struct extended_perms_decision { 62625 u8 used; 62626 u8 driver; 62627 struct extended_perms_data *allowed; 62628 struct extended_perms_data *auditallow; 62629 struct extended_perms_data *dontaudit; 62630 }; 62631 62632 struct extended_perms { 62633 u16 len; 62634 struct extended_perms_data drivers; 62635 }; 62636 62637 struct avc_cache_stats { 62638 unsigned int lookups; 62639 unsigned int misses; 62640 unsigned int allocations; 62641 unsigned int reclaims; 62642 unsigned int frees; 62643 }; 62644 62645 struct security_class_mapping { 62646 const char *name; 62647 const char *perms[33]; 62648 }; 62649 62650 struct trace_event_raw_selinux_audited { 62651 struct trace_entry ent; 62652 u32 requested; 62653 u32 denied; 62654 u32 audited; 62655 int result; 62656 u32 __data_loc_scontext; 62657 u32 __data_loc_tcontext; 62658 u32 __data_loc_tclass; 62659 char __data[0]; 62660 }; 62661 62662 struct trace_event_data_offsets_selinux_audited { 62663 u32 scontext; 62664 u32 tcontext; 62665 u32 tclass; 62666 }; 62667 62668 typedef void (*btf_trace_selinux_audited)(void *, struct selinux_audit_data *, char *, char *, const char *); 62669 62670 struct avc_xperms_node; 62671 62672 struct avc_entry { 62673 u32 ssid; 62674 u32 tsid; 62675 u16 tclass; 62676 struct av_decision avd; 62677 struct avc_xperms_node *xp_node; 62678 }; 62679 62680 struct avc_xperms_node { 62681 struct extended_perms xp; 62682 struct list_head xpd_head; 62683 }; 62684 62685 struct avc_node { 62686 struct avc_entry ae; 62687 struct hlist_node list; 62688 struct callback_head rhead; 62689 }; 62690 62691 struct avc_xperms_decision_node { 62692 struct extended_perms_decision xpd; 62693 struct list_head xpd_list; 62694 }; 62695 62696 struct avc_callback_node { 62697 int (*callback)(u32); 62698 u32 events; 62699 struct avc_callback_node *next; 62700 }; 62701 62702 typedef __u16 __sum16; 62703 62704 enum sctp_endpoint_type { 62705 SCTP_EP_TYPE_SOCKET = 0, 62706 SCTP_EP_TYPE_ASSOCIATION = 1, 62707 }; 62708 62709 struct sctp_chunk; 62710 62711 struct sctp_inq { 62712 struct list_head in_chunk_list; 62713 struct sctp_chunk *in_progress; 62714 struct work_struct immediate; 62715 }; 62716 62717 struct sctp_bind_addr { 62718 __u16 port; 62719 struct list_head address_list; 62720 }; 62721 62722 struct sctp_ep_common { 62723 struct hlist_node node; 62724 int hashent; 62725 enum sctp_endpoint_type type; 62726 refcount_t refcnt; 62727 bool dead; 62728 struct sock *sk; 62729 struct net *net; 62730 struct sctp_inq inqueue; 62731 struct sctp_bind_addr bind_addr; 62732 }; 62733 62734 struct sctp_hmac_algo_param; 62735 62736 struct sctp_chunks_param; 62737 62738 struct sctp_endpoint { 62739 struct sctp_ep_common base; 62740 struct list_head asocs; 62741 __u8 secret_key[32]; 62742 __u8 *digest; 62743 __u32 sndbuf_policy; 62744 __u32 rcvbuf_policy; 62745 struct crypto_shash **auth_hmacs; 62746 struct sctp_hmac_algo_param *auth_hmacs_list; 62747 struct sctp_chunks_param *auth_chunk_list; 62748 struct list_head endpoint_shared_keys; 62749 __u16 active_key_id; 62750 __u8 ecn_enable: 1; 62751 __u8 auth_enable: 1; 62752 __u8 intl_enable: 1; 62753 __u8 prsctp_enable: 1; 62754 __u8 asconf_enable: 1; 62755 __u8 reconf_enable: 1; 62756 __u8 strreset_enable; 62757 u32 secid; 62758 u32 peer_secid; 62759 }; 62760 62761 struct sockaddr_in6 { 62762 short unsigned int sin6_family; 62763 __be16 sin6_port; 62764 __be32 sin6_flowinfo; 62765 struct in6_addr sin6_addr; 62766 __u32 sin6_scope_id; 62767 }; 62768 62769 struct in_addr { 62770 __be32 s_addr; 62771 }; 62772 62773 struct sockaddr_in { 62774 __kernel_sa_family_t sin_family; 62775 __be16 sin_port; 62776 struct in_addr sin_addr; 62777 unsigned char __pad[8]; 62778 }; 62779 62780 struct nf_hook_state; 62781 62782 typedef unsigned int nf_hookfn(void *, struct sk_buff *, const struct nf_hook_state *); 62783 62784 struct nf_hook_entry { 62785 nf_hookfn *hook; 62786 void *priv; 62787 }; 62788 62789 struct nf_hook_entries { 62790 u16 num_hook_entries; 62791 struct nf_hook_entry hooks[0]; 62792 }; 62793 62794 struct nf_hook_state { 62795 unsigned int hook; 62796 u_int8_t pf; 62797 struct net_device *in; 62798 struct net_device *out; 62799 struct sock *sk; 62800 struct net *net; 62801 int (*okfn)(struct net *, struct sock *, struct sk_buff *); 62802 }; 62803 62804 struct nf_hook_ops { 62805 nf_hookfn *hook; 62806 struct net_device *dev; 62807 void *priv; 62808 u_int8_t pf; 62809 unsigned int hooknum; 62810 int priority; 62811 }; 62812 62813 enum nf_ip_hook_priorities { 62814 NF_IP_PRI_FIRST = 2147483648, 62815 NF_IP_PRI_RAW_BEFORE_DEFRAG = 4294966846, 62816 NF_IP_PRI_CONNTRACK_DEFRAG = 4294966896, 62817 NF_IP_PRI_RAW = 4294966996, 62818 NF_IP_PRI_SELINUX_FIRST = 4294967071, 62819 NF_IP_PRI_CONNTRACK = 4294967096, 62820 NF_IP_PRI_MANGLE = 4294967146, 62821 NF_IP_PRI_NAT_DST = 4294967196, 62822 NF_IP_PRI_FILTER = 0, 62823 NF_IP_PRI_SECURITY = 50, 62824 NF_IP_PRI_NAT_SRC = 100, 62825 NF_IP_PRI_SELINUX_LAST = 225, 62826 NF_IP_PRI_CONNTRACK_HELPER = 300, 62827 NF_IP_PRI_CONNTRACK_CONFIRM = 2147483647, 62828 NF_IP_PRI_LAST = 2147483647, 62829 }; 62830 62831 enum nf_ip6_hook_priorities { 62832 NF_IP6_PRI_FIRST = 2147483648, 62833 NF_IP6_PRI_RAW_BEFORE_DEFRAG = 4294966846, 62834 NF_IP6_PRI_CONNTRACK_DEFRAG = 4294966896, 62835 NF_IP6_PRI_RAW = 4294966996, 62836 NF_IP6_PRI_SELINUX_FIRST = 4294967071, 62837 NF_IP6_PRI_CONNTRACK = 4294967096, 62838 NF_IP6_PRI_MANGLE = 4294967146, 62839 NF_IP6_PRI_NAT_DST = 4294967196, 62840 NF_IP6_PRI_FILTER = 0, 62841 NF_IP6_PRI_SECURITY = 50, 62842 NF_IP6_PRI_NAT_SRC = 100, 62843 NF_IP6_PRI_SELINUX_LAST = 225, 62844 NF_IP6_PRI_CONNTRACK_HELPER = 300, 62845 NF_IP6_PRI_LAST = 2147483647, 62846 }; 62847 62848 struct socket_alloc { 62849 struct socket socket; 62850 struct inode vfs_inode; 62851 long: 64; 62852 long: 64; 62853 long: 64; 62854 long: 64; 62855 long: 64; 62856 }; 62857 62858 struct ip_options { 62859 __be32 faddr; 62860 __be32 nexthop; 62861 unsigned char optlen; 62862 unsigned char srr; 62863 unsigned char rr; 62864 unsigned char ts; 62865 unsigned char is_strictroute: 1; 62866 unsigned char srr_is_hit: 1; 62867 unsigned char is_changed: 1; 62868 unsigned char rr_needaddr: 1; 62869 unsigned char ts_needtime: 1; 62870 unsigned char ts_needaddr: 1; 62871 unsigned char router_alert; 62872 unsigned char cipso; 62873 unsigned char __pad2; 62874 unsigned char __data[0]; 62875 }; 62876 62877 struct ip_options_rcu { 62878 struct callback_head rcu; 62879 struct ip_options opt; 62880 }; 62881 62882 struct ipv6_opt_hdr; 62883 62884 struct ipv6_rt_hdr; 62885 62886 struct ipv6_txoptions { 62887 refcount_t refcnt; 62888 int tot_len; 62889 __u16 opt_flen; 62890 __u16 opt_nflen; 62891 struct ipv6_opt_hdr *hopopt; 62892 struct ipv6_opt_hdr *dst0opt; 62893 struct ipv6_rt_hdr *srcrt; 62894 struct ipv6_opt_hdr *dst1opt; 62895 struct callback_head rcu; 62896 }; 62897 62898 struct inet_cork { 62899 unsigned int flags; 62900 __be32 addr; 62901 struct ip_options *opt; 62902 unsigned int fragsize; 62903 int length; 62904 struct dst_entry *dst; 62905 u8 tx_flags; 62906 __u8 ttl; 62907 __s16 tos; 62908 char priority; 62909 __u16 gso_size; 62910 u64 transmit_time; 62911 u32 mark; 62912 }; 62913 62914 struct inet_cork_full { 62915 struct inet_cork base; 62916 struct flowi fl; 62917 }; 62918 62919 struct ipv6_pinfo; 62920 62921 struct ip_mc_socklist; 62922 62923 struct inet_sock { 62924 struct sock sk; 62925 struct ipv6_pinfo *pinet6; 62926 __be32 inet_saddr; 62927 __s16 uc_ttl; 62928 __u16 cmsg_flags; 62929 __be16 inet_sport; 62930 __u16 inet_id; 62931 struct ip_options_rcu *inet_opt; 62932 int rx_dst_ifindex; 62933 __u8 tos; 62934 __u8 min_ttl; 62935 __u8 mc_ttl; 62936 __u8 pmtudisc; 62937 __u8 recverr: 1; 62938 __u8 is_icsk: 1; 62939 __u8 freebind: 1; 62940 __u8 hdrincl: 1; 62941 __u8 mc_loop: 1; 62942 __u8 transparent: 1; 62943 __u8 mc_all: 1; 62944 __u8 nodefrag: 1; 62945 __u8 bind_address_no_port: 1; 62946 __u8 recverr_rfc4884: 1; 62947 __u8 defer_connect: 1; 62948 __u8 rcv_tos; 62949 __u8 convert_csum; 62950 int uc_index; 62951 int mc_index; 62952 __be32 mc_addr; 62953 struct ip_mc_socklist *mc_list; 62954 struct inet_cork_full cork; 62955 }; 62956 62957 struct in6_pktinfo { 62958 struct in6_addr ipi6_addr; 62959 int ipi6_ifindex; 62960 }; 62961 62962 struct inet6_cork { 62963 struct ipv6_txoptions *opt; 62964 u8 hop_limit; 62965 u8 tclass; 62966 }; 62967 62968 struct ipv6_mc_socklist; 62969 62970 struct ipv6_ac_socklist; 62971 62972 struct ipv6_fl_socklist; 62973 62974 struct ipv6_pinfo { 62975 struct in6_addr saddr; 62976 struct in6_pktinfo sticky_pktinfo; 62977 const struct in6_addr *daddr_cache; 62978 const struct in6_addr *saddr_cache; 62979 __be32 flow_label; 62980 __u32 frag_size; 62981 __u16 __unused_1: 7; 62982 __s16 hop_limit: 9; 62983 __u16 mc_loop: 1; 62984 __u16 __unused_2: 6; 62985 __s16 mcast_hops: 9; 62986 int ucast_oif; 62987 int mcast_oif; 62988 union { 62989 struct { 62990 __u16 srcrt: 1; 62991 __u16 osrcrt: 1; 62992 __u16 rxinfo: 1; 62993 __u16 rxoinfo: 1; 62994 __u16 rxhlim: 1; 62995 __u16 rxohlim: 1; 62996 __u16 hopopts: 1; 62997 __u16 ohopopts: 1; 62998 __u16 dstopts: 1; 62999 __u16 odstopts: 1; 63000 __u16 rxflow: 1; 63001 __u16 rxtclass: 1; 63002 __u16 rxpmtu: 1; 63003 __u16 rxorigdstaddr: 1; 63004 __u16 recvfragsize: 1; 63005 } bits; 63006 __u16 all; 63007 } rxopt; 63008 __u16 recverr: 1; 63009 __u16 sndflow: 1; 63010 __u16 repflow: 1; 63011 __u16 pmtudisc: 3; 63012 __u16 padding: 1; 63013 __u16 srcprefs: 3; 63014 __u16 dontfrag: 1; 63015 __u16 autoflowlabel: 1; 63016 __u16 autoflowlabel_set: 1; 63017 __u16 mc_all: 1; 63018 __u16 recverr_rfc4884: 1; 63019 __u16 rtalert_isolate: 1; 63020 __u8 min_hopcount; 63021 __u8 tclass; 63022 __be32 rcv_flowinfo; 63023 __u32 dst_cookie; 63024 __u32 rx_dst_cookie; 63025 struct ipv6_mc_socklist *ipv6_mc_list; 63026 struct ipv6_ac_socklist *ipv6_ac_list; 63027 struct ipv6_fl_socklist *ipv6_fl_list; 63028 struct ipv6_txoptions *opt; 63029 struct sk_buff *pktoptions; 63030 struct sk_buff *rxpmtu; 63031 struct inet6_cork cork; 63032 }; 63033 63034 struct tcphdr { 63035 __be16 source; 63036 __be16 dest; 63037 __be32 seq; 63038 __be32 ack_seq; 63039 __u16 res1: 4; 63040 __u16 doff: 4; 63041 __u16 fin: 1; 63042 __u16 syn: 1; 63043 __u16 rst: 1; 63044 __u16 psh: 1; 63045 __u16 ack: 1; 63046 __u16 urg: 1; 63047 __u16 ece: 1; 63048 __u16 cwr: 1; 63049 __be16 window; 63050 __sum16 check; 63051 __be16 urg_ptr; 63052 }; 63053 63054 struct iphdr { 63055 __u8 ihl: 4; 63056 __u8 version: 4; 63057 __u8 tos; 63058 __be16 tot_len; 63059 __be16 id; 63060 __be16 frag_off; 63061 __u8 ttl; 63062 __u8 protocol; 63063 __sum16 check; 63064 __be32 saddr; 63065 __be32 daddr; 63066 }; 63067 63068 struct ipv6_rt_hdr { 63069 __u8 nexthdr; 63070 __u8 hdrlen; 63071 __u8 type; 63072 __u8 segments_left; 63073 }; 63074 63075 struct ipv6_opt_hdr { 63076 __u8 nexthdr; 63077 __u8 hdrlen; 63078 }; 63079 63080 struct ipv6hdr { 63081 __u8 priority: 4; 63082 __u8 version: 4; 63083 __u8 flow_lbl[3]; 63084 __be16 payload_len; 63085 __u8 nexthdr; 63086 __u8 hop_limit; 63087 struct in6_addr saddr; 63088 struct in6_addr daddr; 63089 }; 63090 63091 struct udphdr { 63092 __be16 source; 63093 __be16 dest; 63094 __be16 len; 63095 __sum16 check; 63096 }; 63097 63098 struct inet6_skb_parm { 63099 int iif; 63100 __be16 ra; 63101 __u16 dst0; 63102 __u16 srcrt; 63103 __u16 dst1; 63104 __u16 lastopt; 63105 __u16 nhoff; 63106 __u16 flags; 63107 __u16 dsthao; 63108 __u16 frag_max_size; 63109 }; 63110 63111 struct ip6_sf_socklist; 63112 63113 struct ipv6_mc_socklist { 63114 struct in6_addr addr; 63115 int ifindex; 63116 unsigned int sfmode; 63117 struct ipv6_mc_socklist *next; 63118 rwlock_t sflock; 63119 struct ip6_sf_socklist *sflist; 63120 struct callback_head rcu; 63121 }; 63122 63123 struct ipv6_ac_socklist { 63124 struct in6_addr acl_addr; 63125 int acl_ifindex; 63126 struct ipv6_ac_socklist *acl_next; 63127 }; 63128 63129 struct ip6_flowlabel; 63130 63131 struct ipv6_fl_socklist { 63132 struct ipv6_fl_socklist *next; 63133 struct ip6_flowlabel *fl; 63134 struct callback_head rcu; 63135 }; 63136 63137 struct ip6_sf_socklist { 63138 unsigned int sl_max; 63139 unsigned int sl_count; 63140 struct in6_addr sl_addr[0]; 63141 }; 63142 63143 struct ip6_flowlabel { 63144 struct ip6_flowlabel *next; 63145 __be32 label; 63146 atomic_t users; 63147 struct in6_addr dst; 63148 struct ipv6_txoptions *opt; 63149 long unsigned int linger; 63150 struct callback_head rcu; 63151 u8 share; 63152 union { 63153 struct pid *pid; 63154 kuid_t uid; 63155 } owner; 63156 long unsigned int lastuse; 63157 long unsigned int expires; 63158 struct net *fl_net; 63159 }; 63160 63161 struct inet_skb_parm { 63162 int iif; 63163 struct ip_options opt; 63164 u16 flags; 63165 u16 frag_max_size; 63166 }; 63167 63168 struct tty_file_private { 63169 struct tty_struct *tty; 63170 struct file *file; 63171 struct list_head list; 63172 }; 63173 63174 struct netlbl_lsm_cache { 63175 refcount_t refcount; 63176 void (*free)(const void *); 63177 void *data; 63178 }; 63179 63180 struct netlbl_lsm_catmap { 63181 u32 startbit; 63182 u64 bitmap[4]; 63183 struct netlbl_lsm_catmap *next; 63184 }; 63185 63186 struct netlbl_lsm_secattr { 63187 u32 flags; 63188 u32 type; 63189 char *domain; 63190 struct netlbl_lsm_cache *cache; 63191 struct { 63192 struct { 63193 struct netlbl_lsm_catmap *cat; 63194 u32 lvl; 63195 } mls; 63196 u32 secid; 63197 } attr; 63198 }; 63199 63200 struct dccp_hdr { 63201 __be16 dccph_sport; 63202 __be16 dccph_dport; 63203 __u8 dccph_doff; 63204 __u8 dccph_cscov: 4; 63205 __u8 dccph_ccval: 4; 63206 __sum16 dccph_checksum; 63207 __u8 dccph_x: 1; 63208 __u8 dccph_type: 4; 63209 __u8 dccph_reserved: 3; 63210 __u8 dccph_seq2; 63211 __be16 dccph_seq; 63212 }; 63213 63214 enum dccp_state { 63215 DCCP_OPEN = 1, 63216 DCCP_REQUESTING = 2, 63217 DCCP_LISTEN = 10, 63218 DCCP_RESPOND = 3, 63219 DCCP_ACTIVE_CLOSEREQ = 4, 63220 DCCP_PASSIVE_CLOSE = 8, 63221 DCCP_CLOSING = 11, 63222 DCCP_TIME_WAIT = 6, 63223 DCCP_CLOSED = 7, 63224 DCCP_NEW_SYN_RECV = 12, 63225 DCCP_PARTOPEN = 13, 63226 DCCP_PASSIVE_CLOSEREQ = 14, 63227 DCCP_MAX_STATES = 15, 63228 }; 63229 63230 typedef __s32 sctp_assoc_t; 63231 63232 enum sctp_msg_flags { 63233 MSG_NOTIFICATION = 32768, 63234 }; 63235 63236 struct sctp_initmsg { 63237 __u16 sinit_num_ostreams; 63238 __u16 sinit_max_instreams; 63239 __u16 sinit_max_attempts; 63240 __u16 sinit_max_init_timeo; 63241 }; 63242 63243 struct sctp_sndrcvinfo { 63244 __u16 sinfo_stream; 63245 __u16 sinfo_ssn; 63246 __u16 sinfo_flags; 63247 __u32 sinfo_ppid; 63248 __u32 sinfo_context; 63249 __u32 sinfo_timetolive; 63250 __u32 sinfo_tsn; 63251 __u32 sinfo_cumtsn; 63252 sctp_assoc_t sinfo_assoc_id; 63253 }; 63254 63255 struct sctp_rtoinfo { 63256 sctp_assoc_t srto_assoc_id; 63257 __u32 srto_initial; 63258 __u32 srto_max; 63259 __u32 srto_min; 63260 }; 63261 63262 struct sctp_assocparams { 63263 sctp_assoc_t sasoc_assoc_id; 63264 __u16 sasoc_asocmaxrxt; 63265 __u16 sasoc_number_peer_destinations; 63266 __u32 sasoc_peer_rwnd; 63267 __u32 sasoc_local_rwnd; 63268 __u32 sasoc_cookie_life; 63269 }; 63270 63271 struct sctp_paddrparams { 63272 sctp_assoc_t spp_assoc_id; 63273 struct __kernel_sockaddr_storage spp_address; 63274 __u32 spp_hbinterval; 63275 __u16 spp_pathmaxrxt; 63276 __u32 spp_pathmtu; 63277 __u32 spp_sackdelay; 63278 __u32 spp_flags; 63279 __u32 spp_ipv6_flowlabel; 63280 __u8 spp_dscp; 63281 char: 8; 63282 } __attribute__((packed)); 63283 63284 struct sctphdr { 63285 __be16 source; 63286 __be16 dest; 63287 __be32 vtag; 63288 __le32 checksum; 63289 }; 63290 63291 struct sctp_chunkhdr { 63292 __u8 type; 63293 __u8 flags; 63294 __be16 length; 63295 }; 63296 63297 enum sctp_cid { 63298 SCTP_CID_DATA = 0, 63299 SCTP_CID_INIT = 1, 63300 SCTP_CID_INIT_ACK = 2, 63301 SCTP_CID_SACK = 3, 63302 SCTP_CID_HEARTBEAT = 4, 63303 SCTP_CID_HEARTBEAT_ACK = 5, 63304 SCTP_CID_ABORT = 6, 63305 SCTP_CID_SHUTDOWN = 7, 63306 SCTP_CID_SHUTDOWN_ACK = 8, 63307 SCTP_CID_ERROR = 9, 63308 SCTP_CID_COOKIE_ECHO = 10, 63309 SCTP_CID_COOKIE_ACK = 11, 63310 SCTP_CID_ECN_ECNE = 12, 63311 SCTP_CID_ECN_CWR = 13, 63312 SCTP_CID_SHUTDOWN_COMPLETE = 14, 63313 SCTP_CID_AUTH = 15, 63314 SCTP_CID_I_DATA = 64, 63315 SCTP_CID_FWD_TSN = 192, 63316 SCTP_CID_ASCONF = 193, 63317 SCTP_CID_I_FWD_TSN = 194, 63318 SCTP_CID_ASCONF_ACK = 128, 63319 SCTP_CID_RECONF = 130, 63320 }; 63321 63322 struct sctp_paramhdr { 63323 __be16 type; 63324 __be16 length; 63325 }; 63326 63327 enum sctp_param { 63328 SCTP_PARAM_HEARTBEAT_INFO = 256, 63329 SCTP_PARAM_IPV4_ADDRESS = 1280, 63330 SCTP_PARAM_IPV6_ADDRESS = 1536, 63331 SCTP_PARAM_STATE_COOKIE = 1792, 63332 SCTP_PARAM_UNRECOGNIZED_PARAMETERS = 2048, 63333 SCTP_PARAM_COOKIE_PRESERVATIVE = 2304, 63334 SCTP_PARAM_HOST_NAME_ADDRESS = 2816, 63335 SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = 3072, 63336 SCTP_PARAM_ECN_CAPABLE = 128, 63337 SCTP_PARAM_RANDOM = 640, 63338 SCTP_PARAM_CHUNKS = 896, 63339 SCTP_PARAM_HMAC_ALGO = 1152, 63340 SCTP_PARAM_SUPPORTED_EXT = 2176, 63341 SCTP_PARAM_FWD_TSN_SUPPORT = 192, 63342 SCTP_PARAM_ADD_IP = 448, 63343 SCTP_PARAM_DEL_IP = 704, 63344 SCTP_PARAM_ERR_CAUSE = 960, 63345 SCTP_PARAM_SET_PRIMARY = 1216, 63346 SCTP_PARAM_SUCCESS_REPORT = 1472, 63347 SCTP_PARAM_ADAPTATION_LAYER_IND = 1728, 63348 SCTP_PARAM_RESET_OUT_REQUEST = 3328, 63349 SCTP_PARAM_RESET_IN_REQUEST = 3584, 63350 SCTP_PARAM_RESET_TSN_REQUEST = 3840, 63351 SCTP_PARAM_RESET_RESPONSE = 4096, 63352 SCTP_PARAM_RESET_ADD_OUT_STREAMS = 4352, 63353 SCTP_PARAM_RESET_ADD_IN_STREAMS = 4608, 63354 }; 63355 63356 struct sctp_datahdr { 63357 __be32 tsn; 63358 __be16 stream; 63359 __be16 ssn; 63360 __u32 ppid; 63361 __u8 payload[0]; 63362 }; 63363 63364 struct sctp_idatahdr { 63365 __be32 tsn; 63366 __be16 stream; 63367 __be16 reserved; 63368 __be32 mid; 63369 union { 63370 __u32 ppid; 63371 __be32 fsn; 63372 }; 63373 __u8 payload[0]; 63374 }; 63375 63376 struct sctp_inithdr { 63377 __be32 init_tag; 63378 __be32 a_rwnd; 63379 __be16 num_outbound_streams; 63380 __be16 num_inbound_streams; 63381 __be32 initial_tsn; 63382 __u8 params[0]; 63383 }; 63384 63385 struct sctp_init_chunk { 63386 struct sctp_chunkhdr chunk_hdr; 63387 struct sctp_inithdr init_hdr; 63388 }; 63389 63390 struct sctp_ipv4addr_param { 63391 struct sctp_paramhdr param_hdr; 63392 struct in_addr addr; 63393 }; 63394 63395 struct sctp_ipv6addr_param { 63396 struct sctp_paramhdr param_hdr; 63397 struct in6_addr addr; 63398 }; 63399 63400 struct sctp_cookie_preserve_param { 63401 struct sctp_paramhdr param_hdr; 63402 __be32 lifespan_increment; 63403 }; 63404 63405 struct sctp_hostname_param { 63406 struct sctp_paramhdr param_hdr; 63407 uint8_t hostname[0]; 63408 }; 63409 63410 struct sctp_supported_addrs_param { 63411 struct sctp_paramhdr param_hdr; 63412 __be16 types[0]; 63413 }; 63414 63415 struct sctp_adaptation_ind_param { 63416 struct sctp_paramhdr param_hdr; 63417 __be32 adaptation_ind; 63418 }; 63419 63420 struct sctp_supported_ext_param { 63421 struct sctp_paramhdr param_hdr; 63422 __u8 chunks[0]; 63423 }; 63424 63425 struct sctp_random_param { 63426 struct sctp_paramhdr param_hdr; 63427 __u8 random_val[0]; 63428 }; 63429 63430 struct sctp_chunks_param { 63431 struct sctp_paramhdr param_hdr; 63432 __u8 chunks[0]; 63433 }; 63434 63435 struct sctp_hmac_algo_param { 63436 struct sctp_paramhdr param_hdr; 63437 __be16 hmac_ids[0]; 63438 }; 63439 63440 struct sctp_cookie_param { 63441 struct sctp_paramhdr p; 63442 __u8 body[0]; 63443 }; 63444 63445 struct sctp_gap_ack_block { 63446 __be16 start; 63447 __be16 end; 63448 }; 63449 63450 union sctp_sack_variable { 63451 struct sctp_gap_ack_block gab; 63452 __be32 dup; 63453 }; 63454 63455 struct sctp_sackhdr { 63456 __be32 cum_tsn_ack; 63457 __be32 a_rwnd; 63458 __be16 num_gap_ack_blocks; 63459 __be16 num_dup_tsns; 63460 union sctp_sack_variable variable[0]; 63461 }; 63462 63463 struct sctp_heartbeathdr { 63464 struct sctp_paramhdr info; 63465 }; 63466 63467 struct sctp_shutdownhdr { 63468 __be32 cum_tsn_ack; 63469 }; 63470 63471 struct sctp_errhdr { 63472 __be16 cause; 63473 __be16 length; 63474 __u8 variable[0]; 63475 }; 63476 63477 struct sctp_ecnehdr { 63478 __be32 lowest_tsn; 63479 }; 63480 63481 struct sctp_cwrhdr { 63482 __be32 lowest_tsn; 63483 }; 63484 63485 struct sctp_fwdtsn_skip { 63486 __be16 stream; 63487 __be16 ssn; 63488 }; 63489 63490 struct sctp_fwdtsn_hdr { 63491 __be32 new_cum_tsn; 63492 struct sctp_fwdtsn_skip skip[0]; 63493 }; 63494 63495 struct sctp_ifwdtsn_skip { 63496 __be16 stream; 63497 __u8 reserved; 63498 __u8 flags; 63499 __be32 mid; 63500 }; 63501 63502 struct sctp_ifwdtsn_hdr { 63503 __be32 new_cum_tsn; 63504 struct sctp_ifwdtsn_skip skip[0]; 63505 }; 63506 63507 struct sctp_addip_param { 63508 struct sctp_paramhdr param_hdr; 63509 __be32 crr_id; 63510 }; 63511 63512 struct sctp_addiphdr { 63513 __be32 serial; 63514 __u8 params[0]; 63515 }; 63516 63517 struct sctp_authhdr { 63518 __be16 shkey_id; 63519 __be16 hmac_id; 63520 __u8 hmac[0]; 63521 }; 63522 63523 union sctp_addr { 63524 struct sockaddr_in v4; 63525 struct sockaddr_in6 v6; 63526 struct sockaddr sa; 63527 }; 63528 63529 struct sctp_cookie { 63530 __u32 my_vtag; 63531 __u32 peer_vtag; 63532 __u32 my_ttag; 63533 __u32 peer_ttag; 63534 ktime_t expiration; 63535 __u16 sinit_num_ostreams; 63536 __u16 sinit_max_instreams; 63537 __u32 initial_tsn; 63538 union sctp_addr peer_addr; 63539 __u16 my_port; 63540 __u8 prsctp_capable; 63541 __u8 padding; 63542 __u32 adaptation_ind; 63543 __u8 auth_random[36]; 63544 __u8 auth_hmacs[10]; 63545 __u8 auth_chunks[20]; 63546 __u32 raw_addr_list_len; 63547 struct sctp_init_chunk peer_init[0]; 63548 }; 63549 63550 struct sctp_tsnmap { 63551 long unsigned int *tsn_map; 63552 __u32 base_tsn; 63553 __u32 cumulative_tsn_ack_point; 63554 __u32 max_tsn_seen; 63555 __u16 len; 63556 __u16 pending_data; 63557 __u16 num_dup_tsns; 63558 __be32 dup_tsns[16]; 63559 }; 63560 63561 struct sctp_inithdr_host { 63562 __u32 init_tag; 63563 __u32 a_rwnd; 63564 __u16 num_outbound_streams; 63565 __u16 num_inbound_streams; 63566 __u32 initial_tsn; 63567 }; 63568 63569 enum sctp_state { 63570 SCTP_STATE_CLOSED = 0, 63571 SCTP_STATE_COOKIE_WAIT = 1, 63572 SCTP_STATE_COOKIE_ECHOED = 2, 63573 SCTP_STATE_ESTABLISHED = 3, 63574 SCTP_STATE_SHUTDOWN_PENDING = 4, 63575 SCTP_STATE_SHUTDOWN_SENT = 5, 63576 SCTP_STATE_SHUTDOWN_RECEIVED = 6, 63577 SCTP_STATE_SHUTDOWN_ACK_SENT = 7, 63578 }; 63579 63580 struct sctp_stream_out_ext; 63581 63582 struct sctp_stream_out { 63583 union { 63584 __u32 mid; 63585 __u16 ssn; 63586 }; 63587 __u32 mid_uo; 63588 struct sctp_stream_out_ext *ext; 63589 __u8 state; 63590 }; 63591 63592 struct sctp_stream_in { 63593 union { 63594 __u32 mid; 63595 __u16 ssn; 63596 }; 63597 __u32 mid_uo; 63598 __u32 fsn; 63599 __u32 fsn_uo; 63600 char pd_mode; 63601 char pd_mode_uo; 63602 }; 63603 63604 struct sctp_stream_interleave; 63605 63606 struct sctp_stream { 63607 struct { 63608 struct __genradix tree; 63609 struct sctp_stream_out type[0]; 63610 } out; 63611 struct { 63612 struct __genradix tree; 63613 struct sctp_stream_in type[0]; 63614 } in; 63615 __u16 outcnt; 63616 __u16 incnt; 63617 struct sctp_stream_out *out_curr; 63618 union { 63619 struct { 63620 struct list_head prio_list; 63621 }; 63622 struct { 63623 struct list_head rr_list; 63624 struct sctp_stream_out_ext *rr_next; 63625 }; 63626 }; 63627 struct sctp_stream_interleave *si; 63628 }; 63629 63630 struct sctp_sched_ops; 63631 63632 struct sctp_association; 63633 63634 struct sctp_outq { 63635 struct sctp_association *asoc; 63636 struct list_head out_chunk_list; 63637 struct sctp_sched_ops *sched; 63638 unsigned int out_qlen; 63639 unsigned int error; 63640 struct list_head control_chunk_list; 63641 struct list_head sacked; 63642 struct list_head retransmit; 63643 struct list_head abandoned; 63644 __u32 outstanding_bytes; 63645 char fast_rtx; 63646 char cork; 63647 }; 63648 63649 struct sctp_ulpq { 63650 char pd_mode; 63651 struct sctp_association *asoc; 63652 struct sk_buff_head reasm; 63653 struct sk_buff_head reasm_uo; 63654 struct sk_buff_head lobby; 63655 }; 63656 63657 struct sctp_priv_assoc_stats { 63658 struct __kernel_sockaddr_storage obs_rto_ipaddr; 63659 __u64 max_obs_rto; 63660 __u64 isacks; 63661 __u64 osacks; 63662 __u64 opackets; 63663 __u64 ipackets; 63664 __u64 rtxchunks; 63665 __u64 outofseqtsns; 63666 __u64 idupchunks; 63667 __u64 gapcnt; 63668 __u64 ouodchunks; 63669 __u64 iuodchunks; 63670 __u64 oodchunks; 63671 __u64 iodchunks; 63672 __u64 octrlchunks; 63673 __u64 ictrlchunks; 63674 }; 63675 63676 struct sctp_transport; 63677 63678 struct sctp_auth_bytes; 63679 63680 struct sctp_shared_key; 63681 63682 struct sctp_association { 63683 struct sctp_ep_common base; 63684 struct list_head asocs; 63685 sctp_assoc_t assoc_id; 63686 struct sctp_endpoint *ep; 63687 struct sctp_cookie c; 63688 struct { 63689 struct list_head transport_addr_list; 63690 __u32 rwnd; 63691 __u16 transport_count; 63692 __u16 port; 63693 struct sctp_transport *primary_path; 63694 union sctp_addr primary_addr; 63695 struct sctp_transport *active_path; 63696 struct sctp_transport *retran_path; 63697 struct sctp_transport *last_sent_to; 63698 struct sctp_transport *last_data_from; 63699 struct sctp_tsnmap tsn_map; 63700 __be16 addip_disabled_mask; 63701 __u16 ecn_capable: 1; 63702 __u16 ipv4_address: 1; 63703 __u16 ipv6_address: 1; 63704 __u16 hostname_address: 1; 63705 __u16 asconf_capable: 1; 63706 __u16 prsctp_capable: 1; 63707 __u16 reconf_capable: 1; 63708 __u16 intl_capable: 1; 63709 __u16 auth_capable: 1; 63710 __u16 sack_needed: 1; 63711 __u16 sack_generation: 1; 63712 __u16 zero_window_announced: 1; 63713 __u32 sack_cnt; 63714 __u32 adaptation_ind; 63715 struct sctp_inithdr_host i; 63716 void *cookie; 63717 int cookie_len; 63718 __u32 addip_serial; 63719 struct sctp_random_param *peer_random; 63720 struct sctp_chunks_param *peer_chunks; 63721 struct sctp_hmac_algo_param *peer_hmacs; 63722 } peer; 63723 enum sctp_state state; 63724 int overall_error_count; 63725 ktime_t cookie_life; 63726 long unsigned int rto_initial; 63727 long unsigned int rto_max; 63728 long unsigned int rto_min; 63729 int max_burst; 63730 int max_retrans; 63731 __u16 pf_retrans; 63732 __u16 ps_retrans; 63733 __u16 max_init_attempts; 63734 __u16 init_retries; 63735 long unsigned int max_init_timeo; 63736 long unsigned int hbinterval; 63737 __be16 encap_port; 63738 __u16 pathmaxrxt; 63739 __u32 flowlabel; 63740 __u8 dscp; 63741 __u8 pmtu_pending; 63742 __u32 pathmtu; 63743 __u32 param_flags; 63744 __u32 sackfreq; 63745 long unsigned int sackdelay; 63746 long unsigned int timeouts[11]; 63747 struct timer_list timers[11]; 63748 struct sctp_transport *shutdown_last_sent_to; 63749 struct sctp_transport *init_last_sent_to; 63750 int shutdown_retries; 63751 __u32 next_tsn; 63752 __u32 ctsn_ack_point; 63753 __u32 adv_peer_ack_point; 63754 __u32 highest_sacked; 63755 __u32 fast_recovery_exit; 63756 __u8 fast_recovery; 63757 __u16 unack_data; 63758 __u32 rtx_data_chunks; 63759 __u32 rwnd; 63760 __u32 a_rwnd; 63761 __u32 rwnd_over; 63762 __u32 rwnd_press; 63763 int sndbuf_used; 63764 atomic_t rmem_alloc; 63765 wait_queue_head_t wait; 63766 __u32 frag_point; 63767 __u32 user_frag; 63768 int init_err_counter; 63769 int init_cycle; 63770 __u16 default_stream; 63771 __u16 default_flags; 63772 __u32 default_ppid; 63773 __u32 default_context; 63774 __u32 default_timetolive; 63775 __u32 default_rcv_context; 63776 struct sctp_stream stream; 63777 struct sctp_outq outqueue; 63778 struct sctp_ulpq ulpq; 63779 __u32 last_ecne_tsn; 63780 __u32 last_cwr_tsn; 63781 int numduptsns; 63782 struct sctp_chunk *addip_last_asconf; 63783 struct list_head asconf_ack_list; 63784 struct list_head addip_chunk_list; 63785 __u32 addip_serial; 63786 int src_out_of_asoc_ok; 63787 union sctp_addr *asconf_addr_del_pending; 63788 struct sctp_transport *new_transport; 63789 struct list_head endpoint_shared_keys; 63790 struct sctp_auth_bytes *asoc_shared_key; 63791 struct sctp_shared_key *shkey; 63792 __u16 default_hmac_id; 63793 __u16 active_key_id; 63794 __u8 need_ecne: 1; 63795 __u8 temp: 1; 63796 __u8 pf_expose: 2; 63797 __u8 force_delay: 1; 63798 __u8 strreset_enable; 63799 __u8 strreset_outstanding; 63800 __u32 strreset_outseq; 63801 __u32 strreset_inseq; 63802 __u32 strreset_result[2]; 63803 struct sctp_chunk *strreset_chunk; 63804 struct sctp_priv_assoc_stats stats; 63805 int sent_cnt_removable; 63806 __u16 subscribe; 63807 __u64 abandoned_unsent[3]; 63808 __u64 abandoned_sent[3]; 63809 struct callback_head rcu; 63810 }; 63811 63812 struct sctp_auth_bytes { 63813 refcount_t refcnt; 63814 __u32 len; 63815 __u8 data[0]; 63816 }; 63817 63818 struct sctp_shared_key { 63819 struct list_head key_list; 63820 struct sctp_auth_bytes *key; 63821 refcount_t refcnt; 63822 __u16 key_id; 63823 __u8 deactivated; 63824 }; 63825 63826 enum { 63827 SCTP_MAX_STREAM = 65535, 63828 }; 63829 63830 enum sctp_event_timeout { 63831 SCTP_EVENT_TIMEOUT_NONE = 0, 63832 SCTP_EVENT_TIMEOUT_T1_COOKIE = 1, 63833 SCTP_EVENT_TIMEOUT_T1_INIT = 2, 63834 SCTP_EVENT_TIMEOUT_T2_SHUTDOWN = 3, 63835 SCTP_EVENT_TIMEOUT_T3_RTX = 4, 63836 SCTP_EVENT_TIMEOUT_T4_RTO = 5, 63837 SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD = 6, 63838 SCTP_EVENT_TIMEOUT_HEARTBEAT = 7, 63839 SCTP_EVENT_TIMEOUT_RECONF = 8, 63840 SCTP_EVENT_TIMEOUT_SACK = 9, 63841 SCTP_EVENT_TIMEOUT_AUTOCLOSE = 10, 63842 }; 63843 63844 enum { 63845 SCTP_MAX_DUP_TSNS = 16, 63846 }; 63847 63848 enum sctp_scope { 63849 SCTP_SCOPE_GLOBAL = 0, 63850 SCTP_SCOPE_PRIVATE = 1, 63851 SCTP_SCOPE_LINK = 2, 63852 SCTP_SCOPE_LOOPBACK = 3, 63853 SCTP_SCOPE_UNUSABLE = 4, 63854 }; 63855 63856 enum { 63857 SCTP_AUTH_HMAC_ID_RESERVED_0 = 0, 63858 SCTP_AUTH_HMAC_ID_SHA1 = 1, 63859 SCTP_AUTH_HMAC_ID_RESERVED_2 = 2, 63860 SCTP_AUTH_HMAC_ID_SHA256 = 3, 63861 __SCTP_AUTH_HMAC_MAX = 4, 63862 }; 63863 63864 struct sctp_ulpevent { 63865 struct sctp_association *asoc; 63866 struct sctp_chunk *chunk; 63867 unsigned int rmem_len; 63868 union { 63869 __u32 mid; 63870 __u16 ssn; 63871 }; 63872 union { 63873 __u32 ppid; 63874 __u32 fsn; 63875 }; 63876 __u32 tsn; 63877 __u32 cumtsn; 63878 __u16 stream; 63879 __u16 flags; 63880 __u16 msg_flags; 63881 } __attribute__((packed)); 63882 63883 union sctp_addr_param; 63884 63885 union sctp_params { 63886 void *v; 63887 struct sctp_paramhdr *p; 63888 struct sctp_cookie_preserve_param *life; 63889 struct sctp_hostname_param *dns; 63890 struct sctp_cookie_param *cookie; 63891 struct sctp_supported_addrs_param *sat; 63892 struct sctp_ipv4addr_param *v4; 63893 struct sctp_ipv6addr_param *v6; 63894 union sctp_addr_param *addr; 63895 struct sctp_adaptation_ind_param *aind; 63896 struct sctp_supported_ext_param *ext; 63897 struct sctp_random_param *random; 63898 struct sctp_chunks_param *chunks; 63899 struct sctp_hmac_algo_param *hmac_algo; 63900 struct sctp_addip_param *addip; 63901 }; 63902 63903 struct sctp_sender_hb_info; 63904 63905 struct sctp_signed_cookie; 63906 63907 struct sctp_datamsg; 63908 63909 struct sctp_chunk { 63910 struct list_head list; 63911 refcount_t refcnt; 63912 int sent_count; 63913 union { 63914 struct list_head transmitted_list; 63915 struct list_head stream_list; 63916 }; 63917 struct list_head frag_list; 63918 struct sk_buff *skb; 63919 union { 63920 struct sk_buff *head_skb; 63921 struct sctp_shared_key *shkey; 63922 }; 63923 union sctp_params param_hdr; 63924 union { 63925 __u8 *v; 63926 struct sctp_datahdr *data_hdr; 63927 struct sctp_inithdr *init_hdr; 63928 struct sctp_sackhdr *sack_hdr; 63929 struct sctp_heartbeathdr *hb_hdr; 63930 struct sctp_sender_hb_info *hbs_hdr; 63931 struct sctp_shutdownhdr *shutdown_hdr; 63932 struct sctp_signed_cookie *cookie_hdr; 63933 struct sctp_ecnehdr *ecne_hdr; 63934 struct sctp_cwrhdr *ecn_cwr_hdr; 63935 struct sctp_errhdr *err_hdr; 63936 struct sctp_addiphdr *addip_hdr; 63937 struct sctp_fwdtsn_hdr *fwdtsn_hdr; 63938 struct sctp_authhdr *auth_hdr; 63939 struct sctp_idatahdr *idata_hdr; 63940 struct sctp_ifwdtsn_hdr *ifwdtsn_hdr; 63941 } subh; 63942 __u8 *chunk_end; 63943 struct sctp_chunkhdr *chunk_hdr; 63944 struct sctphdr *sctp_hdr; 63945 struct sctp_sndrcvinfo sinfo; 63946 struct sctp_association *asoc; 63947 struct sctp_ep_common *rcvr; 63948 long unsigned int sent_at; 63949 union sctp_addr source; 63950 union sctp_addr dest; 63951 struct sctp_datamsg *msg; 63952 struct sctp_transport *transport; 63953 struct sk_buff *auth_chunk; 63954 __u16 rtt_in_progress: 1; 63955 __u16 has_tsn: 1; 63956 __u16 has_ssn: 1; 63957 __u16 singleton: 1; 63958 __u16 end_of_packet: 1; 63959 __u16 ecn_ce_done: 1; 63960 __u16 pdiscard: 1; 63961 __u16 tsn_gap_acked: 1; 63962 __u16 data_accepted: 1; 63963 __u16 auth: 1; 63964 __u16 has_asconf: 1; 63965 __u16 tsn_missing_report: 2; 63966 __u16 fast_retransmit: 2; 63967 }; 63968 63969 struct sctp_stream_interleave { 63970 __u16 data_chunk_len; 63971 __u16 ftsn_chunk_len; 63972 struct sctp_chunk * (*make_datafrag)(const struct sctp_association *, const struct sctp_sndrcvinfo *, int, __u8, gfp_t); 63973 void (*assign_number)(struct sctp_chunk *); 63974 bool (*validate_data)(struct sctp_chunk *); 63975 int (*ulpevent_data)(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); 63976 int (*enqueue_event)(struct sctp_ulpq *, struct sctp_ulpevent *); 63977 void (*renege_events)(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); 63978 void (*start_pd)(struct sctp_ulpq *, gfp_t); 63979 void (*abort_pd)(struct sctp_ulpq *, gfp_t); 63980 void (*generate_ftsn)(struct sctp_outq *, __u32); 63981 bool (*validate_ftsn)(struct sctp_chunk *); 63982 void (*report_ftsn)(struct sctp_ulpq *, __u32); 63983 void (*handle_ftsn)(struct sctp_ulpq *, struct sctp_chunk *); 63984 }; 63985 63986 struct sctp_bind_bucket { 63987 short unsigned int port; 63988 signed char fastreuse; 63989 signed char fastreuseport; 63990 kuid_t fastuid; 63991 struct hlist_node node; 63992 struct hlist_head owner; 63993 struct net *net; 63994 }; 63995 63996 enum sctp_socket_type { 63997 SCTP_SOCKET_UDP = 0, 63998 SCTP_SOCKET_UDP_HIGH_BANDWIDTH = 1, 63999 SCTP_SOCKET_TCP = 2, 64000 }; 64001 64002 struct sctp_pf; 64003 64004 struct sctp_sock { 64005 struct inet_sock inet; 64006 enum sctp_socket_type type; 64007 struct sctp_pf *pf; 64008 struct crypto_shash *hmac; 64009 char *sctp_hmac_alg; 64010 struct sctp_endpoint *ep; 64011 struct sctp_bind_bucket *bind_hash; 64012 __u16 default_stream; 64013 __u32 default_ppid; 64014 __u16 default_flags; 64015 __u32 default_context; 64016 __u32 default_timetolive; 64017 __u32 default_rcv_context; 64018 int max_burst; 64019 __u32 hbinterval; 64020 __be16 udp_port; 64021 __be16 encap_port; 64022 __u16 pathmaxrxt; 64023 __u32 flowlabel; 64024 __u8 dscp; 64025 __u16 pf_retrans; 64026 __u16 ps_retrans; 64027 __u32 pathmtu; 64028 __u32 sackdelay; 64029 __u32 sackfreq; 64030 __u32 param_flags; 64031 __u32 default_ss; 64032 struct sctp_rtoinfo rtoinfo; 64033 struct sctp_paddrparams paddrparam; 64034 struct sctp_assocparams assocparams; 64035 __u16 subscribe; 64036 struct sctp_initmsg initmsg; 64037 int user_frag; 64038 __u32 autoclose; 64039 __u32 adaptation_ind; 64040 __u32 pd_point; 64041 __u16 nodelay: 1; 64042 __u16 pf_expose: 2; 64043 __u16 reuse: 1; 64044 __u16 disable_fragments: 1; 64045 __u16 v4mapped: 1; 64046 __u16 frag_interleave: 1; 64047 __u16 recvrcvinfo: 1; 64048 __u16 recvnxtinfo: 1; 64049 __u16 data_ready_signalled: 1; 64050 atomic_t pd_mode; 64051 struct sk_buff_head pd_lobby; 64052 struct list_head auto_asconf_list; 64053 int do_auto_asconf; 64054 }; 64055 64056 struct sctp_af; 64057 64058 struct sctp_pf { 64059 void (*event_msgname)(struct sctp_ulpevent *, char *, int *); 64060 void (*skb_msgname)(struct sk_buff *, char *, int *); 64061 int (*af_supported)(sa_family_t, struct sctp_sock *); 64062 int (*cmp_addr)(const union sctp_addr *, const union sctp_addr *, struct sctp_sock *); 64063 int (*bind_verify)(struct sctp_sock *, union sctp_addr *); 64064 int (*send_verify)(struct sctp_sock *, union sctp_addr *); 64065 int (*supported_addrs)(const struct sctp_sock *, __be16 *); 64066 struct sock * (*create_accept_sk)(struct sock *, struct sctp_association *, bool); 64067 int (*addr_to_user)(struct sctp_sock *, union sctp_addr *); 64068 void (*to_sk_saddr)(union sctp_addr *, struct sock *); 64069 void (*to_sk_daddr)(union sctp_addr *, struct sock *); 64070 void (*copy_ip_options)(struct sock *, struct sock *); 64071 struct sctp_af *af; 64072 }; 64073 64074 struct sctp_signed_cookie { 64075 __u8 signature[32]; 64076 __u32 __pad; 64077 struct sctp_cookie c; 64078 } __attribute__((packed)); 64079 64080 union sctp_addr_param { 64081 struct sctp_paramhdr p; 64082 struct sctp_ipv4addr_param v4; 64083 struct sctp_ipv6addr_param v6; 64084 }; 64085 64086 struct sctp_sender_hb_info { 64087 struct sctp_paramhdr param_hdr; 64088 union sctp_addr daddr; 64089 long unsigned int sent_at; 64090 __u64 hb_nonce; 64091 }; 64092 64093 struct sctp_af { 64094 int (*sctp_xmit)(struct sk_buff *, struct sctp_transport *); 64095 int (*setsockopt)(struct sock *, int, int, sockptr_t, unsigned int); 64096 int (*getsockopt)(struct sock *, int, int, char *, int *); 64097 void (*get_dst)(struct sctp_transport *, union sctp_addr *, struct flowi *, struct sock *); 64098 void (*get_saddr)(struct sctp_sock *, struct sctp_transport *, struct flowi *); 64099 void (*copy_addrlist)(struct list_head *, struct net_device *); 64100 int (*cmp_addr)(const union sctp_addr *, const union sctp_addr *); 64101 void (*addr_copy)(union sctp_addr *, union sctp_addr *); 64102 void (*from_skb)(union sctp_addr *, struct sk_buff *, int); 64103 void (*from_sk)(union sctp_addr *, struct sock *); 64104 void (*from_addr_param)(union sctp_addr *, union sctp_addr_param *, __be16, int); 64105 int (*to_addr_param)(const union sctp_addr *, union sctp_addr_param *); 64106 int (*addr_valid)(union sctp_addr *, struct sctp_sock *, const struct sk_buff *); 64107 enum sctp_scope (*scope)(union sctp_addr *); 64108 void (*inaddr_any)(union sctp_addr *, __be16); 64109 int (*is_any)(const union sctp_addr *); 64110 int (*available)(union sctp_addr *, struct sctp_sock *); 64111 int (*skb_iif)(const struct sk_buff *); 64112 int (*is_ce)(const struct sk_buff *); 64113 void (*seq_dump_addr)(struct seq_file *, union sctp_addr *); 64114 void (*ecn_capable)(struct sock *); 64115 __u16 net_header_len; 64116 int sockaddr_len; 64117 int (*ip_options_len)(struct sock *); 64118 sa_family_t sa_family; 64119 struct list_head list; 64120 }; 64121 64122 struct sctp_packet { 64123 __u16 source_port; 64124 __u16 destination_port; 64125 __u32 vtag; 64126 struct list_head chunk_list; 64127 size_t overhead; 64128 size_t size; 64129 size_t max_size; 64130 struct sctp_transport *transport; 64131 struct sctp_chunk *auth; 64132 u8 has_cookie_echo: 1; 64133 u8 has_sack: 1; 64134 u8 has_auth: 1; 64135 u8 has_data: 1; 64136 u8 ipfragok: 1; 64137 }; 64138 64139 struct sctp_transport { 64140 struct list_head transports; 64141 struct rhlist_head node; 64142 refcount_t refcnt; 64143 __u32 rto_pending: 1; 64144 __u32 hb_sent: 1; 64145 __u32 pmtu_pending: 1; 64146 __u32 dst_pending_confirm: 1; 64147 __u32 sack_generation: 1; 64148 u32 dst_cookie; 64149 struct flowi fl; 64150 union sctp_addr ipaddr; 64151 struct sctp_af *af_specific; 64152 struct sctp_association *asoc; 64153 long unsigned int rto; 64154 __u32 rtt; 64155 __u32 rttvar; 64156 __u32 srtt; 64157 __u32 cwnd; 64158 __u32 ssthresh; 64159 __u32 partial_bytes_acked; 64160 __u32 flight_size; 64161 __u32 burst_limited; 64162 struct dst_entry *dst; 64163 union sctp_addr saddr; 64164 long unsigned int hbinterval; 64165 long unsigned int sackdelay; 64166 __u32 sackfreq; 64167 atomic_t mtu_info; 64168 ktime_t last_time_heard; 64169 long unsigned int last_time_sent; 64170 long unsigned int last_time_ecne_reduced; 64171 __be16 encap_port; 64172 __u16 pathmaxrxt; 64173 __u32 flowlabel; 64174 __u8 dscp; 64175 __u16 pf_retrans; 64176 __u16 ps_retrans; 64177 __u32 pathmtu; 64178 __u32 param_flags; 64179 int init_sent_count; 64180 int state; 64181 short unsigned int error_count; 64182 struct timer_list T3_rtx_timer; 64183 struct timer_list hb_timer; 64184 struct timer_list proto_unreach_timer; 64185 struct timer_list reconf_timer; 64186 struct list_head transmitted; 64187 struct sctp_packet packet; 64188 struct list_head send_ready; 64189 struct { 64190 __u32 next_tsn_at_change; 64191 char changeover_active; 64192 char cycling_changeover; 64193 char cacc_saw_newack; 64194 } cacc; 64195 __u64 hb_nonce; 64196 struct callback_head rcu; 64197 }; 64198 64199 struct sctp_datamsg { 64200 struct list_head chunks; 64201 refcount_t refcnt; 64202 long unsigned int expires_at; 64203 int send_error; 64204 u8 send_failed: 1; 64205 u8 can_delay: 1; 64206 u8 abandoned: 1; 64207 }; 64208 64209 struct sctp_stream_priorities { 64210 struct list_head prio_sched; 64211 struct list_head active; 64212 struct sctp_stream_out_ext *next; 64213 __u16 prio; 64214 }; 64215 64216 struct sctp_stream_out_ext { 64217 __u64 abandoned_unsent[3]; 64218 __u64 abandoned_sent[3]; 64219 struct list_head outq; 64220 union { 64221 struct { 64222 struct list_head prio_list; 64223 struct sctp_stream_priorities *prio_head; 64224 }; 64225 struct { 64226 struct list_head rr_list; 64227 }; 64228 }; 64229 }; 64230 64231 struct task_security_struct { 64232 u32 osid; 64233 u32 sid; 64234 u32 exec_sid; 64235 u32 create_sid; 64236 u32 keycreate_sid; 64237 u32 sockcreate_sid; 64238 }; 64239 64240 enum label_initialized { 64241 LABEL_INVALID = 0, 64242 LABEL_INITIALIZED = 1, 64243 LABEL_PENDING = 2, 64244 }; 64245 64246 struct inode_security_struct { 64247 struct inode *inode; 64248 struct list_head list; 64249 u32 task_sid; 64250 u32 sid; 64251 u16 sclass; 64252 unsigned char initialized; 64253 spinlock_t lock; 64254 }; 64255 64256 struct file_security_struct { 64257 u32 sid; 64258 u32 fown_sid; 64259 u32 isid; 64260 u32 pseqno; 64261 }; 64262 64263 struct superblock_security_struct { 64264 u32 sid; 64265 u32 def_sid; 64266 u32 mntpoint_sid; 64267 short unsigned int behavior; 64268 short unsigned int flags; 64269 struct mutex lock; 64270 struct list_head isec_head; 64271 spinlock_t isec_lock; 64272 }; 64273 64274 struct msg_security_struct { 64275 u32 sid; 64276 }; 64277 64278 struct ipc_security_struct { 64279 u16 sclass; 64280 u32 sid; 64281 }; 64282 64283 struct sk_security_struct { 64284 enum { 64285 NLBL_UNSET = 0, 64286 NLBL_REQUIRE = 1, 64287 NLBL_LABELED = 2, 64288 NLBL_REQSKB = 3, 64289 NLBL_CONNLABELED = 4, 64290 } nlbl_state; 64291 struct netlbl_lsm_secattr *nlbl_secattr; 64292 u32 sid; 64293 u32 peer_sid; 64294 u16 sclass; 64295 enum { 64296 SCTP_ASSOC_UNSET = 0, 64297 SCTP_ASSOC_SET = 1, 64298 } sctp_assoc_state; 64299 }; 64300 64301 struct tun_security_struct { 64302 u32 sid; 64303 }; 64304 64305 struct key_security_struct { 64306 u32 sid; 64307 }; 64308 64309 struct ib_security_struct { 64310 u32 sid; 64311 }; 64312 64313 struct bpf_security_struct { 64314 u32 sid; 64315 }; 64316 64317 struct perf_event_security_struct { 64318 u32 sid; 64319 }; 64320 64321 struct selinux_mnt_opts { 64322 const char *fscontext; 64323 const char *context; 64324 const char *rootcontext; 64325 const char *defcontext; 64326 }; 64327 64328 enum { 64329 Opt_error___2 = 4294967295, 64330 Opt_context = 0, 64331 Opt_defcontext = 1, 64332 Opt_fscontext = 2, 64333 Opt_rootcontext = 3, 64334 Opt_seclabel = 4, 64335 }; 64336 64337 struct selinux_policy_convert_data; 64338 64339 struct selinux_load_state { 64340 struct selinux_policy *policy; 64341 struct selinux_policy_convert_data *convert_data; 64342 }; 64343 64344 enum sel_inos { 64345 SEL_ROOT_INO = 2, 64346 SEL_LOAD = 3, 64347 SEL_ENFORCE = 4, 64348 SEL_CONTEXT = 5, 64349 SEL_ACCESS = 6, 64350 SEL_CREATE = 7, 64351 SEL_RELABEL = 8, 64352 SEL_USER = 9, 64353 SEL_POLICYVERS = 10, 64354 SEL_COMMIT_BOOLS = 11, 64355 SEL_MLS = 12, 64356 SEL_DISABLE = 13, 64357 SEL_MEMBER = 14, 64358 SEL_CHECKREQPROT = 15, 64359 SEL_COMPAT_NET = 16, 64360 SEL_REJECT_UNKNOWN = 17, 64361 SEL_DENY_UNKNOWN = 18, 64362 SEL_STATUS = 19, 64363 SEL_POLICY = 20, 64364 SEL_VALIDATE_TRANS = 21, 64365 SEL_INO_NEXT = 22, 64366 }; 64367 64368 struct selinux_fs_info { 64369 struct dentry *bool_dir; 64370 unsigned int bool_num; 64371 char **bool_pending_names; 64372 unsigned int *bool_pending_values; 64373 struct dentry *class_dir; 64374 long unsigned int last_class_ino; 64375 bool policy_opened; 64376 struct dentry *policycap_dir; 64377 long unsigned int last_ino; 64378 struct selinux_state *state; 64379 struct super_block *sb; 64380 }; 64381 64382 struct policy_load_memory { 64383 size_t len; 64384 void *data; 64385 }; 64386 64387 enum { 64388 SELNL_MSG_SETENFORCE = 16, 64389 SELNL_MSG_POLICYLOAD = 17, 64390 SELNL_MSG_MAX = 18, 64391 }; 64392 64393 enum selinux_nlgroups { 64394 SELNLGRP_NONE = 0, 64395 SELNLGRP_AVC = 1, 64396 __SELNLGRP_MAX = 2, 64397 }; 64398 64399 struct selnl_msg_setenforce { 64400 __s32 val; 64401 }; 64402 64403 struct selnl_msg_policyload { 64404 __u32 seqno; 64405 }; 64406 64407 enum { 64408 XFRM_MSG_BASE = 16, 64409 XFRM_MSG_NEWSA = 16, 64410 XFRM_MSG_DELSA = 17, 64411 XFRM_MSG_GETSA = 18, 64412 XFRM_MSG_NEWPOLICY = 19, 64413 XFRM_MSG_DELPOLICY = 20, 64414 XFRM_MSG_GETPOLICY = 21, 64415 XFRM_MSG_ALLOCSPI = 22, 64416 XFRM_MSG_ACQUIRE = 23, 64417 XFRM_MSG_EXPIRE = 24, 64418 XFRM_MSG_UPDPOLICY = 25, 64419 XFRM_MSG_UPDSA = 26, 64420 XFRM_MSG_POLEXPIRE = 27, 64421 XFRM_MSG_FLUSHSA = 28, 64422 XFRM_MSG_FLUSHPOLICY = 29, 64423 XFRM_MSG_NEWAE = 30, 64424 XFRM_MSG_GETAE = 31, 64425 XFRM_MSG_REPORT = 32, 64426 XFRM_MSG_MIGRATE = 33, 64427 XFRM_MSG_NEWSADINFO = 34, 64428 XFRM_MSG_GETSADINFO = 35, 64429 XFRM_MSG_NEWSPDINFO = 36, 64430 XFRM_MSG_GETSPDINFO = 37, 64431 XFRM_MSG_MAPPING = 38, 64432 __XFRM_MSG_MAX = 39, 64433 }; 64434 64435 enum { 64436 RTM_BASE = 16, 64437 RTM_NEWLINK = 16, 64438 RTM_DELLINK = 17, 64439 RTM_GETLINK = 18, 64440 RTM_SETLINK = 19, 64441 RTM_NEWADDR = 20, 64442 RTM_DELADDR = 21, 64443 RTM_GETADDR = 22, 64444 RTM_NEWROUTE = 24, 64445 RTM_DELROUTE = 25, 64446 RTM_GETROUTE = 26, 64447 RTM_NEWNEIGH = 28, 64448 RTM_DELNEIGH = 29, 64449 RTM_GETNEIGH = 30, 64450 RTM_NEWRULE = 32, 64451 RTM_DELRULE = 33, 64452 RTM_GETRULE = 34, 64453 RTM_NEWQDISC = 36, 64454 RTM_DELQDISC = 37, 64455 RTM_GETQDISC = 38, 64456 RTM_NEWTCLASS = 40, 64457 RTM_DELTCLASS = 41, 64458 RTM_GETTCLASS = 42, 64459 RTM_NEWTFILTER = 44, 64460 RTM_DELTFILTER = 45, 64461 RTM_GETTFILTER = 46, 64462 RTM_NEWACTION = 48, 64463 RTM_DELACTION = 49, 64464 RTM_GETACTION = 50, 64465 RTM_NEWPREFIX = 52, 64466 RTM_GETMULTICAST = 58, 64467 RTM_GETANYCAST = 62, 64468 RTM_NEWNEIGHTBL = 64, 64469 RTM_GETNEIGHTBL = 66, 64470 RTM_SETNEIGHTBL = 67, 64471 RTM_NEWNDUSEROPT = 68, 64472 RTM_NEWADDRLABEL = 72, 64473 RTM_DELADDRLABEL = 73, 64474 RTM_GETADDRLABEL = 74, 64475 RTM_GETDCB = 78, 64476 RTM_SETDCB = 79, 64477 RTM_NEWNETCONF = 80, 64478 RTM_DELNETCONF = 81, 64479 RTM_GETNETCONF = 82, 64480 RTM_NEWMDB = 84, 64481 RTM_DELMDB = 85, 64482 RTM_GETMDB = 86, 64483 RTM_NEWNSID = 88, 64484 RTM_DELNSID = 89, 64485 RTM_GETNSID = 90, 64486 RTM_NEWSTATS = 92, 64487 RTM_GETSTATS = 94, 64488 RTM_NEWCACHEREPORT = 96, 64489 RTM_NEWCHAIN = 100, 64490 RTM_DELCHAIN = 101, 64491 RTM_GETCHAIN = 102, 64492 RTM_NEWNEXTHOP = 104, 64493 RTM_DELNEXTHOP = 105, 64494 RTM_GETNEXTHOP = 106, 64495 RTM_NEWLINKPROP = 108, 64496 RTM_DELLINKPROP = 109, 64497 RTM_GETLINKPROP = 110, 64498 RTM_NEWVLAN = 112, 64499 RTM_DELVLAN = 113, 64500 RTM_GETVLAN = 114, 64501 __RTM_MAX = 115, 64502 }; 64503 64504 struct nlmsg_perm { 64505 u16 nlmsg_type; 64506 u32 perm; 64507 }; 64508 64509 struct netif_security_struct { 64510 struct net *ns; 64511 int ifindex; 64512 u32 sid; 64513 }; 64514 64515 struct sel_netif { 64516 struct list_head list; 64517 struct netif_security_struct nsec; 64518 struct callback_head callback_head; 64519 }; 64520 64521 struct netnode_security_struct { 64522 union { 64523 __be32 ipv4; 64524 struct in6_addr ipv6; 64525 } addr; 64526 u32 sid; 64527 u16 family; 64528 }; 64529 64530 struct sel_netnode_bkt { 64531 unsigned int size; 64532 struct list_head list; 64533 }; 64534 64535 struct sel_netnode { 64536 struct netnode_security_struct nsec; 64537 struct list_head list; 64538 struct callback_head rcu; 64539 }; 64540 64541 struct netport_security_struct { 64542 u32 sid; 64543 u16 port; 64544 u8 protocol; 64545 }; 64546 64547 struct sel_netport_bkt { 64548 int size; 64549 struct list_head list; 64550 }; 64551 64552 struct sel_netport { 64553 struct netport_security_struct psec; 64554 struct list_head list; 64555 struct callback_head rcu; 64556 }; 64557 64558 struct selinux_kernel_status { 64559 u32 version; 64560 u32 sequence; 64561 u32 enforcing; 64562 u32 policyload; 64563 u32 deny_unknown; 64564 }; 64565 64566 struct ebitmap_node { 64567 struct ebitmap_node *next; 64568 long unsigned int maps[6]; 64569 u32 startbit; 64570 }; 64571 64572 struct ebitmap { 64573 struct ebitmap_node *node; 64574 u32 highbit; 64575 }; 64576 64577 struct policy_file { 64578 char *data; 64579 size_t len; 64580 }; 64581 64582 struct hashtab_node { 64583 void *key; 64584 void *datum; 64585 struct hashtab_node *next; 64586 }; 64587 64588 struct hashtab { 64589 struct hashtab_node **htable; 64590 u32 size; 64591 u32 nel; 64592 }; 64593 64594 struct hashtab_info { 64595 u32 slots_used; 64596 u32 max_chain_len; 64597 }; 64598 64599 struct hashtab_key_params { 64600 u32 (*hash)(const void *); 64601 int (*cmp)(const void *, const void *); 64602 }; 64603 64604 struct symtab { 64605 struct hashtab table; 64606 u32 nprim; 64607 }; 64608 64609 struct mls_level { 64610 u32 sens; 64611 struct ebitmap cat; 64612 }; 64613 64614 struct mls_range { 64615 struct mls_level level[2]; 64616 }; 64617 64618 struct context___2 { 64619 u32 user; 64620 u32 role; 64621 u32 type; 64622 u32 len; 64623 struct mls_range range; 64624 char *str; 64625 }; 64626 64627 struct sidtab_str_cache; 64628 64629 struct sidtab_entry { 64630 u32 sid; 64631 u32 hash; 64632 struct context___2 context; 64633 struct sidtab_str_cache *cache; 64634 struct hlist_node list; 64635 }; 64636 64637 struct sidtab_str_cache { 64638 struct callback_head rcu_member; 64639 struct list_head lru_member; 64640 struct sidtab_entry *parent; 64641 u32 len; 64642 char str[0]; 64643 }; 64644 64645 struct sidtab_node_inner; 64646 64647 struct sidtab_node_leaf; 64648 64649 union sidtab_entry_inner { 64650 struct sidtab_node_inner *ptr_inner; 64651 struct sidtab_node_leaf *ptr_leaf; 64652 }; 64653 64654 struct sidtab_node_inner { 64655 union sidtab_entry_inner entries[512]; 64656 }; 64657 64658 struct sidtab_node_leaf { 64659 struct sidtab_entry entries[39]; 64660 }; 64661 64662 struct sidtab_isid_entry { 64663 int set; 64664 struct sidtab_entry entry; 64665 }; 64666 64667 struct sidtab; 64668 64669 struct sidtab_convert_params { 64670 int (*func)(struct context___2 *, struct context___2 *, void *); 64671 void *args; 64672 struct sidtab *target; 64673 }; 64674 64675 struct sidtab { 64676 union sidtab_entry_inner roots[4]; 64677 u32 count; 64678 struct sidtab_convert_params *convert; 64679 bool frozen; 64680 spinlock_t lock; 64681 u32 cache_free_slots; 64682 struct list_head cache_lru_list; 64683 spinlock_t cache_lock; 64684 struct sidtab_isid_entry isids[27]; 64685 struct hlist_head context_to_sid[512]; 64686 }; 64687 64688 struct avtab_key { 64689 u16 source_type; 64690 u16 target_type; 64691 u16 target_class; 64692 u16 specified; 64693 }; 64694 64695 struct avtab_extended_perms { 64696 u8 specified; 64697 u8 driver; 64698 struct extended_perms_data perms; 64699 }; 64700 64701 struct avtab_datum { 64702 union { 64703 u32 data; 64704 struct avtab_extended_perms *xperms; 64705 } u; 64706 }; 64707 64708 struct avtab_node { 64709 struct avtab_key key; 64710 struct avtab_datum datum; 64711 struct avtab_node *next; 64712 }; 64713 64714 struct avtab { 64715 struct avtab_node **htable; 64716 u32 nel; 64717 u32 nslot; 64718 u32 mask; 64719 }; 64720 64721 struct type_set; 64722 64723 struct constraint_expr { 64724 u32 expr_type; 64725 u32 attr; 64726 u32 op; 64727 struct ebitmap names; 64728 struct type_set *type_names; 64729 struct constraint_expr *next; 64730 }; 64731 64732 struct type_set { 64733 struct ebitmap types; 64734 struct ebitmap negset; 64735 u32 flags; 64736 }; 64737 64738 struct constraint_node { 64739 u32 permissions; 64740 struct constraint_expr *expr; 64741 struct constraint_node *next; 64742 }; 64743 64744 struct common_datum { 64745 u32 value; 64746 struct symtab permissions; 64747 }; 64748 64749 struct class_datum { 64750 u32 value; 64751 char *comkey; 64752 struct common_datum *comdatum; 64753 struct symtab permissions; 64754 struct constraint_node *constraints; 64755 struct constraint_node *validatetrans; 64756 char default_user; 64757 char default_role; 64758 char default_type; 64759 char default_range; 64760 }; 64761 64762 struct role_datum { 64763 u32 value; 64764 u32 bounds; 64765 struct ebitmap dominates; 64766 struct ebitmap types; 64767 }; 64768 64769 struct role_allow { 64770 u32 role; 64771 u32 new_role; 64772 struct role_allow *next; 64773 }; 64774 64775 struct type_datum { 64776 u32 value; 64777 u32 bounds; 64778 unsigned char primary; 64779 unsigned char attribute; 64780 }; 64781 64782 struct user_datum { 64783 u32 value; 64784 u32 bounds; 64785 struct ebitmap roles; 64786 struct mls_range range; 64787 struct mls_level dfltlevel; 64788 }; 64789 64790 struct cond_bool_datum { 64791 __u32 value; 64792 int state; 64793 }; 64794 64795 struct ocontext { 64796 union { 64797 char *name; 64798 struct { 64799 u8 protocol; 64800 u16 low_port; 64801 u16 high_port; 64802 } port; 64803 struct { 64804 u32 addr; 64805 u32 mask; 64806 } node; 64807 struct { 64808 u32 addr[4]; 64809 u32 mask[4]; 64810 } node6; 64811 struct { 64812 u64 subnet_prefix; 64813 u16 low_pkey; 64814 u16 high_pkey; 64815 } ibpkey; 64816 struct { 64817 char *dev_name; 64818 u8 port; 64819 } ibendport; 64820 } u; 64821 union { 64822 u32 sclass; 64823 u32 behavior; 64824 } v; 64825 struct context___2 context[2]; 64826 u32 sid[2]; 64827 struct ocontext *next; 64828 }; 64829 64830 struct genfs { 64831 char *fstype; 64832 struct ocontext *head; 64833 struct genfs *next; 64834 }; 64835 64836 struct cond_node; 64837 64838 struct policydb { 64839 int mls_enabled; 64840 struct symtab symtab[8]; 64841 char **sym_val_to_name[8]; 64842 struct class_datum **class_val_to_struct; 64843 struct role_datum **role_val_to_struct; 64844 struct user_datum **user_val_to_struct; 64845 struct type_datum **type_val_to_struct; 64846 struct avtab te_avtab; 64847 struct hashtab role_tr; 64848 struct ebitmap filename_trans_ttypes; 64849 struct hashtab filename_trans; 64850 u32 compat_filename_trans_count; 64851 struct cond_bool_datum **bool_val_to_struct; 64852 struct avtab te_cond_avtab; 64853 struct cond_node *cond_list; 64854 u32 cond_list_len; 64855 struct role_allow *role_allow; 64856 struct ocontext *ocontexts[9]; 64857 struct genfs *genfs; 64858 struct hashtab range_tr; 64859 struct ebitmap *type_attr_map_array; 64860 struct ebitmap policycaps; 64861 struct ebitmap permissive_map; 64862 size_t len; 64863 unsigned int policyvers; 64864 unsigned int reject_unknown: 1; 64865 unsigned int allow_unknown: 1; 64866 u16 process_class; 64867 u32 process_trans_perms; 64868 }; 64869 64870 struct perm_datum { 64871 u32 value; 64872 }; 64873 64874 struct role_trans_key { 64875 u32 role; 64876 u32 type; 64877 u32 tclass; 64878 }; 64879 64880 struct role_trans_datum { 64881 u32 new_role; 64882 }; 64883 64884 struct filename_trans_key { 64885 u32 ttype; 64886 u16 tclass; 64887 const char *name; 64888 }; 64889 64890 struct filename_trans_datum { 64891 struct ebitmap stypes; 64892 u32 otype; 64893 struct filename_trans_datum *next; 64894 }; 64895 64896 struct level_datum { 64897 struct mls_level *level; 64898 unsigned char isalias; 64899 }; 64900 64901 struct cat_datum { 64902 u32 value; 64903 unsigned char isalias; 64904 }; 64905 64906 struct range_trans { 64907 u32 source_type; 64908 u32 target_type; 64909 u32 target_class; 64910 }; 64911 64912 struct cond_expr_node; 64913 64914 struct cond_expr { 64915 struct cond_expr_node *nodes; 64916 u32 len; 64917 }; 64918 64919 struct cond_av_list { 64920 struct avtab_node **nodes; 64921 u32 len; 64922 }; 64923 64924 struct cond_node { 64925 int cur_state; 64926 struct cond_expr expr; 64927 struct cond_av_list true_list; 64928 struct cond_av_list false_list; 64929 }; 64930 64931 struct policy_data { 64932 struct policydb *p; 64933 void *fp; 64934 }; 64935 64936 struct cond_expr_node { 64937 u32 expr_type; 64938 u32 bool; 64939 }; 64940 64941 struct policydb_compat_info { 64942 int version; 64943 int sym_num; 64944 int ocon_num; 64945 }; 64946 64947 struct selinux_mapping; 64948 64949 struct selinux_map { 64950 struct selinux_mapping *mapping; 64951 u16 size; 64952 }; 64953 64954 struct selinux_policy { 64955 struct sidtab *sidtab; 64956 struct policydb policydb; 64957 struct selinux_map map; 64958 u32 latest_granting; 64959 }; 64960 64961 struct convert_context_args { 64962 struct selinux_state *state; 64963 struct policydb *oldp; 64964 struct policydb *newp; 64965 }; 64966 64967 struct selinux_policy_convert_data { 64968 struct convert_context_args args; 64969 struct sidtab_convert_params sidtab_params; 64970 }; 64971 64972 struct selinux_mapping { 64973 u16 value; 64974 unsigned int num_perms; 64975 u32 perms[32]; 64976 }; 64977 64978 struct selinux_audit_rule { 64979 u32 au_seqno; 64980 struct context___2 au_ctxt; 64981 }; 64982 64983 struct cond_insertf_data { 64984 struct policydb *p; 64985 struct avtab_node **dst; 64986 struct cond_av_list *other; 64987 }; 64988 64989 struct rt6key { 64990 struct in6_addr addr; 64991 int plen; 64992 }; 64993 64994 struct rtable; 64995 64996 struct fnhe_hash_bucket; 64997 64998 struct fib_nh_common { 64999 struct net_device *nhc_dev; 65000 int nhc_oif; 65001 unsigned char nhc_scope; 65002 u8 nhc_family; 65003 u8 nhc_gw_family; 65004 unsigned char nhc_flags; 65005 struct lwtunnel_state *nhc_lwtstate; 65006 union { 65007 __be32 ipv4; 65008 struct in6_addr ipv6; 65009 } nhc_gw; 65010 int nhc_weight; 65011 atomic_t nhc_upper_bound; 65012 struct rtable **nhc_pcpu_rth_output; 65013 struct rtable *nhc_rth_input; 65014 struct fnhe_hash_bucket *nhc_exceptions; 65015 }; 65016 65017 struct rt6_exception_bucket; 65018 65019 struct fib6_nh { 65020 struct fib_nh_common nh_common; 65021 long unsigned int last_probe; 65022 struct rt6_info **rt6i_pcpu; 65023 struct rt6_exception_bucket *rt6i_exception_bucket; 65024 }; 65025 65026 struct fib6_node; 65027 65028 struct dst_metrics; 65029 65030 struct nexthop; 65031 65032 struct fib6_info { 65033 struct fib6_table *fib6_table; 65034 struct fib6_info *fib6_next; 65035 struct fib6_node *fib6_node; 65036 union { 65037 struct list_head fib6_siblings; 65038 struct list_head nh_list; 65039 }; 65040 unsigned int fib6_nsiblings; 65041 refcount_t fib6_ref; 65042 long unsigned int expires; 65043 struct dst_metrics *fib6_metrics; 65044 struct rt6key fib6_dst; 65045 u32 fib6_flags; 65046 struct rt6key fib6_src; 65047 struct rt6key fib6_prefsrc; 65048 u32 fib6_metric; 65049 u8 fib6_protocol; 65050 u8 fib6_type; 65051 u8 should_flush: 1; 65052 u8 dst_nocount: 1; 65053 u8 dst_nopolicy: 1; 65054 u8 fib6_destroying: 1; 65055 u8 offload: 1; 65056 u8 trap: 1; 65057 u8 unused: 2; 65058 struct callback_head rcu; 65059 struct nexthop *nh; 65060 struct fib6_nh fib6_nh[0]; 65061 }; 65062 65063 struct uncached_list; 65064 65065 struct rt6_info { 65066 struct dst_entry dst; 65067 struct fib6_info *from; 65068 int sernum; 65069 struct rt6key rt6i_dst; 65070 struct rt6key rt6i_src; 65071 struct in6_addr rt6i_gateway; 65072 struct inet6_dev *rt6i_idev; 65073 u32 rt6i_flags; 65074 struct list_head rt6i_uncached; 65075 struct uncached_list *rt6i_uncached_list; 65076 short unsigned int rt6i_nfheader_len; 65077 }; 65078 65079 struct rt6_statistics { 65080 __u32 fib_nodes; 65081 __u32 fib_route_nodes; 65082 __u32 fib_rt_entries; 65083 __u32 fib_rt_cache; 65084 __u32 fib_discarded_routes; 65085 atomic_t fib_rt_alloc; 65086 atomic_t fib_rt_uncache; 65087 }; 65088 65089 struct fib6_node { 65090 struct fib6_node *parent; 65091 struct fib6_node *left; 65092 struct fib6_node *right; 65093 struct fib6_node *subtree; 65094 struct fib6_info *leaf; 65095 __u16 fn_bit; 65096 __u16 fn_flags; 65097 int fn_sernum; 65098 struct fib6_info *rr_ptr; 65099 struct callback_head rcu; 65100 }; 65101 65102 struct fib6_table { 65103 struct hlist_node tb6_hlist; 65104 u32 tb6_id; 65105 spinlock_t tb6_lock; 65106 struct fib6_node tb6_root; 65107 struct inet_peer_base tb6_peers; 65108 unsigned int flags; 65109 unsigned int fib_seq; 65110 }; 65111 65112 typedef union { 65113 __be32 a4; 65114 __be32 a6[4]; 65115 struct in6_addr in6; 65116 } xfrm_address_t; 65117 65118 struct xfrm_id { 65119 xfrm_address_t daddr; 65120 __be32 spi; 65121 __u8 proto; 65122 }; 65123 65124 struct xfrm_selector { 65125 xfrm_address_t daddr; 65126 xfrm_address_t saddr; 65127 __be16 dport; 65128 __be16 dport_mask; 65129 __be16 sport; 65130 __be16 sport_mask; 65131 __u16 family; 65132 __u8 prefixlen_d; 65133 __u8 prefixlen_s; 65134 __u8 proto; 65135 int ifindex; 65136 __kernel_uid32_t user; 65137 }; 65138 65139 struct xfrm_lifetime_cfg { 65140 __u64 soft_byte_limit; 65141 __u64 hard_byte_limit; 65142 __u64 soft_packet_limit; 65143 __u64 hard_packet_limit; 65144 __u64 soft_add_expires_seconds; 65145 __u64 hard_add_expires_seconds; 65146 __u64 soft_use_expires_seconds; 65147 __u64 hard_use_expires_seconds; 65148 }; 65149 65150 struct xfrm_lifetime_cur { 65151 __u64 bytes; 65152 __u64 packets; 65153 __u64 add_time; 65154 __u64 use_time; 65155 }; 65156 65157 struct xfrm_replay_state { 65158 __u32 oseq; 65159 __u32 seq; 65160 __u32 bitmap; 65161 }; 65162 65163 struct xfrm_replay_state_esn { 65164 unsigned int bmp_len; 65165 __u32 oseq; 65166 __u32 seq; 65167 __u32 oseq_hi; 65168 __u32 seq_hi; 65169 __u32 replay_window; 65170 __u32 bmp[0]; 65171 }; 65172 65173 struct xfrm_algo { 65174 char alg_name[64]; 65175 unsigned int alg_key_len; 65176 char alg_key[0]; 65177 }; 65178 65179 struct xfrm_algo_auth { 65180 char alg_name[64]; 65181 unsigned int alg_key_len; 65182 unsigned int alg_trunc_len; 65183 char alg_key[0]; 65184 }; 65185 65186 struct xfrm_algo_aead { 65187 char alg_name[64]; 65188 unsigned int alg_key_len; 65189 unsigned int alg_icv_len; 65190 char alg_key[0]; 65191 }; 65192 65193 struct xfrm_stats { 65194 __u32 replay_window; 65195 __u32 replay; 65196 __u32 integrity_failed; 65197 }; 65198 65199 enum { 65200 XFRM_POLICY_TYPE_MAIN = 0, 65201 XFRM_POLICY_TYPE_SUB = 1, 65202 XFRM_POLICY_TYPE_MAX = 2, 65203 XFRM_POLICY_TYPE_ANY = 255, 65204 }; 65205 65206 struct xfrm_encap_tmpl { 65207 __u16 encap_type; 65208 __be16 encap_sport; 65209 __be16 encap_dport; 65210 xfrm_address_t encap_oa; 65211 }; 65212 65213 enum xfrm_attr_type_t { 65214 XFRMA_UNSPEC = 0, 65215 XFRMA_ALG_AUTH = 1, 65216 XFRMA_ALG_CRYPT = 2, 65217 XFRMA_ALG_COMP = 3, 65218 XFRMA_ENCAP = 4, 65219 XFRMA_TMPL = 5, 65220 XFRMA_SA = 6, 65221 XFRMA_POLICY = 7, 65222 XFRMA_SEC_CTX = 8, 65223 XFRMA_LTIME_VAL = 9, 65224 XFRMA_REPLAY_VAL = 10, 65225 XFRMA_REPLAY_THRESH = 11, 65226 XFRMA_ETIMER_THRESH = 12, 65227 XFRMA_SRCADDR = 13, 65228 XFRMA_COADDR = 14, 65229 XFRMA_LASTUSED = 15, 65230 XFRMA_POLICY_TYPE = 16, 65231 XFRMA_MIGRATE = 17, 65232 XFRMA_ALG_AEAD = 18, 65233 XFRMA_KMADDRESS = 19, 65234 XFRMA_ALG_AUTH_TRUNC = 20, 65235 XFRMA_MARK = 21, 65236 XFRMA_TFCPAD = 22, 65237 XFRMA_REPLAY_ESN_VAL = 23, 65238 XFRMA_SA_EXTRA_FLAGS = 24, 65239 XFRMA_PROTO = 25, 65240 XFRMA_ADDRESS_FILTER = 26, 65241 XFRMA_PAD = 27, 65242 XFRMA_OFFLOAD_DEV = 28, 65243 XFRMA_SET_MARK = 29, 65244 XFRMA_SET_MARK_MASK = 30, 65245 XFRMA_IF_ID = 31, 65246 __XFRMA_MAX = 32, 65247 }; 65248 65249 struct xfrm_mark { 65250 __u32 v; 65251 __u32 m; 65252 }; 65253 65254 struct xfrm_address_filter { 65255 xfrm_address_t saddr; 65256 xfrm_address_t daddr; 65257 __u16 family; 65258 __u8 splen; 65259 __u8 dplen; 65260 }; 65261 65262 struct xfrm_state_walk { 65263 struct list_head all; 65264 u8 state; 65265 u8 dying; 65266 u8 proto; 65267 u32 seq; 65268 struct xfrm_address_filter *filter; 65269 }; 65270 65271 struct xfrm_state_offload { 65272 struct net_device *dev; 65273 struct net_device *real_dev; 65274 long unsigned int offload_handle; 65275 unsigned int num_exthdrs; 65276 u8 flags; 65277 }; 65278 65279 struct xfrm_mode { 65280 u8 encap; 65281 u8 family; 65282 u8 flags; 65283 }; 65284 65285 struct xfrm_replay; 65286 65287 struct xfrm_type; 65288 65289 struct xfrm_type_offload; 65290 65291 struct xfrm_state { 65292 possible_net_t xs_net; 65293 union { 65294 struct hlist_node gclist; 65295 struct hlist_node bydst; 65296 }; 65297 struct hlist_node bysrc; 65298 struct hlist_node byspi; 65299 refcount_t refcnt; 65300 spinlock_t lock; 65301 struct xfrm_id id; 65302 struct xfrm_selector sel; 65303 struct xfrm_mark mark; 65304 u32 if_id; 65305 u32 tfcpad; 65306 u32 genid; 65307 struct xfrm_state_walk km; 65308 struct { 65309 u32 reqid; 65310 u8 mode; 65311 u8 replay_window; 65312 u8 aalgo; 65313 u8 ealgo; 65314 u8 calgo; 65315 u8 flags; 65316 u16 family; 65317 xfrm_address_t saddr; 65318 int header_len; 65319 int trailer_len; 65320 u32 extra_flags; 65321 struct xfrm_mark smark; 65322 } props; 65323 struct xfrm_lifetime_cfg lft; 65324 struct xfrm_algo_auth *aalg; 65325 struct xfrm_algo *ealg; 65326 struct xfrm_algo *calg; 65327 struct xfrm_algo_aead *aead; 65328 const char *geniv; 65329 struct xfrm_encap_tmpl *encap; 65330 struct sock *encap_sk; 65331 xfrm_address_t *coaddr; 65332 struct xfrm_state *tunnel; 65333 atomic_t tunnel_users; 65334 struct xfrm_replay_state replay; 65335 struct xfrm_replay_state_esn *replay_esn; 65336 struct xfrm_replay_state preplay; 65337 struct xfrm_replay_state_esn *preplay_esn; 65338 const struct xfrm_replay *repl; 65339 u32 xflags; 65340 u32 replay_maxage; 65341 u32 replay_maxdiff; 65342 struct timer_list rtimer; 65343 struct xfrm_stats stats; 65344 struct xfrm_lifetime_cur curlft; 65345 struct hrtimer mtimer; 65346 struct xfrm_state_offload xso; 65347 long int saved_tmo; 65348 time64_t lastused; 65349 struct page_frag xfrag; 65350 const struct xfrm_type *type; 65351 struct xfrm_mode inner_mode; 65352 struct xfrm_mode inner_mode_iaf; 65353 struct xfrm_mode outer_mode; 65354 const struct xfrm_type_offload *type_offload; 65355 struct xfrm_sec_ctx *security; 65356 void *data; 65357 }; 65358 65359 struct dst_metrics { 65360 u32 metrics[17]; 65361 refcount_t refcnt; 65362 }; 65363 65364 struct xfrm_policy_walk_entry { 65365 struct list_head all; 65366 u8 dead; 65367 }; 65368 65369 struct xfrm_policy_queue { 65370 struct sk_buff_head hold_queue; 65371 struct timer_list hold_timer; 65372 long unsigned int timeout; 65373 }; 65374 65375 struct xfrm_tmpl { 65376 struct xfrm_id id; 65377 xfrm_address_t saddr; 65378 short unsigned int encap_family; 65379 u32 reqid; 65380 u8 mode; 65381 u8 share; 65382 u8 optional; 65383 u8 allalgs; 65384 u32 aalgos; 65385 u32 ealgos; 65386 u32 calgos; 65387 }; 65388 65389 struct xfrm_policy { 65390 possible_net_t xp_net; 65391 struct hlist_node bydst; 65392 struct hlist_node byidx; 65393 rwlock_t lock; 65394 refcount_t refcnt; 65395 u32 pos; 65396 struct timer_list timer; 65397 atomic_t genid; 65398 u32 priority; 65399 u32 index; 65400 u32 if_id; 65401 struct xfrm_mark mark; 65402 struct xfrm_selector selector; 65403 struct xfrm_lifetime_cfg lft; 65404 struct xfrm_lifetime_cur curlft; 65405 struct xfrm_policy_walk_entry walk; 65406 struct xfrm_policy_queue polq; 65407 bool bydst_reinsert; 65408 u8 type; 65409 u8 action; 65410 u8 flags; 65411 u8 xfrm_nr; 65412 u16 family; 65413 struct xfrm_sec_ctx *security; 65414 struct xfrm_tmpl xfrm_vec[6]; 65415 struct hlist_node bydst_inexact_list; 65416 struct callback_head rcu; 65417 }; 65418 65419 struct udp_hslot; 65420 65421 struct udp_table { 65422 struct udp_hslot *hash; 65423 struct udp_hslot *hash2; 65424 unsigned int mask; 65425 unsigned int log; 65426 }; 65427 65428 struct fib_nh_exception { 65429 struct fib_nh_exception *fnhe_next; 65430 int fnhe_genid; 65431 __be32 fnhe_daddr; 65432 u32 fnhe_pmtu; 65433 bool fnhe_mtu_locked; 65434 __be32 fnhe_gw; 65435 long unsigned int fnhe_expires; 65436 struct rtable *fnhe_rth_input; 65437 struct rtable *fnhe_rth_output; 65438 long unsigned int fnhe_stamp; 65439 struct callback_head rcu; 65440 }; 65441 65442 struct rtable { 65443 struct dst_entry dst; 65444 int rt_genid; 65445 unsigned int rt_flags; 65446 __u16 rt_type; 65447 __u8 rt_is_input; 65448 __u8 rt_uses_gateway; 65449 int rt_iif; 65450 u8 rt_gw_family; 65451 union { 65452 __be32 rt_gw4; 65453 struct in6_addr rt_gw6; 65454 }; 65455 u32 rt_mtu_locked: 1; 65456 u32 rt_pmtu: 31; 65457 struct list_head rt_uncached; 65458 struct uncached_list *rt_uncached_list; 65459 }; 65460 65461 struct fnhe_hash_bucket { 65462 struct fib_nh_exception *chain; 65463 }; 65464 65465 struct rt6_exception_bucket { 65466 struct hlist_head chain; 65467 int depth; 65468 }; 65469 65470 struct xfrm_replay { 65471 void (*advance)(struct xfrm_state *, __be32); 65472 int (*check)(struct xfrm_state *, struct sk_buff *, __be32); 65473 int (*recheck)(struct xfrm_state *, struct sk_buff *, __be32); 65474 void (*notify)(struct xfrm_state *, int); 65475 int (*overflow)(struct xfrm_state *, struct sk_buff *); 65476 }; 65477 65478 struct xfrm_type { 65479 char *description; 65480 struct module *owner; 65481 u8 proto; 65482 u8 flags; 65483 int (*init_state)(struct xfrm_state *); 65484 void (*destructor)(struct xfrm_state *); 65485 int (*input)(struct xfrm_state *, struct sk_buff *); 65486 int (*output)(struct xfrm_state *, struct sk_buff *); 65487 int (*reject)(struct xfrm_state *, struct sk_buff *, const struct flowi *); 65488 int (*hdr_offset)(struct xfrm_state *, struct sk_buff *, u8 **); 65489 }; 65490 65491 struct xfrm_type_offload { 65492 char *description; 65493 struct module *owner; 65494 u8 proto; 65495 void (*encap)(struct xfrm_state *, struct sk_buff *); 65496 int (*input_tail)(struct xfrm_state *, struct sk_buff *); 65497 int (*xmit)(struct xfrm_state *, struct sk_buff *, netdev_features_t); 65498 }; 65499 65500 struct xfrm_dst { 65501 union { 65502 struct dst_entry dst; 65503 struct rtable rt; 65504 struct rt6_info rt6; 65505 } u; 65506 struct dst_entry *route; 65507 struct dst_entry *child; 65508 struct dst_entry *path; 65509 struct xfrm_policy *pols[2]; 65510 int num_pols; 65511 int num_xfrms; 65512 u32 xfrm_genid; 65513 u32 policy_genid; 65514 u32 route_mtu_cached; 65515 u32 child_mtu_cached; 65516 u32 route_cookie; 65517 u32 path_cookie; 65518 }; 65519 65520 struct xfrm_offload { 65521 struct { 65522 __u32 low; 65523 __u32 hi; 65524 } seq; 65525 __u32 flags; 65526 __u32 status; 65527 __u8 proto; 65528 }; 65529 65530 struct sec_path { 65531 int len; 65532 int olen; 65533 struct xfrm_state *xvec[6]; 65534 struct xfrm_offload ovec[1]; 65535 }; 65536 65537 struct udp_hslot { 65538 struct hlist_head head; 65539 int count; 65540 spinlock_t lock; 65541 }; 65542 65543 struct pkey_security_struct { 65544 u64 subnet_prefix; 65545 u16 pkey; 65546 u32 sid; 65547 }; 65548 65549 struct sel_ib_pkey_bkt { 65550 int size; 65551 struct list_head list; 65552 }; 65553 65554 struct sel_ib_pkey { 65555 struct pkey_security_struct psec; 65556 struct list_head list; 65557 struct callback_head rcu; 65558 }; 65559 65560 struct sockaddr_un { 65561 __kernel_sa_family_t sun_family; 65562 char sun_path[108]; 65563 }; 65564 65565 struct unix_address { 65566 refcount_t refcnt; 65567 int len; 65568 unsigned int hash; 65569 struct sockaddr_un name[0]; 65570 }; 65571 65572 struct scm_stat { 65573 atomic_t nr_fds; 65574 }; 65575 65576 struct unix_sock { 65577 struct sock sk; 65578 struct unix_address *addr; 65579 struct path path; 65580 struct mutex iolock; 65581 struct mutex bindlock; 65582 struct sock *peer; 65583 struct list_head link; 65584 atomic_long_t inflight; 65585 spinlock_t lock; 65586 long unsigned int gc_flags; 65587 struct socket_wq peer_wq; 65588 wait_queue_entry_t peer_wake; 65589 struct scm_stat scm_stat; 65590 long: 32; 65591 long: 64; 65592 long: 64; 65593 }; 65594 65595 struct ptrace_relation { 65596 struct task_struct *tracer; 65597 struct task_struct *tracee; 65598 bool invalid; 65599 struct list_head node; 65600 struct callback_head rcu; 65601 }; 65602 65603 struct access_report_info { 65604 struct callback_head work; 65605 const char *access; 65606 struct task_struct *target; 65607 struct task_struct *agent; 65608 }; 65609 65610 enum devcg_behavior { 65611 DEVCG_DEFAULT_NONE = 0, 65612 DEVCG_DEFAULT_ALLOW = 1, 65613 DEVCG_DEFAULT_DENY = 2, 65614 }; 65615 65616 struct dev_exception_item { 65617 u32 major; 65618 u32 minor; 65619 short int type; 65620 short int access; 65621 struct list_head list; 65622 struct callback_head rcu; 65623 }; 65624 65625 struct dev_cgroup { 65626 struct cgroup_subsys_state css; 65627 struct list_head exceptions; 65628 enum devcg_behavior behavior; 65629 }; 65630 65631 enum integrity_status { 65632 INTEGRITY_PASS = 0, 65633 INTEGRITY_PASS_IMMUTABLE = 1, 65634 INTEGRITY_FAIL = 2, 65635 INTEGRITY_NOLABEL = 3, 65636 INTEGRITY_NOXATTRS = 4, 65637 INTEGRITY_UNKNOWN = 5, 65638 }; 65639 65640 struct ima_digest_data { 65641 u8 algo; 65642 u8 length; 65643 union { 65644 struct { 65645 u8 unused; 65646 u8 type; 65647 } sha1; 65648 struct { 65649 u8 type; 65650 u8 algo; 65651 } ng; 65652 u8 data[2]; 65653 } xattr; 65654 u8 digest[0]; 65655 }; 65656 65657 struct integrity_iint_cache { 65658 struct rb_node rb_node; 65659 struct mutex mutex; 65660 struct inode *inode; 65661 u64 version; 65662 long unsigned int flags; 65663 long unsigned int measured_pcrs; 65664 long unsigned int atomic_flags; 65665 enum integrity_status ima_file_status: 4; 65666 enum integrity_status ima_mmap_status: 4; 65667 enum integrity_status ima_bprm_status: 4; 65668 enum integrity_status ima_read_status: 4; 65669 enum integrity_status ima_creds_status: 4; 65670 enum integrity_status evm_status: 4; 65671 struct ima_digest_data *ima_hash; 65672 }; 65673 65674 struct modsig; 65675 65676 struct asymmetric_key_id; 65677 65678 struct public_key_signature { 65679 struct asymmetric_key_id *auth_ids[2]; 65680 u8 *s; 65681 u32 s_size; 65682 u8 *digest; 65683 u8 digest_size; 65684 const char *pkey_algo; 65685 const char *hash_algo; 65686 const char *encoding; 65687 const void *data; 65688 unsigned int data_size; 65689 }; 65690 65691 struct asymmetric_key_id { 65692 short unsigned int len; 65693 unsigned char data[0]; 65694 }; 65695 65696 struct signature_v2_hdr { 65697 uint8_t type; 65698 uint8_t version; 65699 uint8_t hash_algo; 65700 __be32 keyid; 65701 __be16 sig_size; 65702 uint8_t sig[0]; 65703 } __attribute__((packed)); 65704 65705 typedef struct { 65706 efi_guid_t signature_owner; 65707 u8 signature_data[0]; 65708 } efi_signature_data_t; 65709 65710 typedef struct { 65711 efi_guid_t signature_type; 65712 u32 signature_list_size; 65713 u32 signature_header_size; 65714 u32 signature_size; 65715 u8 signature_header[0]; 65716 } efi_signature_list_t; 65717 65718 typedef void (*efi_element_handler_t)(const char *, const void *, size_t); 65719 65720 struct efi_mokvar_table_entry { 65721 char name[256]; 65722 u64 data_size; 65723 u8 data[0]; 65724 }; 65725 65726 struct tpm_digest { 65727 u16 alg_id; 65728 u8 digest[64]; 65729 }; 65730 65731 struct evm_ima_xattr_data { 65732 u8 type; 65733 u8 data[0]; 65734 }; 65735 65736 enum ima_show_type { 65737 IMA_SHOW_BINARY = 0, 65738 IMA_SHOW_BINARY_NO_FIELD_LEN = 1, 65739 IMA_SHOW_BINARY_OLD_STRING_FMT = 2, 65740 IMA_SHOW_ASCII = 3, 65741 }; 65742 65743 struct ima_event_data { 65744 struct integrity_iint_cache *iint; 65745 struct file *file; 65746 const unsigned char *filename; 65747 struct evm_ima_xattr_data *xattr_value; 65748 int xattr_len; 65749 const struct modsig *modsig; 65750 const char *violation; 65751 const void *buf; 65752 int buf_len; 65753 }; 65754 65755 struct ima_field_data { 65756 u8 *data; 65757 u32 len; 65758 }; 65759 65760 struct ima_template_field { 65761 const char field_id[16]; 65762 int (*field_init)(struct ima_event_data *, struct ima_field_data *); 65763 void (*field_show)(struct seq_file *, enum ima_show_type, struct ima_field_data *); 65764 }; 65765 65766 struct ima_template_desc { 65767 struct list_head list; 65768 char *name; 65769 char *fmt; 65770 int num_fields; 65771 const struct ima_template_field **fields; 65772 }; 65773 65774 struct ima_template_entry { 65775 int pcr; 65776 struct tpm_digest *digests; 65777 struct ima_template_desc *template_desc; 65778 u32 template_data_len; 65779 struct ima_field_data template_data[0]; 65780 }; 65781 65782 struct ima_queue_entry { 65783 struct hlist_node hnext; 65784 struct list_head later; 65785 struct ima_template_entry *entry; 65786 }; 65787 65788 struct ima_h_table { 65789 atomic_long_t len; 65790 atomic_long_t violations; 65791 struct hlist_head queue[1024]; 65792 }; 65793 65794 enum ima_fs_flags { 65795 IMA_FS_BUSY = 0, 65796 }; 65797 65798 struct hwrng { 65799 const char *name; 65800 int (*init)(struct hwrng *); 65801 void (*cleanup)(struct hwrng *); 65802 int (*data_present)(struct hwrng *, int); 65803 int (*data_read)(struct hwrng *, u32 *); 65804 int (*read)(struct hwrng *, void *, size_t, bool); 65805 long unsigned int priv; 65806 short unsigned int quality; 65807 struct list_head list; 65808 struct kref ref; 65809 struct completion cleanup_done; 65810 }; 65811 65812 struct tpm_bank_info { 65813 u16 alg_id; 65814 u16 digest_size; 65815 u16 crypto_id; 65816 }; 65817 65818 struct tpm_chip; 65819 65820 struct tpm_class_ops { 65821 unsigned int flags; 65822 const u8 req_complete_mask; 65823 const u8 req_complete_val; 65824 bool (*req_canceled)(struct tpm_chip *, u8); 65825 int (*recv)(struct tpm_chip *, u8 *, size_t); 65826 int (*send)(struct tpm_chip *, u8 *, size_t); 65827 void (*cancel)(struct tpm_chip *); 65828 u8 (*status)(struct tpm_chip *); 65829 void (*update_timeouts)(struct tpm_chip *, long unsigned int *); 65830 void (*update_durations)(struct tpm_chip *, long unsigned int *); 65831 int (*go_idle)(struct tpm_chip *); 65832 int (*cmd_ready)(struct tpm_chip *); 65833 int (*request_locality)(struct tpm_chip *, int); 65834 int (*relinquish_locality)(struct tpm_chip *, int); 65835 void (*clk_enable)(struct tpm_chip *, bool); 65836 }; 65837 65838 struct tpm_bios_log { 65839 void *bios_event_log; 65840 void *bios_event_log_end; 65841 }; 65842 65843 struct tpm_chip_seqops { 65844 struct tpm_chip *chip; 65845 const struct seq_operations *seqops; 65846 }; 65847 65848 struct tpm_space { 65849 u32 context_tbl[3]; 65850 u8 *context_buf; 65851 u32 session_tbl[3]; 65852 u8 *session_buf; 65853 u32 buf_size; 65854 }; 65855 65856 struct tpm_chip { 65857 struct device dev; 65858 struct device devs; 65859 struct cdev cdev; 65860 struct cdev cdevs; 65861 struct rw_semaphore ops_sem; 65862 const struct tpm_class_ops *ops; 65863 struct tpm_bios_log log; 65864 struct tpm_chip_seqops bin_log_seqops; 65865 struct tpm_chip_seqops ascii_log_seqops; 65866 unsigned int flags; 65867 int dev_num; 65868 long unsigned int is_open; 65869 char hwrng_name[64]; 65870 struct hwrng hwrng; 65871 struct mutex tpm_mutex; 65872 long unsigned int timeout_a; 65873 long unsigned int timeout_b; 65874 long unsigned int timeout_c; 65875 long unsigned int timeout_d; 65876 bool timeout_adjusted; 65877 long unsigned int duration[4]; 65878 bool duration_adjusted; 65879 struct dentry *bios_dir[3]; 65880 const struct attribute_group *groups[3]; 65881 unsigned int groups_cnt; 65882 u32 nr_allocated_banks; 65883 struct tpm_bank_info *allocated_banks; 65884 acpi_handle acpi_dev_handle; 65885 char ppi_version[4]; 65886 struct tpm_space work_space; 65887 u32 last_cc; 65888 u32 nr_commands; 65889 u32 *cc_attrs_tbl; 65890 int locality; 65891 }; 65892 65893 enum evm_ima_xattr_type { 65894 IMA_XATTR_DIGEST = 1, 65895 EVM_XATTR_HMAC = 2, 65896 EVM_IMA_XATTR_DIGSIG = 3, 65897 IMA_XATTR_DIGEST_NG = 4, 65898 EVM_XATTR_PORTABLE_DIGSIG = 5, 65899 IMA_XATTR_LAST = 6, 65900 }; 65901 65902 enum ima_hooks { 65903 NONE___2 = 0, 65904 FILE_CHECK = 1, 65905 MMAP_CHECK = 2, 65906 BPRM_CHECK = 3, 65907 CREDS_CHECK = 4, 65908 POST_SETATTR = 5, 65909 MODULE_CHECK = 6, 65910 FIRMWARE_CHECK = 7, 65911 KEXEC_KERNEL_CHECK = 8, 65912 KEXEC_INITRAMFS_CHECK = 9, 65913 POLICY_CHECK = 10, 65914 KEXEC_CMDLINE = 11, 65915 KEY_CHECK = 12, 65916 MAX_CHECK = 13, 65917 }; 65918 65919 enum tpm_algorithms { 65920 TPM_ALG_ERROR = 0, 65921 TPM_ALG_SHA1 = 4, 65922 TPM_ALG_KEYEDHASH = 8, 65923 TPM_ALG_SHA256 = 11, 65924 TPM_ALG_SHA384 = 12, 65925 TPM_ALG_SHA512 = 13, 65926 TPM_ALG_NULL = 16, 65927 TPM_ALG_SM3_256 = 18, 65928 }; 65929 65930 enum tpm_pcrs { 65931 TPM_PCR0 = 0, 65932 TPM_PCR8 = 8, 65933 TPM_PCR10 = 10, 65934 }; 65935 65936 struct ima_algo_desc { 65937 struct crypto_shash *tfm; 65938 enum hash_algo algo; 65939 }; 65940 65941 enum lsm_rule_types { 65942 LSM_OBJ_USER = 0, 65943 LSM_OBJ_ROLE = 1, 65944 LSM_OBJ_TYPE = 2, 65945 LSM_SUBJ_USER = 3, 65946 LSM_SUBJ_ROLE = 4, 65947 LSM_SUBJ_TYPE = 5, 65948 }; 65949 65950 enum policy_types { 65951 ORIGINAL_TCB = 1, 65952 DEFAULT_TCB = 2, 65953 }; 65954 65955 enum policy_rule_list { 65956 IMA_DEFAULT_POLICY = 1, 65957 IMA_CUSTOM_POLICY = 2, 65958 }; 65959 65960 struct ima_rule_opt_list { 65961 size_t count; 65962 char *items[0]; 65963 }; 65964 65965 struct ima_rule_entry { 65966 struct list_head list; 65967 int action; 65968 unsigned int flags; 65969 enum ima_hooks func; 65970 int mask; 65971 long unsigned int fsmagic; 65972 uuid_t fsuuid; 65973 kuid_t uid; 65974 kuid_t fowner; 65975 bool (*uid_op)(kuid_t, kuid_t); 65976 bool (*fowner_op)(kuid_t, kuid_t); 65977 int pcr; 65978 struct { 65979 void *rule; 65980 char *args_p; 65981 int type; 65982 } lsm[6]; 65983 char *fsname; 65984 struct ima_rule_opt_list *keyrings; 65985 struct ima_template_desc *template; 65986 }; 65987 65988 enum { 65989 Opt_measure = 0, 65990 Opt_dont_measure = 1, 65991 Opt_appraise = 2, 65992 Opt_dont_appraise = 3, 65993 Opt_audit = 4, 65994 Opt_hash___2 = 5, 65995 Opt_dont_hash = 6, 65996 Opt_obj_user = 7, 65997 Opt_obj_role = 8, 65998 Opt_obj_type = 9, 65999 Opt_subj_user = 10, 66000 Opt_subj_role = 11, 66001 Opt_subj_type = 12, 66002 Opt_func = 13, 66003 Opt_mask = 14, 66004 Opt_fsmagic = 15, 66005 Opt_fsname = 16, 66006 Opt_fsuuid = 17, 66007 Opt_uid_eq = 18, 66008 Opt_euid_eq = 19, 66009 Opt_fowner_eq = 20, 66010 Opt_uid_gt = 21, 66011 Opt_euid_gt = 22, 66012 Opt_fowner_gt = 23, 66013 Opt_uid_lt = 24, 66014 Opt_euid_lt = 25, 66015 Opt_fowner_lt = 26, 66016 Opt_appraise_type = 27, 66017 Opt_appraise_flag = 28, 66018 Opt_permit_directio = 29, 66019 Opt_pcr = 30, 66020 Opt_template = 31, 66021 Opt_keyrings = 32, 66022 Opt_err___9 = 33, 66023 }; 66024 66025 enum { 66026 mask_exec = 0, 66027 mask_write = 1, 66028 mask_read = 2, 66029 mask_append = 3, 66030 }; 66031 66032 struct ima_kexec_hdr { 66033 u16 version; 66034 u16 _reserved0; 66035 u32 _reserved1; 66036 u64 buffer_size; 66037 u64 count; 66038 }; 66039 66040 enum header_fields { 66041 HDR_PCR = 0, 66042 HDR_DIGEST = 1, 66043 HDR_TEMPLATE_NAME = 2, 66044 HDR_TEMPLATE_DATA = 3, 66045 HDR__LAST = 4, 66046 }; 66047 66048 enum data_formats { 66049 DATA_FMT_DIGEST = 0, 66050 DATA_FMT_DIGEST_WITH_ALGO = 1, 66051 DATA_FMT_STRING = 2, 66052 DATA_FMT_HEX = 3, 66053 }; 66054 66055 struct modsig___2 { 66056 struct pkcs7_message *pkcs7_msg; 66057 enum hash_algo hash_algo; 66058 const u8 *digest; 66059 u32 digest_size; 66060 int raw_pkcs7_len; 66061 u8 raw_pkcs7[0]; 66062 }; 66063 66064 struct ima_key_entry { 66065 struct list_head list; 66066 void *payload; 66067 size_t payload_len; 66068 char *keyring_name; 66069 }; 66070 66071 struct evm_xattr { 66072 struct evm_ima_xattr_data data; 66073 u8 digest[20]; 66074 }; 66075 66076 struct xattr_list { 66077 struct list_head list; 66078 char *name; 66079 }; 66080 66081 struct evm_digest { 66082 struct ima_digest_data hdr; 66083 char digest[64]; 66084 }; 66085 66086 struct h_misc { 66087 long unsigned int ino; 66088 __u32 generation; 66089 uid_t uid; 66090 gid_t gid; 66091 umode_t mode; 66092 }; 66093 66094 enum { 66095 CRYPTO_MSG_ALG_REQUEST = 0, 66096 CRYPTO_MSG_ALG_REGISTER = 1, 66097 CRYPTO_MSG_ALG_LOADED = 2, 66098 }; 66099 66100 struct crypto_larval { 66101 struct crypto_alg alg; 66102 struct crypto_alg *adult; 66103 struct completion completion; 66104 u32 mask; 66105 }; 66106 66107 struct crypto_cipher { 66108 struct crypto_tfm base; 66109 }; 66110 66111 enum { 66112 CRYPTOA_UNSPEC = 0, 66113 CRYPTOA_ALG = 1, 66114 CRYPTOA_TYPE = 2, 66115 CRYPTOA_U32 = 3, 66116 __CRYPTOA_MAX = 4, 66117 }; 66118 66119 struct crypto_attr_alg { 66120 char name[128]; 66121 }; 66122 66123 struct crypto_attr_type { 66124 u32 type; 66125 u32 mask; 66126 }; 66127 66128 struct crypto_attr_u32 { 66129 u32 num; 66130 }; 66131 66132 struct rtattr { 66133 short unsigned int rta_len; 66134 short unsigned int rta_type; 66135 }; 66136 66137 struct crypto_queue { 66138 struct list_head list; 66139 struct list_head *backlog; 66140 unsigned int qlen; 66141 unsigned int max_qlen; 66142 }; 66143 66144 enum { 66145 NAPI_STATE_SCHED = 0, 66146 NAPI_STATE_MISSED = 1, 66147 NAPI_STATE_DISABLE = 2, 66148 NAPI_STATE_NPSVC = 3, 66149 NAPI_STATE_LISTED = 4, 66150 NAPI_STATE_NO_BUSY_POLL = 5, 66151 NAPI_STATE_IN_BUSY_POLL = 6, 66152 NAPI_STATE_PREFER_BUSY_POLL = 7, 66153 }; 66154 66155 enum bpf_xdp_mode { 66156 XDP_MODE_SKB = 0, 66157 XDP_MODE_DRV = 1, 66158 XDP_MODE_HW = 2, 66159 __MAX_XDP_MODE = 3, 66160 }; 66161 66162 enum { 66163 NETIF_MSG_DRV_BIT = 0, 66164 NETIF_MSG_PROBE_BIT = 1, 66165 NETIF_MSG_LINK_BIT = 2, 66166 NETIF_MSG_TIMER_BIT = 3, 66167 NETIF_MSG_IFDOWN_BIT = 4, 66168 NETIF_MSG_IFUP_BIT = 5, 66169 NETIF_MSG_RX_ERR_BIT = 6, 66170 NETIF_MSG_TX_ERR_BIT = 7, 66171 NETIF_MSG_TX_QUEUED_BIT = 8, 66172 NETIF_MSG_INTR_BIT = 9, 66173 NETIF_MSG_TX_DONE_BIT = 10, 66174 NETIF_MSG_RX_STATUS_BIT = 11, 66175 NETIF_MSG_PKTDATA_BIT = 12, 66176 NETIF_MSG_HW_BIT = 13, 66177 NETIF_MSG_WOL_BIT = 14, 66178 NETIF_MSG_CLASS_COUNT = 15, 66179 }; 66180 66181 struct aead_instance { 66182 void (*free)(struct aead_instance *); 66183 union { 66184 struct { 66185 char head[64]; 66186 struct crypto_instance base; 66187 } s; 66188 struct aead_alg alg; 66189 }; 66190 }; 66191 66192 struct crypto_aead_spawn { 66193 struct crypto_spawn base; 66194 }; 66195 66196 enum crypto_attr_type_t { 66197 CRYPTOCFGA_UNSPEC = 0, 66198 CRYPTOCFGA_PRIORITY_VAL = 1, 66199 CRYPTOCFGA_REPORT_LARVAL = 2, 66200 CRYPTOCFGA_REPORT_HASH = 3, 66201 CRYPTOCFGA_REPORT_BLKCIPHER = 4, 66202 CRYPTOCFGA_REPORT_AEAD = 5, 66203 CRYPTOCFGA_REPORT_COMPRESS = 6, 66204 CRYPTOCFGA_REPORT_RNG = 7, 66205 CRYPTOCFGA_REPORT_CIPHER = 8, 66206 CRYPTOCFGA_REPORT_AKCIPHER = 9, 66207 CRYPTOCFGA_REPORT_KPP = 10, 66208 CRYPTOCFGA_REPORT_ACOMP = 11, 66209 CRYPTOCFGA_STAT_LARVAL = 12, 66210 CRYPTOCFGA_STAT_HASH = 13, 66211 CRYPTOCFGA_STAT_BLKCIPHER = 14, 66212 CRYPTOCFGA_STAT_AEAD = 15, 66213 CRYPTOCFGA_STAT_COMPRESS = 16, 66214 CRYPTOCFGA_STAT_RNG = 17, 66215 CRYPTOCFGA_STAT_CIPHER = 18, 66216 CRYPTOCFGA_STAT_AKCIPHER = 19, 66217 CRYPTOCFGA_STAT_KPP = 20, 66218 CRYPTOCFGA_STAT_ACOMP = 21, 66219 __CRYPTOCFGA_MAX = 22, 66220 }; 66221 66222 struct crypto_report_aead { 66223 char type[64]; 66224 char geniv[64]; 66225 unsigned int blocksize; 66226 unsigned int maxauthsize; 66227 unsigned int ivsize; 66228 }; 66229 66230 struct crypto_sync_skcipher; 66231 66232 struct aead_geniv_ctx { 66233 spinlock_t lock; 66234 struct crypto_aead *child; 66235 struct crypto_sync_skcipher *sknull; 66236 u8 salt[0]; 66237 }; 66238 66239 struct crypto_rng; 66240 66241 struct rng_alg { 66242 int (*generate)(struct crypto_rng *, const u8 *, unsigned int, u8 *, unsigned int); 66243 int (*seed)(struct crypto_rng *, const u8 *, unsigned int); 66244 void (*set_ent)(struct crypto_rng *, const u8 *, unsigned int); 66245 unsigned int seedsize; 66246 struct crypto_alg base; 66247 }; 66248 66249 struct crypto_rng { 66250 struct crypto_tfm base; 66251 }; 66252 66253 struct crypto_cipher_spawn { 66254 struct crypto_spawn base; 66255 }; 66256 66257 struct crypto_sync_skcipher { 66258 struct crypto_skcipher base; 66259 }; 66260 66261 struct skcipher_instance { 66262 void (*free)(struct skcipher_instance *); 66263 union { 66264 struct { 66265 char head[64]; 66266 struct crypto_instance base; 66267 } s; 66268 struct skcipher_alg alg; 66269 }; 66270 }; 66271 66272 struct crypto_skcipher_spawn { 66273 struct crypto_spawn base; 66274 }; 66275 66276 struct skcipher_ctx_simple { 66277 struct crypto_cipher *cipher; 66278 }; 66279 66280 struct crypto_report_blkcipher { 66281 char type[64]; 66282 char geniv[64]; 66283 unsigned int blocksize; 66284 unsigned int min_keysize; 66285 unsigned int max_keysize; 66286 unsigned int ivsize; 66287 }; 66288 66289 enum { 66290 SKCIPHER_WALK_PHYS = 1, 66291 SKCIPHER_WALK_SLOW = 2, 66292 SKCIPHER_WALK_COPY = 4, 66293 SKCIPHER_WALK_DIFF = 8, 66294 SKCIPHER_WALK_SLEEP = 16, 66295 }; 66296 66297 struct skcipher_walk_buffer { 66298 struct list_head entry; 66299 struct scatter_walk dst; 66300 unsigned int len; 66301 u8 *data; 66302 u8 buffer[0]; 66303 }; 66304 66305 struct ahash_alg { 66306 int (*init)(struct ahash_request *); 66307 int (*update)(struct ahash_request *); 66308 int (*final)(struct ahash_request *); 66309 int (*finup)(struct ahash_request *); 66310 int (*digest)(struct ahash_request *); 66311 int (*export)(struct ahash_request *, void *); 66312 int (*import)(struct ahash_request *, const void *); 66313 int (*setkey)(struct crypto_ahash *, const u8 *, unsigned int); 66314 int (*init_tfm)(struct crypto_ahash *); 66315 void (*exit_tfm)(struct crypto_ahash *); 66316 struct hash_alg_common halg; 66317 }; 66318 66319 struct crypto_hash_walk { 66320 char *data; 66321 unsigned int offset; 66322 unsigned int alignmask; 66323 struct page *pg; 66324 unsigned int entrylen; 66325 unsigned int total; 66326 struct scatterlist *sg; 66327 unsigned int flags; 66328 }; 66329 66330 struct ahash_instance { 66331 void (*free)(struct ahash_instance *); 66332 union { 66333 struct { 66334 char head[88]; 66335 struct crypto_instance base; 66336 } s; 66337 struct ahash_alg alg; 66338 }; 66339 }; 66340 66341 struct crypto_ahash_spawn { 66342 struct crypto_spawn base; 66343 }; 66344 66345 struct crypto_report_hash { 66346 char type[64]; 66347 unsigned int blocksize; 66348 unsigned int digestsize; 66349 }; 66350 66351 struct ahash_request_priv { 66352 crypto_completion_t complete; 66353 void *data; 66354 u8 *result; 66355 u32 flags; 66356 void *ubuf[0]; 66357 }; 66358 66359 struct shash_instance { 66360 void (*free)(struct shash_instance *); 66361 union { 66362 struct { 66363 char head[96]; 66364 struct crypto_instance base; 66365 } s; 66366 struct shash_alg alg; 66367 }; 66368 }; 66369 66370 struct crypto_shash_spawn { 66371 struct crypto_spawn base; 66372 }; 66373 66374 struct crypto_report_akcipher { 66375 char type[64]; 66376 }; 66377 66378 struct akcipher_request { 66379 struct crypto_async_request base; 66380 struct scatterlist *src; 66381 struct scatterlist *dst; 66382 unsigned int src_len; 66383 unsigned int dst_len; 66384 void *__ctx[0]; 66385 }; 66386 66387 struct crypto_akcipher { 66388 struct crypto_tfm base; 66389 }; 66390 66391 struct akcipher_alg { 66392 int (*sign)(struct akcipher_request *); 66393 int (*verify)(struct akcipher_request *); 66394 int (*encrypt)(struct akcipher_request *); 66395 int (*decrypt)(struct akcipher_request *); 66396 int (*set_pub_key)(struct crypto_akcipher *, const void *, unsigned int); 66397 int (*set_priv_key)(struct crypto_akcipher *, const void *, unsigned int); 66398 unsigned int (*max_size)(struct crypto_akcipher *); 66399 int (*init)(struct crypto_akcipher *); 66400 void (*exit)(struct crypto_akcipher *); 66401 unsigned int reqsize; 66402 struct crypto_alg base; 66403 }; 66404 66405 struct akcipher_instance { 66406 void (*free)(struct akcipher_instance *); 66407 union { 66408 struct { 66409 char head[80]; 66410 struct crypto_instance base; 66411 } s; 66412 struct akcipher_alg alg; 66413 }; 66414 }; 66415 66416 struct crypto_akcipher_spawn { 66417 struct crypto_spawn base; 66418 }; 66419 66420 struct crypto_report_kpp { 66421 char type[64]; 66422 }; 66423 66424 typedef long unsigned int mpi_limb_t; 66425 66426 struct gcry_mpi { 66427 int alloced; 66428 int nlimbs; 66429 int nbits; 66430 int sign; 66431 unsigned int flags; 66432 mpi_limb_t *d; 66433 }; 66434 66435 typedef struct gcry_mpi *MPI; 66436 66437 struct dh_ctx { 66438 MPI p; 66439 MPI q; 66440 MPI g; 66441 MPI xa; 66442 }; 66443 66444 enum { 66445 CRYPTO_KPP_SECRET_TYPE_UNKNOWN = 0, 66446 CRYPTO_KPP_SECRET_TYPE_DH = 1, 66447 CRYPTO_KPP_SECRET_TYPE_ECDH = 2, 66448 }; 66449 66450 struct kpp_secret { 66451 short unsigned int type; 66452 short unsigned int len; 66453 }; 66454 66455 enum asn1_class { 66456 ASN1_UNIV = 0, 66457 ASN1_APPL = 1, 66458 ASN1_CONT = 2, 66459 ASN1_PRIV = 3, 66460 }; 66461 66462 enum asn1_method { 66463 ASN1_PRIM = 0, 66464 ASN1_CONS = 1, 66465 }; 66466 66467 enum asn1_tag { 66468 ASN1_EOC = 0, 66469 ASN1_BOOL = 1, 66470 ASN1_INT = 2, 66471 ASN1_BTS = 3, 66472 ASN1_OTS = 4, 66473 ASN1_NULL = 5, 66474 ASN1_OID = 6, 66475 ASN1_ODE = 7, 66476 ASN1_EXT = 8, 66477 ASN1_REAL = 9, 66478 ASN1_ENUM = 10, 66479 ASN1_EPDV = 11, 66480 ASN1_UTF8STR = 12, 66481 ASN1_RELOID = 13, 66482 ASN1_SEQ = 16, 66483 ASN1_SET = 17, 66484 ASN1_NUMSTR = 18, 66485 ASN1_PRNSTR = 19, 66486 ASN1_TEXSTR = 20, 66487 ASN1_VIDSTR = 21, 66488 ASN1_IA5STR = 22, 66489 ASN1_UNITIM = 23, 66490 ASN1_GENTIM = 24, 66491 ASN1_GRASTR = 25, 66492 ASN1_VISSTR = 26, 66493 ASN1_GENSTR = 27, 66494 ASN1_UNISTR = 28, 66495 ASN1_CHRSTR = 29, 66496 ASN1_BMPSTR = 30, 66497 ASN1_LONG_TAG = 31, 66498 }; 66499 66500 typedef int (*asn1_action_t)(void *, size_t, unsigned char, const void *, size_t); 66501 66502 struct asn1_decoder { 66503 const unsigned char *machine; 66504 size_t machlen; 66505 const asn1_action_t *actions; 66506 }; 66507 66508 enum asn1_opcode { 66509 ASN1_OP_MATCH = 0, 66510 ASN1_OP_MATCH_OR_SKIP = 1, 66511 ASN1_OP_MATCH_ACT = 2, 66512 ASN1_OP_MATCH_ACT_OR_SKIP = 3, 66513 ASN1_OP_MATCH_JUMP = 4, 66514 ASN1_OP_MATCH_JUMP_OR_SKIP = 5, 66515 ASN1_OP_MATCH_ANY = 8, 66516 ASN1_OP_MATCH_ANY_OR_SKIP = 9, 66517 ASN1_OP_MATCH_ANY_ACT = 10, 66518 ASN1_OP_MATCH_ANY_ACT_OR_SKIP = 11, 66519 ASN1_OP_COND_MATCH_OR_SKIP = 17, 66520 ASN1_OP_COND_MATCH_ACT_OR_SKIP = 19, 66521 ASN1_OP_COND_MATCH_JUMP_OR_SKIP = 21, 66522 ASN1_OP_COND_MATCH_ANY = 24, 66523 ASN1_OP_COND_MATCH_ANY_OR_SKIP = 25, 66524 ASN1_OP_COND_MATCH_ANY_ACT = 26, 66525 ASN1_OP_COND_MATCH_ANY_ACT_OR_SKIP = 27, 66526 ASN1_OP_COND_FAIL = 28, 66527 ASN1_OP_COMPLETE = 29, 66528 ASN1_OP_ACT = 30, 66529 ASN1_OP_MAYBE_ACT = 31, 66530 ASN1_OP_END_SEQ = 32, 66531 ASN1_OP_END_SET = 33, 66532 ASN1_OP_END_SEQ_OF = 34, 66533 ASN1_OP_END_SET_OF = 35, 66534 ASN1_OP_END_SEQ_ACT = 36, 66535 ASN1_OP_END_SET_ACT = 37, 66536 ASN1_OP_END_SEQ_OF_ACT = 38, 66537 ASN1_OP_END_SET_OF_ACT = 39, 66538 ASN1_OP_RETURN = 40, 66539 ASN1_OP__NR = 41, 66540 }; 66541 66542 enum rsapubkey_actions { 66543 ACT_rsa_get_e = 0, 66544 ACT_rsa_get_n = 1, 66545 NR__rsapubkey_actions = 2, 66546 }; 66547 66548 enum rsaprivkey_actions { 66549 ACT_rsa_get_d = 0, 66550 ACT_rsa_get_dp = 1, 66551 ACT_rsa_get_dq = 2, 66552 ACT_rsa_get_e___2 = 3, 66553 ACT_rsa_get_n___2 = 4, 66554 ACT_rsa_get_p = 5, 66555 ACT_rsa_get_q = 6, 66556 ACT_rsa_get_qinv = 7, 66557 NR__rsaprivkey_actions = 8, 66558 }; 66559 66560 struct rsa_key { 66561 const u8 *n; 66562 const u8 *e; 66563 const u8 *d; 66564 const u8 *p; 66565 const u8 *q; 66566 const u8 *dp; 66567 const u8 *dq; 66568 const u8 *qinv; 66569 size_t n_sz; 66570 size_t e_sz; 66571 size_t d_sz; 66572 size_t p_sz; 66573 size_t q_sz; 66574 size_t dp_sz; 66575 size_t dq_sz; 66576 size_t qinv_sz; 66577 }; 66578 66579 struct rsa_mpi_key { 66580 MPI n; 66581 MPI e; 66582 MPI d; 66583 }; 66584 66585 struct asn1_decoder___2; 66586 66587 struct rsa_asn1_template { 66588 const char *name; 66589 const u8 *data; 66590 size_t size; 66591 }; 66592 66593 struct pkcs1pad_ctx { 66594 struct crypto_akcipher *child; 66595 unsigned int key_size; 66596 }; 66597 66598 struct pkcs1pad_inst_ctx { 66599 struct crypto_akcipher_spawn spawn; 66600 const struct rsa_asn1_template *digest_info; 66601 }; 66602 66603 struct pkcs1pad_request { 66604 struct scatterlist in_sg[2]; 66605 struct scatterlist out_sg[1]; 66606 uint8_t *in_buf; 66607 uint8_t *out_buf; 66608 struct akcipher_request child_req; 66609 }; 66610 66611 struct crypto_report_acomp { 66612 char type[64]; 66613 }; 66614 66615 struct acomp_alg { 66616 int (*compress)(struct acomp_req *); 66617 int (*decompress)(struct acomp_req *); 66618 void (*dst_free)(struct scatterlist *); 66619 int (*init)(struct crypto_acomp *); 66620 void (*exit)(struct crypto_acomp *); 66621 unsigned int reqsize; 66622 struct crypto_alg base; 66623 }; 66624 66625 struct crypto_report_comp { 66626 char type[64]; 66627 }; 66628 66629 struct crypto_scomp { 66630 struct crypto_tfm base; 66631 }; 66632 66633 struct scomp_alg { 66634 void * (*alloc_ctx)(struct crypto_scomp *); 66635 void (*free_ctx)(struct crypto_scomp *, void *); 66636 int (*compress)(struct crypto_scomp *, const u8 *, unsigned int, u8 *, unsigned int *, void *); 66637 int (*decompress)(struct crypto_scomp *, const u8 *, unsigned int, u8 *, unsigned int *, void *); 66638 struct crypto_alg base; 66639 }; 66640 66641 struct scomp_scratch { 66642 spinlock_t lock; 66643 void *src; 66644 void *dst; 66645 }; 66646 66647 struct cryptomgr_param { 66648 struct rtattr *tb[34]; 66649 struct { 66650 struct rtattr attr; 66651 struct crypto_attr_type data; 66652 } type; 66653 union { 66654 struct rtattr attr; 66655 struct { 66656 struct rtattr attr; 66657 struct crypto_attr_alg data; 66658 } alg; 66659 struct { 66660 struct rtattr attr; 66661 struct crypto_attr_u32 data; 66662 } nu32; 66663 } attrs[32]; 66664 char template[128]; 66665 struct crypto_larval *larval; 66666 u32 otype; 66667 u32 omask; 66668 }; 66669 66670 struct crypto_test_param { 66671 char driver[128]; 66672 char alg[128]; 66673 u32 type; 66674 }; 66675 66676 struct drbg_string { 66677 const unsigned char *buf; 66678 size_t len; 66679 struct list_head list; 66680 }; 66681 66682 struct drbg_test_data { 66683 struct drbg_string *testentropy; 66684 }; 66685 66686 enum OID { 66687 OID_id_dsa_with_sha1 = 0, 66688 OID_id_dsa = 1, 66689 OID_id_ecdsa_with_sha1 = 2, 66690 OID_id_ecPublicKey = 3, 66691 OID_rsaEncryption = 4, 66692 OID_md2WithRSAEncryption = 5, 66693 OID_md3WithRSAEncryption = 6, 66694 OID_md4WithRSAEncryption = 7, 66695 OID_sha1WithRSAEncryption = 8, 66696 OID_sha256WithRSAEncryption = 9, 66697 OID_sha384WithRSAEncryption = 10, 66698 OID_sha512WithRSAEncryption = 11, 66699 OID_sha224WithRSAEncryption = 12, 66700 OID_data = 13, 66701 OID_signed_data = 14, 66702 OID_email_address = 15, 66703 OID_contentType = 16, 66704 OID_messageDigest = 17, 66705 OID_signingTime = 18, 66706 OID_smimeCapabilites = 19, 66707 OID_smimeAuthenticatedAttrs = 20, 66708 OID_md2 = 21, 66709 OID_md4 = 22, 66710 OID_md5 = 23, 66711 OID_msIndirectData = 24, 66712 OID_msStatementType = 25, 66713 OID_msSpOpusInfo = 26, 66714 OID_msPeImageDataObjId = 27, 66715 OID_msIndividualSPKeyPurpose = 28, 66716 OID_msOutlookExpress = 29, 66717 OID_certAuthInfoAccess = 30, 66718 OID_sha1 = 31, 66719 OID_sha256 = 32, 66720 OID_sha384 = 33, 66721 OID_sha512 = 34, 66722 OID_sha224 = 35, 66723 OID_commonName = 36, 66724 OID_surname = 37, 66725 OID_countryName = 38, 66726 OID_locality = 39, 66727 OID_stateOrProvinceName = 40, 66728 OID_organizationName = 41, 66729 OID_organizationUnitName = 42, 66730 OID_title = 43, 66731 OID_description = 44, 66732 OID_name = 45, 66733 OID_givenName = 46, 66734 OID_initials = 47, 66735 OID_generationalQualifier = 48, 66736 OID_subjectKeyIdentifier = 49, 66737 OID_keyUsage = 50, 66738 OID_subjectAltName = 51, 66739 OID_issuerAltName = 52, 66740 OID_basicConstraints = 53, 66741 OID_crlDistributionPoints = 54, 66742 OID_certPolicies = 55, 66743 OID_authorityKeyIdentifier = 56, 66744 OID_extKeyUsage = 57, 66745 OID_gostCPSignA = 58, 66746 OID_gostCPSignB = 59, 66747 OID_gostCPSignC = 60, 66748 OID_gost2012PKey256 = 61, 66749 OID_gost2012PKey512 = 62, 66750 OID_gost2012Digest256 = 63, 66751 OID_gost2012Digest512 = 64, 66752 OID_gost2012Signature256 = 65, 66753 OID_gost2012Signature512 = 66, 66754 OID_gostTC26Sign256A = 67, 66755 OID_gostTC26Sign256B = 68, 66756 OID_gostTC26Sign256C = 69, 66757 OID_gostTC26Sign256D = 70, 66758 OID_gostTC26Sign512A = 71, 66759 OID_gostTC26Sign512B = 72, 66760 OID_gostTC26Sign512C = 73, 66761 OID_sm2 = 74, 66762 OID_sm3 = 75, 66763 OID_SM2_with_SM3 = 76, 66764 OID_sm3WithRSAEncryption = 77, 66765 OID__NR = 78, 66766 }; 66767 66768 struct hash_testvec { 66769 const char *key; 66770 const char *plaintext; 66771 const char *digest; 66772 unsigned int psize; 66773 short unsigned int ksize; 66774 int setkey_error; 66775 int digest_error; 66776 }; 66777 66778 struct cipher_testvec { 66779 const char *key; 66780 const char *iv; 66781 const char *iv_out; 66782 const char *ptext; 66783 const char *ctext; 66784 unsigned char wk; 66785 short unsigned int klen; 66786 unsigned int len; 66787 bool fips_skip; 66788 bool generates_iv; 66789 int setkey_error; 66790 int crypt_error; 66791 }; 66792 66793 struct aead_testvec { 66794 const char *key; 66795 const char *iv; 66796 const char *ptext; 66797 const char *assoc; 66798 const char *ctext; 66799 unsigned char novrfy; 66800 unsigned char wk; 66801 unsigned char klen; 66802 unsigned int plen; 66803 unsigned int clen; 66804 unsigned int alen; 66805 int setkey_error; 66806 int setauthsize_error; 66807 int crypt_error; 66808 }; 66809 66810 struct cprng_testvec { 66811 const char *key; 66812 const char *dt; 66813 const char *v; 66814 const char *result; 66815 unsigned char klen; 66816 short unsigned int dtlen; 66817 short unsigned int vlen; 66818 short unsigned int rlen; 66819 short unsigned int loops; 66820 }; 66821 66822 struct drbg_testvec { 66823 const unsigned char *entropy; 66824 size_t entropylen; 66825 const unsigned char *entpra; 66826 const unsigned char *entprb; 66827 size_t entprlen; 66828 const unsigned char *addtla; 66829 const unsigned char *addtlb; 66830 size_t addtllen; 66831 const unsigned char *pers; 66832 size_t perslen; 66833 const unsigned char *expected; 66834 size_t expectedlen; 66835 }; 66836 66837 struct akcipher_testvec { 66838 const unsigned char *key; 66839 const unsigned char *params; 66840 const unsigned char *m; 66841 const unsigned char *c; 66842 unsigned int key_len; 66843 unsigned int param_len; 66844 unsigned int m_size; 66845 unsigned int c_size; 66846 bool public_key_vec; 66847 bool siggen_sigver_test; 66848 enum OID algo; 66849 }; 66850 66851 struct kpp_testvec { 66852 const unsigned char *secret; 66853 const unsigned char *b_secret; 66854 const unsigned char *b_public; 66855 const unsigned char *expected_a_public; 66856 const unsigned char *expected_ss; 66857 short unsigned int secret_size; 66858 short unsigned int b_secret_size; 66859 short unsigned int b_public_size; 66860 short unsigned int expected_a_public_size; 66861 short unsigned int expected_ss_size; 66862 bool genkey; 66863 }; 66864 66865 struct comp_testvec { 66866 int inlen; 66867 int outlen; 66868 char input[512]; 66869 char output[512]; 66870 }; 66871 66872 struct aead_test_suite { 66873 const struct aead_testvec *vecs; 66874 unsigned int count; 66875 unsigned int einval_allowed: 1; 66876 unsigned int aad_iv: 1; 66877 }; 66878 66879 struct cipher_test_suite { 66880 const struct cipher_testvec *vecs; 66881 unsigned int count; 66882 }; 66883 66884 struct comp_test_suite { 66885 struct { 66886 const struct comp_testvec *vecs; 66887 unsigned int count; 66888 } comp; 66889 struct { 66890 const struct comp_testvec *vecs; 66891 unsigned int count; 66892 } decomp; 66893 }; 66894 66895 struct hash_test_suite { 66896 const struct hash_testvec *vecs; 66897 unsigned int count; 66898 }; 66899 66900 struct cprng_test_suite { 66901 const struct cprng_testvec *vecs; 66902 unsigned int count; 66903 }; 66904 66905 struct drbg_test_suite { 66906 const struct drbg_testvec *vecs; 66907 unsigned int count; 66908 }; 66909 66910 struct akcipher_test_suite { 66911 const struct akcipher_testvec *vecs; 66912 unsigned int count; 66913 }; 66914 66915 struct kpp_test_suite { 66916 const struct kpp_testvec *vecs; 66917 unsigned int count; 66918 }; 66919 66920 struct alg_test_desc { 66921 const char *alg; 66922 const char *generic_driver; 66923 int (*test)(const struct alg_test_desc *, const char *, u32, u32); 66924 int fips_allowed; 66925 union { 66926 struct aead_test_suite aead; 66927 struct cipher_test_suite cipher; 66928 struct comp_test_suite comp; 66929 struct hash_test_suite hash; 66930 struct cprng_test_suite cprng; 66931 struct drbg_test_suite drbg; 66932 struct akcipher_test_suite akcipher; 66933 struct kpp_test_suite kpp; 66934 } suite; 66935 }; 66936 66937 enum flush_type { 66938 FLUSH_TYPE_NONE = 0, 66939 FLUSH_TYPE_FLUSH = 1, 66940 FLUSH_TYPE_REIMPORT = 2, 66941 }; 66942 66943 enum finalization_type { 66944 FINALIZATION_TYPE_FINAL = 0, 66945 FINALIZATION_TYPE_FINUP = 1, 66946 FINALIZATION_TYPE_DIGEST = 2, 66947 }; 66948 66949 struct test_sg_division { 66950 unsigned int proportion_of_total; 66951 unsigned int offset; 66952 bool offset_relative_to_alignmask; 66953 enum flush_type flush_type; 66954 bool nosimd; 66955 }; 66956 66957 struct testvec_config { 66958 const char *name; 66959 bool inplace; 66960 u32 req_flags; 66961 struct test_sg_division src_divs[8]; 66962 struct test_sg_division dst_divs[8]; 66963 unsigned int iv_offset; 66964 unsigned int key_offset; 66965 bool iv_offset_relative_to_alignmask; 66966 bool key_offset_relative_to_alignmask; 66967 enum finalization_type finalization_type; 66968 bool nosimd; 66969 }; 66970 66971 struct test_sglist { 66972 char *bufs[8]; 66973 struct scatterlist sgl[8]; 66974 struct scatterlist sgl_saved[8]; 66975 struct scatterlist *sgl_ptr; 66976 unsigned int nents; 66977 }; 66978 66979 struct cipher_test_sglists { 66980 struct test_sglist src; 66981 struct test_sglist dst; 66982 }; 66983 66984 struct hmac_ctx { 66985 struct crypto_shash *hash; 66986 }; 66987 66988 struct md5_state { 66989 u32 hash[4]; 66990 u32 block[16]; 66991 u64 byte_count; 66992 }; 66993 66994 struct sha1_state { 66995 u32 state[5]; 66996 u64 count; 66997 u8 buffer[64]; 66998 }; 66999 67000 typedef void sha1_block_fn(struct sha1_state *, const u8 *, int); 67001 67002 struct sha256_state { 67003 u32 state[8]; 67004 u64 count; 67005 u8 buf[64]; 67006 }; 67007 67008 struct sha512_state { 67009 u64 state[8]; 67010 u64 count[2]; 67011 u8 buf[128]; 67012 }; 67013 67014 typedef void sha512_block_fn(struct sha512_state *, const u8 *, int); 67015 67016 enum blake2b_constant { 67017 BLAKE2B_BLOCKBYTES = 128, 67018 BLAKE2B_KEYBYTES = 64, 67019 }; 67020 67021 struct blake2b_state { 67022 u64 h[8]; 67023 u64 t[2]; 67024 u64 f[2]; 67025 u8 buf[128]; 67026 size_t buflen; 67027 }; 67028 67029 struct blake2b_tfm_ctx { 67030 u8 key[64]; 67031 unsigned int keylen; 67032 }; 67033 67034 struct gf128mul_4k { 67035 be128 t[256]; 67036 }; 67037 67038 struct gf128mul_64k { 67039 struct gf128mul_4k *t[16]; 67040 }; 67041 67042 struct crypto_cts_ctx { 67043 struct crypto_skcipher *child; 67044 }; 67045 67046 struct crypto_cts_reqctx { 67047 struct scatterlist sg[2]; 67048 unsigned int offset; 67049 struct skcipher_request subreq; 67050 }; 67051 67052 struct lrw_tfm_ctx { 67053 struct crypto_skcipher *child; 67054 struct gf128mul_64k *table; 67055 be128 mulinc[128]; 67056 }; 67057 67058 struct lrw_request_ctx { 67059 be128 t; 67060 struct skcipher_request subreq; 67061 }; 67062 67063 struct xts_tfm_ctx { 67064 struct crypto_skcipher *child; 67065 struct crypto_cipher *tweak; 67066 }; 67067 67068 struct xts_instance_ctx { 67069 struct crypto_skcipher_spawn spawn; 67070 char name[128]; 67071 }; 67072 67073 struct xts_request_ctx { 67074 le128 t; 67075 struct scatterlist *tail; 67076 struct scatterlist sg[2]; 67077 struct skcipher_request subreq; 67078 }; 67079 67080 struct crypto_rfc3686_ctx { 67081 struct crypto_skcipher *child; 67082 u8 nonce[4]; 67083 }; 67084 67085 struct crypto_rfc3686_req_ctx { 67086 u8 iv[16]; 67087 struct skcipher_request subreq; 67088 }; 67089 67090 struct gcm_instance_ctx { 67091 struct crypto_skcipher_spawn ctr; 67092 struct crypto_ahash_spawn ghash; 67093 }; 67094 67095 struct crypto_gcm_ctx { 67096 struct crypto_skcipher *ctr; 67097 struct crypto_ahash *ghash; 67098 }; 67099 67100 struct crypto_rfc4106_ctx { 67101 struct crypto_aead *child; 67102 u8 nonce[4]; 67103 }; 67104 67105 struct crypto_rfc4106_req_ctx { 67106 struct scatterlist src[3]; 67107 struct scatterlist dst[3]; 67108 struct aead_request subreq; 67109 }; 67110 67111 struct crypto_rfc4543_instance_ctx { 67112 struct crypto_aead_spawn aead; 67113 }; 67114 67115 struct crypto_rfc4543_ctx { 67116 struct crypto_aead *child; 67117 struct crypto_sync_skcipher *null; 67118 u8 nonce[4]; 67119 }; 67120 67121 struct crypto_rfc4543_req_ctx { 67122 struct aead_request subreq; 67123 }; 67124 67125 struct crypto_gcm_ghash_ctx { 67126 unsigned int cryptlen; 67127 struct scatterlist *src; 67128 int (*complete)(struct aead_request *, u32); 67129 }; 67130 67131 struct crypto_gcm_req_priv_ctx { 67132 u8 iv[16]; 67133 u8 auth_tag[16]; 67134 u8 iauth_tag[16]; 67135 struct scatterlist src[3]; 67136 struct scatterlist dst[3]; 67137 struct scatterlist sg; 67138 struct crypto_gcm_ghash_ctx ghash_ctx; 67139 union { 67140 struct ahash_request ahreq; 67141 struct skcipher_request skreq; 67142 } u; 67143 }; 67144 67145 struct cryptd_skcipher { 67146 struct crypto_skcipher base; 67147 }; 67148 67149 struct cryptd_ahash { 67150 struct crypto_ahash base; 67151 }; 67152 67153 struct cryptd_aead { 67154 struct crypto_aead base; 67155 }; 67156 67157 struct cryptd_cpu_queue { 67158 struct crypto_queue queue; 67159 struct work_struct work; 67160 }; 67161 67162 struct cryptd_queue { 67163 struct cryptd_cpu_queue *cpu_queue; 67164 }; 67165 67166 struct cryptd_instance_ctx { 67167 struct crypto_spawn spawn; 67168 struct cryptd_queue *queue; 67169 }; 67170 67171 struct skcipherd_instance_ctx { 67172 struct crypto_skcipher_spawn spawn; 67173 struct cryptd_queue *queue; 67174 }; 67175 67176 struct hashd_instance_ctx { 67177 struct crypto_shash_spawn spawn; 67178 struct cryptd_queue *queue; 67179 }; 67180 67181 struct aead_instance_ctx { 67182 struct crypto_aead_spawn aead_spawn; 67183 struct cryptd_queue *queue; 67184 }; 67185 67186 struct cryptd_skcipher_ctx { 67187 refcount_t refcnt; 67188 struct crypto_sync_skcipher *child; 67189 }; 67190 67191 struct cryptd_skcipher_request_ctx { 67192 crypto_completion_t complete; 67193 }; 67194 67195 struct cryptd_hash_ctx { 67196 refcount_t refcnt; 67197 struct crypto_shash *child; 67198 }; 67199 67200 struct cryptd_hash_request_ctx { 67201 crypto_completion_t complete; 67202 struct shash_desc desc; 67203 }; 67204 67205 struct cryptd_aead_ctx { 67206 refcount_t refcnt; 67207 struct crypto_aead *child; 67208 }; 67209 67210 struct cryptd_aead_request_ctx { 67211 crypto_completion_t complete; 67212 }; 67213 67214 struct deflate_ctx { 67215 struct z_stream_s comp_stream; 67216 struct z_stream_s decomp_stream; 67217 }; 67218 67219 struct chksum_ctx { 67220 u32 key; 67221 }; 67222 67223 struct chksum_desc_ctx { 67224 u32 crc; 67225 }; 67226 67227 struct chksum_desc_ctx___2 { 67228 __u16 crc; 67229 }; 67230 67231 struct lzo_ctx { 67232 void *lzo_comp_mem; 67233 }; 67234 67235 struct lzorle_ctx { 67236 void *lzorle_comp_mem; 67237 }; 67238 67239 struct xxh64_state { 67240 uint64_t total_len; 67241 uint64_t v1; 67242 uint64_t v2; 67243 uint64_t v3; 67244 uint64_t v4; 67245 uint64_t mem64[4]; 67246 uint32_t memsize; 67247 }; 67248 67249 struct xxhash64_tfm_ctx { 67250 u64 seed; 67251 }; 67252 67253 struct xxhash64_desc_ctx { 67254 struct xxh64_state xxhstate; 67255 }; 67256 67257 struct crypto842_ctx { 67258 void *wmem; 67259 }; 67260 67261 struct crypto_report_rng { 67262 char type[64]; 67263 unsigned int seedsize; 67264 }; 67265 67266 struct random_ready_callback { 67267 struct list_head list; 67268 void (*func)(struct random_ready_callback *); 67269 struct module *owner; 67270 }; 67271 67272 typedef uint32_t drbg_flag_t; 67273 67274 struct drbg_core { 67275 drbg_flag_t flags; 67276 __u8 statelen; 67277 __u8 blocklen_bytes; 67278 char cra_name[128]; 67279 char backend_cra_name[128]; 67280 }; 67281 67282 struct drbg_state; 67283 67284 struct drbg_state_ops { 67285 int (*update)(struct drbg_state *, struct list_head *, int); 67286 int (*generate)(struct drbg_state *, unsigned char *, unsigned int, struct list_head *); 67287 int (*crypto_init)(struct drbg_state *); 67288 int (*crypto_fini)(struct drbg_state *); 67289 }; 67290 67291 struct drbg_state { 67292 struct mutex drbg_mutex; 67293 unsigned char *V; 67294 unsigned char *Vbuf; 67295 unsigned char *C; 67296 unsigned char *Cbuf; 67297 size_t reseed_ctr; 67298 size_t reseed_threshold; 67299 unsigned char *scratchpad; 67300 unsigned char *scratchpadbuf; 67301 void *priv_data; 67302 struct crypto_skcipher *ctr_handle; 67303 struct skcipher_request *ctr_req; 67304 __u8 *outscratchpadbuf; 67305 __u8 *outscratchpad; 67306 struct crypto_wait ctr_wait; 67307 struct scatterlist sg_in; 67308 struct scatterlist sg_out; 67309 bool seeded; 67310 bool pr; 67311 bool fips_primed; 67312 unsigned char *prev; 67313 struct work_struct seed_work; 67314 struct crypto_rng *jent; 67315 const struct drbg_state_ops *d_ops; 67316 const struct drbg_core *core; 67317 struct drbg_string test_data; 67318 struct random_ready_callback random_ready; 67319 }; 67320 67321 enum drbg_prefixes { 67322 DRBG_PREFIX0 = 0, 67323 DRBG_PREFIX1 = 1, 67324 DRBG_PREFIX2 = 2, 67325 DRBG_PREFIX3 = 3, 67326 }; 67327 67328 struct sdesc { 67329 struct shash_desc shash; 67330 char ctx[0]; 67331 }; 67332 67333 struct s { 67334 __be32 conv; 67335 }; 67336 67337 struct rand_data { 67338 __u64 data; 67339 __u64 old_data; 67340 __u64 prev_time; 67341 __u64 last_delta; 67342 __s64 last_delta2; 67343 unsigned int osr; 67344 unsigned char *mem; 67345 unsigned int memlocation; 67346 unsigned int memblocks; 67347 unsigned int memblocksize; 67348 unsigned int memaccessloops; 67349 int rct_count; 67350 unsigned int apt_observations; 67351 unsigned int apt_count; 67352 unsigned int apt_base; 67353 unsigned int apt_base_set: 1; 67354 unsigned int health_failure: 1; 67355 }; 67356 67357 struct rand_data___2; 67358 67359 struct jitterentropy { 67360 spinlock_t jent_lock; 67361 struct rand_data___2 *entropy_collector; 67362 unsigned int reset_cnt; 67363 }; 67364 67365 struct ghash_ctx { 67366 struct gf128mul_4k *gf128; 67367 }; 67368 67369 struct ghash_desc_ctx { 67370 u8 buffer[16]; 67371 u32 bytes; 67372 }; 67373 67374 struct sockaddr_alg_new { 67375 __u16 salg_family; 67376 __u8 salg_type[14]; 67377 __u32 salg_feat; 67378 __u32 salg_mask; 67379 __u8 salg_name[0]; 67380 }; 67381 67382 struct af_alg_iv { 67383 __u32 ivlen; 67384 __u8 iv[0]; 67385 }; 67386 67387 struct cmsghdr { 67388 __kernel_size_t cmsg_len; 67389 int cmsg_level; 67390 int cmsg_type; 67391 }; 67392 67393 struct net_proto_family { 67394 int family; 67395 int (*create)(struct net *, struct socket *, int, int); 67396 struct module *owner; 67397 }; 67398 67399 enum { 67400 SOCK_WAKE_IO = 0, 67401 SOCK_WAKE_WAITD = 1, 67402 SOCK_WAKE_SPACE = 2, 67403 SOCK_WAKE_URG = 3, 67404 }; 67405 67406 struct af_alg_type; 67407 67408 struct alg_sock { 67409 struct sock sk; 67410 struct sock *parent; 67411 atomic_t refcnt; 67412 atomic_t nokey_refcnt; 67413 const struct af_alg_type *type; 67414 void *private; 67415 }; 67416 67417 struct af_alg_type { 67418 void * (*bind)(const char *, u32, u32); 67419 void (*release)(void *); 67420 int (*setkey)(void *, const u8 *, unsigned int); 67421 int (*setentropy)(void *, sockptr_t, unsigned int); 67422 int (*accept)(void *, struct sock *); 67423 int (*accept_nokey)(void *, struct sock *); 67424 int (*setauthsize)(void *, unsigned int); 67425 struct proto_ops *ops; 67426 struct proto_ops *ops_nokey; 67427 struct module *owner; 67428 char name[14]; 67429 }; 67430 67431 struct af_alg_control { 67432 struct af_alg_iv *iv; 67433 int op; 67434 unsigned int aead_assoclen; 67435 }; 67436 67437 struct af_alg_sgl { 67438 struct scatterlist sg[17]; 67439 struct page *pages[16]; 67440 unsigned int npages; 67441 }; 67442 67443 struct af_alg_tsgl { 67444 struct list_head list; 67445 unsigned int cur; 67446 struct scatterlist sg[0]; 67447 }; 67448 67449 struct af_alg_rsgl { 67450 struct af_alg_sgl sgl; 67451 struct list_head list; 67452 size_t sg_num_bytes; 67453 }; 67454 67455 struct af_alg_async_req { 67456 struct kiocb *iocb; 67457 struct sock *sk; 67458 struct af_alg_rsgl first_rsgl; 67459 struct af_alg_rsgl *last_rsgl; 67460 struct list_head rsgl_list; 67461 struct scatterlist *tsgl; 67462 unsigned int tsgl_entries; 67463 unsigned int outlen; 67464 unsigned int areqlen; 67465 union { 67466 struct aead_request aead_req; 67467 struct skcipher_request skcipher_req; 67468 } cra_u; 67469 }; 67470 67471 struct af_alg_ctx { 67472 struct list_head tsgl_list; 67473 void *iv; 67474 size_t aead_assoclen; 67475 struct crypto_wait wait; 67476 size_t used; 67477 atomic_t rcvused; 67478 bool more; 67479 bool merge; 67480 bool enc; 67481 bool init; 67482 unsigned int len; 67483 }; 67484 67485 struct alg_type_list { 67486 const struct af_alg_type *type; 67487 struct list_head list; 67488 }; 67489 67490 struct hash_ctx { 67491 struct af_alg_sgl sgl; 67492 u8 *result; 67493 struct crypto_wait wait; 67494 unsigned int len; 67495 bool more; 67496 struct ahash_request req; 67497 }; 67498 67499 struct rng_ctx { 67500 unsigned int len; 67501 struct crypto_rng *drng; 67502 u8 *addtl; 67503 size_t addtl_len; 67504 }; 67505 67506 struct rng_parent_ctx { 67507 struct crypto_rng *drng; 67508 u8 *entropy; 67509 }; 67510 67511 struct aead_tfm { 67512 struct crypto_aead *aead; 67513 struct crypto_sync_skcipher *null_tfm; 67514 }; 67515 67516 struct xor_block_template { 67517 struct xor_block_template *next; 67518 const char *name; 67519 int speed; 67520 void (*do_2)(long unsigned int, long unsigned int *, long unsigned int *); 67521 void (*do_3)(long unsigned int, long unsigned int *, long unsigned int *, long unsigned int *); 67522 void (*do_4)(long unsigned int, long unsigned int *, long unsigned int *, long unsigned int *, long unsigned int *); 67523 void (*do_5)(long unsigned int, long unsigned int *, long unsigned int *, long unsigned int *, long unsigned int *, long unsigned int *); 67524 }; 67525 67526 enum asymmetric_payload_bits { 67527 asym_crypto = 0, 67528 asym_subtype = 1, 67529 asym_key_ids = 2, 67530 asym_auth = 3, 67531 }; 67532 67533 struct asymmetric_key_ids { 67534 void *id[2]; 67535 }; 67536 67537 struct asymmetric_key_subtype { 67538 struct module *owner; 67539 const char *name; 67540 short unsigned int name_len; 67541 void (*describe)(const struct key *, struct seq_file *); 67542 void (*destroy)(void *, void *); 67543 int (*query)(const struct kernel_pkey_params *, struct kernel_pkey_query *); 67544 int (*eds_op)(struct kernel_pkey_params *, const void *, void *); 67545 int (*verify_signature)(const struct key *, const struct public_key_signature *); 67546 }; 67547 67548 struct asymmetric_key_parser { 67549 struct list_head link; 67550 struct module *owner; 67551 const char *name; 67552 int (*parse)(struct key_preparsed_payload *); 67553 }; 67554 67555 struct public_key { 67556 void *key; 67557 u32 keylen; 67558 enum OID algo; 67559 void *params; 67560 u32 paramlen; 67561 bool key_is_private; 67562 const char *id_type; 67563 const char *pkey_algo; 67564 }; 67565 67566 enum x509_actions { 67567 ACT_x509_extract_key_data = 0, 67568 ACT_x509_extract_name_segment = 1, 67569 ACT_x509_note_OID = 2, 67570 ACT_x509_note_issuer = 3, 67571 ACT_x509_note_not_after = 4, 67572 ACT_x509_note_not_before = 5, 67573 ACT_x509_note_params = 6, 67574 ACT_x509_note_pkey_algo = 7, 67575 ACT_x509_note_serial = 8, 67576 ACT_x509_note_signature = 9, 67577 ACT_x509_note_subject = 10, 67578 ACT_x509_note_tbs_certificate = 11, 67579 ACT_x509_process_extension = 12, 67580 NR__x509_actions = 13, 67581 }; 67582 67583 enum x509_akid_actions { 67584 ACT_x509_akid_note_kid = 0, 67585 ACT_x509_akid_note_name = 1, 67586 ACT_x509_akid_note_serial = 2, 67587 ACT_x509_extract_name_segment___2 = 3, 67588 ACT_x509_note_OID___2 = 4, 67589 NR__x509_akid_actions = 5, 67590 }; 67591 67592 struct x509_certificate { 67593 struct x509_certificate *next; 67594 struct x509_certificate *signer; 67595 struct public_key *pub; 67596 struct public_key_signature *sig; 67597 char *issuer; 67598 char *subject; 67599 struct asymmetric_key_id *id; 67600 struct asymmetric_key_id *skid; 67601 time64_t valid_from; 67602 time64_t valid_to; 67603 const void *tbs; 67604 unsigned int tbs_size; 67605 unsigned int raw_sig_size; 67606 const void *raw_sig; 67607 const void *raw_serial; 67608 unsigned int raw_serial_size; 67609 unsigned int raw_issuer_size; 67610 const void *raw_issuer; 67611 const void *raw_subject; 67612 unsigned int raw_subject_size; 67613 unsigned int raw_skid_size; 67614 const void *raw_skid; 67615 unsigned int index; 67616 bool seen; 67617 bool verified; 67618 bool self_signed; 67619 bool unsupported_key; 67620 bool unsupported_sig; 67621 bool blacklisted; 67622 }; 67623 67624 struct x509_parse_context { 67625 struct x509_certificate *cert; 67626 long unsigned int data; 67627 const void *cert_start; 67628 const void *key; 67629 size_t key_size; 67630 const void *params; 67631 size_t params_size; 67632 enum OID key_algo; 67633 enum OID last_oid; 67634 enum OID algo_oid; 67635 unsigned char nr_mpi; 67636 u8 o_size; 67637 u8 cn_size; 67638 u8 email_size; 67639 u16 o_offset; 67640 u16 cn_offset; 67641 u16 email_offset; 67642 unsigned int raw_akid_size; 67643 const void *raw_akid; 67644 const void *akid_raw_issuer; 67645 unsigned int akid_raw_issuer_size; 67646 }; 67647 67648 enum pkcs7_actions { 67649 ACT_pkcs7_check_content_type = 0, 67650 ACT_pkcs7_extract_cert = 1, 67651 ACT_pkcs7_note_OID = 2, 67652 ACT_pkcs7_note_certificate_list = 3, 67653 ACT_pkcs7_note_content = 4, 67654 ACT_pkcs7_note_data = 5, 67655 ACT_pkcs7_note_signed_info = 6, 67656 ACT_pkcs7_note_signeddata_version = 7, 67657 ACT_pkcs7_note_signerinfo_version = 8, 67658 ACT_pkcs7_sig_note_authenticated_attr = 9, 67659 ACT_pkcs7_sig_note_digest_algo = 10, 67660 ACT_pkcs7_sig_note_issuer = 11, 67661 ACT_pkcs7_sig_note_pkey_algo = 12, 67662 ACT_pkcs7_sig_note_serial = 13, 67663 ACT_pkcs7_sig_note_set_of_authattrs = 14, 67664 ACT_pkcs7_sig_note_signature = 15, 67665 ACT_pkcs7_sig_note_skid = 16, 67666 NR__pkcs7_actions = 17, 67667 }; 67668 67669 struct pkcs7_signed_info { 67670 struct pkcs7_signed_info *next; 67671 struct x509_certificate *signer; 67672 unsigned int index; 67673 bool unsupported_crypto; 67674 bool blacklisted; 67675 const void *msgdigest; 67676 unsigned int msgdigest_len; 67677 unsigned int authattrs_len; 67678 const void *authattrs; 67679 long unsigned int aa_set; 67680 time64_t signing_time; 67681 struct public_key_signature *sig; 67682 }; 67683 67684 struct pkcs7_message___2 { 67685 struct x509_certificate *certs; 67686 struct x509_certificate *crl; 67687 struct pkcs7_signed_info *signed_infos; 67688 u8 version; 67689 bool have_authattrs; 67690 enum OID data_type; 67691 size_t data_len; 67692 size_t data_hdrlen; 67693 const void *data; 67694 }; 67695 67696 struct pkcs7_parse_context { 67697 struct pkcs7_message___2 *msg; 67698 struct pkcs7_signed_info *sinfo; 67699 struct pkcs7_signed_info **ppsinfo; 67700 struct x509_certificate *certs; 67701 struct x509_certificate **ppcerts; 67702 long unsigned int data; 67703 enum OID last_oid; 67704 unsigned int x509_index; 67705 unsigned int sinfo_index; 67706 const void *raw_serial; 67707 unsigned int raw_serial_size; 67708 unsigned int raw_issuer_size; 67709 const void *raw_issuer; 67710 const void *raw_skid; 67711 unsigned int raw_skid_size; 67712 bool expect_skid; 67713 }; 67714 67715 struct mz_hdr { 67716 uint16_t magic; 67717 uint16_t lbsize; 67718 uint16_t blocks; 67719 uint16_t relocs; 67720 uint16_t hdrsize; 67721 uint16_t min_extra_pps; 67722 uint16_t max_extra_pps; 67723 uint16_t ss; 67724 uint16_t sp; 67725 uint16_t checksum; 67726 uint16_t ip; 67727 uint16_t cs; 67728 uint16_t reloc_table_offset; 67729 uint16_t overlay_num; 67730 uint16_t reserved0[4]; 67731 uint16_t oem_id; 67732 uint16_t oem_info; 67733 uint16_t reserved1[10]; 67734 uint32_t peaddr; 67735 char message[0]; 67736 }; 67737 67738 struct pe_hdr { 67739 uint32_t magic; 67740 uint16_t machine; 67741 uint16_t sections; 67742 uint32_t timestamp; 67743 uint32_t symbol_table; 67744 uint32_t symbols; 67745 uint16_t opt_hdr_size; 67746 uint16_t flags; 67747 }; 67748 67749 struct pe32_opt_hdr { 67750 uint16_t magic; 67751 uint8_t ld_major; 67752 uint8_t ld_minor; 67753 uint32_t text_size; 67754 uint32_t data_size; 67755 uint32_t bss_size; 67756 uint32_t entry_point; 67757 uint32_t code_base; 67758 uint32_t data_base; 67759 uint32_t image_base; 67760 uint32_t section_align; 67761 uint32_t file_align; 67762 uint16_t os_major; 67763 uint16_t os_minor; 67764 uint16_t image_major; 67765 uint16_t image_minor; 67766 uint16_t subsys_major; 67767 uint16_t subsys_minor; 67768 uint32_t win32_version; 67769 uint32_t image_size; 67770 uint32_t header_size; 67771 uint32_t csum; 67772 uint16_t subsys; 67773 uint16_t dll_flags; 67774 uint32_t stack_size_req; 67775 uint32_t stack_size; 67776 uint32_t heap_size_req; 67777 uint32_t heap_size; 67778 uint32_t loader_flags; 67779 uint32_t data_dirs; 67780 }; 67781 67782 struct pe32plus_opt_hdr { 67783 uint16_t magic; 67784 uint8_t ld_major; 67785 uint8_t ld_minor; 67786 uint32_t text_size; 67787 uint32_t data_size; 67788 uint32_t bss_size; 67789 uint32_t entry_point; 67790 uint32_t code_base; 67791 uint64_t image_base; 67792 uint32_t section_align; 67793 uint32_t file_align; 67794 uint16_t os_major; 67795 uint16_t os_minor; 67796 uint16_t image_major; 67797 uint16_t image_minor; 67798 uint16_t subsys_major; 67799 uint16_t subsys_minor; 67800 uint32_t win32_version; 67801 uint32_t image_size; 67802 uint32_t header_size; 67803 uint32_t csum; 67804 uint16_t subsys; 67805 uint16_t dll_flags; 67806 uint64_t stack_size_req; 67807 uint64_t stack_size; 67808 uint64_t heap_size_req; 67809 uint64_t heap_size; 67810 uint32_t loader_flags; 67811 uint32_t data_dirs; 67812 }; 67813 67814 struct data_dirent { 67815 uint32_t virtual_address; 67816 uint32_t size; 67817 }; 67818 67819 struct data_directory { 67820 struct data_dirent exports; 67821 struct data_dirent imports; 67822 struct data_dirent resources; 67823 struct data_dirent exceptions; 67824 struct data_dirent certs; 67825 struct data_dirent base_relocations; 67826 struct data_dirent debug; 67827 struct data_dirent arch; 67828 struct data_dirent global_ptr; 67829 struct data_dirent tls; 67830 struct data_dirent load_config; 67831 struct data_dirent bound_imports; 67832 struct data_dirent import_addrs; 67833 struct data_dirent delay_imports; 67834 struct data_dirent clr_runtime_hdr; 67835 struct data_dirent reserved; 67836 }; 67837 67838 struct section_header { 67839 char name[8]; 67840 uint32_t virtual_size; 67841 uint32_t virtual_address; 67842 uint32_t raw_data_size; 67843 uint32_t data_addr; 67844 uint32_t relocs; 67845 uint32_t line_numbers; 67846 uint16_t num_relocs; 67847 uint16_t num_lin_numbers; 67848 uint32_t flags; 67849 }; 67850 67851 struct win_certificate { 67852 uint32_t length; 67853 uint16_t revision; 67854 uint16_t cert_type; 67855 }; 67856 67857 struct pefile_context { 67858 unsigned int header_size; 67859 unsigned int image_checksum_offset; 67860 unsigned int cert_dirent_offset; 67861 unsigned int n_data_dirents; 67862 unsigned int n_sections; 67863 unsigned int certs_size; 67864 unsigned int sig_offset; 67865 unsigned int sig_len; 67866 const struct section_header *secs; 67867 const void *digest; 67868 unsigned int digest_len; 67869 const char *digest_algo; 67870 }; 67871 67872 enum mscode_actions { 67873 ACT_mscode_note_content_type = 0, 67874 ACT_mscode_note_digest = 1, 67875 ACT_mscode_note_digest_algo = 2, 67876 NR__mscode_actions = 3, 67877 }; 67878 67879 struct simd_skcipher_alg___2 { 67880 const char *ialg_name; 67881 struct skcipher_alg alg; 67882 }; 67883 67884 struct simd_skcipher_ctx { 67885 struct cryptd_skcipher *cryptd_tfm; 67886 }; 67887 67888 struct simd_aead_alg___2 { 67889 const char *ialg_name; 67890 struct aead_alg alg; 67891 }; 67892 67893 struct simd_aead_ctx { 67894 struct cryptd_aead *cryptd_tfm; 67895 }; 67896 67897 struct biovec_slab { 67898 int nr_vecs; 67899 char *name; 67900 struct kmem_cache *slab; 67901 }; 67902 67903 enum rq_qos_id { 67904 RQ_QOS_WBT = 0, 67905 RQ_QOS_LATENCY = 1, 67906 RQ_QOS_COST = 2, 67907 }; 67908 67909 struct rq_qos_ops; 67910 67911 struct rq_qos { 67912 struct rq_qos_ops *ops; 67913 struct request_queue *q; 67914 enum rq_qos_id id; 67915 struct rq_qos *next; 67916 struct dentry *debugfs_dir; 67917 }; 67918 67919 enum { 67920 sysctl_hung_task_timeout_secs = 0, 67921 }; 67922 67923 enum hctx_type { 67924 HCTX_TYPE_DEFAULT = 0, 67925 HCTX_TYPE_READ = 1, 67926 HCTX_TYPE_POLL = 2, 67927 HCTX_MAX_TYPES = 3, 67928 }; 67929 67930 struct rq_qos_ops { 67931 void (*throttle)(struct rq_qos *, struct bio *); 67932 void (*track)(struct rq_qos *, struct request *, struct bio *); 67933 void (*merge)(struct rq_qos *, struct request *, struct bio *); 67934 void (*issue)(struct rq_qos *, struct request *); 67935 void (*requeue)(struct rq_qos *, struct request *); 67936 void (*done)(struct rq_qos *, struct request *); 67937 void (*done_bio)(struct rq_qos *, struct bio *); 67938 void (*cleanup)(struct rq_qos *, struct bio *); 67939 void (*queue_depth_changed)(struct rq_qos *); 67940 void (*exit)(struct rq_qos *); 67941 const struct blk_mq_debugfs_attr *debugfs_attrs; 67942 }; 67943 67944 struct bio_slab { 67945 struct kmem_cache *slab; 67946 unsigned int slab_ref; 67947 unsigned int slab_size; 67948 char name[8]; 67949 }; 67950 67951 enum { 67952 BLK_MQ_F_SHOULD_MERGE = 1, 67953 BLK_MQ_F_TAG_QUEUE_SHARED = 2, 67954 BLK_MQ_F_STACKING = 4, 67955 BLK_MQ_F_TAG_HCTX_SHARED = 8, 67956 BLK_MQ_F_BLOCKING = 32, 67957 BLK_MQ_F_NO_SCHED = 64, 67958 BLK_MQ_F_ALLOC_POLICY_START_BIT = 8, 67959 BLK_MQ_F_ALLOC_POLICY_BITS = 1, 67960 BLK_MQ_S_STOPPED = 0, 67961 BLK_MQ_S_TAG_ACTIVE = 1, 67962 BLK_MQ_S_SCHED_RESTART = 2, 67963 BLK_MQ_S_INACTIVE = 3, 67964 BLK_MQ_MAX_DEPTH = 10240, 67965 BLK_MQ_CPU_WORK_BATCH = 8, 67966 }; 67967 67968 enum { 67969 WBT_RWQ_BG = 0, 67970 WBT_RWQ_KSWAPD = 1, 67971 WBT_RWQ_DISCARD = 2, 67972 WBT_NUM_RWQ = 3, 67973 }; 67974 67975 enum { 67976 BLK_MQ_REQ_NOWAIT = 1, 67977 BLK_MQ_REQ_RESERVED = 2, 67978 BLK_MQ_REQ_PM = 4, 67979 }; 67980 67981 struct trace_event_raw_block_buffer { 67982 struct trace_entry ent; 67983 dev_t dev; 67984 sector_t sector; 67985 size_t size; 67986 char __data[0]; 67987 }; 67988 67989 struct trace_event_raw_block_rq_requeue { 67990 struct trace_entry ent; 67991 dev_t dev; 67992 sector_t sector; 67993 unsigned int nr_sector; 67994 char rwbs[8]; 67995 u32 __data_loc_cmd; 67996 char __data[0]; 67997 }; 67998 67999 struct trace_event_raw_block_rq_complete { 68000 struct trace_entry ent; 68001 dev_t dev; 68002 sector_t sector; 68003 unsigned int nr_sector; 68004 int error; 68005 char rwbs[8]; 68006 u32 __data_loc_cmd; 68007 char __data[0]; 68008 }; 68009 68010 struct trace_event_raw_block_rq { 68011 struct trace_entry ent; 68012 dev_t dev; 68013 sector_t sector; 68014 unsigned int nr_sector; 68015 unsigned int bytes; 68016 char rwbs[8]; 68017 char comm[16]; 68018 u32 __data_loc_cmd; 68019 char __data[0]; 68020 }; 68021 68022 struct trace_event_raw_block_bio_complete { 68023 struct trace_entry ent; 68024 dev_t dev; 68025 sector_t sector; 68026 unsigned int nr_sector; 68027 int error; 68028 char rwbs[8]; 68029 char __data[0]; 68030 }; 68031 68032 struct trace_event_raw_block_bio { 68033 struct trace_entry ent; 68034 dev_t dev; 68035 sector_t sector; 68036 unsigned int nr_sector; 68037 char rwbs[8]; 68038 char comm[16]; 68039 char __data[0]; 68040 }; 68041 68042 struct trace_event_raw_block_plug { 68043 struct trace_entry ent; 68044 char comm[16]; 68045 char __data[0]; 68046 }; 68047 68048 struct trace_event_raw_block_unplug { 68049 struct trace_entry ent; 68050 int nr_rq; 68051 char comm[16]; 68052 char __data[0]; 68053 }; 68054 68055 struct trace_event_raw_block_split { 68056 struct trace_entry ent; 68057 dev_t dev; 68058 sector_t sector; 68059 sector_t new_sector; 68060 char rwbs[8]; 68061 char comm[16]; 68062 char __data[0]; 68063 }; 68064 68065 struct trace_event_raw_block_bio_remap { 68066 struct trace_entry ent; 68067 dev_t dev; 68068 sector_t sector; 68069 unsigned int nr_sector; 68070 dev_t old_dev; 68071 sector_t old_sector; 68072 char rwbs[8]; 68073 char __data[0]; 68074 }; 68075 68076 struct trace_event_raw_block_rq_remap { 68077 struct trace_entry ent; 68078 dev_t dev; 68079 sector_t sector; 68080 unsigned int nr_sector; 68081 dev_t old_dev; 68082 sector_t old_sector; 68083 unsigned int nr_bios; 68084 char rwbs[8]; 68085 char __data[0]; 68086 }; 68087 68088 struct trace_event_data_offsets_block_buffer {}; 68089 68090 struct trace_event_data_offsets_block_rq_requeue { 68091 u32 cmd; 68092 }; 68093 68094 struct trace_event_data_offsets_block_rq_complete { 68095 u32 cmd; 68096 }; 68097 68098 struct trace_event_data_offsets_block_rq { 68099 u32 cmd; 68100 }; 68101 68102 struct trace_event_data_offsets_block_bio_complete {}; 68103 68104 struct trace_event_data_offsets_block_bio {}; 68105 68106 struct trace_event_data_offsets_block_plug {}; 68107 68108 struct trace_event_data_offsets_block_unplug {}; 68109 68110 struct trace_event_data_offsets_block_split {}; 68111 68112 struct trace_event_data_offsets_block_bio_remap {}; 68113 68114 struct trace_event_data_offsets_block_rq_remap {}; 68115 68116 typedef void (*btf_trace_block_touch_buffer)(void *, struct buffer_head *); 68117 68118 typedef void (*btf_trace_block_dirty_buffer)(void *, struct buffer_head *); 68119 68120 typedef void (*btf_trace_block_rq_requeue)(void *, struct request *); 68121 68122 typedef void (*btf_trace_block_rq_complete)(void *, struct request *, int, unsigned int); 68123 68124 typedef void (*btf_trace_block_rq_insert)(void *, struct request *); 68125 68126 typedef void (*btf_trace_block_rq_issue)(void *, struct request *); 68127 68128 typedef void (*btf_trace_block_rq_merge)(void *, struct request *); 68129 68130 typedef void (*btf_trace_block_bio_complete)(void *, struct request_queue *, struct bio *); 68131 68132 typedef void (*btf_trace_block_bio_bounce)(void *, struct bio *); 68133 68134 typedef void (*btf_trace_block_bio_backmerge)(void *, struct bio *); 68135 68136 typedef void (*btf_trace_block_bio_frontmerge)(void *, struct bio *); 68137 68138 typedef void (*btf_trace_block_bio_queue)(void *, struct bio *); 68139 68140 typedef void (*btf_trace_block_getrq)(void *, struct bio *); 68141 68142 typedef void (*btf_trace_block_plug)(void *, struct request_queue *); 68143 68144 typedef void (*btf_trace_block_unplug)(void *, struct request_queue *, unsigned int, bool); 68145 68146 typedef void (*btf_trace_block_split)(void *, struct bio *, unsigned int); 68147 68148 typedef void (*btf_trace_block_bio_remap)(void *, struct bio *, dev_t, sector_t); 68149 68150 typedef void (*btf_trace_block_rq_remap)(void *, struct request *, dev_t, sector_t); 68151 68152 enum { 68153 BLK_MQ_NO_TAG = 4294967295, 68154 BLK_MQ_TAG_MIN = 1, 68155 BLK_MQ_TAG_MAX = 4294967294, 68156 }; 68157 68158 struct queue_sysfs_entry { 68159 struct attribute attr; 68160 ssize_t (*show)(struct request_queue *, char *); 68161 ssize_t (*store)(struct request_queue *, const char *, size_t); 68162 }; 68163 68164 enum { 68165 REQ_FSEQ_PREFLUSH = 1, 68166 REQ_FSEQ_DATA = 2, 68167 REQ_FSEQ_POSTFLUSH = 4, 68168 REQ_FSEQ_DONE = 8, 68169 REQ_FSEQ_ACTIONS = 7, 68170 FLUSH_PENDING_TIMEOUT = 5000, 68171 }; 68172 68173 enum { 68174 ICQ_EXITED = 4, 68175 ICQ_DESTROYED = 8, 68176 }; 68177 68178 struct rq_map_data { 68179 struct page **pages; 68180 int page_order; 68181 int nr_entries; 68182 long unsigned int offset; 68183 int null_mapped; 68184 int from_user; 68185 }; 68186 68187 struct bio_map_data { 68188 bool is_our_pages: 1; 68189 bool is_null_mapped: 1; 68190 struct iov_iter iter; 68191 struct iovec iov[0]; 68192 }; 68193 68194 struct req_iterator { 68195 struct bvec_iter iter; 68196 struct bio *bio; 68197 }; 68198 68199 enum bio_merge_status { 68200 BIO_MERGE_OK = 0, 68201 BIO_MERGE_NONE = 1, 68202 BIO_MERGE_FAILED = 2, 68203 }; 68204 68205 typedef bool (*sb_for_each_fn)(struct sbitmap *, unsigned int, void *); 68206 68207 typedef bool busy_iter_fn(struct blk_mq_hw_ctx *, struct request *, void *, bool); 68208 68209 typedef bool busy_tag_iter_fn(struct request *, void *, bool); 68210 68211 enum { 68212 BLK_MQ_UNIQUE_TAG_BITS = 16, 68213 BLK_MQ_UNIQUE_TAG_MASK = 65535, 68214 }; 68215 68216 struct mq_inflight { 68217 struct block_device *part; 68218 unsigned int inflight[2]; 68219 }; 68220 68221 struct flush_busy_ctx_data { 68222 struct blk_mq_hw_ctx *hctx; 68223 struct list_head *list; 68224 }; 68225 68226 struct dispatch_rq_data { 68227 struct blk_mq_hw_ctx *hctx; 68228 struct request *rq; 68229 }; 68230 68231 enum prep_dispatch { 68232 PREP_DISPATCH_OK = 0, 68233 PREP_DISPATCH_NO_TAG = 1, 68234 PREP_DISPATCH_NO_BUDGET = 2, 68235 }; 68236 68237 struct rq_iter_data { 68238 struct blk_mq_hw_ctx *hctx; 68239 bool has_rq; 68240 }; 68241 68242 struct blk_mq_qe_pair { 68243 struct list_head node; 68244 struct request_queue *q; 68245 struct elevator_type *type; 68246 }; 68247 68248 struct sbq_wait { 68249 struct sbitmap_queue *sbq; 68250 struct wait_queue_entry wait; 68251 }; 68252 68253 struct bt_iter_data { 68254 struct blk_mq_hw_ctx *hctx; 68255 busy_iter_fn *fn; 68256 void *data; 68257 bool reserved; 68258 }; 68259 68260 struct bt_tags_iter_data { 68261 struct blk_mq_tags *tags; 68262 busy_tag_iter_fn *fn; 68263 void *data; 68264 unsigned int flags; 68265 }; 68266 68267 struct blk_queue_stats { 68268 struct list_head callbacks; 68269 spinlock_t lock; 68270 bool enable_accounting; 68271 }; 68272 68273 struct blk_mq_ctx_sysfs_entry { 68274 struct attribute attr; 68275 ssize_t (*show)(struct blk_mq_ctx *, char *); 68276 ssize_t (*store)(struct blk_mq_ctx *, const char *, size_t); 68277 }; 68278 68279 struct blk_mq_hw_ctx_sysfs_entry { 68280 struct attribute attr; 68281 ssize_t (*show)(struct blk_mq_hw_ctx *, char *); 68282 ssize_t (*store)(struct blk_mq_hw_ctx *, const char *, size_t); 68283 }; 68284 68285 typedef u32 compat_caddr_t; 68286 68287 struct hd_geometry { 68288 unsigned char heads; 68289 unsigned char sectors; 68290 short unsigned int cylinders; 68291 long unsigned int start; 68292 }; 68293 68294 struct blkpg_ioctl_arg { 68295 int op; 68296 int flags; 68297 int datalen; 68298 void *data; 68299 }; 68300 68301 struct blkpg_partition { 68302 long long int start; 68303 long long int length; 68304 int pno; 68305 char devname[64]; 68306 char volname[64]; 68307 }; 68308 68309 struct pr_reservation { 68310 __u64 key; 68311 __u32 type; 68312 __u32 flags; 68313 }; 68314 68315 struct pr_registration { 68316 __u64 old_key; 68317 __u64 new_key; 68318 __u32 flags; 68319 __u32 __pad; 68320 }; 68321 68322 struct pr_preempt { 68323 __u64 old_key; 68324 __u64 new_key; 68325 __u32 type; 68326 __u32 flags; 68327 }; 68328 68329 struct pr_clear { 68330 __u64 key; 68331 __u32 flags; 68332 __u32 __pad; 68333 }; 68334 68335 struct compat_blkpg_ioctl_arg { 68336 compat_int_t op; 68337 compat_int_t flags; 68338 compat_int_t datalen; 68339 compat_caddr_t data; 68340 }; 68341 68342 struct compat_hd_geometry { 68343 unsigned char heads; 68344 unsigned char sectors; 68345 short unsigned int cylinders; 68346 u32 start; 68347 }; 68348 68349 struct klist_node; 68350 68351 struct klist { 68352 spinlock_t k_lock; 68353 struct list_head k_list; 68354 void (*get)(struct klist_node *); 68355 void (*put)(struct klist_node *); 68356 }; 68357 68358 struct klist_node { 68359 void *n_klist; 68360 struct list_head n_node; 68361 struct kref n_ref; 68362 }; 68363 68364 struct klist_iter { 68365 struct klist *i_klist; 68366 struct klist_node *i_cur; 68367 }; 68368 68369 struct class_dev_iter { 68370 struct klist_iter ki; 68371 const struct device_type *type; 68372 }; 68373 68374 enum { 68375 DISK_EVENT_FLAG_POLL = 1, 68376 DISK_EVENT_FLAG_UEVENT = 2, 68377 }; 68378 68379 struct disk_events { 68380 struct list_head node; 68381 struct gendisk *disk; 68382 spinlock_t lock; 68383 struct mutex block_mutex; 68384 int block; 68385 unsigned int pending; 68386 unsigned int clearing; 68387 long int poll_msecs; 68388 struct delayed_work dwork; 68389 }; 68390 68391 struct badblocks { 68392 struct device *dev; 68393 int count; 68394 int unacked_exist; 68395 int shift; 68396 u64 *page; 68397 int changed; 68398 seqlock_t lock; 68399 sector_t sector; 68400 sector_t size; 68401 }; 68402 68403 struct disk_part_iter { 68404 struct gendisk *disk; 68405 struct block_device *part; 68406 int idx; 68407 unsigned int flags; 68408 }; 68409 68410 struct blk_major_name { 68411 struct blk_major_name *next; 68412 int major; 68413 char name[16]; 68414 void (*probe)(dev_t); 68415 }; 68416 68417 enum { 68418 IOPRIO_WHO_PROCESS = 1, 68419 IOPRIO_WHO_PGRP = 2, 68420 IOPRIO_WHO_USER = 3, 68421 }; 68422 68423 struct parsed_partitions { 68424 struct block_device *bdev; 68425 char name[32]; 68426 struct { 68427 sector_t from; 68428 sector_t size; 68429 int flags; 68430 bool has_info; 68431 struct partition_meta_info info; 68432 } *parts; 68433 int next; 68434 int limit; 68435 bool access_beyond_eod; 68436 char *pp_buf; 68437 }; 68438 68439 typedef struct { 68440 struct page *v; 68441 } Sector; 68442 68443 struct RigidDiskBlock { 68444 __u32 rdb_ID; 68445 __be32 rdb_SummedLongs; 68446 __s32 rdb_ChkSum; 68447 __u32 rdb_HostID; 68448 __be32 rdb_BlockBytes; 68449 __u32 rdb_Flags; 68450 __u32 rdb_BadBlockList; 68451 __be32 rdb_PartitionList; 68452 __u32 rdb_FileSysHeaderList; 68453 __u32 rdb_DriveInit; 68454 __u32 rdb_Reserved1[6]; 68455 __u32 rdb_Cylinders; 68456 __u32 rdb_Sectors; 68457 __u32 rdb_Heads; 68458 __u32 rdb_Interleave; 68459 __u32 rdb_Park; 68460 __u32 rdb_Reserved2[3]; 68461 __u32 rdb_WritePreComp; 68462 __u32 rdb_ReducedWrite; 68463 __u32 rdb_StepRate; 68464 __u32 rdb_Reserved3[5]; 68465 __u32 rdb_RDBBlocksLo; 68466 __u32 rdb_RDBBlocksHi; 68467 __u32 rdb_LoCylinder; 68468 __u32 rdb_HiCylinder; 68469 __u32 rdb_CylBlocks; 68470 __u32 rdb_AutoParkSeconds; 68471 __u32 rdb_HighRDSKBlock; 68472 __u32 rdb_Reserved4; 68473 char rdb_DiskVendor[8]; 68474 char rdb_DiskProduct[16]; 68475 char rdb_DiskRevision[4]; 68476 char rdb_ControllerVendor[8]; 68477 char rdb_ControllerProduct[16]; 68478 char rdb_ControllerRevision[4]; 68479 __u32 rdb_Reserved5[10]; 68480 }; 68481 68482 struct PartitionBlock { 68483 __be32 pb_ID; 68484 __be32 pb_SummedLongs; 68485 __s32 pb_ChkSum; 68486 __u32 pb_HostID; 68487 __be32 pb_Next; 68488 __u32 pb_Flags; 68489 __u32 pb_Reserved1[2]; 68490 __u32 pb_DevFlags; 68491 __u8 pb_DriveName[32]; 68492 __u32 pb_Reserved2[15]; 68493 __be32 pb_Environment[17]; 68494 __u32 pb_EReserved[15]; 68495 }; 68496 68497 struct lvm_rec { 68498 char lvm_id[4]; 68499 char reserved4[16]; 68500 __be32 lvmarea_len; 68501 __be32 vgda_len; 68502 __be32 vgda_psn[2]; 68503 char reserved36[10]; 68504 __be16 pp_size; 68505 char reserved46[12]; 68506 __be16 version; 68507 }; 68508 68509 struct vgda { 68510 __be32 secs; 68511 __be32 usec; 68512 char reserved8[16]; 68513 __be16 numlvs; 68514 __be16 maxlvs; 68515 __be16 pp_size; 68516 __be16 numpvs; 68517 __be16 total_vgdas; 68518 __be16 vgda_size; 68519 }; 68520 68521 struct lvd { 68522 __be16 lv_ix; 68523 __be16 res2; 68524 __be16 res4; 68525 __be16 maxsize; 68526 __be16 lv_state; 68527 __be16 mirror; 68528 __be16 mirror_policy; 68529 __be16 num_lps; 68530 __be16 res10[8]; 68531 }; 68532 68533 struct lvname { 68534 char name[64]; 68535 }; 68536 68537 struct ppe { 68538 __be16 lv_ix; 68539 short unsigned int res2; 68540 short unsigned int res4; 68541 __be16 lp_ix; 68542 short unsigned int res8[12]; 68543 }; 68544 68545 struct pvd { 68546 char reserved0[16]; 68547 __be16 pp_count; 68548 char reserved18[2]; 68549 __be32 psn_part1; 68550 char reserved24[8]; 68551 struct ppe ppe[1016]; 68552 }; 68553 68554 struct lv_info { 68555 short unsigned int pps_per_lv; 68556 short unsigned int pps_found; 68557 unsigned char lv_is_contiguous; 68558 }; 68559 68560 struct mac_partition { 68561 __be16 signature; 68562 __be16 res1; 68563 __be32 map_count; 68564 __be32 start_block; 68565 __be32 block_count; 68566 char name[32]; 68567 char type[32]; 68568 __be32 data_start; 68569 __be32 data_count; 68570 __be32 status; 68571 __be32 boot_start; 68572 __be32 boot_size; 68573 __be32 boot_load; 68574 __be32 boot_load2; 68575 __be32 boot_entry; 68576 __be32 boot_entry2; 68577 __be32 boot_cksum; 68578 char processor[16]; 68579 }; 68580 68581 struct mac_driver_desc { 68582 __be16 signature; 68583 __be16 block_size; 68584 __be32 block_count; 68585 }; 68586 68587 struct msdos_partition { 68588 u8 boot_ind; 68589 u8 head; 68590 u8 sector; 68591 u8 cyl; 68592 u8 sys_ind; 68593 u8 end_head; 68594 u8 end_sector; 68595 u8 end_cyl; 68596 __le32 start_sect; 68597 __le32 nr_sects; 68598 }; 68599 68600 struct frag { 68601 struct list_head list; 68602 u32 group; 68603 u8 num; 68604 u8 rec; 68605 u8 map; 68606 u8 data[0]; 68607 }; 68608 68609 struct privhead { 68610 u16 ver_major; 68611 u16 ver_minor; 68612 u64 logical_disk_start; 68613 u64 logical_disk_size; 68614 u64 config_start; 68615 u64 config_size; 68616 uuid_t disk_id; 68617 }; 68618 68619 struct tocblock { 68620 u8 bitmap1_name[16]; 68621 u64 bitmap1_start; 68622 u64 bitmap1_size; 68623 u8 bitmap2_name[16]; 68624 u64 bitmap2_start; 68625 u64 bitmap2_size; 68626 }; 68627 68628 struct vmdb { 68629 u16 ver_major; 68630 u16 ver_minor; 68631 u32 vblk_size; 68632 u32 vblk_offset; 68633 u32 last_vblk_seq; 68634 }; 68635 68636 struct vblk_comp { 68637 u8 state[16]; 68638 u64 parent_id; 68639 u8 type; 68640 u8 children; 68641 u16 chunksize; 68642 }; 68643 68644 struct vblk_dgrp { 68645 u8 disk_id[64]; 68646 }; 68647 68648 struct vblk_disk { 68649 uuid_t disk_id; 68650 u8 alt_name[128]; 68651 }; 68652 68653 struct vblk_part { 68654 u64 start; 68655 u64 size; 68656 u64 volume_offset; 68657 u64 parent_id; 68658 u64 disk_id; 68659 u8 partnum; 68660 }; 68661 68662 struct vblk_volu { 68663 u8 volume_type[16]; 68664 u8 volume_state[16]; 68665 u8 guid[16]; 68666 u8 drive_hint[4]; 68667 u64 size; 68668 u8 partition_type; 68669 }; 68670 68671 struct vblk { 68672 u8 name[64]; 68673 u64 obj_id; 68674 u32 sequence; 68675 u8 flags; 68676 u8 type; 68677 union { 68678 struct vblk_comp comp; 68679 struct vblk_dgrp dgrp; 68680 struct vblk_disk disk; 68681 struct vblk_part part; 68682 struct vblk_volu volu; 68683 } vblk; 68684 struct list_head list; 68685 }; 68686 68687 struct ldmdb { 68688 struct privhead ph; 68689 struct tocblock toc; 68690 struct vmdb vm; 68691 struct list_head v_dgrp; 68692 struct list_head v_disk; 68693 struct list_head v_volu; 68694 struct list_head v_comp; 68695 struct list_head v_part; 68696 }; 68697 68698 struct fat_boot_sector { 68699 __u8 ignored[3]; 68700 __u8 system_id[8]; 68701 __u8 sector_size[2]; 68702 __u8 sec_per_clus; 68703 __le16 reserved; 68704 __u8 fats; 68705 __u8 dir_entries[2]; 68706 __u8 sectors[2]; 68707 __u8 media; 68708 __le16 fat_length; 68709 __le16 secs_track; 68710 __le16 heads; 68711 __le32 hidden; 68712 __le32 total_sect; 68713 union { 68714 struct { 68715 __u8 drive_number; 68716 __u8 state; 68717 __u8 signature; 68718 __u8 vol_id[4]; 68719 __u8 vol_label[11]; 68720 __u8 fs_type[8]; 68721 } fat16; 68722 struct { 68723 __le32 length; 68724 __le16 flags; 68725 __u8 version[2]; 68726 __le32 root_cluster; 68727 __le16 info_sector; 68728 __le16 backup_boot; 68729 __le16 reserved2[6]; 68730 __u8 drive_number; 68731 __u8 state; 68732 __u8 signature; 68733 __u8 vol_id[4]; 68734 __u8 vol_label[11]; 68735 __u8 fs_type[8]; 68736 } fat32; 68737 }; 68738 }; 68739 68740 enum msdos_sys_ind { 68741 DOS_EXTENDED_PARTITION = 5, 68742 LINUX_EXTENDED_PARTITION = 133, 68743 WIN98_EXTENDED_PARTITION = 15, 68744 LINUX_DATA_PARTITION = 131, 68745 LINUX_LVM_PARTITION = 142, 68746 LINUX_RAID_PARTITION = 253, 68747 SOLARIS_X86_PARTITION = 130, 68748 NEW_SOLARIS_X86_PARTITION = 191, 68749 DM6_AUX1PARTITION = 81, 68750 DM6_AUX3PARTITION = 83, 68751 DM6_PARTITION = 84, 68752 EZD_PARTITION = 85, 68753 FREEBSD_PARTITION = 165, 68754 OPENBSD_PARTITION = 166, 68755 NETBSD_PARTITION = 169, 68756 BSDI_PARTITION = 183, 68757 MINIX_PARTITION = 129, 68758 UNIXWARE_PARTITION = 99, 68759 }; 68760 68761 struct solaris_x86_slice { 68762 __le16 s_tag; 68763 __le16 s_flag; 68764 __le32 s_start; 68765 __le32 s_size; 68766 }; 68767 68768 struct solaris_x86_vtoc { 68769 unsigned int v_bootinfo[3]; 68770 __le32 v_sanity; 68771 __le32 v_version; 68772 char v_volume[8]; 68773 __le16 v_sectorsz; 68774 __le16 v_nparts; 68775 unsigned int v_reserved[10]; 68776 struct solaris_x86_slice v_slice[16]; 68777 unsigned int timestamp[16]; 68778 char v_asciilabel[128]; 68779 }; 68780 68781 struct bsd_partition { 68782 __le32 p_size; 68783 __le32 p_offset; 68784 __le32 p_fsize; 68785 __u8 p_fstype; 68786 __u8 p_frag; 68787 __le16 p_cpg; 68788 }; 68789 68790 struct bsd_disklabel { 68791 __le32 d_magic; 68792 __s16 d_type; 68793 __s16 d_subtype; 68794 char d_typename[16]; 68795 char d_packname[16]; 68796 __u32 d_secsize; 68797 __u32 d_nsectors; 68798 __u32 d_ntracks; 68799 __u32 d_ncylinders; 68800 __u32 d_secpercyl; 68801 __u32 d_secperunit; 68802 __u16 d_sparespertrack; 68803 __u16 d_sparespercyl; 68804 __u32 d_acylinders; 68805 __u16 d_rpm; 68806 __u16 d_interleave; 68807 __u16 d_trackskew; 68808 __u16 d_cylskew; 68809 __u32 d_headswitch; 68810 __u32 d_trkseek; 68811 __u32 d_flags; 68812 __u32 d_drivedata[5]; 68813 __u32 d_spare[5]; 68814 __le32 d_magic2; 68815 __le16 d_checksum; 68816 __le16 d_npartitions; 68817 __le32 d_bbsize; 68818 __le32 d_sbsize; 68819 struct bsd_partition d_partitions[16]; 68820 }; 68821 68822 struct unixware_slice { 68823 __le16 s_label; 68824 __le16 s_flags; 68825 __le32 start_sect; 68826 __le32 nr_sects; 68827 }; 68828 68829 struct unixware_vtoc { 68830 __le32 v_magic; 68831 __le32 v_version; 68832 char v_name[8]; 68833 __le16 v_nslices; 68834 __le16 v_unknown1; 68835 __le32 v_reserved[10]; 68836 struct unixware_slice v_slice[16]; 68837 }; 68838 68839 struct unixware_disklabel { 68840 __le32 d_type; 68841 __le32 d_magic; 68842 __le32 d_version; 68843 char d_serial[12]; 68844 __le32 d_ncylinders; 68845 __le32 d_ntracks; 68846 __le32 d_nsectors; 68847 __le32 d_secsize; 68848 __le32 d_part_start; 68849 __le32 d_unknown1[12]; 68850 __le32 d_alt_tbl; 68851 __le32 d_alt_len; 68852 __le32 d_phys_cyl; 68853 __le32 d_phys_trk; 68854 __le32 d_phys_sec; 68855 __le32 d_phys_bytes; 68856 __le32 d_unknown2; 68857 __le32 d_unknown3; 68858 __le32 d_pad[8]; 68859 struct unixware_vtoc vtoc; 68860 }; 68861 68862 struct d_partition { 68863 __le32 p_size; 68864 __le32 p_offset; 68865 __le32 p_fsize; 68866 u8 p_fstype; 68867 u8 p_frag; 68868 __le16 p_cpg; 68869 }; 68870 68871 struct disklabel { 68872 __le32 d_magic; 68873 __le16 d_type; 68874 __le16 d_subtype; 68875 u8 d_typename[16]; 68876 u8 d_packname[16]; 68877 __le32 d_secsize; 68878 __le32 d_nsectors; 68879 __le32 d_ntracks; 68880 __le32 d_ncylinders; 68881 __le32 d_secpercyl; 68882 __le32 d_secprtunit; 68883 __le16 d_sparespertrack; 68884 __le16 d_sparespercyl; 68885 __le32 d_acylinders; 68886 __le16 d_rpm; 68887 __le16 d_interleave; 68888 __le16 d_trackskew; 68889 __le16 d_cylskew; 68890 __le32 d_headswitch; 68891 __le32 d_trkseek; 68892 __le32 d_flags; 68893 __le32 d_drivedata[5]; 68894 __le32 d_spare[5]; 68895 __le32 d_magic2; 68896 __le16 d_checksum; 68897 __le16 d_npartitions; 68898 __le32 d_bbsize; 68899 __le32 d_sbsize; 68900 struct d_partition d_partitions[18]; 68901 }; 68902 68903 enum { 68904 LINUX_RAID_PARTITION___2 = 253, 68905 }; 68906 68907 struct sgi_volume { 68908 s8 name[8]; 68909 __be32 block_num; 68910 __be32 num_bytes; 68911 }; 68912 68913 struct sgi_partition { 68914 __be32 num_blocks; 68915 __be32 first_block; 68916 __be32 type; 68917 }; 68918 68919 struct sgi_disklabel { 68920 __be32 magic_mushroom; 68921 __be16 root_part_num; 68922 __be16 swap_part_num; 68923 s8 boot_file[16]; 68924 u8 _unused0[48]; 68925 struct sgi_volume volume[15]; 68926 struct sgi_partition partitions[16]; 68927 __be32 csum; 68928 __be32 _unused1; 68929 }; 68930 68931 enum { 68932 SUN_WHOLE_DISK = 5, 68933 LINUX_RAID_PARTITION___3 = 253, 68934 }; 68935 68936 struct sun_info { 68937 __be16 id; 68938 __be16 flags; 68939 }; 68940 68941 struct sun_vtoc { 68942 __be32 version; 68943 char volume[8]; 68944 __be16 nparts; 68945 struct sun_info infos[8]; 68946 __be16 padding; 68947 __be32 bootinfo[3]; 68948 __be32 sanity; 68949 __be32 reserved[10]; 68950 __be32 timestamp[8]; 68951 }; 68952 68953 struct sun_partition { 68954 __be32 start_cylinder; 68955 __be32 num_sectors; 68956 }; 68957 68958 struct sun_disklabel { 68959 unsigned char info[128]; 68960 struct sun_vtoc vtoc; 68961 __be32 write_reinstruct; 68962 __be32 read_reinstruct; 68963 unsigned char spare[148]; 68964 __be16 rspeed; 68965 __be16 pcylcount; 68966 __be16 sparecyl; 68967 __be16 obs1; 68968 __be16 obs2; 68969 __be16 ilfact; 68970 __be16 ncyl; 68971 __be16 nacyl; 68972 __be16 ntrks; 68973 __be16 nsect; 68974 __be16 obs3; 68975 __be16 obs4; 68976 struct sun_partition partitions[8]; 68977 __be16 magic; 68978 __be16 csum; 68979 }; 68980 68981 struct _gpt_header { 68982 __le64 signature; 68983 __le32 revision; 68984 __le32 header_size; 68985 __le32 header_crc32; 68986 __le32 reserved1; 68987 __le64 my_lba; 68988 __le64 alternate_lba; 68989 __le64 first_usable_lba; 68990 __le64 last_usable_lba; 68991 efi_guid_t disk_guid; 68992 __le64 partition_entry_lba; 68993 __le32 num_partition_entries; 68994 __le32 sizeof_partition_entry; 68995 __le32 partition_entry_array_crc32; 68996 } __attribute__((packed)); 68997 68998 typedef struct _gpt_header gpt_header; 68999 69000 struct _gpt_entry_attributes { 69001 u64 required_to_function: 1; 69002 u64 reserved: 47; 69003 u64 type_guid_specific: 16; 69004 }; 69005 69006 typedef struct _gpt_entry_attributes gpt_entry_attributes; 69007 69008 struct _gpt_entry { 69009 efi_guid_t partition_type_guid; 69010 efi_guid_t unique_partition_guid; 69011 __le64 starting_lba; 69012 __le64 ending_lba; 69013 gpt_entry_attributes attributes; 69014 __le16 partition_name[36]; 69015 }; 69016 69017 typedef struct _gpt_entry gpt_entry; 69018 69019 struct _gpt_mbr_record { 69020 u8 boot_indicator; 69021 u8 start_head; 69022 u8 start_sector; 69023 u8 start_track; 69024 u8 os_type; 69025 u8 end_head; 69026 u8 end_sector; 69027 u8 end_track; 69028 __le32 starting_lba; 69029 __le32 size_in_lba; 69030 }; 69031 69032 typedef struct _gpt_mbr_record gpt_mbr_record; 69033 69034 struct _legacy_mbr { 69035 u8 boot_code[440]; 69036 __le32 unique_mbr_signature; 69037 __le16 unknown; 69038 gpt_mbr_record partition_record[4]; 69039 __le16 signature; 69040 } __attribute__((packed)); 69041 69042 typedef struct _legacy_mbr legacy_mbr; 69043 69044 struct d_partition___2 { 69045 __le32 p_res; 69046 u8 p_fstype; 69047 u8 p_res2[3]; 69048 __le32 p_offset; 69049 __le32 p_size; 69050 }; 69051 69052 struct disklabel___2 { 69053 u8 d_reserved[270]; 69054 struct d_partition___2 d_partitions[2]; 69055 u8 d_blank[208]; 69056 __le16 d_magic; 69057 } __attribute__((packed)); 69058 69059 struct rq_wait { 69060 wait_queue_head_t wait; 69061 atomic_t inflight; 69062 }; 69063 69064 struct rq_depth { 69065 unsigned int max_depth; 69066 int scale_step; 69067 bool scaled_max; 69068 unsigned int queue_depth; 69069 unsigned int default_depth; 69070 }; 69071 69072 typedef bool acquire_inflight_cb_t(struct rq_wait *, void *); 69073 69074 typedef void cleanup_cb_t(struct rq_wait *, void *); 69075 69076 struct rq_qos_wait_data { 69077 struct wait_queue_entry wq; 69078 struct task_struct *task; 69079 struct rq_wait *rqw; 69080 acquire_inflight_cb_t *cb; 69081 void *private_data; 69082 bool got_token; 69083 }; 69084 69085 struct cdrom_device_ops; 69086 69087 struct cdrom_device_info { 69088 const struct cdrom_device_ops *ops; 69089 struct list_head list; 69090 struct gendisk *disk; 69091 void *handle; 69092 int mask; 69093 int speed; 69094 int capacity; 69095 unsigned int options: 30; 69096 unsigned int mc_flags: 2; 69097 unsigned int vfs_events; 69098 unsigned int ioctl_events; 69099 int use_count; 69100 char name[20]; 69101 __u8 sanyo_slot: 2; 69102 __u8 keeplocked: 1; 69103 __u8 reserved: 5; 69104 int cdda_method; 69105 __u8 last_sense; 69106 __u8 media_written; 69107 short unsigned int mmc3_profile; 69108 int for_data; 69109 int (*exit)(struct cdrom_device_info *); 69110 int mrw_mode_page; 69111 }; 69112 69113 struct scsi_sense_hdr { 69114 u8 response_code; 69115 u8 sense_key; 69116 u8 asc; 69117 u8 ascq; 69118 u8 byte4; 69119 u8 byte5; 69120 u8 byte6; 69121 u8 additional_length; 69122 }; 69123 69124 struct cdrom_msf0 { 69125 __u8 minute; 69126 __u8 second; 69127 __u8 frame; 69128 }; 69129 69130 union cdrom_addr { 69131 struct cdrom_msf0 msf; 69132 int lba; 69133 }; 69134 69135 struct cdrom_multisession { 69136 union cdrom_addr addr; 69137 __u8 xa_flag; 69138 __u8 addr_format; 69139 }; 69140 69141 struct cdrom_mcn { 69142 __u8 medium_catalog_number[14]; 69143 }; 69144 69145 struct request_sense; 69146 69147 struct cdrom_generic_command { 69148 unsigned char cmd[12]; 69149 unsigned char *buffer; 69150 unsigned int buflen; 69151 int stat; 69152 struct request_sense *sense; 69153 unsigned char data_direction; 69154 int quiet; 69155 int timeout; 69156 union { 69157 void *reserved[1]; 69158 void *unused; 69159 }; 69160 }; 69161 69162 struct request_sense { 69163 __u8 error_code: 7; 69164 __u8 valid: 1; 69165 __u8 segment_number; 69166 __u8 sense_key: 4; 69167 __u8 reserved2: 1; 69168 __u8 ili: 1; 69169 __u8 reserved1: 2; 69170 __u8 information[4]; 69171 __u8 add_sense_len; 69172 __u8 command_info[4]; 69173 __u8 asc; 69174 __u8 ascq; 69175 __u8 fruc; 69176 __u8 sks[3]; 69177 __u8 asb[46]; 69178 }; 69179 69180 struct packet_command { 69181 unsigned char cmd[12]; 69182 unsigned char *buffer; 69183 unsigned int buflen; 69184 int stat; 69185 struct scsi_sense_hdr *sshdr; 69186 unsigned char data_direction; 69187 int quiet; 69188 int timeout; 69189 void *reserved[1]; 69190 }; 69191 69192 struct cdrom_device_ops { 69193 int (*open)(struct cdrom_device_info *, int); 69194 void (*release)(struct cdrom_device_info *); 69195 int (*drive_status)(struct cdrom_device_info *, int); 69196 unsigned int (*check_events)(struct cdrom_device_info *, unsigned int, int); 69197 int (*tray_move)(struct cdrom_device_info *, int); 69198 int (*lock_door)(struct cdrom_device_info *, int); 69199 int (*select_speed)(struct cdrom_device_info *, int); 69200 int (*select_disc)(struct cdrom_device_info *, int); 69201 int (*get_last_session)(struct cdrom_device_info *, struct cdrom_multisession *); 69202 int (*get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *); 69203 int (*reset)(struct cdrom_device_info *); 69204 int (*audio_ioctl)(struct cdrom_device_info *, unsigned int, void *); 69205 const int capability; 69206 int (*generic_packet)(struct cdrom_device_info *, struct packet_command *); 69207 }; 69208 69209 struct scsi_ioctl_command { 69210 unsigned int inlen; 69211 unsigned int outlen; 69212 unsigned char data[0]; 69213 }; 69214 69215 enum scsi_device_event { 69216 SDEV_EVT_MEDIA_CHANGE = 1, 69217 SDEV_EVT_INQUIRY_CHANGE_REPORTED = 2, 69218 SDEV_EVT_CAPACITY_CHANGE_REPORTED = 3, 69219 SDEV_EVT_SOFT_THRESHOLD_REACHED_REPORTED = 4, 69220 SDEV_EVT_MODE_PARAMETER_CHANGE_REPORTED = 5, 69221 SDEV_EVT_LUN_CHANGE_REPORTED = 6, 69222 SDEV_EVT_ALUA_STATE_CHANGE_REPORTED = 7, 69223 SDEV_EVT_POWER_ON_RESET_OCCURRED = 8, 69224 SDEV_EVT_FIRST = 1, 69225 SDEV_EVT_LAST = 8, 69226 SDEV_EVT_MAXBITS = 9, 69227 }; 69228 69229 struct scsi_request { 69230 unsigned char __cmd[16]; 69231 unsigned char *cmd; 69232 short unsigned int cmd_len; 69233 int result; 69234 unsigned int sense_len; 69235 unsigned int resid_len; 69236 int retries; 69237 void *sense; 69238 }; 69239 69240 struct sg_io_hdr { 69241 int interface_id; 69242 int dxfer_direction; 69243 unsigned char cmd_len; 69244 unsigned char mx_sb_len; 69245 short unsigned int iovec_count; 69246 unsigned int dxfer_len; 69247 void *dxferp; 69248 unsigned char *cmdp; 69249 void *sbp; 69250 unsigned int timeout; 69251 unsigned int flags; 69252 int pack_id; 69253 void *usr_ptr; 69254 unsigned char status; 69255 unsigned char masked_status; 69256 unsigned char msg_status; 69257 unsigned char sb_len_wr; 69258 short unsigned int host_status; 69259 short unsigned int driver_status; 69260 int resid; 69261 unsigned int duration; 69262 unsigned int info; 69263 }; 69264 69265 struct compat_sg_io_hdr { 69266 compat_int_t interface_id; 69267 compat_int_t dxfer_direction; 69268 unsigned char cmd_len; 69269 unsigned char mx_sb_len; 69270 short unsigned int iovec_count; 69271 compat_uint_t dxfer_len; 69272 compat_uint_t dxferp; 69273 compat_uptr_t cmdp; 69274 compat_uptr_t sbp; 69275 compat_uint_t timeout; 69276 compat_uint_t flags; 69277 compat_int_t pack_id; 69278 compat_uptr_t usr_ptr; 69279 unsigned char status; 69280 unsigned char masked_status; 69281 unsigned char msg_status; 69282 unsigned char sb_len_wr; 69283 short unsigned int host_status; 69284 short unsigned int driver_status; 69285 compat_int_t resid; 69286 compat_uint_t duration; 69287 compat_uint_t info; 69288 }; 69289 69290 struct blk_cmd_filter { 69291 long unsigned int read_ok[4]; 69292 long unsigned int write_ok[4]; 69293 }; 69294 69295 struct compat_cdrom_generic_command { 69296 unsigned char cmd[12]; 69297 compat_caddr_t buffer; 69298 compat_uint_t buflen; 69299 compat_int_t stat; 69300 compat_caddr_t sense; 69301 unsigned char data_direction; 69302 unsigned char pad[3]; 69303 compat_int_t quiet; 69304 compat_int_t timeout; 69305 compat_caddr_t unused; 69306 }; 69307 69308 enum { 69309 OMAX_SB_LEN = 16, 69310 }; 69311 69312 struct bsg_device { 69313 struct request_queue *queue; 69314 spinlock_t lock; 69315 struct hlist_node dev_list; 69316 refcount_t ref_count; 69317 char name[20]; 69318 int max_queue; 69319 }; 69320 69321 struct bsg_job; 69322 69323 typedef int bsg_job_fn(struct bsg_job *); 69324 69325 struct bsg_buffer { 69326 unsigned int payload_len; 69327 int sg_cnt; 69328 struct scatterlist *sg_list; 69329 }; 69330 69331 struct bsg_job { 69332 struct device *dev; 69333 struct kref kref; 69334 unsigned int timeout; 69335 void *request; 69336 void *reply; 69337 unsigned int request_len; 69338 unsigned int reply_len; 69339 struct bsg_buffer request_payload; 69340 struct bsg_buffer reply_payload; 69341 int result; 69342 unsigned int reply_payload_rcv_len; 69343 struct request *bidi_rq; 69344 struct bio *bidi_bio; 69345 void *dd_data; 69346 }; 69347 69348 typedef enum blk_eh_timer_return bsg_timeout_fn(struct request *); 69349 69350 struct bsg_set { 69351 struct blk_mq_tag_set tag_set; 69352 bsg_job_fn *job_fn; 69353 bsg_timeout_fn *timeout_fn; 69354 }; 69355 69356 typedef struct blkcg_policy_data *blkcg_pol_alloc_cpd_fn(gfp_t); 69357 69358 typedef void blkcg_pol_init_cpd_fn(struct blkcg_policy_data *); 69359 69360 typedef void blkcg_pol_free_cpd_fn(struct blkcg_policy_data *); 69361 69362 typedef void blkcg_pol_bind_cpd_fn(struct blkcg_policy_data *); 69363 69364 typedef struct blkg_policy_data *blkcg_pol_alloc_pd_fn(gfp_t, struct request_queue *, struct blkcg *); 69365 69366 typedef void blkcg_pol_init_pd_fn(struct blkg_policy_data *); 69367 69368 typedef void blkcg_pol_online_pd_fn(struct blkg_policy_data *); 69369 69370 typedef void blkcg_pol_offline_pd_fn(struct blkg_policy_data *); 69371 69372 typedef void blkcg_pol_free_pd_fn(struct blkg_policy_data *); 69373 69374 typedef void blkcg_pol_reset_pd_stats_fn(struct blkg_policy_data *); 69375 69376 typedef size_t blkcg_pol_stat_pd_fn(struct blkg_policy_data *, char *, size_t); 69377 69378 struct blkcg_policy { 69379 int plid; 69380 struct cftype *dfl_cftypes; 69381 struct cftype *legacy_cftypes; 69382 blkcg_pol_alloc_cpd_fn *cpd_alloc_fn; 69383 blkcg_pol_init_cpd_fn *cpd_init_fn; 69384 blkcg_pol_free_cpd_fn *cpd_free_fn; 69385 blkcg_pol_bind_cpd_fn *cpd_bind_fn; 69386 blkcg_pol_alloc_pd_fn *pd_alloc_fn; 69387 blkcg_pol_init_pd_fn *pd_init_fn; 69388 blkcg_pol_online_pd_fn *pd_online_fn; 69389 blkcg_pol_offline_pd_fn *pd_offline_fn; 69390 blkcg_pol_free_pd_fn *pd_free_fn; 69391 blkcg_pol_reset_pd_stats_fn *pd_reset_stats_fn; 69392 blkcg_pol_stat_pd_fn *pd_stat_fn; 69393 }; 69394 69395 struct blkg_conf_ctx { 69396 struct block_device *bdev; 69397 struct blkcg_gq *blkg; 69398 char *body; 69399 }; 69400 69401 enum blkg_rwstat_type { 69402 BLKG_RWSTAT_READ = 0, 69403 BLKG_RWSTAT_WRITE = 1, 69404 BLKG_RWSTAT_SYNC = 2, 69405 BLKG_RWSTAT_ASYNC = 3, 69406 BLKG_RWSTAT_DISCARD = 4, 69407 BLKG_RWSTAT_NR = 5, 69408 BLKG_RWSTAT_TOTAL = 5, 69409 }; 69410 69411 struct blkg_rwstat { 69412 struct percpu_counter cpu_cnt[5]; 69413 atomic64_t aux_cnt[5]; 69414 }; 69415 69416 struct blkg_rwstat_sample { 69417 u64 cnt[5]; 69418 }; 69419 69420 struct throtl_service_queue { 69421 struct throtl_service_queue *parent_sq; 69422 struct list_head queued[2]; 69423 unsigned int nr_queued[2]; 69424 struct rb_root_cached pending_tree; 69425 unsigned int nr_pending; 69426 long unsigned int first_pending_disptime; 69427 struct timer_list pending_timer; 69428 }; 69429 69430 struct latency_bucket { 69431 long unsigned int total_latency; 69432 int samples; 69433 }; 69434 69435 struct avg_latency_bucket { 69436 long unsigned int latency; 69437 bool valid; 69438 }; 69439 69440 struct throtl_data { 69441 struct throtl_service_queue service_queue; 69442 struct request_queue *queue; 69443 unsigned int nr_queued[2]; 69444 unsigned int throtl_slice; 69445 struct work_struct dispatch_work; 69446 unsigned int limit_index; 69447 bool limit_valid[2]; 69448 long unsigned int low_upgrade_time; 69449 long unsigned int low_downgrade_time; 69450 unsigned int scale; 69451 struct latency_bucket tmp_buckets[18]; 69452 struct avg_latency_bucket avg_buckets[18]; 69453 struct latency_bucket *latency_buckets[2]; 69454 long unsigned int last_calculate_time; 69455 long unsigned int filtered_latency; 69456 bool track_bio_latency; 69457 }; 69458 69459 struct throtl_grp; 69460 69461 struct throtl_qnode { 69462 struct list_head node; 69463 struct bio_list bios; 69464 struct throtl_grp *tg; 69465 }; 69466 69467 struct throtl_grp { 69468 struct blkg_policy_data pd; 69469 struct rb_node rb_node; 69470 struct throtl_data *td; 69471 struct throtl_service_queue service_queue; 69472 struct throtl_qnode qnode_on_self[2]; 69473 struct throtl_qnode qnode_on_parent[2]; 69474 long unsigned int disptime; 69475 unsigned int flags; 69476 bool has_rules[2]; 69477 uint64_t bps[4]; 69478 uint64_t bps_conf[4]; 69479 unsigned int iops[4]; 69480 unsigned int iops_conf[4]; 69481 uint64_t bytes_disp[2]; 69482 unsigned int io_disp[2]; 69483 long unsigned int last_low_overflow_time[2]; 69484 uint64_t last_bytes_disp[2]; 69485 unsigned int last_io_disp[2]; 69486 long unsigned int last_check_time; 69487 long unsigned int latency_target; 69488 long unsigned int latency_target_conf; 69489 long unsigned int slice_start[2]; 69490 long unsigned int slice_end[2]; 69491 long unsigned int last_finish_time; 69492 long unsigned int checked_last_finish_time; 69493 long unsigned int avg_idletime; 69494 long unsigned int idletime_threshold; 69495 long unsigned int idletime_threshold_conf; 69496 unsigned int bio_cnt; 69497 unsigned int bad_bio_cnt; 69498 long unsigned int bio_cnt_reset_time; 69499 struct blkg_rwstat stat_bytes; 69500 struct blkg_rwstat stat_ios; 69501 }; 69502 69503 enum tg_state_flags { 69504 THROTL_TG_PENDING = 1, 69505 THROTL_TG_WAS_EMPTY = 2, 69506 }; 69507 69508 enum { 69509 LIMIT_LOW = 0, 69510 LIMIT_MAX = 1, 69511 LIMIT_CNT = 2, 69512 }; 69513 69514 struct blk_iolatency { 69515 struct rq_qos rqos; 69516 struct timer_list timer; 69517 atomic_t enabled; 69518 }; 69519 69520 struct iolatency_grp; 69521 69522 struct child_latency_info { 69523 spinlock_t lock; 69524 u64 last_scale_event; 69525 u64 scale_lat; 69526 u64 nr_samples; 69527 struct iolatency_grp *scale_grp; 69528 atomic_t scale_cookie; 69529 }; 69530 69531 struct percentile_stats { 69532 u64 total; 69533 u64 missed; 69534 }; 69535 69536 struct latency_stat { 69537 union { 69538 struct percentile_stats ps; 69539 struct blk_rq_stat rqs; 69540 }; 69541 }; 69542 69543 struct iolatency_grp { 69544 struct blkg_policy_data pd; 69545 struct latency_stat *stats; 69546 struct latency_stat cur_stat; 69547 struct blk_iolatency *blkiolat; 69548 struct rq_depth rq_depth; 69549 struct rq_wait rq_wait; 69550 atomic64_t window_start; 69551 atomic_t scale_cookie; 69552 u64 min_lat_nsec; 69553 u64 cur_win_nsec; 69554 u64 lat_avg; 69555 u64 nr_samples; 69556 bool ssd; 69557 struct child_latency_info child_lat; 69558 }; 69559 69560 enum { 69561 MILLION = 1000000, 69562 MIN_PERIOD = 1000, 69563 MAX_PERIOD = 1000000, 69564 MARGIN_MIN_PCT = 10, 69565 MARGIN_LOW_PCT = 20, 69566 MARGIN_TARGET_PCT = 50, 69567 INUSE_ADJ_STEP_PCT = 25, 69568 TIMER_SLACK_PCT = 1, 69569 WEIGHT_ONE = 65536, 69570 VTIME_PER_SEC_SHIFT = 37, 69571 VTIME_PER_SEC = 0, 69572 VTIME_PER_USEC = 137438, 69573 VTIME_PER_NSEC = 137, 69574 VRATE_MIN_PPM = 10000, 69575 VRATE_MAX_PPM = 100000000, 69576 VRATE_MIN = 1374, 69577 VRATE_CLAMP_ADJ_PCT = 4, 69578 RQ_WAIT_BUSY_PCT = 5, 69579 UNBUSY_THR_PCT = 75, 69580 MIN_DELAY_THR_PCT = 500, 69581 MAX_DELAY_THR_PCT = 25000, 69582 MIN_DELAY = 250, 69583 MAX_DELAY = 250000, 69584 DFGV_USAGE_PCT = 50, 69585 DFGV_PERIOD = 100000, 69586 MAX_LAGGING_PERIODS = 10, 69587 AUTOP_CYCLE_NSEC = 1410065408, 69588 IOC_PAGE_SHIFT = 12, 69589 IOC_PAGE_SIZE = 4096, 69590 IOC_SECT_TO_PAGE_SHIFT = 3, 69591 LCOEF_RANDIO_PAGES = 4096, 69592 }; 69593 69594 enum ioc_running { 69595 IOC_IDLE = 0, 69596 IOC_RUNNING = 1, 69597 IOC_STOP = 2, 69598 }; 69599 69600 enum { 69601 QOS_ENABLE = 0, 69602 QOS_CTRL = 1, 69603 NR_QOS_CTRL_PARAMS = 2, 69604 }; 69605 69606 enum { 69607 QOS_RPPM = 0, 69608 QOS_RLAT = 1, 69609 QOS_WPPM = 2, 69610 QOS_WLAT = 3, 69611 QOS_MIN = 4, 69612 QOS_MAX = 5, 69613 NR_QOS_PARAMS = 6, 69614 }; 69615 69616 enum { 69617 COST_CTRL = 0, 69618 COST_MODEL = 1, 69619 NR_COST_CTRL_PARAMS = 2, 69620 }; 69621 69622 enum { 69623 I_LCOEF_RBPS = 0, 69624 I_LCOEF_RSEQIOPS = 1, 69625 I_LCOEF_RRANDIOPS = 2, 69626 I_LCOEF_WBPS = 3, 69627 I_LCOEF_WSEQIOPS = 4, 69628 I_LCOEF_WRANDIOPS = 5, 69629 NR_I_LCOEFS = 6, 69630 }; 69631 69632 enum { 69633 LCOEF_RPAGE = 0, 69634 LCOEF_RSEQIO = 1, 69635 LCOEF_RRANDIO = 2, 69636 LCOEF_WPAGE = 3, 69637 LCOEF_WSEQIO = 4, 69638 LCOEF_WRANDIO = 5, 69639 NR_LCOEFS = 6, 69640 }; 69641 69642 enum { 69643 AUTOP_INVALID = 0, 69644 AUTOP_HDD = 1, 69645 AUTOP_SSD_QD1 = 2, 69646 AUTOP_SSD_DFL = 3, 69647 AUTOP_SSD_FAST = 4, 69648 }; 69649 69650 struct ioc_params { 69651 u32 qos[6]; 69652 u64 i_lcoefs[6]; 69653 u64 lcoefs[6]; 69654 u32 too_fast_vrate_pct; 69655 u32 too_slow_vrate_pct; 69656 }; 69657 69658 struct ioc_margins { 69659 s64 min; 69660 s64 low; 69661 s64 target; 69662 }; 69663 69664 struct ioc_missed { 69665 local_t nr_met; 69666 local_t nr_missed; 69667 u32 last_met; 69668 u32 last_missed; 69669 }; 69670 69671 struct ioc_pcpu_stat { 69672 struct ioc_missed missed[2]; 69673 local64_t rq_wait_ns; 69674 u64 last_rq_wait_ns; 69675 }; 69676 69677 struct ioc { 69678 struct rq_qos rqos; 69679 bool enabled; 69680 struct ioc_params params; 69681 struct ioc_margins margins; 69682 u32 period_us; 69683 u32 timer_slack_ns; 69684 u64 vrate_min; 69685 u64 vrate_max; 69686 spinlock_t lock; 69687 struct timer_list timer; 69688 struct list_head active_iocgs; 69689 struct ioc_pcpu_stat *pcpu_stat; 69690 enum ioc_running running; 69691 atomic64_t vtime_rate; 69692 u64 vtime_base_rate; 69693 s64 vtime_err; 69694 seqcount_spinlock_t period_seqcount; 69695 u64 period_at; 69696 u64 period_at_vtime; 69697 atomic64_t cur_period; 69698 int busy_level; 69699 bool weights_updated; 69700 atomic_t hweight_gen; 69701 u64 dfgv_period_at; 69702 u64 dfgv_period_rem; 69703 u64 dfgv_usage_us_sum; 69704 u64 autop_too_fast_at; 69705 u64 autop_too_slow_at; 69706 int autop_idx; 69707 bool user_qos_params: 1; 69708 bool user_cost_model: 1; 69709 }; 69710 69711 struct iocg_pcpu_stat { 69712 local64_t abs_vusage; 69713 }; 69714 69715 struct iocg_stat { 69716 u64 usage_us; 69717 u64 wait_us; 69718 u64 indebt_us; 69719 u64 indelay_us; 69720 }; 69721 69722 struct ioc_gq { 69723 struct blkg_policy_data pd; 69724 struct ioc *ioc; 69725 u32 cfg_weight; 69726 u32 weight; 69727 u32 active; 69728 u32 inuse; 69729 u32 last_inuse; 69730 s64 saved_margin; 69731 sector_t cursor; 69732 atomic64_t vtime; 69733 atomic64_t done_vtime; 69734 u64 abs_vdebt; 69735 u64 delay; 69736 u64 delay_at; 69737 atomic64_t active_period; 69738 struct list_head active_list; 69739 u64 child_active_sum; 69740 u64 child_inuse_sum; 69741 u64 child_adjusted_sum; 69742 int hweight_gen; 69743 u32 hweight_active; 69744 u32 hweight_inuse; 69745 u32 hweight_donating; 69746 u32 hweight_after_donation; 69747 struct list_head walk_list; 69748 struct list_head surplus_list; 69749 struct wait_queue_head waitq; 69750 struct hrtimer waitq_timer; 69751 u64 activated_at; 69752 struct iocg_pcpu_stat *pcpu_stat; 69753 struct iocg_stat local_stat; 69754 struct iocg_stat desc_stat; 69755 struct iocg_stat last_stat; 69756 u64 last_stat_abs_vusage; 69757 u64 usage_delta_us; 69758 u64 wait_since; 69759 u64 indebt_since; 69760 u64 indelay_since; 69761 int level; 69762 struct ioc_gq *ancestors[0]; 69763 }; 69764 69765 struct ioc_cgrp { 69766 struct blkcg_policy_data cpd; 69767 unsigned int dfl_weight; 69768 }; 69769 69770 struct ioc_now { 69771 u64 now_ns; 69772 u64 now; 69773 u64 vnow; 69774 u64 vrate; 69775 }; 69776 69777 struct iocg_wait { 69778 struct wait_queue_entry wait; 69779 struct bio *bio; 69780 u64 abs_cost; 69781 bool committed; 69782 }; 69783 69784 struct iocg_wake_ctx { 69785 struct ioc_gq *iocg; 69786 u32 hw_inuse; 69787 s64 vbudget; 69788 }; 69789 69790 struct trace_event_raw_iocost_iocg_state { 69791 struct trace_entry ent; 69792 u32 __data_loc_devname; 69793 u32 __data_loc_cgroup; 69794 u64 now; 69795 u64 vnow; 69796 u64 vrate; 69797 u64 last_period; 69798 u64 cur_period; 69799 u64 vtime; 69800 u32 weight; 69801 u32 inuse; 69802 u64 hweight_active; 69803 u64 hweight_inuse; 69804 char __data[0]; 69805 }; 69806 69807 struct trace_event_raw_iocg_inuse_update { 69808 struct trace_entry ent; 69809 u32 __data_loc_devname; 69810 u32 __data_loc_cgroup; 69811 u64 now; 69812 u32 old_inuse; 69813 u32 new_inuse; 69814 u64 old_hweight_inuse; 69815 u64 new_hweight_inuse; 69816 char __data[0]; 69817 }; 69818 69819 struct trace_event_raw_iocost_ioc_vrate_adj { 69820 struct trace_entry ent; 69821 u32 __data_loc_devname; 69822 u64 old_vrate; 69823 u64 new_vrate; 69824 int busy_level; 69825 u32 read_missed_ppm; 69826 u32 write_missed_ppm; 69827 u32 rq_wait_pct; 69828 int nr_lagging; 69829 int nr_shortages; 69830 char __data[0]; 69831 }; 69832 69833 struct trace_event_raw_iocost_iocg_forgive_debt { 69834 struct trace_entry ent; 69835 u32 __data_loc_devname; 69836 u32 __data_loc_cgroup; 69837 u64 now; 69838 u64 vnow; 69839 u32 usage_pct; 69840 u64 old_debt; 69841 u64 new_debt; 69842 u64 old_delay; 69843 u64 new_delay; 69844 char __data[0]; 69845 }; 69846 69847 struct trace_event_data_offsets_iocost_iocg_state { 69848 u32 devname; 69849 u32 cgroup; 69850 }; 69851 69852 struct trace_event_data_offsets_iocg_inuse_update { 69853 u32 devname; 69854 u32 cgroup; 69855 }; 69856 69857 struct trace_event_data_offsets_iocost_ioc_vrate_adj { 69858 u32 devname; 69859 }; 69860 69861 struct trace_event_data_offsets_iocost_iocg_forgive_debt { 69862 u32 devname; 69863 u32 cgroup; 69864 }; 69865 69866 typedef void (*btf_trace_iocost_iocg_activate)(void *, struct ioc_gq *, const char *, struct ioc_now *, u64, u64, u64); 69867 69868 typedef void (*btf_trace_iocost_iocg_idle)(void *, struct ioc_gq *, const char *, struct ioc_now *, u64, u64, u64); 69869 69870 typedef void (*btf_trace_iocost_inuse_shortage)(void *, struct ioc_gq *, const char *, struct ioc_now *, u32, u32, u64, u64); 69871 69872 typedef void (*btf_trace_iocost_inuse_transfer)(void *, struct ioc_gq *, const char *, struct ioc_now *, u32, u32, u64, u64); 69873 69874 typedef void (*btf_trace_iocost_inuse_adjust)(void *, struct ioc_gq *, const char *, struct ioc_now *, u32, u32, u64, u64); 69875 69876 typedef void (*btf_trace_iocost_ioc_vrate_adj)(void *, struct ioc *, u64, u32 *, u32, int, int); 69877 69878 typedef void (*btf_trace_iocost_iocg_forgive_debt)(void *, struct ioc_gq *, const char *, struct ioc_now *, u32, u64, u64, u64, u64); 69879 69880 struct deadline_data { 69881 struct rb_root sort_list[2]; 69882 struct list_head fifo_list[2]; 69883 struct request *next_rq[2]; 69884 unsigned int batching; 69885 unsigned int starved; 69886 int fifo_expire[2]; 69887 int fifo_batch; 69888 int writes_starved; 69889 int front_merges; 69890 spinlock_t lock; 69891 spinlock_t zone_lock; 69892 struct list_head dispatch; 69893 }; 69894 69895 struct trace_event_raw_kyber_latency { 69896 struct trace_entry ent; 69897 dev_t dev; 69898 char domain[16]; 69899 char type[8]; 69900 u8 percentile; 69901 u8 numerator; 69902 u8 denominator; 69903 unsigned int samples; 69904 char __data[0]; 69905 }; 69906 69907 struct trace_event_raw_kyber_adjust { 69908 struct trace_entry ent; 69909 dev_t dev; 69910 char domain[16]; 69911 unsigned int depth; 69912 char __data[0]; 69913 }; 69914 69915 struct trace_event_raw_kyber_throttled { 69916 struct trace_entry ent; 69917 dev_t dev; 69918 char domain[16]; 69919 char __data[0]; 69920 }; 69921 69922 struct trace_event_data_offsets_kyber_latency {}; 69923 69924 struct trace_event_data_offsets_kyber_adjust {}; 69925 69926 struct trace_event_data_offsets_kyber_throttled {}; 69927 69928 typedef void (*btf_trace_kyber_latency)(void *, struct request_queue *, const char *, const char *, unsigned int, unsigned int, unsigned int, unsigned int); 69929 69930 typedef void (*btf_trace_kyber_adjust)(void *, struct request_queue *, const char *, unsigned int); 69931 69932 typedef void (*btf_trace_kyber_throttled)(void *, struct request_queue *, const char *); 69933 69934 enum { 69935 KYBER_READ = 0, 69936 KYBER_WRITE = 1, 69937 KYBER_DISCARD = 2, 69938 KYBER_OTHER = 3, 69939 KYBER_NUM_DOMAINS = 4, 69940 }; 69941 69942 enum { 69943 KYBER_ASYNC_PERCENT = 75, 69944 }; 69945 69946 enum { 69947 KYBER_LATENCY_SHIFT = 2, 69948 KYBER_GOOD_BUCKETS = 4, 69949 KYBER_LATENCY_BUCKETS = 8, 69950 }; 69951 69952 enum { 69953 KYBER_TOTAL_LATENCY = 0, 69954 KYBER_IO_LATENCY = 1, 69955 }; 69956 69957 struct kyber_cpu_latency { 69958 atomic_t buckets[48]; 69959 }; 69960 69961 struct kyber_ctx_queue { 69962 spinlock_t lock; 69963 struct list_head rq_list[4]; 69964 long: 64; 69965 long: 64; 69966 long: 64; 69967 long: 64; 69968 long: 64; 69969 long: 64; 69970 long: 64; 69971 }; 69972 69973 struct kyber_queue_data { 69974 struct request_queue *q; 69975 struct sbitmap_queue domain_tokens[4]; 69976 unsigned int async_depth; 69977 struct kyber_cpu_latency *cpu_latency; 69978 struct timer_list timer; 69979 unsigned int latency_buckets[48]; 69980 long unsigned int latency_timeout[3]; 69981 int domain_p99[3]; 69982 u64 latency_targets[3]; 69983 }; 69984 69985 struct kyber_hctx_data { 69986 spinlock_t lock; 69987 struct list_head rqs[4]; 69988 unsigned int cur_domain; 69989 unsigned int batching; 69990 struct kyber_ctx_queue *kcqs; 69991 struct sbitmap kcq_map[4]; 69992 struct sbq_wait domain_wait[4]; 69993 struct sbq_wait_state *domain_ws[4]; 69994 atomic_t wait_index[4]; 69995 }; 69996 69997 struct flush_kcq_data { 69998 struct kyber_hctx_data *khd; 69999 unsigned int sched_domain; 70000 struct list_head *list; 70001 }; 70002 70003 struct bfq_entity; 70004 70005 struct bfq_service_tree { 70006 struct rb_root active; 70007 struct rb_root idle; 70008 struct bfq_entity *first_idle; 70009 struct bfq_entity *last_idle; 70010 u64 vtime; 70011 long unsigned int wsum; 70012 }; 70013 70014 struct bfq_sched_data; 70015 70016 struct bfq_entity { 70017 struct rb_node rb_node; 70018 bool on_st_or_in_serv; 70019 u64 start; 70020 u64 finish; 70021 struct rb_root *tree; 70022 u64 min_start; 70023 int service; 70024 int budget; 70025 int dev_weight; 70026 int weight; 70027 int new_weight; 70028 int orig_weight; 70029 struct bfq_entity *parent; 70030 struct bfq_sched_data *my_sched_data; 70031 struct bfq_sched_data *sched_data; 70032 int prio_changed; 70033 bool in_groups_with_pending_reqs; 70034 }; 70035 70036 struct bfq_sched_data { 70037 struct bfq_entity *in_service_entity; 70038 struct bfq_entity *next_in_service; 70039 struct bfq_service_tree service_tree[3]; 70040 long unsigned int bfq_class_idle_last_service; 70041 }; 70042 70043 struct bfq_weight_counter { 70044 unsigned int weight; 70045 unsigned int num_active; 70046 struct rb_node weights_node; 70047 }; 70048 70049 struct bfq_ttime { 70050 u64 last_end_request; 70051 u64 ttime_total; 70052 long unsigned int ttime_samples; 70053 u64 ttime_mean; 70054 }; 70055 70056 struct bfq_data; 70057 70058 struct bfq_io_cq; 70059 70060 struct bfq_queue { 70061 int ref; 70062 struct bfq_data *bfqd; 70063 short unsigned int ioprio; 70064 short unsigned int ioprio_class; 70065 short unsigned int new_ioprio; 70066 short unsigned int new_ioprio_class; 70067 u64 last_serv_time_ns; 70068 unsigned int inject_limit; 70069 long unsigned int decrease_time_jif; 70070 struct bfq_queue *new_bfqq; 70071 struct rb_node pos_node; 70072 struct rb_root *pos_root; 70073 struct rb_root sort_list; 70074 struct request *next_rq; 70075 int queued[2]; 70076 int allocated; 70077 int meta_pending; 70078 struct list_head fifo; 70079 struct bfq_entity entity; 70080 struct bfq_weight_counter *weight_counter; 70081 int max_budget; 70082 long unsigned int budget_timeout; 70083 int dispatched; 70084 long unsigned int flags; 70085 struct list_head bfqq_list; 70086 struct bfq_ttime ttime; 70087 u32 seek_history; 70088 struct hlist_node burst_list_node; 70089 sector_t last_request_pos; 70090 unsigned int requests_within_timer; 70091 pid_t pid; 70092 struct bfq_io_cq *bic; 70093 long unsigned int wr_cur_max_time; 70094 long unsigned int soft_rt_next_start; 70095 long unsigned int last_wr_start_finish; 70096 unsigned int wr_coeff; 70097 long unsigned int last_idle_bklogged; 70098 long unsigned int service_from_backlogged; 70099 long unsigned int service_from_wr; 70100 long unsigned int wr_start_at_switch_to_srt; 70101 long unsigned int split_time; 70102 long unsigned int first_IO_time; 70103 u32 max_service_rate; 70104 struct bfq_queue *waker_bfqq; 70105 struct hlist_node woken_list_node; 70106 struct hlist_head woken_list; 70107 }; 70108 70109 struct bfq_group; 70110 70111 struct bfq_data { 70112 struct request_queue *queue; 70113 struct list_head dispatch; 70114 struct bfq_group *root_group; 70115 struct rb_root_cached queue_weights_tree; 70116 unsigned int num_groups_with_pending_reqs; 70117 unsigned int busy_queues[3]; 70118 int wr_busy_queues; 70119 int queued; 70120 int rq_in_driver; 70121 bool nonrot_with_queueing; 70122 int max_rq_in_driver; 70123 int hw_tag_samples; 70124 int hw_tag; 70125 int budgets_assigned; 70126 struct hrtimer idle_slice_timer; 70127 struct bfq_queue *in_service_queue; 70128 sector_t last_position; 70129 sector_t in_serv_last_pos; 70130 u64 last_completion; 70131 struct bfq_queue *last_completed_rq_bfqq; 70132 u64 last_empty_occupied_ns; 70133 bool wait_dispatch; 70134 struct request *waited_rq; 70135 bool rqs_injected; 70136 u64 first_dispatch; 70137 u64 last_dispatch; 70138 ktime_t last_budget_start; 70139 ktime_t last_idling_start; 70140 long unsigned int last_idling_start_jiffies; 70141 int peak_rate_samples; 70142 u32 sequential_samples; 70143 u64 tot_sectors_dispatched; 70144 u32 last_rq_max_size; 70145 u64 delta_from_first; 70146 u32 peak_rate; 70147 int bfq_max_budget; 70148 struct list_head active_list; 70149 struct list_head idle_list; 70150 u64 bfq_fifo_expire[2]; 70151 unsigned int bfq_back_penalty; 70152 unsigned int bfq_back_max; 70153 u32 bfq_slice_idle; 70154 int bfq_user_max_budget; 70155 unsigned int bfq_timeout; 70156 unsigned int bfq_requests_within_timer; 70157 bool strict_guarantees; 70158 long unsigned int last_ins_in_burst; 70159 long unsigned int bfq_burst_interval; 70160 int burst_size; 70161 struct bfq_entity *burst_parent_entity; 70162 long unsigned int bfq_large_burst_thresh; 70163 bool large_burst; 70164 struct hlist_head burst_list; 70165 bool low_latency; 70166 unsigned int bfq_wr_coeff; 70167 unsigned int bfq_wr_max_time; 70168 unsigned int bfq_wr_rt_max_time; 70169 unsigned int bfq_wr_min_idle_time; 70170 long unsigned int bfq_wr_min_inter_arr_async; 70171 unsigned int bfq_wr_max_softrt_rate; 70172 u64 rate_dur_prod; 70173 struct bfq_queue oom_bfqq; 70174 spinlock_t lock; 70175 struct bfq_io_cq *bio_bic; 70176 struct bfq_queue *bio_bfqq; 70177 unsigned int word_depths[4]; 70178 }; 70179 70180 struct bfq_io_cq { 70181 struct io_cq icq; 70182 struct bfq_queue *bfqq[2]; 70183 int ioprio; 70184 uint64_t blkcg_serial_nr; 70185 bool saved_has_short_ttime; 70186 bool saved_IO_bound; 70187 bool saved_in_large_burst; 70188 bool was_in_burst_list; 70189 unsigned int saved_weight; 70190 long unsigned int saved_wr_coeff; 70191 long unsigned int saved_last_wr_start_finish; 70192 long unsigned int saved_wr_start_at_switch_to_srt; 70193 unsigned int saved_wr_cur_max_time; 70194 struct bfq_ttime saved_ttime; 70195 }; 70196 70197 struct bfqg_stats { 70198 struct blkg_rwstat bytes; 70199 struct blkg_rwstat ios; 70200 }; 70201 70202 struct bfq_group { 70203 struct blkg_policy_data pd; 70204 char blkg_path[128]; 70205 int ref; 70206 struct bfq_entity entity; 70207 struct bfq_sched_data sched_data; 70208 void *bfqd; 70209 struct bfq_queue *async_bfqq[16]; 70210 struct bfq_queue *async_idle_bfqq; 70211 struct bfq_entity *my_entity; 70212 int active_entities; 70213 struct rb_root rq_pos_tree; 70214 struct bfqg_stats stats; 70215 }; 70216 70217 enum bfqq_state_flags { 70218 BFQQF_just_created = 0, 70219 BFQQF_busy = 1, 70220 BFQQF_wait_request = 2, 70221 BFQQF_non_blocking_wait_rq = 3, 70222 BFQQF_fifo_expire = 4, 70223 BFQQF_has_short_ttime = 5, 70224 BFQQF_sync = 6, 70225 BFQQF_IO_bound = 7, 70226 BFQQF_in_large_burst = 8, 70227 BFQQF_softrt_update = 9, 70228 BFQQF_coop = 10, 70229 BFQQF_split_coop = 11, 70230 BFQQF_has_waker = 12, 70231 }; 70232 70233 enum bfqq_expiration { 70234 BFQQE_TOO_IDLE = 0, 70235 BFQQE_BUDGET_TIMEOUT = 1, 70236 BFQQE_BUDGET_EXHAUSTED = 2, 70237 BFQQE_NO_MORE_REQUESTS = 3, 70238 BFQQE_PREEMPTED = 4, 70239 }; 70240 70241 struct bfq_group_data { 70242 struct blkcg_policy_data pd; 70243 unsigned int weight; 70244 }; 70245 70246 enum bip_flags { 70247 BIP_BLOCK_INTEGRITY = 1, 70248 BIP_MAPPED_INTEGRITY = 2, 70249 BIP_CTRL_NOCHECK = 4, 70250 BIP_DISK_NOCHECK = 8, 70251 BIP_IP_CHECKSUM = 16, 70252 }; 70253 70254 enum blk_integrity_flags { 70255 BLK_INTEGRITY_VERIFY = 1, 70256 BLK_INTEGRITY_GENERATE = 2, 70257 BLK_INTEGRITY_DEVICE_CAPABLE = 4, 70258 BLK_INTEGRITY_IP_CHECKSUM = 8, 70259 }; 70260 70261 struct integrity_sysfs_entry { 70262 struct attribute attr; 70263 ssize_t (*show)(struct blk_integrity *, char *); 70264 ssize_t (*store)(struct blk_integrity *, const char *, size_t); 70265 }; 70266 70267 enum t10_dif_type { 70268 T10_PI_TYPE0_PROTECTION = 0, 70269 T10_PI_TYPE1_PROTECTION = 1, 70270 T10_PI_TYPE2_PROTECTION = 2, 70271 T10_PI_TYPE3_PROTECTION = 3, 70272 }; 70273 70274 struct t10_pi_tuple { 70275 __be16 guard_tag; 70276 __be16 app_tag; 70277 __be32 ref_tag; 70278 }; 70279 70280 typedef __be16 csum_fn(void *, unsigned int); 70281 70282 struct virtio_device_id { 70283 __u32 device; 70284 __u32 vendor; 70285 }; 70286 70287 struct virtio_device; 70288 70289 struct virtqueue { 70290 struct list_head list; 70291 void (*callback)(struct virtqueue *); 70292 const char *name; 70293 struct virtio_device *vdev; 70294 unsigned int index; 70295 unsigned int num_free; 70296 void *priv; 70297 }; 70298 70299 struct vringh_config_ops; 70300 70301 struct virtio_config_ops; 70302 70303 struct virtio_device { 70304 int index; 70305 bool failed; 70306 bool config_enabled; 70307 bool config_change_pending; 70308 spinlock_t config_lock; 70309 struct device dev; 70310 struct virtio_device_id id; 70311 const struct virtio_config_ops *config; 70312 const struct vringh_config_ops *vringh_config; 70313 struct list_head vqs; 70314 u64 features; 70315 void *priv; 70316 }; 70317 70318 typedef void vq_callback_t(struct virtqueue *); 70319 70320 struct virtio_shm_region; 70321 70322 struct virtio_config_ops { 70323 void (*get)(struct virtio_device *, unsigned int, void *, unsigned int); 70324 void (*set)(struct virtio_device *, unsigned int, const void *, unsigned int); 70325 u32 (*generation)(struct virtio_device *); 70326 u8 (*get_status)(struct virtio_device *); 70327 void (*set_status)(struct virtio_device *, u8); 70328 void (*reset)(struct virtio_device *); 70329 int (*find_vqs)(struct virtio_device *, unsigned int, struct virtqueue **, vq_callback_t **, const char * const *, const bool *, struct irq_affinity *); 70330 void (*del_vqs)(struct virtio_device *); 70331 u64 (*get_features)(struct virtio_device *); 70332 int (*finalize_features)(struct virtio_device *); 70333 const char * (*bus_name)(struct virtio_device *); 70334 int (*set_vq_affinity)(struct virtqueue *, const struct cpumask *); 70335 const struct cpumask * (*get_vq_affinity)(struct virtio_device *, int); 70336 bool (*get_shm_region)(struct virtio_device *, struct virtio_shm_region *, u8); 70337 }; 70338 70339 struct virtio_shm_region { 70340 u64 addr; 70341 u64 len; 70342 }; 70343 70344 struct irq_poll; 70345 70346 typedef int irq_poll_fn(struct irq_poll *, int); 70347 70348 struct irq_poll { 70349 struct list_head list; 70350 long unsigned int state; 70351 int weight; 70352 irq_poll_fn *poll; 70353 }; 70354 70355 struct dim_sample { 70356 ktime_t time; 70357 u32 pkt_ctr; 70358 u32 byte_ctr; 70359 u16 event_ctr; 70360 u32 comp_ctr; 70361 }; 70362 70363 struct dim_stats { 70364 int ppms; 70365 int bpms; 70366 int epms; 70367 int cpms; 70368 int cpe_ratio; 70369 }; 70370 70371 struct dim { 70372 u8 state; 70373 struct dim_stats prev_stats; 70374 struct dim_sample start_sample; 70375 struct dim_sample measuring_sample; 70376 struct work_struct work; 70377 void *priv; 70378 u8 profile_ix; 70379 u8 mode; 70380 u8 tune_state; 70381 u8 steps_right; 70382 u8 steps_left; 70383 u8 tired; 70384 }; 70385 70386 enum rdma_nl_counter_mode { 70387 RDMA_COUNTER_MODE_NONE = 0, 70388 RDMA_COUNTER_MODE_AUTO = 1, 70389 RDMA_COUNTER_MODE_MANUAL = 2, 70390 RDMA_COUNTER_MODE_MAX = 3, 70391 }; 70392 70393 enum rdma_nl_counter_mask { 70394 RDMA_COUNTER_MASK_QP_TYPE = 1, 70395 RDMA_COUNTER_MASK_PID = 2, 70396 }; 70397 70398 enum rdma_restrack_type { 70399 RDMA_RESTRACK_PD = 0, 70400 RDMA_RESTRACK_CQ = 1, 70401 RDMA_RESTRACK_QP = 2, 70402 RDMA_RESTRACK_CM_ID = 3, 70403 RDMA_RESTRACK_MR = 4, 70404 RDMA_RESTRACK_CTX = 5, 70405 RDMA_RESTRACK_COUNTER = 6, 70406 RDMA_RESTRACK_MAX = 7, 70407 }; 70408 70409 struct rdma_restrack_entry { 70410 bool valid; 70411 u8 no_track: 1; 70412 struct kref kref; 70413 struct completion comp; 70414 struct task_struct *task; 70415 const char *kern_name; 70416 enum rdma_restrack_type type; 70417 bool user; 70418 u32 id; 70419 }; 70420 70421 struct rdma_link_ops { 70422 struct list_head list; 70423 const char *type; 70424 int (*newlink)(const char *, struct net_device *); 70425 }; 70426 70427 struct auto_mode_param { 70428 int qp_type; 70429 }; 70430 70431 struct rdma_counter_mode { 70432 enum rdma_nl_counter_mode mode; 70433 enum rdma_nl_counter_mask mask; 70434 struct auto_mode_param param; 70435 }; 70436 70437 struct rdma_hw_stats; 70438 70439 struct rdma_port_counter { 70440 struct rdma_counter_mode mode; 70441 struct rdma_hw_stats *hstats; 70442 unsigned int num_counters; 70443 struct mutex lock; 70444 }; 70445 70446 struct rdma_hw_stats { 70447 struct mutex lock; 70448 long unsigned int timestamp; 70449 long unsigned int lifespan; 70450 const char * const *names; 70451 int num_counters; 70452 u64 value[0]; 70453 }; 70454 70455 struct ib_device; 70456 70457 struct rdma_counter { 70458 struct rdma_restrack_entry res; 70459 struct ib_device *device; 70460 uint32_t id; 70461 struct kref kref; 70462 struct rdma_counter_mode mode; 70463 struct mutex lock; 70464 struct rdma_hw_stats *stats; 70465 u8 port; 70466 }; 70467 70468 enum rdma_driver_id { 70469 RDMA_DRIVER_UNKNOWN = 0, 70470 RDMA_DRIVER_MLX5 = 1, 70471 RDMA_DRIVER_MLX4 = 2, 70472 RDMA_DRIVER_CXGB3 = 3, 70473 RDMA_DRIVER_CXGB4 = 4, 70474 RDMA_DRIVER_MTHCA = 5, 70475 RDMA_DRIVER_BNXT_RE = 6, 70476 RDMA_DRIVER_OCRDMA = 7, 70477 RDMA_DRIVER_NES = 8, 70478 RDMA_DRIVER_I40IW = 9, 70479 RDMA_DRIVER_VMW_PVRDMA = 10, 70480 RDMA_DRIVER_QEDR = 11, 70481 RDMA_DRIVER_HNS = 12, 70482 RDMA_DRIVER_USNIC = 13, 70483 RDMA_DRIVER_RXE = 14, 70484 RDMA_DRIVER_HFI1 = 15, 70485 RDMA_DRIVER_QIB = 16, 70486 RDMA_DRIVER_EFA = 17, 70487 RDMA_DRIVER_SIW = 18, 70488 }; 70489 70490 enum ib_cq_notify_flags { 70491 IB_CQ_SOLICITED = 1, 70492 IB_CQ_NEXT_COMP = 2, 70493 IB_CQ_SOLICITED_MASK = 3, 70494 IB_CQ_REPORT_MISSED_EVENTS = 4, 70495 }; 70496 70497 struct ib_mad; 70498 70499 enum rdma_link_layer { 70500 IB_LINK_LAYER_UNSPECIFIED = 0, 70501 IB_LINK_LAYER_INFINIBAND = 1, 70502 IB_LINK_LAYER_ETHERNET = 2, 70503 }; 70504 70505 enum rdma_netdev_t { 70506 RDMA_NETDEV_OPA_VNIC = 0, 70507 RDMA_NETDEV_IPOIB = 1, 70508 }; 70509 70510 enum ib_srq_attr_mask { 70511 IB_SRQ_MAX_WR = 1, 70512 IB_SRQ_LIMIT = 2, 70513 }; 70514 70515 enum ib_mr_type { 70516 IB_MR_TYPE_MEM_REG = 0, 70517 IB_MR_TYPE_SG_GAPS = 1, 70518 IB_MR_TYPE_DM = 2, 70519 IB_MR_TYPE_USER = 3, 70520 IB_MR_TYPE_DMA = 4, 70521 IB_MR_TYPE_INTEGRITY = 5, 70522 }; 70523 70524 enum ib_uverbs_advise_mr_advice { 70525 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH = 0, 70526 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_WRITE = 1, 70527 IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH_NO_FAULT = 2, 70528 }; 70529 70530 struct uverbs_attr_bundle; 70531 70532 struct rdma_cm_id; 70533 70534 struct iw_cm_id; 70535 70536 struct iw_cm_conn_param; 70537 70538 struct ib_qp; 70539 70540 struct ib_send_wr; 70541 70542 struct ib_recv_wr; 70543 70544 struct ib_cq; 70545 70546 struct ib_wc; 70547 70548 struct ib_srq; 70549 70550 struct ib_grh; 70551 70552 struct ib_device_attr; 70553 70554 struct ib_udata; 70555 70556 struct ib_device_modify; 70557 70558 struct ib_port_attr; 70559 70560 struct ib_port_modify; 70561 70562 struct ib_port_immutable; 70563 70564 struct rdma_netdev_alloc_params; 70565 70566 union ib_gid; 70567 70568 struct ib_gid_attr; 70569 70570 struct ib_ucontext; 70571 70572 struct rdma_user_mmap_entry; 70573 70574 struct ib_pd; 70575 70576 struct ib_ah; 70577 70578 struct rdma_ah_init_attr; 70579 70580 struct rdma_ah_attr; 70581 70582 struct ib_srq_init_attr; 70583 70584 struct ib_srq_attr; 70585 70586 struct ib_qp_init_attr; 70587 70588 struct ib_qp_attr; 70589 70590 struct ib_cq_init_attr; 70591 70592 struct ib_mr; 70593 70594 struct ib_sge; 70595 70596 struct ib_mr_status; 70597 70598 struct ib_mw; 70599 70600 struct ib_xrcd; 70601 70602 struct ib_flow; 70603 70604 struct ib_flow_attr; 70605 70606 struct ib_flow_action; 70607 70608 struct ib_flow_action_attrs_esp; 70609 70610 struct ib_wq; 70611 70612 struct ib_wq_init_attr; 70613 70614 struct ib_wq_attr; 70615 70616 struct ib_rwq_ind_table; 70617 70618 struct ib_rwq_ind_table_init_attr; 70619 70620 struct ib_dm; 70621 70622 struct ib_dm_alloc_attr; 70623 70624 struct ib_dm_mr_attr; 70625 70626 struct ib_counters; 70627 70628 struct ib_counters_read_attr; 70629 70630 struct ib_device_ops { 70631 struct module *owner; 70632 enum rdma_driver_id driver_id; 70633 u32 uverbs_abi_ver; 70634 unsigned int uverbs_no_driver_id_binding: 1; 70635 int (*post_send)(struct ib_qp *, const struct ib_send_wr *, const struct ib_send_wr **); 70636 int (*post_recv)(struct ib_qp *, const struct ib_recv_wr *, const struct ib_recv_wr **); 70637 void (*drain_rq)(struct ib_qp *); 70638 void (*drain_sq)(struct ib_qp *); 70639 int (*poll_cq)(struct ib_cq *, int, struct ib_wc *); 70640 int (*peek_cq)(struct ib_cq *, int); 70641 int (*req_notify_cq)(struct ib_cq *, enum ib_cq_notify_flags); 70642 int (*req_ncomp_notif)(struct ib_cq *, int); 70643 int (*post_srq_recv)(struct ib_srq *, const struct ib_recv_wr *, const struct ib_recv_wr **); 70644 int (*process_mad)(struct ib_device *, int, u8, const struct ib_wc *, const struct ib_grh *, const struct ib_mad *, struct ib_mad *, size_t *, u16 *); 70645 int (*query_device)(struct ib_device *, struct ib_device_attr *, struct ib_udata *); 70646 int (*modify_device)(struct ib_device *, int, struct ib_device_modify *); 70647 void (*get_dev_fw_str)(struct ib_device *, char *); 70648 const struct cpumask * (*get_vector_affinity)(struct ib_device *, int); 70649 int (*query_port)(struct ib_device *, u8, struct ib_port_attr *); 70650 int (*modify_port)(struct ib_device *, u8, int, struct ib_port_modify *); 70651 int (*get_port_immutable)(struct ib_device *, u8, struct ib_port_immutable *); 70652 enum rdma_link_layer (*get_link_layer)(struct ib_device *, u8); 70653 struct net_device * (*get_netdev)(struct ib_device *, u8); 70654 struct net_device * (*alloc_rdma_netdev)(struct ib_device *, u8, enum rdma_netdev_t, const char *, unsigned char, void (*)(struct net_device *)); 70655 int (*rdma_netdev_get_params)(struct ib_device *, u8, enum rdma_netdev_t, struct rdma_netdev_alloc_params *); 70656 int (*query_gid)(struct ib_device *, u8, int, union ib_gid *); 70657 int (*add_gid)(const struct ib_gid_attr *, void **); 70658 int (*del_gid)(const struct ib_gid_attr *, void **); 70659 int (*query_pkey)(struct ib_device *, u8, u16, u16 *); 70660 int (*alloc_ucontext)(struct ib_ucontext *, struct ib_udata *); 70661 void (*dealloc_ucontext)(struct ib_ucontext *); 70662 int (*mmap)(struct ib_ucontext *, struct vm_area_struct *); 70663 void (*mmap_free)(struct rdma_user_mmap_entry *); 70664 void (*disassociate_ucontext)(struct ib_ucontext *); 70665 int (*alloc_pd)(struct ib_pd *, struct ib_udata *); 70666 int (*dealloc_pd)(struct ib_pd *, struct ib_udata *); 70667 int (*create_ah)(struct ib_ah *, struct rdma_ah_init_attr *, struct ib_udata *); 70668 int (*create_user_ah)(struct ib_ah *, struct rdma_ah_init_attr *, struct ib_udata *); 70669 int (*modify_ah)(struct ib_ah *, struct rdma_ah_attr *); 70670 int (*query_ah)(struct ib_ah *, struct rdma_ah_attr *); 70671 int (*destroy_ah)(struct ib_ah *, u32); 70672 int (*create_srq)(struct ib_srq *, struct ib_srq_init_attr *, struct ib_udata *); 70673 int (*modify_srq)(struct ib_srq *, struct ib_srq_attr *, enum ib_srq_attr_mask, struct ib_udata *); 70674 int (*query_srq)(struct ib_srq *, struct ib_srq_attr *); 70675 int (*destroy_srq)(struct ib_srq *, struct ib_udata *); 70676 struct ib_qp * (*create_qp)(struct ib_pd *, struct ib_qp_init_attr *, struct ib_udata *); 70677 int (*modify_qp)(struct ib_qp *, struct ib_qp_attr *, int, struct ib_udata *); 70678 int (*query_qp)(struct ib_qp *, struct ib_qp_attr *, int, struct ib_qp_init_attr *); 70679 int (*destroy_qp)(struct ib_qp *, struct ib_udata *); 70680 int (*create_cq)(struct ib_cq *, const struct ib_cq_init_attr *, struct ib_udata *); 70681 int (*modify_cq)(struct ib_cq *, u16, u16); 70682 int (*destroy_cq)(struct ib_cq *, struct ib_udata *); 70683 int (*resize_cq)(struct ib_cq *, int, struct ib_udata *); 70684 struct ib_mr * (*get_dma_mr)(struct ib_pd *, int); 70685 struct ib_mr * (*reg_user_mr)(struct ib_pd *, u64, u64, u64, int, struct ib_udata *); 70686 struct ib_mr * (*rereg_user_mr)(struct ib_mr *, int, u64, u64, u64, int, struct ib_pd *, struct ib_udata *); 70687 int (*dereg_mr)(struct ib_mr *, struct ib_udata *); 70688 struct ib_mr * (*alloc_mr)(struct ib_pd *, enum ib_mr_type, u32); 70689 struct ib_mr * (*alloc_mr_integrity)(struct ib_pd *, u32, u32); 70690 int (*advise_mr)(struct ib_pd *, enum ib_uverbs_advise_mr_advice, u32, struct ib_sge *, u32, struct uverbs_attr_bundle *); 70691 int (*map_mr_sg)(struct ib_mr *, struct scatterlist *, int, unsigned int *); 70692 int (*check_mr_status)(struct ib_mr *, u32, struct ib_mr_status *); 70693 int (*alloc_mw)(struct ib_mw *, struct ib_udata *); 70694 int (*dealloc_mw)(struct ib_mw *); 70695 int (*attach_mcast)(struct ib_qp *, union ib_gid *, u16); 70696 int (*detach_mcast)(struct ib_qp *, union ib_gid *, u16); 70697 int (*alloc_xrcd)(struct ib_xrcd *, struct ib_udata *); 70698 int (*dealloc_xrcd)(struct ib_xrcd *, struct ib_udata *); 70699 struct ib_flow * (*create_flow)(struct ib_qp *, struct ib_flow_attr *, struct ib_udata *); 70700 int (*destroy_flow)(struct ib_flow *); 70701 struct ib_flow_action * (*create_flow_action_esp)(struct ib_device *, const struct ib_flow_action_attrs_esp *, struct uverbs_attr_bundle *); 70702 int (*destroy_flow_action)(struct ib_flow_action *); 70703 int (*modify_flow_action_esp)(struct ib_flow_action *, const struct ib_flow_action_attrs_esp *, struct uverbs_attr_bundle *); 70704 int (*set_vf_link_state)(struct ib_device *, int, u8, int); 70705 int (*get_vf_config)(struct ib_device *, int, u8, struct ifla_vf_info *); 70706 int (*get_vf_stats)(struct ib_device *, int, u8, struct ifla_vf_stats *); 70707 int (*get_vf_guid)(struct ib_device *, int, u8, struct ifla_vf_guid *, struct ifla_vf_guid *); 70708 int (*set_vf_guid)(struct ib_device *, int, u8, u64, int); 70709 struct ib_wq * (*create_wq)(struct ib_pd *, struct ib_wq_init_attr *, struct ib_udata *); 70710 int (*destroy_wq)(struct ib_wq *, struct ib_udata *); 70711 int (*modify_wq)(struct ib_wq *, struct ib_wq_attr *, u32, struct ib_udata *); 70712 int (*create_rwq_ind_table)(struct ib_rwq_ind_table *, struct ib_rwq_ind_table_init_attr *, struct ib_udata *); 70713 int (*destroy_rwq_ind_table)(struct ib_rwq_ind_table *); 70714 struct ib_dm * (*alloc_dm)(struct ib_device *, struct ib_ucontext *, struct ib_dm_alloc_attr *, struct uverbs_attr_bundle *); 70715 int (*dealloc_dm)(struct ib_dm *, struct uverbs_attr_bundle *); 70716 struct ib_mr * (*reg_dm_mr)(struct ib_pd *, struct ib_dm *, struct ib_dm_mr_attr *, struct uverbs_attr_bundle *); 70717 int (*create_counters)(struct ib_counters *, struct uverbs_attr_bundle *); 70718 int (*destroy_counters)(struct ib_counters *); 70719 int (*read_counters)(struct ib_counters *, struct ib_counters_read_attr *, struct uverbs_attr_bundle *); 70720 int (*map_mr_sg_pi)(struct ib_mr *, struct scatterlist *, int, unsigned int *, struct scatterlist *, int, unsigned int *); 70721 struct rdma_hw_stats * (*alloc_hw_stats)(struct ib_device *, u8); 70722 int (*get_hw_stats)(struct ib_device *, struct rdma_hw_stats *, u8, int); 70723 int (*init_port)(struct ib_device *, u8, struct kobject *); 70724 int (*fill_res_mr_entry)(struct sk_buff *, struct ib_mr *); 70725 int (*fill_res_mr_entry_raw)(struct sk_buff *, struct ib_mr *); 70726 int (*fill_res_cq_entry)(struct sk_buff *, struct ib_cq *); 70727 int (*fill_res_cq_entry_raw)(struct sk_buff *, struct ib_cq *); 70728 int (*fill_res_qp_entry)(struct sk_buff *, struct ib_qp *); 70729 int (*fill_res_qp_entry_raw)(struct sk_buff *, struct ib_qp *); 70730 int (*fill_res_cm_id_entry)(struct sk_buff *, struct rdma_cm_id *); 70731 int (*enable_driver)(struct ib_device *); 70732 void (*dealloc_driver)(struct ib_device *); 70733 void (*iw_add_ref)(struct ib_qp *); 70734 void (*iw_rem_ref)(struct ib_qp *); 70735 struct ib_qp * (*iw_get_qp)(struct ib_device *, int); 70736 int (*iw_connect)(struct iw_cm_id *, struct iw_cm_conn_param *); 70737 int (*iw_accept)(struct iw_cm_id *, struct iw_cm_conn_param *); 70738 int (*iw_reject)(struct iw_cm_id *, const void *, u8); 70739 int (*iw_create_listen)(struct iw_cm_id *, int); 70740 int (*iw_destroy_listen)(struct iw_cm_id *); 70741 int (*counter_bind_qp)(struct rdma_counter *, struct ib_qp *); 70742 int (*counter_unbind_qp)(struct ib_qp *); 70743 int (*counter_dealloc)(struct rdma_counter *); 70744 struct rdma_hw_stats * (*counter_alloc_stats)(struct rdma_counter *); 70745 int (*counter_update_stats)(struct rdma_counter *); 70746 int (*fill_stat_mr_entry)(struct sk_buff *, struct ib_mr *); 70747 int (*query_ucontext)(struct ib_ucontext *, struct uverbs_attr_bundle *); 70748 size_t size_ib_ah; 70749 size_t size_ib_counters; 70750 size_t size_ib_cq; 70751 size_t size_ib_mw; 70752 size_t size_ib_pd; 70753 size_t size_ib_rwq_ind_table; 70754 size_t size_ib_srq; 70755 size_t size_ib_ucontext; 70756 size_t size_ib_xrcd; 70757 }; 70758 70759 struct ib_core_device { 70760 struct device dev; 70761 possible_net_t rdma_net; 70762 struct kobject *ports_kobj; 70763 struct list_head port_list; 70764 struct ib_device *owner; 70765 }; 70766 70767 enum ib_atomic_cap { 70768 IB_ATOMIC_NONE = 0, 70769 IB_ATOMIC_HCA = 1, 70770 IB_ATOMIC_GLOB = 2, 70771 }; 70772 70773 struct ib_odp_caps { 70774 uint64_t general_caps; 70775 struct { 70776 uint32_t rc_odp_caps; 70777 uint32_t uc_odp_caps; 70778 uint32_t ud_odp_caps; 70779 uint32_t xrc_odp_caps; 70780 } per_transport_caps; 70781 }; 70782 70783 struct ib_rss_caps { 70784 u32 supported_qpts; 70785 u32 max_rwq_indirection_tables; 70786 u32 max_rwq_indirection_table_size; 70787 }; 70788 70789 struct ib_tm_caps { 70790 u32 max_rndv_hdr_size; 70791 u32 max_num_tags; 70792 u32 flags; 70793 u32 max_ops; 70794 u32 max_sge; 70795 }; 70796 70797 struct ib_cq_caps { 70798 u16 max_cq_moderation_count; 70799 u16 max_cq_moderation_period; 70800 }; 70801 70802 struct ib_device_attr { 70803 u64 fw_ver; 70804 __be64 sys_image_guid; 70805 u64 max_mr_size; 70806 u64 page_size_cap; 70807 u32 vendor_id; 70808 u32 vendor_part_id; 70809 u32 hw_ver; 70810 int max_qp; 70811 int max_qp_wr; 70812 u64 device_cap_flags; 70813 int max_send_sge; 70814 int max_recv_sge; 70815 int max_sge_rd; 70816 int max_cq; 70817 int max_cqe; 70818 int max_mr; 70819 int max_pd; 70820 int max_qp_rd_atom; 70821 int max_ee_rd_atom; 70822 int max_res_rd_atom; 70823 int max_qp_init_rd_atom; 70824 int max_ee_init_rd_atom; 70825 enum ib_atomic_cap atomic_cap; 70826 enum ib_atomic_cap masked_atomic_cap; 70827 int max_ee; 70828 int max_rdd; 70829 int max_mw; 70830 int max_raw_ipv6_qp; 70831 int max_raw_ethy_qp; 70832 int max_mcast_grp; 70833 int max_mcast_qp_attach; 70834 int max_total_mcast_qp_attach; 70835 int max_ah; 70836 int max_srq; 70837 int max_srq_wr; 70838 int max_srq_sge; 70839 unsigned int max_fast_reg_page_list_len; 70840 unsigned int max_pi_fast_reg_page_list_len; 70841 u16 max_pkeys; 70842 u8 local_ca_ack_delay; 70843 int sig_prot_cap; 70844 int sig_guard_cap; 70845 struct ib_odp_caps odp_caps; 70846 uint64_t timestamp_mask; 70847 uint64_t hca_core_clock; 70848 struct ib_rss_caps rss_caps; 70849 u32 max_wq_type_rq; 70850 u32 raw_packet_caps; 70851 struct ib_tm_caps tm_caps; 70852 struct ib_cq_caps cq_caps; 70853 u64 max_dm_size; 70854 u32 max_sgl_rd; 70855 }; 70856 70857 struct rdma_restrack_root; 70858 70859 struct uapi_definition; 70860 70861 struct ib_port_data; 70862 70863 struct ib_device { 70864 struct device *dma_device; 70865 struct ib_device_ops ops; 70866 char name[64]; 70867 struct callback_head callback_head; 70868 struct list_head event_handler_list; 70869 struct rw_semaphore event_handler_rwsem; 70870 spinlock_t qp_open_list_lock; 70871 struct rw_semaphore client_data_rwsem; 70872 struct xarray client_data; 70873 struct mutex unregistration_lock; 70874 rwlock_t cache_lock; 70875 struct ib_port_data *port_data; 70876 int num_comp_vectors; 70877 union { 70878 struct device dev; 70879 struct ib_core_device coredev; 70880 }; 70881 const struct attribute_group *groups[3]; 70882 u64 uverbs_cmd_mask; 70883 char node_desc[64]; 70884 __be64 node_guid; 70885 u32 local_dma_lkey; 70886 u16 is_switch: 1; 70887 u16 kverbs_provider: 1; 70888 u16 use_cq_dim: 1; 70889 u8 node_type; 70890 u8 phys_port_cnt; 70891 struct ib_device_attr attrs; 70892 struct attribute_group *hw_stats_ag; 70893 struct rdma_hw_stats *hw_stats; 70894 u32 index; 70895 spinlock_t cq_pools_lock; 70896 struct list_head cq_pools[3]; 70897 struct rdma_restrack_root *res; 70898 const struct uapi_definition *driver_def; 70899 refcount_t refcount; 70900 struct completion unreg_completion; 70901 struct work_struct unregistration_work; 70902 const struct rdma_link_ops *link_ops; 70903 struct mutex compat_devs_mutex; 70904 struct xarray compat_devs; 70905 char iw_ifname[16]; 70906 u32 iw_driver_flags; 70907 u32 lag_flags; 70908 }; 70909 70910 enum ib_signature_type { 70911 IB_SIG_TYPE_NONE = 0, 70912 IB_SIG_TYPE_T10_DIF = 1, 70913 }; 70914 70915 enum ib_t10_dif_bg_type { 70916 IB_T10DIF_CRC = 0, 70917 IB_T10DIF_CSUM = 1, 70918 }; 70919 70920 struct ib_t10_dif_domain { 70921 enum ib_t10_dif_bg_type bg_type; 70922 u16 pi_interval; 70923 u16 bg; 70924 u16 app_tag; 70925 u32 ref_tag; 70926 bool ref_remap; 70927 bool app_escape; 70928 bool ref_escape; 70929 u16 apptag_check_mask; 70930 }; 70931 70932 struct ib_sig_domain { 70933 enum ib_signature_type sig_type; 70934 union { 70935 struct ib_t10_dif_domain dif; 70936 } sig; 70937 }; 70938 70939 struct ib_sig_attrs { 70940 u8 check_mask; 70941 struct ib_sig_domain mem; 70942 struct ib_sig_domain wire; 70943 int meta_length; 70944 }; 70945 70946 enum ib_sig_err_type { 70947 IB_SIG_BAD_GUARD = 0, 70948 IB_SIG_BAD_REFTAG = 1, 70949 IB_SIG_BAD_APPTAG = 2, 70950 }; 70951 70952 struct ib_sig_err { 70953 enum ib_sig_err_type err_type; 70954 u32 expected; 70955 u32 actual; 70956 u64 sig_err_offset; 70957 u32 key; 70958 }; 70959 70960 enum ib_uverbs_flow_action_esp_keymat { 70961 IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM = 0, 70962 }; 70963 70964 struct ib_uverbs_flow_action_esp_keymat_aes_gcm { 70965 __u64 iv; 70966 __u32 iv_algo; 70967 __u32 salt; 70968 __u32 icv_len; 70969 __u32 key_len; 70970 __u32 aes_key[8]; 70971 }; 70972 70973 enum ib_uverbs_flow_action_esp_replay { 70974 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE = 0, 70975 IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP = 1, 70976 }; 70977 70978 struct ib_uverbs_flow_action_esp_replay_bmp { 70979 __u32 size; 70980 }; 70981 70982 union ib_gid { 70983 u8 raw[16]; 70984 struct { 70985 __be64 subnet_prefix; 70986 __be64 interface_id; 70987 } global; 70988 }; 70989 70990 enum ib_gid_type { 70991 IB_GID_TYPE_IB = 0, 70992 IB_GID_TYPE_ROCE = 1, 70993 IB_GID_TYPE_ROCE_UDP_ENCAP = 2, 70994 IB_GID_TYPE_SIZE = 3, 70995 }; 70996 70997 struct ib_gid_attr { 70998 struct net_device *ndev; 70999 struct ib_device *device; 71000 union ib_gid gid; 71001 enum ib_gid_type gid_type; 71002 u16 index; 71003 u8 port_num; 71004 }; 71005 71006 struct ib_cq_init_attr { 71007 unsigned int cqe; 71008 u32 comp_vector; 71009 u32 flags; 71010 }; 71011 71012 struct ib_dm_mr_attr { 71013 u64 length; 71014 u64 offset; 71015 u32 access_flags; 71016 }; 71017 71018 struct ib_dm_alloc_attr { 71019 u64 length; 71020 u32 alignment; 71021 u32 flags; 71022 }; 71023 71024 enum ib_mtu { 71025 IB_MTU_256 = 1, 71026 IB_MTU_512 = 2, 71027 IB_MTU_1024 = 3, 71028 IB_MTU_2048 = 4, 71029 IB_MTU_4096 = 5, 71030 }; 71031 71032 enum ib_port_state { 71033 IB_PORT_NOP = 0, 71034 IB_PORT_DOWN = 1, 71035 IB_PORT_INIT = 2, 71036 IB_PORT_ARMED = 3, 71037 IB_PORT_ACTIVE = 4, 71038 IB_PORT_ACTIVE_DEFER = 5, 71039 }; 71040 71041 struct ib_port_attr { 71042 u64 subnet_prefix; 71043 enum ib_port_state state; 71044 enum ib_mtu max_mtu; 71045 enum ib_mtu active_mtu; 71046 u32 phys_mtu; 71047 int gid_tbl_len; 71048 unsigned int ip_gids: 1; 71049 u32 port_cap_flags; 71050 u32 max_msg_sz; 71051 u32 bad_pkey_cntr; 71052 u32 qkey_viol_cntr; 71053 u16 pkey_tbl_len; 71054 u32 sm_lid; 71055 u32 lid; 71056 u8 lmc; 71057 u8 max_vl_num; 71058 u8 sm_sl; 71059 u8 subnet_timeout; 71060 u8 init_type_reply; 71061 u8 active_width; 71062 u16 active_speed; 71063 u8 phys_state; 71064 u16 port_cap_flags2; 71065 }; 71066 71067 struct ib_device_modify { 71068 u64 sys_image_guid; 71069 char node_desc[64]; 71070 }; 71071 71072 struct ib_port_modify { 71073 u32 set_port_cap_mask; 71074 u32 clr_port_cap_mask; 71075 u8 init_type; 71076 }; 71077 71078 enum ib_event_type { 71079 IB_EVENT_CQ_ERR = 0, 71080 IB_EVENT_QP_FATAL = 1, 71081 IB_EVENT_QP_REQ_ERR = 2, 71082 IB_EVENT_QP_ACCESS_ERR = 3, 71083 IB_EVENT_COMM_EST = 4, 71084 IB_EVENT_SQ_DRAINED = 5, 71085 IB_EVENT_PATH_MIG = 6, 71086 IB_EVENT_PATH_MIG_ERR = 7, 71087 IB_EVENT_DEVICE_FATAL = 8, 71088 IB_EVENT_PORT_ACTIVE = 9, 71089 IB_EVENT_PORT_ERR = 10, 71090 IB_EVENT_LID_CHANGE = 11, 71091 IB_EVENT_PKEY_CHANGE = 12, 71092 IB_EVENT_SM_CHANGE = 13, 71093 IB_EVENT_SRQ_ERR = 14, 71094 IB_EVENT_SRQ_LIMIT_REACHED = 15, 71095 IB_EVENT_QP_LAST_WQE_REACHED = 16, 71096 IB_EVENT_CLIENT_REREGISTER = 17, 71097 IB_EVENT_GID_CHANGE = 18, 71098 IB_EVENT_WQ_FATAL = 19, 71099 }; 71100 71101 struct ib_ucq_object; 71102 71103 typedef void (*ib_comp_handler)(struct ib_cq *, void *); 71104 71105 struct ib_event; 71106 71107 struct ib_cq { 71108 struct ib_device *device; 71109 struct ib_ucq_object *uobject; 71110 ib_comp_handler comp_handler; 71111 void (*event_handler)(struct ib_event *, void *); 71112 void *cq_context; 71113 int cqe; 71114 unsigned int cqe_used; 71115 atomic_t usecnt; 71116 enum ib_poll_context poll_ctx; 71117 struct ib_wc *wc; 71118 struct list_head pool_entry; 71119 union { 71120 struct irq_poll iop; 71121 struct work_struct work; 71122 }; 71123 struct workqueue_struct *comp_wq; 71124 struct dim *dim; 71125 ktime_t timestamp; 71126 u8 interrupt: 1; 71127 u8 shared: 1; 71128 unsigned int comp_vector; 71129 struct rdma_restrack_entry res; 71130 }; 71131 71132 struct ib_uqp_object; 71133 71134 enum ib_qp_type { 71135 IB_QPT_SMI = 0, 71136 IB_QPT_GSI = 1, 71137 IB_QPT_RC = 2, 71138 IB_QPT_UC = 3, 71139 IB_QPT_UD = 4, 71140 IB_QPT_RAW_IPV6 = 5, 71141 IB_QPT_RAW_ETHERTYPE = 6, 71142 IB_QPT_RAW_PACKET = 8, 71143 IB_QPT_XRC_INI = 9, 71144 IB_QPT_XRC_TGT = 10, 71145 IB_QPT_MAX = 11, 71146 IB_QPT_DRIVER = 255, 71147 IB_QPT_RESERVED1 = 4096, 71148 IB_QPT_RESERVED2 = 4097, 71149 IB_QPT_RESERVED3 = 4098, 71150 IB_QPT_RESERVED4 = 4099, 71151 IB_QPT_RESERVED5 = 4100, 71152 IB_QPT_RESERVED6 = 4101, 71153 IB_QPT_RESERVED7 = 4102, 71154 IB_QPT_RESERVED8 = 4103, 71155 IB_QPT_RESERVED9 = 4104, 71156 IB_QPT_RESERVED10 = 4105, 71157 }; 71158 71159 struct ib_qp_security; 71160 71161 struct ib_qp { 71162 struct ib_device *device; 71163 struct ib_pd *pd; 71164 struct ib_cq *send_cq; 71165 struct ib_cq *recv_cq; 71166 spinlock_t mr_lock; 71167 int mrs_used; 71168 struct list_head rdma_mrs; 71169 struct list_head sig_mrs; 71170 struct ib_srq *srq; 71171 struct ib_xrcd *xrcd; 71172 struct list_head xrcd_list; 71173 atomic_t usecnt; 71174 struct list_head open_list; 71175 struct ib_qp *real_qp; 71176 struct ib_uqp_object *uobject; 71177 void (*event_handler)(struct ib_event *, void *); 71178 void *qp_context; 71179 const struct ib_gid_attr *av_sgid_attr; 71180 const struct ib_gid_attr *alt_path_sgid_attr; 71181 u32 qp_num; 71182 u32 max_write_sge; 71183 u32 max_read_sge; 71184 enum ib_qp_type qp_type; 71185 struct ib_rwq_ind_table *rwq_ind_tbl; 71186 struct ib_qp_security *qp_sec; 71187 u8 port; 71188 bool integrity_en; 71189 struct rdma_restrack_entry res; 71190 struct rdma_counter *counter; 71191 }; 71192 71193 struct ib_usrq_object; 71194 71195 enum ib_srq_type { 71196 IB_SRQT_BASIC = 0, 71197 IB_SRQT_XRC = 1, 71198 IB_SRQT_TM = 2, 71199 }; 71200 71201 struct ib_srq { 71202 struct ib_device *device; 71203 struct ib_pd *pd; 71204 struct ib_usrq_object *uobject; 71205 void (*event_handler)(struct ib_event *, void *); 71206 void *srq_context; 71207 enum ib_srq_type srq_type; 71208 atomic_t usecnt; 71209 struct { 71210 struct ib_cq *cq; 71211 union { 71212 struct { 71213 struct ib_xrcd *xrcd; 71214 u32 srq_num; 71215 } xrc; 71216 }; 71217 } ext; 71218 }; 71219 71220 struct ib_uwq_object; 71221 71222 enum ib_wq_state { 71223 IB_WQS_RESET = 0, 71224 IB_WQS_RDY = 1, 71225 IB_WQS_ERR = 2, 71226 }; 71227 71228 enum ib_wq_type { 71229 IB_WQT_RQ = 0, 71230 }; 71231 71232 struct ib_wq { 71233 struct ib_device *device; 71234 struct ib_uwq_object *uobject; 71235 void *wq_context; 71236 void (*event_handler)(struct ib_event *, void *); 71237 struct ib_pd *pd; 71238 struct ib_cq *cq; 71239 u32 wq_num; 71240 enum ib_wq_state state; 71241 enum ib_wq_type wq_type; 71242 atomic_t usecnt; 71243 }; 71244 71245 struct ib_event { 71246 struct ib_device *device; 71247 union { 71248 struct ib_cq *cq; 71249 struct ib_qp *qp; 71250 struct ib_srq *srq; 71251 struct ib_wq *wq; 71252 u8 port_num; 71253 } element; 71254 enum ib_event_type event; 71255 }; 71256 71257 struct ib_global_route { 71258 const struct ib_gid_attr *sgid_attr; 71259 union ib_gid dgid; 71260 u32 flow_label; 71261 u8 sgid_index; 71262 u8 hop_limit; 71263 u8 traffic_class; 71264 }; 71265 71266 struct ib_grh { 71267 __be32 version_tclass_flow; 71268 __be16 paylen; 71269 u8 next_hdr; 71270 u8 hop_limit; 71271 union ib_gid sgid; 71272 union ib_gid dgid; 71273 }; 71274 71275 struct ib_mr_status { 71276 u32 fail_status; 71277 struct ib_sig_err sig_err; 71278 }; 71279 71280 struct rdma_ah_init_attr { 71281 struct rdma_ah_attr *ah_attr; 71282 u32 flags; 71283 struct net_device *xmit_slave; 71284 }; 71285 71286 enum rdma_ah_attr_type { 71287 RDMA_AH_ATTR_TYPE_UNDEFINED = 0, 71288 RDMA_AH_ATTR_TYPE_IB = 1, 71289 RDMA_AH_ATTR_TYPE_ROCE = 2, 71290 RDMA_AH_ATTR_TYPE_OPA = 3, 71291 }; 71292 71293 struct ib_ah_attr { 71294 u16 dlid; 71295 u8 src_path_bits; 71296 }; 71297 71298 struct roce_ah_attr { 71299 u8 dmac[6]; 71300 }; 71301 71302 struct opa_ah_attr { 71303 u32 dlid; 71304 u8 src_path_bits; 71305 bool make_grd; 71306 }; 71307 71308 struct rdma_ah_attr { 71309 struct ib_global_route grh; 71310 u8 sl; 71311 u8 static_rate; 71312 u8 port_num; 71313 u8 ah_flags; 71314 enum rdma_ah_attr_type type; 71315 union { 71316 struct ib_ah_attr ib; 71317 struct roce_ah_attr roce; 71318 struct opa_ah_attr opa; 71319 }; 71320 }; 71321 71322 enum ib_wc_status { 71323 IB_WC_SUCCESS = 0, 71324 IB_WC_LOC_LEN_ERR = 1, 71325 IB_WC_LOC_QP_OP_ERR = 2, 71326 IB_WC_LOC_EEC_OP_ERR = 3, 71327 IB_WC_LOC_PROT_ERR = 4, 71328 IB_WC_WR_FLUSH_ERR = 5, 71329 IB_WC_MW_BIND_ERR = 6, 71330 IB_WC_BAD_RESP_ERR = 7, 71331 IB_WC_LOC_ACCESS_ERR = 8, 71332 IB_WC_REM_INV_REQ_ERR = 9, 71333 IB_WC_REM_ACCESS_ERR = 10, 71334 IB_WC_REM_OP_ERR = 11, 71335 IB_WC_RETRY_EXC_ERR = 12, 71336 IB_WC_RNR_RETRY_EXC_ERR = 13, 71337 IB_WC_LOC_RDD_VIOL_ERR = 14, 71338 IB_WC_REM_INV_RD_REQ_ERR = 15, 71339 IB_WC_REM_ABORT_ERR = 16, 71340 IB_WC_INV_EECN_ERR = 17, 71341 IB_WC_INV_EEC_STATE_ERR = 18, 71342 IB_WC_FATAL_ERR = 19, 71343 IB_WC_RESP_TIMEOUT_ERR = 20, 71344 IB_WC_GENERAL_ERR = 21, 71345 }; 71346 71347 enum ib_wc_opcode { 71348 IB_WC_SEND = 0, 71349 IB_WC_RDMA_WRITE = 1, 71350 IB_WC_RDMA_READ = 2, 71351 IB_WC_COMP_SWAP = 3, 71352 IB_WC_FETCH_ADD = 4, 71353 IB_WC_BIND_MW = 5, 71354 IB_WC_LOCAL_INV = 6, 71355 IB_WC_LSO = 7, 71356 IB_WC_REG_MR = 8, 71357 IB_WC_MASKED_COMP_SWAP = 9, 71358 IB_WC_MASKED_FETCH_ADD = 10, 71359 IB_WC_RECV = 128, 71360 IB_WC_RECV_RDMA_WITH_IMM = 129, 71361 }; 71362 71363 struct ib_cqe { 71364 void (*done)(struct ib_cq *, struct ib_wc *); 71365 }; 71366 71367 struct ib_wc { 71368 union { 71369 u64 wr_id; 71370 struct ib_cqe *wr_cqe; 71371 }; 71372 enum ib_wc_status status; 71373 enum ib_wc_opcode opcode; 71374 u32 vendor_err; 71375 u32 byte_len; 71376 struct ib_qp *qp; 71377 union { 71378 __be32 imm_data; 71379 u32 invalidate_rkey; 71380 } ex; 71381 u32 src_qp; 71382 u32 slid; 71383 int wc_flags; 71384 u16 pkey_index; 71385 u8 sl; 71386 u8 dlid_path_bits; 71387 u8 port_num; 71388 u8 smac[6]; 71389 u16 vlan_id; 71390 u8 network_hdr_type; 71391 }; 71392 71393 struct ib_srq_attr { 71394 u32 max_wr; 71395 u32 max_sge; 71396 u32 srq_limit; 71397 }; 71398 71399 struct ib_xrcd { 71400 struct ib_device *device; 71401 atomic_t usecnt; 71402 struct inode *inode; 71403 struct rw_semaphore tgt_qps_rwsem; 71404 struct xarray tgt_qps; 71405 }; 71406 71407 struct ib_srq_init_attr { 71408 void (*event_handler)(struct ib_event *, void *); 71409 void *srq_context; 71410 struct ib_srq_attr attr; 71411 enum ib_srq_type srq_type; 71412 struct { 71413 struct ib_cq *cq; 71414 union { 71415 struct { 71416 struct ib_xrcd *xrcd; 71417 } xrc; 71418 struct { 71419 u32 max_num_tags; 71420 } tag_matching; 71421 }; 71422 } ext; 71423 }; 71424 71425 struct ib_qp_cap { 71426 u32 max_send_wr; 71427 u32 max_recv_wr; 71428 u32 max_send_sge; 71429 u32 max_recv_sge; 71430 u32 max_inline_data; 71431 u32 max_rdma_ctxs; 71432 }; 71433 71434 enum ib_sig_type { 71435 IB_SIGNAL_ALL_WR = 0, 71436 IB_SIGNAL_REQ_WR = 1, 71437 }; 71438 71439 struct ib_qp_init_attr { 71440 void (*event_handler)(struct ib_event *, void *); 71441 void *qp_context; 71442 struct ib_cq *send_cq; 71443 struct ib_cq *recv_cq; 71444 struct ib_srq *srq; 71445 struct ib_xrcd *xrcd; 71446 struct ib_qp_cap cap; 71447 enum ib_sig_type sq_sig_type; 71448 enum ib_qp_type qp_type; 71449 u32 create_flags; 71450 u8 port_num; 71451 struct ib_rwq_ind_table *rwq_ind_tbl; 71452 u32 source_qpn; 71453 }; 71454 71455 struct ib_uobject; 71456 71457 struct ib_rwq_ind_table { 71458 struct ib_device *device; 71459 struct ib_uobject *uobject; 71460 atomic_t usecnt; 71461 u32 ind_tbl_num; 71462 u32 log_ind_tbl_size; 71463 struct ib_wq **ind_tbl; 71464 }; 71465 71466 enum ib_qp_state { 71467 IB_QPS_RESET = 0, 71468 IB_QPS_INIT = 1, 71469 IB_QPS_RTR = 2, 71470 IB_QPS_RTS = 3, 71471 IB_QPS_SQD = 4, 71472 IB_QPS_SQE = 5, 71473 IB_QPS_ERR = 6, 71474 }; 71475 71476 enum ib_mig_state { 71477 IB_MIG_MIGRATED = 0, 71478 IB_MIG_REARM = 1, 71479 IB_MIG_ARMED = 2, 71480 }; 71481 71482 enum ib_mw_type { 71483 IB_MW_TYPE_1 = 1, 71484 IB_MW_TYPE_2 = 2, 71485 }; 71486 71487 struct ib_qp_attr { 71488 enum ib_qp_state qp_state; 71489 enum ib_qp_state cur_qp_state; 71490 enum ib_mtu path_mtu; 71491 enum ib_mig_state path_mig_state; 71492 u32 qkey; 71493 u32 rq_psn; 71494 u32 sq_psn; 71495 u32 dest_qp_num; 71496 int qp_access_flags; 71497 struct ib_qp_cap cap; 71498 struct rdma_ah_attr ah_attr; 71499 struct rdma_ah_attr alt_ah_attr; 71500 u16 pkey_index; 71501 u16 alt_pkey_index; 71502 u8 en_sqd_async_notify; 71503 u8 sq_draining; 71504 u8 max_rd_atomic; 71505 u8 max_dest_rd_atomic; 71506 u8 min_rnr_timer; 71507 u8 port_num; 71508 u8 timeout; 71509 u8 retry_cnt; 71510 u8 rnr_retry; 71511 u8 alt_port_num; 71512 u8 alt_timeout; 71513 u32 rate_limit; 71514 struct net_device *xmit_slave; 71515 }; 71516 71517 enum ib_wr_opcode { 71518 IB_WR_RDMA_WRITE = 0, 71519 IB_WR_RDMA_WRITE_WITH_IMM = 1, 71520 IB_WR_SEND = 2, 71521 IB_WR_SEND_WITH_IMM = 3, 71522 IB_WR_RDMA_READ = 4, 71523 IB_WR_ATOMIC_CMP_AND_SWP = 5, 71524 IB_WR_ATOMIC_FETCH_AND_ADD = 6, 71525 IB_WR_BIND_MW = 8, 71526 IB_WR_LSO = 10, 71527 IB_WR_SEND_WITH_INV = 9, 71528 IB_WR_RDMA_READ_WITH_INV = 11, 71529 IB_WR_LOCAL_INV = 7, 71530 IB_WR_MASKED_ATOMIC_CMP_AND_SWP = 12, 71531 IB_WR_MASKED_ATOMIC_FETCH_AND_ADD = 13, 71532 IB_WR_REG_MR = 32, 71533 IB_WR_REG_MR_INTEGRITY = 33, 71534 IB_WR_RESERVED1 = 240, 71535 IB_WR_RESERVED2 = 241, 71536 IB_WR_RESERVED3 = 242, 71537 IB_WR_RESERVED4 = 243, 71538 IB_WR_RESERVED5 = 244, 71539 IB_WR_RESERVED6 = 245, 71540 IB_WR_RESERVED7 = 246, 71541 IB_WR_RESERVED8 = 247, 71542 IB_WR_RESERVED9 = 248, 71543 IB_WR_RESERVED10 = 249, 71544 }; 71545 71546 struct ib_sge { 71547 u64 addr; 71548 u32 length; 71549 u32 lkey; 71550 }; 71551 71552 struct ib_send_wr { 71553 struct ib_send_wr *next; 71554 union { 71555 u64 wr_id; 71556 struct ib_cqe *wr_cqe; 71557 }; 71558 struct ib_sge *sg_list; 71559 int num_sge; 71560 enum ib_wr_opcode opcode; 71561 int send_flags; 71562 union { 71563 __be32 imm_data; 71564 u32 invalidate_rkey; 71565 } ex; 71566 }; 71567 71568 struct ib_ah { 71569 struct ib_device *device; 71570 struct ib_pd *pd; 71571 struct ib_uobject *uobject; 71572 const struct ib_gid_attr *sgid_attr; 71573 enum rdma_ah_attr_type type; 71574 }; 71575 71576 struct ib_mr { 71577 struct ib_device *device; 71578 struct ib_pd *pd; 71579 u32 lkey; 71580 u32 rkey; 71581 u64 iova; 71582 u64 length; 71583 unsigned int page_size; 71584 enum ib_mr_type type; 71585 bool need_inval; 71586 union { 71587 struct ib_uobject *uobject; 71588 struct list_head qp_entry; 71589 }; 71590 struct ib_dm *dm; 71591 struct ib_sig_attrs *sig_attrs; 71592 struct rdma_restrack_entry res; 71593 }; 71594 71595 struct ib_recv_wr { 71596 struct ib_recv_wr *next; 71597 union { 71598 u64 wr_id; 71599 struct ib_cqe *wr_cqe; 71600 }; 71601 struct ib_sge *sg_list; 71602 int num_sge; 71603 }; 71604 71605 struct ib_rdmacg_object {}; 71606 71607 struct ib_uverbs_file; 71608 71609 struct ib_ucontext { 71610 struct ib_device *device; 71611 struct ib_uverbs_file *ufile; 71612 struct ib_rdmacg_object cg_obj; 71613 struct rdma_restrack_entry res; 71614 struct xarray mmap_xa; 71615 }; 71616 71617 struct uverbs_api_object; 71618 71619 struct ib_uobject { 71620 u64 user_handle; 71621 struct ib_uverbs_file *ufile; 71622 struct ib_ucontext *context; 71623 void *object; 71624 struct list_head list; 71625 struct ib_rdmacg_object cg_obj; 71626 int id; 71627 struct kref ref; 71628 atomic_t usecnt; 71629 struct callback_head rcu; 71630 const struct uverbs_api_object *uapi_object; 71631 }; 71632 71633 struct ib_udata { 71634 const void *inbuf; 71635 void *outbuf; 71636 size_t inlen; 71637 size_t outlen; 71638 }; 71639 71640 struct ib_pd { 71641 u32 local_dma_lkey; 71642 u32 flags; 71643 struct ib_device *device; 71644 struct ib_uobject *uobject; 71645 atomic_t usecnt; 71646 u32 unsafe_global_rkey; 71647 struct ib_mr *__internal_mr; 71648 struct rdma_restrack_entry res; 71649 }; 71650 71651 struct ib_wq_init_attr { 71652 void *wq_context; 71653 enum ib_wq_type wq_type; 71654 u32 max_wr; 71655 u32 max_sge; 71656 struct ib_cq *cq; 71657 void (*event_handler)(struct ib_event *, void *); 71658 u32 create_flags; 71659 }; 71660 71661 struct ib_wq_attr { 71662 enum ib_wq_state wq_state; 71663 enum ib_wq_state curr_wq_state; 71664 u32 flags; 71665 u32 flags_mask; 71666 }; 71667 71668 struct ib_rwq_ind_table_init_attr { 71669 u32 log_ind_tbl_size; 71670 struct ib_wq **ind_tbl; 71671 }; 71672 71673 enum port_pkey_state { 71674 IB_PORT_PKEY_NOT_VALID = 0, 71675 IB_PORT_PKEY_VALID = 1, 71676 IB_PORT_PKEY_LISTED = 2, 71677 }; 71678 71679 struct ib_port_pkey { 71680 enum port_pkey_state state; 71681 u16 pkey_index; 71682 u8 port_num; 71683 struct list_head qp_list; 71684 struct list_head to_error_list; 71685 struct ib_qp_security *sec; 71686 }; 71687 71688 struct ib_ports_pkeys; 71689 71690 struct ib_qp_security { 71691 struct ib_qp *qp; 71692 struct ib_device *dev; 71693 struct mutex mutex; 71694 struct ib_ports_pkeys *ports_pkeys; 71695 struct list_head shared_qp_list; 71696 void *security; 71697 bool destroying; 71698 atomic_t error_list_count; 71699 struct completion error_complete; 71700 int error_comps_pending; 71701 }; 71702 71703 struct ib_ports_pkeys { 71704 struct ib_port_pkey main; 71705 struct ib_port_pkey alt; 71706 }; 71707 71708 struct ib_dm { 71709 struct ib_device *device; 71710 u32 length; 71711 u32 flags; 71712 struct ib_uobject *uobject; 71713 atomic_t usecnt; 71714 }; 71715 71716 struct ib_mw { 71717 struct ib_device *device; 71718 struct ib_pd *pd; 71719 struct ib_uobject *uobject; 71720 u32 rkey; 71721 enum ib_mw_type type; 71722 }; 71723 71724 enum ib_flow_attr_type { 71725 IB_FLOW_ATTR_NORMAL = 0, 71726 IB_FLOW_ATTR_ALL_DEFAULT = 1, 71727 IB_FLOW_ATTR_MC_DEFAULT = 2, 71728 IB_FLOW_ATTR_SNIFFER = 3, 71729 }; 71730 71731 enum ib_flow_spec_type { 71732 IB_FLOW_SPEC_ETH = 32, 71733 IB_FLOW_SPEC_IB = 34, 71734 IB_FLOW_SPEC_IPV4 = 48, 71735 IB_FLOW_SPEC_IPV6 = 49, 71736 IB_FLOW_SPEC_ESP = 52, 71737 IB_FLOW_SPEC_TCP = 64, 71738 IB_FLOW_SPEC_UDP = 65, 71739 IB_FLOW_SPEC_VXLAN_TUNNEL = 80, 71740 IB_FLOW_SPEC_GRE = 81, 71741 IB_FLOW_SPEC_MPLS = 96, 71742 IB_FLOW_SPEC_INNER = 256, 71743 IB_FLOW_SPEC_ACTION_TAG = 4096, 71744 IB_FLOW_SPEC_ACTION_DROP = 4097, 71745 IB_FLOW_SPEC_ACTION_HANDLE = 4098, 71746 IB_FLOW_SPEC_ACTION_COUNT = 4099, 71747 }; 71748 71749 struct ib_flow_eth_filter { 71750 u8 dst_mac[6]; 71751 u8 src_mac[6]; 71752 __be16 ether_type; 71753 __be16 vlan_tag; 71754 u8 real_sz[0]; 71755 }; 71756 71757 struct ib_flow_spec_eth { 71758 u32 type; 71759 u16 size; 71760 struct ib_flow_eth_filter val; 71761 struct ib_flow_eth_filter mask; 71762 }; 71763 71764 struct ib_flow_ib_filter { 71765 __be16 dlid; 71766 __u8 sl; 71767 u8 real_sz[0]; 71768 }; 71769 71770 struct ib_flow_spec_ib { 71771 u32 type; 71772 u16 size; 71773 struct ib_flow_ib_filter val; 71774 struct ib_flow_ib_filter mask; 71775 }; 71776 71777 struct ib_flow_ipv4_filter { 71778 __be32 src_ip; 71779 __be32 dst_ip; 71780 u8 proto; 71781 u8 tos; 71782 u8 ttl; 71783 u8 flags; 71784 u8 real_sz[0]; 71785 }; 71786 71787 struct ib_flow_spec_ipv4 { 71788 u32 type; 71789 u16 size; 71790 struct ib_flow_ipv4_filter val; 71791 struct ib_flow_ipv4_filter mask; 71792 }; 71793 71794 struct ib_flow_ipv6_filter { 71795 u8 src_ip[16]; 71796 u8 dst_ip[16]; 71797 __be32 flow_label; 71798 u8 next_hdr; 71799 u8 traffic_class; 71800 u8 hop_limit; 71801 u8 real_sz[0]; 71802 }; 71803 71804 struct ib_flow_spec_ipv6 { 71805 u32 type; 71806 u16 size; 71807 struct ib_flow_ipv6_filter val; 71808 struct ib_flow_ipv6_filter mask; 71809 }; 71810 71811 struct ib_flow_tcp_udp_filter { 71812 __be16 dst_port; 71813 __be16 src_port; 71814 u8 real_sz[0]; 71815 }; 71816 71817 struct ib_flow_spec_tcp_udp { 71818 u32 type; 71819 u16 size; 71820 struct ib_flow_tcp_udp_filter val; 71821 struct ib_flow_tcp_udp_filter mask; 71822 }; 71823 71824 struct ib_flow_tunnel_filter { 71825 __be32 tunnel_id; 71826 u8 real_sz[0]; 71827 }; 71828 71829 struct ib_flow_spec_tunnel { 71830 u32 type; 71831 u16 size; 71832 struct ib_flow_tunnel_filter val; 71833 struct ib_flow_tunnel_filter mask; 71834 }; 71835 71836 struct ib_flow_esp_filter { 71837 __be32 spi; 71838 __be32 seq; 71839 u8 real_sz[0]; 71840 }; 71841 71842 struct ib_flow_spec_esp { 71843 u32 type; 71844 u16 size; 71845 struct ib_flow_esp_filter val; 71846 struct ib_flow_esp_filter mask; 71847 }; 71848 71849 struct ib_flow_gre_filter { 71850 __be16 c_ks_res0_ver; 71851 __be16 protocol; 71852 __be32 key; 71853 u8 real_sz[0]; 71854 }; 71855 71856 struct ib_flow_spec_gre { 71857 u32 type; 71858 u16 size; 71859 struct ib_flow_gre_filter val; 71860 struct ib_flow_gre_filter mask; 71861 }; 71862 71863 struct ib_flow_mpls_filter { 71864 __be32 tag; 71865 u8 real_sz[0]; 71866 }; 71867 71868 struct ib_flow_spec_mpls { 71869 u32 type; 71870 u16 size; 71871 struct ib_flow_mpls_filter val; 71872 struct ib_flow_mpls_filter mask; 71873 }; 71874 71875 struct ib_flow_spec_action_tag { 71876 enum ib_flow_spec_type type; 71877 u16 size; 71878 u32 tag_id; 71879 }; 71880 71881 struct ib_flow_spec_action_drop { 71882 enum ib_flow_spec_type type; 71883 u16 size; 71884 }; 71885 71886 struct ib_flow_spec_action_handle { 71887 enum ib_flow_spec_type type; 71888 u16 size; 71889 struct ib_flow_action *act; 71890 }; 71891 71892 enum ib_flow_action_type { 71893 IB_FLOW_ACTION_UNSPECIFIED = 0, 71894 IB_FLOW_ACTION_ESP = 1, 71895 }; 71896 71897 struct ib_flow_action { 71898 struct ib_device *device; 71899 struct ib_uobject *uobject; 71900 enum ib_flow_action_type type; 71901 atomic_t usecnt; 71902 }; 71903 71904 struct ib_flow_spec_action_count { 71905 enum ib_flow_spec_type type; 71906 u16 size; 71907 struct ib_counters *counters; 71908 }; 71909 71910 struct ib_counters { 71911 struct ib_device *device; 71912 struct ib_uobject *uobject; 71913 atomic_t usecnt; 71914 }; 71915 71916 union ib_flow_spec { 71917 struct { 71918 u32 type; 71919 u16 size; 71920 }; 71921 struct ib_flow_spec_eth eth; 71922 struct ib_flow_spec_ib ib; 71923 struct ib_flow_spec_ipv4 ipv4; 71924 struct ib_flow_spec_tcp_udp tcp_udp; 71925 struct ib_flow_spec_ipv6 ipv6; 71926 struct ib_flow_spec_tunnel tunnel; 71927 struct ib_flow_spec_esp esp; 71928 struct ib_flow_spec_gre gre; 71929 struct ib_flow_spec_mpls mpls; 71930 struct ib_flow_spec_action_tag flow_tag; 71931 struct ib_flow_spec_action_drop drop; 71932 struct ib_flow_spec_action_handle action; 71933 struct ib_flow_spec_action_count flow_count; 71934 }; 71935 71936 struct ib_flow_attr { 71937 enum ib_flow_attr_type type; 71938 u16 size; 71939 u16 priority; 71940 u32 flags; 71941 u8 num_of_specs; 71942 u8 port; 71943 union ib_flow_spec flows[0]; 71944 }; 71945 71946 struct ib_flow { 71947 struct ib_qp *qp; 71948 struct ib_device *device; 71949 struct ib_uobject *uobject; 71950 }; 71951 71952 struct ib_flow_action_attrs_esp_keymats { 71953 enum ib_uverbs_flow_action_esp_keymat protocol; 71954 union { 71955 struct ib_uverbs_flow_action_esp_keymat_aes_gcm aes_gcm; 71956 } keymat; 71957 }; 71958 71959 struct ib_flow_action_attrs_esp_replays { 71960 enum ib_uverbs_flow_action_esp_replay protocol; 71961 union { 71962 struct ib_uverbs_flow_action_esp_replay_bmp bmp; 71963 } replay; 71964 }; 71965 71966 struct ib_flow_spec_list { 71967 struct ib_flow_spec_list *next; 71968 union ib_flow_spec spec; 71969 }; 71970 71971 struct ib_flow_action_attrs_esp { 71972 struct ib_flow_action_attrs_esp_keymats *keymat; 71973 struct ib_flow_action_attrs_esp_replays *replay; 71974 struct ib_flow_spec_list *encap; 71975 u32 esn; 71976 u32 spi; 71977 u32 seq; 71978 u32 tfc_pad; 71979 u64 flags; 71980 u64 hard_limit_pkts; 71981 }; 71982 71983 struct ib_pkey_cache; 71984 71985 struct ib_gid_table; 71986 71987 struct ib_port_cache { 71988 u64 subnet_prefix; 71989 struct ib_pkey_cache *pkey; 71990 struct ib_gid_table *gid; 71991 u8 lmc; 71992 enum ib_port_state port_state; 71993 }; 71994 71995 struct ib_port_immutable { 71996 int pkey_tbl_len; 71997 int gid_tbl_len; 71998 u32 core_cap_flags; 71999 u32 max_mad_size; 72000 }; 72001 72002 struct ib_port_data { 72003 struct ib_device *ib_dev; 72004 struct ib_port_immutable immutable; 72005 spinlock_t pkey_list_lock; 72006 struct list_head pkey_list; 72007 struct ib_port_cache cache; 72008 spinlock_t netdev_lock; 72009 struct net_device *netdev; 72010 struct hlist_node ndev_hash_link; 72011 struct rdma_port_counter port_counter; 72012 struct rdma_hw_stats *hw_stats; 72013 }; 72014 72015 struct rdma_netdev_alloc_params { 72016 size_t sizeof_priv; 72017 unsigned int txqs; 72018 unsigned int rxqs; 72019 void *param; 72020 int (*initialize_rdma_netdev)(struct ib_device *, u8, struct net_device *, void *); 72021 }; 72022 72023 struct ib_counters_read_attr { 72024 u64 *counters_buff; 72025 u32 ncounters; 72026 u32 flags; 72027 }; 72028 72029 struct rdma_user_mmap_entry { 72030 struct kref ref; 72031 struct ib_ucontext *ucontext; 72032 long unsigned int start_pgoff; 72033 size_t npages; 72034 bool driver_removed; 72035 }; 72036 72037 enum blk_zone_report_flags { 72038 BLK_ZONE_REP_CAPACITY = 1, 72039 }; 72040 72041 struct blk_zone_report { 72042 __u64 sector; 72043 __u32 nr_zones; 72044 __u32 flags; 72045 struct blk_zone zones[0]; 72046 }; 72047 72048 struct blk_zone_range { 72049 __u64 sector; 72050 __u64 nr_sectors; 72051 }; 72052 72053 struct zone_report_args { 72054 struct blk_zone *zones; 72055 }; 72056 72057 struct blk_revalidate_zone_args { 72058 struct gendisk *disk; 72059 long unsigned int *conv_zones_bitmap; 72060 long unsigned int *seq_zones_wlock; 72061 unsigned int nr_zones; 72062 sector_t zone_sectors; 72063 sector_t sector; 72064 }; 72065 72066 enum wbt_flags { 72067 WBT_TRACKED = 1, 72068 WBT_READ = 2, 72069 WBT_KSWAPD = 4, 72070 WBT_DISCARD = 8, 72071 WBT_NR_BITS = 4, 72072 }; 72073 72074 enum { 72075 WBT_STATE_ON_DEFAULT = 1, 72076 WBT_STATE_ON_MANUAL = 2, 72077 }; 72078 72079 struct rq_wb { 72080 unsigned int wb_background; 72081 unsigned int wb_normal; 72082 short int enable_state; 72083 unsigned int unknown_cnt; 72084 u64 win_nsec; 72085 u64 cur_win_nsec; 72086 struct blk_stat_callback *cb; 72087 u64 sync_issue; 72088 void *sync_cookie; 72089 unsigned int wc; 72090 long unsigned int last_issue; 72091 long unsigned int last_comp; 72092 long unsigned int min_lat_nsec; 72093 struct rq_qos rqos; 72094 struct rq_wait rq_wait[3]; 72095 struct rq_depth rq_depth; 72096 }; 72097 72098 struct trace_event_raw_wbt_stat { 72099 struct trace_entry ent; 72100 char name[32]; 72101 s64 rmean; 72102 u64 rmin; 72103 u64 rmax; 72104 s64 rnr_samples; 72105 s64 rtime; 72106 s64 wmean; 72107 u64 wmin; 72108 u64 wmax; 72109 s64 wnr_samples; 72110 s64 wtime; 72111 char __data[0]; 72112 }; 72113 72114 struct trace_event_raw_wbt_lat { 72115 struct trace_entry ent; 72116 char name[32]; 72117 long unsigned int lat; 72118 char __data[0]; 72119 }; 72120 72121 struct trace_event_raw_wbt_step { 72122 struct trace_entry ent; 72123 char name[32]; 72124 const char *msg; 72125 int step; 72126 long unsigned int window; 72127 unsigned int bg; 72128 unsigned int normal; 72129 unsigned int max; 72130 char __data[0]; 72131 }; 72132 72133 struct trace_event_raw_wbt_timer { 72134 struct trace_entry ent; 72135 char name[32]; 72136 unsigned int status; 72137 int step; 72138 unsigned int inflight; 72139 char __data[0]; 72140 }; 72141 72142 struct trace_event_data_offsets_wbt_stat {}; 72143 72144 struct trace_event_data_offsets_wbt_lat {}; 72145 72146 struct trace_event_data_offsets_wbt_step {}; 72147 72148 struct trace_event_data_offsets_wbt_timer {}; 72149 72150 typedef void (*btf_trace_wbt_stat)(void *, struct backing_dev_info *, struct blk_rq_stat *); 72151 72152 typedef void (*btf_trace_wbt_lat)(void *, struct backing_dev_info *, long unsigned int); 72153 72154 typedef void (*btf_trace_wbt_step)(void *, struct backing_dev_info *, const char *, int, long unsigned int, unsigned int, unsigned int, unsigned int); 72155 72156 typedef void (*btf_trace_wbt_timer)(void *, struct backing_dev_info *, unsigned int, int, unsigned int); 72157 72158 enum { 72159 RWB_DEF_DEPTH = 16, 72160 RWB_WINDOW_NSEC = 100000000, 72161 RWB_MIN_WRITE_SAMPLES = 3, 72162 RWB_UNKNOWN_BUMP = 5, 72163 }; 72164 72165 enum { 72166 LAT_OK = 1, 72167 LAT_UNKNOWN = 2, 72168 LAT_UNKNOWN_WRITES = 3, 72169 LAT_EXCEEDED = 4, 72170 }; 72171 72172 struct wbt_wait_data { 72173 struct rq_wb *rwb; 72174 enum wbt_flags wb_acct; 72175 long unsigned int rw; 72176 }; 72177 72178 struct show_busy_params { 72179 struct seq_file *m; 72180 struct blk_mq_hw_ctx *hctx; 72181 }; 72182 72183 enum opal_mbr { 72184 OPAL_MBR_ENABLE = 0, 72185 OPAL_MBR_DISABLE = 1, 72186 }; 72187 72188 enum opal_mbr_done_flag { 72189 OPAL_MBR_NOT_DONE = 0, 72190 OPAL_MBR_DONE = 1, 72191 }; 72192 72193 enum opal_user { 72194 OPAL_ADMIN1 = 0, 72195 OPAL_USER1 = 1, 72196 OPAL_USER2 = 2, 72197 OPAL_USER3 = 3, 72198 OPAL_USER4 = 4, 72199 OPAL_USER5 = 5, 72200 OPAL_USER6 = 6, 72201 OPAL_USER7 = 7, 72202 OPAL_USER8 = 8, 72203 OPAL_USER9 = 9, 72204 }; 72205 72206 enum opal_lock_state { 72207 OPAL_RO = 1, 72208 OPAL_RW = 2, 72209 OPAL_LK = 4, 72210 }; 72211 72212 struct opal_key { 72213 __u8 lr; 72214 __u8 key_len; 72215 __u8 __align[6]; 72216 __u8 key[256]; 72217 }; 72218 72219 struct opal_lr_act { 72220 struct opal_key key; 72221 __u32 sum; 72222 __u8 num_lrs; 72223 __u8 lr[9]; 72224 __u8 align[2]; 72225 }; 72226 72227 struct opal_session_info { 72228 __u32 sum; 72229 __u32 who; 72230 struct opal_key opal_key; 72231 }; 72232 72233 struct opal_user_lr_setup { 72234 __u64 range_start; 72235 __u64 range_length; 72236 __u32 RLE; 72237 __u32 WLE; 72238 struct opal_session_info session; 72239 }; 72240 72241 struct opal_lock_unlock { 72242 struct opal_session_info session; 72243 __u32 l_state; 72244 __u8 __align[4]; 72245 }; 72246 72247 struct opal_new_pw { 72248 struct opal_session_info session; 72249 struct opal_session_info new_user_pw; 72250 }; 72251 72252 struct opal_mbr_data { 72253 struct opal_key key; 72254 __u8 enable_disable; 72255 __u8 __align[7]; 72256 }; 72257 72258 struct opal_mbr_done { 72259 struct opal_key key; 72260 __u8 done_flag; 72261 __u8 __align[7]; 72262 }; 72263 72264 struct opal_shadow_mbr { 72265 struct opal_key key; 72266 const __u64 data; 72267 __u64 offset; 72268 __u64 size; 72269 }; 72270 72271 enum opal_table_ops { 72272 OPAL_READ_TABLE = 0, 72273 OPAL_WRITE_TABLE = 1, 72274 }; 72275 72276 struct opal_read_write_table { 72277 struct opal_key key; 72278 const __u64 data; 72279 const __u8 table_uid[8]; 72280 __u64 offset; 72281 __u64 size; 72282 __u64 flags; 72283 __u64 priv; 72284 }; 72285 72286 typedef int sec_send_recv(void *, u16, u8, void *, size_t, bool); 72287 72288 enum { 72289 TCG_SECP_00 = 0, 72290 TCG_SECP_01 = 1, 72291 }; 72292 72293 enum opal_response_token { 72294 OPAL_DTA_TOKENID_BYTESTRING = 224, 72295 OPAL_DTA_TOKENID_SINT = 225, 72296 OPAL_DTA_TOKENID_UINT = 226, 72297 OPAL_DTA_TOKENID_TOKEN = 227, 72298 OPAL_DTA_TOKENID_INVALID = 0, 72299 }; 72300 72301 enum opal_uid { 72302 OPAL_SMUID_UID = 0, 72303 OPAL_THISSP_UID = 1, 72304 OPAL_ADMINSP_UID = 2, 72305 OPAL_LOCKINGSP_UID = 3, 72306 OPAL_ENTERPRISE_LOCKINGSP_UID = 4, 72307 OPAL_ANYBODY_UID = 5, 72308 OPAL_SID_UID = 6, 72309 OPAL_ADMIN1_UID = 7, 72310 OPAL_USER1_UID = 8, 72311 OPAL_USER2_UID = 9, 72312 OPAL_PSID_UID = 10, 72313 OPAL_ENTERPRISE_BANDMASTER0_UID = 11, 72314 OPAL_ENTERPRISE_ERASEMASTER_UID = 12, 72315 OPAL_TABLE_TABLE = 13, 72316 OPAL_LOCKINGRANGE_GLOBAL = 14, 72317 OPAL_LOCKINGRANGE_ACE_RDLOCKED = 15, 72318 OPAL_LOCKINGRANGE_ACE_WRLOCKED = 16, 72319 OPAL_MBRCONTROL = 17, 72320 OPAL_MBR = 18, 72321 OPAL_AUTHORITY_TABLE = 19, 72322 OPAL_C_PIN_TABLE = 20, 72323 OPAL_LOCKING_INFO_TABLE = 21, 72324 OPAL_ENTERPRISE_LOCKING_INFO_TABLE = 22, 72325 OPAL_DATASTORE = 23, 72326 OPAL_C_PIN_MSID = 24, 72327 OPAL_C_PIN_SID = 25, 72328 OPAL_C_PIN_ADMIN1 = 26, 72329 OPAL_HALF_UID_AUTHORITY_OBJ_REF = 27, 72330 OPAL_HALF_UID_BOOLEAN_ACE = 28, 72331 OPAL_UID_HEXFF = 29, 72332 }; 72333 72334 enum opal_method { 72335 OPAL_PROPERTIES = 0, 72336 OPAL_STARTSESSION = 1, 72337 OPAL_REVERT = 2, 72338 OPAL_ACTIVATE = 3, 72339 OPAL_EGET = 4, 72340 OPAL_ESET = 5, 72341 OPAL_NEXT = 6, 72342 OPAL_EAUTHENTICATE = 7, 72343 OPAL_GETACL = 8, 72344 OPAL_GENKEY = 9, 72345 OPAL_REVERTSP = 10, 72346 OPAL_GET = 11, 72347 OPAL_SET = 12, 72348 OPAL_AUTHENTICATE = 13, 72349 OPAL_RANDOM = 14, 72350 OPAL_ERASE = 15, 72351 }; 72352 72353 enum opal_token { 72354 OPAL_TRUE = 1, 72355 OPAL_FALSE = 0, 72356 OPAL_BOOLEAN_EXPR = 3, 72357 OPAL_TABLE = 0, 72358 OPAL_STARTROW = 1, 72359 OPAL_ENDROW = 2, 72360 OPAL_STARTCOLUMN = 3, 72361 OPAL_ENDCOLUMN = 4, 72362 OPAL_VALUES = 1, 72363 OPAL_TABLE_UID = 0, 72364 OPAL_TABLE_NAME = 1, 72365 OPAL_TABLE_COMMON = 2, 72366 OPAL_TABLE_TEMPLATE = 3, 72367 OPAL_TABLE_KIND = 4, 72368 OPAL_TABLE_COLUMN = 5, 72369 OPAL_TABLE_COLUMNS = 6, 72370 OPAL_TABLE_ROWS = 7, 72371 OPAL_TABLE_ROWS_FREE = 8, 72372 OPAL_TABLE_ROW_BYTES = 9, 72373 OPAL_TABLE_LASTID = 10, 72374 OPAL_TABLE_MIN = 11, 72375 OPAL_TABLE_MAX = 12, 72376 OPAL_PIN = 3, 72377 OPAL_RANGESTART = 3, 72378 OPAL_RANGELENGTH = 4, 72379 OPAL_READLOCKENABLED = 5, 72380 OPAL_WRITELOCKENABLED = 6, 72381 OPAL_READLOCKED = 7, 72382 OPAL_WRITELOCKED = 8, 72383 OPAL_ACTIVEKEY = 10, 72384 OPAL_LIFECYCLE = 6, 72385 OPAL_MAXRANGES = 4, 72386 OPAL_MBRENABLE = 1, 72387 OPAL_MBRDONE = 2, 72388 OPAL_HOSTPROPERTIES = 0, 72389 OPAL_STARTLIST = 240, 72390 OPAL_ENDLIST = 241, 72391 OPAL_STARTNAME = 242, 72392 OPAL_ENDNAME = 243, 72393 OPAL_CALL = 248, 72394 OPAL_ENDOFDATA = 249, 72395 OPAL_ENDOFSESSION = 250, 72396 OPAL_STARTTRANSACTON = 251, 72397 OPAL_ENDTRANSACTON = 252, 72398 OPAL_EMPTYATOM = 255, 72399 OPAL_WHERE = 0, 72400 }; 72401 72402 enum opal_parameter { 72403 OPAL_SUM_SET_LIST = 393216, 72404 }; 72405 72406 struct opal_compacket { 72407 __be32 reserved0; 72408 u8 extendedComID[4]; 72409 __be32 outstandingData; 72410 __be32 minTransfer; 72411 __be32 length; 72412 }; 72413 72414 struct opal_packet { 72415 __be32 tsn; 72416 __be32 hsn; 72417 __be32 seq_number; 72418 __be16 reserved0; 72419 __be16 ack_type; 72420 __be32 acknowledgment; 72421 __be32 length; 72422 }; 72423 72424 struct opal_data_subpacket { 72425 u8 reserved0[6]; 72426 __be16 kind; 72427 __be32 length; 72428 }; 72429 72430 struct opal_header { 72431 struct opal_compacket cp; 72432 struct opal_packet pkt; 72433 struct opal_data_subpacket subpkt; 72434 }; 72435 72436 struct d0_header { 72437 __be32 length; 72438 __be32 revision; 72439 __be32 reserved01; 72440 __be32 reserved02; 72441 u8 ignored[32]; 72442 }; 72443 72444 struct d0_tper_features { 72445 u8 supported_features; 72446 u8 reserved01[3]; 72447 __be32 reserved02; 72448 __be32 reserved03; 72449 }; 72450 72451 struct d0_locking_features { 72452 u8 supported_features; 72453 u8 reserved01[3]; 72454 __be32 reserved02; 72455 __be32 reserved03; 72456 }; 72457 72458 struct d0_geometry_features { 72459 u8 header[4]; 72460 u8 reserved01; 72461 u8 reserved02[7]; 72462 __be32 logical_block_size; 72463 __be64 alignment_granularity; 72464 __be64 lowest_aligned_lba; 72465 }; 72466 72467 struct d0_opal_v100 { 72468 __be16 baseComID; 72469 __be16 numComIDs; 72470 }; 72471 72472 struct d0_single_user_mode { 72473 __be32 num_locking_objects; 72474 u8 reserved01; 72475 u8 reserved02; 72476 __be16 reserved03; 72477 __be32 reserved04; 72478 }; 72479 72480 struct d0_opal_v200 { 72481 __be16 baseComID; 72482 __be16 numComIDs; 72483 u8 range_crossing; 72484 u8 num_locking_admin_auth[2]; 72485 u8 num_locking_user_auth[2]; 72486 u8 initialPIN; 72487 u8 revertedPIN; 72488 u8 reserved01; 72489 __be32 reserved02; 72490 }; 72491 72492 struct d0_features { 72493 __be16 code; 72494 u8 r_version; 72495 u8 length; 72496 u8 features[0]; 72497 }; 72498 72499 struct opal_dev; 72500 72501 struct opal_step { 72502 int (*fn)(struct opal_dev *, void *); 72503 void *data; 72504 }; 72505 72506 enum opal_atom_width { 72507 OPAL_WIDTH_TINY = 0, 72508 OPAL_WIDTH_SHORT = 1, 72509 OPAL_WIDTH_MEDIUM = 2, 72510 OPAL_WIDTH_LONG = 3, 72511 OPAL_WIDTH_TOKEN = 4, 72512 }; 72513 72514 struct opal_resp_tok { 72515 const u8 *pos; 72516 size_t len; 72517 enum opal_response_token type; 72518 enum opal_atom_width width; 72519 union { 72520 u64 u; 72521 s64 s; 72522 } stored; 72523 }; 72524 72525 struct parsed_resp { 72526 int num; 72527 struct opal_resp_tok toks[64]; 72528 }; 72529 72530 struct opal_dev { 72531 bool supported; 72532 bool mbr_enabled; 72533 void *data; 72534 sec_send_recv *send_recv; 72535 struct mutex dev_lock; 72536 u16 comid; 72537 u32 hsn; 72538 u32 tsn; 72539 u64 align; 72540 u64 lowest_lba; 72541 size_t pos; 72542 u8 cmd[2048]; 72543 u8 resp[2048]; 72544 struct parsed_resp parsed; 72545 size_t prev_d_len; 72546 void *prev_data; 72547 struct list_head unlk_lst; 72548 }; 72549 72550 typedef int cont_fn(struct opal_dev *); 72551 72552 struct opal_suspend_data { 72553 struct opal_lock_unlock unlk; 72554 u8 lr; 72555 struct list_head node; 72556 }; 72557 72558 struct blk_ksm_keyslot { 72559 atomic_t slot_refs; 72560 struct list_head idle_slot_node; 72561 struct hlist_node hash_node; 72562 const struct blk_crypto_key *key; 72563 struct blk_keyslot_manager *ksm; 72564 }; 72565 72566 struct blk_ksm_ll_ops { 72567 int (*keyslot_program)(struct blk_keyslot_manager *, const struct blk_crypto_key *, unsigned int); 72568 int (*keyslot_evict)(struct blk_keyslot_manager *, const struct blk_crypto_key *, unsigned int); 72569 }; 72570 72571 struct blk_keyslot_manager { 72572 struct blk_ksm_ll_ops ksm_ll_ops; 72573 unsigned int max_dun_bytes_supported; 72574 unsigned int crypto_modes_supported[4]; 72575 struct device *dev; 72576 unsigned int num_slots; 72577 struct rw_semaphore lock; 72578 wait_queue_head_t idle_slots_wait_queue; 72579 struct list_head idle_slots; 72580 spinlock_t idle_slots_lock; 72581 struct hlist_head *slot_hashtable; 72582 unsigned int log_slot_ht_size; 72583 struct blk_ksm_keyslot *slots; 72584 }; 72585 72586 struct blk_crypto_mode { 72587 const char *cipher_str; 72588 unsigned int keysize; 72589 unsigned int ivsize; 72590 }; 72591 72592 typedef int (*cmp_r_func_t)(const void *, const void *, const void *); 72593 72594 struct siprand_state { 72595 long unsigned int v0; 72596 long unsigned int v1; 72597 long unsigned int v2; 72598 long unsigned int v3; 72599 }; 72600 72601 typedef __kernel_long_t __kernel_ptrdiff_t; 72602 72603 typedef __kernel_ptrdiff_t ptrdiff_t; 72604 72605 struct region { 72606 unsigned int start; 72607 unsigned int off; 72608 unsigned int group_len; 72609 unsigned int end; 72610 }; 72611 72612 enum { 72613 REG_OP_ISFREE = 0, 72614 REG_OP_ALLOC = 1, 72615 REG_OP_RELEASE = 2, 72616 }; 72617 72618 typedef struct scatterlist *sg_alloc_fn(unsigned int, gfp_t); 72619 72620 typedef void sg_free_fn(struct scatterlist *, unsigned int); 72621 72622 struct sg_page_iter { 72623 struct scatterlist *sg; 72624 unsigned int sg_pgoffset; 72625 unsigned int __nents; 72626 int __pg_advance; 72627 }; 72628 72629 struct sg_dma_page_iter { 72630 struct sg_page_iter base; 72631 }; 72632 72633 struct sg_mapping_iter { 72634 struct page *page; 72635 void *addr; 72636 size_t length; 72637 size_t consumed; 72638 struct sg_page_iter piter; 72639 unsigned int __offset; 72640 unsigned int __remaining; 72641 unsigned int __flags; 72642 }; 72643 72644 typedef int (*cmp_func)(void *, const struct list_head *, const struct list_head *); 72645 72646 struct csum_state { 72647 __wsum csum; 72648 size_t off; 72649 }; 72650 72651 struct rhltable { 72652 struct rhashtable ht; 72653 }; 72654 72655 struct rhashtable_walker { 72656 struct list_head list; 72657 struct bucket_table *tbl; 72658 }; 72659 72660 struct rhashtable_iter { 72661 struct rhashtable *ht; 72662 struct rhash_head *p; 72663 struct rhlist_head *list; 72664 struct rhashtable_walker walker; 72665 unsigned int slot; 72666 unsigned int skip; 72667 bool end_of_table; 72668 }; 72669 72670 union nested_table { 72671 union nested_table *table; 72672 struct rhash_lock_head *bucket; 72673 }; 72674 72675 struct once_work { 72676 struct work_struct work; 72677 struct static_key_true *key; 72678 }; 72679 72680 struct genradix_iter { 72681 size_t offset; 72682 size_t pos; 72683 }; 72684 72685 struct genradix_node { 72686 union { 72687 struct genradix_node *children[512]; 72688 u8 data[4096]; 72689 }; 72690 }; 72691 72692 struct test_fail { 72693 const char *str; 72694 unsigned int base; 72695 }; 72696 72697 struct test_s8 { 72698 const char *str; 72699 unsigned int base; 72700 s8 expected_res; 72701 }; 72702 72703 struct test_u8 { 72704 const char *str; 72705 unsigned int base; 72706 u8 expected_res; 72707 }; 72708 72709 struct test_s16 { 72710 const char *str; 72711 unsigned int base; 72712 s16 expected_res; 72713 }; 72714 72715 struct test_u16 { 72716 const char *str; 72717 unsigned int base; 72718 u16 expected_res; 72719 }; 72720 72721 struct test_s32 { 72722 const char *str; 72723 unsigned int base; 72724 s32 expected_res; 72725 }; 72726 72727 struct test_u32 { 72728 const char *str; 72729 unsigned int base; 72730 u32 expected_res; 72731 }; 72732 72733 struct test_s64 { 72734 const char *str; 72735 unsigned int base; 72736 s64 expected_res; 72737 }; 72738 72739 struct test_u64 { 72740 const char *str; 72741 unsigned int base; 72742 u64 expected_res; 72743 }; 72744 72745 struct test_ll { 72746 const char *str; 72747 unsigned int base; 72748 long long int expected_res; 72749 }; 72750 72751 struct test_ull { 72752 const char *str; 72753 unsigned int base; 72754 long long unsigned int expected_res; 72755 }; 72756 72757 struct reciprocal_value_adv { 72758 u32 m; 72759 u8 sh; 72760 u8 exp; 72761 bool is_wide_m; 72762 }; 72763 72764 enum devm_ioremap_type { 72765 DEVM_IOREMAP = 0, 72766 DEVM_IOREMAP_UC = 1, 72767 DEVM_IOREMAP_WC = 2, 72768 }; 72769 72770 struct pcim_iomap_devres { 72771 void *table[6]; 72772 }; 72773 72774 struct btree_head { 72775 long unsigned int *node; 72776 mempool_t *mempool; 72777 int height; 72778 }; 72779 72780 struct btree_geo { 72781 int keylen; 72782 int no_pairs; 72783 int no_longs; 72784 }; 72785 72786 typedef void (*visitor128_t)(void *, long unsigned int, u64, u64, size_t); 72787 72788 typedef void (*visitorl_t)(void *, long unsigned int, long unsigned int, size_t); 72789 72790 typedef void (*visitor32_t)(void *, long unsigned int, u32, size_t); 72791 72792 typedef void (*visitor64_t)(void *, long unsigned int, u64, size_t); 72793 72794 enum assoc_array_walk_status { 72795 assoc_array_walk_tree_empty = 0, 72796 assoc_array_walk_found_terminal_node = 1, 72797 assoc_array_walk_found_wrong_shortcut = 2, 72798 }; 72799 72800 struct assoc_array_walk_result { 72801 struct { 72802 struct assoc_array_node *node; 72803 int level; 72804 int slot; 72805 } terminal_node; 72806 struct { 72807 struct assoc_array_shortcut *shortcut; 72808 int level; 72809 int sc_level; 72810 long unsigned int sc_segments; 72811 long unsigned int dissimilarity; 72812 } wrong_shortcut; 72813 }; 72814 72815 struct assoc_array_delete_collapse_context { 72816 struct assoc_array_node *node; 72817 const void *skip_leaf; 72818 int slot; 72819 }; 72820 72821 struct linear_range { 72822 unsigned int min; 72823 unsigned int min_sel; 72824 unsigned int max_sel; 72825 unsigned int step; 72826 }; 72827 72828 enum packing_op { 72829 PACK = 0, 72830 UNPACK = 1, 72831 }; 72832 72833 struct xxh32_state { 72834 uint32_t total_len_32; 72835 uint32_t large_len; 72836 uint32_t v1; 72837 uint32_t v2; 72838 uint32_t v3; 72839 uint32_t v4; 72840 uint32_t mem32[4]; 72841 uint32_t memsize; 72842 }; 72843 72844 struct gen_pool_chunk { 72845 struct list_head next_chunk; 72846 atomic_long_t avail; 72847 phys_addr_t phys_addr; 72848 void *owner; 72849 long unsigned int start_addr; 72850 long unsigned int end_addr; 72851 long unsigned int bits[0]; 72852 }; 72853 72854 struct genpool_data_align { 72855 int align; 72856 }; 72857 72858 struct genpool_data_fixed { 72859 long unsigned int offset; 72860 }; 72861 72862 struct sw842_hlist_node8 { 72863 struct hlist_node node; 72864 u64 data; 72865 u8 index; 72866 }; 72867 72868 struct sw842_hlist_node4 { 72869 struct hlist_node node; 72870 u32 data; 72871 u16 index; 72872 }; 72873 72874 struct sw842_hlist_node2 { 72875 struct hlist_node node; 72876 u16 data; 72877 u8 index; 72878 }; 72879 72880 struct sw842_param { 72881 u8 *in; 72882 u8 *instart; 72883 u64 ilen; 72884 u8 *out; 72885 u64 olen; 72886 u8 bit; 72887 u64 data8[1]; 72888 u32 data4[2]; 72889 u16 data2[4]; 72890 int index8[1]; 72891 int index4[2]; 72892 int index2[4]; 72893 struct hlist_head htable8[1024]; 72894 struct hlist_head htable4[2048]; 72895 struct hlist_head htable2[1024]; 72896 struct sw842_hlist_node8 node8[256]; 72897 struct sw842_hlist_node4 node4[512]; 72898 struct sw842_hlist_node2 node2[256]; 72899 }; 72900 72901 struct sw842_param___2 { 72902 u8 *in; 72903 u8 bit; 72904 u64 ilen; 72905 u8 *out; 72906 u8 *ostart; 72907 u64 olen; 72908 }; 72909 72910 typedef struct { 72911 unsigned char op; 72912 unsigned char bits; 72913 short unsigned int val; 72914 } code; 72915 72916 typedef enum { 72917 HEAD = 0, 72918 FLAGS = 1, 72919 TIME = 2, 72920 OS = 3, 72921 EXLEN = 4, 72922 EXTRA = 5, 72923 NAME = 6, 72924 COMMENT = 7, 72925 HCRC = 8, 72926 DICTID = 9, 72927 DICT = 10, 72928 TYPE = 11, 72929 TYPEDO = 12, 72930 STORED = 13, 72931 COPY = 14, 72932 TABLE = 15, 72933 LENLENS = 16, 72934 CODELENS = 17, 72935 LEN = 18, 72936 LENEXT = 19, 72937 DIST = 20, 72938 DISTEXT = 21, 72939 MATCH = 22, 72940 LIT = 23, 72941 CHECK = 24, 72942 LENGTH = 25, 72943 DONE = 26, 72944 BAD = 27, 72945 MEM = 28, 72946 SYNC = 29, 72947 } inflate_mode; 72948 72949 struct inflate_state { 72950 inflate_mode mode; 72951 int last; 72952 int wrap; 72953 int havedict; 72954 int flags; 72955 unsigned int dmax; 72956 long unsigned int check; 72957 long unsigned int total; 72958 unsigned int wbits; 72959 unsigned int wsize; 72960 unsigned int whave; 72961 unsigned int write; 72962 unsigned char *window; 72963 long unsigned int hold; 72964 unsigned int bits; 72965 unsigned int length; 72966 unsigned int offset; 72967 unsigned int extra; 72968 const code *lencode; 72969 const code *distcode; 72970 unsigned int lenbits; 72971 unsigned int distbits; 72972 unsigned int ncode; 72973 unsigned int nlen; 72974 unsigned int ndist; 72975 unsigned int have; 72976 code *next; 72977 short unsigned int lens[320]; 72978 short unsigned int work[288]; 72979 code codes[2048]; 72980 }; 72981 72982 union uu { 72983 short unsigned int us; 72984 unsigned char b[2]; 72985 }; 72986 72987 typedef unsigned int uInt; 72988 72989 typedef enum { 72990 CODES = 0, 72991 LENS = 1, 72992 DISTS = 2, 72993 } codetype; 72994 72995 struct inflate_workspace { 72996 struct inflate_state inflate_state; 72997 unsigned char working_window[32768]; 72998 }; 72999 73000 typedef unsigned char uch; 73001 73002 typedef short unsigned int ush; 73003 73004 typedef long unsigned int ulg; 73005 73006 struct ct_data_s { 73007 union { 73008 ush freq; 73009 ush code; 73010 } fc; 73011 union { 73012 ush dad; 73013 ush len; 73014 } dl; 73015 }; 73016 73017 typedef struct ct_data_s ct_data; 73018 73019 struct static_tree_desc_s { 73020 const ct_data *static_tree; 73021 const int *extra_bits; 73022 int extra_base; 73023 int elems; 73024 int max_length; 73025 }; 73026 73027 typedef struct static_tree_desc_s static_tree_desc; 73028 73029 struct tree_desc_s { 73030 ct_data *dyn_tree; 73031 int max_code; 73032 static_tree_desc *stat_desc; 73033 }; 73034 73035 typedef ush Pos; 73036 73037 typedef unsigned int IPos; 73038 73039 struct deflate_state { 73040 z_streamp strm; 73041 int status; 73042 Byte *pending_buf; 73043 ulg pending_buf_size; 73044 Byte *pending_out; 73045 int pending; 73046 int noheader; 73047 Byte data_type; 73048 Byte method; 73049 int last_flush; 73050 uInt w_size; 73051 uInt w_bits; 73052 uInt w_mask; 73053 Byte *window; 73054 ulg window_size; 73055 Pos *prev; 73056 Pos *head; 73057 uInt ins_h; 73058 uInt hash_size; 73059 uInt hash_bits; 73060 uInt hash_mask; 73061 uInt hash_shift; 73062 long int block_start; 73063 uInt match_length; 73064 IPos prev_match; 73065 int match_available; 73066 uInt strstart; 73067 uInt match_start; 73068 uInt lookahead; 73069 uInt prev_length; 73070 uInt max_chain_length; 73071 uInt max_lazy_match; 73072 int level; 73073 int strategy; 73074 uInt good_match; 73075 int nice_match; 73076 struct ct_data_s dyn_ltree[573]; 73077 struct ct_data_s dyn_dtree[61]; 73078 struct ct_data_s bl_tree[39]; 73079 struct tree_desc_s l_desc; 73080 struct tree_desc_s d_desc; 73081 struct tree_desc_s bl_desc; 73082 ush bl_count[16]; 73083 int heap[573]; 73084 int heap_len; 73085 int heap_max; 73086 uch depth[573]; 73087 uch *l_buf; 73088 uInt lit_bufsize; 73089 uInt last_lit; 73090 ush *d_buf; 73091 ulg opt_len; 73092 ulg static_len; 73093 ulg compressed_len; 73094 uInt matches; 73095 int last_eob_len; 73096 ush bi_buf; 73097 int bi_valid; 73098 }; 73099 73100 typedef struct deflate_state deflate_state; 73101 73102 typedef enum { 73103 need_more = 0, 73104 block_done = 1, 73105 finish_started = 2, 73106 finish_done = 3, 73107 } block_state; 73108 73109 typedef block_state (*compress_func)(deflate_state *, int); 73110 73111 struct deflate_workspace { 73112 deflate_state deflate_memory; 73113 Byte *window_memory; 73114 Pos *prev_memory; 73115 Pos *head_memory; 73116 char *overlay_memory; 73117 }; 73118 73119 typedef struct deflate_workspace deflate_workspace; 73120 73121 struct config_s { 73122 ush good_length; 73123 ush max_lazy; 73124 ush nice_length; 73125 ush max_chain; 73126 compress_func func; 73127 }; 73128 73129 typedef struct config_s config; 73130 73131 typedef struct tree_desc_s tree_desc; 73132 73133 typedef struct { 73134 uint32_t hashTable[4096]; 73135 uint32_t currentOffset; 73136 uint32_t initCheck; 73137 const uint8_t *dictionary; 73138 uint8_t *bufferStart; 73139 uint32_t dictSize; 73140 } LZ4_stream_t_internal; 73141 73142 typedef union { 73143 long long unsigned int table[2052]; 73144 LZ4_stream_t_internal internal_donotuse; 73145 } LZ4_stream_t; 73146 73147 typedef uint8_t BYTE; 73148 73149 typedef uint16_t U16; 73150 73151 typedef uint32_t U32; 73152 73153 typedef uint64_t U64; 73154 73155 typedef uintptr_t uptrval; 73156 73157 typedef enum { 73158 noLimit = 0, 73159 limitedOutput = 1, 73160 } limitedOutput_directive; 73161 73162 typedef enum { 73163 byPtr = 0, 73164 byU32 = 1, 73165 byU16 = 2, 73166 } tableType_t; 73167 73168 typedef enum { 73169 noDict = 0, 73170 withPrefix64k = 1, 73171 usingExtDict = 2, 73172 } dict_directive; 73173 73174 typedef enum { 73175 noDictIssue = 0, 73176 dictSmall = 1, 73177 } dictIssue_directive; 73178 73179 typedef struct { 73180 const uint8_t *externalDict; 73181 size_t extDictSize; 73182 const uint8_t *prefixEnd; 73183 size_t prefixSize; 73184 } LZ4_streamDecode_t_internal; 73185 73186 typedef union { 73187 long long unsigned int table[4]; 73188 LZ4_streamDecode_t_internal internal_donotuse; 73189 } LZ4_streamDecode_t; 73190 73191 typedef enum { 73192 endOnOutputSize = 0, 73193 endOnInputSize = 1, 73194 } endCondition_directive; 73195 73196 typedef enum { 73197 decode_full_block = 0, 73198 partial_decode = 1, 73199 } earlyEnd_directive; 73200 73201 typedef struct { 73202 size_t bitContainer; 73203 int bitPos; 73204 char *startPtr; 73205 char *ptr; 73206 char *endPtr; 73207 } BIT_CStream_t; 73208 73209 typedef unsigned int FSE_CTable; 73210 73211 typedef struct { 73212 ptrdiff_t value; 73213 const void *stateTable; 73214 const void *symbolTT; 73215 unsigned int stateLog; 73216 } FSE_CState_t; 73217 73218 typedef struct { 73219 int deltaFindState; 73220 U32 deltaNbBits; 73221 } FSE_symbolCompressionTransform; 73222 73223 typedef int16_t S16; 73224 73225 struct HUF_CElt_s { 73226 U16 val; 73227 BYTE nbBits; 73228 }; 73229 73230 typedef struct HUF_CElt_s HUF_CElt; 73231 73232 typedef enum { 73233 HUF_repeat_none = 0, 73234 HUF_repeat_check = 1, 73235 HUF_repeat_valid = 2, 73236 } HUF_repeat; 73237 73238 struct nodeElt_s { 73239 U32 count; 73240 U16 parent; 73241 BYTE byte; 73242 BYTE nbBits; 73243 }; 73244 73245 typedef struct nodeElt_s nodeElt; 73246 73247 typedef struct { 73248 U32 base; 73249 U32 curr; 73250 } rankPos; 73251 73252 typedef enum { 73253 ZSTDcs_created = 0, 73254 ZSTDcs_init = 1, 73255 ZSTDcs_ongoing = 2, 73256 ZSTDcs_ending = 3, 73257 } ZSTD_compressionStage_e; 73258 73259 typedef void * (*ZSTD_allocFunction)(void *, size_t); 73260 73261 typedef void (*ZSTD_freeFunction)(void *, void *); 73262 73263 typedef struct { 73264 ZSTD_allocFunction customAlloc; 73265 ZSTD_freeFunction customFree; 73266 void *opaque; 73267 } ZSTD_customMem; 73268 73269 typedef struct { 73270 U32 price; 73271 U32 off; 73272 U32 mlen; 73273 U32 litlen; 73274 U32 rep[3]; 73275 } ZSTD_optimal_t; 73276 73277 typedef struct { 73278 U32 off; 73279 U32 len; 73280 } ZSTD_match_t; 73281 73282 struct seqDef_s; 73283 73284 typedef struct seqDef_s seqDef; 73285 73286 typedef struct { 73287 seqDef *sequencesStart; 73288 seqDef *sequences; 73289 BYTE *litStart; 73290 BYTE *lit; 73291 BYTE *llCode; 73292 BYTE *mlCode; 73293 BYTE *ofCode; 73294 U32 longLengthID; 73295 U32 longLengthPos; 73296 ZSTD_optimal_t *priceTable; 73297 ZSTD_match_t *matchTable; 73298 U32 *matchLengthFreq; 73299 U32 *litLengthFreq; 73300 U32 *litFreq; 73301 U32 *offCodeFreq; 73302 U32 matchLengthSum; 73303 U32 matchSum; 73304 U32 litLengthSum; 73305 U32 litSum; 73306 U32 offCodeSum; 73307 U32 log2matchLengthSum; 73308 U32 log2matchSum; 73309 U32 log2litLengthSum; 73310 U32 log2litSum; 73311 U32 log2offCodeSum; 73312 U32 factor; 73313 U32 staticPrices; 73314 U32 cachedPrice; 73315 U32 cachedLitLength; 73316 const BYTE *cachedLiterals; 73317 } seqStore_t; 73318 73319 struct HUF_CElt_s___2; 73320 73321 typedef struct HUF_CElt_s___2 HUF_CElt___2; 73322 73323 struct ZSTD_CCtx_s { 73324 const BYTE *nextSrc; 73325 const BYTE *base; 73326 const BYTE *dictBase; 73327 U32 dictLimit; 73328 U32 lowLimit; 73329 U32 nextToUpdate; 73330 U32 nextToUpdate3; 73331 U32 hashLog3; 73332 U32 loadedDictEnd; 73333 U32 forceWindow; 73334 U32 forceRawDict; 73335 ZSTD_compressionStage_e stage; 73336 U32 rep[3]; 73337 U32 repToConfirm[3]; 73338 U32 dictID; 73339 ZSTD_parameters params; 73340 void *workSpace; 73341 size_t workSpaceSize; 73342 size_t blockSize; 73343 U64 frameContentSize; 73344 struct xxh64_state xxhState; 73345 ZSTD_customMem customMem; 73346 seqStore_t seqStore; 73347 U32 *hashTable; 73348 U32 *hashTable3; 73349 U32 *chainTable; 73350 HUF_CElt___2 *hufTable; 73351 U32 flagStaticTables; 73352 HUF_repeat flagStaticHufTable; 73353 FSE_CTable offcodeCTable[187]; 73354 FSE_CTable matchlengthCTable[363]; 73355 FSE_CTable litlengthCTable[329]; 73356 unsigned int tmpCounters[1536]; 73357 }; 73358 73359 typedef struct ZSTD_CCtx_s ZSTD_CCtx; 73360 73361 struct ZSTD_CDict_s { 73362 void *dictBuffer; 73363 const void *dictContent; 73364 size_t dictContentSize; 73365 ZSTD_CCtx *refContext; 73366 }; 73367 73368 typedef struct ZSTD_CDict_s ZSTD_CDict; 73369 73370 typedef enum { 73371 zcss_init = 0, 73372 zcss_load = 1, 73373 zcss_flush = 2, 73374 zcss_final = 3, 73375 } ZSTD_cStreamStage; 73376 73377 struct ZSTD_CStream_s___2 { 73378 ZSTD_CCtx *cctx; 73379 ZSTD_CDict *cdictLocal; 73380 const ZSTD_CDict *cdict; 73381 char *inBuff; 73382 size_t inBuffSize; 73383 size_t inToCompress; 73384 size_t inBuffPos; 73385 size_t inBuffTarget; 73386 size_t blockSize; 73387 char *outBuff; 73388 size_t outBuffSize; 73389 size_t outBuffContentSize; 73390 size_t outBuffFlushedSize; 73391 ZSTD_cStreamStage stage; 73392 U32 checksum; 73393 U32 frameEnded; 73394 U64 pledgedSrcSize; 73395 U64 inputProcessed; 73396 ZSTD_parameters params; 73397 ZSTD_customMem customMem; 73398 }; 73399 73400 typedef struct ZSTD_CStream_s___2 ZSTD_CStream___2; 73401 73402 typedef int32_t S32; 73403 73404 typedef enum { 73405 set_basic = 0, 73406 set_rle = 1, 73407 set_compressed = 2, 73408 set_repeat = 3, 73409 } symbolEncodingType_e; 73410 73411 struct seqDef_s { 73412 U32 offset; 73413 U16 litLength; 73414 U16 matchLength; 73415 }; 73416 73417 typedef enum { 73418 ZSTDcrp_continue = 0, 73419 ZSTDcrp_noMemset = 1, 73420 ZSTDcrp_fullReset = 2, 73421 } ZSTD_compResetPolicy_e; 73422 73423 typedef void (*ZSTD_blockCompressor)(ZSTD_CCtx *, const void *, size_t); 73424 73425 typedef enum { 73426 zsf_gather = 0, 73427 zsf_flush = 1, 73428 zsf_end = 2, 73429 } ZSTD_flush_e; 73430 73431 typedef size_t (*searchMax_f)(ZSTD_CCtx *, const BYTE *, const BYTE *, size_t *, U32, U32); 73432 73433 typedef struct { 73434 size_t bitContainer; 73435 unsigned int bitsConsumed; 73436 const char *ptr; 73437 const char *start; 73438 } BIT_DStream_t; 73439 73440 typedef enum { 73441 BIT_DStream_unfinished = 0, 73442 BIT_DStream_endOfBuffer = 1, 73443 BIT_DStream_completed = 2, 73444 BIT_DStream_overflow = 3, 73445 } BIT_DStream_status; 73446 73447 typedef unsigned int FSE_DTable; 73448 73449 typedef struct { 73450 size_t state; 73451 const void *table; 73452 } FSE_DState_t; 73453 73454 typedef struct { 73455 U16 tableLog; 73456 U16 fastMode; 73457 } FSE_DTableHeader; 73458 73459 typedef struct { 73460 short unsigned int newState; 73461 unsigned char symbol; 73462 unsigned char nbBits; 73463 } FSE_decode_t; 73464 73465 typedef struct { 73466 void *ptr; 73467 const void *end; 73468 } ZSTD_stack; 73469 73470 typedef U32 HUF_DTable; 73471 73472 typedef struct { 73473 BYTE maxTableLog; 73474 BYTE tableType; 73475 BYTE tableLog; 73476 BYTE reserved; 73477 } DTableDesc; 73478 73479 typedef struct { 73480 BYTE byte; 73481 BYTE nbBits; 73482 } HUF_DEltX2; 73483 73484 typedef struct { 73485 U16 sequence; 73486 BYTE nbBits; 73487 BYTE length; 73488 } HUF_DEltX4; 73489 73490 typedef struct { 73491 BYTE symbol; 73492 BYTE weight; 73493 } sortedSymbol_t; 73494 73495 typedef U32 rankValCol_t[13]; 73496 73497 typedef struct { 73498 U32 tableTime; 73499 U32 decode256Time; 73500 } algo_time_t; 73501 73502 typedef struct { 73503 FSE_DTable LLTable[513]; 73504 FSE_DTable OFTable[257]; 73505 FSE_DTable MLTable[513]; 73506 HUF_DTable hufTable[4097]; 73507 U64 workspace[384]; 73508 U32 rep[3]; 73509 } ZSTD_entropyTables_t; 73510 73511 typedef struct { 73512 long long unsigned int frameContentSize; 73513 unsigned int windowSize; 73514 unsigned int dictID; 73515 unsigned int checksumFlag; 73516 } ZSTD_frameParams; 73517 73518 typedef enum { 73519 bt_raw = 0, 73520 bt_rle = 1, 73521 bt_compressed = 2, 73522 bt_reserved = 3, 73523 } blockType_e; 73524 73525 typedef enum { 73526 ZSTDds_getFrameHeaderSize = 0, 73527 ZSTDds_decodeFrameHeader = 1, 73528 ZSTDds_decodeBlockHeader = 2, 73529 ZSTDds_decompressBlock = 3, 73530 ZSTDds_decompressLastBlock = 4, 73531 ZSTDds_checkChecksum = 5, 73532 ZSTDds_decodeSkippableHeader = 6, 73533 ZSTDds_skipFrame = 7, 73534 } ZSTD_dStage; 73535 73536 struct ZSTD_DCtx_s { 73537 const FSE_DTable *LLTptr; 73538 const FSE_DTable *MLTptr; 73539 const FSE_DTable *OFTptr; 73540 const HUF_DTable *HUFptr; 73541 ZSTD_entropyTables_t entropy; 73542 const void *previousDstEnd; 73543 const void *base; 73544 const void *vBase; 73545 const void *dictEnd; 73546 size_t expected; 73547 ZSTD_frameParams fParams; 73548 blockType_e bType; 73549 ZSTD_dStage stage; 73550 U32 litEntropy; 73551 U32 fseEntropy; 73552 struct xxh64_state xxhState; 73553 size_t headerSize; 73554 U32 dictID; 73555 const BYTE *litPtr; 73556 ZSTD_customMem customMem; 73557 size_t litSize; 73558 size_t rleSize; 73559 BYTE litBuffer[131080]; 73560 BYTE headerBuffer[18]; 73561 }; 73562 73563 typedef struct ZSTD_DCtx_s ZSTD_DCtx; 73564 73565 struct ZSTD_DDict_s { 73566 void *dictBuffer; 73567 const void *dictContent; 73568 size_t dictSize; 73569 ZSTD_entropyTables_t entropy; 73570 U32 dictID; 73571 U32 entropyPresent; 73572 ZSTD_customMem cMem; 73573 }; 73574 73575 typedef struct ZSTD_DDict_s ZSTD_DDict; 73576 73577 typedef enum { 73578 zdss_init = 0, 73579 zdss_loadHeader = 1, 73580 zdss_read = 2, 73581 zdss_load = 3, 73582 zdss_flush = 4, 73583 } ZSTD_dStreamStage; 73584 73585 struct ZSTD_DStream_s___2 { 73586 ZSTD_DCtx *dctx; 73587 ZSTD_DDict *ddictLocal; 73588 const ZSTD_DDict *ddict; 73589 ZSTD_frameParams fParams; 73590 ZSTD_dStreamStage stage; 73591 char *inBuff; 73592 size_t inBuffSize; 73593 size_t inPos; 73594 size_t maxWindowSize; 73595 char *outBuff; 73596 size_t outBuffSize; 73597 size_t outStart; 73598 size_t outEnd; 73599 size_t blockSize; 73600 BYTE headerBuffer[18]; 73601 size_t lhSize; 73602 ZSTD_customMem customMem; 73603 void *legacyContext; 73604 U32 previousLegacyVersion; 73605 U32 legacyVersion; 73606 U32 hostageByte; 73607 }; 73608 73609 typedef struct ZSTD_DStream_s___2 ZSTD_DStream___2; 73610 73611 typedef enum { 73612 ZSTDnit_frameHeader = 0, 73613 ZSTDnit_blockHeader = 1, 73614 ZSTDnit_block = 2, 73615 ZSTDnit_lastBlock = 3, 73616 ZSTDnit_checksum = 4, 73617 ZSTDnit_skippableFrame = 5, 73618 } ZSTD_nextInputType_e; 73619 73620 typedef uintptr_t uPtrDiff; 73621 73622 typedef struct { 73623 blockType_e blockType; 73624 U32 lastBlock; 73625 U32 origSize; 73626 } blockProperties_t; 73627 73628 typedef union { 73629 FSE_decode_t realData; 73630 U32 alignedBy4; 73631 } FSE_decode_t4; 73632 73633 typedef struct { 73634 size_t litLength; 73635 size_t matchLength; 73636 size_t offset; 73637 const BYTE *match; 73638 } seq_t; 73639 73640 typedef struct { 73641 BIT_DStream_t DStream; 73642 FSE_DState_t stateLL; 73643 FSE_DState_t stateOffb; 73644 FSE_DState_t stateML; 73645 size_t prevOffset[3]; 73646 const BYTE *base; 73647 size_t pos; 73648 uPtrDiff gotoDict; 73649 } seqState_t; 73650 73651 enum xz_mode { 73652 XZ_SINGLE = 0, 73653 XZ_PREALLOC = 1, 73654 XZ_DYNALLOC = 2, 73655 }; 73656 73657 enum xz_ret { 73658 XZ_OK = 0, 73659 XZ_STREAM_END = 1, 73660 XZ_UNSUPPORTED_CHECK = 2, 73661 XZ_MEM_ERROR = 3, 73662 XZ_MEMLIMIT_ERROR = 4, 73663 XZ_FORMAT_ERROR = 5, 73664 XZ_OPTIONS_ERROR = 6, 73665 XZ_DATA_ERROR = 7, 73666 XZ_BUF_ERROR = 8, 73667 }; 73668 73669 struct xz_buf { 73670 const uint8_t *in; 73671 size_t in_pos; 73672 size_t in_size; 73673 uint8_t *out; 73674 size_t out_pos; 73675 size_t out_size; 73676 }; 73677 73678 struct xz_dec; 73679 73680 typedef uint64_t vli_type; 73681 73682 enum xz_check { 73683 XZ_CHECK_NONE = 0, 73684 XZ_CHECK_CRC32 = 1, 73685 XZ_CHECK_CRC64 = 4, 73686 XZ_CHECK_SHA256 = 10, 73687 }; 73688 73689 struct xz_dec_hash { 73690 vli_type unpadded; 73691 vli_type uncompressed; 73692 uint32_t crc32; 73693 }; 73694 73695 struct xz_dec_lzma2; 73696 73697 struct xz_dec_bcj; 73698 73699 struct xz_dec___2 { 73700 enum { 73701 SEQ_STREAM_HEADER = 0, 73702 SEQ_BLOCK_START = 1, 73703 SEQ_BLOCK_HEADER = 2, 73704 SEQ_BLOCK_UNCOMPRESS = 3, 73705 SEQ_BLOCK_PADDING = 4, 73706 SEQ_BLOCK_CHECK = 5, 73707 SEQ_INDEX = 6, 73708 SEQ_INDEX_PADDING = 7, 73709 SEQ_INDEX_CRC32 = 8, 73710 SEQ_STREAM_FOOTER = 9, 73711 } sequence; 73712 uint32_t pos; 73713 vli_type vli; 73714 size_t in_start; 73715 size_t out_start; 73716 uint32_t crc32; 73717 enum xz_check check_type; 73718 enum xz_mode mode; 73719 bool allow_buf_error; 73720 struct { 73721 vli_type compressed; 73722 vli_type uncompressed; 73723 uint32_t size; 73724 } block_header; 73725 struct { 73726 vli_type compressed; 73727 vli_type uncompressed; 73728 vli_type count; 73729 struct xz_dec_hash hash; 73730 } block; 73731 struct { 73732 enum { 73733 SEQ_INDEX_COUNT = 0, 73734 SEQ_INDEX_UNPADDED = 1, 73735 SEQ_INDEX_UNCOMPRESSED = 2, 73736 } sequence; 73737 vli_type size; 73738 vli_type count; 73739 struct xz_dec_hash hash; 73740 } index; 73741 struct { 73742 size_t pos; 73743 size_t size; 73744 uint8_t buf[1024]; 73745 } temp; 73746 struct xz_dec_lzma2 *lzma2; 73747 struct xz_dec_bcj *bcj; 73748 bool bcj_active; 73749 }; 73750 73751 enum lzma_state { 73752 STATE_LIT_LIT = 0, 73753 STATE_MATCH_LIT_LIT = 1, 73754 STATE_REP_LIT_LIT = 2, 73755 STATE_SHORTREP_LIT_LIT = 3, 73756 STATE_MATCH_LIT = 4, 73757 STATE_REP_LIT = 5, 73758 STATE_SHORTREP_LIT = 6, 73759 STATE_LIT_MATCH = 7, 73760 STATE_LIT_LONGREP = 8, 73761 STATE_LIT_SHORTREP = 9, 73762 STATE_NONLIT_MATCH = 10, 73763 STATE_NONLIT_REP = 11, 73764 }; 73765 73766 struct dictionary { 73767 uint8_t *buf; 73768 size_t start; 73769 size_t pos; 73770 size_t full; 73771 size_t limit; 73772 size_t end; 73773 uint32_t size; 73774 uint32_t size_max; 73775 uint32_t allocated; 73776 enum xz_mode mode; 73777 }; 73778 73779 struct rc_dec { 73780 uint32_t range; 73781 uint32_t code; 73782 uint32_t init_bytes_left; 73783 const uint8_t *in; 73784 size_t in_pos; 73785 size_t in_limit; 73786 }; 73787 73788 struct lzma_len_dec { 73789 uint16_t choice; 73790 uint16_t choice2; 73791 uint16_t low[128]; 73792 uint16_t mid[128]; 73793 uint16_t high[256]; 73794 }; 73795 73796 struct lzma_dec { 73797 uint32_t rep0; 73798 uint32_t rep1; 73799 uint32_t rep2; 73800 uint32_t rep3; 73801 enum lzma_state state; 73802 uint32_t len; 73803 uint32_t lc; 73804 uint32_t literal_pos_mask; 73805 uint32_t pos_mask; 73806 uint16_t is_match[192]; 73807 uint16_t is_rep[12]; 73808 uint16_t is_rep0[12]; 73809 uint16_t is_rep1[12]; 73810 uint16_t is_rep2[12]; 73811 uint16_t is_rep0_long[192]; 73812 uint16_t dist_slot[256]; 73813 uint16_t dist_special[114]; 73814 uint16_t dist_align[16]; 73815 struct lzma_len_dec match_len_dec; 73816 struct lzma_len_dec rep_len_dec; 73817 uint16_t literal[12288]; 73818 }; 73819 73820 enum lzma2_seq { 73821 SEQ_CONTROL = 0, 73822 SEQ_UNCOMPRESSED_1 = 1, 73823 SEQ_UNCOMPRESSED_2 = 2, 73824 SEQ_COMPRESSED_0 = 3, 73825 SEQ_COMPRESSED_1 = 4, 73826 SEQ_PROPERTIES = 5, 73827 SEQ_LZMA_PREPARE = 6, 73828 SEQ_LZMA_RUN = 7, 73829 SEQ_COPY = 8, 73830 }; 73831 73832 struct lzma2_dec { 73833 enum lzma2_seq sequence; 73834 enum lzma2_seq next_sequence; 73835 uint32_t uncompressed; 73836 uint32_t compressed; 73837 bool need_dict_reset; 73838 bool need_props; 73839 }; 73840 73841 struct xz_dec_lzma2___2 { 73842 struct rc_dec rc; 73843 struct dictionary dict; 73844 struct lzma2_dec lzma2; 73845 struct lzma_dec lzma; 73846 struct { 73847 uint32_t size; 73848 uint8_t buf[63]; 73849 } temp; 73850 }; 73851 73852 struct xz_dec_bcj___2 { 73853 enum { 73854 BCJ_X86 = 4, 73855 BCJ_POWERPC = 5, 73856 BCJ_IA64 = 6, 73857 BCJ_ARM = 7, 73858 BCJ_ARMTHUMB = 8, 73859 BCJ_SPARC = 9, 73860 } type; 73861 enum xz_ret ret; 73862 bool single_call; 73863 uint32_t pos; 73864 uint32_t x86_prev_mask; 73865 uint8_t *out; 73866 size_t out_pos; 73867 size_t out_size; 73868 struct { 73869 size_t filtered; 73870 size_t size; 73871 uint8_t buf[16]; 73872 } temp; 73873 }; 73874 73875 struct raid6_recov_calls { 73876 void (*data2)(int, size_t, int, int, void **); 73877 void (*datap)(int, size_t, int, void **); 73878 int (*valid)(); 73879 const char *name; 73880 int priority; 73881 }; 73882 73883 typedef u64 unative_t; 73884 73885 struct raid6_sse_constants { 73886 u64 x1d[2]; 73887 }; 73888 73889 struct raid6_avx2_constants { 73890 u64 x1d[4]; 73891 }; 73892 73893 struct raid6_avx512_constants { 73894 u64 x1d[8]; 73895 }; 73896 73897 struct ts_state { 73898 unsigned int offset; 73899 char cb[48]; 73900 }; 73901 73902 struct ts_config; 73903 73904 struct ts_ops { 73905 const char *name; 73906 struct ts_config * (*init)(const void *, unsigned int, gfp_t, int); 73907 unsigned int (*find)(struct ts_config *, struct ts_state *); 73908 void (*destroy)(struct ts_config *); 73909 void * (*get_pattern)(struct ts_config *); 73910 unsigned int (*get_pattern_len)(struct ts_config *); 73911 struct module *owner; 73912 struct list_head list; 73913 }; 73914 73915 struct ts_config { 73916 struct ts_ops *ops; 73917 int flags; 73918 unsigned int (*get_next_block)(unsigned int, const u8 **, struct ts_config *, struct ts_state *); 73919 void (*finish)(struct ts_config *, struct ts_state *); 73920 }; 73921 73922 struct ts_linear_state { 73923 unsigned int len; 73924 const void *data; 73925 }; 73926 73927 struct ei_entry { 73928 struct list_head list; 73929 long unsigned int start_addr; 73930 long unsigned int end_addr; 73931 int etype; 73932 void *priv; 73933 }; 73934 73935 struct ddebug_table { 73936 struct list_head link; 73937 const char *mod_name; 73938 unsigned int num_ddebugs; 73939 struct _ddebug *ddebugs; 73940 }; 73941 73942 struct ddebug_query { 73943 const char *filename; 73944 const char *module; 73945 const char *function; 73946 const char *format; 73947 unsigned int first_lineno; 73948 unsigned int last_lineno; 73949 }; 73950 73951 struct ddebug_iter { 73952 struct ddebug_table *table; 73953 unsigned int idx; 73954 }; 73955 73956 struct flag_settings { 73957 unsigned int flags; 73958 unsigned int mask; 73959 }; 73960 73961 struct flagsbuf { 73962 char buf[7]; 73963 }; 73964 73965 struct nla_bitfield32 { 73966 __u32 value; 73967 __u32 selector; 73968 }; 73969 73970 enum nla_policy_validation { 73971 NLA_VALIDATE_NONE = 0, 73972 NLA_VALIDATE_RANGE = 1, 73973 NLA_VALIDATE_RANGE_WARN_TOO_LONG = 2, 73974 NLA_VALIDATE_MIN = 3, 73975 NLA_VALIDATE_MAX = 4, 73976 NLA_VALIDATE_MASK = 5, 73977 NLA_VALIDATE_RANGE_PTR = 6, 73978 NLA_VALIDATE_FUNCTION = 7, 73979 }; 73980 73981 enum netlink_validation { 73982 NL_VALIDATE_LIBERAL = 0, 73983 NL_VALIDATE_TRAILING = 1, 73984 NL_VALIDATE_MAXTYPE = 2, 73985 NL_VALIDATE_UNSPEC = 4, 73986 NL_VALIDATE_STRICT_ATTRS = 8, 73987 NL_VALIDATE_NESTED = 16, 73988 }; 73989 73990 struct cpu_rmap { 73991 struct kref refcount; 73992 u16 size; 73993 u16 used; 73994 void **obj; 73995 struct { 73996 u16 index; 73997 u16 dist; 73998 } near[0]; 73999 }; 74000 74001 struct irq_glue { 74002 struct irq_affinity_notify notify; 74003 struct cpu_rmap *rmap; 74004 u16 index; 74005 }; 74006 74007 typedef mpi_limb_t *mpi_ptr_t; 74008 74009 typedef int mpi_size_t; 74010 74011 typedef mpi_limb_t UWtype; 74012 74013 typedef unsigned int UHWtype; 74014 74015 enum gcry_mpi_constants { 74016 MPI_C_ZERO = 0, 74017 MPI_C_ONE = 1, 74018 MPI_C_TWO = 2, 74019 MPI_C_THREE = 3, 74020 MPI_C_FOUR = 4, 74021 MPI_C_EIGHT = 5, 74022 }; 74023 74024 struct barrett_ctx_s; 74025 74026 typedef struct barrett_ctx_s *mpi_barrett_t; 74027 74028 struct gcry_mpi_point { 74029 MPI x; 74030 MPI y; 74031 MPI z; 74032 }; 74033 74034 typedef struct gcry_mpi_point *MPI_POINT; 74035 74036 enum gcry_mpi_ec_models { 74037 MPI_EC_WEIERSTRASS = 0, 74038 MPI_EC_MONTGOMERY = 1, 74039 MPI_EC_EDWARDS = 2, 74040 }; 74041 74042 enum ecc_dialects { 74043 ECC_DIALECT_STANDARD = 0, 74044 ECC_DIALECT_ED25519 = 1, 74045 ECC_DIALECT_SAFECURVE = 2, 74046 }; 74047 74048 struct mpi_ec_ctx { 74049 enum gcry_mpi_ec_models model; 74050 enum ecc_dialects dialect; 74051 int flags; 74052 unsigned int nbits; 74053 MPI p; 74054 MPI a; 74055 MPI b; 74056 MPI_POINT G; 74057 MPI n; 74058 unsigned int h; 74059 MPI_POINT Q; 74060 MPI d; 74061 const char *name; 74062 struct { 74063 struct { 74064 unsigned int a_is_pminus3: 1; 74065 unsigned int two_inv_p: 1; 74066 } valid; 74067 int a_is_pminus3; 74068 MPI two_inv_p; 74069 mpi_barrett_t p_barrett; 74070 MPI scratch[11]; 74071 } t; 74072 void (*addm)(MPI, MPI, MPI, struct mpi_ec_ctx *); 74073 void (*subm)(MPI, MPI, MPI, struct mpi_ec_ctx *); 74074 void (*mulm)(MPI, MPI, MPI, struct mpi_ec_ctx *); 74075 void (*pow2)(MPI, const MPI, struct mpi_ec_ctx *); 74076 void (*mul2)(MPI, MPI, struct mpi_ec_ctx *); 74077 }; 74078 74079 struct field_table { 74080 const char *p; 74081 void (*addm)(MPI, MPI, MPI, struct mpi_ec_ctx *); 74082 void (*subm)(MPI, MPI, MPI, struct mpi_ec_ctx *); 74083 void (*mulm)(MPI, MPI, MPI, struct mpi_ec_ctx *); 74084 void (*mul2)(MPI, MPI, struct mpi_ec_ctx *); 74085 void (*pow2)(MPI, const MPI, struct mpi_ec_ctx *); 74086 }; 74087 74088 enum gcry_mpi_format { 74089 GCRYMPI_FMT_NONE = 0, 74090 GCRYMPI_FMT_STD = 1, 74091 GCRYMPI_FMT_PGP = 2, 74092 GCRYMPI_FMT_SSH = 3, 74093 GCRYMPI_FMT_HEX = 4, 74094 GCRYMPI_FMT_USG = 5, 74095 GCRYMPI_FMT_OPAQUE = 8, 74096 }; 74097 74098 struct barrett_ctx_s___2; 74099 74100 typedef struct barrett_ctx_s___2 *mpi_barrett_t___2; 74101 74102 struct barrett_ctx_s___2 { 74103 MPI m; 74104 int m_copied; 74105 int k; 74106 MPI y; 74107 MPI r1; 74108 MPI r2; 74109 MPI r3; 74110 }; 74111 74112 struct karatsuba_ctx { 74113 struct karatsuba_ctx *next; 74114 mpi_ptr_t tspace; 74115 mpi_size_t tspace_size; 74116 mpi_ptr_t tp; 74117 mpi_size_t tp_size; 74118 }; 74119 74120 typedef long int mpi_limb_signed_t; 74121 74122 enum dim_tune_state { 74123 DIM_PARKING_ON_TOP = 0, 74124 DIM_PARKING_TIRED = 1, 74125 DIM_GOING_RIGHT = 2, 74126 DIM_GOING_LEFT = 3, 74127 }; 74128 74129 struct dim_cq_moder { 74130 u16 usec; 74131 u16 pkts; 74132 u16 comps; 74133 u8 cq_period_mode; 74134 }; 74135 74136 enum dim_cq_period_mode { 74137 DIM_CQ_PERIOD_MODE_START_FROM_EQE = 0, 74138 DIM_CQ_PERIOD_MODE_START_FROM_CQE = 1, 74139 DIM_CQ_PERIOD_NUM_MODES = 2, 74140 }; 74141 74142 enum dim_state { 74143 DIM_START_MEASURE = 0, 74144 DIM_MEASURE_IN_PROGRESS = 1, 74145 DIM_APPLY_NEW_PROFILE = 2, 74146 }; 74147 74148 enum dim_stats_state { 74149 DIM_STATS_WORSE = 0, 74150 DIM_STATS_SAME = 1, 74151 DIM_STATS_BETTER = 2, 74152 }; 74153 74154 enum dim_step_result { 74155 DIM_STEPPED = 0, 74156 DIM_TOO_TIRED = 1, 74157 DIM_ON_EDGE = 2, 74158 }; 74159 74160 enum pubkey_algo { 74161 PUBKEY_ALGO_RSA = 0, 74162 PUBKEY_ALGO_MAX = 1, 74163 }; 74164 74165 struct pubkey_hdr { 74166 uint8_t version; 74167 uint32_t timestamp; 74168 uint8_t algo; 74169 uint8_t nmpi; 74170 char mpi[0]; 74171 } __attribute__((packed)); 74172 74173 struct signature_hdr { 74174 uint8_t version; 74175 uint32_t timestamp; 74176 uint8_t algo; 74177 uint8_t hash; 74178 uint8_t keyid[8]; 74179 uint8_t nmpi; 74180 char mpi[0]; 74181 } __attribute__((packed)); 74182 74183 struct sg_pool { 74184 size_t size; 74185 char *name; 74186 struct kmem_cache *slab; 74187 mempool_t *pool; 74188 }; 74189 74190 enum { 74191 IRQ_POLL_F_SCHED = 0, 74192 IRQ_POLL_F_DISABLE = 1, 74193 }; 74194 74195 struct font_desc { 74196 int idx; 74197 const char *name; 74198 unsigned int width; 74199 unsigned int height; 74200 unsigned int charcount; 74201 const void *data; 74202 int pref; 74203 }; 74204 74205 struct font_data { 74206 unsigned int extra[4]; 74207 const unsigned char data[0]; 74208 }; 74209 74210 struct pldmfw_record { 74211 struct list_head entry; 74212 struct list_head descs; 74213 const u8 *version_string; 74214 u8 version_type; 74215 u8 version_len; 74216 u16 package_data_len; 74217 u32 device_update_flags; 74218 const u8 *package_data; 74219 long unsigned int *component_bitmap; 74220 u16 component_bitmap_len; 74221 }; 74222 74223 struct pldmfw_desc_tlv { 74224 struct list_head entry; 74225 const u8 *data; 74226 u16 type; 74227 u16 size; 74228 }; 74229 74230 struct pldmfw_component { 74231 struct list_head entry; 74232 u16 classification; 74233 u16 identifier; 74234 u16 options; 74235 u16 activation_method; 74236 u32 comparison_stamp; 74237 u32 component_size; 74238 const u8 *component_data; 74239 const u8 *version_string; 74240 u8 version_type; 74241 u8 version_len; 74242 u8 index; 74243 }; 74244 74245 struct pldmfw_ops; 74246 74247 struct pldmfw { 74248 const struct pldmfw_ops *ops; 74249 struct device *dev; 74250 }; 74251 74252 struct pldmfw_ops { 74253 bool (*match_record)(struct pldmfw *, struct pldmfw_record *); 74254 int (*send_package_data)(struct pldmfw *, const u8 *, u16); 74255 int (*send_component_table)(struct pldmfw *, struct pldmfw_component *, u8); 74256 int (*flash_component)(struct pldmfw *, struct pldmfw_component *); 74257 int (*finalize_update)(struct pldmfw *); 74258 }; 74259 74260 struct __pldm_timestamp { 74261 u8 b[13]; 74262 }; 74263 74264 struct __pldm_header { 74265 uuid_t id; 74266 u8 revision; 74267 __le16 size; 74268 struct __pldm_timestamp release_date; 74269 __le16 component_bitmap_len; 74270 u8 version_type; 74271 u8 version_len; 74272 u8 version_string[0]; 74273 } __attribute__((packed)); 74274 74275 struct __pldmfw_record_info { 74276 __le16 record_len; 74277 u8 descriptor_count; 74278 __le32 device_update_flags; 74279 u8 version_type; 74280 u8 version_len; 74281 __le16 package_data_len; 74282 u8 variable_record_data[0]; 74283 } __attribute__((packed)); 74284 74285 struct __pldmfw_desc_tlv { 74286 __le16 type; 74287 __le16 size; 74288 u8 data[0]; 74289 }; 74290 74291 struct __pldmfw_record_area { 74292 u8 record_count; 74293 u8 records[0]; 74294 }; 74295 74296 struct __pldmfw_component_info { 74297 __le16 classification; 74298 __le16 identifier; 74299 __le32 comparison_stamp; 74300 __le16 options; 74301 __le16 activation_method; 74302 __le32 location_offset; 74303 __le32 size; 74304 u8 version_type; 74305 u8 version_len; 74306 u8 version_string[0]; 74307 } __attribute__((packed)); 74308 74309 struct __pldmfw_component_area { 74310 __le16 component_image_count; 74311 u8 components[0]; 74312 }; 74313 74314 struct pldmfw_priv { 74315 struct pldmfw *context; 74316 const struct firmware *fw; 74317 size_t offset; 74318 struct list_head records; 74319 struct list_head components; 74320 const struct __pldm_header *header; 74321 u16 total_header_size; 74322 u16 component_bitmap_len; 74323 u16 bitmap_size; 74324 u16 component_count; 74325 const u8 *component_start; 74326 const u8 *record_start; 74327 u8 record_count; 74328 u32 header_crc; 74329 struct pldmfw_record *matching_record; 74330 }; 74331 74332 struct pldm_pci_record_id { 74333 int vendor; 74334 int device; 74335 int subsystem_vendor; 74336 int subsystem_device; 74337 }; 74338 74339 struct msr { 74340 union { 74341 struct { 74342 u32 l; 74343 u32 h; 74344 }; 74345 u64 q; 74346 }; 74347 }; 74348 74349 struct msr_info { 74350 u32 msr_no; 74351 struct msr reg; 74352 struct msr *msrs; 74353 int err; 74354 }; 74355 74356 struct msr_regs_info { 74357 u32 *regs; 74358 int err; 74359 }; 74360 74361 struct msr_info_completion { 74362 struct msr_info msr; 74363 struct completion done; 74364 }; 74365 74366 struct trace_event_raw_msr_trace_class { 74367 struct trace_entry ent; 74368 unsigned int msr; 74369 u64 val; 74370 int failed; 74371 char __data[0]; 74372 }; 74373 74374 struct trace_event_data_offsets_msr_trace_class {}; 74375 74376 typedef void (*btf_trace_read_msr)(void *, unsigned int, u64, int); 74377 74378 typedef void (*btf_trace_write_msr)(void *, unsigned int, u64, int); 74379 74380 typedef void (*btf_trace_rdpmc)(void *, unsigned int, u64, int); 74381 74382 struct warn_args___2; 74383 74384 struct compress_format { 74385 unsigned char magic[2]; 74386 const char *name; 74387 decompress_fn decompressor; 74388 }; 74389 74390 struct group_data { 74391 int limit[21]; 74392 int base[20]; 74393 int permute[258]; 74394 int minLen; 74395 int maxLen; 74396 }; 74397 74398 struct bunzip_data { 74399 int writeCopies; 74400 int writePos; 74401 int writeRunCountdown; 74402 int writeCount; 74403 int writeCurrent; 74404 long int (*fill)(void *, long unsigned int); 74405 long int inbufCount; 74406 long int inbufPos; 74407 unsigned char *inbuf; 74408 unsigned int inbufBitCount; 74409 unsigned int inbufBits; 74410 unsigned int crc32Table[256]; 74411 unsigned int headerCRC; 74412 unsigned int totalCRC; 74413 unsigned int writeCRC; 74414 unsigned int *dbuf; 74415 unsigned int dbufSize; 74416 unsigned char selectors[32768]; 74417 struct group_data groups[6]; 74418 int io_error; 74419 int byteCount[256]; 74420 unsigned char symToByte[256]; 74421 unsigned char mtfSymbol[256]; 74422 }; 74423 74424 struct rc { 74425 long int (*fill)(void *, long unsigned int); 74426 uint8_t *ptr; 74427 uint8_t *buffer; 74428 uint8_t *buffer_end; 74429 long int buffer_size; 74430 uint32_t code; 74431 uint32_t range; 74432 uint32_t bound; 74433 void (*error)(char *); 74434 }; 74435 74436 struct lzma_header { 74437 uint8_t pos; 74438 uint32_t dict_size; 74439 uint64_t dst_size; 74440 } __attribute__((packed)); 74441 74442 struct writer { 74443 uint8_t *buffer; 74444 uint8_t previous_byte; 74445 size_t buffer_pos; 74446 int bufsize; 74447 size_t global_pos; 74448 long int (*flush)(void *, long unsigned int); 74449 struct lzma_header *header; 74450 }; 74451 74452 struct cstate { 74453 int state; 74454 uint32_t rep0; 74455 uint32_t rep1; 74456 uint32_t rep2; 74457 uint32_t rep3; 74458 }; 74459 74460 struct ZSTD_DCtx_s___2; 74461 74462 typedef struct ZSTD_DCtx_s___2 ZSTD_DCtx___2; 74463 74464 enum cpio_fields { 74465 C_MAGIC = 0, 74466 C_INO = 1, 74467 C_MODE = 2, 74468 C_UID = 3, 74469 C_GID = 4, 74470 C_NLINK = 5, 74471 C_MTIME = 6, 74472 C_FILESIZE = 7, 74473 C_MAJ = 8, 74474 C_MIN = 9, 74475 C_RMAJ = 10, 74476 C_RMIN = 11, 74477 C_NAMESIZE = 12, 74478 C_CHKSUM = 13, 74479 C_NFIELDS = 14, 74480 }; 74481 74482 struct fprop_local_single { 74483 long unsigned int events; 74484 unsigned int period; 74485 raw_spinlock_t lock; 74486 }; 74487 74488 struct ida_bitmap { 74489 long unsigned int bitmap[16]; 74490 }; 74491 74492 struct klist_waiter { 74493 struct list_head list; 74494 struct klist_node *node; 74495 struct task_struct *process; 74496 int woken; 74497 }; 74498 74499 struct uevent_sock { 74500 struct list_head list; 74501 struct sock *sk; 74502 }; 74503 74504 enum { 74505 LOGIC_PIO_INDIRECT = 0, 74506 LOGIC_PIO_CPU_MMIO = 1, 74507 }; 74508 74509 struct logic_pio_host_ops; 74510 74511 struct logic_pio_hwaddr { 74512 struct list_head list; 74513 struct fwnode_handle *fwnode; 74514 resource_size_t hw_start; 74515 resource_size_t io_start; 74516 resource_size_t size; 74517 long unsigned int flags; 74518 void *hostdata; 74519 const struct logic_pio_host_ops *ops; 74520 }; 74521 74522 struct logic_pio_host_ops { 74523 u32 (*in)(void *, long unsigned int, size_t); 74524 void (*out)(void *, long unsigned int, u32, size_t); 74525 u32 (*ins)(void *, long unsigned int, void *, size_t, unsigned int); 74526 void (*outs)(void *, long unsigned int, const void *, size_t, unsigned int); 74527 }; 74528 74529 typedef struct { 74530 long unsigned int key[2]; 74531 } hsiphash_key_t; 74532 74533 struct clk_core; 74534 74535 struct clk { 74536 struct clk_core *core; 74537 struct device *dev; 74538 const char *dev_id; 74539 const char *con_id; 74540 long unsigned int min_rate; 74541 long unsigned int max_rate; 74542 unsigned int exclusive_count; 74543 struct hlist_node clks_node; 74544 }; 74545 74546 enum format_type { 74547 FORMAT_TYPE_NONE = 0, 74548 FORMAT_TYPE_WIDTH = 1, 74549 FORMAT_TYPE_PRECISION = 2, 74550 FORMAT_TYPE_CHAR = 3, 74551 FORMAT_TYPE_STR = 4, 74552 FORMAT_TYPE_PTR = 5, 74553 FORMAT_TYPE_PERCENT_CHAR = 6, 74554 FORMAT_TYPE_INVALID = 7, 74555 FORMAT_TYPE_LONG_LONG = 8, 74556 FORMAT_TYPE_ULONG = 9, 74557 FORMAT_TYPE_LONG = 10, 74558 FORMAT_TYPE_UBYTE = 11, 74559 FORMAT_TYPE_BYTE = 12, 74560 FORMAT_TYPE_USHORT = 13, 74561 FORMAT_TYPE_SHORT = 14, 74562 FORMAT_TYPE_UINT = 15, 74563 FORMAT_TYPE_INT = 16, 74564 FORMAT_TYPE_SIZE_T = 17, 74565 FORMAT_TYPE_PTRDIFF = 18, 74566 }; 74567 74568 struct printf_spec { 74569 unsigned int type: 8; 74570 int field_width: 24; 74571 unsigned int flags: 8; 74572 unsigned int base: 8; 74573 int precision: 16; 74574 }; 74575 74576 struct minmax_sample { 74577 u32 t; 74578 u32 v; 74579 }; 74580 74581 struct minmax { 74582 struct minmax_sample s[3]; 74583 }; 74584 74585 struct xa_limit { 74586 u32 max; 74587 u32 min; 74588 }; 74589 74590 enum { 74591 st_wordstart = 0, 74592 st_wordcmp = 1, 74593 st_wordskip = 2, 74594 st_bufcpy = 3, 74595 }; 74596 74597 enum { 74598 st_wordstart___2 = 0, 74599 st_wordcmp___2 = 1, 74600 st_wordskip___2 = 2, 74601 }; 74602 74603 struct in6_addr___2; 74604 74605 enum reg_type { 74606 REG_TYPE_RM = 0, 74607 REG_TYPE_REG = 1, 74608 REG_TYPE_INDEX = 2, 74609 REG_TYPE_BASE = 3, 74610 }; 74611 74612 enum device_link_state { 74613 DL_STATE_NONE = 4294967295, 74614 DL_STATE_DORMANT = 0, 74615 DL_STATE_AVAILABLE = 1, 74616 DL_STATE_CONSUMER_PROBE = 2, 74617 DL_STATE_ACTIVE = 3, 74618 DL_STATE_SUPPLIER_UNBIND = 4, 74619 }; 74620 74621 struct device_link { 74622 struct device *supplier; 74623 struct list_head s_node; 74624 struct device *consumer; 74625 struct list_head c_node; 74626 struct device link_dev; 74627 enum device_link_state status; 74628 u32 flags; 74629 refcount_t rpm_active; 74630 struct kref kref; 74631 struct callback_head callback_head; 74632 bool supplier_preactivated; 74633 }; 74634 74635 struct phy_configure_opts_dp { 74636 unsigned int link_rate; 74637 unsigned int lanes; 74638 unsigned int voltage[4]; 74639 unsigned int pre[4]; 74640 u8 ssc: 1; 74641 u8 set_rate: 1; 74642 u8 set_lanes: 1; 74643 u8 set_voltages: 1; 74644 }; 74645 74646 struct phy_configure_opts_mipi_dphy { 74647 unsigned int clk_miss; 74648 unsigned int clk_post; 74649 unsigned int clk_pre; 74650 unsigned int clk_prepare; 74651 unsigned int clk_settle; 74652 unsigned int clk_term_en; 74653 unsigned int clk_trail; 74654 unsigned int clk_zero; 74655 unsigned int d_term_en; 74656 unsigned int eot; 74657 unsigned int hs_exit; 74658 unsigned int hs_prepare; 74659 unsigned int hs_settle; 74660 unsigned int hs_skip; 74661 unsigned int hs_trail; 74662 unsigned int hs_zero; 74663 unsigned int init; 74664 unsigned int lpx; 74665 unsigned int ta_get; 74666 unsigned int ta_go; 74667 unsigned int ta_sure; 74668 unsigned int wakeup; 74669 long unsigned int hs_clk_rate; 74670 long unsigned int lp_clk_rate; 74671 unsigned char lanes; 74672 }; 74673 74674 enum phy_mode { 74675 PHY_MODE_INVALID = 0, 74676 PHY_MODE_USB_HOST = 1, 74677 PHY_MODE_USB_HOST_LS = 2, 74678 PHY_MODE_USB_HOST_FS = 3, 74679 PHY_MODE_USB_HOST_HS = 4, 74680 PHY_MODE_USB_HOST_SS = 5, 74681 PHY_MODE_USB_DEVICE = 6, 74682 PHY_MODE_USB_DEVICE_LS = 7, 74683 PHY_MODE_USB_DEVICE_FS = 8, 74684 PHY_MODE_USB_DEVICE_HS = 9, 74685 PHY_MODE_USB_DEVICE_SS = 10, 74686 PHY_MODE_USB_OTG = 11, 74687 PHY_MODE_UFS_HS_A = 12, 74688 PHY_MODE_UFS_HS_B = 13, 74689 PHY_MODE_PCIE = 14, 74690 PHY_MODE_ETHERNET = 15, 74691 PHY_MODE_MIPI_DPHY = 16, 74692 PHY_MODE_SATA = 17, 74693 PHY_MODE_LVDS = 18, 74694 PHY_MODE_DP = 19, 74695 }; 74696 74697 union phy_configure_opts { 74698 struct phy_configure_opts_mipi_dphy mipi_dphy; 74699 struct phy_configure_opts_dp dp; 74700 }; 74701 74702 struct phy; 74703 74704 struct phy_ops { 74705 int (*init)(struct phy *); 74706 int (*exit)(struct phy *); 74707 int (*power_on)(struct phy *); 74708 int (*power_off)(struct phy *); 74709 int (*set_mode)(struct phy *, enum phy_mode, int); 74710 int (*configure)(struct phy *, union phy_configure_opts *); 74711 int (*validate)(struct phy *, enum phy_mode, int, union phy_configure_opts *); 74712 int (*reset)(struct phy *); 74713 int (*calibrate)(struct phy *); 74714 void (*release)(struct phy *); 74715 struct module *owner; 74716 }; 74717 74718 struct phy_attrs { 74719 u32 bus_width; 74720 u32 max_link_rate; 74721 enum phy_mode mode; 74722 }; 74723 74724 struct regulator; 74725 74726 struct phy { 74727 struct device dev; 74728 int id; 74729 const struct phy_ops *ops; 74730 struct mutex mutex; 74731 int init_count; 74732 int power_count; 74733 struct phy_attrs attrs; 74734 struct regulator *pwr; 74735 }; 74736 74737 struct phy_provider { 74738 struct device *dev; 74739 struct device_node *children; 74740 struct module *owner; 74741 struct list_head list; 74742 struct phy * (*of_xlate)(struct device *, struct of_phandle_args *); 74743 }; 74744 74745 struct phy_lookup { 74746 struct list_head node; 74747 const char *dev_id; 74748 const char *con_id; 74749 struct phy *phy; 74750 }; 74751 74752 struct pinctrl; 74753 74754 struct pinctrl_state; 74755 74756 struct dev_pin_info { 74757 struct pinctrl *p; 74758 struct pinctrl_state *default_state; 74759 struct pinctrl_state *init_state; 74760 struct pinctrl_state *sleep_state; 74761 struct pinctrl_state *idle_state; 74762 }; 74763 74764 struct pinctrl { 74765 struct list_head node; 74766 struct device *dev; 74767 struct list_head states; 74768 struct pinctrl_state *state; 74769 struct list_head dt_maps; 74770 struct kref users; 74771 }; 74772 74773 struct pinctrl_state { 74774 struct list_head node; 74775 const char *name; 74776 struct list_head settings; 74777 }; 74778 74779 struct pinctrl_pin_desc { 74780 unsigned int number; 74781 const char *name; 74782 void *drv_data; 74783 }; 74784 74785 struct gpio_chip; 74786 74787 struct pinctrl_gpio_range { 74788 struct list_head node; 74789 const char *name; 74790 unsigned int id; 74791 unsigned int base; 74792 unsigned int pin_base; 74793 unsigned int npins; 74794 const unsigned int *pins; 74795 struct gpio_chip *gc; 74796 }; 74797 74798 struct gpio_irq_chip { 74799 struct irq_chip *chip; 74800 struct irq_domain *domain; 74801 const struct irq_domain_ops *domain_ops; 74802 struct fwnode_handle *fwnode; 74803 struct irq_domain *parent_domain; 74804 int (*child_to_parent_hwirq)(struct gpio_chip *, unsigned int, unsigned int, unsigned int *, unsigned int *); 74805 void * (*populate_parent_alloc_arg)(struct gpio_chip *, unsigned int, unsigned int); 74806 unsigned int (*child_offset_to_irq)(struct gpio_chip *, unsigned int); 74807 struct irq_domain_ops child_irq_domain_ops; 74808 irq_flow_handler_t handler; 74809 unsigned int default_type; 74810 struct lock_class_key *lock_key; 74811 struct lock_class_key *request_key; 74812 irq_flow_handler_t parent_handler; 74813 void *parent_handler_data; 74814 unsigned int num_parents; 74815 unsigned int *parents; 74816 unsigned int *map; 74817 bool threaded; 74818 int (*init_hw)(struct gpio_chip *); 74819 void (*init_valid_mask)(struct gpio_chip *, long unsigned int *, unsigned int); 74820 long unsigned int *valid_mask; 74821 unsigned int first; 74822 void (*irq_enable)(struct irq_data *); 74823 void (*irq_disable)(struct irq_data *); 74824 void (*irq_unmask)(struct irq_data *); 74825 void (*irq_mask)(struct irq_data *); 74826 }; 74827 74828 struct gpio_device; 74829 74830 struct gpio_chip { 74831 const char *label; 74832 struct gpio_device *gpiodev; 74833 struct device *parent; 74834 struct module *owner; 74835 int (*request)(struct gpio_chip *, unsigned int); 74836 void (*free)(struct gpio_chip *, unsigned int); 74837 int (*get_direction)(struct gpio_chip *, unsigned int); 74838 int (*direction_input)(struct gpio_chip *, unsigned int); 74839 int (*direction_output)(struct gpio_chip *, unsigned int, int); 74840 int (*get)(struct gpio_chip *, unsigned int); 74841 int (*get_multiple)(struct gpio_chip *, long unsigned int *, long unsigned int *); 74842 void (*set)(struct gpio_chip *, unsigned int, int); 74843 void (*set_multiple)(struct gpio_chip *, long unsigned int *, long unsigned int *); 74844 int (*set_config)(struct gpio_chip *, unsigned int, long unsigned int); 74845 int (*to_irq)(struct gpio_chip *, unsigned int); 74846 void (*dbg_show)(struct seq_file *, struct gpio_chip *); 74847 int (*init_valid_mask)(struct gpio_chip *, long unsigned int *, unsigned int); 74848 int (*add_pin_ranges)(struct gpio_chip *); 74849 int base; 74850 u16 ngpio; 74851 const char * const *names; 74852 bool can_sleep; 74853 long unsigned int (*read_reg)(void *); 74854 void (*write_reg)(void *, long unsigned int); 74855 bool be_bits; 74856 void *reg_dat; 74857 void *reg_set; 74858 void *reg_clr; 74859 void *reg_dir_out; 74860 void *reg_dir_in; 74861 bool bgpio_dir_unreadable; 74862 int bgpio_bits; 74863 spinlock_t bgpio_lock; 74864 long unsigned int bgpio_data; 74865 long unsigned int bgpio_dir; 74866 struct gpio_irq_chip irq; 74867 long unsigned int *valid_mask; 74868 }; 74869 74870 struct pinctrl_dev; 74871 74872 struct pinctrl_map; 74873 74874 struct pinctrl_ops { 74875 int (*get_groups_count)(struct pinctrl_dev *); 74876 const char * (*get_group_name)(struct pinctrl_dev *, unsigned int); 74877 int (*get_group_pins)(struct pinctrl_dev *, unsigned int, const unsigned int **, unsigned int *); 74878 void (*pin_dbg_show)(struct pinctrl_dev *, struct seq_file *, unsigned int); 74879 int (*dt_node_to_map)(struct pinctrl_dev *, struct device_node *, struct pinctrl_map **, unsigned int *); 74880 void (*dt_free_map)(struct pinctrl_dev *, struct pinctrl_map *, unsigned int); 74881 }; 74882 74883 struct pinctrl_desc; 74884 74885 struct pinctrl_dev { 74886 struct list_head node; 74887 struct pinctrl_desc *desc; 74888 struct xarray pin_desc_tree; 74889 struct list_head gpio_ranges; 74890 struct device *dev; 74891 struct module *owner; 74892 void *driver_data; 74893 struct pinctrl *p; 74894 struct pinctrl_state *hog_default; 74895 struct pinctrl_state *hog_sleep; 74896 struct mutex mutex; 74897 struct dentry *device_root; 74898 }; 74899 74900 enum pinctrl_map_type { 74901 PIN_MAP_TYPE_INVALID = 0, 74902 PIN_MAP_TYPE_DUMMY_STATE = 1, 74903 PIN_MAP_TYPE_MUX_GROUP = 2, 74904 PIN_MAP_TYPE_CONFIGS_PIN = 3, 74905 PIN_MAP_TYPE_CONFIGS_GROUP = 4, 74906 }; 74907 74908 struct pinctrl_map_mux { 74909 const char *group; 74910 const char *function; 74911 }; 74912 74913 struct pinctrl_map_configs { 74914 const char *group_or_pin; 74915 long unsigned int *configs; 74916 unsigned int num_configs; 74917 }; 74918 74919 struct pinctrl_map { 74920 const char *dev_name; 74921 const char *name; 74922 enum pinctrl_map_type type; 74923 const char *ctrl_dev_name; 74924 union { 74925 struct pinctrl_map_mux mux; 74926 struct pinctrl_map_configs configs; 74927 } data; 74928 }; 74929 74930 struct pinmux_ops; 74931 74932 struct pinconf_ops; 74933 74934 struct pinconf_generic_params; 74935 74936 struct pin_config_item; 74937 74938 struct pinctrl_desc { 74939 const char *name; 74940 const struct pinctrl_pin_desc *pins; 74941 unsigned int npins; 74942 const struct pinctrl_ops *pctlops; 74943 const struct pinmux_ops *pmxops; 74944 const struct pinconf_ops *confops; 74945 struct module *owner; 74946 unsigned int num_custom_params; 74947 const struct pinconf_generic_params *custom_params; 74948 const struct pin_config_item *custom_conf_items; 74949 bool link_consumers; 74950 }; 74951 74952 struct pinmux_ops { 74953 int (*request)(struct pinctrl_dev *, unsigned int); 74954 int (*free)(struct pinctrl_dev *, unsigned int); 74955 int (*get_functions_count)(struct pinctrl_dev *); 74956 const char * (*get_function_name)(struct pinctrl_dev *, unsigned int); 74957 int (*get_function_groups)(struct pinctrl_dev *, unsigned int, const char * const **, unsigned int *); 74958 int (*set_mux)(struct pinctrl_dev *, unsigned int, unsigned int); 74959 int (*gpio_request_enable)(struct pinctrl_dev *, struct pinctrl_gpio_range *, unsigned int); 74960 void (*gpio_disable_free)(struct pinctrl_dev *, struct pinctrl_gpio_range *, unsigned int); 74961 int (*gpio_set_direction)(struct pinctrl_dev *, struct pinctrl_gpio_range *, unsigned int, bool); 74962 bool strict; 74963 }; 74964 74965 struct pinconf_ops { 74966 bool is_generic; 74967 int (*pin_config_get)(struct pinctrl_dev *, unsigned int, long unsigned int *); 74968 int (*pin_config_set)(struct pinctrl_dev *, unsigned int, long unsigned int *, unsigned int); 74969 int (*pin_config_group_get)(struct pinctrl_dev *, unsigned int, long unsigned int *); 74970 int (*pin_config_group_set)(struct pinctrl_dev *, unsigned int, long unsigned int *, unsigned int); 74971 void (*pin_config_dbg_show)(struct pinctrl_dev *, struct seq_file *, unsigned int); 74972 void (*pin_config_group_dbg_show)(struct pinctrl_dev *, struct seq_file *, unsigned int); 74973 void (*pin_config_config_dbg_show)(struct pinctrl_dev *, struct seq_file *, long unsigned int); 74974 }; 74975 74976 enum pin_config_param { 74977 PIN_CONFIG_BIAS_BUS_HOLD = 0, 74978 PIN_CONFIG_BIAS_DISABLE = 1, 74979 PIN_CONFIG_BIAS_HIGH_IMPEDANCE = 2, 74980 PIN_CONFIG_BIAS_PULL_DOWN = 3, 74981 PIN_CONFIG_BIAS_PULL_PIN_DEFAULT = 4, 74982 PIN_CONFIG_BIAS_PULL_UP = 5, 74983 PIN_CONFIG_DRIVE_OPEN_DRAIN = 6, 74984 PIN_CONFIG_DRIVE_OPEN_SOURCE = 7, 74985 PIN_CONFIG_DRIVE_PUSH_PULL = 8, 74986 PIN_CONFIG_DRIVE_STRENGTH = 9, 74987 PIN_CONFIG_DRIVE_STRENGTH_UA = 10, 74988 PIN_CONFIG_INPUT_DEBOUNCE = 11, 74989 PIN_CONFIG_INPUT_ENABLE = 12, 74990 PIN_CONFIG_INPUT_SCHMITT = 13, 74991 PIN_CONFIG_INPUT_SCHMITT_ENABLE = 14, 74992 PIN_CONFIG_LOW_POWER_MODE = 15, 74993 PIN_CONFIG_OUTPUT_ENABLE = 16, 74994 PIN_CONFIG_OUTPUT = 17, 74995 PIN_CONFIG_POWER_SOURCE = 18, 74996 PIN_CONFIG_SLEEP_HARDWARE_STATE = 19, 74997 PIN_CONFIG_SLEW_RATE = 20, 74998 PIN_CONFIG_SKEW_DELAY = 21, 74999 PIN_CONFIG_PERSIST_STATE = 22, 75000 PIN_CONFIG_END = 127, 75001 PIN_CONFIG_MAX = 255, 75002 }; 75003 75004 struct pinconf_generic_params { 75005 const char * const property; 75006 enum pin_config_param param; 75007 u32 default_value; 75008 }; 75009 75010 struct pin_config_item { 75011 const enum pin_config_param param; 75012 const char * const display; 75013 const char * const format; 75014 bool has_arg; 75015 }; 75016 75017 struct gpio_desc; 75018 75019 struct gpio_device { 75020 int id; 75021 struct device dev; 75022 struct cdev chrdev; 75023 struct device *mockdev; 75024 struct module *owner; 75025 struct gpio_chip *chip; 75026 struct gpio_desc *descs; 75027 int base; 75028 u16 ngpio; 75029 const char *label; 75030 void *data; 75031 struct list_head list; 75032 struct blocking_notifier_head notifier; 75033 struct list_head pin_ranges; 75034 }; 75035 75036 struct gpio_desc { 75037 struct gpio_device *gdev; 75038 long unsigned int flags; 75039 const char *label; 75040 const char *name; 75041 unsigned int debounce_period_us; 75042 }; 75043 75044 struct pinctrl_setting_mux { 75045 unsigned int group; 75046 unsigned int func; 75047 }; 75048 75049 struct pinctrl_setting_configs { 75050 unsigned int group_or_pin; 75051 long unsigned int *configs; 75052 unsigned int num_configs; 75053 }; 75054 75055 struct pinctrl_setting { 75056 struct list_head node; 75057 enum pinctrl_map_type type; 75058 struct pinctrl_dev *pctldev; 75059 const char *dev_name; 75060 union { 75061 struct pinctrl_setting_mux mux; 75062 struct pinctrl_setting_configs configs; 75063 } data; 75064 }; 75065 75066 struct pin_desc { 75067 struct pinctrl_dev *pctldev; 75068 const char *name; 75069 bool dynamic_name; 75070 void *drv_data; 75071 unsigned int mux_usecount; 75072 const char *mux_owner; 75073 const struct pinctrl_setting_mux *mux_setting; 75074 const char *gpio_owner; 75075 }; 75076 75077 struct pinctrl_maps { 75078 struct list_head node; 75079 const struct pinctrl_map *maps; 75080 unsigned int num_maps; 75081 }; 75082 75083 struct pctldev; 75084 75085 struct intel_pingroup { 75086 const char *name; 75087 const unsigned int *pins; 75088 size_t npins; 75089 short unsigned int mode; 75090 const unsigned int *modes; 75091 }; 75092 75093 struct intel_function { 75094 const char *name; 75095 const char * const *groups; 75096 size_t ngroups; 75097 }; 75098 75099 struct intel_padgroup { 75100 unsigned int reg_num; 75101 unsigned int base; 75102 unsigned int size; 75103 int gpio_base; 75104 unsigned int padown_num; 75105 }; 75106 75107 struct intel_community { 75108 unsigned int barno; 75109 unsigned int padown_offset; 75110 unsigned int padcfglock_offset; 75111 unsigned int hostown_offset; 75112 unsigned int is_offset; 75113 unsigned int ie_offset; 75114 unsigned int features; 75115 unsigned int pin_base; 75116 size_t npins; 75117 unsigned int gpp_size; 75118 unsigned int gpp_num_padown_regs; 75119 const struct intel_padgroup *gpps; 75120 size_t ngpps; 75121 const unsigned int *pad_map; 75122 short unsigned int nirqs; 75123 short unsigned int acpi_space_id; 75124 void *regs; 75125 void *pad_regs; 75126 }; 75127 75128 struct intel_pinctrl_soc_data { 75129 const char *uid; 75130 const struct pinctrl_pin_desc *pins; 75131 size_t npins; 75132 const struct intel_pingroup *groups; 75133 size_t ngroups; 75134 const struct intel_function *functions; 75135 size_t nfunctions; 75136 const struct intel_community *communities; 75137 size_t ncommunities; 75138 }; 75139 75140 struct intel_community_context; 75141 75142 struct intel_pad_context; 75143 75144 struct intel_pinctrl_context { 75145 struct intel_pad_context *pads; 75146 struct intel_community_context *communities; 75147 }; 75148 75149 struct intel_pad_context { 75150 u32 conf0; 75151 u32 val; 75152 }; 75153 75154 struct intel_pinctrl { 75155 struct device *dev; 75156 raw_spinlock_t lock; 75157 struct pinctrl_desc pctldesc; 75158 struct pinctrl_dev *pctldev; 75159 struct gpio_chip chip; 75160 struct irq_chip irqchip; 75161 const struct intel_pinctrl_soc_data *soc; 75162 struct intel_community *communities; 75163 size_t ncommunities; 75164 struct intel_pinctrl_context context; 75165 int irq; 75166 }; 75167 75168 typedef acpi_status (*acpi_adr_space_handler)(u32, acpi_physical_address, u32, u64 *, void *, void *); 75169 75170 typedef acpi_status (*acpi_adr_space_setup)(acpi_handle, u32, void *, void **); 75171 75172 struct intel_pad_context___2; 75173 75174 struct intel_community_context___2; 75175 75176 struct intel_pinctrl_context___2 { 75177 struct intel_pad_context___2 *pads; 75178 struct intel_community_context___2 *communities; 75179 }; 75180 75181 struct intel_pad_context___2 { 75182 u32 padctrl0; 75183 u32 padctrl1; 75184 }; 75185 75186 struct intel_community_context___2 { 75187 unsigned int intr_lines[16]; 75188 u32 saved_intmask; 75189 }; 75190 75191 struct intel_pinctrl___2 { 75192 struct device *dev; 75193 raw_spinlock_t lock; 75194 struct pinctrl_desc pctldesc; 75195 struct pinctrl_dev *pctldev; 75196 struct gpio_chip chip; 75197 struct irq_chip irqchip; 75198 const struct intel_pinctrl_soc_data *soc; 75199 struct intel_community *communities; 75200 size_t ncommunities; 75201 struct intel_pinctrl_context___2 context; 75202 int irq; 75203 }; 75204 75205 enum { 75206 INTEL_GPIO_BASE_ZERO = 4294967294, 75207 INTEL_GPIO_BASE_NOMAP = 4294967295, 75208 INTEL_GPIO_BASE_MATCH = 0, 75209 }; 75210 75211 struct intel_pad_context___3; 75212 75213 struct intel_community_context___3; 75214 75215 struct intel_pinctrl_context___3 { 75216 struct intel_pad_context___3 *pads; 75217 struct intel_community_context___3 *communities; 75218 }; 75219 75220 struct intel_pad_context___3 { 75221 u32 padcfg0; 75222 u32 padcfg1; 75223 u32 padcfg2; 75224 }; 75225 75226 struct intel_community_context___3 { 75227 u32 *intmask; 75228 u32 *hostown; 75229 }; 75230 75231 struct intel_pinctrl___3 { 75232 struct device *dev; 75233 raw_spinlock_t lock; 75234 struct pinctrl_desc pctldesc; 75235 struct pinctrl_dev *pctldev; 75236 struct gpio_chip chip; 75237 struct irq_chip irqchip; 75238 const struct intel_pinctrl_soc_data *soc; 75239 struct intel_community *communities; 75240 size_t ncommunities; 75241 struct intel_pinctrl_context___3 context; 75242 int irq; 75243 }; 75244 75245 enum { 75246 PAD_UNLOCKED = 0, 75247 PAD_LOCKED = 1, 75248 PAD_LOCKED_TX = 2, 75249 PAD_LOCKED_FULL = 3, 75250 }; 75251 75252 struct gpio_pin_range { 75253 struct list_head node; 75254 struct pinctrl_dev *pctldev; 75255 struct pinctrl_gpio_range range; 75256 }; 75257 75258 struct gpio_array; 75259 75260 struct gpio_descs { 75261 struct gpio_array *info; 75262 unsigned int ndescs; 75263 struct gpio_desc *desc[0]; 75264 }; 75265 75266 struct gpio_array { 75267 struct gpio_desc **desc; 75268 unsigned int size; 75269 struct gpio_chip *chip; 75270 long unsigned int *get_mask; 75271 long unsigned int *set_mask; 75272 long unsigned int invert_mask[0]; 75273 }; 75274 75275 enum gpiod_flags { 75276 GPIOD_ASIS = 0, 75277 GPIOD_IN = 1, 75278 GPIOD_OUT_LOW = 3, 75279 GPIOD_OUT_HIGH = 7, 75280 GPIOD_OUT_LOW_OPEN_DRAIN = 11, 75281 GPIOD_OUT_HIGH_OPEN_DRAIN = 15, 75282 }; 75283 75284 enum gpio_lookup_flags { 75285 GPIO_ACTIVE_HIGH = 0, 75286 GPIO_ACTIVE_LOW = 1, 75287 GPIO_OPEN_DRAIN = 2, 75288 GPIO_OPEN_SOURCE = 4, 75289 GPIO_PERSISTENT = 0, 75290 GPIO_TRANSITORY = 8, 75291 GPIO_PULL_UP = 16, 75292 GPIO_PULL_DOWN = 32, 75293 GPIO_LOOKUP_FLAGS_DEFAULT = 0, 75294 }; 75295 75296 struct gpiod_lookup { 75297 const char *key; 75298 u16 chip_hwnum; 75299 const char *con_id; 75300 unsigned int idx; 75301 long unsigned int flags; 75302 }; 75303 75304 struct gpiod_lookup_table { 75305 struct list_head list; 75306 const char *dev_id; 75307 struct gpiod_lookup table[0]; 75308 }; 75309 75310 struct gpiod_hog { 75311 struct list_head list; 75312 const char *chip_label; 75313 u16 chip_hwnum; 75314 const char *line_name; 75315 long unsigned int lflags; 75316 int dflags; 75317 }; 75318 75319 enum { 75320 GPIOLINE_CHANGED_REQUESTED = 1, 75321 GPIOLINE_CHANGED_RELEASED = 2, 75322 GPIOLINE_CHANGED_CONFIG = 3, 75323 }; 75324 75325 struct acpi_gpio_info { 75326 struct acpi_device *adev; 75327 enum gpiod_flags flags; 75328 bool gpioint; 75329 int pin_config; 75330 int polarity; 75331 int triggering; 75332 unsigned int debounce; 75333 unsigned int quirks; 75334 }; 75335 75336 struct trace_event_raw_gpio_direction { 75337 struct trace_entry ent; 75338 unsigned int gpio; 75339 int in; 75340 int err; 75341 char __data[0]; 75342 }; 75343 75344 struct trace_event_raw_gpio_value { 75345 struct trace_entry ent; 75346 unsigned int gpio; 75347 int get; 75348 int value; 75349 char __data[0]; 75350 }; 75351 75352 struct trace_event_data_offsets_gpio_direction {}; 75353 75354 struct trace_event_data_offsets_gpio_value {}; 75355 75356 typedef void (*btf_trace_gpio_direction)(void *, unsigned int, int, int); 75357 75358 typedef void (*btf_trace_gpio_value)(void *, unsigned int, int, int); 75359 75360 struct devres; 75361 75362 struct gpio { 75363 unsigned int gpio; 75364 long unsigned int flags; 75365 const char *label; 75366 }; 75367 75368 struct gpiochip_info { 75369 char name[32]; 75370 char label[32]; 75371 __u32 lines; 75372 }; 75373 75374 enum gpio_v2_line_flag { 75375 GPIO_V2_LINE_FLAG_USED = 1, 75376 GPIO_V2_LINE_FLAG_ACTIVE_LOW = 2, 75377 GPIO_V2_LINE_FLAG_INPUT = 4, 75378 GPIO_V2_LINE_FLAG_OUTPUT = 8, 75379 GPIO_V2_LINE_FLAG_EDGE_RISING = 16, 75380 GPIO_V2_LINE_FLAG_EDGE_FALLING = 32, 75381 GPIO_V2_LINE_FLAG_OPEN_DRAIN = 64, 75382 GPIO_V2_LINE_FLAG_OPEN_SOURCE = 128, 75383 GPIO_V2_LINE_FLAG_BIAS_PULL_UP = 256, 75384 GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN = 512, 75385 GPIO_V2_LINE_FLAG_BIAS_DISABLED = 1024, 75386 GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME = 2048, 75387 }; 75388 75389 struct gpio_v2_line_values { 75390 __u64 bits; 75391 __u64 mask; 75392 }; 75393 75394 enum gpio_v2_line_attr_id { 75395 GPIO_V2_LINE_ATTR_ID_FLAGS = 1, 75396 GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES = 2, 75397 GPIO_V2_LINE_ATTR_ID_DEBOUNCE = 3, 75398 }; 75399 75400 struct gpio_v2_line_attribute { 75401 __u32 id; 75402 __u32 padding; 75403 union { 75404 __u64 flags; 75405 __u64 values; 75406 __u32 debounce_period_us; 75407 }; 75408 }; 75409 75410 struct gpio_v2_line_config_attribute { 75411 struct gpio_v2_line_attribute attr; 75412 __u64 mask; 75413 }; 75414 75415 struct gpio_v2_line_config { 75416 __u64 flags; 75417 __u32 num_attrs; 75418 __u32 padding[5]; 75419 struct gpio_v2_line_config_attribute attrs[10]; 75420 }; 75421 75422 struct gpio_v2_line_request { 75423 __u32 offsets[64]; 75424 char consumer[32]; 75425 struct gpio_v2_line_config config; 75426 __u32 num_lines; 75427 __u32 event_buffer_size; 75428 __u32 padding[5]; 75429 __s32 fd; 75430 }; 75431 75432 struct gpio_v2_line_info { 75433 char name[32]; 75434 char consumer[32]; 75435 __u32 offset; 75436 __u32 num_attrs; 75437 __u64 flags; 75438 struct gpio_v2_line_attribute attrs[10]; 75439 __u32 padding[4]; 75440 }; 75441 75442 enum gpio_v2_line_changed_type { 75443 GPIO_V2_LINE_CHANGED_REQUESTED = 1, 75444 GPIO_V2_LINE_CHANGED_RELEASED = 2, 75445 GPIO_V2_LINE_CHANGED_CONFIG = 3, 75446 }; 75447 75448 struct gpio_v2_line_info_changed { 75449 struct gpio_v2_line_info info; 75450 __u64 timestamp_ns; 75451 __u32 event_type; 75452 __u32 padding[5]; 75453 }; 75454 75455 enum gpio_v2_line_event_id { 75456 GPIO_V2_LINE_EVENT_RISING_EDGE = 1, 75457 GPIO_V2_LINE_EVENT_FALLING_EDGE = 2, 75458 }; 75459 75460 struct gpio_v2_line_event { 75461 __u64 timestamp_ns; 75462 __u32 id; 75463 __u32 offset; 75464 __u32 seqno; 75465 __u32 line_seqno; 75466 __u32 padding[6]; 75467 }; 75468 75469 struct gpioline_info { 75470 __u32 line_offset; 75471 __u32 flags; 75472 char name[32]; 75473 char consumer[32]; 75474 }; 75475 75476 struct gpioline_info_changed { 75477 struct gpioline_info info; 75478 __u64 timestamp; 75479 __u32 event_type; 75480 __u32 padding[5]; 75481 }; 75482 75483 struct gpiohandle_request { 75484 __u32 lineoffsets[64]; 75485 __u32 flags; 75486 __u8 default_values[64]; 75487 char consumer_label[32]; 75488 __u32 lines; 75489 int fd; 75490 }; 75491 75492 struct gpiohandle_config { 75493 __u32 flags; 75494 __u8 default_values[64]; 75495 __u32 padding[4]; 75496 }; 75497 75498 struct gpiohandle_data { 75499 __u8 values[64]; 75500 }; 75501 75502 struct gpioevent_request { 75503 __u32 lineoffset; 75504 __u32 handleflags; 75505 __u32 eventflags; 75506 char consumer_label[32]; 75507 int fd; 75508 }; 75509 75510 struct gpioevent_data { 75511 __u64 timestamp; 75512 __u32 id; 75513 }; 75514 75515 struct linehandle_state { 75516 struct gpio_device *gdev; 75517 const char *label; 75518 struct gpio_desc *descs[64]; 75519 u32 num_descs; 75520 }; 75521 75522 struct linereq; 75523 75524 struct line { 75525 struct gpio_desc *desc; 75526 struct linereq *req; 75527 unsigned int irq; 75528 u64 eflags; 75529 u64 timestamp_ns; 75530 u32 req_seqno; 75531 u32 line_seqno; 75532 struct delayed_work work; 75533 unsigned int sw_debounced; 75534 unsigned int level; 75535 }; 75536 75537 struct linereq { 75538 struct gpio_device *gdev; 75539 const char *label; 75540 u32 num_lines; 75541 wait_queue_head_t wait; 75542 u32 event_buffer_size; 75543 struct { 75544 union { 75545 struct __kfifo kfifo; 75546 struct gpio_v2_line_event *type; 75547 const struct gpio_v2_line_event *const_type; 75548 char (*rectype)[0]; 75549 struct gpio_v2_line_event *ptr; 75550 const struct gpio_v2_line_event *ptr_const; 75551 }; 75552 struct gpio_v2_line_event buf[0]; 75553 } events; 75554 atomic_t seqno; 75555 struct mutex config_mutex; 75556 struct line lines[0]; 75557 }; 75558 75559 struct lineevent_state { 75560 struct gpio_device *gdev; 75561 const char *label; 75562 struct gpio_desc *desc; 75563 u32 eflags; 75564 int irq; 75565 wait_queue_head_t wait; 75566 struct { 75567 union { 75568 struct __kfifo kfifo; 75569 struct gpioevent_data *type; 75570 const struct gpioevent_data *const_type; 75571 char (*rectype)[0]; 75572 struct gpioevent_data *ptr; 75573 const struct gpioevent_data *ptr_const; 75574 }; 75575 struct gpioevent_data buf[16]; 75576 } events; 75577 u64 timestamp; 75578 }; 75579 75580 struct gpio_chardev_data { 75581 struct gpio_device *gdev; 75582 wait_queue_head_t wait; 75583 struct { 75584 union { 75585 struct __kfifo kfifo; 75586 struct gpio_v2_line_info_changed *type; 75587 const struct gpio_v2_line_info_changed *const_type; 75588 char (*rectype)[0]; 75589 struct gpio_v2_line_info_changed *ptr; 75590 const struct gpio_v2_line_info_changed *ptr_const; 75591 }; 75592 struct gpio_v2_line_info_changed buf[32]; 75593 } events; 75594 struct notifier_block lineinfo_changed_nb; 75595 long unsigned int *watched_lines; 75596 atomic_t watch_abi_version; 75597 }; 75598 75599 typedef u64 acpi_size; 75600 75601 struct acpi_buffer { 75602 acpi_size length; 75603 void *pointer; 75604 }; 75605 75606 typedef void (*acpi_object_handler)(acpi_handle, void *); 75607 75608 struct acpi_connection_info { 75609 u8 *connection; 75610 u16 length; 75611 u8 access_length; 75612 }; 75613 75614 struct acpi_resource_irq { 75615 u8 descriptor_length; 75616 u8 triggering; 75617 u8 polarity; 75618 u8 shareable; 75619 u8 wake_capable; 75620 u8 interrupt_count; 75621 u8 interrupts[1]; 75622 }; 75623 75624 struct acpi_resource_dma { 75625 u8 type; 75626 u8 bus_master; 75627 u8 transfer; 75628 u8 channel_count; 75629 u8 channels[1]; 75630 }; 75631 75632 struct acpi_resource_start_dependent { 75633 u8 descriptor_length; 75634 u8 compatibility_priority; 75635 u8 performance_robustness; 75636 }; 75637 75638 struct acpi_resource_io { 75639 u8 io_decode; 75640 u8 alignment; 75641 u8 address_length; 75642 u16 minimum; 75643 u16 maximum; 75644 } __attribute__((packed)); 75645 75646 struct acpi_resource_fixed_io { 75647 u16 address; 75648 u8 address_length; 75649 } __attribute__((packed)); 75650 75651 struct acpi_resource_fixed_dma { 75652 u16 request_lines; 75653 u16 channels; 75654 u8 width; 75655 } __attribute__((packed)); 75656 75657 struct acpi_resource_vendor { 75658 u16 byte_length; 75659 u8 byte_data[1]; 75660 } __attribute__((packed)); 75661 75662 struct acpi_resource_vendor_typed { 75663 u16 byte_length; 75664 u8 uuid_subtype; 75665 u8 uuid[16]; 75666 u8 byte_data[1]; 75667 }; 75668 75669 struct acpi_resource_end_tag { 75670 u8 checksum; 75671 }; 75672 75673 struct acpi_resource_memory24 { 75674 u8 write_protect; 75675 u16 minimum; 75676 u16 maximum; 75677 u16 alignment; 75678 u16 address_length; 75679 } __attribute__((packed)); 75680 75681 struct acpi_resource_memory32 { 75682 u8 write_protect; 75683 u32 minimum; 75684 u32 maximum; 75685 u32 alignment; 75686 u32 address_length; 75687 } __attribute__((packed)); 75688 75689 struct acpi_resource_fixed_memory32 { 75690 u8 write_protect; 75691 u32 address; 75692 u32 address_length; 75693 } __attribute__((packed)); 75694 75695 struct acpi_memory_attribute { 75696 u8 write_protect; 75697 u8 caching; 75698 u8 range_type; 75699 u8 translation; 75700 }; 75701 75702 struct acpi_io_attribute { 75703 u8 range_type; 75704 u8 translation; 75705 u8 translation_type; 75706 u8 reserved1; 75707 }; 75708 75709 union acpi_resource_attribute { 75710 struct acpi_memory_attribute mem; 75711 struct acpi_io_attribute io; 75712 u8 type_specific; 75713 }; 75714 75715 struct acpi_resource_label { 75716 u16 string_length; 75717 char *string_ptr; 75718 } __attribute__((packed)); 75719 75720 struct acpi_resource_source { 75721 u8 index; 75722 u16 string_length; 75723 char *string_ptr; 75724 } __attribute__((packed)); 75725 75726 struct acpi_address16_attribute { 75727 u16 granularity; 75728 u16 minimum; 75729 u16 maximum; 75730 u16 translation_offset; 75731 u16 address_length; 75732 }; 75733 75734 struct acpi_address32_attribute { 75735 u32 granularity; 75736 u32 minimum; 75737 u32 maximum; 75738 u32 translation_offset; 75739 u32 address_length; 75740 }; 75741 75742 struct acpi_address64_attribute { 75743 u64 granularity; 75744 u64 minimum; 75745 u64 maximum; 75746 u64 translation_offset; 75747 u64 address_length; 75748 }; 75749 75750 struct acpi_resource_address { 75751 u8 resource_type; 75752 u8 producer_consumer; 75753 u8 decode; 75754 u8 min_address_fixed; 75755 u8 max_address_fixed; 75756 union acpi_resource_attribute info; 75757 }; 75758 75759 struct acpi_resource_address16 { 75760 u8 resource_type; 75761 u8 producer_consumer; 75762 u8 decode; 75763 u8 min_address_fixed; 75764 u8 max_address_fixed; 75765 union acpi_resource_attribute info; 75766 struct acpi_address16_attribute address; 75767 struct acpi_resource_source resource_source; 75768 } __attribute__((packed)); 75769 75770 struct acpi_resource_address32 { 75771 u8 resource_type; 75772 u8 producer_consumer; 75773 u8 decode; 75774 u8 min_address_fixed; 75775 u8 max_address_fixed; 75776 union acpi_resource_attribute info; 75777 struct acpi_address32_attribute address; 75778 struct acpi_resource_source resource_source; 75779 } __attribute__((packed)); 75780 75781 struct acpi_resource_address64 { 75782 u8 resource_type; 75783 u8 producer_consumer; 75784 u8 decode; 75785 u8 min_address_fixed; 75786 u8 max_address_fixed; 75787 union acpi_resource_attribute info; 75788 struct acpi_address64_attribute address; 75789 struct acpi_resource_source resource_source; 75790 } __attribute__((packed)); 75791 75792 struct acpi_resource_extended_address64 { 75793 u8 resource_type; 75794 u8 producer_consumer; 75795 u8 decode; 75796 u8 min_address_fixed; 75797 u8 max_address_fixed; 75798 union acpi_resource_attribute info; 75799 u8 revision_ID; 75800 struct acpi_address64_attribute address; 75801 u64 type_specific; 75802 } __attribute__((packed)); 75803 75804 struct acpi_resource_extended_irq { 75805 u8 producer_consumer; 75806 u8 triggering; 75807 u8 polarity; 75808 u8 shareable; 75809 u8 wake_capable; 75810 u8 interrupt_count; 75811 struct acpi_resource_source resource_source; 75812 u32 interrupts[1]; 75813 } __attribute__((packed)); 75814 75815 struct acpi_resource_generic_register { 75816 u8 space_id; 75817 u8 bit_width; 75818 u8 bit_offset; 75819 u8 access_size; 75820 u64 address; 75821 } __attribute__((packed)); 75822 75823 struct acpi_resource_gpio { 75824 u8 revision_id; 75825 u8 connection_type; 75826 u8 producer_consumer; 75827 u8 pin_config; 75828 u8 shareable; 75829 u8 wake_capable; 75830 u8 io_restriction; 75831 u8 triggering; 75832 u8 polarity; 75833 u16 drive_strength; 75834 u16 debounce_timeout; 75835 u16 pin_table_length; 75836 u16 vendor_length; 75837 struct acpi_resource_source resource_source; 75838 u16 *pin_table; 75839 u8 *vendor_data; 75840 } __attribute__((packed)); 75841 75842 struct acpi_resource_common_serialbus { 75843 u8 revision_id; 75844 u8 type; 75845 u8 producer_consumer; 75846 u8 slave_mode; 75847 u8 connection_sharing; 75848 u8 type_revision_id; 75849 u16 type_data_length; 75850 u16 vendor_length; 75851 struct acpi_resource_source resource_source; 75852 u8 *vendor_data; 75853 } __attribute__((packed)); 75854 75855 struct acpi_resource_i2c_serialbus { 75856 u8 revision_id; 75857 u8 type; 75858 u8 producer_consumer; 75859 u8 slave_mode; 75860 u8 connection_sharing; 75861 u8 type_revision_id; 75862 u16 type_data_length; 75863 u16 vendor_length; 75864 struct acpi_resource_source resource_source; 75865 u8 *vendor_data; 75866 u8 access_mode; 75867 u16 slave_address; 75868 u32 connection_speed; 75869 } __attribute__((packed)); 75870 75871 struct acpi_resource_spi_serialbus { 75872 u8 revision_id; 75873 u8 type; 75874 u8 producer_consumer; 75875 u8 slave_mode; 75876 u8 connection_sharing; 75877 u8 type_revision_id; 75878 u16 type_data_length; 75879 u16 vendor_length; 75880 struct acpi_resource_source resource_source; 75881 u8 *vendor_data; 75882 u8 wire_mode; 75883 u8 device_polarity; 75884 u8 data_bit_length; 75885 u8 clock_phase; 75886 u8 clock_polarity; 75887 u16 device_selection; 75888 u32 connection_speed; 75889 } __attribute__((packed)); 75890 75891 struct acpi_resource_uart_serialbus { 75892 u8 revision_id; 75893 u8 type; 75894 u8 producer_consumer; 75895 u8 slave_mode; 75896 u8 connection_sharing; 75897 u8 type_revision_id; 75898 u16 type_data_length; 75899 u16 vendor_length; 75900 struct acpi_resource_source resource_source; 75901 u8 *vendor_data; 75902 u8 endian; 75903 u8 data_bits; 75904 u8 stop_bits; 75905 u8 flow_control; 75906 u8 parity; 75907 u8 lines_enabled; 75908 u16 rx_fifo_size; 75909 u16 tx_fifo_size; 75910 u32 default_baud_rate; 75911 } __attribute__((packed)); 75912 75913 struct acpi_resource_pin_function { 75914 u8 revision_id; 75915 u8 pin_config; 75916 u8 shareable; 75917 u16 function_number; 75918 u16 pin_table_length; 75919 u16 vendor_length; 75920 struct acpi_resource_source resource_source; 75921 u16 *pin_table; 75922 u8 *vendor_data; 75923 } __attribute__((packed)); 75924 75925 struct acpi_resource_pin_config { 75926 u8 revision_id; 75927 u8 producer_consumer; 75928 u8 shareable; 75929 u8 pin_config_type; 75930 u32 pin_config_value; 75931 u16 pin_table_length; 75932 u16 vendor_length; 75933 struct acpi_resource_source resource_source; 75934 u16 *pin_table; 75935 u8 *vendor_data; 75936 } __attribute__((packed)); 75937 75938 struct acpi_resource_pin_group { 75939 u8 revision_id; 75940 u8 producer_consumer; 75941 u16 pin_table_length; 75942 u16 vendor_length; 75943 u16 *pin_table; 75944 struct acpi_resource_label resource_label; 75945 u8 *vendor_data; 75946 } __attribute__((packed)); 75947 75948 struct acpi_resource_pin_group_function { 75949 u8 revision_id; 75950 u8 producer_consumer; 75951 u8 shareable; 75952 u16 function_number; 75953 u16 vendor_length; 75954 struct acpi_resource_source resource_source; 75955 struct acpi_resource_label resource_source_label; 75956 u8 *vendor_data; 75957 } __attribute__((packed)); 75958 75959 struct acpi_resource_pin_group_config { 75960 u8 revision_id; 75961 u8 producer_consumer; 75962 u8 shareable; 75963 u8 pin_config_type; 75964 u32 pin_config_value; 75965 u16 vendor_length; 75966 struct acpi_resource_source resource_source; 75967 struct acpi_resource_label resource_source_label; 75968 u8 *vendor_data; 75969 } __attribute__((packed)); 75970 75971 union acpi_resource_data { 75972 struct acpi_resource_irq irq; 75973 struct acpi_resource_dma dma; 75974 struct acpi_resource_start_dependent start_dpf; 75975 struct acpi_resource_io io; 75976 struct acpi_resource_fixed_io fixed_io; 75977 struct acpi_resource_fixed_dma fixed_dma; 75978 struct acpi_resource_vendor vendor; 75979 struct acpi_resource_vendor_typed vendor_typed; 75980 struct acpi_resource_end_tag end_tag; 75981 struct acpi_resource_memory24 memory24; 75982 struct acpi_resource_memory32 memory32; 75983 struct acpi_resource_fixed_memory32 fixed_memory32; 75984 struct acpi_resource_address16 address16; 75985 struct acpi_resource_address32 address32; 75986 struct acpi_resource_address64 address64; 75987 struct acpi_resource_extended_address64 ext_address64; 75988 struct acpi_resource_extended_irq extended_irq; 75989 struct acpi_resource_generic_register generic_reg; 75990 struct acpi_resource_gpio gpio; 75991 struct acpi_resource_i2c_serialbus i2c_serial_bus; 75992 struct acpi_resource_spi_serialbus spi_serial_bus; 75993 struct acpi_resource_uart_serialbus uart_serial_bus; 75994 struct acpi_resource_common_serialbus common_serial_bus; 75995 struct acpi_resource_pin_function pin_function; 75996 struct acpi_resource_pin_config pin_config; 75997 struct acpi_resource_pin_group pin_group; 75998 struct acpi_resource_pin_group_function pin_group_function; 75999 struct acpi_resource_pin_group_config pin_group_config; 76000 struct acpi_resource_address address; 76001 }; 76002 76003 struct acpi_resource { 76004 u32 type; 76005 u32 length; 76006 union acpi_resource_data data; 76007 } __attribute__((packed)); 76008 76009 typedef acpi_status (*acpi_walk_resource_callback)(struct acpi_resource *, void *); 76010 76011 struct acpi_gpiolib_dmi_quirk { 76012 bool no_edge_events_on_boot; 76013 char *ignore_wake; 76014 }; 76015 76016 struct acpi_gpio_event { 76017 struct list_head node; 76018 acpi_handle handle; 76019 irq_handler_t handler; 76020 unsigned int pin; 76021 unsigned int irq; 76022 long unsigned int irqflags; 76023 bool irq_is_wake; 76024 bool irq_requested; 76025 struct gpio_desc *desc; 76026 }; 76027 76028 struct acpi_gpio_connection { 76029 struct list_head node; 76030 unsigned int pin; 76031 struct gpio_desc *desc; 76032 }; 76033 76034 struct acpi_gpio_chip { 76035 struct acpi_connection_info conn_info; 76036 struct list_head conns; 76037 struct mutex conn_lock; 76038 struct gpio_chip *chip; 76039 struct list_head events; 76040 struct list_head deferred_req_irqs_list_entry; 76041 }; 76042 76043 struct acpi_gpio_lookup { 76044 struct acpi_gpio_info info; 76045 int index; 76046 u16 pin_index; 76047 bool active_low; 76048 struct gpio_desc *desc; 76049 int n; 76050 }; 76051 76052 struct regmap; 76053 76054 struct regmap_irq_chip_data; 76055 76056 struct intel_scu_ipc_dev; 76057 76058 struct intel_soc_pmic { 76059 int irq; 76060 struct regmap *regmap; 76061 struct regmap_irq_chip_data *irq_chip_data; 76062 struct regmap_irq_chip_data *irq_chip_data_pwrbtn; 76063 struct regmap_irq_chip_data *irq_chip_data_tmu; 76064 struct regmap_irq_chip_data *irq_chip_data_bcu; 76065 struct regmap_irq_chip_data *irq_chip_data_adc; 76066 struct regmap_irq_chip_data *irq_chip_data_chgr; 76067 struct regmap_irq_chip_data *irq_chip_data_crit; 76068 struct device *dev; 76069 struct intel_scu_ipc_dev *scu; 76070 }; 76071 76072 enum ctrl_register { 76073 CTRL_IN = 0, 76074 CTRL_OUT = 1, 76075 }; 76076 76077 struct crystalcove_gpio { 76078 struct mutex buslock; 76079 struct gpio_chip chip; 76080 struct regmap *regmap; 76081 int update; 76082 int intcnt_value; 76083 bool set_irq_mask; 76084 }; 76085 76086 struct intel_msic_gpio_pdata { 76087 unsigned int gpio_base; 76088 }; 76089 76090 enum intel_msic_block { 76091 INTEL_MSIC_BLOCK_TOUCH = 0, 76092 INTEL_MSIC_BLOCK_ADC = 1, 76093 INTEL_MSIC_BLOCK_BATTERY = 2, 76094 INTEL_MSIC_BLOCK_GPIO = 3, 76095 INTEL_MSIC_BLOCK_AUDIO = 4, 76096 INTEL_MSIC_BLOCK_HDMI = 5, 76097 INTEL_MSIC_BLOCK_THERMAL = 6, 76098 INTEL_MSIC_BLOCK_POWER_BTN = 7, 76099 INTEL_MSIC_BLOCK_OCD = 8, 76100 INTEL_MSIC_BLOCK_LAST = 9, 76101 }; 76102 76103 struct msic_gpio { 76104 struct platform_device *pdev; 76105 struct mutex buslock; 76106 struct gpio_chip chip; 76107 int irq; 76108 unsigned int irq_base; 76109 long unsigned int trig_change_mask; 76110 unsigned int trig_type; 76111 }; 76112 76113 struct intel_msic; 76114 76115 struct tps68470_gpio_data { 76116 struct regmap *tps68470_regmap; 76117 struct gpio_chip gc; 76118 }; 76119 76120 enum pwm_polarity { 76121 PWM_POLARITY_NORMAL = 0, 76122 PWM_POLARITY_INVERSED = 1, 76123 }; 76124 76125 struct pwm_args { 76126 u64 period; 76127 enum pwm_polarity polarity; 76128 }; 76129 76130 enum { 76131 PWMF_REQUESTED = 1, 76132 PWMF_EXPORTED = 2, 76133 }; 76134 76135 struct pwm_state { 76136 u64 period; 76137 u64 duty_cycle; 76138 enum pwm_polarity polarity; 76139 bool enabled; 76140 }; 76141 76142 struct pwm_chip; 76143 76144 struct pwm_device { 76145 const char *label; 76146 long unsigned int flags; 76147 unsigned int hwpwm; 76148 unsigned int pwm; 76149 struct pwm_chip *chip; 76150 void *chip_data; 76151 struct pwm_args args; 76152 struct pwm_state state; 76153 struct pwm_state last; 76154 }; 76155 76156 struct pwm_ops; 76157 76158 struct pwm_chip { 76159 struct device *dev; 76160 const struct pwm_ops *ops; 76161 int base; 76162 unsigned int npwm; 76163 struct pwm_device * (*of_xlate)(struct pwm_chip *, const struct of_phandle_args *); 76164 unsigned int of_pwm_n_cells; 76165 struct list_head list; 76166 struct pwm_device *pwms; 76167 }; 76168 76169 struct pwm_capture; 76170 76171 struct pwm_ops { 76172 int (*request)(struct pwm_chip *, struct pwm_device *); 76173 void (*free)(struct pwm_chip *, struct pwm_device *); 76174 int (*capture)(struct pwm_chip *, struct pwm_device *, struct pwm_capture *, long unsigned int); 76175 int (*apply)(struct pwm_chip *, struct pwm_device *, const struct pwm_state *); 76176 void (*get_state)(struct pwm_chip *, struct pwm_device *, struct pwm_state *); 76177 struct module *owner; 76178 int (*config)(struct pwm_chip *, struct pwm_device *, int, int); 76179 int (*set_polarity)(struct pwm_chip *, struct pwm_device *, enum pwm_polarity); 76180 int (*enable)(struct pwm_chip *, struct pwm_device *); 76181 void (*disable)(struct pwm_chip *, struct pwm_device *); 76182 }; 76183 76184 struct pwm_capture { 76185 unsigned int period; 76186 unsigned int duty_cycle; 76187 }; 76188 76189 struct pwm_lookup { 76190 struct list_head list; 76191 const char *provider; 76192 unsigned int index; 76193 const char *dev_id; 76194 const char *con_id; 76195 unsigned int period; 76196 enum pwm_polarity polarity; 76197 const char *module; 76198 }; 76199 76200 struct trace_event_raw_pwm { 76201 struct trace_entry ent; 76202 struct pwm_device *pwm; 76203 u64 period; 76204 u64 duty_cycle; 76205 enum pwm_polarity polarity; 76206 bool enabled; 76207 char __data[0]; 76208 }; 76209 76210 struct trace_event_data_offsets_pwm {}; 76211 76212 typedef void (*btf_trace_pwm_apply)(void *, struct pwm_device *, const struct pwm_state *); 76213 76214 typedef void (*btf_trace_pwm_get)(void *, struct pwm_device *, const struct pwm_state *); 76215 76216 struct pwm_export { 76217 struct device child; 76218 struct pwm_device *pwm; 76219 struct mutex lock; 76220 struct pwm_state suspend; 76221 }; 76222 76223 struct crystalcove_pwm { 76224 struct pwm_chip chip; 76225 struct regmap *regmap; 76226 }; 76227 76228 enum { 76229 pci_channel_io_normal = 1, 76230 pci_channel_io_frozen = 2, 76231 pci_channel_io_perm_failure = 3, 76232 }; 76233 76234 struct pci_sriov { 76235 int pos; 76236 int nres; 76237 u32 cap; 76238 u16 ctrl; 76239 u16 total_VFs; 76240 u16 initial_VFs; 76241 u16 num_VFs; 76242 u16 offset; 76243 u16 stride; 76244 u16 vf_device; 76245 u32 pgsz; 76246 u8 link; 76247 u8 max_VF_buses; 76248 u16 driver_max_VFs; 76249 struct pci_dev *dev; 76250 struct pci_dev *self; 76251 u32 class; 76252 u8 hdr_type; 76253 u16 subsystem_vendor; 76254 u16 subsystem_device; 76255 resource_size_t barsz[6]; 76256 bool drivers_autoprobe; 76257 }; 76258 76259 struct rcec_ea { 76260 u8 nextbusn; 76261 u8 lastbusn; 76262 u32 bitmap; 76263 }; 76264 76265 struct pci_bus_resource { 76266 struct list_head list; 76267 struct resource *res; 76268 unsigned int flags; 76269 }; 76270 76271 typedef u64 pci_bus_addr_t; 76272 76273 struct pci_bus_region { 76274 pci_bus_addr_t start; 76275 pci_bus_addr_t end; 76276 }; 76277 76278 enum pci_fixup_pass { 76279 pci_fixup_early = 0, 76280 pci_fixup_header = 1, 76281 pci_fixup_final = 2, 76282 pci_fixup_enable = 3, 76283 pci_fixup_resume = 4, 76284 pci_fixup_suspend = 5, 76285 pci_fixup_resume_early = 6, 76286 pci_fixup_suspend_late = 7, 76287 }; 76288 76289 struct hotplug_slot_ops; 76290 76291 struct hotplug_slot { 76292 const struct hotplug_slot_ops *ops; 76293 struct list_head slot_list; 76294 struct pci_slot *pci_slot; 76295 struct module *owner; 76296 const char *mod_name; 76297 }; 76298 76299 enum pci_dev_flags { 76300 PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = 1, 76301 PCI_DEV_FLAGS_NO_D3 = 2, 76302 PCI_DEV_FLAGS_ASSIGNED = 4, 76303 PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = 8, 76304 PCI_DEV_FLAG_PCIE_BRIDGE_ALIAS = 32, 76305 PCI_DEV_FLAGS_NO_BUS_RESET = 64, 76306 PCI_DEV_FLAGS_NO_PM_RESET = 128, 76307 PCI_DEV_FLAGS_VPD_REF_F0 = 256, 76308 PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT = 512, 76309 PCI_DEV_FLAGS_NO_FLR_RESET = 1024, 76310 PCI_DEV_FLAGS_NO_RELAXED_ORDERING = 2048, 76311 }; 76312 76313 enum pci_bus_flags { 76314 PCI_BUS_FLAGS_NO_MSI = 1, 76315 PCI_BUS_FLAGS_NO_MMRBC = 2, 76316 PCI_BUS_FLAGS_NO_AERSID = 4, 76317 PCI_BUS_FLAGS_NO_EXTCFG = 8, 76318 }; 76319 76320 enum pci_bus_speed { 76321 PCI_SPEED_33MHz = 0, 76322 PCI_SPEED_66MHz = 1, 76323 PCI_SPEED_66MHz_PCIX = 2, 76324 PCI_SPEED_100MHz_PCIX = 3, 76325 PCI_SPEED_133MHz_PCIX = 4, 76326 PCI_SPEED_66MHz_PCIX_ECC = 5, 76327 PCI_SPEED_100MHz_PCIX_ECC = 6, 76328 PCI_SPEED_133MHz_PCIX_ECC = 7, 76329 PCI_SPEED_66MHz_PCIX_266 = 9, 76330 PCI_SPEED_100MHz_PCIX_266 = 10, 76331 PCI_SPEED_133MHz_PCIX_266 = 11, 76332 AGP_UNKNOWN = 12, 76333 AGP_1X = 13, 76334 AGP_2X = 14, 76335 AGP_4X = 15, 76336 AGP_8X = 16, 76337 PCI_SPEED_66MHz_PCIX_533 = 17, 76338 PCI_SPEED_100MHz_PCIX_533 = 18, 76339 PCI_SPEED_133MHz_PCIX_533 = 19, 76340 PCIE_SPEED_2_5GT = 20, 76341 PCIE_SPEED_5_0GT = 21, 76342 PCIE_SPEED_8_0GT = 22, 76343 PCIE_SPEED_16_0GT = 23, 76344 PCIE_SPEED_32_0GT = 24, 76345 PCIE_SPEED_64_0GT = 25, 76346 PCI_SPEED_UNKNOWN = 255, 76347 }; 76348 76349 struct pci_host_bridge { 76350 struct device dev; 76351 struct pci_bus *bus; 76352 struct pci_ops *ops; 76353 struct pci_ops *child_ops; 76354 void *sysdata; 76355 int busnr; 76356 struct list_head windows; 76357 struct list_head dma_ranges; 76358 u8 (*swizzle_irq)(struct pci_dev *, u8 *); 76359 int (*map_irq)(const struct pci_dev *, u8, u8); 76360 void (*release_fn)(struct pci_host_bridge *); 76361 void *release_data; 76362 struct msi_controller *msi; 76363 unsigned int ignore_reset_delay: 1; 76364 unsigned int no_ext_tags: 1; 76365 unsigned int native_aer: 1; 76366 unsigned int native_pcie_hotplug: 1; 76367 unsigned int native_shpc_hotplug: 1; 76368 unsigned int native_pme: 1; 76369 unsigned int native_ltr: 1; 76370 unsigned int native_dpc: 1; 76371 unsigned int preserve_config: 1; 76372 unsigned int size_windows: 1; 76373 resource_size_t (*align_resource)(struct pci_dev *, const struct resource *, resource_size_t, resource_size_t, resource_size_t); 76374 long: 64; 76375 long: 64; 76376 long: 64; 76377 long: 64; 76378 long unsigned int private[0]; 76379 }; 76380 76381 enum { 76382 PCI_REASSIGN_ALL_RSRC = 1, 76383 PCI_REASSIGN_ALL_BUS = 2, 76384 PCI_PROBE_ONLY = 4, 76385 PCI_CAN_SKIP_ISA_ALIGN = 8, 76386 PCI_ENABLE_PROC_DOMAINS = 16, 76387 PCI_COMPAT_DOMAIN_0 = 32, 76388 PCI_SCAN_ALL_PCIE_DEVS = 64, 76389 }; 76390 76391 enum pcie_bus_config_types { 76392 PCIE_BUS_TUNE_OFF = 0, 76393 PCIE_BUS_DEFAULT = 1, 76394 PCIE_BUS_SAFE = 2, 76395 PCIE_BUS_PERFORMANCE = 3, 76396 PCIE_BUS_PEER2PEER = 4, 76397 }; 76398 76399 struct hotplug_slot_ops { 76400 int (*enable_slot)(struct hotplug_slot *); 76401 int (*disable_slot)(struct hotplug_slot *); 76402 int (*set_attention_status)(struct hotplug_slot *, u8); 76403 int (*hardware_test)(struct hotplug_slot *, u32); 76404 int (*get_power_status)(struct hotplug_slot *, u8 *); 76405 int (*get_attention_status)(struct hotplug_slot *, u8 *); 76406 int (*get_latch_status)(struct hotplug_slot *, u8 *); 76407 int (*get_adapter_status)(struct hotplug_slot *, u8 *); 76408 int (*reset_slot)(struct hotplug_slot *, int); 76409 }; 76410 76411 enum pci_bar_type { 76412 pci_bar_unknown = 0, 76413 pci_bar_io = 1, 76414 pci_bar_mem32 = 2, 76415 pci_bar_mem64 = 3, 76416 }; 76417 76418 struct pci_domain_busn_res { 76419 struct list_head list; 76420 struct resource res; 76421 int domain_nr; 76422 }; 76423 76424 struct bus_attribute { 76425 struct attribute attr; 76426 ssize_t (*show)(struct bus_type *, char *); 76427 ssize_t (*store)(struct bus_type *, const char *, size_t); 76428 }; 76429 76430 enum pcie_reset_state { 76431 pcie_deassert_reset = 1, 76432 pcie_warm_reset = 2, 76433 pcie_hot_reset = 3, 76434 }; 76435 76436 enum pcie_link_width { 76437 PCIE_LNK_WIDTH_RESRV = 0, 76438 PCIE_LNK_X1 = 1, 76439 PCIE_LNK_X2 = 2, 76440 PCIE_LNK_X4 = 4, 76441 PCIE_LNK_X8 = 8, 76442 PCIE_LNK_X12 = 12, 76443 PCIE_LNK_X16 = 16, 76444 PCIE_LNK_X32 = 32, 76445 PCIE_LNK_WIDTH_UNKNOWN = 255, 76446 }; 76447 76448 struct pci_cap_saved_data { 76449 u16 cap_nr; 76450 bool cap_extended; 76451 unsigned int size; 76452 u32 data[0]; 76453 }; 76454 76455 struct pci_cap_saved_state { 76456 struct hlist_node next; 76457 struct pci_cap_saved_data cap; 76458 }; 76459 76460 struct pci_platform_pm_ops { 76461 bool (*bridge_d3)(struct pci_dev *); 76462 bool (*is_manageable)(struct pci_dev *); 76463 int (*set_state)(struct pci_dev *, pci_power_t); 76464 pci_power_t (*get_state)(struct pci_dev *); 76465 void (*refresh_state)(struct pci_dev *); 76466 pci_power_t (*choose_state)(struct pci_dev *); 76467 int (*set_wakeup)(struct pci_dev *, bool); 76468 bool (*need_resume)(struct pci_dev *); 76469 }; 76470 76471 struct pci_pme_device { 76472 struct list_head list; 76473 struct pci_dev *dev; 76474 }; 76475 76476 struct pci_saved_state { 76477 u32 config_space[16]; 76478 struct pci_cap_saved_data cap[0]; 76479 }; 76480 76481 struct pci_devres { 76482 unsigned int enabled: 1; 76483 unsigned int pinned: 1; 76484 unsigned int orig_intx: 1; 76485 unsigned int restore_intx: 1; 76486 unsigned int mwi: 1; 76487 u32 region_mask; 76488 }; 76489 76490 struct driver_attribute { 76491 struct attribute attr; 76492 ssize_t (*show)(struct device_driver *, char *); 76493 ssize_t (*store)(struct device_driver *, const char *, size_t); 76494 }; 76495 76496 enum pci_ers_result { 76497 PCI_ERS_RESULT_NONE = 1, 76498 PCI_ERS_RESULT_CAN_RECOVER = 2, 76499 PCI_ERS_RESULT_NEED_RESET = 3, 76500 PCI_ERS_RESULT_DISCONNECT = 4, 76501 PCI_ERS_RESULT_RECOVERED = 5, 76502 PCI_ERS_RESULT_NO_AER_DRIVER = 6, 76503 }; 76504 76505 enum dev_dma_attr { 76506 DEV_DMA_NOT_SUPPORTED = 0, 76507 DEV_DMA_NON_COHERENT = 1, 76508 DEV_DMA_COHERENT = 2, 76509 }; 76510 76511 struct pcie_device { 76512 int irq; 76513 struct pci_dev *port; 76514 u32 service; 76515 void *priv_data; 76516 struct device device; 76517 }; 76518 76519 struct pcie_port_service_driver { 76520 const char *name; 76521 int (*probe)(struct pcie_device *); 76522 void (*remove)(struct pcie_device *); 76523 int (*suspend)(struct pcie_device *); 76524 int (*resume_noirq)(struct pcie_device *); 76525 int (*resume)(struct pcie_device *); 76526 int (*runtime_suspend)(struct pcie_device *); 76527 int (*runtime_resume)(struct pcie_device *); 76528 void (*error_resume)(struct pci_dev *); 76529 int port_type; 76530 u32 service; 76531 struct device_driver driver; 76532 }; 76533 76534 struct pci_dynid { 76535 struct list_head node; 76536 struct pci_device_id id; 76537 }; 76538 76539 struct drv_dev_and_id { 76540 struct pci_driver *drv; 76541 struct pci_dev *dev; 76542 const struct pci_device_id *id; 76543 }; 76544 76545 enum pci_mmap_state { 76546 pci_mmap_io = 0, 76547 pci_mmap_mem = 1, 76548 }; 76549 76550 enum pci_mmap_api { 76551 PCI_MMAP_SYSFS = 0, 76552 PCI_MMAP_PROCFS = 1, 76553 }; 76554 76555 struct pci_vpd_ops; 76556 76557 struct pci_vpd { 76558 const struct pci_vpd_ops *ops; 76559 struct bin_attribute *attr; 76560 struct mutex lock; 76561 unsigned int len; 76562 u16 flag; 76563 u8 cap; 76564 unsigned int busy: 1; 76565 unsigned int valid: 1; 76566 }; 76567 76568 struct pci_vpd_ops { 76569 ssize_t (*read)(struct pci_dev *, loff_t, size_t, void *); 76570 ssize_t (*write)(struct pci_dev *, loff_t, size_t, const void *); 76571 int (*set_size)(struct pci_dev *, size_t); 76572 }; 76573 76574 struct pci_dev_resource { 76575 struct list_head list; 76576 struct resource *res; 76577 struct pci_dev *dev; 76578 resource_size_t start; 76579 resource_size_t end; 76580 resource_size_t add_size; 76581 resource_size_t min_align; 76582 long unsigned int flags; 76583 }; 76584 76585 enum release_type { 76586 leaf_only = 0, 76587 whole_subtree = 1, 76588 }; 76589 76590 enum enable_type { 76591 undefined = 4294967295, 76592 user_disabled = 0, 76593 auto_disabled = 1, 76594 user_enabled = 2, 76595 auto_enabled = 3, 76596 }; 76597 76598 struct msix_entry { 76599 u32 vector; 76600 u16 entry; 76601 }; 76602 76603 struct portdrv_service_data { 76604 struct pcie_port_service_driver *drv; 76605 struct device *dev; 76606 u32 service; 76607 }; 76608 76609 typedef int (*pcie_pm_callback_t)(struct pcie_device *); 76610 76611 struct walk_rcec_data { 76612 struct pci_dev *rcec; 76613 int (*user_callback)(struct pci_dev *, void *); 76614 void *user_data; 76615 }; 76616 76617 struct aspm_latency { 76618 u32 l0s; 76619 u32 l1; 76620 }; 76621 76622 struct pcie_link_state { 76623 struct pci_dev *pdev; 76624 struct pci_dev *downstream; 76625 struct pcie_link_state *root; 76626 struct pcie_link_state *parent; 76627 struct list_head sibling; 76628 u32 aspm_support: 7; 76629 u32 aspm_enabled: 7; 76630 u32 aspm_capable: 7; 76631 u32 aspm_default: 7; 76632 char: 4; 76633 u32 aspm_disable: 7; 76634 u32 clkpm_capable: 1; 76635 u32 clkpm_enabled: 1; 76636 u32 clkpm_default: 1; 76637 u32 clkpm_disable: 1; 76638 struct aspm_latency latency_up; 76639 struct aspm_latency latency_dw; 76640 struct aspm_latency acceptable[8]; 76641 }; 76642 76643 struct aer_stats { 76644 u64 dev_cor_errs[16]; 76645 u64 dev_fatal_errs[27]; 76646 u64 dev_nonfatal_errs[27]; 76647 u64 dev_total_cor_errs; 76648 u64 dev_total_fatal_errs; 76649 u64 dev_total_nonfatal_errs; 76650 u64 rootport_total_cor_errs; 76651 u64 rootport_total_fatal_errs; 76652 u64 rootport_total_nonfatal_errs; 76653 }; 76654 76655 struct aer_header_log_regs { 76656 unsigned int dw0; 76657 unsigned int dw1; 76658 unsigned int dw2; 76659 unsigned int dw3; 76660 }; 76661 76662 struct aer_capability_regs { 76663 u32 header; 76664 u32 uncor_status; 76665 u32 uncor_mask; 76666 u32 uncor_severity; 76667 u32 cor_status; 76668 u32 cor_mask; 76669 u32 cap_control; 76670 struct aer_header_log_regs header_log; 76671 u32 root_command; 76672 u32 root_status; 76673 u16 cor_err_source; 76674 u16 uncor_err_source; 76675 }; 76676 76677 struct aer_err_info { 76678 struct pci_dev *dev[5]; 76679 int error_dev_num; 76680 unsigned int id: 16; 76681 unsigned int severity: 2; 76682 unsigned int __pad1: 5; 76683 unsigned int multi_error_valid: 1; 76684 unsigned int first_error: 5; 76685 unsigned int __pad2: 2; 76686 unsigned int tlp_header_valid: 1; 76687 unsigned int status; 76688 unsigned int mask; 76689 struct aer_header_log_regs tlp; 76690 }; 76691 76692 struct aer_err_source { 76693 unsigned int status; 76694 unsigned int id; 76695 }; 76696 76697 struct aer_rpc { 76698 struct pci_dev *rpd; 76699 struct { 76700 union { 76701 struct __kfifo kfifo; 76702 struct aer_err_source *type; 76703 const struct aer_err_source *const_type; 76704 char (*rectype)[0]; 76705 struct aer_err_source *ptr; 76706 const struct aer_err_source *ptr_const; 76707 }; 76708 struct aer_err_source buf[128]; 76709 } aer_fifo; 76710 }; 76711 76712 struct aer_recover_entry { 76713 u8 bus; 76714 u8 devfn; 76715 u16 domain; 76716 int severity; 76717 struct aer_capability_regs *regs; 76718 }; 76719 76720 struct pcie_pme_service_data { 76721 spinlock_t lock; 76722 struct pcie_device *srv; 76723 struct work_struct work; 76724 bool noirq; 76725 }; 76726 76727 typedef void (*acpi_notify_handler)(acpi_handle, u32, void *); 76728 76729 struct pci_filp_private { 76730 enum pci_mmap_state mmap_state; 76731 int write_combine; 76732 }; 76733 76734 struct pci_slot_attribute { 76735 struct attribute attr; 76736 ssize_t (*show)(struct pci_slot *, char *); 76737 ssize_t (*store)(struct pci_slot *, const char *, size_t); 76738 }; 76739 76740 struct acpi_bus_type { 76741 struct list_head list; 76742 const char *name; 76743 bool (*match)(struct device *); 76744 struct acpi_device * (*find_companion)(struct device *); 76745 void (*setup)(struct device *); 76746 void (*cleanup)(struct device *); 76747 }; 76748 76749 struct acpi_pci_root { 76750 struct acpi_device *device; 76751 struct pci_bus *bus; 76752 u16 segment; 76753 struct resource secondary; 76754 u32 osc_support_set; 76755 u32 osc_control_set; 76756 phys_addr_t mcfg_addr; 76757 }; 76758 76759 enum pm_qos_flags_status { 76760 PM_QOS_FLAGS_UNDEFINED = 4294967295, 76761 PM_QOS_FLAGS_NONE = 0, 76762 PM_QOS_FLAGS_SOME = 1, 76763 PM_QOS_FLAGS_ALL = 2, 76764 }; 76765 76766 struct hpx_type0 { 76767 u32 revision; 76768 u8 cache_line_size; 76769 u8 latency_timer; 76770 u8 enable_serr; 76771 u8 enable_perr; 76772 }; 76773 76774 struct hpx_type1 { 76775 u32 revision; 76776 u8 max_mem_read; 76777 u8 avg_max_split; 76778 u16 tot_max_split; 76779 }; 76780 76781 struct hpx_type2 { 76782 u32 revision; 76783 u32 unc_err_mask_and; 76784 u32 unc_err_mask_or; 76785 u32 unc_err_sever_and; 76786 u32 unc_err_sever_or; 76787 u32 cor_err_mask_and; 76788 u32 cor_err_mask_or; 76789 u32 adv_err_cap_and; 76790 u32 adv_err_cap_or; 76791 u16 pci_exp_devctl_and; 76792 u16 pci_exp_devctl_or; 76793 u16 pci_exp_lnkctl_and; 76794 u16 pci_exp_lnkctl_or; 76795 u32 sec_unc_err_sever_and; 76796 u32 sec_unc_err_sever_or; 76797 u32 sec_unc_err_mask_and; 76798 u32 sec_unc_err_mask_or; 76799 }; 76800 76801 struct hpx_type3 { 76802 u16 device_type; 76803 u16 function_type; 76804 u16 config_space_location; 76805 u16 pci_exp_cap_id; 76806 u16 pci_exp_cap_ver; 76807 u16 pci_exp_vendor_id; 76808 u16 dvsec_id; 76809 u16 dvsec_rev; 76810 u16 match_offset; 76811 u32 match_mask_and; 76812 u32 match_value; 76813 u16 reg_offset; 76814 u32 reg_mask_and; 76815 u32 reg_mask_or; 76816 }; 76817 76818 enum hpx_type3_dev_type { 76819 HPX_TYPE_ENDPOINT = 1, 76820 HPX_TYPE_LEG_END = 2, 76821 HPX_TYPE_RC_END = 4, 76822 HPX_TYPE_RC_EC = 8, 76823 HPX_TYPE_ROOT_PORT = 16, 76824 HPX_TYPE_UPSTREAM = 32, 76825 HPX_TYPE_DOWNSTREAM = 64, 76826 HPX_TYPE_PCI_BRIDGE = 128, 76827 HPX_TYPE_PCIE_BRIDGE = 256, 76828 }; 76829 76830 enum hpx_type3_fn_type { 76831 HPX_FN_NORMAL = 1, 76832 HPX_FN_SRIOV_PHYS = 2, 76833 HPX_FN_SRIOV_VIRT = 4, 76834 }; 76835 76836 enum hpx_type3_cfg_loc { 76837 HPX_CFG_PCICFG = 0, 76838 HPX_CFG_PCIE_CAP = 1, 76839 HPX_CFG_PCIE_CAP_EXT = 2, 76840 HPX_CFG_VEND_CAP = 3, 76841 HPX_CFG_DVSEC = 4, 76842 HPX_CFG_MAX = 5, 76843 }; 76844 76845 enum pci_irq_reroute_variant { 76846 INTEL_IRQ_REROUTE_VARIANT = 1, 76847 MAX_IRQ_REROUTE_VARIANTS = 3, 76848 }; 76849 76850 struct pci_fixup { 76851 u16 vendor; 76852 u16 device; 76853 u32 class; 76854 unsigned int class_shift; 76855 int hook_offset; 76856 }; 76857 76858 enum { 76859 NVME_REG_CAP = 0, 76860 NVME_REG_VS = 8, 76861 NVME_REG_INTMS = 12, 76862 NVME_REG_INTMC = 16, 76863 NVME_REG_CC = 20, 76864 NVME_REG_CSTS = 28, 76865 NVME_REG_NSSR = 32, 76866 NVME_REG_AQA = 36, 76867 NVME_REG_ASQ = 40, 76868 NVME_REG_ACQ = 48, 76869 NVME_REG_CMBLOC = 56, 76870 NVME_REG_CMBSZ = 60, 76871 NVME_REG_BPINFO = 64, 76872 NVME_REG_BPRSEL = 68, 76873 NVME_REG_BPMBL = 72, 76874 NVME_REG_CMBMSC = 80, 76875 NVME_REG_PMRCAP = 3584, 76876 NVME_REG_PMRCTL = 3588, 76877 NVME_REG_PMRSTS = 3592, 76878 NVME_REG_PMREBS = 3596, 76879 NVME_REG_PMRSWTP = 3600, 76880 NVME_REG_DBS = 4096, 76881 }; 76882 76883 enum { 76884 NVME_CC_ENABLE = 1, 76885 NVME_CC_EN_SHIFT = 0, 76886 NVME_CC_CSS_SHIFT = 4, 76887 NVME_CC_MPS_SHIFT = 7, 76888 NVME_CC_AMS_SHIFT = 11, 76889 NVME_CC_SHN_SHIFT = 14, 76890 NVME_CC_IOSQES_SHIFT = 16, 76891 NVME_CC_IOCQES_SHIFT = 20, 76892 NVME_CC_CSS_NVM = 0, 76893 NVME_CC_CSS_CSI = 96, 76894 NVME_CC_CSS_MASK = 112, 76895 NVME_CC_AMS_RR = 0, 76896 NVME_CC_AMS_WRRU = 2048, 76897 NVME_CC_AMS_VS = 14336, 76898 NVME_CC_SHN_NONE = 0, 76899 NVME_CC_SHN_NORMAL = 16384, 76900 NVME_CC_SHN_ABRUPT = 32768, 76901 NVME_CC_SHN_MASK = 49152, 76902 NVME_CC_IOSQES = 393216, 76903 NVME_CC_IOCQES = 4194304, 76904 NVME_CAP_CSS_NVM = 1, 76905 NVME_CAP_CSS_CSI = 64, 76906 NVME_CSTS_RDY = 1, 76907 NVME_CSTS_CFS = 2, 76908 NVME_CSTS_NSSRO = 16, 76909 NVME_CSTS_PP = 32, 76910 NVME_CSTS_SHST_NORMAL = 0, 76911 NVME_CSTS_SHST_OCCUR = 4, 76912 NVME_CSTS_SHST_CMPLT = 8, 76913 NVME_CSTS_SHST_MASK = 12, 76914 NVME_CMBMSC_CRE = 1, 76915 NVME_CMBMSC_CMSE = 2, 76916 }; 76917 76918 enum { 76919 NVME_AEN_BIT_NS_ATTR = 8, 76920 NVME_AEN_BIT_FW_ACT = 9, 76921 NVME_AEN_BIT_ANA_CHANGE = 11, 76922 NVME_AEN_BIT_DISC_CHANGE = 31, 76923 }; 76924 76925 enum { 76926 SWITCHTEC_GAS_MRPC_OFFSET = 0, 76927 SWITCHTEC_GAS_TOP_CFG_OFFSET = 4096, 76928 SWITCHTEC_GAS_SW_EVENT_OFFSET = 6144, 76929 SWITCHTEC_GAS_SYS_INFO_OFFSET = 8192, 76930 SWITCHTEC_GAS_FLASH_INFO_OFFSET = 8704, 76931 SWITCHTEC_GAS_PART_CFG_OFFSET = 16384, 76932 SWITCHTEC_GAS_NTB_OFFSET = 65536, 76933 SWITCHTEC_GAS_PFF_CSR_OFFSET = 1261568, 76934 }; 76935 76936 enum { 76937 SWITCHTEC_NTB_REG_INFO_OFFSET = 0, 76938 SWITCHTEC_NTB_REG_CTRL_OFFSET = 16384, 76939 SWITCHTEC_NTB_REG_DBMSG_OFFSET = 409600, 76940 }; 76941 76942 struct nt_partition_info { 76943 u32 xlink_enabled; 76944 u32 target_part_low; 76945 u32 target_part_high; 76946 u32 reserved; 76947 }; 76948 76949 struct ntb_info_regs { 76950 u8 partition_count; 76951 u8 partition_id; 76952 u16 reserved1; 76953 u64 ep_map; 76954 u16 requester_id; 76955 u16 reserved2; 76956 u32 reserved3[4]; 76957 struct nt_partition_info ntp_info[48]; 76958 } __attribute__((packed)); 76959 76960 struct ntb_ctrl_regs { 76961 u32 partition_status; 76962 u32 partition_op; 76963 u32 partition_ctrl; 76964 u32 bar_setup; 76965 u32 bar_error; 76966 u16 lut_table_entries; 76967 u16 lut_table_offset; 76968 u32 lut_error; 76969 u16 req_id_table_size; 76970 u16 req_id_table_offset; 76971 u32 req_id_error; 76972 u32 reserved1[7]; 76973 struct { 76974 u32 ctl; 76975 u32 win_size; 76976 u64 xlate_addr; 76977 } bar_entry[6]; 76978 struct { 76979 u32 win_size; 76980 u32 reserved[3]; 76981 } bar_ext_entry[6]; 76982 u32 reserved2[192]; 76983 u32 req_id_table[512]; 76984 u32 reserved3[256]; 76985 u64 lut_entry[512]; 76986 }; 76987 76988 struct pci_dev_reset_methods { 76989 u16 vendor; 76990 u16 device; 76991 int (*reset)(struct pci_dev *, int); 76992 }; 76993 76994 struct pci_dev_acs_enabled { 76995 u16 vendor; 76996 u16 device; 76997 int (*acs_enabled)(struct pci_dev *, u16); 76998 }; 76999 77000 struct pci_dev_acs_ops { 77001 u16 vendor; 77002 u16 device; 77003 int (*enable_acs)(struct pci_dev *); 77004 int (*disable_acs_redir)(struct pci_dev *); 77005 }; 77006 77007 typedef acpi_status (*acpi_walk_callback)(acpi_handle, u32, void *, void **); 77008 77009 struct controller { 77010 struct pcie_device *pcie; 77011 u32 slot_cap; 77012 unsigned int inband_presence_disabled: 1; 77013 u16 slot_ctrl; 77014 struct mutex ctrl_lock; 77015 long unsigned int cmd_started; 77016 unsigned int cmd_busy: 1; 77017 wait_queue_head_t queue; 77018 atomic_t pending_events; 77019 unsigned int notification_enabled: 1; 77020 unsigned int power_fault_detected; 77021 struct task_struct *poll_thread; 77022 u8 state; 77023 struct mutex state_lock; 77024 struct delayed_work button_work; 77025 struct hotplug_slot hotplug_slot; 77026 struct rw_semaphore reset_lock; 77027 unsigned int ist_running; 77028 int request_result; 77029 wait_queue_head_t requester; 77030 }; 77031 77032 struct controller___2; 77033 77034 struct hpc_ops; 77035 77036 struct slot { 77037 u8 bus; 77038 u8 device; 77039 u16 status; 77040 u32 number; 77041 u8 is_a_board; 77042 u8 state; 77043 u8 attention_save; 77044 u8 presence_save; 77045 u8 latch_save; 77046 u8 pwr_save; 77047 struct controller___2 *ctrl; 77048 const struct hpc_ops *hpc_ops; 77049 struct hotplug_slot hotplug_slot; 77050 struct list_head slot_list; 77051 struct delayed_work work; 77052 struct mutex lock; 77053 struct workqueue_struct *wq; 77054 u8 hp_slot; 77055 }; 77056 77057 struct controller___2 { 77058 struct mutex crit_sect; 77059 struct mutex cmd_lock; 77060 int num_slots; 77061 int slot_num_inc; 77062 struct pci_dev *pci_dev; 77063 struct list_head slot_list; 77064 const struct hpc_ops *hpc_ops; 77065 wait_queue_head_t queue; 77066 u8 slot_device_offset; 77067 u32 pcix_misc2_reg; 77068 u32 first_slot; 77069 u32 cap_offset; 77070 long unsigned int mmio_base; 77071 long unsigned int mmio_size; 77072 void *creg; 77073 struct timer_list poll_timer; 77074 }; 77075 77076 struct hpc_ops { 77077 int (*power_on_slot)(struct slot *); 77078 int (*slot_enable)(struct slot *); 77079 int (*slot_disable)(struct slot *); 77080 int (*set_bus_speed_mode)(struct slot *, enum pci_bus_speed); 77081 int (*get_power_status)(struct slot *, u8 *); 77082 int (*get_attention_status)(struct slot *, u8 *); 77083 int (*set_attention_status)(struct slot *, u8); 77084 int (*get_latch_status)(struct slot *, u8 *); 77085 int (*get_adapter_status)(struct slot *, u8 *); 77086 int (*get_adapter_speed)(struct slot *, enum pci_bus_speed *); 77087 int (*get_mode1_ECC_cap)(struct slot *, u8 *); 77088 int (*get_prog_int)(struct slot *, u8 *); 77089 int (*query_power_fault)(struct slot *); 77090 void (*green_led_on)(struct slot *); 77091 void (*green_led_off)(struct slot *); 77092 void (*green_led_blink)(struct slot *); 77093 void (*release_ctlr)(struct controller___2 *); 77094 int (*check_cmd_status)(struct controller___2 *); 77095 }; 77096 77097 struct event_info { 77098 u32 event_type; 77099 struct slot *p_slot; 77100 struct work_struct work; 77101 }; 77102 77103 struct pushbutton_work_info { 77104 struct slot *p_slot; 77105 struct work_struct work; 77106 }; 77107 77108 enum ctrl_offsets { 77109 BASE_OFFSET = 0, 77110 SLOT_AVAIL1 = 4, 77111 SLOT_AVAIL2 = 8, 77112 SLOT_CONFIG = 12, 77113 SEC_BUS_CONFIG = 16, 77114 MSI_CTRL = 18, 77115 PROG_INTERFACE = 19, 77116 CMD = 20, 77117 CMD_STATUS = 22, 77118 INTR_LOC = 24, 77119 SERR_LOC = 28, 77120 SERR_INTR_ENABLE = 32, 77121 SLOT1 = 36, 77122 }; 77123 77124 struct acpiphp_slot; 77125 77126 struct slot___2 { 77127 struct hotplug_slot hotplug_slot; 77128 struct acpiphp_slot *acpi_slot; 77129 unsigned int sun; 77130 }; 77131 77132 struct acpiphp_slot { 77133 struct list_head node; 77134 struct pci_bus *bus; 77135 struct list_head funcs; 77136 struct slot___2 *slot; 77137 u8 device; 77138 u32 flags; 77139 }; 77140 77141 struct acpiphp_attention_info { 77142 int (*set_attn)(struct hotplug_slot *, u8); 77143 int (*get_attn)(struct hotplug_slot *, u8 *); 77144 struct module *owner; 77145 }; 77146 77147 struct acpiphp_context; 77148 77149 struct acpiphp_bridge { 77150 struct list_head list; 77151 struct list_head slots; 77152 struct kref ref; 77153 struct acpiphp_context *context; 77154 int nr_slots; 77155 struct pci_bus *pci_bus; 77156 struct pci_dev *pci_dev; 77157 bool is_going_away; 77158 }; 77159 77160 struct acpiphp_func { 77161 struct acpiphp_bridge *parent; 77162 struct acpiphp_slot *slot; 77163 struct list_head sibling; 77164 u8 function; 77165 u32 flags; 77166 }; 77167 77168 struct acpiphp_context { 77169 struct acpi_hotplug_context hp; 77170 struct acpiphp_func func; 77171 struct acpiphp_bridge *bridge; 77172 unsigned int refcount; 77173 }; 77174 77175 struct acpiphp_root_context { 77176 struct acpi_hotplug_context hp; 77177 struct acpiphp_bridge *root_bridge; 77178 }; 77179 77180 enum dmi_device_type { 77181 DMI_DEV_TYPE_ANY = 0, 77182 DMI_DEV_TYPE_OTHER = 1, 77183 DMI_DEV_TYPE_UNKNOWN = 2, 77184 DMI_DEV_TYPE_VIDEO = 3, 77185 DMI_DEV_TYPE_SCSI = 4, 77186 DMI_DEV_TYPE_ETHERNET = 5, 77187 DMI_DEV_TYPE_TOKENRING = 6, 77188 DMI_DEV_TYPE_SOUND = 7, 77189 DMI_DEV_TYPE_PATA = 8, 77190 DMI_DEV_TYPE_SATA = 9, 77191 DMI_DEV_TYPE_SAS = 10, 77192 DMI_DEV_TYPE_IPMI = 4294967295, 77193 DMI_DEV_TYPE_OEM_STRING = 4294967294, 77194 DMI_DEV_TYPE_DEV_ONBOARD = 4294967293, 77195 DMI_DEV_TYPE_DEV_SLOT = 4294967292, 77196 }; 77197 77198 struct dmi_device { 77199 struct list_head list; 77200 int type; 77201 const char *name; 77202 void *device_data; 77203 }; 77204 77205 struct dmi_dev_onboard { 77206 struct dmi_device dev; 77207 int instance; 77208 int segment; 77209 int bus; 77210 int devfn; 77211 }; 77212 77213 enum smbios_attr_enum { 77214 SMBIOS_ATTR_NONE = 0, 77215 SMBIOS_ATTR_LABEL_SHOW = 1, 77216 SMBIOS_ATTR_INSTANCE_SHOW = 2, 77217 }; 77218 77219 enum acpi_attr_enum { 77220 ACPI_ATTR_LABEL_SHOW = 0, 77221 ACPI_ATTR_INDEX_SHOW = 1, 77222 }; 77223 77224 struct pci_p2pdma { 77225 struct gen_pool *pool; 77226 bool p2pmem_published; 77227 struct xarray map_types; 77228 }; 77229 77230 enum pci_p2pdma_map_type { 77231 PCI_P2PDMA_MAP_UNKNOWN = 0, 77232 PCI_P2PDMA_MAP_NOT_SUPPORTED = 1, 77233 PCI_P2PDMA_MAP_BUS_ADDR = 2, 77234 PCI_P2PDMA_MAP_THRU_HOST_BRIDGE = 3, 77235 }; 77236 77237 struct pci_p2pdma_pagemap { 77238 struct dev_pagemap pgmap; 77239 struct pci_dev *provider; 77240 u64 bus_offset; 77241 }; 77242 77243 struct pci_p2pdma_whitelist_entry { 77244 short unsigned int vendor; 77245 short unsigned int device; 77246 enum { 77247 REQ_SAME_HOST_BRIDGE = 1, 77248 } flags; 77249 }; 77250 77251 enum hdmi_infoframe_type { 77252 HDMI_INFOFRAME_TYPE_VENDOR = 129, 77253 HDMI_INFOFRAME_TYPE_AVI = 130, 77254 HDMI_INFOFRAME_TYPE_SPD = 131, 77255 HDMI_INFOFRAME_TYPE_AUDIO = 132, 77256 HDMI_INFOFRAME_TYPE_DRM = 135, 77257 }; 77258 77259 struct hdmi_any_infoframe { 77260 enum hdmi_infoframe_type type; 77261 unsigned char version; 77262 unsigned char length; 77263 }; 77264 77265 enum hdmi_colorspace { 77266 HDMI_COLORSPACE_RGB = 0, 77267 HDMI_COLORSPACE_YUV422 = 1, 77268 HDMI_COLORSPACE_YUV444 = 2, 77269 HDMI_COLORSPACE_YUV420 = 3, 77270 HDMI_COLORSPACE_RESERVED4 = 4, 77271 HDMI_COLORSPACE_RESERVED5 = 5, 77272 HDMI_COLORSPACE_RESERVED6 = 6, 77273 HDMI_COLORSPACE_IDO_DEFINED = 7, 77274 }; 77275 77276 enum hdmi_scan_mode { 77277 HDMI_SCAN_MODE_NONE = 0, 77278 HDMI_SCAN_MODE_OVERSCAN = 1, 77279 HDMI_SCAN_MODE_UNDERSCAN = 2, 77280 HDMI_SCAN_MODE_RESERVED = 3, 77281 }; 77282 77283 enum hdmi_colorimetry { 77284 HDMI_COLORIMETRY_NONE = 0, 77285 HDMI_COLORIMETRY_ITU_601 = 1, 77286 HDMI_COLORIMETRY_ITU_709 = 2, 77287 HDMI_COLORIMETRY_EXTENDED = 3, 77288 }; 77289 77290 enum hdmi_picture_aspect { 77291 HDMI_PICTURE_ASPECT_NONE = 0, 77292 HDMI_PICTURE_ASPECT_4_3 = 1, 77293 HDMI_PICTURE_ASPECT_16_9 = 2, 77294 HDMI_PICTURE_ASPECT_64_27 = 3, 77295 HDMI_PICTURE_ASPECT_256_135 = 4, 77296 HDMI_PICTURE_ASPECT_RESERVED = 5, 77297 }; 77298 77299 enum hdmi_active_aspect { 77300 HDMI_ACTIVE_ASPECT_16_9_TOP = 2, 77301 HDMI_ACTIVE_ASPECT_14_9_TOP = 3, 77302 HDMI_ACTIVE_ASPECT_16_9_CENTER = 4, 77303 HDMI_ACTIVE_ASPECT_PICTURE = 8, 77304 HDMI_ACTIVE_ASPECT_4_3 = 9, 77305 HDMI_ACTIVE_ASPECT_16_9 = 10, 77306 HDMI_ACTIVE_ASPECT_14_9 = 11, 77307 HDMI_ACTIVE_ASPECT_4_3_SP_14_9 = 13, 77308 HDMI_ACTIVE_ASPECT_16_9_SP_14_9 = 14, 77309 HDMI_ACTIVE_ASPECT_16_9_SP_4_3 = 15, 77310 }; 77311 77312 enum hdmi_extended_colorimetry { 77313 HDMI_EXTENDED_COLORIMETRY_XV_YCC_601 = 0, 77314 HDMI_EXTENDED_COLORIMETRY_XV_YCC_709 = 1, 77315 HDMI_EXTENDED_COLORIMETRY_S_YCC_601 = 2, 77316 HDMI_EXTENDED_COLORIMETRY_OPYCC_601 = 3, 77317 HDMI_EXTENDED_COLORIMETRY_OPRGB = 4, 77318 HDMI_EXTENDED_COLORIMETRY_BT2020_CONST_LUM = 5, 77319 HDMI_EXTENDED_COLORIMETRY_BT2020 = 6, 77320 HDMI_EXTENDED_COLORIMETRY_RESERVED = 7, 77321 }; 77322 77323 enum hdmi_quantization_range { 77324 HDMI_QUANTIZATION_RANGE_DEFAULT = 0, 77325 HDMI_QUANTIZATION_RANGE_LIMITED = 1, 77326 HDMI_QUANTIZATION_RANGE_FULL = 2, 77327 HDMI_QUANTIZATION_RANGE_RESERVED = 3, 77328 }; 77329 77330 enum hdmi_nups { 77331 HDMI_NUPS_UNKNOWN = 0, 77332 HDMI_NUPS_HORIZONTAL = 1, 77333 HDMI_NUPS_VERTICAL = 2, 77334 HDMI_NUPS_BOTH = 3, 77335 }; 77336 77337 enum hdmi_ycc_quantization_range { 77338 HDMI_YCC_QUANTIZATION_RANGE_LIMITED = 0, 77339 HDMI_YCC_QUANTIZATION_RANGE_FULL = 1, 77340 }; 77341 77342 enum hdmi_content_type { 77343 HDMI_CONTENT_TYPE_GRAPHICS = 0, 77344 HDMI_CONTENT_TYPE_PHOTO = 1, 77345 HDMI_CONTENT_TYPE_CINEMA = 2, 77346 HDMI_CONTENT_TYPE_GAME = 3, 77347 }; 77348 77349 enum hdmi_metadata_type { 77350 HDMI_STATIC_METADATA_TYPE1 = 1, 77351 }; 77352 77353 enum hdmi_eotf { 77354 HDMI_EOTF_TRADITIONAL_GAMMA_SDR = 0, 77355 HDMI_EOTF_TRADITIONAL_GAMMA_HDR = 1, 77356 HDMI_EOTF_SMPTE_ST2084 = 2, 77357 HDMI_EOTF_BT_2100_HLG = 3, 77358 }; 77359 77360 struct hdmi_avi_infoframe { 77361 enum hdmi_infoframe_type type; 77362 unsigned char version; 77363 unsigned char length; 77364 enum hdmi_colorspace colorspace; 77365 enum hdmi_scan_mode scan_mode; 77366 enum hdmi_colorimetry colorimetry; 77367 enum hdmi_picture_aspect picture_aspect; 77368 enum hdmi_active_aspect active_aspect; 77369 bool itc; 77370 enum hdmi_extended_colorimetry extended_colorimetry; 77371 enum hdmi_quantization_range quantization_range; 77372 enum hdmi_nups nups; 77373 unsigned char video_code; 77374 enum hdmi_ycc_quantization_range ycc_quantization_range; 77375 enum hdmi_content_type content_type; 77376 unsigned char pixel_repeat; 77377 short unsigned int top_bar; 77378 short unsigned int bottom_bar; 77379 short unsigned int left_bar; 77380 short unsigned int right_bar; 77381 }; 77382 77383 struct hdmi_drm_infoframe { 77384 enum hdmi_infoframe_type type; 77385 unsigned char version; 77386 unsigned char length; 77387 enum hdmi_eotf eotf; 77388 enum hdmi_metadata_type metadata_type; 77389 struct { 77390 u16 x; 77391 u16 y; 77392 } display_primaries[3]; 77393 struct { 77394 u16 x; 77395 u16 y; 77396 } white_point; 77397 u16 max_display_mastering_luminance; 77398 u16 min_display_mastering_luminance; 77399 u16 max_cll; 77400 u16 max_fall; 77401 }; 77402 77403 enum hdmi_spd_sdi { 77404 HDMI_SPD_SDI_UNKNOWN = 0, 77405 HDMI_SPD_SDI_DSTB = 1, 77406 HDMI_SPD_SDI_DVDP = 2, 77407 HDMI_SPD_SDI_DVHS = 3, 77408 HDMI_SPD_SDI_HDDVR = 4, 77409 HDMI_SPD_SDI_DVC = 5, 77410 HDMI_SPD_SDI_DSC = 6, 77411 HDMI_SPD_SDI_VCD = 7, 77412 HDMI_SPD_SDI_GAME = 8, 77413 HDMI_SPD_SDI_PC = 9, 77414 HDMI_SPD_SDI_BD = 10, 77415 HDMI_SPD_SDI_SACD = 11, 77416 HDMI_SPD_SDI_HDDVD = 12, 77417 HDMI_SPD_SDI_PMP = 13, 77418 }; 77419 77420 struct hdmi_spd_infoframe { 77421 enum hdmi_infoframe_type type; 77422 unsigned char version; 77423 unsigned char length; 77424 char vendor[8]; 77425 char product[16]; 77426 enum hdmi_spd_sdi sdi; 77427 }; 77428 77429 enum hdmi_audio_coding_type { 77430 HDMI_AUDIO_CODING_TYPE_STREAM = 0, 77431 HDMI_AUDIO_CODING_TYPE_PCM = 1, 77432 HDMI_AUDIO_CODING_TYPE_AC3 = 2, 77433 HDMI_AUDIO_CODING_TYPE_MPEG1 = 3, 77434 HDMI_AUDIO_CODING_TYPE_MP3 = 4, 77435 HDMI_AUDIO_CODING_TYPE_MPEG2 = 5, 77436 HDMI_AUDIO_CODING_TYPE_AAC_LC = 6, 77437 HDMI_AUDIO_CODING_TYPE_DTS = 7, 77438 HDMI_AUDIO_CODING_TYPE_ATRAC = 8, 77439 HDMI_AUDIO_CODING_TYPE_DSD = 9, 77440 HDMI_AUDIO_CODING_TYPE_EAC3 = 10, 77441 HDMI_AUDIO_CODING_TYPE_DTS_HD = 11, 77442 HDMI_AUDIO_CODING_TYPE_MLP = 12, 77443 HDMI_AUDIO_CODING_TYPE_DST = 13, 77444 HDMI_AUDIO_CODING_TYPE_WMA_PRO = 14, 77445 HDMI_AUDIO_CODING_TYPE_CXT = 15, 77446 }; 77447 77448 enum hdmi_audio_sample_size { 77449 HDMI_AUDIO_SAMPLE_SIZE_STREAM = 0, 77450 HDMI_AUDIO_SAMPLE_SIZE_16 = 1, 77451 HDMI_AUDIO_SAMPLE_SIZE_20 = 2, 77452 HDMI_AUDIO_SAMPLE_SIZE_24 = 3, 77453 }; 77454 77455 enum hdmi_audio_sample_frequency { 77456 HDMI_AUDIO_SAMPLE_FREQUENCY_STREAM = 0, 77457 HDMI_AUDIO_SAMPLE_FREQUENCY_32000 = 1, 77458 HDMI_AUDIO_SAMPLE_FREQUENCY_44100 = 2, 77459 HDMI_AUDIO_SAMPLE_FREQUENCY_48000 = 3, 77460 HDMI_AUDIO_SAMPLE_FREQUENCY_88200 = 4, 77461 HDMI_AUDIO_SAMPLE_FREQUENCY_96000 = 5, 77462 HDMI_AUDIO_SAMPLE_FREQUENCY_176400 = 6, 77463 HDMI_AUDIO_SAMPLE_FREQUENCY_192000 = 7, 77464 }; 77465 77466 enum hdmi_audio_coding_type_ext { 77467 HDMI_AUDIO_CODING_TYPE_EXT_CT = 0, 77468 HDMI_AUDIO_CODING_TYPE_EXT_HE_AAC = 1, 77469 HDMI_AUDIO_CODING_TYPE_EXT_HE_AAC_V2 = 2, 77470 HDMI_AUDIO_CODING_TYPE_EXT_MPEG_SURROUND = 3, 77471 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_HE_AAC = 4, 77472 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_HE_AAC_V2 = 5, 77473 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_AAC_LC = 6, 77474 HDMI_AUDIO_CODING_TYPE_EXT_DRA = 7, 77475 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_HE_AAC_SURROUND = 8, 77476 HDMI_AUDIO_CODING_TYPE_EXT_MPEG4_AAC_LC_SURROUND = 10, 77477 }; 77478 77479 struct hdmi_audio_infoframe { 77480 enum hdmi_infoframe_type type; 77481 unsigned char version; 77482 unsigned char length; 77483 unsigned char channels; 77484 enum hdmi_audio_coding_type coding_type; 77485 enum hdmi_audio_sample_size sample_size; 77486 enum hdmi_audio_sample_frequency sample_frequency; 77487 enum hdmi_audio_coding_type_ext coding_type_ext; 77488 unsigned char channel_allocation; 77489 unsigned char level_shift_value; 77490 bool downmix_inhibit; 77491 }; 77492 77493 enum hdmi_3d_structure { 77494 HDMI_3D_STRUCTURE_INVALID = 4294967295, 77495 HDMI_3D_STRUCTURE_FRAME_PACKING = 0, 77496 HDMI_3D_STRUCTURE_FIELD_ALTERNATIVE = 1, 77497 HDMI_3D_STRUCTURE_LINE_ALTERNATIVE = 2, 77498 HDMI_3D_STRUCTURE_SIDE_BY_SIDE_FULL = 3, 77499 HDMI_3D_STRUCTURE_L_DEPTH = 4, 77500 HDMI_3D_STRUCTURE_L_DEPTH_GFX_GFX_DEPTH = 5, 77501 HDMI_3D_STRUCTURE_TOP_AND_BOTTOM = 6, 77502 HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF = 8, 77503 }; 77504 77505 struct hdmi_vendor_infoframe { 77506 enum hdmi_infoframe_type type; 77507 unsigned char version; 77508 unsigned char length; 77509 unsigned int oui; 77510 u8 vic; 77511 enum hdmi_3d_structure s3d_struct; 77512 unsigned int s3d_ext_data; 77513 }; 77514 77515 union hdmi_vendor_any_infoframe { 77516 struct { 77517 enum hdmi_infoframe_type type; 77518 unsigned char version; 77519 unsigned char length; 77520 unsigned int oui; 77521 } any; 77522 struct hdmi_vendor_infoframe hdmi; 77523 }; 77524 77525 union hdmi_infoframe { 77526 struct hdmi_any_infoframe any; 77527 struct hdmi_avi_infoframe avi; 77528 struct hdmi_spd_infoframe spd; 77529 union hdmi_vendor_any_infoframe vendor; 77530 struct hdmi_audio_infoframe audio; 77531 struct hdmi_drm_infoframe drm; 77532 }; 77533 77534 struct vc { 77535 struct vc_data *d; 77536 struct work_struct SAK_work; 77537 }; 77538 77539 struct vgastate { 77540 void *vgabase; 77541 long unsigned int membase; 77542 __u32 memsize; 77543 __u32 flags; 77544 __u32 depth; 77545 __u32 num_attr; 77546 __u32 num_crtc; 77547 __u32 num_gfx; 77548 __u32 num_seq; 77549 void *vidstate; 77550 }; 77551 77552 struct linux_logo { 77553 int type; 77554 unsigned int width; 77555 unsigned int height; 77556 unsigned int clutsize; 77557 const unsigned char *clut; 77558 const unsigned char *data; 77559 }; 77560 77561 struct fb_fix_screeninfo { 77562 char id[16]; 77563 long unsigned int smem_start; 77564 __u32 smem_len; 77565 __u32 type; 77566 __u32 type_aux; 77567 __u32 visual; 77568 __u16 xpanstep; 77569 __u16 ypanstep; 77570 __u16 ywrapstep; 77571 __u32 line_length; 77572 long unsigned int mmio_start; 77573 __u32 mmio_len; 77574 __u32 accel; 77575 __u16 capabilities; 77576 __u16 reserved[2]; 77577 }; 77578 77579 struct fb_bitfield { 77580 __u32 offset; 77581 __u32 length; 77582 __u32 msb_right; 77583 }; 77584 77585 struct fb_var_screeninfo { 77586 __u32 xres; 77587 __u32 yres; 77588 __u32 xres_virtual; 77589 __u32 yres_virtual; 77590 __u32 xoffset; 77591 __u32 yoffset; 77592 __u32 bits_per_pixel; 77593 __u32 grayscale; 77594 struct fb_bitfield red; 77595 struct fb_bitfield green; 77596 struct fb_bitfield blue; 77597 struct fb_bitfield transp; 77598 __u32 nonstd; 77599 __u32 activate; 77600 __u32 height; 77601 __u32 width; 77602 __u32 accel_flags; 77603 __u32 pixclock; 77604 __u32 left_margin; 77605 __u32 right_margin; 77606 __u32 upper_margin; 77607 __u32 lower_margin; 77608 __u32 hsync_len; 77609 __u32 vsync_len; 77610 __u32 sync; 77611 __u32 vmode; 77612 __u32 rotate; 77613 __u32 colorspace; 77614 __u32 reserved[4]; 77615 }; 77616 77617 struct fb_cmap { 77618 __u32 start; 77619 __u32 len; 77620 __u16 *red; 77621 __u16 *green; 77622 __u16 *blue; 77623 __u16 *transp; 77624 }; 77625 77626 enum { 77627 FB_BLANK_UNBLANK = 0, 77628 FB_BLANK_NORMAL = 1, 77629 FB_BLANK_VSYNC_SUSPEND = 2, 77630 FB_BLANK_HSYNC_SUSPEND = 3, 77631 FB_BLANK_POWERDOWN = 4, 77632 }; 77633 77634 struct fb_copyarea { 77635 __u32 dx; 77636 __u32 dy; 77637 __u32 width; 77638 __u32 height; 77639 __u32 sx; 77640 __u32 sy; 77641 }; 77642 77643 struct fb_fillrect { 77644 __u32 dx; 77645 __u32 dy; 77646 __u32 width; 77647 __u32 height; 77648 __u32 color; 77649 __u32 rop; 77650 }; 77651 77652 struct fb_image { 77653 __u32 dx; 77654 __u32 dy; 77655 __u32 width; 77656 __u32 height; 77657 __u32 fg_color; 77658 __u32 bg_color; 77659 __u8 depth; 77660 const char *data; 77661 struct fb_cmap cmap; 77662 }; 77663 77664 struct fbcurpos { 77665 __u16 x; 77666 __u16 y; 77667 }; 77668 77669 struct fb_cursor { 77670 __u16 set; 77671 __u16 enable; 77672 __u16 rop; 77673 const char *mask; 77674 struct fbcurpos hot; 77675 struct fb_image image; 77676 }; 77677 77678 struct fb_chroma { 77679 __u32 redx; 77680 __u32 greenx; 77681 __u32 bluex; 77682 __u32 whitex; 77683 __u32 redy; 77684 __u32 greeny; 77685 __u32 bluey; 77686 __u32 whitey; 77687 }; 77688 77689 struct fb_videomode; 77690 77691 struct fb_monspecs { 77692 struct fb_chroma chroma; 77693 struct fb_videomode *modedb; 77694 __u8 manufacturer[4]; 77695 __u8 monitor[14]; 77696 __u8 serial_no[14]; 77697 __u8 ascii[14]; 77698 __u32 modedb_len; 77699 __u32 model; 77700 __u32 serial; 77701 __u32 year; 77702 __u32 week; 77703 __u32 hfmin; 77704 __u32 hfmax; 77705 __u32 dclkmin; 77706 __u32 dclkmax; 77707 __u16 input; 77708 __u16 dpms; 77709 __u16 signal; 77710 __u16 vfmin; 77711 __u16 vfmax; 77712 __u16 gamma; 77713 __u16 gtf: 1; 77714 __u16 misc; 77715 __u8 version; 77716 __u8 revision; 77717 __u8 max_x; 77718 __u8 max_y; 77719 }; 77720 77721 struct fb_videomode { 77722 const char *name; 77723 u32 refresh; 77724 u32 xres; 77725 u32 yres; 77726 u32 pixclock; 77727 u32 left_margin; 77728 u32 right_margin; 77729 u32 upper_margin; 77730 u32 lower_margin; 77731 u32 hsync_len; 77732 u32 vsync_len; 77733 u32 sync; 77734 u32 vmode; 77735 u32 flag; 77736 }; 77737 77738 struct fb_info; 77739 77740 struct fb_event { 77741 struct fb_info *info; 77742 void *data; 77743 }; 77744 77745 struct fb_pixmap { 77746 u8 *addr; 77747 u32 size; 77748 u32 offset; 77749 u32 buf_align; 77750 u32 scan_align; 77751 u32 access_align; 77752 u32 flags; 77753 u32 blit_x; 77754 u32 blit_y; 77755 void (*writeio)(struct fb_info *, void *, void *, unsigned int); 77756 void (*readio)(struct fb_info *, void *, void *, unsigned int); 77757 }; 77758 77759 struct fb_deferred_io; 77760 77761 struct fb_ops; 77762 77763 struct fb_tile_ops; 77764 77765 struct apertures_struct; 77766 77767 struct fb_info { 77768 atomic_t count; 77769 int node; 77770 int flags; 77771 int fbcon_rotate_hint; 77772 struct mutex lock; 77773 struct mutex mm_lock; 77774 struct fb_var_screeninfo var; 77775 struct fb_fix_screeninfo fix; 77776 struct fb_monspecs monspecs; 77777 struct work_struct queue; 77778 struct fb_pixmap pixmap; 77779 struct fb_pixmap sprite; 77780 struct fb_cmap cmap; 77781 struct list_head modelist; 77782 struct fb_videomode *mode; 77783 struct delayed_work deferred_work; 77784 struct fb_deferred_io *fbdefio; 77785 const struct fb_ops *fbops; 77786 struct device *device; 77787 struct device *dev; 77788 int class_flag; 77789 struct fb_tile_ops *tileops; 77790 union { 77791 char *screen_base; 77792 char *screen_buffer; 77793 }; 77794 long unsigned int screen_size; 77795 void *pseudo_palette; 77796 u32 state; 77797 void *fbcon_par; 77798 void *par; 77799 struct apertures_struct *apertures; 77800 bool skip_vt_switch; 77801 }; 77802 77803 struct fb_blit_caps { 77804 u32 x; 77805 u32 y; 77806 u32 len; 77807 u32 flags; 77808 }; 77809 77810 struct fb_deferred_io { 77811 long unsigned int delay; 77812 struct mutex lock; 77813 struct list_head pagelist; 77814 void (*first_io)(struct fb_info *); 77815 void (*deferred_io)(struct fb_info *, struct list_head *); 77816 }; 77817 77818 struct fb_ops { 77819 struct module *owner; 77820 int (*fb_open)(struct fb_info *, int); 77821 int (*fb_release)(struct fb_info *, int); 77822 ssize_t (*fb_read)(struct fb_info *, char *, size_t, loff_t *); 77823 ssize_t (*fb_write)(struct fb_info *, const char *, size_t, loff_t *); 77824 int (*fb_check_var)(struct fb_var_screeninfo *, struct fb_info *); 77825 int (*fb_set_par)(struct fb_info *); 77826 int (*fb_setcolreg)(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, struct fb_info *); 77827 int (*fb_setcmap)(struct fb_cmap *, struct fb_info *); 77828 int (*fb_blank)(int, struct fb_info *); 77829 int (*fb_pan_display)(struct fb_var_screeninfo *, struct fb_info *); 77830 void (*fb_fillrect)(struct fb_info *, const struct fb_fillrect *); 77831 void (*fb_copyarea)(struct fb_info *, const struct fb_copyarea *); 77832 void (*fb_imageblit)(struct fb_info *, const struct fb_image *); 77833 int (*fb_cursor)(struct fb_info *, struct fb_cursor *); 77834 int (*fb_sync)(struct fb_info *); 77835 int (*fb_ioctl)(struct fb_info *, unsigned int, long unsigned int); 77836 int (*fb_compat_ioctl)(struct fb_info *, unsigned int, long unsigned int); 77837 int (*fb_mmap)(struct fb_info *, struct vm_area_struct *); 77838 void (*fb_get_caps)(struct fb_info *, struct fb_blit_caps *, struct fb_var_screeninfo *); 77839 void (*fb_destroy)(struct fb_info *); 77840 int (*fb_debug_enter)(struct fb_info *); 77841 int (*fb_debug_leave)(struct fb_info *); 77842 }; 77843 77844 struct fb_tilemap { 77845 __u32 width; 77846 __u32 height; 77847 __u32 depth; 77848 __u32 length; 77849 const __u8 *data; 77850 }; 77851 77852 struct fb_tilerect { 77853 __u32 sx; 77854 __u32 sy; 77855 __u32 width; 77856 __u32 height; 77857 __u32 index; 77858 __u32 fg; 77859 __u32 bg; 77860 __u32 rop; 77861 }; 77862 77863 struct fb_tilearea { 77864 __u32 sx; 77865 __u32 sy; 77866 __u32 dx; 77867 __u32 dy; 77868 __u32 width; 77869 __u32 height; 77870 }; 77871 77872 struct fb_tileblit { 77873 __u32 sx; 77874 __u32 sy; 77875 __u32 width; 77876 __u32 height; 77877 __u32 fg; 77878 __u32 bg; 77879 __u32 length; 77880 __u32 *indices; 77881 }; 77882 77883 struct fb_tilecursor { 77884 __u32 sx; 77885 __u32 sy; 77886 __u32 mode; 77887 __u32 shape; 77888 __u32 fg; 77889 __u32 bg; 77890 }; 77891 77892 struct fb_tile_ops { 77893 void (*fb_settile)(struct fb_info *, struct fb_tilemap *); 77894 void (*fb_tilecopy)(struct fb_info *, struct fb_tilearea *); 77895 void (*fb_tilefill)(struct fb_info *, struct fb_tilerect *); 77896 void (*fb_tileblit)(struct fb_info *, struct fb_tileblit *); 77897 void (*fb_tilecursor)(struct fb_info *, struct fb_tilecursor *); 77898 int (*fb_get_tilemax)(struct fb_info *); 77899 }; 77900 77901 struct aperture { 77902 resource_size_t base; 77903 resource_size_t size; 77904 }; 77905 77906 struct apertures_struct { 77907 unsigned int count; 77908 struct aperture ranges[0]; 77909 }; 77910 77911 enum backlight_update_reason { 77912 BACKLIGHT_UPDATE_HOTKEY = 0, 77913 BACKLIGHT_UPDATE_SYSFS = 1, 77914 }; 77915 77916 enum backlight_type { 77917 BACKLIGHT_RAW = 1, 77918 BACKLIGHT_PLATFORM = 2, 77919 BACKLIGHT_FIRMWARE = 3, 77920 BACKLIGHT_TYPE_MAX = 4, 77921 }; 77922 77923 enum backlight_notification { 77924 BACKLIGHT_REGISTERED = 0, 77925 BACKLIGHT_UNREGISTERED = 1, 77926 }; 77927 77928 enum backlight_scale { 77929 BACKLIGHT_SCALE_UNKNOWN = 0, 77930 BACKLIGHT_SCALE_LINEAR = 1, 77931 BACKLIGHT_SCALE_NON_LINEAR = 2, 77932 }; 77933 77934 struct backlight_device; 77935 77936 struct backlight_ops { 77937 unsigned int options; 77938 int (*update_status)(struct backlight_device *); 77939 int (*get_brightness)(struct backlight_device *); 77940 int (*check_fb)(struct backlight_device *, struct fb_info *); 77941 }; 77942 77943 struct backlight_properties { 77944 int brightness; 77945 int max_brightness; 77946 int power; 77947 int fb_blank; 77948 enum backlight_type type; 77949 unsigned int state; 77950 enum backlight_scale scale; 77951 }; 77952 77953 struct backlight_device { 77954 struct backlight_properties props; 77955 struct mutex update_lock; 77956 struct mutex ops_lock; 77957 const struct backlight_ops *ops; 77958 struct notifier_block fb_notif; 77959 struct list_head entry; 77960 struct device dev; 77961 bool fb_bl_on[32]; 77962 int use_count; 77963 }; 77964 77965 struct fb_cmap_user { 77966 __u32 start; 77967 __u32 len; 77968 __u16 *red; 77969 __u16 *green; 77970 __u16 *blue; 77971 __u16 *transp; 77972 }; 77973 77974 struct fb_modelist { 77975 struct list_head list; 77976 struct fb_videomode mode; 77977 }; 77978 77979 struct logo_data { 77980 int depth; 77981 int needs_directpalette; 77982 int needs_truepalette; 77983 int needs_cmapreset; 77984 const struct linux_logo *logo; 77985 }; 77986 77987 struct fb_fix_screeninfo32 { 77988 char id[16]; 77989 compat_caddr_t smem_start; 77990 u32 smem_len; 77991 u32 type; 77992 u32 type_aux; 77993 u32 visual; 77994 u16 xpanstep; 77995 u16 ypanstep; 77996 u16 ywrapstep; 77997 u32 line_length; 77998 compat_caddr_t mmio_start; 77999 u32 mmio_len; 78000 u32 accel; 78001 u16 reserved[3]; 78002 }; 78003 78004 struct fb_cmap32 { 78005 u32 start; 78006 u32 len; 78007 compat_caddr_t red; 78008 compat_caddr_t green; 78009 compat_caddr_t blue; 78010 compat_caddr_t transp; 78011 }; 78012 78013 struct fb_cvt_data { 78014 u32 xres; 78015 u32 yres; 78016 u32 refresh; 78017 u32 f_refresh; 78018 u32 pixclock; 78019 u32 hperiod; 78020 u32 hblank; 78021 u32 hfreq; 78022 u32 htotal; 78023 u32 vtotal; 78024 u32 vsync; 78025 u32 hsync; 78026 u32 h_front_porch; 78027 u32 h_back_porch; 78028 u32 v_front_porch; 78029 u32 v_back_porch; 78030 u32 h_margin; 78031 u32 v_margin; 78032 u32 interlace; 78033 u32 aspect_ratio; 78034 u32 active_pixels; 78035 u32 flags; 78036 u32 status; 78037 }; 78038 78039 typedef unsigned char u_char; 78040 78041 typedef short unsigned int u_short; 78042 78043 struct fb_con2fbmap { 78044 __u32 console; 78045 __u32 framebuffer; 78046 }; 78047 78048 struct fbcon_display { 78049 const u_char *fontdata; 78050 int userfont; 78051 u_short scrollmode; 78052 u_short inverse; 78053 short int yscroll; 78054 int vrows; 78055 int cursor_shape; 78056 int con_rotate; 78057 u32 xres_virtual; 78058 u32 yres_virtual; 78059 u32 height; 78060 u32 width; 78061 u32 bits_per_pixel; 78062 u32 grayscale; 78063 u32 nonstd; 78064 u32 accel_flags; 78065 u32 rotate; 78066 struct fb_bitfield red; 78067 struct fb_bitfield green; 78068 struct fb_bitfield blue; 78069 struct fb_bitfield transp; 78070 const struct fb_videomode *mode; 78071 }; 78072 78073 struct fbcon_ops { 78074 void (*bmove)(struct vc_data *, struct fb_info *, int, int, int, int, int, int); 78075 void (*clear)(struct vc_data *, struct fb_info *, int, int, int, int); 78076 void (*putcs)(struct vc_data *, struct fb_info *, const short unsigned int *, int, int, int, int, int); 78077 void (*clear_margins)(struct vc_data *, struct fb_info *, int, int); 78078 void (*cursor)(struct vc_data *, struct fb_info *, int, int, int); 78079 int (*update_start)(struct fb_info *); 78080 int (*rotate_font)(struct fb_info *, struct vc_data *); 78081 struct fb_var_screeninfo var; 78082 struct timer_list cursor_timer; 78083 struct fb_cursor cursor_state; 78084 struct fbcon_display *p; 78085 struct fb_info *info; 78086 int currcon; 78087 int cur_blink_jiffies; 78088 int cursor_flash; 78089 int cursor_reset; 78090 int blank_state; 78091 int graphics; 78092 int save_graphics; 78093 int flags; 78094 int rotate; 78095 int cur_rotate; 78096 char *cursor_data; 78097 u8 *fontbuffer; 78098 u8 *fontdata; 78099 u8 *cursor_src; 78100 u32 cursor_size; 78101 u32 fd_size; 78102 }; 78103 78104 enum { 78105 FBCON_LOGO_CANSHOW = 4294967295, 78106 FBCON_LOGO_DRAW = 4294967294, 78107 FBCON_LOGO_DONTSHOW = 4294967293, 78108 }; 78109 78110 typedef uint32_t evtchn_port_t; 78111 78112 struct xenfb_update { 78113 uint8_t type; 78114 int32_t x; 78115 int32_t y; 78116 int32_t width; 78117 int32_t height; 78118 }; 78119 78120 struct xenfb_resize { 78121 uint8_t type; 78122 int32_t width; 78123 int32_t height; 78124 int32_t stride; 78125 int32_t depth; 78126 int32_t offset; 78127 }; 78128 78129 union xenfb_out_event { 78130 uint8_t type; 78131 struct xenfb_update update; 78132 struct xenfb_resize resize; 78133 char pad[40]; 78134 }; 78135 78136 struct xenfb_page { 78137 uint32_t in_cons; 78138 uint32_t in_prod; 78139 uint32_t out_cons; 78140 uint32_t out_prod; 78141 int32_t width; 78142 int32_t height; 78143 uint32_t line_length; 78144 uint32_t mem_length; 78145 uint8_t depth; 78146 long unsigned int pd[256]; 78147 }; 78148 78149 enum xenbus_state { 78150 XenbusStateUnknown = 0, 78151 XenbusStateInitialising = 1, 78152 XenbusStateInitWait = 2, 78153 XenbusStateInitialised = 3, 78154 XenbusStateConnected = 4, 78155 XenbusStateClosing = 5, 78156 XenbusStateClosed = 6, 78157 XenbusStateReconfiguring = 7, 78158 XenbusStateReconfigured = 8, 78159 }; 78160 78161 struct xsd_errors { 78162 int errnum; 78163 const char *errstring; 78164 }; 78165 78166 struct xenbus_watch { 78167 struct list_head list; 78168 const char *node; 78169 unsigned int nr_pending; 78170 bool (*will_handle)(struct xenbus_watch *, const char *, const char *); 78171 void (*callback)(struct xenbus_watch *, const char *, const char *); 78172 }; 78173 78174 struct xenbus_device { 78175 const char *devicetype; 78176 const char *nodename; 78177 const char *otherend; 78178 int otherend_id; 78179 struct xenbus_watch otherend_watch; 78180 struct device dev; 78181 enum xenbus_state state; 78182 struct completion down; 78183 struct work_struct work; 78184 struct semaphore reclaim_sem; 78185 }; 78186 78187 struct xenbus_device_id { 78188 char devicetype[32]; 78189 }; 78190 78191 struct xenbus_driver { 78192 const char *name; 78193 const struct xenbus_device_id *ids; 78194 bool allow_rebind; 78195 int (*probe)(struct xenbus_device *, const struct xenbus_device_id *); 78196 void (*otherend_changed)(struct xenbus_device *, enum xenbus_state); 78197 int (*remove)(struct xenbus_device *); 78198 int (*suspend)(struct xenbus_device *); 78199 int (*resume)(struct xenbus_device *); 78200 int (*uevent)(struct xenbus_device *, struct kobj_uevent_env *); 78201 struct device_driver driver; 78202 int (*read_otherend_details)(struct xenbus_device *); 78203 int (*is_ready)(struct xenbus_device *); 78204 void (*reclaim_memory)(struct xenbus_device *); 78205 }; 78206 78207 struct xenbus_transaction { 78208 u32 id; 78209 }; 78210 78211 struct xenfb_info { 78212 unsigned char *fb; 78213 struct fb_info *fb_info; 78214 int x1; 78215 int y1; 78216 int x2; 78217 int y2; 78218 spinlock_t dirty_lock; 78219 int nr_pages; 78220 int irq; 78221 struct xenfb_page *page; 78222 long unsigned int *gfns; 78223 int update_wanted; 78224 int feature_resize; 78225 struct xenfb_resize resize; 78226 int resize_dpy; 78227 spinlock_t resize_lock; 78228 struct xenbus_device *xbdev; 78229 }; 78230 78231 enum { 78232 KPARAM_MEM = 0, 78233 KPARAM_WIDTH = 1, 78234 KPARAM_HEIGHT = 2, 78235 KPARAM_CNT = 3, 78236 }; 78237 78238 struct vesafb_par { 78239 u32 pseudo_palette[256]; 78240 int wc_cookie; 78241 struct resource *region; 78242 }; 78243 78244 struct acpi_table_bgrt { 78245 struct acpi_table_header header; 78246 u16 version; 78247 u8 status; 78248 u8 image_type; 78249 u64 image_address; 78250 u32 image_offset_x; 78251 u32 image_offset_y; 78252 }; 78253 78254 enum drm_panel_orientation { 78255 DRM_MODE_PANEL_ORIENTATION_UNKNOWN = 4294967295, 78256 DRM_MODE_PANEL_ORIENTATION_NORMAL = 0, 78257 DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP = 1, 78258 DRM_MODE_PANEL_ORIENTATION_LEFT_UP = 2, 78259 DRM_MODE_PANEL_ORIENTATION_RIGHT_UP = 3, 78260 }; 78261 78262 struct bmp_file_header { 78263 u16 id; 78264 u32 file_size; 78265 u32 reserved; 78266 u32 bitmap_offset; 78267 } __attribute__((packed)); 78268 78269 struct bmp_dib_header { 78270 u32 dib_header_size; 78271 s32 width; 78272 s32 height; 78273 u16 planes; 78274 u16 bpp; 78275 u32 compression; 78276 u32 bitmap_size; 78277 u32 horz_resolution; 78278 u32 vert_resolution; 78279 u32 colors_used; 78280 u32 colors_important; 78281 }; 78282 78283 struct thermal_cooling_device_ops; 78284 78285 struct thermal_cooling_device { 78286 int id; 78287 char type[20]; 78288 struct device device; 78289 struct device_node *np; 78290 void *devdata; 78291 void *stats; 78292 const struct thermal_cooling_device_ops *ops; 78293 bool updated; 78294 struct mutex lock; 78295 struct list_head thermal_instances; 78296 struct list_head node; 78297 }; 78298 78299 struct idle_cpu { 78300 struct cpuidle_state *state_table; 78301 long unsigned int auto_demotion_disable_flags; 78302 bool byt_auto_demotion_disable_flag; 78303 bool disable_promotion_to_c1e; 78304 bool use_acpi; 78305 }; 78306 78307 struct thermal_cooling_device_ops { 78308 int (*get_max_state)(struct thermal_cooling_device *, long unsigned int *); 78309 int (*get_cur_state)(struct thermal_cooling_device *, long unsigned int *); 78310 int (*set_cur_state)(struct thermal_cooling_device *, long unsigned int); 78311 int (*get_requested_power)(struct thermal_cooling_device *, u32 *); 78312 int (*state2power)(struct thermal_cooling_device *, long unsigned int, u32 *); 78313 int (*power2state)(struct thermal_cooling_device *, u32, long unsigned int *); 78314 }; 78315 78316 struct acpi_lpi_state { 78317 u32 min_residency; 78318 u32 wake_latency; 78319 u32 flags; 78320 u32 arch_flags; 78321 u32 res_cnt_freq; 78322 u32 enable_parent_state; 78323 u64 address; 78324 u8 index; 78325 u8 entry_method; 78326 char desc[32]; 78327 }; 78328 78329 struct acpi_processor_power { 78330 int count; 78331 union { 78332 struct acpi_processor_cx states[8]; 78333 struct acpi_lpi_state lpi_states[8]; 78334 }; 78335 int timer_broadcast_on_state; 78336 }; 78337 78338 struct acpi_psd_package { 78339 u64 num_entries; 78340 u64 revision; 78341 u64 domain; 78342 u64 coord_type; 78343 u64 num_processors; 78344 }; 78345 78346 struct acpi_pct_register { 78347 u8 descriptor; 78348 u16 length; 78349 u8 space_id; 78350 u8 bit_width; 78351 u8 bit_offset; 78352 u8 reserved; 78353 u64 address; 78354 } __attribute__((packed)); 78355 78356 struct acpi_processor_px { 78357 u64 core_frequency; 78358 u64 power; 78359 u64 transition_latency; 78360 u64 bus_master_latency; 78361 u64 control; 78362 u64 status; 78363 }; 78364 78365 struct acpi_processor_performance { 78366 unsigned int state; 78367 unsigned int platform_limit; 78368 struct acpi_pct_register control_register; 78369 struct acpi_pct_register status_register; 78370 short: 16; 78371 unsigned int state_count; 78372 int: 32; 78373 struct acpi_processor_px *states; 78374 struct acpi_psd_package domain_info; 78375 cpumask_var_t shared_cpu_map; 78376 unsigned int shared_type; 78377 int: 32; 78378 } __attribute__((packed)); 78379 78380 struct acpi_tsd_package { 78381 u64 num_entries; 78382 u64 revision; 78383 u64 domain; 78384 u64 coord_type; 78385 u64 num_processors; 78386 }; 78387 78388 struct acpi_processor_tx_tss { 78389 u64 freqpercentage; 78390 u64 power; 78391 u64 transition_latency; 78392 u64 control; 78393 u64 status; 78394 }; 78395 78396 struct acpi_processor_tx { 78397 u16 power; 78398 u16 performance; 78399 }; 78400 78401 struct acpi_processor; 78402 78403 struct acpi_processor_throttling { 78404 unsigned int state; 78405 unsigned int platform_limit; 78406 struct acpi_pct_register control_register; 78407 struct acpi_pct_register status_register; 78408 short: 16; 78409 unsigned int state_count; 78410 int: 32; 78411 struct acpi_processor_tx_tss *states_tss; 78412 struct acpi_tsd_package domain_info; 78413 cpumask_var_t shared_cpu_map; 78414 int (*acpi_processor_get_throttling)(struct acpi_processor *); 78415 int (*acpi_processor_set_throttling)(struct acpi_processor *, int, bool); 78416 u32 address; 78417 u8 duty_offset; 78418 u8 duty_width; 78419 u8 tsd_valid_flag; 78420 char: 8; 78421 unsigned int shared_type; 78422 struct acpi_processor_tx states[16]; 78423 int: 32; 78424 } __attribute__((packed)); 78425 78426 struct acpi_processor_lx { 78427 int px; 78428 int tx; 78429 }; 78430 78431 struct acpi_processor_limit { 78432 struct acpi_processor_lx state; 78433 struct acpi_processor_lx thermal; 78434 struct acpi_processor_lx user; 78435 }; 78436 78437 struct acpi_processor { 78438 acpi_handle handle; 78439 u32 acpi_id; 78440 phys_cpuid_t phys_id; 78441 u32 id; 78442 u32 pblk; 78443 int performance_platform_limit; 78444 int throttling_platform_limit; 78445 struct acpi_processor_flags flags; 78446 struct acpi_processor_power power; 78447 struct acpi_processor_performance *performance; 78448 struct acpi_processor_throttling throttling; 78449 struct acpi_processor_limit limit; 78450 struct thermal_cooling_device *cdev; 78451 struct device *dev; 78452 struct freq_qos_request perflib_req; 78453 struct freq_qos_request thermal_req; 78454 }; 78455 78456 enum ipmi_addr_src { 78457 SI_INVALID = 0, 78458 SI_HOTMOD = 1, 78459 SI_HARDCODED = 2, 78460 SI_SPMI = 3, 78461 SI_ACPI = 4, 78462 SI_SMBIOS = 5, 78463 SI_PCI = 6, 78464 SI_DEVICETREE = 7, 78465 SI_PLATFORM = 8, 78466 SI_LAST = 9, 78467 }; 78468 78469 struct dmi_header { 78470 u8 type; 78471 u8 length; 78472 u16 handle; 78473 }; 78474 78475 enum si_type { 78476 SI_TYPE_INVALID = 0, 78477 SI_KCS = 1, 78478 SI_SMIC = 2, 78479 SI_BT = 3, 78480 }; 78481 78482 enum ipmi_addr_space { 78483 IPMI_IO_ADDR_SPACE = 0, 78484 IPMI_MEM_ADDR_SPACE = 1, 78485 }; 78486 78487 enum ipmi_plat_interface_type { 78488 IPMI_PLAT_IF_SI = 0, 78489 IPMI_PLAT_IF_SSIF = 1, 78490 }; 78491 78492 struct ipmi_plat_data { 78493 enum ipmi_plat_interface_type iftype; 78494 unsigned int type; 78495 unsigned int space; 78496 long unsigned int addr; 78497 unsigned int regspacing; 78498 unsigned int regsize; 78499 unsigned int regshift; 78500 unsigned int irq; 78501 unsigned int slave_addr; 78502 enum ipmi_addr_src addr_source; 78503 }; 78504 78505 struct ipmi_dmi_info { 78506 enum si_type si_type; 78507 unsigned int space; 78508 long unsigned int addr; 78509 u8 slave_addr; 78510 struct ipmi_dmi_info *next; 78511 }; 78512 78513 typedef u16 acpi_owner_id; 78514 78515 union acpi_name_union { 78516 u32 integer; 78517 char ascii[4]; 78518 }; 78519 78520 struct acpi_table_desc { 78521 acpi_physical_address address; 78522 struct acpi_table_header *pointer; 78523 u32 length; 78524 union acpi_name_union signature; 78525 acpi_owner_id owner_id; 78526 u8 flags; 78527 u16 validation_count; 78528 }; 78529 78530 struct acpi_madt_io_sapic { 78531 struct acpi_subtable_header header; 78532 u8 id; 78533 u8 reserved; 78534 u32 global_irq_base; 78535 u64 address; 78536 }; 78537 78538 struct acpi_madt_interrupt_source { 78539 struct acpi_subtable_header header; 78540 u16 inti_flags; 78541 u8 type; 78542 u8 id; 78543 u8 eid; 78544 u8 io_sapic_vector; 78545 u32 global_irq; 78546 u32 flags; 78547 }; 78548 78549 struct acpi_madt_generic_interrupt { 78550 struct acpi_subtable_header header; 78551 u16 reserved; 78552 u32 cpu_interface_number; 78553 u32 uid; 78554 u32 flags; 78555 u32 parking_version; 78556 u32 performance_interrupt; 78557 u64 parked_address; 78558 u64 base_address; 78559 u64 gicv_base_address; 78560 u64 gich_base_address; 78561 u32 vgic_interrupt; 78562 u64 gicr_base_address; 78563 u64 arm_mpidr; 78564 u8 efficiency_class; 78565 u8 reserved2[1]; 78566 u16 spe_interrupt; 78567 } __attribute__((packed)); 78568 78569 struct acpi_madt_generic_distributor { 78570 struct acpi_subtable_header header; 78571 u16 reserved; 78572 u32 gic_id; 78573 u64 base_address; 78574 u32 global_irq_base; 78575 u8 version; 78576 u8 reserved2[3]; 78577 }; 78578 78579 enum acpi_subtable_type { 78580 ACPI_SUBTABLE_COMMON = 0, 78581 ACPI_SUBTABLE_HMAT = 1, 78582 }; 78583 78584 struct acpi_subtable_entry { 78585 union acpi_subtable_headers *hdr; 78586 enum acpi_subtable_type type; 78587 }; 78588 78589 enum acpi_predicate { 78590 all_versions = 0, 78591 less_than_or_equal = 1, 78592 equal = 2, 78593 greater_than_or_equal = 3, 78594 }; 78595 78596 struct acpi_platform_list { 78597 char oem_id[7]; 78598 char oem_table_id[9]; 78599 u32 oem_revision; 78600 char *table; 78601 enum acpi_predicate pred; 78602 char *reason; 78603 u32 data; 78604 }; 78605 78606 typedef u32 (*acpi_interface_handler)(acpi_string, u32); 78607 78608 struct acpi_osi_entry { 78609 char string[64]; 78610 bool enable; 78611 }; 78612 78613 struct acpi_osi_config { 78614 u8 default_disabling; 78615 unsigned int linux_enable: 1; 78616 unsigned int linux_dmi: 1; 78617 unsigned int linux_cmdline: 1; 78618 unsigned int darwin_enable: 1; 78619 unsigned int darwin_dmi: 1; 78620 unsigned int darwin_cmdline: 1; 78621 }; 78622 78623 struct acpi_predefined_names { 78624 const char *name; 78625 u8 type; 78626 char *val; 78627 }; 78628 78629 typedef u32 (*acpi_osd_handler)(void *); 78630 78631 typedef void (*acpi_osd_exec_callback)(void *); 78632 78633 typedef u32 (*acpi_gpe_handler)(acpi_handle, u32, void *); 78634 78635 struct acpi_pci_id { 78636 u16 segment; 78637 u16 bus; 78638 u16 device; 78639 u16 function; 78640 }; 78641 78642 struct acpi_mem_mapping { 78643 acpi_physical_address physical_address; 78644 u8 *logical_address; 78645 acpi_size length; 78646 struct acpi_mem_mapping *next_mm; 78647 }; 78648 78649 struct acpi_mem_space_context { 78650 u32 length; 78651 acpi_physical_address address; 78652 struct acpi_mem_mapping *cur_mm; 78653 struct acpi_mem_mapping *first_mm; 78654 }; 78655 78656 typedef enum { 78657 OSL_GLOBAL_LOCK_HANDLER = 0, 78658 OSL_NOTIFY_HANDLER = 1, 78659 OSL_GPE_HANDLER = 2, 78660 OSL_DEBUGGER_MAIN_THREAD = 3, 78661 OSL_DEBUGGER_EXEC_THREAD = 4, 78662 OSL_EC_POLL_HANDLER = 5, 78663 OSL_EC_BURST_HANDLER = 6, 78664 } acpi_execute_type; 78665 78666 union acpi_operand_object; 78667 78668 struct acpi_namespace_node { 78669 union acpi_operand_object *object; 78670 u8 descriptor_type; 78671 u8 type; 78672 u16 flags; 78673 union acpi_name_union name; 78674 struct acpi_namespace_node *parent; 78675 struct acpi_namespace_node *child; 78676 struct acpi_namespace_node *peer; 78677 acpi_owner_id owner_id; 78678 }; 78679 78680 struct acpi_object_common { 78681 union acpi_operand_object *next_object; 78682 u8 descriptor_type; 78683 u8 type; 78684 u16 reference_count; 78685 u8 flags; 78686 }; 78687 78688 struct acpi_object_integer { 78689 union acpi_operand_object *next_object; 78690 u8 descriptor_type; 78691 u8 type; 78692 u16 reference_count; 78693 u8 flags; 78694 u8 fill[3]; 78695 u64 value; 78696 }; 78697 78698 struct acpi_object_string { 78699 union acpi_operand_object *next_object; 78700 u8 descriptor_type; 78701 u8 type; 78702 u16 reference_count; 78703 u8 flags; 78704 char *pointer; 78705 u32 length; 78706 }; 78707 78708 struct acpi_object_buffer { 78709 union acpi_operand_object *next_object; 78710 u8 descriptor_type; 78711 u8 type; 78712 u16 reference_count; 78713 u8 flags; 78714 u8 *pointer; 78715 u32 length; 78716 u32 aml_length; 78717 u8 *aml_start; 78718 struct acpi_namespace_node *node; 78719 }; 78720 78721 struct acpi_object_package { 78722 union acpi_operand_object *next_object; 78723 u8 descriptor_type; 78724 u8 type; 78725 u16 reference_count; 78726 u8 flags; 78727 struct acpi_namespace_node *node; 78728 union acpi_operand_object **elements; 78729 u8 *aml_start; 78730 u32 aml_length; 78731 u32 count; 78732 }; 78733 78734 struct acpi_object_event { 78735 union acpi_operand_object *next_object; 78736 u8 descriptor_type; 78737 u8 type; 78738 u16 reference_count; 78739 u8 flags; 78740 void *os_semaphore; 78741 }; 78742 78743 struct acpi_walk_state; 78744 78745 typedef acpi_status (*acpi_internal_method)(struct acpi_walk_state *); 78746 78747 struct acpi_object_method { 78748 union acpi_operand_object *next_object; 78749 u8 descriptor_type; 78750 u8 type; 78751 u16 reference_count; 78752 u8 flags; 78753 u8 info_flags; 78754 u8 param_count; 78755 u8 sync_level; 78756 union acpi_operand_object *mutex; 78757 union acpi_operand_object *node; 78758 u8 *aml_start; 78759 union { 78760 acpi_internal_method implementation; 78761 union acpi_operand_object *handler; 78762 } dispatch; 78763 u32 aml_length; 78764 acpi_owner_id owner_id; 78765 u8 thread_count; 78766 }; 78767 78768 struct acpi_thread_state; 78769 78770 struct acpi_object_mutex { 78771 union acpi_operand_object *next_object; 78772 u8 descriptor_type; 78773 u8 type; 78774 u16 reference_count; 78775 u8 flags; 78776 u8 sync_level; 78777 u16 acquisition_depth; 78778 void *os_mutex; 78779 u64 thread_id; 78780 struct acpi_thread_state *owner_thread; 78781 union acpi_operand_object *prev; 78782 union acpi_operand_object *next; 78783 struct acpi_namespace_node *node; 78784 u8 original_sync_level; 78785 }; 78786 78787 struct acpi_object_region { 78788 union acpi_operand_object *next_object; 78789 u8 descriptor_type; 78790 u8 type; 78791 u16 reference_count; 78792 u8 flags; 78793 u8 space_id; 78794 struct acpi_namespace_node *node; 78795 union acpi_operand_object *handler; 78796 union acpi_operand_object *next; 78797 acpi_physical_address address; 78798 u32 length; 78799 }; 78800 78801 struct acpi_object_notify_common { 78802 union acpi_operand_object *next_object; 78803 u8 descriptor_type; 78804 u8 type; 78805 u16 reference_count; 78806 u8 flags; 78807 union acpi_operand_object *notify_list[2]; 78808 union acpi_operand_object *handler; 78809 }; 78810 78811 struct acpi_gpe_block_info; 78812 78813 struct acpi_object_device { 78814 union acpi_operand_object *next_object; 78815 u8 descriptor_type; 78816 u8 type; 78817 u16 reference_count; 78818 u8 flags; 78819 union acpi_operand_object *notify_list[2]; 78820 union acpi_operand_object *handler; 78821 struct acpi_gpe_block_info *gpe_block; 78822 }; 78823 78824 struct acpi_object_power_resource { 78825 union acpi_operand_object *next_object; 78826 u8 descriptor_type; 78827 u8 type; 78828 u16 reference_count; 78829 u8 flags; 78830 union acpi_operand_object *notify_list[2]; 78831 union acpi_operand_object *handler; 78832 u32 system_level; 78833 u32 resource_order; 78834 }; 78835 78836 struct acpi_object_processor { 78837 union acpi_operand_object *next_object; 78838 u8 descriptor_type; 78839 u8 type; 78840 u16 reference_count; 78841 u8 flags; 78842 u8 proc_id; 78843 u8 length; 78844 union acpi_operand_object *notify_list[2]; 78845 union acpi_operand_object *handler; 78846 acpi_io_address address; 78847 }; 78848 78849 struct acpi_object_thermal_zone { 78850 union acpi_operand_object *next_object; 78851 u8 descriptor_type; 78852 u8 type; 78853 u16 reference_count; 78854 u8 flags; 78855 union acpi_operand_object *notify_list[2]; 78856 union acpi_operand_object *handler; 78857 }; 78858 78859 struct acpi_object_field_common { 78860 union acpi_operand_object *next_object; 78861 u8 descriptor_type; 78862 u8 type; 78863 u16 reference_count; 78864 u8 flags; 78865 u8 field_flags; 78866 u8 attribute; 78867 u8 access_byte_width; 78868 struct acpi_namespace_node *node; 78869 u32 bit_length; 78870 u32 base_byte_offset; 78871 u32 value; 78872 u8 start_field_bit_offset; 78873 u8 access_length; 78874 union acpi_operand_object *region_obj; 78875 }; 78876 78877 struct acpi_object_region_field { 78878 union acpi_operand_object *next_object; 78879 u8 descriptor_type; 78880 u8 type; 78881 u16 reference_count; 78882 u8 flags; 78883 u8 field_flags; 78884 u8 attribute; 78885 u8 access_byte_width; 78886 struct acpi_namespace_node *node; 78887 u32 bit_length; 78888 u32 base_byte_offset; 78889 u32 value; 78890 u8 start_field_bit_offset; 78891 u8 access_length; 78892 u16 resource_length; 78893 union acpi_operand_object *region_obj; 78894 u8 *resource_buffer; 78895 u16 pin_number_index; 78896 u8 *internal_pcc_buffer; 78897 }; 78898 78899 struct acpi_object_buffer_field { 78900 union acpi_operand_object *next_object; 78901 u8 descriptor_type; 78902 u8 type; 78903 u16 reference_count; 78904 u8 flags; 78905 u8 field_flags; 78906 u8 attribute; 78907 u8 access_byte_width; 78908 struct acpi_namespace_node *node; 78909 u32 bit_length; 78910 u32 base_byte_offset; 78911 u32 value; 78912 u8 start_field_bit_offset; 78913 u8 access_length; 78914 u8 is_create_field; 78915 union acpi_operand_object *buffer_obj; 78916 }; 78917 78918 struct acpi_object_bank_field { 78919 union acpi_operand_object *next_object; 78920 u8 descriptor_type; 78921 u8 type; 78922 u16 reference_count; 78923 u8 flags; 78924 u8 field_flags; 78925 u8 attribute; 78926 u8 access_byte_width; 78927 struct acpi_namespace_node *node; 78928 u32 bit_length; 78929 u32 base_byte_offset; 78930 u32 value; 78931 u8 start_field_bit_offset; 78932 u8 access_length; 78933 union acpi_operand_object *region_obj; 78934 union acpi_operand_object *bank_obj; 78935 }; 78936 78937 struct acpi_object_index_field { 78938 union acpi_operand_object *next_object; 78939 u8 descriptor_type; 78940 u8 type; 78941 u16 reference_count; 78942 u8 flags; 78943 u8 field_flags; 78944 u8 attribute; 78945 u8 access_byte_width; 78946 struct acpi_namespace_node *node; 78947 u32 bit_length; 78948 u32 base_byte_offset; 78949 u32 value; 78950 u8 start_field_bit_offset; 78951 u8 access_length; 78952 union acpi_operand_object *index_obj; 78953 union acpi_operand_object *data_obj; 78954 }; 78955 78956 struct acpi_object_notify_handler { 78957 union acpi_operand_object *next_object; 78958 u8 descriptor_type; 78959 u8 type; 78960 u16 reference_count; 78961 u8 flags; 78962 struct acpi_namespace_node *node; 78963 u32 handler_type; 78964 acpi_notify_handler handler; 78965 void *context; 78966 union acpi_operand_object *next[2]; 78967 }; 78968 78969 struct acpi_object_addr_handler { 78970 union acpi_operand_object *next_object; 78971 u8 descriptor_type; 78972 u8 type; 78973 u16 reference_count; 78974 u8 flags; 78975 u8 space_id; 78976 u8 handler_flags; 78977 acpi_adr_space_handler handler; 78978 struct acpi_namespace_node *node; 78979 void *context; 78980 void *context_mutex; 78981 acpi_adr_space_setup setup; 78982 union acpi_operand_object *region_list; 78983 union acpi_operand_object *next; 78984 }; 78985 78986 struct acpi_object_reference { 78987 union acpi_operand_object *next_object; 78988 u8 descriptor_type; 78989 u8 type; 78990 u16 reference_count; 78991 u8 flags; 78992 u8 class; 78993 u8 target_type; 78994 u8 resolved; 78995 void *object; 78996 struct acpi_namespace_node *node; 78997 union acpi_operand_object **where; 78998 u8 *index_pointer; 78999 u8 *aml; 79000 u32 value; 79001 }; 79002 79003 struct acpi_object_extra { 79004 union acpi_operand_object *next_object; 79005 u8 descriptor_type; 79006 u8 type; 79007 u16 reference_count; 79008 u8 flags; 79009 struct acpi_namespace_node *method_REG; 79010 struct acpi_namespace_node *scope_node; 79011 void *region_context; 79012 u8 *aml_start; 79013 u32 aml_length; 79014 }; 79015 79016 struct acpi_object_data { 79017 union acpi_operand_object *next_object; 79018 u8 descriptor_type; 79019 u8 type; 79020 u16 reference_count; 79021 u8 flags; 79022 acpi_object_handler handler; 79023 void *pointer; 79024 }; 79025 79026 struct acpi_object_cache_list { 79027 union acpi_operand_object *next_object; 79028 u8 descriptor_type; 79029 u8 type; 79030 u16 reference_count; 79031 u8 flags; 79032 union acpi_operand_object *next; 79033 }; 79034 79035 union acpi_operand_object { 79036 struct acpi_object_common common; 79037 struct acpi_object_integer integer; 79038 struct acpi_object_string string; 79039 struct acpi_object_buffer buffer; 79040 struct acpi_object_package package; 79041 struct acpi_object_event event; 79042 struct acpi_object_method method; 79043 struct acpi_object_mutex mutex; 79044 struct acpi_object_region region; 79045 struct acpi_object_notify_common common_notify; 79046 struct acpi_object_device device; 79047 struct acpi_object_power_resource power_resource; 79048 struct acpi_object_processor processor; 79049 struct acpi_object_thermal_zone thermal_zone; 79050 struct acpi_object_field_common common_field; 79051 struct acpi_object_region_field field; 79052 struct acpi_object_buffer_field buffer_field; 79053 struct acpi_object_bank_field bank_field; 79054 struct acpi_object_index_field index_field; 79055 struct acpi_object_notify_handler notify; 79056 struct acpi_object_addr_handler address_space; 79057 struct acpi_object_reference reference; 79058 struct acpi_object_extra extra; 79059 struct acpi_object_data data; 79060 struct acpi_object_cache_list cache; 79061 struct acpi_namespace_node node; 79062 }; 79063 79064 union acpi_parse_object; 79065 79066 union acpi_generic_state; 79067 79068 struct acpi_parse_state { 79069 u8 *aml_start; 79070 u8 *aml; 79071 u8 *aml_end; 79072 u8 *pkg_start; 79073 u8 *pkg_end; 79074 union acpi_parse_object *start_op; 79075 struct acpi_namespace_node *start_node; 79076 union acpi_generic_state *scope; 79077 union acpi_parse_object *start_scope; 79078 u32 aml_size; 79079 }; 79080 79081 typedef acpi_status (*acpi_parse_downwards)(struct acpi_walk_state *, union acpi_parse_object **); 79082 79083 typedef acpi_status (*acpi_parse_upwards)(struct acpi_walk_state *); 79084 79085 struct acpi_opcode_info; 79086 79087 struct acpi_walk_state { 79088 struct acpi_walk_state *next; 79089 u8 descriptor_type; 79090 u8 walk_type; 79091 u16 opcode; 79092 u8 next_op_info; 79093 u8 num_operands; 79094 u8 operand_index; 79095 acpi_owner_id owner_id; 79096 u8 last_predicate; 79097 u8 current_result; 79098 u8 return_used; 79099 u8 scope_depth; 79100 u8 pass_number; 79101 u8 namespace_override; 79102 u8 result_size; 79103 u8 result_count; 79104 u8 *aml; 79105 u32 arg_types; 79106 u32 method_breakpoint; 79107 u32 user_breakpoint; 79108 u32 parse_flags; 79109 struct acpi_parse_state parser_state; 79110 u32 prev_arg_types; 79111 u32 arg_count; 79112 u16 method_nesting_depth; 79113 u8 method_is_nested; 79114 struct acpi_namespace_node arguments[7]; 79115 struct acpi_namespace_node local_variables[8]; 79116 union acpi_operand_object *operands[9]; 79117 union acpi_operand_object **params; 79118 u8 *aml_last_while; 79119 union acpi_operand_object **caller_return_desc; 79120 union acpi_generic_state *control_state; 79121 struct acpi_namespace_node *deferred_node; 79122 union acpi_operand_object *implicit_return_obj; 79123 struct acpi_namespace_node *method_call_node; 79124 union acpi_parse_object *method_call_op; 79125 union acpi_operand_object *method_desc; 79126 struct acpi_namespace_node *method_node; 79127 char *method_pathname; 79128 union acpi_parse_object *op; 79129 const struct acpi_opcode_info *op_info; 79130 union acpi_parse_object *origin; 79131 union acpi_operand_object *result_obj; 79132 union acpi_generic_state *results; 79133 union acpi_operand_object *return_desc; 79134 union acpi_generic_state *scope_info; 79135 union acpi_parse_object *prev_op; 79136 union acpi_parse_object *next_op; 79137 struct acpi_thread_state *thread; 79138 acpi_parse_downwards descending_callback; 79139 acpi_parse_upwards ascending_callback; 79140 }; 79141 79142 struct acpi_gpe_handler_info { 79143 acpi_gpe_handler address; 79144 void *context; 79145 struct acpi_namespace_node *method_node; 79146 u8 original_flags; 79147 u8 originally_enabled; 79148 }; 79149 79150 struct acpi_gpe_notify_info { 79151 struct acpi_namespace_node *device_node; 79152 struct acpi_gpe_notify_info *next; 79153 }; 79154 79155 union acpi_gpe_dispatch_info { 79156 struct acpi_namespace_node *method_node; 79157 struct acpi_gpe_handler_info *handler; 79158 struct acpi_gpe_notify_info *notify_list; 79159 }; 79160 79161 struct acpi_gpe_register_info; 79162 79163 struct acpi_gpe_event_info { 79164 union acpi_gpe_dispatch_info dispatch; 79165 struct acpi_gpe_register_info *register_info; 79166 u8 flags; 79167 u8 gpe_number; 79168 u8 runtime_count; 79169 u8 disable_for_dispatch; 79170 }; 79171 79172 struct acpi_gpe_address { 79173 u8 space_id; 79174 u64 address; 79175 }; 79176 79177 struct acpi_gpe_register_info { 79178 struct acpi_gpe_address status_address; 79179 struct acpi_gpe_address enable_address; 79180 u16 base_gpe_number; 79181 u8 enable_for_wake; 79182 u8 enable_for_run; 79183 u8 mask_for_run; 79184 u8 enable_mask; 79185 }; 79186 79187 struct acpi_gpe_xrupt_info; 79188 79189 struct acpi_gpe_block_info { 79190 struct acpi_namespace_node *node; 79191 struct acpi_gpe_block_info *previous; 79192 struct acpi_gpe_block_info *next; 79193 struct acpi_gpe_xrupt_info *xrupt_block; 79194 struct acpi_gpe_register_info *register_info; 79195 struct acpi_gpe_event_info *event_info; 79196 u64 address; 79197 u32 register_count; 79198 u16 gpe_count; 79199 u16 block_base_number; 79200 u8 space_id; 79201 u8 initialized; 79202 }; 79203 79204 struct acpi_gpe_xrupt_info { 79205 struct acpi_gpe_xrupt_info *previous; 79206 struct acpi_gpe_xrupt_info *next; 79207 struct acpi_gpe_block_info *gpe_block_list_head; 79208 u32 interrupt_number; 79209 }; 79210 79211 struct acpi_common_state { 79212 void *next; 79213 u8 descriptor_type; 79214 u8 flags; 79215 u16 value; 79216 u16 state; 79217 }; 79218 79219 struct acpi_update_state { 79220 void *next; 79221 u8 descriptor_type; 79222 u8 flags; 79223 u16 value; 79224 u16 state; 79225 union acpi_operand_object *object; 79226 }; 79227 79228 struct acpi_pkg_state { 79229 void *next; 79230 u8 descriptor_type; 79231 u8 flags; 79232 u16 value; 79233 u16 state; 79234 u32 index; 79235 union acpi_operand_object *source_object; 79236 union acpi_operand_object *dest_object; 79237 struct acpi_walk_state *walk_state; 79238 void *this_target_obj; 79239 u32 num_packages; 79240 }; 79241 79242 struct acpi_control_state { 79243 void *next; 79244 u8 descriptor_type; 79245 u8 flags; 79246 u16 value; 79247 u16 state; 79248 u16 opcode; 79249 union acpi_parse_object *predicate_op; 79250 u8 *aml_predicate_start; 79251 u8 *package_end; 79252 u64 loop_timeout; 79253 }; 79254 79255 union acpi_parse_value { 79256 u64 integer; 79257 u32 size; 79258 char *string; 79259 u8 *buffer; 79260 char *name; 79261 union acpi_parse_object *arg; 79262 }; 79263 79264 struct acpi_parse_obj_common { 79265 union acpi_parse_object *parent; 79266 u8 descriptor_type; 79267 u8 flags; 79268 u16 aml_opcode; 79269 u8 *aml; 79270 union acpi_parse_object *next; 79271 struct acpi_namespace_node *node; 79272 union acpi_parse_value value; 79273 u8 arg_list_length; 79274 }; 79275 79276 struct acpi_parse_obj_named { 79277 union acpi_parse_object *parent; 79278 u8 descriptor_type; 79279 u8 flags; 79280 u16 aml_opcode; 79281 u8 *aml; 79282 union acpi_parse_object *next; 79283 struct acpi_namespace_node *node; 79284 union acpi_parse_value value; 79285 u8 arg_list_length; 79286 char *path; 79287 u8 *data; 79288 u32 length; 79289 u32 name; 79290 }; 79291 79292 struct acpi_parse_obj_asl { 79293 union acpi_parse_object *parent; 79294 u8 descriptor_type; 79295 u8 flags; 79296 u16 aml_opcode; 79297 u8 *aml; 79298 union acpi_parse_object *next; 79299 struct acpi_namespace_node *node; 79300 union acpi_parse_value value; 79301 u8 arg_list_length; 79302 union acpi_parse_object *child; 79303 union acpi_parse_object *parent_method; 79304 char *filename; 79305 u8 file_changed; 79306 char *parent_filename; 79307 char *external_name; 79308 char *namepath; 79309 char name_seg[4]; 79310 u32 extra_value; 79311 u32 column; 79312 u32 line_number; 79313 u32 logical_line_number; 79314 u32 logical_byte_offset; 79315 u32 end_line; 79316 u32 end_logical_line; 79317 u32 acpi_btype; 79318 u32 aml_length; 79319 u32 aml_subtree_length; 79320 u32 final_aml_length; 79321 u32 final_aml_offset; 79322 u32 compile_flags; 79323 u16 parse_opcode; 79324 u8 aml_opcode_length; 79325 u8 aml_pkg_len_bytes; 79326 u8 extra; 79327 char parse_op_name[20]; 79328 }; 79329 79330 union acpi_parse_object { 79331 struct acpi_parse_obj_common common; 79332 struct acpi_parse_obj_named named; 79333 struct acpi_parse_obj_asl asl; 79334 }; 79335 79336 struct acpi_scope_state { 79337 void *next; 79338 u8 descriptor_type; 79339 u8 flags; 79340 u16 value; 79341 u16 state; 79342 struct acpi_namespace_node *node; 79343 }; 79344 79345 struct acpi_pscope_state { 79346 void *next; 79347 u8 descriptor_type; 79348 u8 flags; 79349 u16 value; 79350 u16 state; 79351 u32 arg_count; 79352 union acpi_parse_object *op; 79353 u8 *arg_end; 79354 u8 *pkg_end; 79355 u32 arg_list; 79356 }; 79357 79358 struct acpi_thread_state { 79359 void *next; 79360 u8 descriptor_type; 79361 u8 flags; 79362 u16 value; 79363 u16 state; 79364 u8 current_sync_level; 79365 struct acpi_walk_state *walk_state_list; 79366 union acpi_operand_object *acquired_mutex_list; 79367 u64 thread_id; 79368 }; 79369 79370 struct acpi_result_values { 79371 void *next; 79372 u8 descriptor_type; 79373 u8 flags; 79374 u16 value; 79375 u16 state; 79376 union acpi_operand_object *obj_desc[8]; 79377 }; 79378 79379 struct acpi_global_notify_handler { 79380 acpi_notify_handler handler; 79381 void *context; 79382 }; 79383 79384 struct acpi_notify_info { 79385 void *next; 79386 u8 descriptor_type; 79387 u8 flags; 79388 u16 value; 79389 u16 state; 79390 u8 handler_list_id; 79391 struct acpi_namespace_node *node; 79392 union acpi_operand_object *handler_list_head; 79393 struct acpi_global_notify_handler *global; 79394 }; 79395 79396 union acpi_generic_state { 79397 struct acpi_common_state common; 79398 struct acpi_control_state control; 79399 struct acpi_update_state update; 79400 struct acpi_scope_state scope; 79401 struct acpi_pscope_state parse_scope; 79402 struct acpi_pkg_state pkg; 79403 struct acpi_thread_state thread; 79404 struct acpi_result_values results; 79405 struct acpi_notify_info notify; 79406 }; 79407 79408 struct acpi_opcode_info { 79409 u32 parse_args; 79410 u32 runtime_args; 79411 u16 flags; 79412 u8 object_type; 79413 u8 class; 79414 u8 type; 79415 }; 79416 79417 struct acpi_os_dpc { 79418 acpi_osd_exec_callback function; 79419 void *context; 79420 struct work_struct work; 79421 }; 79422 79423 struct acpi_ioremap { 79424 struct list_head list; 79425 void *virt; 79426 acpi_physical_address phys; 79427 acpi_size size; 79428 union { 79429 long unsigned int refcount; 79430 struct rcu_work rwork; 79431 } track; 79432 }; 79433 79434 struct acpi_hp_work { 79435 struct work_struct work; 79436 struct acpi_device *adev; 79437 u32 src; 79438 }; 79439 79440 struct acpi_pld_info { 79441 u8 revision; 79442 u8 ignore_color; 79443 u8 red; 79444 u8 green; 79445 u8 blue; 79446 u16 width; 79447 u16 height; 79448 u8 user_visible; 79449 u8 dock; 79450 u8 lid; 79451 u8 panel; 79452 u8 vertical_position; 79453 u8 horizontal_position; 79454 u8 shape; 79455 u8 group_orientation; 79456 u8 group_token; 79457 u8 group_position; 79458 u8 bay; 79459 u8 ejectable; 79460 u8 ospm_eject_required; 79461 u8 cabinet_number; 79462 u8 card_cage_number; 79463 u8 reference; 79464 u8 rotation; 79465 u8 order; 79466 u8 reserved; 79467 u16 vertical_offset; 79468 u16 horizontal_offset; 79469 }; 79470 79471 struct acpi_handle_list { 79472 u32 count; 79473 acpi_handle handles[10]; 79474 }; 79475 79476 struct acpi_device_bus_id { 79477 const char *bus_id; 79478 struct ida instance_ida; 79479 struct list_head node; 79480 }; 79481 79482 struct acpi_dev_match_info { 79483 struct acpi_device_id hid[2]; 79484 const char *uid; 79485 s64 hrv; 79486 }; 79487 79488 struct nvs_region { 79489 __u64 phys_start; 79490 __u64 size; 79491 struct list_head node; 79492 }; 79493 79494 struct nvs_page { 79495 long unsigned int phys_start; 79496 unsigned int size; 79497 void *kaddr; 79498 void *data; 79499 bool unmap; 79500 struct list_head node; 79501 }; 79502 79503 struct acpi_wakeup_handler { 79504 struct list_head list_node; 79505 bool (*wakeup)(void *); 79506 void *context; 79507 }; 79508 79509 typedef u32 acpi_event_status; 79510 79511 struct acpi_table_facs { 79512 char signature[4]; 79513 u32 length; 79514 u32 hardware_signature; 79515 u32 firmware_waking_vector; 79516 u32 global_lock; 79517 u32 flags; 79518 u64 xfirmware_waking_vector; 79519 u8 version; 79520 u8 reserved[3]; 79521 u32 ospm_flags; 79522 u8 reserved1[24]; 79523 }; 79524 79525 struct acpi_hardware_id { 79526 struct list_head list; 79527 const char *id; 79528 }; 79529 79530 struct acpi_data_node { 79531 const char *name; 79532 acpi_handle handle; 79533 struct fwnode_handle fwnode; 79534 struct fwnode_handle *parent; 79535 struct acpi_device_data data; 79536 struct list_head sibling; 79537 struct kobject kobj; 79538 struct completion kobj_done; 79539 }; 79540 79541 struct acpi_data_node_attr { 79542 struct attribute attr; 79543 ssize_t (*show)(struct acpi_data_node *, char *); 79544 ssize_t (*store)(struct acpi_data_node *, const char *, size_t); 79545 }; 79546 79547 struct pm_domain_data { 79548 struct list_head list_node; 79549 struct device *dev; 79550 }; 79551 79552 struct acpi_device_physical_node { 79553 unsigned int node_id; 79554 struct list_head node; 79555 struct device *dev; 79556 bool put_online: 1; 79557 }; 79558 79559 typedef u32 (*acpi_event_handler)(void *); 79560 79561 typedef acpi_status (*acpi_table_handler)(u32, void *, void *); 79562 79563 enum acpi_bus_device_type { 79564 ACPI_BUS_TYPE_DEVICE = 0, 79565 ACPI_BUS_TYPE_POWER = 1, 79566 ACPI_BUS_TYPE_PROCESSOR = 2, 79567 ACPI_BUS_TYPE_THERMAL = 3, 79568 ACPI_BUS_TYPE_POWER_BUTTON = 4, 79569 ACPI_BUS_TYPE_SLEEP_BUTTON = 5, 79570 ACPI_BUS_TYPE_ECDT_EC = 6, 79571 ACPI_BUS_DEVICE_TYPE_COUNT = 7, 79572 }; 79573 79574 struct acpi_osc_context { 79575 char *uuid_str; 79576 int rev; 79577 struct acpi_buffer cap; 79578 struct acpi_buffer ret; 79579 }; 79580 79581 struct acpi_pnp_device_id { 79582 u32 length; 79583 char *string; 79584 }; 79585 79586 struct acpi_pnp_device_id_list { 79587 u32 count; 79588 u32 list_size; 79589 struct acpi_pnp_device_id ids[0]; 79590 }; 79591 79592 struct acpi_device_info { 79593 u32 info_size; 79594 u32 name; 79595 acpi_object_type type; 79596 u8 param_count; 79597 u16 valid; 79598 u8 flags; 79599 u8 highest_dstates[4]; 79600 u8 lowest_dstates[5]; 79601 u64 address; 79602 struct acpi_pnp_device_id hardware_id; 79603 struct acpi_pnp_device_id unique_id; 79604 struct acpi_pnp_device_id class_code; 79605 struct acpi_pnp_device_id_list compatible_id_list; 79606 }; 79607 79608 struct acpi_table_spcr { 79609 struct acpi_table_header header; 79610 u8 interface_type; 79611 u8 reserved[3]; 79612 struct acpi_generic_address serial_port; 79613 u8 interrupt_type; 79614 u8 pc_interrupt; 79615 u32 interrupt; 79616 u8 baud_rate; 79617 u8 parity; 79618 u8 stop_bits; 79619 u8 flow_control; 79620 u8 terminal_type; 79621 u8 reserved1; 79622 u16 pci_device_id; 79623 u16 pci_vendor_id; 79624 u8 pci_bus; 79625 u8 pci_device; 79626 u8 pci_function; 79627 u32 pci_flags; 79628 u8 pci_segment; 79629 u32 reserved2; 79630 } __attribute__((packed)); 79631 79632 struct acpi_table_stao { 79633 struct acpi_table_header header; 79634 u8 ignore_uart; 79635 } __attribute__((packed)); 79636 79637 enum acpi_reconfig_event { 79638 ACPI_RECONFIG_DEVICE_ADD = 0, 79639 ACPI_RECONFIG_DEVICE_REMOVE = 1, 79640 }; 79641 79642 struct acpi_probe_entry; 79643 79644 typedef bool (*acpi_probe_entry_validate_subtbl)(struct acpi_subtable_header *, struct acpi_probe_entry *); 79645 79646 struct acpi_probe_entry { 79647 __u8 id[5]; 79648 __u8 type; 79649 acpi_probe_entry_validate_subtbl subtable_valid; 79650 union { 79651 acpi_tbl_table_handler probe_table; 79652 acpi_tbl_entry_handler probe_subtbl; 79653 }; 79654 kernel_ulong_t driver_data; 79655 }; 79656 79657 struct acpi_dep_data { 79658 struct list_head node; 79659 acpi_handle supplier; 79660 acpi_handle consumer; 79661 }; 79662 79663 struct acpi_table_events_work { 79664 struct work_struct work; 79665 void *table; 79666 u32 event; 79667 }; 79668 79669 struct platform_device___2; 79670 79671 struct resource_win { 79672 struct resource res; 79673 resource_size_t offset; 79674 }; 79675 79676 struct res_proc_context { 79677 struct list_head *list; 79678 int (*preproc)(struct acpi_resource *, void *); 79679 void *preproc_data; 79680 int count; 79681 int error; 79682 }; 79683 79684 struct acpi_processor_errata { 79685 u8 smp; 79686 struct { 79687 u8 throttle: 1; 79688 u8 fdma: 1; 79689 u8 reserved: 6; 79690 u32 bmisx; 79691 } piix4; 79692 }; 79693 79694 struct acpi_table_ecdt { 79695 struct acpi_table_header header; 79696 struct acpi_generic_address control; 79697 struct acpi_generic_address data; 79698 u32 uid; 79699 u8 gpe; 79700 u8 id[1]; 79701 } __attribute__((packed)); 79702 79703 struct transaction; 79704 79705 struct acpi_ec { 79706 acpi_handle handle; 79707 int gpe; 79708 int irq; 79709 long unsigned int command_addr; 79710 long unsigned int data_addr; 79711 bool global_lock; 79712 long unsigned int flags; 79713 long unsigned int reference_count; 79714 struct mutex mutex; 79715 wait_queue_head_t wait; 79716 struct list_head list; 79717 struct transaction *curr; 79718 spinlock_t lock; 79719 struct work_struct work; 79720 long unsigned int timestamp; 79721 long unsigned int nr_pending_queries; 79722 bool busy_polling; 79723 unsigned int polling_guard; 79724 }; 79725 79726 struct transaction { 79727 const u8 *wdata; 79728 u8 *rdata; 79729 short unsigned int irq_count; 79730 u8 command; 79731 u8 wi; 79732 u8 ri; 79733 u8 wlen; 79734 u8 rlen; 79735 u8 flags; 79736 }; 79737 79738 typedef int (*acpi_ec_query_func)(void *); 79739 79740 enum ec_command { 79741 ACPI_EC_COMMAND_READ = 128, 79742 ACPI_EC_COMMAND_WRITE = 129, 79743 ACPI_EC_BURST_ENABLE = 130, 79744 ACPI_EC_BURST_DISABLE = 131, 79745 ACPI_EC_COMMAND_QUERY = 132, 79746 }; 79747 79748 enum { 79749 EC_FLAGS_QUERY_ENABLED = 0, 79750 EC_FLAGS_QUERY_PENDING = 1, 79751 EC_FLAGS_QUERY_GUARDING = 2, 79752 EC_FLAGS_EVENT_HANDLER_INSTALLED = 3, 79753 EC_FLAGS_EC_HANDLER_INSTALLED = 4, 79754 EC_FLAGS_QUERY_METHODS_INSTALLED = 5, 79755 EC_FLAGS_STARTED = 6, 79756 EC_FLAGS_STOPPED = 7, 79757 EC_FLAGS_EVENTS_MASKED = 8, 79758 }; 79759 79760 struct acpi_ec_query_handler { 79761 struct list_head node; 79762 acpi_ec_query_func func; 79763 acpi_handle handle; 79764 void *data; 79765 u8 query_bit; 79766 struct kref kref; 79767 }; 79768 79769 struct acpi_ec_query { 79770 struct transaction transaction; 79771 struct work_struct work; 79772 struct acpi_ec_query_handler *handler; 79773 }; 79774 79775 struct dock_station { 79776 acpi_handle handle; 79777 long unsigned int last_dock_time; 79778 u32 flags; 79779 struct list_head dependent_devices; 79780 struct list_head sibling; 79781 struct platform_device *dock_device; 79782 }; 79783 79784 struct dock_dependent_device { 79785 struct list_head list; 79786 struct acpi_device *adev; 79787 }; 79788 79789 enum dock_callback_type { 79790 DOCK_CALL_HANDLER = 0, 79791 DOCK_CALL_FIXUP = 1, 79792 DOCK_CALL_UEVENT = 2, 79793 }; 79794 79795 struct acpi_pci_root_ops; 79796 79797 struct acpi_pci_root_info { 79798 struct acpi_pci_root *root; 79799 struct acpi_device *bridge; 79800 struct acpi_pci_root_ops *ops; 79801 struct list_head resources; 79802 char name[16]; 79803 }; 79804 79805 struct acpi_pci_root_ops { 79806 struct pci_ops *pci_ops; 79807 int (*init_info)(struct acpi_pci_root_info *); 79808 void (*release_info)(struct acpi_pci_root_info *); 79809 int (*prepare_resources)(struct acpi_pci_root_info *); 79810 }; 79811 79812 struct pci_osc_bit_struct { 79813 u32 bit; 79814 char *desc; 79815 }; 79816 79817 struct acpi_handle_node { 79818 struct list_head node; 79819 acpi_handle handle; 79820 }; 79821 79822 struct acpi_pci_link_irq { 79823 u32 active; 79824 u8 triggering; 79825 u8 polarity; 79826 u8 resource_type; 79827 u8 possible_count; 79828 u32 possible[16]; 79829 u8 initialized: 1; 79830 u8 reserved: 7; 79831 }; 79832 79833 struct acpi_pci_link { 79834 struct list_head list; 79835 struct acpi_device *device; 79836 struct acpi_pci_link_irq irq; 79837 int refcnt; 79838 }; 79839 79840 struct acpi_pci_routing_table { 79841 u32 length; 79842 u32 pin; 79843 u64 address; 79844 u32 source_index; 79845 char source[4]; 79846 }; 79847 79848 struct acpi_prt_entry { 79849 struct acpi_pci_id id; 79850 u8 pin; 79851 acpi_handle link; 79852 u32 index; 79853 }; 79854 79855 struct prt_quirk { 79856 const struct dmi_system_id *system; 79857 unsigned int segment; 79858 unsigned int bus; 79859 unsigned int device; 79860 unsigned char pin; 79861 const char *source; 79862 const char *actual_source; 79863 }; 79864 79865 struct lpss_clk_data { 79866 const char *name; 79867 struct clk *clk; 79868 }; 79869 79870 struct lpss_private_data; 79871 79872 struct lpss_device_desc { 79873 unsigned int flags; 79874 const char *clk_con_id; 79875 unsigned int prv_offset; 79876 size_t prv_size_override; 79877 struct property_entry *properties; 79878 void (*setup)(struct lpss_private_data *); 79879 bool resume_from_noirq; 79880 }; 79881 79882 struct lpss_private_data { 79883 struct acpi_device *adev; 79884 void *mmio_base; 79885 resource_size_t mmio_size; 79886 unsigned int fixed_clk_rate; 79887 struct clk *clk; 79888 const struct lpss_device_desc *dev_desc; 79889 u32 prv_reg_ctx[9]; 79890 }; 79891 79892 struct lpss_device_links { 79893 const char *supplier_hid; 79894 const char *supplier_uid; 79895 const char *consumer_hid; 79896 const char *consumer_uid; 79897 u32 flags; 79898 const struct dmi_system_id *dep_missing_ids; 79899 }; 79900 79901 struct hid_uid { 79902 const char *hid; 79903 const char *uid; 79904 }; 79905 79906 struct fch_clk_data { 79907 void *base; 79908 u32 is_rv; 79909 }; 79910 79911 struct apd_private_data; 79912 79913 struct apd_device_desc { 79914 unsigned int fixed_clk_rate; 79915 struct property_entry *properties; 79916 int (*setup)(struct apd_private_data *); 79917 }; 79918 79919 struct apd_private_data { 79920 struct clk *clk; 79921 struct acpi_device *adev; 79922 const struct apd_device_desc *dev_desc; 79923 }; 79924 79925 struct acpi_power_dependent_device { 79926 struct device *dev; 79927 struct list_head node; 79928 }; 79929 79930 struct acpi_power_resource { 79931 struct acpi_device device; 79932 struct list_head list_node; 79933 char *name; 79934 u32 system_level; 79935 u32 order; 79936 unsigned int ref_count; 79937 bool wakeup_enabled; 79938 struct mutex resource_lock; 79939 struct list_head dependents; 79940 }; 79941 79942 struct acpi_power_resource_entry { 79943 struct list_head node; 79944 struct acpi_power_resource *resource; 79945 }; 79946 79947 struct acpi_bus_event { 79948 struct list_head node; 79949 acpi_device_class device_class; 79950 acpi_bus_id bus_id; 79951 u32 type; 79952 u32 data; 79953 }; 79954 79955 struct acpi_genl_event { 79956 acpi_device_class device_class; 79957 char bus_id[15]; 79958 u32 type; 79959 u32 data; 79960 }; 79961 79962 enum { 79963 ACPI_GENL_ATTR_UNSPEC = 0, 79964 ACPI_GENL_ATTR_EVENT = 1, 79965 __ACPI_GENL_ATTR_MAX = 2, 79966 }; 79967 79968 enum { 79969 ACPI_GENL_CMD_UNSPEC = 0, 79970 ACPI_GENL_CMD_EVENT = 1, 79971 __ACPI_GENL_CMD_MAX = 2, 79972 }; 79973 79974 struct acpi_ged_device { 79975 struct device *dev; 79976 struct list_head event_list; 79977 }; 79978 79979 struct acpi_ged_event { 79980 struct list_head node; 79981 struct device *dev; 79982 unsigned int gsi; 79983 unsigned int irq; 79984 acpi_handle handle; 79985 }; 79986 79987 typedef void (*acpi_gbl_event_handler)(u32, acpi_handle, u32, void *); 79988 79989 struct acpi_table_bert { 79990 struct acpi_table_header header; 79991 u32 region_length; 79992 u64 address; 79993 }; 79994 79995 struct acpi_table_attr { 79996 struct bin_attribute attr; 79997 char name[4]; 79998 int instance; 79999 char filename[8]; 80000 struct list_head node; 80001 }; 80002 80003 struct acpi_data_attr { 80004 struct bin_attribute attr; 80005 u64 addr; 80006 }; 80007 80008 struct acpi_data_obj { 80009 char *name; 80010 int (*fn)(void *, struct acpi_data_attr *); 80011 }; 80012 80013 struct event_counter { 80014 u32 count; 80015 u32 flags; 80016 }; 80017 80018 struct acpi_device_properties { 80019 const guid_t *guid; 80020 const union acpi_object *properties; 80021 struct list_head list; 80022 }; 80023 80024 struct always_present_id { 80025 struct acpi_device_id hid[2]; 80026 struct x86_cpu_id cpu_ids[2]; 80027 struct dmi_system_id dmi_ids[2]; 80028 const char *uid; 80029 }; 80030 80031 struct lpi_device_info { 80032 char *name; 80033 int enabled; 80034 union acpi_object *package; 80035 }; 80036 80037 struct lpi_device_constraint { 80038 int uid; 80039 int min_dstate; 80040 int function_states; 80041 }; 80042 80043 struct lpi_constraints { 80044 acpi_handle handle; 80045 int min_dstate; 80046 }; 80047 80048 struct lpi_device_constraint_amd { 80049 char *name; 80050 int enabled; 80051 int function_states; 80052 int min_dstate; 80053 }; 80054 80055 struct acpi_lpat { 80056 int temp; 80057 int raw; 80058 }; 80059 80060 struct acpi_lpat_conversion_table { 80061 struct acpi_lpat *lpat; 80062 int lpat_count; 80063 }; 80064 80065 struct acpi_table_lpit { 80066 struct acpi_table_header header; 80067 }; 80068 80069 struct acpi_lpit_header { 80070 u32 type; 80071 u32 length; 80072 u16 unique_id; 80073 u16 reserved; 80074 u32 flags; 80075 }; 80076 80077 struct acpi_lpit_native { 80078 struct acpi_lpit_header header; 80079 struct acpi_generic_address entry_trigger; 80080 u32 residency; 80081 u32 latency; 80082 struct acpi_generic_address residency_counter; 80083 u64 counter_frequency; 80084 } __attribute__((packed)); 80085 80086 struct lpit_residency_info { 80087 struct acpi_generic_address gaddr; 80088 u64 frequency; 80089 void *iomem_addr; 80090 }; 80091 80092 struct acpi_table_wdat { 80093 struct acpi_table_header header; 80094 u32 header_length; 80095 u16 pci_segment; 80096 u8 pci_bus; 80097 u8 pci_device; 80098 u8 pci_function; 80099 u8 reserved[3]; 80100 u32 timer_period; 80101 u32 max_count; 80102 u32 min_count; 80103 u8 flags; 80104 u8 reserved2[3]; 80105 u32 entries; 80106 }; 80107 80108 struct acpi_wdat_entry { 80109 u8 action; 80110 u8 instruction; 80111 u16 reserved; 80112 struct acpi_generic_address register_region; 80113 u32 value; 80114 u32 mask; 80115 } __attribute__((packed)); 80116 80117 struct acpi_name_info { 80118 char name[4]; 80119 u16 argument_list; 80120 u8 expected_btypes; 80121 } __attribute__((packed)); 80122 80123 struct acpi_package_info { 80124 u8 type; 80125 u8 object_type1; 80126 u8 count1; 80127 u8 object_type2; 80128 u8 count2; 80129 u16 reserved; 80130 } __attribute__((packed)); 80131 80132 struct acpi_package_info2 { 80133 u8 type; 80134 u8 count; 80135 u8 object_type[4]; 80136 u8 reserved; 80137 }; 80138 80139 struct acpi_package_info3 { 80140 u8 type; 80141 u8 count; 80142 u8 object_type[2]; 80143 u8 tail_object_type; 80144 u16 reserved; 80145 } __attribute__((packed)); 80146 80147 struct acpi_package_info4 { 80148 u8 type; 80149 u8 object_type1; 80150 u8 count1; 80151 u8 sub_object_types; 80152 u8 pkg_count; 80153 u16 reserved; 80154 } __attribute__((packed)); 80155 80156 union acpi_predefined_info { 80157 struct acpi_name_info info; 80158 struct acpi_package_info ret_info; 80159 struct acpi_package_info2 ret_info2; 80160 struct acpi_package_info3 ret_info3; 80161 struct acpi_package_info4 ret_info4; 80162 }; 80163 80164 struct acpi_evaluate_info { 80165 struct acpi_namespace_node *prefix_node; 80166 const char *relative_pathname; 80167 union acpi_operand_object **parameters; 80168 struct acpi_namespace_node *node; 80169 union acpi_operand_object *obj_desc; 80170 char *full_pathname; 80171 const union acpi_predefined_info *predefined; 80172 union acpi_operand_object *return_object; 80173 union acpi_operand_object *parent_package; 80174 u32 return_flags; 80175 u32 return_btype; 80176 u16 param_count; 80177 u16 node_flags; 80178 u8 pass_number; 80179 u8 return_object_type; 80180 u8 flags; 80181 }; 80182 80183 enum { 80184 ACPI_REFCLASS_LOCAL = 0, 80185 ACPI_REFCLASS_ARG = 1, 80186 ACPI_REFCLASS_REFOF = 2, 80187 ACPI_REFCLASS_INDEX = 3, 80188 ACPI_REFCLASS_TABLE = 4, 80189 ACPI_REFCLASS_NAME = 5, 80190 ACPI_REFCLASS_DEBUG = 6, 80191 ACPI_REFCLASS_MAX = 6, 80192 }; 80193 80194 struct acpi_common_descriptor { 80195 void *common_pointer; 80196 u8 descriptor_type; 80197 }; 80198 80199 union acpi_descriptor { 80200 struct acpi_common_descriptor common; 80201 union acpi_operand_object object; 80202 struct acpi_namespace_node node; 80203 union acpi_parse_object op; 80204 }; 80205 80206 typedef enum { 80207 ACPI_IMODE_LOAD_PASS1 = 1, 80208 ACPI_IMODE_LOAD_PASS2 = 2, 80209 ACPI_IMODE_EXECUTE = 3, 80210 } acpi_interpreter_mode; 80211 80212 struct acpi_create_field_info { 80213 struct acpi_namespace_node *region_node; 80214 struct acpi_namespace_node *field_node; 80215 struct acpi_namespace_node *register_node; 80216 struct acpi_namespace_node *data_register_node; 80217 struct acpi_namespace_node *connection_node; 80218 u8 *resource_buffer; 80219 u32 bank_value; 80220 u32 field_bit_position; 80221 u32 field_bit_length; 80222 u16 resource_length; 80223 u16 pin_number_index; 80224 u8 field_flags; 80225 u8 attribute; 80226 u8 field_type; 80227 u8 access_length; 80228 }; 80229 80230 struct acpi_init_walk_info { 80231 u32 table_index; 80232 u32 object_count; 80233 u32 method_count; 80234 u32 serial_method_count; 80235 u32 non_serial_method_count; 80236 u32 serialized_method_count; 80237 u32 device_count; 80238 u32 op_region_count; 80239 u32 field_count; 80240 u32 buffer_count; 80241 u32 package_count; 80242 u32 op_region_init; 80243 u32 field_init; 80244 u32 buffer_init; 80245 u32 package_init; 80246 acpi_owner_id owner_id; 80247 }; 80248 80249 typedef u32 acpi_name; 80250 80251 typedef acpi_status (*acpi_exception_handler)(acpi_status, acpi_name, u16, u32, void *); 80252 80253 enum { 80254 AML_FIELD_ACCESS_ANY = 0, 80255 AML_FIELD_ACCESS_BYTE = 1, 80256 AML_FIELD_ACCESS_WORD = 2, 80257 AML_FIELD_ACCESS_DWORD = 3, 80258 AML_FIELD_ACCESS_QWORD = 4, 80259 AML_FIELD_ACCESS_BUFFER = 5, 80260 }; 80261 80262 typedef acpi_status (*acpi_execute_op)(struct acpi_walk_state *); 80263 80264 struct acpi_fixed_event_handler { 80265 acpi_event_handler handler; 80266 void *context; 80267 }; 80268 80269 struct acpi_fixed_event_info { 80270 u8 status_register_id; 80271 u8 enable_register_id; 80272 u16 status_bit_mask; 80273 u16 enable_bit_mask; 80274 }; 80275 80276 typedef u32 acpi_mutex_handle; 80277 80278 struct acpi_gpe_walk_info { 80279 struct acpi_namespace_node *gpe_device; 80280 struct acpi_gpe_block_info *gpe_block; 80281 u16 count; 80282 acpi_owner_id owner_id; 80283 u8 execute_by_owner_id; 80284 }; 80285 80286 struct acpi_gpe_device_info { 80287 u32 index; 80288 u32 next_block_base_index; 80289 acpi_status status; 80290 struct acpi_namespace_node *gpe_device; 80291 }; 80292 80293 typedef acpi_status (*acpi_gpe_callback)(struct acpi_gpe_xrupt_info *, struct acpi_gpe_block_info *, void *); 80294 80295 struct acpi_reg_walk_info { 80296 u32 function; 80297 u32 reg_run_count; 80298 acpi_adr_space_type space_id; 80299 }; 80300 80301 typedef u32 (*acpi_sci_handler)(void *); 80302 80303 struct acpi_sci_handler_info { 80304 struct acpi_sci_handler_info *next; 80305 acpi_sci_handler address; 80306 void *context; 80307 }; 80308 80309 enum { 80310 AML_FIELD_UPDATE_PRESERVE = 0, 80311 AML_FIELD_UPDATE_WRITE_AS_ONES = 32, 80312 AML_FIELD_UPDATE_WRITE_AS_ZEROS = 64, 80313 }; 80314 80315 struct acpi_signal_fatal_info { 80316 u32 type; 80317 u32 code; 80318 u32 argument; 80319 }; 80320 80321 enum { 80322 MATCH_MTR = 0, 80323 MATCH_MEQ = 1, 80324 MATCH_MLE = 2, 80325 MATCH_MLT = 3, 80326 MATCH_MGE = 4, 80327 MATCH_MGT = 5, 80328 }; 80329 80330 enum { 80331 AML_FIELD_ATTRIB_QUICK = 2, 80332 AML_FIELD_ATTRIB_SEND_RECEIVE = 4, 80333 AML_FIELD_ATTRIB_BYTE = 6, 80334 AML_FIELD_ATTRIB_WORD = 8, 80335 AML_FIELD_ATTRIB_BLOCK = 10, 80336 AML_FIELD_ATTRIB_BYTES = 11, 80337 AML_FIELD_ATTRIB_PROCESS_CALL = 12, 80338 AML_FIELD_ATTRIB_BLOCK_PROCESS_CALL = 13, 80339 AML_FIELD_ATTRIB_RAW_BYTES = 14, 80340 AML_FIELD_ATTRIB_RAW_PROCESS_BYTES = 15, 80341 }; 80342 80343 typedef enum { 80344 ACPI_TRACE_AML_METHOD = 0, 80345 ACPI_TRACE_AML_OPCODE = 1, 80346 ACPI_TRACE_AML_REGION = 2, 80347 } acpi_trace_event_type; 80348 80349 struct acpi_gpe_block_status_context { 80350 struct acpi_gpe_register_info *gpe_skip_register_info; 80351 u8 gpe_skip_mask; 80352 u8 retval; 80353 }; 80354 80355 struct acpi_bit_register_info { 80356 u8 parent_register; 80357 u8 bit_position; 80358 u16 access_bit_mask; 80359 }; 80360 80361 struct acpi_port_info { 80362 char *name; 80363 u16 start; 80364 u16 end; 80365 u8 osi_dependency; 80366 }; 80367 80368 struct acpi_pci_device { 80369 acpi_handle device; 80370 struct acpi_pci_device *next; 80371 }; 80372 80373 typedef acpi_status (*acpi_init_handler)(acpi_handle, u32); 80374 80375 struct acpi_device_walk_info { 80376 struct acpi_table_desc *table_desc; 80377 struct acpi_evaluate_info *evaluate_info; 80378 u32 device_count; 80379 u32 num_STA; 80380 u32 num_INI; 80381 }; 80382 80383 typedef acpi_status (*acpi_pkg_callback)(u8, union acpi_operand_object *, union acpi_generic_state *, void *); 80384 80385 struct acpi_table_list { 80386 struct acpi_table_desc *tables; 80387 u32 current_table_count; 80388 u32 max_table_count; 80389 u8 flags; 80390 }; 80391 80392 enum acpi_return_package_types { 80393 ACPI_PTYPE1_FIXED = 1, 80394 ACPI_PTYPE1_VAR = 2, 80395 ACPI_PTYPE1_OPTION = 3, 80396 ACPI_PTYPE2 = 4, 80397 ACPI_PTYPE2_COUNT = 5, 80398 ACPI_PTYPE2_PKG_COUNT = 6, 80399 ACPI_PTYPE2_FIXED = 7, 80400 ACPI_PTYPE2_MIN = 8, 80401 ACPI_PTYPE2_REV_FIXED = 9, 80402 ACPI_PTYPE2_FIX_VAR = 10, 80403 ACPI_PTYPE2_VAR_VAR = 11, 80404 ACPI_PTYPE2_UUID_PAIR = 12, 80405 ACPI_PTYPE_CUSTOM = 13, 80406 }; 80407 80408 typedef acpi_status (*acpi_object_converter)(struct acpi_namespace_node *, union acpi_operand_object *, union acpi_operand_object **); 80409 80410 struct acpi_simple_repair_info { 80411 char name[4]; 80412 u32 unexpected_btypes; 80413 u32 package_index; 80414 acpi_object_converter object_converter; 80415 }; 80416 80417 typedef acpi_status (*acpi_repair_function)(struct acpi_evaluate_info *, union acpi_operand_object **); 80418 80419 struct acpi_repair_info { 80420 char name[4]; 80421 acpi_repair_function repair_function; 80422 }; 80423 80424 struct acpi_namestring_info { 80425 const char *external_name; 80426 const char *next_external_char; 80427 char *internal_name; 80428 u32 length; 80429 u32 num_segments; 80430 u32 num_carats; 80431 u8 fully_qualified; 80432 }; 80433 80434 struct acpi_rw_lock { 80435 void *writer_mutex; 80436 void *reader_mutex; 80437 u32 num_readers; 80438 }; 80439 80440 struct acpi_get_devices_info { 80441 acpi_walk_callback user_function; 80442 void *context; 80443 const char *hid; 80444 }; 80445 80446 struct aml_resource_small_header { 80447 u8 descriptor_type; 80448 }; 80449 80450 struct aml_resource_irq { 80451 u8 descriptor_type; 80452 u16 irq_mask; 80453 u8 flags; 80454 } __attribute__((packed)); 80455 80456 struct aml_resource_dma { 80457 u8 descriptor_type; 80458 u8 dma_channel_mask; 80459 u8 flags; 80460 }; 80461 80462 struct aml_resource_start_dependent { 80463 u8 descriptor_type; 80464 u8 flags; 80465 }; 80466 80467 struct aml_resource_end_dependent { 80468 u8 descriptor_type; 80469 }; 80470 80471 struct aml_resource_io { 80472 u8 descriptor_type; 80473 u8 flags; 80474 u16 minimum; 80475 u16 maximum; 80476 u8 alignment; 80477 u8 address_length; 80478 }; 80479 80480 struct aml_resource_fixed_io { 80481 u8 descriptor_type; 80482 u16 address; 80483 u8 address_length; 80484 } __attribute__((packed)); 80485 80486 struct aml_resource_vendor_small { 80487 u8 descriptor_type; 80488 }; 80489 80490 struct aml_resource_end_tag { 80491 u8 descriptor_type; 80492 u8 checksum; 80493 }; 80494 80495 struct aml_resource_fixed_dma { 80496 u8 descriptor_type; 80497 u16 request_lines; 80498 u16 channels; 80499 u8 width; 80500 } __attribute__((packed)); 80501 80502 struct aml_resource_large_header { 80503 u8 descriptor_type; 80504 u16 resource_length; 80505 } __attribute__((packed)); 80506 80507 struct aml_resource_memory24 { 80508 u8 descriptor_type; 80509 u16 resource_length; 80510 u8 flags; 80511 u16 minimum; 80512 u16 maximum; 80513 u16 alignment; 80514 u16 address_length; 80515 } __attribute__((packed)); 80516 80517 struct aml_resource_vendor_large { 80518 u8 descriptor_type; 80519 u16 resource_length; 80520 } __attribute__((packed)); 80521 80522 struct aml_resource_memory32 { 80523 u8 descriptor_type; 80524 u16 resource_length; 80525 u8 flags; 80526 u32 minimum; 80527 u32 maximum; 80528 u32 alignment; 80529 u32 address_length; 80530 } __attribute__((packed)); 80531 80532 struct aml_resource_fixed_memory32 { 80533 u8 descriptor_type; 80534 u16 resource_length; 80535 u8 flags; 80536 u32 address; 80537 u32 address_length; 80538 } __attribute__((packed)); 80539 80540 struct aml_resource_address { 80541 u8 descriptor_type; 80542 u16 resource_length; 80543 u8 resource_type; 80544 u8 flags; 80545 u8 specific_flags; 80546 } __attribute__((packed)); 80547 80548 struct aml_resource_extended_address64 { 80549 u8 descriptor_type; 80550 u16 resource_length; 80551 u8 resource_type; 80552 u8 flags; 80553 u8 specific_flags; 80554 u8 revision_ID; 80555 u8 reserved; 80556 u64 granularity; 80557 u64 minimum; 80558 u64 maximum; 80559 u64 translation_offset; 80560 u64 address_length; 80561 u64 type_specific; 80562 } __attribute__((packed)); 80563 80564 struct aml_resource_address64 { 80565 u8 descriptor_type; 80566 u16 resource_length; 80567 u8 resource_type; 80568 u8 flags; 80569 u8 specific_flags; 80570 u64 granularity; 80571 u64 minimum; 80572 u64 maximum; 80573 u64 translation_offset; 80574 u64 address_length; 80575 } __attribute__((packed)); 80576 80577 struct aml_resource_address32 { 80578 u8 descriptor_type; 80579 u16 resource_length; 80580 u8 resource_type; 80581 u8 flags; 80582 u8 specific_flags; 80583 u32 granularity; 80584 u32 minimum; 80585 u32 maximum; 80586 u32 translation_offset; 80587 u32 address_length; 80588 } __attribute__((packed)); 80589 80590 struct aml_resource_address16 { 80591 u8 descriptor_type; 80592 u16 resource_length; 80593 u8 resource_type; 80594 u8 flags; 80595 u8 specific_flags; 80596 u16 granularity; 80597 u16 minimum; 80598 u16 maximum; 80599 u16 translation_offset; 80600 u16 address_length; 80601 } __attribute__((packed)); 80602 80603 struct aml_resource_extended_irq { 80604 u8 descriptor_type; 80605 u16 resource_length; 80606 u8 flags; 80607 u8 interrupt_count; 80608 u32 interrupts[1]; 80609 } __attribute__((packed)); 80610 80611 struct aml_resource_generic_register { 80612 u8 descriptor_type; 80613 u16 resource_length; 80614 u8 address_space_id; 80615 u8 bit_width; 80616 u8 bit_offset; 80617 u8 access_size; 80618 u64 address; 80619 } __attribute__((packed)); 80620 80621 struct aml_resource_gpio { 80622 u8 descriptor_type; 80623 u16 resource_length; 80624 u8 revision_id; 80625 u8 connection_type; 80626 u16 flags; 80627 u16 int_flags; 80628 u8 pin_config; 80629 u16 drive_strength; 80630 u16 debounce_timeout; 80631 u16 pin_table_offset; 80632 u8 res_source_index; 80633 u16 res_source_offset; 80634 u16 vendor_offset; 80635 u16 vendor_length; 80636 } __attribute__((packed)); 80637 80638 struct aml_resource_common_serialbus { 80639 u8 descriptor_type; 80640 u16 resource_length; 80641 u8 revision_id; 80642 u8 res_source_index; 80643 u8 type; 80644 u8 flags; 80645 u16 type_specific_flags; 80646 u8 type_revision_id; 80647 u16 type_data_length; 80648 } __attribute__((packed)); 80649 80650 struct aml_resource_i2c_serialbus { 80651 u8 descriptor_type; 80652 u16 resource_length; 80653 u8 revision_id; 80654 u8 res_source_index; 80655 u8 type; 80656 u8 flags; 80657 u16 type_specific_flags; 80658 u8 type_revision_id; 80659 u16 type_data_length; 80660 u32 connection_speed; 80661 u16 slave_address; 80662 } __attribute__((packed)); 80663 80664 struct aml_resource_spi_serialbus { 80665 u8 descriptor_type; 80666 u16 resource_length; 80667 u8 revision_id; 80668 u8 res_source_index; 80669 u8 type; 80670 u8 flags; 80671 u16 type_specific_flags; 80672 u8 type_revision_id; 80673 u16 type_data_length; 80674 u32 connection_speed; 80675 u8 data_bit_length; 80676 u8 clock_phase; 80677 u8 clock_polarity; 80678 u16 device_selection; 80679 } __attribute__((packed)); 80680 80681 struct aml_resource_uart_serialbus { 80682 u8 descriptor_type; 80683 u16 resource_length; 80684 u8 revision_id; 80685 u8 res_source_index; 80686 u8 type; 80687 u8 flags; 80688 u16 type_specific_flags; 80689 u8 type_revision_id; 80690 u16 type_data_length; 80691 u32 default_baud_rate; 80692 u16 rx_fifo_size; 80693 u16 tx_fifo_size; 80694 u8 parity; 80695 u8 lines_enabled; 80696 } __attribute__((packed)); 80697 80698 struct aml_resource_pin_function { 80699 u8 descriptor_type; 80700 u16 resource_length; 80701 u8 revision_id; 80702 u16 flags; 80703 u8 pin_config; 80704 u16 function_number; 80705 u16 pin_table_offset; 80706 u8 res_source_index; 80707 u16 res_source_offset; 80708 u16 vendor_offset; 80709 u16 vendor_length; 80710 } __attribute__((packed)); 80711 80712 struct aml_resource_pin_config { 80713 u8 descriptor_type; 80714 u16 resource_length; 80715 u8 revision_id; 80716 u16 flags; 80717 u8 pin_config_type; 80718 u32 pin_config_value; 80719 u16 pin_table_offset; 80720 u8 res_source_index; 80721 u16 res_source_offset; 80722 u16 vendor_offset; 80723 u16 vendor_length; 80724 } __attribute__((packed)); 80725 80726 struct aml_resource_pin_group { 80727 u8 descriptor_type; 80728 u16 resource_length; 80729 u8 revision_id; 80730 u16 flags; 80731 u16 pin_table_offset; 80732 u16 label_offset; 80733 u16 vendor_offset; 80734 u16 vendor_length; 80735 } __attribute__((packed)); 80736 80737 struct aml_resource_pin_group_function { 80738 u8 descriptor_type; 80739 u16 resource_length; 80740 u8 revision_id; 80741 u16 flags; 80742 u16 function_number; 80743 u8 res_source_index; 80744 u16 res_source_offset; 80745 u16 res_source_label_offset; 80746 u16 vendor_offset; 80747 u16 vendor_length; 80748 } __attribute__((packed)); 80749 80750 struct aml_resource_pin_group_config { 80751 u8 descriptor_type; 80752 u16 resource_length; 80753 u8 revision_id; 80754 u16 flags; 80755 u8 pin_config_type; 80756 u32 pin_config_value; 80757 u8 res_source_index; 80758 u16 res_source_offset; 80759 u16 res_source_label_offset; 80760 u16 vendor_offset; 80761 u16 vendor_length; 80762 } __attribute__((packed)); 80763 80764 union aml_resource { 80765 u8 descriptor_type; 80766 struct aml_resource_small_header small_header; 80767 struct aml_resource_large_header large_header; 80768 struct aml_resource_irq irq; 80769 struct aml_resource_dma dma; 80770 struct aml_resource_start_dependent start_dpf; 80771 struct aml_resource_end_dependent end_dpf; 80772 struct aml_resource_io io; 80773 struct aml_resource_fixed_io fixed_io; 80774 struct aml_resource_fixed_dma fixed_dma; 80775 struct aml_resource_vendor_small vendor_small; 80776 struct aml_resource_end_tag end_tag; 80777 struct aml_resource_memory24 memory24; 80778 struct aml_resource_generic_register generic_reg; 80779 struct aml_resource_vendor_large vendor_large; 80780 struct aml_resource_memory32 memory32; 80781 struct aml_resource_fixed_memory32 fixed_memory32; 80782 struct aml_resource_address16 address16; 80783 struct aml_resource_address32 address32; 80784 struct aml_resource_address64 address64; 80785 struct aml_resource_extended_address64 ext_address64; 80786 struct aml_resource_extended_irq extended_irq; 80787 struct aml_resource_gpio gpio; 80788 struct aml_resource_i2c_serialbus i2c_serial_bus; 80789 struct aml_resource_spi_serialbus spi_serial_bus; 80790 struct aml_resource_uart_serialbus uart_serial_bus; 80791 struct aml_resource_common_serialbus common_serial_bus; 80792 struct aml_resource_pin_function pin_function; 80793 struct aml_resource_pin_config pin_config; 80794 struct aml_resource_pin_group pin_group; 80795 struct aml_resource_pin_group_function pin_group_function; 80796 struct aml_resource_pin_group_config pin_group_config; 80797 struct aml_resource_address address; 80798 u32 dword_item; 80799 u16 word_item; 80800 u8 byte_item; 80801 }; 80802 80803 struct acpi_rsconvert_info { 80804 u8 opcode; 80805 u8 resource_offset; 80806 u8 aml_offset; 80807 u8 value; 80808 }; 80809 80810 enum { 80811 ACPI_RSC_INITGET = 0, 80812 ACPI_RSC_INITSET = 1, 80813 ACPI_RSC_FLAGINIT = 2, 80814 ACPI_RSC_1BITFLAG = 3, 80815 ACPI_RSC_2BITFLAG = 4, 80816 ACPI_RSC_3BITFLAG = 5, 80817 ACPI_RSC_ADDRESS = 6, 80818 ACPI_RSC_BITMASK = 7, 80819 ACPI_RSC_BITMASK16 = 8, 80820 ACPI_RSC_COUNT = 9, 80821 ACPI_RSC_COUNT16 = 10, 80822 ACPI_RSC_COUNT_GPIO_PIN = 11, 80823 ACPI_RSC_COUNT_GPIO_RES = 12, 80824 ACPI_RSC_COUNT_GPIO_VEN = 13, 80825 ACPI_RSC_COUNT_SERIAL_RES = 14, 80826 ACPI_RSC_COUNT_SERIAL_VEN = 15, 80827 ACPI_RSC_DATA8 = 16, 80828 ACPI_RSC_EXIT_EQ = 17, 80829 ACPI_RSC_EXIT_LE = 18, 80830 ACPI_RSC_EXIT_NE = 19, 80831 ACPI_RSC_LENGTH = 20, 80832 ACPI_RSC_MOVE_GPIO_PIN = 21, 80833 ACPI_RSC_MOVE_GPIO_RES = 22, 80834 ACPI_RSC_MOVE_SERIAL_RES = 23, 80835 ACPI_RSC_MOVE_SERIAL_VEN = 24, 80836 ACPI_RSC_MOVE8 = 25, 80837 ACPI_RSC_MOVE16 = 26, 80838 ACPI_RSC_MOVE32 = 27, 80839 ACPI_RSC_MOVE64 = 28, 80840 ACPI_RSC_SET8 = 29, 80841 ACPI_RSC_SOURCE = 30, 80842 ACPI_RSC_SOURCEX = 31, 80843 }; 80844 80845 typedef u16 acpi_rs_length; 80846 80847 typedef acpi_status (*acpi_walk_aml_callback)(u8 *, u32, u32, u8, void **); 80848 80849 typedef u32 acpi_rsdesc_size; 80850 80851 struct acpi_vendor_uuid { 80852 u8 subtype; 80853 u8 data[16]; 80854 }; 80855 80856 struct acpi_vendor_walk_info { 80857 struct acpi_vendor_uuid *uuid; 80858 struct acpi_buffer *buffer; 80859 acpi_status status; 80860 }; 80861 80862 struct acpi_fadt_info { 80863 const char *name; 80864 u16 address64; 80865 u16 address32; 80866 u16 length; 80867 u8 default_length; 80868 u8 flags; 80869 }; 80870 80871 struct acpi_fadt_pm_info { 80872 struct acpi_generic_address *target; 80873 u16 source; 80874 u8 register_num; 80875 }; 80876 80877 struct acpi_table_rsdp { 80878 char signature[8]; 80879 u8 checksum; 80880 char oem_id[6]; 80881 u8 revision; 80882 u32 rsdt_physical_address; 80883 u32 length; 80884 u64 xsdt_physical_address; 80885 u8 extended_checksum; 80886 u8 reserved[3]; 80887 } __attribute__((packed)); 80888 80889 struct acpi_address_range { 80890 struct acpi_address_range *next; 80891 struct acpi_namespace_node *region_node; 80892 acpi_physical_address start_address; 80893 acpi_physical_address end_address; 80894 }; 80895 80896 struct acpi_pkg_info { 80897 u8 *free_space; 80898 acpi_size length; 80899 u32 object_space; 80900 u32 num_packages; 80901 }; 80902 80903 struct acpi_exception_info { 80904 char *name; 80905 }; 80906 80907 struct acpi_mutex_info { 80908 void *mutex; 80909 u32 use_count; 80910 u64 thread_id; 80911 }; 80912 80913 struct acpi_comment_node { 80914 char *comment; 80915 struct acpi_comment_node *next; 80916 }; 80917 80918 struct acpi_interface_info { 80919 char *name; 80920 struct acpi_interface_info *next; 80921 u8 flags; 80922 u8 value; 80923 }; 80924 80925 enum led_brightness { 80926 LED_OFF = 0, 80927 LED_ON = 1, 80928 LED_HALF = 127, 80929 LED_FULL = 255, 80930 }; 80931 80932 struct led_hw_trigger_type { 80933 int dummy; 80934 }; 80935 80936 struct led_pattern; 80937 80938 struct led_trigger; 80939 80940 struct led_classdev { 80941 const char *name; 80942 enum led_brightness brightness; 80943 enum led_brightness max_brightness; 80944 int flags; 80945 long unsigned int work_flags; 80946 void (*brightness_set)(struct led_classdev *, enum led_brightness); 80947 int (*brightness_set_blocking)(struct led_classdev *, enum led_brightness); 80948 enum led_brightness (*brightness_get)(struct led_classdev *); 80949 int (*blink_set)(struct led_classdev *, long unsigned int *, long unsigned int *); 80950 int (*pattern_set)(struct led_classdev *, struct led_pattern *, u32, int); 80951 int (*pattern_clear)(struct led_classdev *); 80952 struct device *dev; 80953 const struct attribute_group **groups; 80954 struct list_head node; 80955 const char *default_trigger; 80956 long unsigned int blink_delay_on; 80957 long unsigned int blink_delay_off; 80958 struct timer_list blink_timer; 80959 int blink_brightness; 80960 int new_blink_brightness; 80961 void (*flash_resume)(struct led_classdev *); 80962 struct work_struct set_brightness_work; 80963 int delayed_set_value; 80964 struct rw_semaphore trigger_lock; 80965 struct led_trigger *trigger; 80966 struct list_head trig_list; 80967 void *trigger_data; 80968 bool activated; 80969 struct led_hw_trigger_type *trigger_type; 80970 int brightness_hw_changed; 80971 struct kernfs_node *brightness_hw_changed_kn; 80972 struct mutex led_access; 80973 }; 80974 80975 struct led_pattern { 80976 u32 delta_t; 80977 int brightness; 80978 }; 80979 80980 struct led_trigger { 80981 const char *name; 80982 int (*activate)(struct led_classdev *); 80983 void (*deactivate)(struct led_classdev *); 80984 struct led_hw_trigger_type *trigger_type; 80985 rwlock_t leddev_list_lock; 80986 struct list_head led_cdevs; 80987 struct list_head next_trig; 80988 const struct attribute_group **groups; 80989 }; 80990 80991 enum power_supply_property { 80992 POWER_SUPPLY_PROP_STATUS = 0, 80993 POWER_SUPPLY_PROP_CHARGE_TYPE = 1, 80994 POWER_SUPPLY_PROP_HEALTH = 2, 80995 POWER_SUPPLY_PROP_PRESENT = 3, 80996 POWER_SUPPLY_PROP_ONLINE = 4, 80997 POWER_SUPPLY_PROP_AUTHENTIC = 5, 80998 POWER_SUPPLY_PROP_TECHNOLOGY = 6, 80999 POWER_SUPPLY_PROP_CYCLE_COUNT = 7, 81000 POWER_SUPPLY_PROP_VOLTAGE_MAX = 8, 81001 POWER_SUPPLY_PROP_VOLTAGE_MIN = 9, 81002 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN = 10, 81003 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN = 11, 81004 POWER_SUPPLY_PROP_VOLTAGE_NOW = 12, 81005 POWER_SUPPLY_PROP_VOLTAGE_AVG = 13, 81006 POWER_SUPPLY_PROP_VOLTAGE_OCV = 14, 81007 POWER_SUPPLY_PROP_VOLTAGE_BOOT = 15, 81008 POWER_SUPPLY_PROP_CURRENT_MAX = 16, 81009 POWER_SUPPLY_PROP_CURRENT_NOW = 17, 81010 POWER_SUPPLY_PROP_CURRENT_AVG = 18, 81011 POWER_SUPPLY_PROP_CURRENT_BOOT = 19, 81012 POWER_SUPPLY_PROP_POWER_NOW = 20, 81013 POWER_SUPPLY_PROP_POWER_AVG = 21, 81014 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN = 22, 81015 POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN = 23, 81016 POWER_SUPPLY_PROP_CHARGE_FULL = 24, 81017 POWER_SUPPLY_PROP_CHARGE_EMPTY = 25, 81018 POWER_SUPPLY_PROP_CHARGE_NOW = 26, 81019 POWER_SUPPLY_PROP_CHARGE_AVG = 27, 81020 POWER_SUPPLY_PROP_CHARGE_COUNTER = 28, 81021 POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT = 29, 81022 POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX = 30, 81023 POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE = 31, 81024 POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX = 32, 81025 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT = 33, 81026 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX = 34, 81027 POWER_SUPPLY_PROP_CHARGE_CONTROL_START_THRESHOLD = 35, 81028 POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD = 36, 81029 POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT = 37, 81030 POWER_SUPPLY_PROP_INPUT_VOLTAGE_LIMIT = 38, 81031 POWER_SUPPLY_PROP_INPUT_POWER_LIMIT = 39, 81032 POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN = 40, 81033 POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN = 41, 81034 POWER_SUPPLY_PROP_ENERGY_FULL = 42, 81035 POWER_SUPPLY_PROP_ENERGY_EMPTY = 43, 81036 POWER_SUPPLY_PROP_ENERGY_NOW = 44, 81037 POWER_SUPPLY_PROP_ENERGY_AVG = 45, 81038 POWER_SUPPLY_PROP_CAPACITY = 46, 81039 POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN = 47, 81040 POWER_SUPPLY_PROP_CAPACITY_ALERT_MAX = 48, 81041 POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN = 49, 81042 POWER_SUPPLY_PROP_CAPACITY_LEVEL = 50, 81043 POWER_SUPPLY_PROP_TEMP = 51, 81044 POWER_SUPPLY_PROP_TEMP_MAX = 52, 81045 POWER_SUPPLY_PROP_TEMP_MIN = 53, 81046 POWER_SUPPLY_PROP_TEMP_ALERT_MIN = 54, 81047 POWER_SUPPLY_PROP_TEMP_ALERT_MAX = 55, 81048 POWER_SUPPLY_PROP_TEMP_AMBIENT = 56, 81049 POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MIN = 57, 81050 POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MAX = 58, 81051 POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW = 59, 81052 POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG = 60, 81053 POWER_SUPPLY_PROP_TIME_TO_FULL_NOW = 61, 81054 POWER_SUPPLY_PROP_TIME_TO_FULL_AVG = 62, 81055 POWER_SUPPLY_PROP_TYPE = 63, 81056 POWER_SUPPLY_PROP_USB_TYPE = 64, 81057 POWER_SUPPLY_PROP_SCOPE = 65, 81058 POWER_SUPPLY_PROP_PRECHARGE_CURRENT = 66, 81059 POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT = 67, 81060 POWER_SUPPLY_PROP_CALIBRATE = 68, 81061 POWER_SUPPLY_PROP_MANUFACTURE_YEAR = 69, 81062 POWER_SUPPLY_PROP_MANUFACTURE_MONTH = 70, 81063 POWER_SUPPLY_PROP_MANUFACTURE_DAY = 71, 81064 POWER_SUPPLY_PROP_MODEL_NAME = 72, 81065 POWER_SUPPLY_PROP_MANUFACTURER = 73, 81066 POWER_SUPPLY_PROP_SERIAL_NUMBER = 74, 81067 }; 81068 81069 enum power_supply_type { 81070 POWER_SUPPLY_TYPE_UNKNOWN = 0, 81071 POWER_SUPPLY_TYPE_BATTERY = 1, 81072 POWER_SUPPLY_TYPE_UPS = 2, 81073 POWER_SUPPLY_TYPE_MAINS = 3, 81074 POWER_SUPPLY_TYPE_USB = 4, 81075 POWER_SUPPLY_TYPE_USB_DCP = 5, 81076 POWER_SUPPLY_TYPE_USB_CDP = 6, 81077 POWER_SUPPLY_TYPE_USB_ACA = 7, 81078 POWER_SUPPLY_TYPE_USB_TYPE_C = 8, 81079 POWER_SUPPLY_TYPE_USB_PD = 9, 81080 POWER_SUPPLY_TYPE_USB_PD_DRP = 10, 81081 POWER_SUPPLY_TYPE_APPLE_BRICK_ID = 11, 81082 POWER_SUPPLY_TYPE_WIRELESS = 12, 81083 }; 81084 81085 enum power_supply_usb_type { 81086 POWER_SUPPLY_USB_TYPE_UNKNOWN = 0, 81087 POWER_SUPPLY_USB_TYPE_SDP = 1, 81088 POWER_SUPPLY_USB_TYPE_DCP = 2, 81089 POWER_SUPPLY_USB_TYPE_CDP = 3, 81090 POWER_SUPPLY_USB_TYPE_ACA = 4, 81091 POWER_SUPPLY_USB_TYPE_C = 5, 81092 POWER_SUPPLY_USB_TYPE_PD = 6, 81093 POWER_SUPPLY_USB_TYPE_PD_DRP = 7, 81094 POWER_SUPPLY_USB_TYPE_PD_PPS = 8, 81095 POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID = 9, 81096 }; 81097 81098 union power_supply_propval { 81099 int intval; 81100 const char *strval; 81101 }; 81102 81103 struct power_supply_config { 81104 struct device_node *of_node; 81105 struct fwnode_handle *fwnode; 81106 void *drv_data; 81107 const struct attribute_group **attr_grp; 81108 char **supplied_to; 81109 size_t num_supplicants; 81110 }; 81111 81112 struct power_supply; 81113 81114 struct power_supply_desc { 81115 const char *name; 81116 enum power_supply_type type; 81117 const enum power_supply_usb_type *usb_types; 81118 size_t num_usb_types; 81119 const enum power_supply_property *properties; 81120 size_t num_properties; 81121 int (*get_property)(struct power_supply *, enum power_supply_property, union power_supply_propval *); 81122 int (*set_property)(struct power_supply *, enum power_supply_property, const union power_supply_propval *); 81123 int (*property_is_writeable)(struct power_supply *, enum power_supply_property); 81124 void (*external_power_changed)(struct power_supply *); 81125 void (*set_charged)(struct power_supply *); 81126 bool no_thermal; 81127 int use_for_apm; 81128 }; 81129 81130 struct thermal_zone_device; 81131 81132 struct power_supply { 81133 const struct power_supply_desc *desc; 81134 char **supplied_to; 81135 size_t num_supplicants; 81136 char **supplied_from; 81137 size_t num_supplies; 81138 struct device_node *of_node; 81139 void *drv_data; 81140 struct device dev; 81141 struct work_struct changed_work; 81142 struct delayed_work deferred_register_work; 81143 spinlock_t changed_lock; 81144 bool changed; 81145 bool initialized; 81146 bool removing; 81147 atomic_t use_cnt; 81148 struct thermal_zone_device *tzd; 81149 struct thermal_cooling_device *tcd; 81150 struct led_trigger *charging_full_trig; 81151 char *charging_full_trig_name; 81152 struct led_trigger *charging_trig; 81153 char *charging_trig_name; 81154 struct led_trigger *full_trig; 81155 char *full_trig_name; 81156 struct led_trigger *online_trig; 81157 char *online_trig_name; 81158 struct led_trigger *charging_blink_full_solid_trig; 81159 char *charging_blink_full_solid_trig_name; 81160 }; 81161 81162 struct acpi_ac_bl { 81163 const char *hid; 81164 int hrv; 81165 }; 81166 81167 struct acpi_ac { 81168 struct power_supply *charger; 81169 struct power_supply_desc charger_desc; 81170 struct acpi_device *device; 81171 long long unsigned int state; 81172 struct notifier_block battery_nb; 81173 }; 81174 81175 struct input_id { 81176 __u16 bustype; 81177 __u16 vendor; 81178 __u16 product; 81179 __u16 version; 81180 }; 81181 81182 struct input_absinfo { 81183 __s32 value; 81184 __s32 minimum; 81185 __s32 maximum; 81186 __s32 fuzz; 81187 __s32 flat; 81188 __s32 resolution; 81189 }; 81190 81191 struct input_keymap_entry { 81192 __u8 flags; 81193 __u8 len; 81194 __u16 index; 81195 __u32 keycode; 81196 __u8 scancode[32]; 81197 }; 81198 81199 struct ff_replay { 81200 __u16 length; 81201 __u16 delay; 81202 }; 81203 81204 struct ff_trigger { 81205 __u16 button; 81206 __u16 interval; 81207 }; 81208 81209 struct ff_envelope { 81210 __u16 attack_length; 81211 __u16 attack_level; 81212 __u16 fade_length; 81213 __u16 fade_level; 81214 }; 81215 81216 struct ff_constant_effect { 81217 __s16 level; 81218 struct ff_envelope envelope; 81219 }; 81220 81221 struct ff_ramp_effect { 81222 __s16 start_level; 81223 __s16 end_level; 81224 struct ff_envelope envelope; 81225 }; 81226 81227 struct ff_condition_effect { 81228 __u16 right_saturation; 81229 __u16 left_saturation; 81230 __s16 right_coeff; 81231 __s16 left_coeff; 81232 __u16 deadband; 81233 __s16 center; 81234 }; 81235 81236 struct ff_periodic_effect { 81237 __u16 waveform; 81238 __u16 period; 81239 __s16 magnitude; 81240 __s16 offset; 81241 __u16 phase; 81242 struct ff_envelope envelope; 81243 __u32 custom_len; 81244 __s16 *custom_data; 81245 }; 81246 81247 struct ff_rumble_effect { 81248 __u16 strong_magnitude; 81249 __u16 weak_magnitude; 81250 }; 81251 81252 struct ff_effect { 81253 __u16 type; 81254 __s16 id; 81255 __u16 direction; 81256 struct ff_trigger trigger; 81257 struct ff_replay replay; 81258 union { 81259 struct ff_constant_effect constant; 81260 struct ff_ramp_effect ramp; 81261 struct ff_periodic_effect periodic; 81262 struct ff_condition_effect condition[2]; 81263 struct ff_rumble_effect rumble; 81264 } u; 81265 }; 81266 81267 struct input_device_id { 81268 kernel_ulong_t flags; 81269 __u16 bustype; 81270 __u16 vendor; 81271 __u16 product; 81272 __u16 version; 81273 kernel_ulong_t evbit[1]; 81274 kernel_ulong_t keybit[12]; 81275 kernel_ulong_t relbit[1]; 81276 kernel_ulong_t absbit[1]; 81277 kernel_ulong_t mscbit[1]; 81278 kernel_ulong_t ledbit[1]; 81279 kernel_ulong_t sndbit[1]; 81280 kernel_ulong_t ffbit[2]; 81281 kernel_ulong_t swbit[1]; 81282 kernel_ulong_t propbit[1]; 81283 kernel_ulong_t driver_info; 81284 }; 81285 81286 struct input_value { 81287 __u16 type; 81288 __u16 code; 81289 __s32 value; 81290 }; 81291 81292 enum input_clock_type { 81293 INPUT_CLK_REAL = 0, 81294 INPUT_CLK_MONO = 1, 81295 INPUT_CLK_BOOT = 2, 81296 INPUT_CLK_MAX = 3, 81297 }; 81298 81299 struct ff_device; 81300 81301 struct input_dev_poller; 81302 81303 struct input_mt; 81304 81305 struct input_handle; 81306 81307 struct input_dev { 81308 const char *name; 81309 const char *phys; 81310 const char *uniq; 81311 struct input_id id; 81312 long unsigned int propbit[1]; 81313 long unsigned int evbit[1]; 81314 long unsigned int keybit[12]; 81315 long unsigned int relbit[1]; 81316 long unsigned int absbit[1]; 81317 long unsigned int mscbit[1]; 81318 long unsigned int ledbit[1]; 81319 long unsigned int sndbit[1]; 81320 long unsigned int ffbit[2]; 81321 long unsigned int swbit[1]; 81322 unsigned int hint_events_per_packet; 81323 unsigned int keycodemax; 81324 unsigned int keycodesize; 81325 void *keycode; 81326 int (*setkeycode)(struct input_dev *, const struct input_keymap_entry *, unsigned int *); 81327 int (*getkeycode)(struct input_dev *, struct input_keymap_entry *); 81328 struct ff_device *ff; 81329 struct input_dev_poller *poller; 81330 unsigned int repeat_key; 81331 struct timer_list timer; 81332 int rep[2]; 81333 struct input_mt *mt; 81334 struct input_absinfo *absinfo; 81335 long unsigned int key[12]; 81336 long unsigned int led[1]; 81337 long unsigned int snd[1]; 81338 long unsigned int sw[1]; 81339 int (*open)(struct input_dev *); 81340 void (*close)(struct input_dev *); 81341 int (*flush)(struct input_dev *, struct file *); 81342 int (*event)(struct input_dev *, unsigned int, unsigned int, int); 81343 struct input_handle *grab; 81344 spinlock_t event_lock; 81345 struct mutex mutex; 81346 unsigned int users; 81347 bool going_away; 81348 struct device dev; 81349 struct list_head h_list; 81350 struct list_head node; 81351 unsigned int num_vals; 81352 unsigned int max_vals; 81353 struct input_value *vals; 81354 bool devres_managed; 81355 ktime_t timestamp[3]; 81356 bool inhibited; 81357 }; 81358 81359 struct ff_device { 81360 int (*upload)(struct input_dev *, struct ff_effect *, struct ff_effect *); 81361 int (*erase)(struct input_dev *, int); 81362 int (*playback)(struct input_dev *, int, int); 81363 void (*set_gain)(struct input_dev *, u16); 81364 void (*set_autocenter)(struct input_dev *, u16); 81365 void (*destroy)(struct ff_device *); 81366 void *private; 81367 long unsigned int ffbit[2]; 81368 struct mutex mutex; 81369 int max_effects; 81370 struct ff_effect *effects; 81371 struct file *effect_owners[0]; 81372 }; 81373 81374 struct input_handler; 81375 81376 struct input_handle { 81377 void *private; 81378 int open; 81379 const char *name; 81380 struct input_dev *dev; 81381 struct input_handler *handler; 81382 struct list_head d_node; 81383 struct list_head h_node; 81384 }; 81385 81386 struct input_handler { 81387 void *private; 81388 void (*event)(struct input_handle *, unsigned int, unsigned int, int); 81389 void (*events)(struct input_handle *, const struct input_value *, unsigned int); 81390 bool (*filter)(struct input_handle *, unsigned int, unsigned int, int); 81391 bool (*match)(struct input_handler *, struct input_dev *); 81392 int (*connect)(struct input_handler *, struct input_dev *, const struct input_device_id *); 81393 void (*disconnect)(struct input_handle *); 81394 void (*start)(struct input_handle *); 81395 bool legacy_minors; 81396 int minor; 81397 const char *name; 81398 const struct input_device_id *id_table; 81399 struct list_head h_list; 81400 struct list_head node; 81401 }; 81402 81403 enum { 81404 ACPI_BUTTON_LID_INIT_IGNORE = 0, 81405 ACPI_BUTTON_LID_INIT_OPEN = 1, 81406 ACPI_BUTTON_LID_INIT_METHOD = 2, 81407 ACPI_BUTTON_LID_INIT_DISABLED = 3, 81408 }; 81409 81410 struct acpi_button { 81411 unsigned int type; 81412 struct input_dev *input; 81413 char phys[32]; 81414 long unsigned int pushed; 81415 int last_state; 81416 ktime_t last_time; 81417 bool suspended; 81418 bool lid_state_initialized; 81419 }; 81420 81421 struct acpi_fan_fps { 81422 u64 control; 81423 u64 trip_point; 81424 u64 speed; 81425 u64 noise_level; 81426 u64 power; 81427 char name[20]; 81428 struct device_attribute dev_attr; 81429 }; 81430 81431 struct acpi_fan_fif { 81432 u64 revision; 81433 u64 fine_grain_ctrl; 81434 u64 step_size; 81435 u64 low_speed_notification; 81436 }; 81437 81438 struct acpi_fan { 81439 bool acpi4; 81440 struct acpi_fan_fif fif; 81441 struct acpi_fan_fps *fps; 81442 int fps_count; 81443 struct thermal_cooling_device *cdev; 81444 }; 81445 81446 struct acpi_pci_slot { 81447 struct pci_slot *pci_slot; 81448 struct list_head list; 81449 }; 81450 81451 struct acpi_lpi_states_array { 81452 unsigned int size; 81453 unsigned int composite_states_size; 81454 struct acpi_lpi_state *entries; 81455 struct acpi_lpi_state *composite_states[8]; 81456 }; 81457 81458 struct throttling_tstate { 81459 unsigned int cpu; 81460 int target_state; 81461 }; 81462 81463 struct acpi_processor_throttling_arg { 81464 struct acpi_processor *pr; 81465 int target_state; 81466 bool force; 81467 }; 81468 81469 struct container_dev { 81470 struct device dev; 81471 int (*offline)(struct container_dev *); 81472 }; 81473 81474 enum thermal_device_mode { 81475 THERMAL_DEVICE_DISABLED = 0, 81476 THERMAL_DEVICE_ENABLED = 1, 81477 }; 81478 81479 enum thermal_trip_type { 81480 THERMAL_TRIP_ACTIVE = 0, 81481 THERMAL_TRIP_PASSIVE = 1, 81482 THERMAL_TRIP_HOT = 2, 81483 THERMAL_TRIP_CRITICAL = 3, 81484 }; 81485 81486 enum thermal_trend { 81487 THERMAL_TREND_STABLE = 0, 81488 THERMAL_TREND_RAISING = 1, 81489 THERMAL_TREND_DROPPING = 2, 81490 THERMAL_TREND_RAISE_FULL = 3, 81491 THERMAL_TREND_DROP_FULL = 4, 81492 }; 81493 81494 enum thermal_notify_event { 81495 THERMAL_EVENT_UNSPECIFIED = 0, 81496 THERMAL_EVENT_TEMP_SAMPLE = 1, 81497 THERMAL_TRIP_VIOLATED = 2, 81498 THERMAL_TRIP_CHANGED = 3, 81499 THERMAL_DEVICE_DOWN = 4, 81500 THERMAL_DEVICE_UP = 5, 81501 THERMAL_DEVICE_POWER_CAPABILITY_CHANGED = 6, 81502 THERMAL_TABLE_CHANGED = 7, 81503 THERMAL_EVENT_KEEP_ALIVE = 8, 81504 }; 81505 81506 struct thermal_zone_device_ops { 81507 int (*bind)(struct thermal_zone_device *, struct thermal_cooling_device *); 81508 int (*unbind)(struct thermal_zone_device *, struct thermal_cooling_device *); 81509 int (*get_temp)(struct thermal_zone_device *, int *); 81510 int (*set_trips)(struct thermal_zone_device *, int, int); 81511 int (*change_mode)(struct thermal_zone_device *, enum thermal_device_mode); 81512 int (*get_trip_type)(struct thermal_zone_device *, int, enum thermal_trip_type *); 81513 int (*get_trip_temp)(struct thermal_zone_device *, int, int *); 81514 int (*set_trip_temp)(struct thermal_zone_device *, int, int); 81515 int (*get_trip_hyst)(struct thermal_zone_device *, int, int *); 81516 int (*set_trip_hyst)(struct thermal_zone_device *, int, int); 81517 int (*get_crit_temp)(struct thermal_zone_device *, int *); 81518 int (*set_emul_temp)(struct thermal_zone_device *, int); 81519 int (*get_trend)(struct thermal_zone_device *, int, enum thermal_trend *); 81520 int (*notify)(struct thermal_zone_device *, int, enum thermal_trip_type); 81521 void (*hot)(struct thermal_zone_device *); 81522 void (*critical)(struct thermal_zone_device *); 81523 }; 81524 81525 struct thermal_attr; 81526 81527 struct thermal_zone_params; 81528 81529 struct thermal_governor; 81530 81531 struct thermal_zone_device { 81532 int id; 81533 char type[20]; 81534 struct device device; 81535 struct attribute_group trips_attribute_group; 81536 struct thermal_attr *trip_temp_attrs; 81537 struct thermal_attr *trip_type_attrs; 81538 struct thermal_attr *trip_hyst_attrs; 81539 enum thermal_device_mode mode; 81540 void *devdata; 81541 int trips; 81542 long unsigned int trips_disabled; 81543 int passive_delay; 81544 int polling_delay; 81545 int temperature; 81546 int last_temperature; 81547 int emul_temperature; 81548 int passive; 81549 int prev_low_trip; 81550 int prev_high_trip; 81551 unsigned int forced_passive; 81552 atomic_t need_update; 81553 struct thermal_zone_device_ops *ops; 81554 struct thermal_zone_params *tzp; 81555 struct thermal_governor *governor; 81556 void *governor_data; 81557 struct list_head thermal_instances; 81558 struct ida ida; 81559 struct mutex lock; 81560 struct list_head node; 81561 struct delayed_work poll_queue; 81562 enum thermal_notify_event notify_event; 81563 }; 81564 81565 struct thermal_bind_params; 81566 81567 struct thermal_zone_params { 81568 char governor_name[20]; 81569 bool no_hwmon; 81570 int num_tbps; 81571 struct thermal_bind_params *tbp; 81572 u32 sustainable_power; 81573 s32 k_po; 81574 s32 k_pu; 81575 s32 k_i; 81576 s32 k_d; 81577 s32 integral_cutoff; 81578 int slope; 81579 int offset; 81580 }; 81581 81582 struct thermal_governor { 81583 char name[20]; 81584 int (*bind_to_tz)(struct thermal_zone_device *); 81585 void (*unbind_from_tz)(struct thermal_zone_device *); 81586 int (*throttle)(struct thermal_zone_device *, int); 81587 struct list_head governor_list; 81588 }; 81589 81590 struct thermal_bind_params { 81591 struct thermal_cooling_device *cdev; 81592 int weight; 81593 int trip_mask; 81594 long unsigned int *binding_limits; 81595 int (*match)(struct thermal_zone_device *, struct thermal_cooling_device *); 81596 }; 81597 81598 struct acpi_thermal_state { 81599 u8 critical: 1; 81600 u8 hot: 1; 81601 u8 passive: 1; 81602 u8 active: 1; 81603 u8 reserved: 4; 81604 int active_index; 81605 }; 81606 81607 struct acpi_thermal_state_flags { 81608 u8 valid: 1; 81609 u8 enabled: 1; 81610 u8 reserved: 6; 81611 }; 81612 81613 struct acpi_thermal_critical { 81614 struct acpi_thermal_state_flags flags; 81615 long unsigned int temperature; 81616 }; 81617 81618 struct acpi_thermal_hot { 81619 struct acpi_thermal_state_flags flags; 81620 long unsigned int temperature; 81621 }; 81622 81623 struct acpi_thermal_passive { 81624 struct acpi_thermal_state_flags flags; 81625 long unsigned int temperature; 81626 long unsigned int tc1; 81627 long unsigned int tc2; 81628 long unsigned int tsp; 81629 struct acpi_handle_list devices; 81630 }; 81631 81632 struct acpi_thermal_active { 81633 struct acpi_thermal_state_flags flags; 81634 long unsigned int temperature; 81635 struct acpi_handle_list devices; 81636 }; 81637 81638 struct acpi_thermal_trips { 81639 struct acpi_thermal_critical critical; 81640 struct acpi_thermal_hot hot; 81641 struct acpi_thermal_passive passive; 81642 struct acpi_thermal_active active[10]; 81643 }; 81644 81645 struct acpi_thermal_flags { 81646 u8 cooling_mode: 1; 81647 u8 devices: 1; 81648 u8 reserved: 6; 81649 }; 81650 81651 struct acpi_thermal { 81652 struct acpi_device *device; 81653 acpi_bus_id name; 81654 long unsigned int temperature; 81655 long unsigned int last_temperature; 81656 long unsigned int polling_frequency; 81657 volatile u8 zombie; 81658 struct acpi_thermal_flags flags; 81659 struct acpi_thermal_state state; 81660 struct acpi_thermal_trips trips; 81661 struct acpi_handle_list devices; 81662 struct thermal_zone_device *thermal_zone; 81663 int kelvin_offset; 81664 struct work_struct thermal_check_work; 81665 struct mutex thermal_check_lock; 81666 refcount_t thermal_check_count; 81667 }; 81668 81669 struct acpi_table_slit { 81670 struct acpi_table_header header; 81671 u64 locality_count; 81672 u8 entry[1]; 81673 } __attribute__((packed)); 81674 81675 struct acpi_table_srat { 81676 struct acpi_table_header header; 81677 u32 table_revision; 81678 u64 reserved; 81679 }; 81680 81681 enum acpi_srat_type { 81682 ACPI_SRAT_TYPE_CPU_AFFINITY = 0, 81683 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, 81684 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, 81685 ACPI_SRAT_TYPE_GICC_AFFINITY = 3, 81686 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, 81687 ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, 81688 ACPI_SRAT_TYPE_RESERVED = 6, 81689 }; 81690 81691 struct acpi_srat_mem_affinity { 81692 struct acpi_subtable_header header; 81693 u32 proximity_domain; 81694 u16 reserved; 81695 u64 base_address; 81696 u64 length; 81697 u32 reserved1; 81698 u32 flags; 81699 u64 reserved2; 81700 } __attribute__((packed)); 81701 81702 struct acpi_srat_gicc_affinity { 81703 struct acpi_subtable_header header; 81704 u32 proximity_domain; 81705 u32 acpi_processor_uid; 81706 u32 flags; 81707 u32 clock_domain; 81708 } __attribute__((packed)); 81709 81710 struct acpi_srat_generic_affinity { 81711 struct acpi_subtable_header header; 81712 u8 reserved; 81713 u8 device_handle_type; 81714 u32 proximity_domain; 81715 u8 device_handle[16]; 81716 u32 flags; 81717 u32 reserved1; 81718 }; 81719 81720 enum acpi_hmat_type { 81721 ACPI_HMAT_TYPE_PROXIMITY = 0, 81722 ACPI_HMAT_TYPE_LOCALITY = 1, 81723 ACPI_HMAT_TYPE_CACHE = 2, 81724 ACPI_HMAT_TYPE_RESERVED = 3, 81725 }; 81726 81727 struct acpi_hmat_proximity_domain { 81728 struct acpi_hmat_structure header; 81729 u16 flags; 81730 u16 reserved1; 81731 u32 processor_PD; 81732 u32 memory_PD; 81733 u32 reserved2; 81734 u64 reserved3; 81735 u64 reserved4; 81736 }; 81737 81738 struct acpi_hmat_locality { 81739 struct acpi_hmat_structure header; 81740 u8 flags; 81741 u8 data_type; 81742 u16 reserved1; 81743 u32 number_of_initiator_Pds; 81744 u32 number_of_target_Pds; 81745 u32 reserved2; 81746 u64 entry_base_unit; 81747 }; 81748 81749 struct acpi_hmat_cache { 81750 struct acpi_hmat_structure header; 81751 u32 memory_PD; 81752 u32 reserved1; 81753 u64 cache_size; 81754 u32 cache_attributes; 81755 u16 reserved2; 81756 u16 number_of_SMBIOShandles; 81757 }; 81758 81759 struct node_hmem_attrs { 81760 unsigned int read_bandwidth; 81761 unsigned int write_bandwidth; 81762 unsigned int read_latency; 81763 unsigned int write_latency; 81764 }; 81765 81766 enum cache_indexing { 81767 NODE_CACHE_DIRECT_MAP = 0, 81768 NODE_CACHE_INDEXED = 1, 81769 NODE_CACHE_OTHER = 2, 81770 }; 81771 81772 enum cache_write_policy { 81773 NODE_CACHE_WRITE_BACK = 0, 81774 NODE_CACHE_WRITE_THROUGH = 1, 81775 NODE_CACHE_WRITE_OTHER = 2, 81776 }; 81777 81778 struct node_cache_attrs { 81779 enum cache_indexing indexing; 81780 enum cache_write_policy write_policy; 81781 u64 size; 81782 u16 line_size; 81783 u8 level; 81784 }; 81785 81786 enum locality_types { 81787 WRITE_LATENCY = 0, 81788 READ_LATENCY = 1, 81789 WRITE_BANDWIDTH = 2, 81790 READ_BANDWIDTH = 3, 81791 }; 81792 81793 struct memory_locality { 81794 struct list_head node; 81795 struct acpi_hmat_locality *hmat_loc; 81796 }; 81797 81798 struct target_cache { 81799 struct list_head node; 81800 struct node_cache_attrs cache_attrs; 81801 }; 81802 81803 struct memory_target { 81804 struct list_head node; 81805 unsigned int memory_pxm; 81806 unsigned int processor_pxm; 81807 struct resource memregions; 81808 struct node_hmem_attrs hmem_attrs[2]; 81809 struct list_head caches; 81810 struct node_cache_attrs cache_attrs; 81811 bool registered; 81812 }; 81813 81814 struct memory_initiator { 81815 struct list_head node; 81816 unsigned int processor_pxm; 81817 bool has_cpu; 81818 }; 81819 81820 struct acpi_memory_info { 81821 struct list_head list; 81822 u64 start_addr; 81823 u64 length; 81824 short unsigned int caching; 81825 short unsigned int write_protect; 81826 unsigned int enabled: 1; 81827 }; 81828 81829 struct acpi_memory_device { 81830 struct acpi_device *device; 81831 struct list_head res_list; 81832 }; 81833 81834 struct acpi_pci_ioapic { 81835 acpi_handle root_handle; 81836 acpi_handle handle; 81837 u32 gsi_base; 81838 struct resource res; 81839 struct pci_dev *pdev; 81840 struct list_head list; 81841 }; 81842 81843 enum dmi_entry_type { 81844 DMI_ENTRY_BIOS = 0, 81845 DMI_ENTRY_SYSTEM = 1, 81846 DMI_ENTRY_BASEBOARD = 2, 81847 DMI_ENTRY_CHASSIS = 3, 81848 DMI_ENTRY_PROCESSOR = 4, 81849 DMI_ENTRY_MEM_CONTROLLER = 5, 81850 DMI_ENTRY_MEM_MODULE = 6, 81851 DMI_ENTRY_CACHE = 7, 81852 DMI_ENTRY_PORT_CONNECTOR = 8, 81853 DMI_ENTRY_SYSTEM_SLOT = 9, 81854 DMI_ENTRY_ONBOARD_DEVICE = 10, 81855 DMI_ENTRY_OEMSTRINGS = 11, 81856 DMI_ENTRY_SYSCONF = 12, 81857 DMI_ENTRY_BIOS_LANG = 13, 81858 DMI_ENTRY_GROUP_ASSOC = 14, 81859 DMI_ENTRY_SYSTEM_EVENT_LOG = 15, 81860 DMI_ENTRY_PHYS_MEM_ARRAY = 16, 81861 DMI_ENTRY_MEM_DEVICE = 17, 81862 DMI_ENTRY_32_MEM_ERROR = 18, 81863 DMI_ENTRY_MEM_ARRAY_MAPPED_ADDR = 19, 81864 DMI_ENTRY_MEM_DEV_MAPPED_ADDR = 20, 81865 DMI_ENTRY_BUILTIN_POINTING_DEV = 21, 81866 DMI_ENTRY_PORTABLE_BATTERY = 22, 81867 DMI_ENTRY_SYSTEM_RESET = 23, 81868 DMI_ENTRY_HW_SECURITY = 24, 81869 DMI_ENTRY_SYSTEM_POWER_CONTROLS = 25, 81870 DMI_ENTRY_VOLTAGE_PROBE = 26, 81871 DMI_ENTRY_COOLING_DEV = 27, 81872 DMI_ENTRY_TEMP_PROBE = 28, 81873 DMI_ENTRY_ELECTRICAL_CURRENT_PROBE = 29, 81874 DMI_ENTRY_OOB_REMOTE_ACCESS = 30, 81875 DMI_ENTRY_BIS_ENTRY = 31, 81876 DMI_ENTRY_SYSTEM_BOOT = 32, 81877 DMI_ENTRY_MGMT_DEV = 33, 81878 DMI_ENTRY_MGMT_DEV_COMPONENT = 34, 81879 DMI_ENTRY_MGMT_DEV_THRES = 35, 81880 DMI_ENTRY_MEM_CHANNEL = 36, 81881 DMI_ENTRY_IPMI_DEV = 37, 81882 DMI_ENTRY_SYS_POWER_SUPPLY = 38, 81883 DMI_ENTRY_ADDITIONAL = 39, 81884 DMI_ENTRY_ONBOARD_DEV_EXT = 40, 81885 DMI_ENTRY_MGMT_CONTROLLER_HOST = 41, 81886 DMI_ENTRY_INACTIVE = 126, 81887 DMI_ENTRY_END_OF_TABLE = 127, 81888 }; 81889 81890 enum { 81891 POWER_SUPPLY_STATUS_UNKNOWN = 0, 81892 POWER_SUPPLY_STATUS_CHARGING = 1, 81893 POWER_SUPPLY_STATUS_DISCHARGING = 2, 81894 POWER_SUPPLY_STATUS_NOT_CHARGING = 3, 81895 POWER_SUPPLY_STATUS_FULL = 4, 81896 }; 81897 81898 enum { 81899 POWER_SUPPLY_TECHNOLOGY_UNKNOWN = 0, 81900 POWER_SUPPLY_TECHNOLOGY_NiMH = 1, 81901 POWER_SUPPLY_TECHNOLOGY_LION = 2, 81902 POWER_SUPPLY_TECHNOLOGY_LIPO = 3, 81903 POWER_SUPPLY_TECHNOLOGY_LiFe = 4, 81904 POWER_SUPPLY_TECHNOLOGY_NiCd = 5, 81905 POWER_SUPPLY_TECHNOLOGY_LiMn = 6, 81906 }; 81907 81908 enum { 81909 POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN = 0, 81910 POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL = 1, 81911 POWER_SUPPLY_CAPACITY_LEVEL_LOW = 2, 81912 POWER_SUPPLY_CAPACITY_LEVEL_NORMAL = 3, 81913 POWER_SUPPLY_CAPACITY_LEVEL_HIGH = 4, 81914 POWER_SUPPLY_CAPACITY_LEVEL_FULL = 5, 81915 }; 81916 81917 struct acpi_battery_hook { 81918 const char *name; 81919 int (*add_battery)(struct power_supply *); 81920 int (*remove_battery)(struct power_supply *); 81921 struct list_head list; 81922 }; 81923 81924 enum { 81925 ACPI_BATTERY_ALARM_PRESENT = 0, 81926 ACPI_BATTERY_XINFO_PRESENT = 1, 81927 ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY = 2, 81928 ACPI_BATTERY_QUIRK_THINKPAD_MAH = 3, 81929 ACPI_BATTERY_QUIRK_DEGRADED_FULL_CHARGE = 4, 81930 }; 81931 81932 struct acpi_battery { 81933 struct mutex lock; 81934 struct mutex sysfs_lock; 81935 struct power_supply *bat; 81936 struct power_supply_desc bat_desc; 81937 struct acpi_device *device; 81938 struct notifier_block pm_nb; 81939 struct list_head list; 81940 long unsigned int update_time; 81941 int revision; 81942 int rate_now; 81943 int capacity_now; 81944 int voltage_now; 81945 int design_capacity; 81946 int full_charge_capacity; 81947 int technology; 81948 int design_voltage; 81949 int design_capacity_warning; 81950 int design_capacity_low; 81951 int cycle_count; 81952 int measurement_accuracy; 81953 int max_sampling_time; 81954 int min_sampling_time; 81955 int max_averaging_interval; 81956 int min_averaging_interval; 81957 int capacity_granularity_1; 81958 int capacity_granularity_2; 81959 int alarm; 81960 char model_number[32]; 81961 char serial_number[32]; 81962 char type[32]; 81963 char oem_info[32]; 81964 int state; 81965 int power_unit; 81966 long unsigned int flags; 81967 }; 81968 81969 struct acpi_offsets { 81970 size_t offset; 81971 u8 mode; 81972 }; 81973 81974 struct acpi_pcct_hw_reduced { 81975 struct acpi_subtable_header header; 81976 u32 platform_interrupt; 81977 u8 flags; 81978 u8 reserved; 81979 u64 base_address; 81980 u64 length; 81981 struct acpi_generic_address doorbell_register; 81982 u64 preserve_mask; 81983 u64 write_mask; 81984 u32 latency; 81985 u32 max_access_rate; 81986 u16 min_turnaround_time; 81987 } __attribute__((packed)); 81988 81989 struct acpi_pcct_shared_memory { 81990 u32 signature; 81991 u16 command; 81992 u16 status; 81993 }; 81994 81995 struct mbox_chan; 81996 81997 struct mbox_chan_ops { 81998 int (*send_data)(struct mbox_chan *, void *); 81999 int (*flush)(struct mbox_chan *, long unsigned int); 82000 int (*startup)(struct mbox_chan *); 82001 void (*shutdown)(struct mbox_chan *); 82002 bool (*last_tx_done)(struct mbox_chan *); 82003 bool (*peek_data)(struct mbox_chan *); 82004 }; 82005 82006 struct mbox_controller; 82007 82008 struct mbox_client; 82009 82010 struct mbox_chan { 82011 struct mbox_controller *mbox; 82012 unsigned int txdone_method; 82013 struct mbox_client *cl; 82014 struct completion tx_complete; 82015 void *active_req; 82016 unsigned int msg_count; 82017 unsigned int msg_free; 82018 void *msg_data[20]; 82019 spinlock_t lock; 82020 void *con_priv; 82021 }; 82022 82023 struct mbox_controller { 82024 struct device *dev; 82025 const struct mbox_chan_ops *ops; 82026 struct mbox_chan *chans; 82027 int num_chans; 82028 bool txdone_irq; 82029 bool txdone_poll; 82030 unsigned int txpoll_period; 82031 struct mbox_chan * (*of_xlate)(struct mbox_controller *, const struct of_phandle_args *); 82032 struct hrtimer poll_hrt; 82033 struct list_head node; 82034 }; 82035 82036 struct mbox_client { 82037 struct device *dev; 82038 bool tx_block; 82039 long unsigned int tx_tout; 82040 bool knows_txdone; 82041 void (*rx_callback)(struct mbox_client *, void *); 82042 void (*tx_prepare)(struct mbox_client *, void *); 82043 void (*tx_done)(struct mbox_client *, void *, int); 82044 }; 82045 82046 struct cpc_register_resource { 82047 acpi_object_type type; 82048 u64 *sys_mem_vaddr; 82049 union { 82050 struct cpc_reg reg; 82051 u64 int_value; 82052 } cpc_entry; 82053 }; 82054 82055 struct cpc_desc { 82056 int num_entries; 82057 int version; 82058 int cpu_id; 82059 int write_cmd_status; 82060 int write_cmd_id; 82061 struct cpc_register_resource cpc_regs[21]; 82062 struct acpi_psd_package domain_info; 82063 struct kobject kobj; 82064 }; 82065 82066 enum cppc_regs { 82067 HIGHEST_PERF = 0, 82068 NOMINAL_PERF = 1, 82069 LOW_NON_LINEAR_PERF = 2, 82070 LOWEST_PERF = 3, 82071 GUARANTEED_PERF = 4, 82072 DESIRED_PERF = 5, 82073 MIN_PERF = 6, 82074 MAX_PERF = 7, 82075 PERF_REDUC_TOLERANCE = 8, 82076 TIME_WINDOW = 9, 82077 CTR_WRAP_TIME = 10, 82078 REFERENCE_CTR = 11, 82079 DELIVERED_CTR = 12, 82080 PERF_LIMITED = 13, 82081 ENABLE = 14, 82082 AUTO_SEL_ENABLE = 15, 82083 AUTO_ACT_WINDOW = 16, 82084 ENERGY_PERF = 17, 82085 REFERENCE_PERF = 18, 82086 LOWEST_FREQ = 19, 82087 NOMINAL_FREQ = 20, 82088 }; 82089 82090 struct cppc_perf_ctrls { 82091 u32 max_perf; 82092 u32 min_perf; 82093 u32 desired_perf; 82094 }; 82095 82096 struct cppc_perf_fb_ctrs { 82097 u64 reference; 82098 u64 delivered; 82099 u64 reference_perf; 82100 u64 wraparound_time; 82101 }; 82102 82103 struct cppc_cpudata { 82104 struct list_head node; 82105 struct cppc_perf_caps perf_caps; 82106 struct cppc_perf_ctrls perf_ctrls; 82107 struct cppc_perf_fb_ctrs perf_fb_ctrs; 82108 unsigned int shared_type; 82109 cpumask_var_t shared_cpu_map; 82110 }; 82111 82112 struct cppc_pcc_data { 82113 struct mbox_chan *pcc_channel; 82114 void *pcc_comm_addr; 82115 bool pcc_channel_acquired; 82116 unsigned int deadline_us; 82117 unsigned int pcc_mpar; 82118 unsigned int pcc_mrtt; 82119 unsigned int pcc_nominal; 82120 bool pending_pcc_write_cmd; 82121 bool platform_owns_pcc; 82122 unsigned int pcc_write_cnt; 82123 struct rw_semaphore pcc_lock; 82124 wait_queue_head_t pcc_write_wait_q; 82125 ktime_t last_cmd_cmpl_time; 82126 ktime_t last_mpar_reset; 82127 int mpar_count; 82128 int refcount; 82129 }; 82130 82131 struct cppc_attr { 82132 struct attribute attr; 82133 ssize_t (*show)(struct kobject *, struct attribute *, char *); 82134 ssize_t (*store)(struct kobject *, struct attribute *, const char *, ssize_t); 82135 }; 82136 82137 struct acpi_whea_header { 82138 u8 action; 82139 u8 instruction; 82140 u8 flags; 82141 u8 reserved; 82142 struct acpi_generic_address register_region; 82143 u64 value; 82144 u64 mask; 82145 } __attribute__((packed)); 82146 82147 struct apei_exec_context; 82148 82149 typedef int (*apei_exec_ins_func_t)(struct apei_exec_context *, struct acpi_whea_header *); 82150 82151 struct apei_exec_ins_type; 82152 82153 struct apei_exec_context { 82154 u32 ip; 82155 u64 value; 82156 u64 var1; 82157 u64 var2; 82158 u64 src_base; 82159 u64 dst_base; 82160 struct apei_exec_ins_type *ins_table; 82161 u32 instructions; 82162 struct acpi_whea_header *action_table; 82163 u32 entries; 82164 }; 82165 82166 struct apei_exec_ins_type { 82167 u32 flags; 82168 apei_exec_ins_func_t run; 82169 }; 82170 82171 struct apei_resources { 82172 struct list_head iomem; 82173 struct list_head ioport; 82174 }; 82175 82176 typedef int (*apei_exec_entry_func_t)(struct apei_exec_context *, struct acpi_whea_header *, void *); 82177 82178 struct apei_res { 82179 struct list_head list; 82180 long unsigned int start; 82181 long unsigned int end; 82182 }; 82183 82184 struct acpi_table_hest { 82185 struct acpi_table_header header; 82186 u32 error_source_count; 82187 }; 82188 82189 enum acpi_hest_types { 82190 ACPI_HEST_TYPE_IA32_CHECK = 0, 82191 ACPI_HEST_TYPE_IA32_CORRECTED_CHECK = 1, 82192 ACPI_HEST_TYPE_IA32_NMI = 2, 82193 ACPI_HEST_TYPE_NOT_USED3 = 3, 82194 ACPI_HEST_TYPE_NOT_USED4 = 4, 82195 ACPI_HEST_TYPE_NOT_USED5 = 5, 82196 ACPI_HEST_TYPE_AER_ROOT_PORT = 6, 82197 ACPI_HEST_TYPE_AER_ENDPOINT = 7, 82198 ACPI_HEST_TYPE_AER_BRIDGE = 8, 82199 ACPI_HEST_TYPE_GENERIC_ERROR = 9, 82200 ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10, 82201 ACPI_HEST_TYPE_IA32_DEFERRED_CHECK = 11, 82202 ACPI_HEST_TYPE_RESERVED = 12, 82203 }; 82204 82205 struct acpi_hest_ia_machine_check { 82206 struct acpi_hest_header header; 82207 u16 reserved1; 82208 u8 flags; 82209 u8 enabled; 82210 u32 records_to_preallocate; 82211 u32 max_sections_per_record; 82212 u64 global_capability_data; 82213 u64 global_control_data; 82214 u8 num_hardware_banks; 82215 u8 reserved3[7]; 82216 }; 82217 82218 struct acpi_hest_generic { 82219 struct acpi_hest_header header; 82220 u16 related_source_id; 82221 u8 reserved; 82222 u8 enabled; 82223 u32 records_to_preallocate; 82224 u32 max_sections_per_record; 82225 u32 max_raw_data_length; 82226 struct acpi_generic_address error_status_address; 82227 struct acpi_hest_notify notify; 82228 u32 error_block_length; 82229 } __attribute__((packed)); 82230 82231 struct acpi_hest_ia_deferred_check { 82232 struct acpi_hest_header header; 82233 u16 reserved1; 82234 u8 flags; 82235 u8 enabled; 82236 u32 records_to_preallocate; 82237 u32 max_sections_per_record; 82238 struct acpi_hest_notify notify; 82239 u8 num_hardware_banks; 82240 u8 reserved2[3]; 82241 }; 82242 82243 enum hest_status { 82244 HEST_ENABLED = 0, 82245 HEST_DISABLED = 1, 82246 HEST_NOT_FOUND = 2, 82247 }; 82248 82249 typedef int (*apei_hest_func_t)(struct acpi_hest_header *, void *); 82250 82251 struct ghes_arr { 82252 struct platform_device **ghes_devs; 82253 unsigned int count; 82254 }; 82255 82256 struct acpi_table_erst { 82257 struct acpi_table_header header; 82258 u32 header_length; 82259 u32 reserved; 82260 u32 entries; 82261 }; 82262 82263 enum acpi_erst_actions { 82264 ACPI_ERST_BEGIN_WRITE = 0, 82265 ACPI_ERST_BEGIN_READ = 1, 82266 ACPI_ERST_BEGIN_CLEAR = 2, 82267 ACPI_ERST_END = 3, 82268 ACPI_ERST_SET_RECORD_OFFSET = 4, 82269 ACPI_ERST_EXECUTE_OPERATION = 5, 82270 ACPI_ERST_CHECK_BUSY_STATUS = 6, 82271 ACPI_ERST_GET_COMMAND_STATUS = 7, 82272 ACPI_ERST_GET_RECORD_ID = 8, 82273 ACPI_ERST_SET_RECORD_ID = 9, 82274 ACPI_ERST_GET_RECORD_COUNT = 10, 82275 ACPI_ERST_BEGIN_DUMMY_WRIITE = 11, 82276 ACPI_ERST_NOT_USED = 12, 82277 ACPI_ERST_GET_ERROR_RANGE = 13, 82278 ACPI_ERST_GET_ERROR_LENGTH = 14, 82279 ACPI_ERST_GET_ERROR_ATTRIBUTES = 15, 82280 ACPI_ERST_EXECUTE_TIMINGS = 16, 82281 ACPI_ERST_ACTION_RESERVED = 17, 82282 }; 82283 82284 enum acpi_erst_instructions { 82285 ACPI_ERST_READ_REGISTER = 0, 82286 ACPI_ERST_READ_REGISTER_VALUE = 1, 82287 ACPI_ERST_WRITE_REGISTER = 2, 82288 ACPI_ERST_WRITE_REGISTER_VALUE = 3, 82289 ACPI_ERST_NOOP = 4, 82290 ACPI_ERST_LOAD_VAR1 = 5, 82291 ACPI_ERST_LOAD_VAR2 = 6, 82292 ACPI_ERST_STORE_VAR1 = 7, 82293 ACPI_ERST_ADD = 8, 82294 ACPI_ERST_SUBTRACT = 9, 82295 ACPI_ERST_ADD_VALUE = 10, 82296 ACPI_ERST_SUBTRACT_VALUE = 11, 82297 ACPI_ERST_STALL = 12, 82298 ACPI_ERST_STALL_WHILE_TRUE = 13, 82299 ACPI_ERST_SKIP_NEXT_IF_TRUE = 14, 82300 ACPI_ERST_GOTO = 15, 82301 ACPI_ERST_SET_SRC_ADDRESS_BASE = 16, 82302 ACPI_ERST_SET_DST_ADDRESS_BASE = 17, 82303 ACPI_ERST_MOVE_DATA = 18, 82304 ACPI_ERST_INSTRUCTION_RESERVED = 19, 82305 }; 82306 82307 struct erst_erange { 82308 u64 base; 82309 u64 size; 82310 void *vaddr; 82311 u32 attr; 82312 }; 82313 82314 struct erst_record_id_cache { 82315 struct mutex lock; 82316 u64 *entries; 82317 int len; 82318 int size; 82319 int refcount; 82320 }; 82321 82322 struct cper_pstore_record { 82323 struct cper_record_header hdr; 82324 struct cper_section_descriptor sec_hdr; 82325 char data[0]; 82326 }; 82327 82328 struct acpi_bert_region { 82329 u32 block_status; 82330 u32 raw_data_offset; 82331 u32 raw_data_length; 82332 u32 data_length; 82333 u32 error_severity; 82334 }; 82335 82336 struct acpi_hest_generic_status { 82337 u32 block_status; 82338 u32 raw_data_offset; 82339 u32 raw_data_length; 82340 u32 data_length; 82341 u32 error_severity; 82342 }; 82343 82344 enum acpi_hest_notify_types { 82345 ACPI_HEST_NOTIFY_POLLED = 0, 82346 ACPI_HEST_NOTIFY_EXTERNAL = 1, 82347 ACPI_HEST_NOTIFY_LOCAL = 2, 82348 ACPI_HEST_NOTIFY_SCI = 3, 82349 ACPI_HEST_NOTIFY_NMI = 4, 82350 ACPI_HEST_NOTIFY_CMCI = 5, 82351 ACPI_HEST_NOTIFY_MCE = 6, 82352 ACPI_HEST_NOTIFY_GPIO = 7, 82353 ACPI_HEST_NOTIFY_SEA = 8, 82354 ACPI_HEST_NOTIFY_SEI = 9, 82355 ACPI_HEST_NOTIFY_GSIV = 10, 82356 ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11, 82357 ACPI_HEST_NOTIFY_RESERVED = 12, 82358 }; 82359 82360 struct acpi_hest_generic_v2 { 82361 struct acpi_hest_header header; 82362 u16 related_source_id; 82363 u8 reserved; 82364 u8 enabled; 82365 u32 records_to_preallocate; 82366 u32 max_sections_per_record; 82367 u32 max_raw_data_length; 82368 struct acpi_generic_address error_status_address; 82369 struct acpi_hest_notify notify; 82370 u32 error_block_length; 82371 struct acpi_generic_address read_ack_register; 82372 u64 read_ack_preserve; 82373 u64 read_ack_write; 82374 } __attribute__((packed)); 82375 82376 struct acpi_hest_generic_data { 82377 u8 section_type[16]; 82378 u32 error_severity; 82379 u16 revision; 82380 u8 validation_bits; 82381 u8 flags; 82382 u32 error_data_length; 82383 u8 fru_id[16]; 82384 u8 fru_text[20]; 82385 }; 82386 82387 struct acpi_hest_generic_data_v300 { 82388 u8 section_type[16]; 82389 u32 error_severity; 82390 u16 revision; 82391 u8 validation_bits; 82392 u8 flags; 82393 u32 error_data_length; 82394 u8 fru_id[16]; 82395 u8 fru_text[20]; 82396 u64 time_stamp; 82397 }; 82398 82399 struct cper_sec_proc_arm { 82400 u32 validation_bits; 82401 u16 err_info_num; 82402 u16 context_info_num; 82403 u32 section_length; 82404 u8 affinity_level; 82405 u8 reserved[3]; 82406 u64 mpidr; 82407 u64 midr; 82408 u32 running_state; 82409 u32 psci_state; 82410 }; 82411 82412 struct cper_sec_pcie { 82413 u64 validation_bits; 82414 u32 port_type; 82415 struct { 82416 u8 minor; 82417 u8 major; 82418 u8 reserved[2]; 82419 } version; 82420 u16 command; 82421 u16 status; 82422 u32 reserved; 82423 struct { 82424 u16 vendor_id; 82425 u16 device_id; 82426 u8 class_code[3]; 82427 u8 function; 82428 u8 device; 82429 u16 segment; 82430 u8 bus; 82431 u8 secondary_bus; 82432 u16 slot; 82433 u8 reserved; 82434 } __attribute__((packed)) device_id; 82435 struct { 82436 u32 lower; 82437 u32 upper; 82438 } serial_number; 82439 struct { 82440 u16 secondary_status; 82441 u16 control; 82442 } bridge; 82443 u8 capability[60]; 82444 u8 aer_info[96]; 82445 }; 82446 82447 struct ghes { 82448 union { 82449 struct acpi_hest_generic *generic; 82450 struct acpi_hest_generic_v2 *generic_v2; 82451 }; 82452 struct acpi_hest_generic_status *estatus; 82453 long unsigned int flags; 82454 union { 82455 struct list_head list; 82456 struct timer_list timer; 82457 unsigned int irq; 82458 }; 82459 }; 82460 82461 struct ghes_estatus_node { 82462 struct llist_node llnode; 82463 struct acpi_hest_generic *generic; 82464 struct ghes *ghes; 82465 int task_work_cpu; 82466 struct callback_head task_work; 82467 }; 82468 82469 struct ghes_estatus_cache { 82470 u32 estatus_len; 82471 atomic_t count; 82472 struct acpi_hest_generic *generic; 82473 long long unsigned int time_in; 82474 struct callback_head rcu; 82475 }; 82476 82477 struct ghes_vendor_record_entry { 82478 struct work_struct work; 82479 int error_severity; 82480 char vendor_record[0]; 82481 }; 82482 82483 struct pmic_table { 82484 int address; 82485 int reg; 82486 int bit; 82487 }; 82488 82489 struct intel_pmic_opregion_data { 82490 int (*get_power)(struct regmap *, int, int, u64 *); 82491 int (*update_power)(struct regmap *, int, int, bool); 82492 int (*get_raw_temp)(struct regmap *, int); 82493 int (*update_aux)(struct regmap *, int, int); 82494 int (*get_policy)(struct regmap *, int, int, u64 *); 82495 int (*update_policy)(struct regmap *, int, int, int); 82496 int (*exec_mipi_pmic_seq_element)(struct regmap *, u16, u32, u32, u32); 82497 struct pmic_table *power_table; 82498 int power_table_count; 82499 struct pmic_table *thermal_table; 82500 int thermal_table_count; 82501 int pmic_i2c_address; 82502 }; 82503 82504 struct intel_pmic_regs_handler_ctx { 82505 unsigned int val; 82506 u16 addr; 82507 }; 82508 82509 struct intel_pmic_opregion { 82510 struct mutex lock; 82511 struct acpi_lpat_conversion_table *lpat_table; 82512 struct regmap *regmap; 82513 struct intel_pmic_opregion_data *data; 82514 struct intel_pmic_regs_handler_ctx ctx; 82515 }; 82516 82517 enum regcache_type { 82518 REGCACHE_NONE = 0, 82519 REGCACHE_RBTREE = 1, 82520 REGCACHE_COMPRESSED = 2, 82521 REGCACHE_FLAT = 3, 82522 }; 82523 82524 struct reg_default { 82525 unsigned int reg; 82526 unsigned int def; 82527 }; 82528 82529 enum regmap_endian { 82530 REGMAP_ENDIAN_DEFAULT = 0, 82531 REGMAP_ENDIAN_BIG = 1, 82532 REGMAP_ENDIAN_LITTLE = 2, 82533 REGMAP_ENDIAN_NATIVE = 3, 82534 }; 82535 82536 struct regmap_range { 82537 unsigned int range_min; 82538 unsigned int range_max; 82539 }; 82540 82541 struct regmap_access_table { 82542 const struct regmap_range *yes_ranges; 82543 unsigned int n_yes_ranges; 82544 const struct regmap_range *no_ranges; 82545 unsigned int n_no_ranges; 82546 }; 82547 82548 typedef void (*regmap_lock)(void *); 82549 82550 typedef void (*regmap_unlock)(void *); 82551 82552 struct regmap_range_cfg; 82553 82554 struct regmap_config { 82555 const char *name; 82556 int reg_bits; 82557 int reg_stride; 82558 int pad_bits; 82559 int val_bits; 82560 bool (*writeable_reg)(struct device *, unsigned int); 82561 bool (*readable_reg)(struct device *, unsigned int); 82562 bool (*volatile_reg)(struct device *, unsigned int); 82563 bool (*precious_reg)(struct device *, unsigned int); 82564 bool (*writeable_noinc_reg)(struct device *, unsigned int); 82565 bool (*readable_noinc_reg)(struct device *, unsigned int); 82566 bool disable_locking; 82567 regmap_lock lock; 82568 regmap_unlock unlock; 82569 void *lock_arg; 82570 int (*reg_read)(void *, unsigned int, unsigned int *); 82571 int (*reg_write)(void *, unsigned int, unsigned int); 82572 bool fast_io; 82573 unsigned int max_register; 82574 const struct regmap_access_table *wr_table; 82575 const struct regmap_access_table *rd_table; 82576 const struct regmap_access_table *volatile_table; 82577 const struct regmap_access_table *precious_table; 82578 const struct regmap_access_table *wr_noinc_table; 82579 const struct regmap_access_table *rd_noinc_table; 82580 const struct reg_default *reg_defaults; 82581 unsigned int num_reg_defaults; 82582 enum regcache_type cache_type; 82583 const void *reg_defaults_raw; 82584 unsigned int num_reg_defaults_raw; 82585 long unsigned int read_flag_mask; 82586 long unsigned int write_flag_mask; 82587 bool zero_flag_mask; 82588 bool use_single_read; 82589 bool use_single_write; 82590 bool use_relaxed_mmio; 82591 bool can_multi_write; 82592 enum regmap_endian reg_format_endian; 82593 enum regmap_endian val_format_endian; 82594 const struct regmap_range_cfg *ranges; 82595 unsigned int num_ranges; 82596 bool use_hwlock; 82597 unsigned int hwlock_id; 82598 unsigned int hwlock_mode; 82599 bool can_sleep; 82600 }; 82601 82602 struct regmap_range_cfg { 82603 const char *name; 82604 unsigned int range_min; 82605 unsigned int range_max; 82606 unsigned int selector_reg; 82607 unsigned int selector_mask; 82608 int selector_shift; 82609 unsigned int window_start; 82610 unsigned int window_len; 82611 }; 82612 82613 struct regmap_irq_type { 82614 unsigned int type_reg_offset; 82615 unsigned int type_reg_mask; 82616 unsigned int type_rising_val; 82617 unsigned int type_falling_val; 82618 unsigned int type_level_low_val; 82619 unsigned int type_level_high_val; 82620 unsigned int types_supported; 82621 }; 82622 82623 struct regmap_irq { 82624 unsigned int reg_offset; 82625 unsigned int mask; 82626 struct regmap_irq_type type; 82627 }; 82628 82629 struct regmap_irq_sub_irq_map { 82630 unsigned int num_regs; 82631 unsigned int *offset; 82632 }; 82633 82634 struct regmap_irq_chip { 82635 const char *name; 82636 unsigned int main_status; 82637 unsigned int num_main_status_bits; 82638 struct regmap_irq_sub_irq_map *sub_reg_offsets; 82639 int num_main_regs; 82640 unsigned int status_base; 82641 unsigned int mask_base; 82642 unsigned int unmask_base; 82643 unsigned int ack_base; 82644 unsigned int wake_base; 82645 unsigned int type_base; 82646 unsigned int irq_reg_stride; 82647 bool mask_writeonly: 1; 82648 bool init_ack_masked: 1; 82649 bool mask_invert: 1; 82650 bool use_ack: 1; 82651 bool ack_invert: 1; 82652 bool clear_ack: 1; 82653 bool wake_invert: 1; 82654 bool runtime_pm: 1; 82655 bool type_invert: 1; 82656 bool type_in_mask: 1; 82657 bool clear_on_unmask: 1; 82658 int num_regs; 82659 const struct regmap_irq *irqs; 82660 int num_irqs; 82661 int num_type_reg; 82662 unsigned int type_reg_stride; 82663 int (*handle_pre_irq)(void *); 82664 int (*handle_post_irq)(void *); 82665 void *irq_drv_data; 82666 }; 82667 82668 struct axp20x_dev { 82669 struct device *dev; 82670 int irq; 82671 long unsigned int irq_flags; 82672 struct regmap *regmap; 82673 struct regmap_irq_chip_data *regmap_irqc; 82674 long int variant; 82675 int nr_cells; 82676 const struct mfd_cell *cells; 82677 const struct regmap_config *regmap_cfg; 82678 const struct regmap_irq_chip *regmap_irq_chip; 82679 }; 82680 82681 struct mfd_cell_acpi_match; 82682 82683 struct mfd_cell { 82684 const char *name; 82685 int id; 82686 int level; 82687 int (*enable)(struct platform_device *); 82688 int (*disable)(struct platform_device *); 82689 int (*suspend)(struct platform_device *); 82690 int (*resume)(struct platform_device *); 82691 void *platform_data; 82692 size_t pdata_size; 82693 const struct property_entry *properties; 82694 const char *of_compatible; 82695 const u64 of_reg; 82696 bool use_of_reg; 82697 const struct mfd_cell_acpi_match *acpi_match; 82698 int num_resources; 82699 const struct resource *resources; 82700 bool ignore_resource_conflicts; 82701 bool pm_runtime_no_callbacks; 82702 const char * const *parent_supplies; 82703 int num_parent_supplies; 82704 }; 82705 82706 struct pnp_resource { 82707 struct list_head list; 82708 struct resource res; 82709 }; 82710 82711 struct pnp_port { 82712 resource_size_t min; 82713 resource_size_t max; 82714 resource_size_t align; 82715 resource_size_t size; 82716 unsigned char flags; 82717 }; 82718 82719 typedef struct { 82720 long unsigned int bits[4]; 82721 } pnp_irq_mask_t; 82722 82723 struct pnp_irq { 82724 pnp_irq_mask_t map; 82725 unsigned char flags; 82726 }; 82727 82728 struct pnp_dma { 82729 unsigned char map; 82730 unsigned char flags; 82731 }; 82732 82733 struct pnp_mem { 82734 resource_size_t min; 82735 resource_size_t max; 82736 resource_size_t align; 82737 resource_size_t size; 82738 unsigned char flags; 82739 }; 82740 82741 struct pnp_option { 82742 struct list_head list; 82743 unsigned int flags; 82744 long unsigned int type; 82745 union { 82746 struct pnp_port port; 82747 struct pnp_irq irq; 82748 struct pnp_dma dma; 82749 struct pnp_mem mem; 82750 } u; 82751 }; 82752 82753 struct pnp_info_buffer { 82754 char *buffer; 82755 char *curr; 82756 long unsigned int size; 82757 long unsigned int len; 82758 int stop; 82759 int error; 82760 }; 82761 82762 typedef struct pnp_info_buffer pnp_info_buffer_t; 82763 82764 struct pnp_fixup { 82765 char id[7]; 82766 void (*quirk_function)(struct pnp_dev *); 82767 }; 82768 82769 struct acpipnp_parse_option_s { 82770 struct pnp_dev *dev; 82771 unsigned int option_flags; 82772 }; 82773 82774 struct clk_bulk_data { 82775 const char *id; 82776 struct clk *clk; 82777 }; 82778 82779 struct clk_bulk_devres { 82780 struct clk_bulk_data *clks; 82781 int num_clks; 82782 }; 82783 82784 struct clk_hw; 82785 82786 struct clk_lookup { 82787 struct list_head node; 82788 const char *dev_id; 82789 const char *con_id; 82790 struct clk *clk; 82791 struct clk_hw *clk_hw; 82792 }; 82793 82794 struct clk_init_data; 82795 82796 struct clk_hw { 82797 struct clk_core *core; 82798 struct clk *clk; 82799 const struct clk_init_data *init; 82800 }; 82801 82802 struct clk_rate_request { 82803 long unsigned int rate; 82804 long unsigned int min_rate; 82805 long unsigned int max_rate; 82806 long unsigned int best_parent_rate; 82807 struct clk_hw *best_parent_hw; 82808 }; 82809 82810 struct clk_duty { 82811 unsigned int num; 82812 unsigned int den; 82813 }; 82814 82815 struct clk_ops { 82816 int (*prepare)(struct clk_hw *); 82817 void (*unprepare)(struct clk_hw *); 82818 int (*is_prepared)(struct clk_hw *); 82819 void (*unprepare_unused)(struct clk_hw *); 82820 int (*enable)(struct clk_hw *); 82821 void (*disable)(struct clk_hw *); 82822 int (*is_enabled)(struct clk_hw *); 82823 void (*disable_unused)(struct clk_hw *); 82824 int (*save_context)(struct clk_hw *); 82825 void (*restore_context)(struct clk_hw *); 82826 long unsigned int (*recalc_rate)(struct clk_hw *, long unsigned int); 82827 long int (*round_rate)(struct clk_hw *, long unsigned int, long unsigned int *); 82828 int (*determine_rate)(struct clk_hw *, struct clk_rate_request *); 82829 int (*set_parent)(struct clk_hw *, u8); 82830 u8 (*get_parent)(struct clk_hw *); 82831 int (*set_rate)(struct clk_hw *, long unsigned int, long unsigned int); 82832 int (*set_rate_and_parent)(struct clk_hw *, long unsigned int, long unsigned int, u8); 82833 long unsigned int (*recalc_accuracy)(struct clk_hw *, long unsigned int); 82834 int (*get_phase)(struct clk_hw *); 82835 int (*set_phase)(struct clk_hw *, int); 82836 int (*get_duty_cycle)(struct clk_hw *, struct clk_duty *); 82837 int (*set_duty_cycle)(struct clk_hw *, struct clk_duty *); 82838 int (*init)(struct clk_hw *); 82839 void (*terminate)(struct clk_hw *); 82840 void (*debug_init)(struct clk_hw *, struct dentry *); 82841 }; 82842 82843 struct clk_parent_data { 82844 const struct clk_hw *hw; 82845 const char *fw_name; 82846 const char *name; 82847 int index; 82848 }; 82849 82850 struct clk_init_data { 82851 const char *name; 82852 const struct clk_ops *ops; 82853 const char * const *parent_names; 82854 const struct clk_parent_data *parent_data; 82855 const struct clk_hw **parent_hws; 82856 u8 num_parents; 82857 long unsigned int flags; 82858 }; 82859 82860 struct clk_lookup_alloc { 82861 struct clk_lookup cl; 82862 char dev_id[20]; 82863 char con_id[16]; 82864 }; 82865 82866 struct clk_notifier { 82867 struct clk *clk; 82868 struct srcu_notifier_head notifier_head; 82869 struct list_head node; 82870 }; 82871 82872 struct clk_notifier_data { 82873 struct clk *clk; 82874 long unsigned int old_rate; 82875 long unsigned int new_rate; 82876 }; 82877 82878 struct clk_parent_map; 82879 82880 struct clk_core { 82881 const char *name; 82882 const struct clk_ops *ops; 82883 struct clk_hw *hw; 82884 struct module *owner; 82885 struct device *dev; 82886 struct device_node *of_node; 82887 struct clk_core *parent; 82888 struct clk_parent_map *parents; 82889 u8 num_parents; 82890 u8 new_parent_index; 82891 long unsigned int rate; 82892 long unsigned int req_rate; 82893 long unsigned int new_rate; 82894 struct clk_core *new_parent; 82895 struct clk_core *new_child; 82896 long unsigned int flags; 82897 bool orphan; 82898 bool rpm_enabled; 82899 unsigned int enable_count; 82900 unsigned int prepare_count; 82901 unsigned int protect_count; 82902 long unsigned int min_rate; 82903 long unsigned int max_rate; 82904 long unsigned int accuracy; 82905 int phase; 82906 struct clk_duty duty; 82907 struct hlist_head children; 82908 struct hlist_node child_node; 82909 struct hlist_head clks; 82910 unsigned int notifier_count; 82911 struct dentry *dentry; 82912 struct hlist_node debug_node; 82913 struct kref ref; 82914 }; 82915 82916 struct clk_parent_map { 82917 const struct clk_hw *hw; 82918 struct clk_core *core; 82919 const char *fw_name; 82920 const char *name; 82921 int index; 82922 }; 82923 82924 struct trace_event_raw_clk { 82925 struct trace_entry ent; 82926 u32 __data_loc_name; 82927 char __data[0]; 82928 }; 82929 82930 struct trace_event_raw_clk_rate { 82931 struct trace_entry ent; 82932 u32 __data_loc_name; 82933 long unsigned int rate; 82934 char __data[0]; 82935 }; 82936 82937 struct trace_event_raw_clk_rate_range { 82938 struct trace_entry ent; 82939 u32 __data_loc_name; 82940 long unsigned int min; 82941 long unsigned int max; 82942 char __data[0]; 82943 }; 82944 82945 struct trace_event_raw_clk_parent { 82946 struct trace_entry ent; 82947 u32 __data_loc_name; 82948 u32 __data_loc_pname; 82949 char __data[0]; 82950 }; 82951 82952 struct trace_event_raw_clk_phase { 82953 struct trace_entry ent; 82954 u32 __data_loc_name; 82955 int phase; 82956 char __data[0]; 82957 }; 82958 82959 struct trace_event_raw_clk_duty_cycle { 82960 struct trace_entry ent; 82961 u32 __data_loc_name; 82962 unsigned int num; 82963 unsigned int den; 82964 char __data[0]; 82965 }; 82966 82967 struct trace_event_data_offsets_clk { 82968 u32 name; 82969 }; 82970 82971 struct trace_event_data_offsets_clk_rate { 82972 u32 name; 82973 }; 82974 82975 struct trace_event_data_offsets_clk_rate_range { 82976 u32 name; 82977 }; 82978 82979 struct trace_event_data_offsets_clk_parent { 82980 u32 name; 82981 u32 pname; 82982 }; 82983 82984 struct trace_event_data_offsets_clk_phase { 82985 u32 name; 82986 }; 82987 82988 struct trace_event_data_offsets_clk_duty_cycle { 82989 u32 name; 82990 }; 82991 82992 typedef void (*btf_trace_clk_enable)(void *, struct clk_core *); 82993 82994 typedef void (*btf_trace_clk_enable_complete)(void *, struct clk_core *); 82995 82996 typedef void (*btf_trace_clk_disable)(void *, struct clk_core *); 82997 82998 typedef void (*btf_trace_clk_disable_complete)(void *, struct clk_core *); 82999 83000 typedef void (*btf_trace_clk_prepare)(void *, struct clk_core *); 83001 83002 typedef void (*btf_trace_clk_prepare_complete)(void *, struct clk_core *); 83003 83004 typedef void (*btf_trace_clk_unprepare)(void *, struct clk_core *); 83005 83006 typedef void (*btf_trace_clk_unprepare_complete)(void *, struct clk_core *); 83007 83008 typedef void (*btf_trace_clk_set_rate)(void *, struct clk_core *, long unsigned int); 83009 83010 typedef void (*btf_trace_clk_set_rate_complete)(void *, struct clk_core *, long unsigned int); 83011 83012 typedef void (*btf_trace_clk_set_min_rate)(void *, struct clk_core *, long unsigned int); 83013 83014 typedef void (*btf_trace_clk_set_max_rate)(void *, struct clk_core *, long unsigned int); 83015 83016 typedef void (*btf_trace_clk_set_rate_range)(void *, struct clk_core *, long unsigned int, long unsigned int); 83017 83018 typedef void (*btf_trace_clk_set_parent)(void *, struct clk_core *, struct clk_core *); 83019 83020 typedef void (*btf_trace_clk_set_parent_complete)(void *, struct clk_core *, struct clk_core *); 83021 83022 typedef void (*btf_trace_clk_set_phase)(void *, struct clk_core *, int); 83023 83024 typedef void (*btf_trace_clk_set_phase_complete)(void *, struct clk_core *, int); 83025 83026 typedef void (*btf_trace_clk_set_duty_cycle)(void *, struct clk_core *, struct clk_duty *); 83027 83028 typedef void (*btf_trace_clk_set_duty_cycle_complete)(void *, struct clk_core *, struct clk_duty *); 83029 83030 struct clk_notifier_devres { 83031 struct clk *clk; 83032 struct notifier_block *nb; 83033 }; 83034 83035 struct clk_div_table { 83036 unsigned int val; 83037 unsigned int div; 83038 }; 83039 83040 struct clk_divider { 83041 struct clk_hw hw; 83042 void *reg; 83043 u8 shift; 83044 u8 width; 83045 u8 flags; 83046 const struct clk_div_table *table; 83047 spinlock_t *lock; 83048 }; 83049 83050 struct clk_fixed_factor { 83051 struct clk_hw hw; 83052 unsigned int mult; 83053 unsigned int div; 83054 }; 83055 83056 struct clk_fixed_rate { 83057 struct clk_hw hw; 83058 long unsigned int fixed_rate; 83059 long unsigned int fixed_accuracy; 83060 long unsigned int flags; 83061 }; 83062 83063 struct clk_gate { 83064 struct clk_hw hw; 83065 void *reg; 83066 u8 bit_idx; 83067 u8 flags; 83068 spinlock_t *lock; 83069 }; 83070 83071 struct clk_multiplier { 83072 struct clk_hw hw; 83073 void *reg; 83074 u8 shift; 83075 u8 width; 83076 u8 flags; 83077 spinlock_t *lock; 83078 }; 83079 83080 struct clk_mux { 83081 struct clk_hw hw; 83082 void *reg; 83083 u32 *table; 83084 u32 mask; 83085 u8 shift; 83086 u8 flags; 83087 spinlock_t *lock; 83088 }; 83089 83090 struct clk_composite { 83091 struct clk_hw hw; 83092 struct clk_ops ops; 83093 struct clk_hw *mux_hw; 83094 struct clk_hw *rate_hw; 83095 struct clk_hw *gate_hw; 83096 const struct clk_ops *mux_ops; 83097 const struct clk_ops *rate_ops; 83098 const struct clk_ops *gate_ops; 83099 }; 83100 83101 struct clk_fractional_divider { 83102 struct clk_hw hw; 83103 void *reg; 83104 u8 mshift; 83105 u8 mwidth; 83106 u32 mmask; 83107 u8 nshift; 83108 u8 nwidth; 83109 u32 nmask; 83110 u8 flags; 83111 void (*approximation)(struct clk_hw *, long unsigned int, long unsigned int *, long unsigned int *, long unsigned int *); 83112 spinlock_t *lock; 83113 }; 83114 83115 struct gpio_desc___2; 83116 83117 struct clk_gpio { 83118 struct clk_hw hw; 83119 struct gpio_desc___2 *gpiod; 83120 }; 83121 83122 struct pmc_clk { 83123 const char *name; 83124 long unsigned int freq; 83125 const char *parent_name; 83126 }; 83127 83128 struct pmc_clk_data { 83129 void *base; 83130 const struct pmc_clk *clks; 83131 bool critical; 83132 }; 83133 83134 struct clk_plt_fixed { 83135 struct clk_hw *clk; 83136 struct clk_lookup *lookup; 83137 }; 83138 83139 struct clk_plt { 83140 struct clk_hw hw; 83141 void *reg; 83142 struct clk_lookup *lookup; 83143 spinlock_t lock; 83144 }; 83145 83146 struct clk_plt_data { 83147 struct clk_plt_fixed **parents; 83148 u8 nparents; 83149 struct clk_plt *clks[6]; 83150 struct clk_lookup *mclk_lookup; 83151 struct clk_lookup *ether_clk_lookup; 83152 }; 83153 83154 typedef s32 dma_cookie_t; 83155 83156 enum dma_status { 83157 DMA_COMPLETE = 0, 83158 DMA_IN_PROGRESS = 1, 83159 DMA_PAUSED = 2, 83160 DMA_ERROR = 3, 83161 DMA_OUT_OF_ORDER = 4, 83162 }; 83163 83164 enum dma_transaction_type { 83165 DMA_MEMCPY = 0, 83166 DMA_XOR = 1, 83167 DMA_PQ = 2, 83168 DMA_XOR_VAL = 3, 83169 DMA_PQ_VAL = 4, 83170 DMA_MEMSET = 5, 83171 DMA_MEMSET_SG = 6, 83172 DMA_INTERRUPT = 7, 83173 DMA_PRIVATE = 8, 83174 DMA_ASYNC_TX = 9, 83175 DMA_SLAVE = 10, 83176 DMA_CYCLIC = 11, 83177 DMA_INTERLEAVE = 12, 83178 DMA_COMPLETION_NO_ORDER = 13, 83179 DMA_REPEAT = 14, 83180 DMA_LOAD_EOT = 15, 83181 DMA_TX_TYPE_END = 16, 83182 }; 83183 83184 enum dma_transfer_direction { 83185 DMA_MEM_TO_MEM = 0, 83186 DMA_MEM_TO_DEV = 1, 83187 DMA_DEV_TO_MEM = 2, 83188 DMA_DEV_TO_DEV = 3, 83189 DMA_TRANS_NONE = 4, 83190 }; 83191 83192 struct data_chunk { 83193 size_t size; 83194 size_t icg; 83195 size_t dst_icg; 83196 size_t src_icg; 83197 }; 83198 83199 struct dma_interleaved_template { 83200 dma_addr_t src_start; 83201 dma_addr_t dst_start; 83202 enum dma_transfer_direction dir; 83203 bool src_inc; 83204 bool dst_inc; 83205 bool src_sgl; 83206 bool dst_sgl; 83207 size_t numf; 83208 size_t frame_size; 83209 struct data_chunk sgl[0]; 83210 }; 83211 83212 enum dma_ctrl_flags { 83213 DMA_PREP_INTERRUPT = 1, 83214 DMA_CTRL_ACK = 2, 83215 DMA_PREP_PQ_DISABLE_P = 4, 83216 DMA_PREP_PQ_DISABLE_Q = 8, 83217 DMA_PREP_CONTINUE = 16, 83218 DMA_PREP_FENCE = 32, 83219 DMA_CTRL_REUSE = 64, 83220 DMA_PREP_CMD = 128, 83221 DMA_PREP_REPEAT = 256, 83222 DMA_PREP_LOAD_EOT = 512, 83223 }; 83224 83225 enum sum_check_bits { 83226 SUM_CHECK_P = 0, 83227 SUM_CHECK_Q = 1, 83228 }; 83229 83230 enum sum_check_flags { 83231 SUM_CHECK_P_RESULT = 1, 83232 SUM_CHECK_Q_RESULT = 2, 83233 }; 83234 83235 typedef struct { 83236 long unsigned int bits[1]; 83237 } dma_cap_mask_t; 83238 83239 enum dma_desc_metadata_mode { 83240 DESC_METADATA_NONE = 0, 83241 DESC_METADATA_CLIENT = 1, 83242 DESC_METADATA_ENGINE = 2, 83243 }; 83244 83245 struct dma_chan_percpu { 83246 long unsigned int memcpy_count; 83247 long unsigned int bytes_transferred; 83248 }; 83249 83250 struct dma_router { 83251 struct device *dev; 83252 void (*route_free)(struct device *, void *); 83253 }; 83254 83255 struct dma_device; 83256 83257 struct dma_chan_dev; 83258 83259 struct dma_chan___2 { 83260 struct dma_device *device; 83261 struct device *slave; 83262 dma_cookie_t cookie; 83263 dma_cookie_t completed_cookie; 83264 int chan_id; 83265 struct dma_chan_dev *dev; 83266 const char *name; 83267 char *dbg_client_name; 83268 struct list_head device_node; 83269 struct dma_chan_percpu *local; 83270 int client_count; 83271 int table_count; 83272 struct dma_router *router; 83273 void *route_data; 83274 void *private; 83275 }; 83276 83277 typedef bool (*dma_filter_fn)(struct dma_chan___2 *, void *); 83278 83279 struct dma_slave_map; 83280 83281 struct dma_filter { 83282 dma_filter_fn fn; 83283 int mapcnt; 83284 const struct dma_slave_map *map; 83285 }; 83286 83287 enum dmaengine_alignment { 83288 DMAENGINE_ALIGN_1_BYTE = 0, 83289 DMAENGINE_ALIGN_2_BYTES = 1, 83290 DMAENGINE_ALIGN_4_BYTES = 2, 83291 DMAENGINE_ALIGN_8_BYTES = 3, 83292 DMAENGINE_ALIGN_16_BYTES = 4, 83293 DMAENGINE_ALIGN_32_BYTES = 5, 83294 DMAENGINE_ALIGN_64_BYTES = 6, 83295 }; 83296 83297 enum dma_residue_granularity { 83298 DMA_RESIDUE_GRANULARITY_DESCRIPTOR = 0, 83299 DMA_RESIDUE_GRANULARITY_SEGMENT = 1, 83300 DMA_RESIDUE_GRANULARITY_BURST = 2, 83301 }; 83302 83303 struct dma_async_tx_descriptor; 83304 83305 struct dma_slave_caps; 83306 83307 struct dma_slave_config; 83308 83309 struct dma_tx_state; 83310 83311 struct dma_device { 83312 struct kref ref; 83313 unsigned int chancnt; 83314 unsigned int privatecnt; 83315 struct list_head channels; 83316 struct list_head global_node; 83317 struct dma_filter filter; 83318 dma_cap_mask_t cap_mask; 83319 enum dma_desc_metadata_mode desc_metadata_modes; 83320 short unsigned int max_xor; 83321 short unsigned int max_pq; 83322 enum dmaengine_alignment copy_align; 83323 enum dmaengine_alignment xor_align; 83324 enum dmaengine_alignment pq_align; 83325 enum dmaengine_alignment fill_align; 83326 int dev_id; 83327 struct device *dev; 83328 struct module *owner; 83329 struct ida chan_ida; 83330 struct mutex chan_mutex; 83331 u32 src_addr_widths; 83332 u32 dst_addr_widths; 83333 u32 directions; 83334 u32 min_burst; 83335 u32 max_burst; 83336 u32 max_sg_burst; 83337 bool descriptor_reuse; 83338 enum dma_residue_granularity residue_granularity; 83339 int (*device_alloc_chan_resources)(struct dma_chan___2 *); 83340 int (*device_router_config)(struct dma_chan___2 *); 83341 void (*device_free_chan_resources)(struct dma_chan___2 *); 83342 struct dma_async_tx_descriptor * (*device_prep_dma_memcpy)(struct dma_chan___2 *, dma_addr_t, dma_addr_t, size_t, long unsigned int); 83343 struct dma_async_tx_descriptor * (*device_prep_dma_xor)(struct dma_chan___2 *, dma_addr_t, dma_addr_t *, unsigned int, size_t, long unsigned int); 83344 struct dma_async_tx_descriptor * (*device_prep_dma_xor_val)(struct dma_chan___2 *, dma_addr_t *, unsigned int, size_t, enum sum_check_flags *, long unsigned int); 83345 struct dma_async_tx_descriptor * (*device_prep_dma_pq)(struct dma_chan___2 *, dma_addr_t *, dma_addr_t *, unsigned int, const unsigned char *, size_t, long unsigned int); 83346 struct dma_async_tx_descriptor * (*device_prep_dma_pq_val)(struct dma_chan___2 *, dma_addr_t *, dma_addr_t *, unsigned int, const unsigned char *, size_t, enum sum_check_flags *, long unsigned int); 83347 struct dma_async_tx_descriptor * (*device_prep_dma_memset)(struct dma_chan___2 *, dma_addr_t, int, size_t, long unsigned int); 83348 struct dma_async_tx_descriptor * (*device_prep_dma_memset_sg)(struct dma_chan___2 *, struct scatterlist *, unsigned int, int, long unsigned int); 83349 struct dma_async_tx_descriptor * (*device_prep_dma_interrupt)(struct dma_chan___2 *, long unsigned int); 83350 struct dma_async_tx_descriptor * (*device_prep_slave_sg)(struct dma_chan___2 *, struct scatterlist *, unsigned int, enum dma_transfer_direction, long unsigned int, void *); 83351 struct dma_async_tx_descriptor * (*device_prep_dma_cyclic)(struct dma_chan___2 *, dma_addr_t, size_t, size_t, enum dma_transfer_direction, long unsigned int); 83352 struct dma_async_tx_descriptor * (*device_prep_interleaved_dma)(struct dma_chan___2 *, struct dma_interleaved_template *, long unsigned int); 83353 struct dma_async_tx_descriptor * (*device_prep_dma_imm_data)(struct dma_chan___2 *, dma_addr_t, u64, long unsigned int); 83354 void (*device_caps)(struct dma_chan___2 *, struct dma_slave_caps *); 83355 int (*device_config)(struct dma_chan___2 *, struct dma_slave_config *); 83356 int (*device_pause)(struct dma_chan___2 *); 83357 int (*device_resume)(struct dma_chan___2 *); 83358 int (*device_terminate_all)(struct dma_chan___2 *); 83359 void (*device_synchronize)(struct dma_chan___2 *); 83360 enum dma_status (*device_tx_status)(struct dma_chan___2 *, dma_cookie_t, struct dma_tx_state *); 83361 void (*device_issue_pending)(struct dma_chan___2 *); 83362 void (*device_release)(struct dma_device *); 83363 void (*dbg_summary_show)(struct seq_file *, struct dma_device *); 83364 struct dentry *dbg_dev_root; 83365 }; 83366 83367 struct dma_chan_dev { 83368 struct dma_chan___2 *chan; 83369 struct device device; 83370 int dev_id; 83371 bool chan_dma_dev; 83372 }; 83373 83374 enum dma_slave_buswidth { 83375 DMA_SLAVE_BUSWIDTH_UNDEFINED = 0, 83376 DMA_SLAVE_BUSWIDTH_1_BYTE = 1, 83377 DMA_SLAVE_BUSWIDTH_2_BYTES = 2, 83378 DMA_SLAVE_BUSWIDTH_3_BYTES = 3, 83379 DMA_SLAVE_BUSWIDTH_4_BYTES = 4, 83380 DMA_SLAVE_BUSWIDTH_8_BYTES = 8, 83381 DMA_SLAVE_BUSWIDTH_16_BYTES = 16, 83382 DMA_SLAVE_BUSWIDTH_32_BYTES = 32, 83383 DMA_SLAVE_BUSWIDTH_64_BYTES = 64, 83384 }; 83385 83386 struct dma_slave_config { 83387 enum dma_transfer_direction direction; 83388 phys_addr_t src_addr; 83389 phys_addr_t dst_addr; 83390 enum dma_slave_buswidth src_addr_width; 83391 enum dma_slave_buswidth dst_addr_width; 83392 u32 src_maxburst; 83393 u32 dst_maxburst; 83394 u32 src_port_window_size; 83395 u32 dst_port_window_size; 83396 bool device_fc; 83397 unsigned int slave_id; 83398 void *peripheral_config; 83399 size_t peripheral_size; 83400 }; 83401 83402 struct dma_slave_caps { 83403 u32 src_addr_widths; 83404 u32 dst_addr_widths; 83405 u32 directions; 83406 u32 min_burst; 83407 u32 max_burst; 83408 u32 max_sg_burst; 83409 bool cmd_pause; 83410 bool cmd_resume; 83411 bool cmd_terminate; 83412 enum dma_residue_granularity residue_granularity; 83413 bool descriptor_reuse; 83414 }; 83415 83416 typedef void (*dma_async_tx_callback)(void *); 83417 83418 enum dmaengine_tx_result { 83419 DMA_TRANS_NOERROR = 0, 83420 DMA_TRANS_READ_FAILED = 1, 83421 DMA_TRANS_WRITE_FAILED = 2, 83422 DMA_TRANS_ABORTED = 3, 83423 }; 83424 83425 struct dmaengine_result { 83426 enum dmaengine_tx_result result; 83427 u32 residue; 83428 }; 83429 83430 typedef void (*dma_async_tx_callback_result)(void *, const struct dmaengine_result *); 83431 83432 struct dmaengine_unmap_data { 83433 u16 map_cnt; 83434 u8 to_cnt; 83435 u8 from_cnt; 83436 u8 bidi_cnt; 83437 struct device *dev; 83438 struct kref kref; 83439 size_t len; 83440 dma_addr_t addr[0]; 83441 }; 83442 83443 struct dma_descriptor_metadata_ops { 83444 int (*attach)(struct dma_async_tx_descriptor *, void *, size_t); 83445 void * (*get_ptr)(struct dma_async_tx_descriptor *, size_t *, size_t *); 83446 int (*set_len)(struct dma_async_tx_descriptor *, size_t); 83447 }; 83448 83449 struct dma_async_tx_descriptor { 83450 dma_cookie_t cookie; 83451 enum dma_ctrl_flags flags; 83452 dma_addr_t phys; 83453 struct dma_chan___2 *chan; 83454 dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *); 83455 int (*desc_free)(struct dma_async_tx_descriptor *); 83456 dma_async_tx_callback callback; 83457 dma_async_tx_callback_result callback_result; 83458 void *callback_param; 83459 struct dmaengine_unmap_data *unmap; 83460 enum dma_desc_metadata_mode desc_metadata_mode; 83461 struct dma_descriptor_metadata_ops *metadata_ops; 83462 }; 83463 83464 struct dma_tx_state { 83465 dma_cookie_t last; 83466 dma_cookie_t used; 83467 u32 residue; 83468 u32 in_flight_bytes; 83469 }; 83470 83471 struct dma_slave_map { 83472 const char *devname; 83473 const char *slave; 83474 void *param; 83475 }; 83476 83477 struct dma_chan_tbl_ent { 83478 struct dma_chan___2 *chan; 83479 }; 83480 83481 struct dmaengine_unmap_pool { 83482 struct kmem_cache *cache; 83483 const char *name; 83484 mempool_t *pool; 83485 size_t size; 83486 }; 83487 83488 struct dmaengine_desc_callback { 83489 dma_async_tx_callback callback; 83490 dma_async_tx_callback_result callback_result; 83491 void *callback_param; 83492 }; 83493 83494 struct virt_dma_desc { 83495 struct dma_async_tx_descriptor tx; 83496 struct dmaengine_result tx_result; 83497 struct list_head node; 83498 }; 83499 83500 struct virt_dma_chan { 83501 struct dma_chan___2 chan; 83502 struct tasklet_struct task; 83503 void (*desc_free)(struct virt_dma_desc *); 83504 spinlock_t lock; 83505 struct list_head desc_allocated; 83506 struct list_head desc_submitted; 83507 struct list_head desc_issued; 83508 struct list_head desc_completed; 83509 struct list_head desc_terminated; 83510 struct virt_dma_desc *cyclic; 83511 }; 83512 83513 struct acpi_table_csrt { 83514 struct acpi_table_header header; 83515 }; 83516 83517 struct acpi_csrt_group { 83518 u32 length; 83519 u32 vendor_id; 83520 u32 subvendor_id; 83521 u16 device_id; 83522 u16 subdevice_id; 83523 u16 revision; 83524 u16 reserved; 83525 u32 shared_info_length; 83526 }; 83527 83528 struct acpi_csrt_shared_info { 83529 u16 major_version; 83530 u16 minor_version; 83531 u32 mmio_base_low; 83532 u32 mmio_base_high; 83533 u32 gsi_interrupt; 83534 u8 interrupt_polarity; 83535 u8 interrupt_mode; 83536 u8 num_channels; 83537 u8 dma_address_width; 83538 u16 base_request_line; 83539 u16 num_handshake_signals; 83540 u32 max_block_size; 83541 }; 83542 83543 struct acpi_dma_spec { 83544 int chan_id; 83545 int slave_id; 83546 struct device *dev; 83547 }; 83548 83549 struct acpi_dma { 83550 struct list_head dma_controllers; 83551 struct device *dev; 83552 struct dma_chan___2 * (*acpi_dma_xlate)(struct acpi_dma_spec *, struct acpi_dma *); 83553 void *data; 83554 short unsigned int base_request_line; 83555 short unsigned int end_request_line; 83556 }; 83557 83558 struct acpi_dma_filter_info { 83559 dma_cap_mask_t dma_cap; 83560 dma_filter_fn filter_fn; 83561 }; 83562 83563 struct acpi_dma_parser_data { 83564 struct acpi_dma_spec dma_spec; 83565 size_t index; 83566 size_t n; 83567 }; 83568 83569 struct dw_dma_slave { 83570 struct device *dma_dev; 83571 u8 src_id; 83572 u8 dst_id; 83573 u8 m_master; 83574 u8 p_master; 83575 u8 channels; 83576 bool hs_polarity; 83577 }; 83578 83579 struct dw_dma_platform_data { 83580 unsigned int nr_channels; 83581 unsigned char chan_allocation_order; 83582 unsigned char chan_priority; 83583 unsigned int block_size; 83584 unsigned char nr_masters; 83585 unsigned char data_width[4]; 83586 unsigned char multi_block[8]; 83587 u32 max_burst[8]; 83588 unsigned char protctl; 83589 }; 83590 83591 struct dw_dma; 83592 83593 struct dw_dma_chip { 83594 struct device *dev; 83595 int id; 83596 int irq; 83597 void *regs; 83598 struct clk *clk; 83599 struct dw_dma *dw; 83600 const struct dw_dma_platform_data *pdata; 83601 }; 83602 83603 struct dma_pool___2; 83604 83605 struct dw_dma_chan; 83606 83607 struct dw_dma { 83608 struct dma_device dma; 83609 char name[20]; 83610 void *regs; 83611 struct dma_pool___2 *desc_pool; 83612 struct tasklet_struct tasklet; 83613 struct dw_dma_chan *chan; 83614 u8 all_chan_mask; 83615 u8 in_use; 83616 void (*initialize_chan)(struct dw_dma_chan *); 83617 void (*suspend_chan)(struct dw_dma_chan *, bool); 83618 void (*resume_chan)(struct dw_dma_chan *, bool); 83619 u32 (*prepare_ctllo)(struct dw_dma_chan *); 83620 void (*encode_maxburst)(struct dw_dma_chan *, u32 *); 83621 u32 (*bytes2block)(struct dw_dma_chan *, size_t, unsigned int, size_t *); 83622 size_t (*block2bytes)(struct dw_dma_chan *, u32, u32); 83623 void (*set_device_name)(struct dw_dma *, int); 83624 void (*disable)(struct dw_dma *); 83625 void (*enable)(struct dw_dma *); 83626 struct dw_dma_platform_data *pdata; 83627 }; 83628 83629 enum dw_dma_fc { 83630 DW_DMA_FC_D_M2M = 0, 83631 DW_DMA_FC_D_M2P = 1, 83632 DW_DMA_FC_D_P2M = 2, 83633 DW_DMA_FC_D_P2P = 3, 83634 DW_DMA_FC_P_P2M = 4, 83635 DW_DMA_FC_SP_P2P = 5, 83636 DW_DMA_FC_P_M2P = 6, 83637 DW_DMA_FC_DP_P2P = 7, 83638 }; 83639 83640 struct dw_dma_chan_regs { 83641 u32 SAR; 83642 u32 __pad_SAR; 83643 u32 DAR; 83644 u32 __pad_DAR; 83645 u32 LLP; 83646 u32 __pad_LLP; 83647 u32 CTL_LO; 83648 u32 CTL_HI; 83649 u32 SSTAT; 83650 u32 __pad_SSTAT; 83651 u32 DSTAT; 83652 u32 __pad_DSTAT; 83653 u32 SSTATAR; 83654 u32 __pad_SSTATAR; 83655 u32 DSTATAR; 83656 u32 __pad_DSTATAR; 83657 u32 CFG_LO; 83658 u32 CFG_HI; 83659 u32 SGR; 83660 u32 __pad_SGR; 83661 u32 DSR; 83662 u32 __pad_DSR; 83663 }; 83664 83665 struct dw_dma_irq_regs { 83666 u32 XFER; 83667 u32 __pad_XFER; 83668 u32 BLOCK; 83669 u32 __pad_BLOCK; 83670 u32 SRC_TRAN; 83671 u32 __pad_SRC_TRAN; 83672 u32 DST_TRAN; 83673 u32 __pad_DST_TRAN; 83674 u32 ERROR; 83675 u32 __pad_ERROR; 83676 }; 83677 83678 struct dw_dma_regs { 83679 struct dw_dma_chan_regs CHAN[8]; 83680 struct dw_dma_irq_regs RAW; 83681 struct dw_dma_irq_regs STATUS; 83682 struct dw_dma_irq_regs MASK; 83683 struct dw_dma_irq_regs CLEAR; 83684 u32 STATUS_INT; 83685 u32 __pad_STATUS_INT; 83686 u32 REQ_SRC; 83687 u32 __pad_REQ_SRC; 83688 u32 REQ_DST; 83689 u32 __pad_REQ_DST; 83690 u32 SGL_REQ_SRC; 83691 u32 __pad_SGL_REQ_SRC; 83692 u32 SGL_REQ_DST; 83693 u32 __pad_SGL_REQ_DST; 83694 u32 LAST_SRC; 83695 u32 __pad_LAST_SRC; 83696 u32 LAST_DST; 83697 u32 __pad_LAST_DST; 83698 u32 CFG; 83699 u32 __pad_CFG; 83700 u32 CH_EN; 83701 u32 __pad_CH_EN; 83702 u32 ID; 83703 u32 __pad_ID; 83704 u32 TEST; 83705 u32 __pad_TEST; 83706 u32 CLASS_PRIORITY0; 83707 u32 __pad_CLASS_PRIORITY0; 83708 u32 CLASS_PRIORITY1; 83709 u32 __pad_CLASS_PRIORITY1; 83710 u32 __reserved; 83711 u32 DWC_PARAMS[8]; 83712 u32 MULTI_BLK_TYPE; 83713 u32 MAX_BLK_SIZE; 83714 u32 DW_PARAMS; 83715 u32 COMP_TYPE; 83716 u32 COMP_VERSION; 83717 u32 FIFO_PARTITION0; 83718 u32 __pad_FIFO_PARTITION0; 83719 u32 FIFO_PARTITION1; 83720 u32 __pad_FIFO_PARTITION1; 83721 u32 SAI_ERR; 83722 u32 __pad_SAI_ERR; 83723 u32 GLOBAL_CFG; 83724 u32 __pad_GLOBAL_CFG; 83725 }; 83726 83727 enum dw_dmac_flags { 83728 DW_DMA_IS_CYCLIC = 0, 83729 DW_DMA_IS_SOFT_LLP = 1, 83730 DW_DMA_IS_PAUSED = 2, 83731 DW_DMA_IS_INITIALIZED = 3, 83732 }; 83733 83734 struct dw_dma_chan { 83735 struct dma_chan___2 chan; 83736 void *ch_regs; 83737 u8 mask; 83738 u8 priority; 83739 enum dma_transfer_direction direction; 83740 struct list_head *tx_node_active; 83741 spinlock_t lock; 83742 long unsigned int flags; 83743 struct list_head active_list; 83744 struct list_head queue; 83745 unsigned int descs_allocated; 83746 unsigned int block_size; 83747 bool nollp; 83748 u32 max_burst; 83749 struct dw_dma_slave dws; 83750 struct dma_slave_config dma_sconfig; 83751 }; 83752 83753 struct dw_lli { 83754 __le32 sar; 83755 __le32 dar; 83756 __le32 llp; 83757 __le32 ctllo; 83758 __le32 ctlhi; 83759 __le32 sstat; 83760 __le32 dstat; 83761 }; 83762 83763 struct dw_desc { 83764 struct dw_lli lli; 83765 struct list_head desc_node; 83766 struct list_head tx_list; 83767 struct dma_async_tx_descriptor txd; 83768 size_t len; 83769 size_t total_len; 83770 u32 residue; 83771 }; 83772 83773 struct dw_dma_chip_pdata { 83774 const struct dw_dma_platform_data *pdata; 83775 int (*probe)(struct dw_dma_chip *); 83776 int (*remove)(struct dw_dma_chip *); 83777 struct dw_dma_chip *chip; 83778 }; 83779 83780 struct hsu_dma; 83781 83782 struct hsu_dma_chip { 83783 struct device *dev; 83784 int irq; 83785 void *regs; 83786 unsigned int length; 83787 unsigned int offset; 83788 struct hsu_dma *hsu; 83789 }; 83790 83791 struct hsu_dma_chan; 83792 83793 struct hsu_dma { 83794 struct dma_device dma; 83795 struct hsu_dma_chan *chan; 83796 short unsigned int nr_channels; 83797 }; 83798 83799 struct hsu_dma_sg { 83800 dma_addr_t addr; 83801 unsigned int len; 83802 }; 83803 83804 struct hsu_dma_desc { 83805 struct virt_dma_desc vdesc; 83806 enum dma_transfer_direction direction; 83807 struct hsu_dma_sg *sg; 83808 unsigned int nents; 83809 size_t length; 83810 unsigned int active; 83811 enum dma_status status; 83812 }; 83813 83814 struct hsu_dma_chan { 83815 struct virt_dma_chan vchan; 83816 void *reg; 83817 enum dma_transfer_direction direction; 83818 struct dma_slave_config config; 83819 struct hsu_dma_desc *desc; 83820 }; 83821 83822 struct virtio_driver { 83823 struct device_driver driver; 83824 const struct virtio_device_id *id_table; 83825 const unsigned int *feature_table; 83826 unsigned int feature_table_size; 83827 const unsigned int *feature_table_legacy; 83828 unsigned int feature_table_size_legacy; 83829 int (*validate)(struct virtio_device *); 83830 int (*probe)(struct virtio_device *); 83831 void (*scan)(struct virtio_device *); 83832 void (*remove)(struct virtio_device *); 83833 void (*config_changed)(struct virtio_device *); 83834 int (*freeze)(struct virtio_device *); 83835 int (*restore)(struct virtio_device *); 83836 }; 83837 83838 typedef __u16 __virtio16; 83839 83840 typedef __u32 __virtio32; 83841 83842 typedef __u64 __virtio64; 83843 83844 struct vring_desc { 83845 __virtio64 addr; 83846 __virtio32 len; 83847 __virtio16 flags; 83848 __virtio16 next; 83849 }; 83850 83851 struct vring_avail { 83852 __virtio16 flags; 83853 __virtio16 idx; 83854 __virtio16 ring[0]; 83855 }; 83856 83857 struct vring_used_elem { 83858 __virtio32 id; 83859 __virtio32 len; 83860 }; 83861 83862 typedef struct vring_used_elem vring_used_elem_t; 83863 83864 struct vring_used { 83865 __virtio16 flags; 83866 __virtio16 idx; 83867 vring_used_elem_t ring[0]; 83868 }; 83869 83870 typedef struct vring_desc vring_desc_t; 83871 83872 typedef struct vring_avail vring_avail_t; 83873 83874 typedef struct vring_used vring_used_t; 83875 83876 struct vring { 83877 unsigned int num; 83878 vring_desc_t *desc; 83879 vring_avail_t *avail; 83880 vring_used_t *used; 83881 }; 83882 83883 struct vring_packed_desc_event { 83884 __le16 off_wrap; 83885 __le16 flags; 83886 }; 83887 83888 struct vring_packed_desc { 83889 __le64 addr; 83890 __le32 len; 83891 __le16 id; 83892 __le16 flags; 83893 }; 83894 83895 struct vring_desc_state_split { 83896 void *data; 83897 struct vring_desc *indir_desc; 83898 }; 83899 83900 struct vring_desc_state_packed { 83901 void *data; 83902 struct vring_packed_desc *indir_desc; 83903 u16 num; 83904 u16 next; 83905 u16 last; 83906 }; 83907 83908 struct vring_desc_extra_packed { 83909 dma_addr_t addr; 83910 u32 len; 83911 u16 flags; 83912 }; 83913 83914 struct vring_virtqueue { 83915 struct virtqueue vq; 83916 bool packed_ring; 83917 bool use_dma_api; 83918 bool weak_barriers; 83919 bool broken; 83920 bool indirect; 83921 bool event; 83922 unsigned int free_head; 83923 unsigned int num_added; 83924 u16 last_used_idx; 83925 union { 83926 struct { 83927 struct vring vring; 83928 u16 avail_flags_shadow; 83929 u16 avail_idx_shadow; 83930 struct vring_desc_state_split *desc_state; 83931 dma_addr_t queue_dma_addr; 83932 size_t queue_size_in_bytes; 83933 } split; 83934 struct { 83935 struct { 83936 unsigned int num; 83937 struct vring_packed_desc *desc; 83938 struct vring_packed_desc_event *driver; 83939 struct vring_packed_desc_event *device; 83940 } vring; 83941 bool avail_wrap_counter; 83942 bool used_wrap_counter; 83943 u16 avail_used_flags; 83944 u16 next_avail_idx; 83945 u16 event_flags_shadow; 83946 struct vring_desc_state_packed *desc_state; 83947 struct vring_desc_extra_packed *desc_extra; 83948 dma_addr_t ring_dma_addr; 83949 dma_addr_t driver_event_dma_addr; 83950 dma_addr_t device_event_dma_addr; 83951 size_t ring_size_in_bytes; 83952 size_t event_size_in_bytes; 83953 } packed; 83954 }; 83955 bool (*notify)(struct virtqueue *); 83956 bool we_own_ring; 83957 }; 83958 83959 struct virtio_pci_common_cfg { 83960 __le32 device_feature_select; 83961 __le32 device_feature; 83962 __le32 guest_feature_select; 83963 __le32 guest_feature; 83964 __le16 msix_config; 83965 __le16 num_queues; 83966 __u8 device_status; 83967 __u8 config_generation; 83968 __le16 queue_select; 83969 __le16 queue_size; 83970 __le16 queue_msix_vector; 83971 __le16 queue_enable; 83972 __le16 queue_notify_off; 83973 __le32 queue_desc_lo; 83974 __le32 queue_desc_hi; 83975 __le32 queue_avail_lo; 83976 __le32 queue_avail_hi; 83977 __le32 queue_used_lo; 83978 __le32 queue_used_hi; 83979 }; 83980 83981 struct virtio_pci_vq_info { 83982 struct virtqueue *vq; 83983 struct list_head node; 83984 unsigned int msix_vector; 83985 }; 83986 83987 struct virtio_pci_device { 83988 struct virtio_device vdev; 83989 struct pci_dev *pci_dev; 83990 u8 *isr; 83991 struct virtio_pci_common_cfg *common; 83992 void *device; 83993 void *notify_base; 83994 size_t notify_len; 83995 size_t device_len; 83996 int notify_map_cap; 83997 u32 notify_offset_multiplier; 83998 int modern_bars; 83999 void *ioaddr; 84000 spinlock_t lock; 84001 struct list_head virtqueues; 84002 struct virtio_pci_vq_info **vqs; 84003 int msix_enabled; 84004 int intx_enabled; 84005 cpumask_var_t *msix_affinity_masks; 84006 char (*msix_names)[256]; 84007 unsigned int msix_vectors; 84008 unsigned int msix_used_vectors; 84009 bool per_vq_vectors; 84010 struct virtqueue * (*setup_vq)(struct virtio_pci_device *, struct virtio_pci_vq_info *, unsigned int, void (*)(struct virtqueue *), const char *, bool, u16); 84011 void (*del_vq)(struct virtio_pci_vq_info *); 84012 u16 (*config_vector)(struct virtio_pci_device *, u16); 84013 }; 84014 84015 enum { 84016 VP_MSIX_CONFIG_VECTOR = 0, 84017 VP_MSIX_VQ_VECTOR = 1, 84018 }; 84019 84020 struct grant_entry_v1 { 84021 uint16_t flags; 84022 domid_t domid; 84023 uint32_t frame; 84024 }; 84025 84026 struct grant_entry_header { 84027 uint16_t flags; 84028 domid_t domid; 84029 }; 84030 84031 union grant_entry_v2 { 84032 struct grant_entry_header hdr; 84033 struct { 84034 struct grant_entry_header hdr; 84035 uint32_t pad0; 84036 uint64_t frame; 84037 } full_page; 84038 struct { 84039 struct grant_entry_header hdr; 84040 uint16_t page_off; 84041 uint16_t length; 84042 uint64_t frame; 84043 } sub_page; 84044 struct { 84045 struct grant_entry_header hdr; 84046 domid_t trans_domid; 84047 uint16_t pad0; 84048 grant_ref_t gref; 84049 } transitive; 84050 uint32_t __spacer[4]; 84051 }; 84052 84053 struct gnttab_setup_table { 84054 domid_t dom; 84055 uint32_t nr_frames; 84056 int16_t status; 84057 __guest_handle_xen_pfn_t frame_list; 84058 }; 84059 84060 struct gnttab_copy { 84061 struct { 84062 union { 84063 grant_ref_t ref; 84064 xen_pfn_t gmfn; 84065 } u; 84066 domid_t domid; 84067 uint16_t offset; 84068 } source; 84069 struct { 84070 union { 84071 grant_ref_t ref; 84072 xen_pfn_t gmfn; 84073 } u; 84074 domid_t domid; 84075 uint16_t offset; 84076 } dest; 84077 uint16_t len; 84078 uint16_t flags; 84079 int16_t status; 84080 }; 84081 84082 struct gnttab_query_size { 84083 domid_t dom; 84084 uint32_t nr_frames; 84085 uint32_t max_nr_frames; 84086 int16_t status; 84087 }; 84088 84089 struct gnttab_set_version { 84090 uint32_t version; 84091 }; 84092 84093 struct gnttab_get_status_frames { 84094 uint32_t nr_frames; 84095 domid_t dom; 84096 int16_t status; 84097 __guest_handle_uint64_t frame_list; 84098 }; 84099 84100 struct gnttab_free_callback { 84101 struct gnttab_free_callback *next; 84102 void (*fn)(void *); 84103 void *arg; 84104 u16 count; 84105 }; 84106 84107 struct gntab_unmap_queue_data; 84108 84109 typedef void (*gnttab_unmap_refs_done)(int, struct gntab_unmap_queue_data *); 84110 84111 struct gntab_unmap_queue_data { 84112 struct delayed_work gnttab_work; 84113 void *data; 84114 gnttab_unmap_refs_done done; 84115 struct gnttab_unmap_grant_ref *unmap_ops; 84116 struct gnttab_unmap_grant_ref *kunmap_ops; 84117 struct page **pages; 84118 unsigned int count; 84119 unsigned int age; 84120 }; 84121 84122 struct gnttab_page_cache { 84123 spinlock_t lock; 84124 struct page *pages; 84125 unsigned int num_pages; 84126 }; 84127 84128 struct xen_page_foreign { 84129 domid_t domid; 84130 grant_ref_t gref; 84131 }; 84132 84133 typedef void (*xen_grant_fn_t)(long unsigned int, unsigned int, unsigned int, void *); 84134 84135 struct gnttab_ops { 84136 unsigned int version; 84137 unsigned int grefs_per_grant_frame; 84138 int (*map_frames)(xen_pfn_t *, unsigned int); 84139 void (*unmap_frames)(); 84140 void (*update_entry)(grant_ref_t, domid_t, long unsigned int, unsigned int); 84141 int (*end_foreign_access_ref)(grant_ref_t, int); 84142 long unsigned int (*end_foreign_transfer_ref)(grant_ref_t); 84143 int (*query_foreign_access)(grant_ref_t); 84144 }; 84145 84146 struct unmap_refs_callback_data { 84147 struct completion completion; 84148 int result; 84149 }; 84150 84151 struct deferred_entry { 84152 struct list_head list; 84153 grant_ref_t ref; 84154 bool ro; 84155 uint16_t warn_delay; 84156 struct page *page; 84157 }; 84158 84159 struct xen_feature_info { 84160 unsigned int submap_idx; 84161 uint32_t submap; 84162 }; 84163 84164 struct balloon_stats { 84165 long unsigned int current_pages; 84166 long unsigned int target_pages; 84167 long unsigned int target_unpopulated; 84168 long unsigned int balloon_low; 84169 long unsigned int balloon_high; 84170 long unsigned int total_pages; 84171 long unsigned int schedule_delay; 84172 long unsigned int max_schedule_delay; 84173 long unsigned int retry_count; 84174 long unsigned int max_retry_count; 84175 }; 84176 84177 enum bp_state { 84178 BP_DONE = 0, 84179 BP_WAIT = 1, 84180 BP_EAGAIN = 2, 84181 BP_ECANCELED = 3, 84182 }; 84183 84184 enum shutdown_state { 84185 SHUTDOWN_INVALID = 4294967295, 84186 SHUTDOWN_POWEROFF = 0, 84187 SHUTDOWN_SUSPEND = 2, 84188 SHUTDOWN_HALT = 4, 84189 }; 84190 84191 struct suspend_info { 84192 int cancelled; 84193 }; 84194 84195 struct shutdown_handler { 84196 const char command[11]; 84197 bool flag; 84198 void (*cb)(); 84199 }; 84200 84201 struct vcpu_runstate_info { 84202 int state; 84203 uint64_t state_entry_time; 84204 uint64_t time[4]; 84205 }; 84206 84207 typedef struct vcpu_runstate_info *__guest_handle_vcpu_runstate_info; 84208 84209 struct vcpu_register_runstate_memory_area { 84210 union { 84211 __guest_handle_vcpu_runstate_info h; 84212 struct vcpu_runstate_info *v; 84213 uint64_t p; 84214 } addr; 84215 }; 84216 84217 typedef evtchn_port_t *__guest_handle_evtchn_port_t; 84218 84219 struct evtchn_bind_interdomain { 84220 domid_t remote_dom; 84221 evtchn_port_t remote_port; 84222 evtchn_port_t local_port; 84223 }; 84224 84225 struct evtchn_bind_virq { 84226 uint32_t virq; 84227 uint32_t vcpu; 84228 evtchn_port_t port; 84229 }; 84230 84231 struct evtchn_bind_pirq { 84232 uint32_t pirq; 84233 uint32_t flags; 84234 evtchn_port_t port; 84235 }; 84236 84237 struct evtchn_bind_ipi { 84238 uint32_t vcpu; 84239 evtchn_port_t port; 84240 }; 84241 84242 struct evtchn_close { 84243 evtchn_port_t port; 84244 }; 84245 84246 struct evtchn_send { 84247 evtchn_port_t port; 84248 }; 84249 84250 struct evtchn_status { 84251 domid_t dom; 84252 evtchn_port_t port; 84253 uint32_t status; 84254 uint32_t vcpu; 84255 union { 84256 struct { 84257 domid_t dom; 84258 } unbound; 84259 struct { 84260 domid_t dom; 84261 evtchn_port_t port; 84262 } interdomain; 84263 uint32_t pirq; 84264 uint32_t virq; 84265 } u; 84266 }; 84267 84268 struct evtchn_bind_vcpu { 84269 evtchn_port_t port; 84270 uint32_t vcpu; 84271 }; 84272 84273 struct evtchn_set_priority { 84274 evtchn_port_t port; 84275 uint32_t priority; 84276 }; 84277 84278 struct sched_poll { 84279 __guest_handle_evtchn_port_t ports; 84280 unsigned int nr_ports; 84281 uint64_t timeout; 84282 }; 84283 84284 struct physdev_eoi { 84285 uint32_t irq; 84286 }; 84287 84288 struct physdev_pirq_eoi_gmfn { 84289 xen_ulong_t gmfn; 84290 }; 84291 84292 struct physdev_irq_status_query { 84293 uint32_t irq; 84294 uint32_t flags; 84295 }; 84296 84297 struct physdev_irq { 84298 uint32_t irq; 84299 uint32_t vector; 84300 }; 84301 84302 struct physdev_map_pirq { 84303 domid_t domid; 84304 int type; 84305 int index; 84306 int pirq; 84307 int bus; 84308 int devfn; 84309 int entry_nr; 84310 uint64_t table_base; 84311 }; 84312 84313 struct physdev_unmap_pirq { 84314 domid_t domid; 84315 int pirq; 84316 }; 84317 84318 struct physdev_get_free_pirq { 84319 int type; 84320 uint32_t pirq; 84321 }; 84322 84323 struct evtchn_loop_ctrl; 84324 84325 struct evtchn_ops { 84326 unsigned int (*max_channels)(); 84327 unsigned int (*nr_channels)(); 84328 int (*setup)(evtchn_port_t); 84329 void (*remove)(evtchn_port_t, unsigned int); 84330 void (*bind_to_cpu)(evtchn_port_t, unsigned int, unsigned int); 84331 void (*clear_pending)(evtchn_port_t); 84332 void (*set_pending)(evtchn_port_t); 84333 bool (*is_pending)(evtchn_port_t); 84334 void (*mask)(evtchn_port_t); 84335 void (*unmask)(evtchn_port_t); 84336 void (*handle_events)(unsigned int, struct evtchn_loop_ctrl *); 84337 void (*resume)(); 84338 int (*percpu_init)(unsigned int); 84339 int (*percpu_deinit)(unsigned int); 84340 }; 84341 84342 struct evtchn_loop_ctrl { 84343 ktime_t timeout; 84344 unsigned int count; 84345 bool defer_eoi; 84346 }; 84347 84348 enum xen_irq_type { 84349 IRQT_UNBOUND = 0, 84350 IRQT_PIRQ = 1, 84351 IRQT_VIRQ = 2, 84352 IRQT_IPI = 3, 84353 IRQT_EVTCHN = 4, 84354 }; 84355 84356 struct irq_info { 84357 struct list_head list; 84358 struct list_head eoi_list; 84359 short int refcnt; 84360 u8 spurious_cnt; 84361 u8 is_accounted; 84362 short int type; 84363 u8 mask_reason; 84364 u8 is_active; 84365 unsigned int irq; 84366 evtchn_port_t evtchn; 84367 short unsigned int cpu; 84368 short unsigned int eoi_cpu; 84369 unsigned int irq_epoch; 84370 u64 eoi_time; 84371 raw_spinlock_t lock; 84372 union { 84373 short unsigned int virq; 84374 enum ipi_vector ipi; 84375 struct { 84376 short unsigned int pirq; 84377 short unsigned int gsi; 84378 unsigned char vector; 84379 unsigned char flags; 84380 uint16_t domid; 84381 } pirq; 84382 } u; 84383 }; 84384 84385 struct lateeoi_work { 84386 struct delayed_work delayed; 84387 spinlock_t eoi_list_lock; 84388 struct list_head eoi_list; 84389 }; 84390 84391 struct evtchn_unmask { 84392 evtchn_port_t port; 84393 }; 84394 84395 struct evtchn_init_control { 84396 uint64_t control_gfn; 84397 uint32_t offset; 84398 uint32_t vcpu; 84399 uint8_t link_bits; 84400 uint8_t _pad[7]; 84401 }; 84402 84403 struct evtchn_expand_array { 84404 uint64_t array_gfn; 84405 }; 84406 84407 typedef uint32_t event_word_t; 84408 84409 struct evtchn_fifo_control_block { 84410 uint32_t ready; 84411 uint32_t _rsvd; 84412 event_word_t head[16]; 84413 }; 84414 84415 struct evtchn_fifo_queue { 84416 uint32_t head[16]; 84417 }; 84418 84419 struct evtchn_alloc_unbound { 84420 domid_t dom; 84421 domid_t remote_dom; 84422 evtchn_port_t port; 84423 }; 84424 84425 struct xenbus_map_node { 84426 struct list_head next; 84427 union { 84428 struct { 84429 struct vm_struct *area; 84430 } pv; 84431 struct { 84432 struct page *pages[16]; 84433 long unsigned int addrs[16]; 84434 void *addr; 84435 } hvm; 84436 }; 84437 grant_handle_t handles[16]; 84438 unsigned int nr_handles; 84439 }; 84440 84441 struct map_ring_valloc { 84442 struct xenbus_map_node *node; 84443 long unsigned int addrs[16]; 84444 phys_addr_t phys_addrs[16]; 84445 struct gnttab_map_grant_ref map[16]; 84446 struct gnttab_unmap_grant_ref unmap[16]; 84447 unsigned int idx; 84448 }; 84449 84450 struct xenbus_ring_ops { 84451 int (*map)(struct xenbus_device *, struct map_ring_valloc *, grant_ref_t *, unsigned int, void **); 84452 int (*unmap)(struct xenbus_device *, void *); 84453 }; 84454 84455 struct unmap_ring_hvm { 84456 unsigned int idx; 84457 long unsigned int addrs[16]; 84458 }; 84459 84460 enum xsd_sockmsg_type { 84461 XS_DEBUG = 0, 84462 XS_DIRECTORY = 1, 84463 XS_READ = 2, 84464 XS_GET_PERMS = 3, 84465 XS_WATCH = 4, 84466 XS_UNWATCH = 5, 84467 XS_TRANSACTION_START = 6, 84468 XS_TRANSACTION_END = 7, 84469 XS_INTRODUCE = 8, 84470 XS_RELEASE = 9, 84471 XS_GET_DOMAIN_PATH = 10, 84472 XS_WRITE = 11, 84473 XS_MKDIR = 12, 84474 XS_RM = 13, 84475 XS_SET_PERMS = 14, 84476 XS_WATCH_EVENT = 15, 84477 XS_ERROR = 16, 84478 XS_IS_DOMAIN_INTRODUCED = 17, 84479 XS_RESUME = 18, 84480 XS_SET_TARGET = 19, 84481 XS_RESTRICT = 20, 84482 XS_RESET_WATCHES = 21, 84483 }; 84484 84485 struct xsd_sockmsg { 84486 uint32_t type; 84487 uint32_t req_id; 84488 uint32_t tx_id; 84489 uint32_t len; 84490 }; 84491 84492 typedef uint32_t XENSTORE_RING_IDX; 84493 84494 struct xenstore_domain_interface { 84495 char req[1024]; 84496 char rsp[1024]; 84497 XENSTORE_RING_IDX req_cons; 84498 XENSTORE_RING_IDX req_prod; 84499 XENSTORE_RING_IDX rsp_cons; 84500 XENSTORE_RING_IDX rsp_prod; 84501 }; 84502 84503 struct xs_watch_event { 84504 struct list_head list; 84505 unsigned int len; 84506 struct xenbus_watch *handle; 84507 const char *path; 84508 const char *token; 84509 char body[0]; 84510 }; 84511 84512 enum xb_req_state { 84513 xb_req_state_queued = 0, 84514 xb_req_state_wait_reply = 1, 84515 xb_req_state_got_reply = 2, 84516 xb_req_state_aborted = 3, 84517 }; 84518 84519 struct xb_req_data { 84520 struct list_head list; 84521 wait_queue_head_t wq; 84522 struct xsd_sockmsg msg; 84523 uint32_t caller_req_id; 84524 enum xsd_sockmsg_type type; 84525 char *body; 84526 const struct kvec *vec; 84527 int num_vecs; 84528 int err; 84529 enum xb_req_state state; 84530 bool user_req; 84531 void (*cb)(struct xb_req_data *); 84532 void *par; 84533 }; 84534 84535 enum xenstore_init { 84536 XS_UNKNOWN = 0, 84537 XS_PV = 1, 84538 XS_HVM = 2, 84539 XS_LOCAL = 3, 84540 }; 84541 84542 struct xen_hvm_param { 84543 domid_t domid; 84544 uint32_t index; 84545 uint64_t value; 84546 }; 84547 84548 struct xen_bus_type { 84549 char *root; 84550 unsigned int levels; 84551 int (*get_bus_id)(char *, const char *); 84552 int (*probe)(struct xen_bus_type *, const char *, const char *); 84553 bool (*otherend_will_handle)(struct xenbus_watch *, const char *, const char *); 84554 void (*otherend_changed)(struct xenbus_watch *, const char *, const char *); 84555 struct bus_type bus; 84556 }; 84557 84558 struct xb_find_info { 84559 struct xenbus_device *dev; 84560 const char *nodename; 84561 }; 84562 84563 struct xenbus_transaction_holder { 84564 struct list_head list; 84565 struct xenbus_transaction handle; 84566 unsigned int generation_id; 84567 }; 84568 84569 struct read_buffer { 84570 struct list_head list; 84571 unsigned int cons; 84572 unsigned int len; 84573 char msg[0]; 84574 }; 84575 84576 struct xenbus_file_priv { 84577 struct mutex msgbuffer_mutex; 84578 struct list_head transactions; 84579 struct list_head watches; 84580 unsigned int len; 84581 union { 84582 struct xsd_sockmsg msg; 84583 char buffer[4096]; 84584 } u; 84585 struct mutex reply_mutex; 84586 struct list_head read_buffers; 84587 wait_queue_head_t read_waitq; 84588 struct kref kref; 84589 struct work_struct wq; 84590 }; 84591 84592 struct watch_adapter { 84593 struct list_head list; 84594 struct xenbus_watch watch; 84595 struct xenbus_file_priv *dev_data; 84596 char *token; 84597 }; 84598 84599 struct physdev_manage_pci { 84600 uint8_t bus; 84601 uint8_t devfn; 84602 }; 84603 84604 struct physdev_manage_pci_ext { 84605 uint8_t bus; 84606 uint8_t devfn; 84607 unsigned int is_extfn; 84608 unsigned int is_virtfn; 84609 struct { 84610 uint8_t bus; 84611 uint8_t devfn; 84612 } physfn; 84613 }; 84614 84615 struct physdev_pci_mmcfg_reserved { 84616 uint64_t address; 84617 uint16_t segment; 84618 uint8_t start_bus; 84619 uint8_t end_bus; 84620 uint32_t flags; 84621 }; 84622 84623 struct physdev_pci_device_add { 84624 uint16_t seg; 84625 uint8_t bus; 84626 uint8_t devfn; 84627 uint32_t flags; 84628 struct { 84629 uint8_t bus; 84630 uint8_t devfn; 84631 } physfn; 84632 uint32_t optarr[0]; 84633 }; 84634 84635 struct physdev_pci_device { 84636 uint16_t seg; 84637 uint8_t bus; 84638 uint8_t devfn; 84639 }; 84640 84641 struct pci_mmcfg_region { 84642 struct list_head list; 84643 struct resource res; 84644 u64 address; 84645 char *virt; 84646 u16 segment; 84647 u8 start_bus; 84648 u8 end_bus; 84649 char name[30]; 84650 }; 84651 84652 struct usb_device_descriptor { 84653 __u8 bLength; 84654 __u8 bDescriptorType; 84655 __le16 bcdUSB; 84656 __u8 bDeviceClass; 84657 __u8 bDeviceSubClass; 84658 __u8 bDeviceProtocol; 84659 __u8 bMaxPacketSize0; 84660 __le16 idVendor; 84661 __le16 idProduct; 84662 __le16 bcdDevice; 84663 __u8 iManufacturer; 84664 __u8 iProduct; 84665 __u8 iSerialNumber; 84666 __u8 bNumConfigurations; 84667 }; 84668 84669 struct usb_config_descriptor { 84670 __u8 bLength; 84671 __u8 bDescriptorType; 84672 __le16 wTotalLength; 84673 __u8 bNumInterfaces; 84674 __u8 bConfigurationValue; 84675 __u8 iConfiguration; 84676 __u8 bmAttributes; 84677 __u8 bMaxPower; 84678 } __attribute__((packed)); 84679 84680 struct usb_interface_descriptor { 84681 __u8 bLength; 84682 __u8 bDescriptorType; 84683 __u8 bInterfaceNumber; 84684 __u8 bAlternateSetting; 84685 __u8 bNumEndpoints; 84686 __u8 bInterfaceClass; 84687 __u8 bInterfaceSubClass; 84688 __u8 bInterfaceProtocol; 84689 __u8 iInterface; 84690 }; 84691 84692 struct usb_endpoint_descriptor { 84693 __u8 bLength; 84694 __u8 bDescriptorType; 84695 __u8 bEndpointAddress; 84696 __u8 bmAttributes; 84697 __le16 wMaxPacketSize; 84698 __u8 bInterval; 84699 __u8 bRefresh; 84700 __u8 bSynchAddress; 84701 } __attribute__((packed)); 84702 84703 struct usb_ssp_isoc_ep_comp_descriptor { 84704 __u8 bLength; 84705 __u8 bDescriptorType; 84706 __le16 wReseved; 84707 __le32 dwBytesPerInterval; 84708 }; 84709 84710 struct usb_ss_ep_comp_descriptor { 84711 __u8 bLength; 84712 __u8 bDescriptorType; 84713 __u8 bMaxBurst; 84714 __u8 bmAttributes; 84715 __le16 wBytesPerInterval; 84716 }; 84717 84718 struct usb_interface_assoc_descriptor { 84719 __u8 bLength; 84720 __u8 bDescriptorType; 84721 __u8 bFirstInterface; 84722 __u8 bInterfaceCount; 84723 __u8 bFunctionClass; 84724 __u8 bFunctionSubClass; 84725 __u8 bFunctionProtocol; 84726 __u8 iFunction; 84727 }; 84728 84729 struct usb_bos_descriptor { 84730 __u8 bLength; 84731 __u8 bDescriptorType; 84732 __le16 wTotalLength; 84733 __u8 bNumDeviceCaps; 84734 } __attribute__((packed)); 84735 84736 struct usb_ext_cap_descriptor { 84737 __u8 bLength; 84738 __u8 bDescriptorType; 84739 __u8 bDevCapabilityType; 84740 __le32 bmAttributes; 84741 } __attribute__((packed)); 84742 84743 struct usb_ss_cap_descriptor { 84744 __u8 bLength; 84745 __u8 bDescriptorType; 84746 __u8 bDevCapabilityType; 84747 __u8 bmAttributes; 84748 __le16 wSpeedSupported; 84749 __u8 bFunctionalitySupport; 84750 __u8 bU1devExitLat; 84751 __le16 bU2DevExitLat; 84752 }; 84753 84754 struct usb_ss_container_id_descriptor { 84755 __u8 bLength; 84756 __u8 bDescriptorType; 84757 __u8 bDevCapabilityType; 84758 __u8 bReserved; 84759 __u8 ContainerID[16]; 84760 }; 84761 84762 struct usb_ssp_cap_descriptor { 84763 __u8 bLength; 84764 __u8 bDescriptorType; 84765 __u8 bDevCapabilityType; 84766 __u8 bReserved; 84767 __le32 bmAttributes; 84768 __le16 wFunctionalitySupport; 84769 __le16 wReserved; 84770 __le32 bmSublinkSpeedAttr[1]; 84771 }; 84772 84773 struct usb_ptm_cap_descriptor { 84774 __u8 bLength; 84775 __u8 bDescriptorType; 84776 __u8 bDevCapabilityType; 84777 }; 84778 84779 enum usb_device_speed { 84780 USB_SPEED_UNKNOWN = 0, 84781 USB_SPEED_LOW = 1, 84782 USB_SPEED_FULL = 2, 84783 USB_SPEED_HIGH = 3, 84784 USB_SPEED_WIRELESS = 4, 84785 USB_SPEED_SUPER = 5, 84786 USB_SPEED_SUPER_PLUS = 6, 84787 }; 84788 84789 enum usb_device_state { 84790 USB_STATE_NOTATTACHED = 0, 84791 USB_STATE_ATTACHED = 1, 84792 USB_STATE_POWERED = 2, 84793 USB_STATE_RECONNECTING = 3, 84794 USB_STATE_UNAUTHENTICATED = 4, 84795 USB_STATE_DEFAULT = 5, 84796 USB_STATE_ADDRESS = 6, 84797 USB_STATE_CONFIGURED = 7, 84798 USB_STATE_SUSPENDED = 8, 84799 }; 84800 84801 enum usb3_link_state { 84802 USB3_LPM_U0 = 0, 84803 USB3_LPM_U1 = 1, 84804 USB3_LPM_U2 = 2, 84805 USB3_LPM_U3 = 3, 84806 }; 84807 84808 struct ep_device; 84809 84810 struct usb_host_endpoint { 84811 struct usb_endpoint_descriptor desc; 84812 struct usb_ss_ep_comp_descriptor ss_ep_comp; 84813 struct usb_ssp_isoc_ep_comp_descriptor ssp_isoc_ep_comp; 84814 char: 8; 84815 struct list_head urb_list; 84816 void *hcpriv; 84817 struct ep_device *ep_dev; 84818 unsigned char *extra; 84819 int extralen; 84820 int enabled; 84821 int streams; 84822 int: 32; 84823 } __attribute__((packed)); 84824 84825 struct usb_host_interface { 84826 struct usb_interface_descriptor desc; 84827 int extralen; 84828 unsigned char *extra; 84829 struct usb_host_endpoint *endpoint; 84830 char *string; 84831 }; 84832 84833 enum usb_interface_condition { 84834 USB_INTERFACE_UNBOUND = 0, 84835 USB_INTERFACE_BINDING = 1, 84836 USB_INTERFACE_BOUND = 2, 84837 USB_INTERFACE_UNBINDING = 3, 84838 }; 84839 84840 struct usb_interface { 84841 struct usb_host_interface *altsetting; 84842 struct usb_host_interface *cur_altsetting; 84843 unsigned int num_altsetting; 84844 struct usb_interface_assoc_descriptor *intf_assoc; 84845 int minor; 84846 enum usb_interface_condition condition; 84847 unsigned int sysfs_files_created: 1; 84848 unsigned int ep_devs_created: 1; 84849 unsigned int unregistering: 1; 84850 unsigned int needs_remote_wakeup: 1; 84851 unsigned int needs_altsetting0: 1; 84852 unsigned int needs_binding: 1; 84853 unsigned int resetting_device: 1; 84854 unsigned int authorized: 1; 84855 struct device dev; 84856 struct device *usb_dev; 84857 struct work_struct reset_ws; 84858 }; 84859 84860 struct usb_interface_cache { 84861 unsigned int num_altsetting; 84862 struct kref ref; 84863 struct usb_host_interface altsetting[0]; 84864 }; 84865 84866 struct usb_host_config { 84867 struct usb_config_descriptor desc; 84868 char *string; 84869 struct usb_interface_assoc_descriptor *intf_assoc[16]; 84870 struct usb_interface *interface[32]; 84871 struct usb_interface_cache *intf_cache[32]; 84872 unsigned char *extra; 84873 int extralen; 84874 }; 84875 84876 struct usb_host_bos { 84877 struct usb_bos_descriptor *desc; 84878 struct usb_ext_cap_descriptor *ext_cap; 84879 struct usb_ss_cap_descriptor *ss_cap; 84880 struct usb_ssp_cap_descriptor *ssp_cap; 84881 struct usb_ss_container_id_descriptor *ss_id; 84882 struct usb_ptm_cap_descriptor *ptm_cap; 84883 }; 84884 84885 struct usb_devmap { 84886 long unsigned int devicemap[2]; 84887 }; 84888 84889 struct usb_device; 84890 84891 struct mon_bus; 84892 84893 struct usb_bus { 84894 struct device *controller; 84895 struct device *sysdev; 84896 int busnum; 84897 const char *bus_name; 84898 u8 uses_pio_for_control; 84899 u8 otg_port; 84900 unsigned int is_b_host: 1; 84901 unsigned int b_hnp_enable: 1; 84902 unsigned int no_stop_on_short: 1; 84903 unsigned int no_sg_constraint: 1; 84904 unsigned int sg_tablesize; 84905 int devnum_next; 84906 struct mutex devnum_next_mutex; 84907 struct usb_devmap devmap; 84908 struct usb_device *root_hub; 84909 struct usb_bus *hs_companion; 84910 int bandwidth_allocated; 84911 int bandwidth_int_reqs; 84912 int bandwidth_isoc_reqs; 84913 unsigned int resuming_ports; 84914 struct mon_bus *mon_bus; 84915 int monitored; 84916 }; 84917 84918 struct wusb_dev; 84919 84920 enum usb_device_removable { 84921 USB_DEVICE_REMOVABLE_UNKNOWN = 0, 84922 USB_DEVICE_REMOVABLE = 1, 84923 USB_DEVICE_FIXED = 2, 84924 }; 84925 84926 struct usb2_lpm_parameters { 84927 unsigned int besl; 84928 int timeout; 84929 }; 84930 84931 struct usb3_lpm_parameters { 84932 unsigned int mel; 84933 unsigned int pel; 84934 unsigned int sel; 84935 int timeout; 84936 }; 84937 84938 struct usb_tt; 84939 84940 struct usb_device { 84941 int devnum; 84942 char devpath[16]; 84943 u32 route; 84944 enum usb_device_state state; 84945 enum usb_device_speed speed; 84946 unsigned int rx_lanes; 84947 unsigned int tx_lanes; 84948 struct usb_tt *tt; 84949 int ttport; 84950 unsigned int toggle[2]; 84951 struct usb_device *parent; 84952 struct usb_bus *bus; 84953 struct usb_host_endpoint ep0; 84954 struct device dev; 84955 struct usb_device_descriptor descriptor; 84956 struct usb_host_bos *bos; 84957 struct usb_host_config *config; 84958 struct usb_host_config *actconfig; 84959 struct usb_host_endpoint *ep_in[16]; 84960 struct usb_host_endpoint *ep_out[16]; 84961 char **rawdescriptors; 84962 short unsigned int bus_mA; 84963 u8 portnum; 84964 u8 level; 84965 u8 devaddr; 84966 unsigned int can_submit: 1; 84967 unsigned int persist_enabled: 1; 84968 unsigned int have_langid: 1; 84969 unsigned int authorized: 1; 84970 unsigned int authenticated: 1; 84971 unsigned int wusb: 1; 84972 unsigned int lpm_capable: 1; 84973 unsigned int usb2_hw_lpm_capable: 1; 84974 unsigned int usb2_hw_lpm_besl_capable: 1; 84975 unsigned int usb2_hw_lpm_enabled: 1; 84976 unsigned int usb2_hw_lpm_allowed: 1; 84977 unsigned int usb3_lpm_u1_enabled: 1; 84978 unsigned int usb3_lpm_u2_enabled: 1; 84979 int string_langid; 84980 char *product; 84981 char *manufacturer; 84982 char *serial; 84983 struct list_head filelist; 84984 int maxchild; 84985 u32 quirks; 84986 atomic_t urbnum; 84987 long unsigned int active_duration; 84988 long unsigned int connect_time; 84989 unsigned int do_remote_wakeup: 1; 84990 unsigned int reset_resume: 1; 84991 unsigned int port_is_suspended: 1; 84992 struct wusb_dev *wusb_dev; 84993 int slot_id; 84994 enum usb_device_removable removable; 84995 struct usb2_lpm_parameters l1_params; 84996 struct usb3_lpm_parameters u1_params; 84997 struct usb3_lpm_parameters u2_params; 84998 unsigned int lpm_disable_count; 84999 u16 hub_delay; 85000 unsigned int use_generic_driver: 1; 85001 }; 85002 85003 struct usb_tt { 85004 struct usb_device *hub; 85005 int multi; 85006 unsigned int think_time; 85007 void *hcpriv; 85008 spinlock_t lock; 85009 struct list_head clear_list; 85010 struct work_struct clear_work; 85011 }; 85012 85013 struct usb_iso_packet_descriptor { 85014 unsigned int offset; 85015 unsigned int length; 85016 unsigned int actual_length; 85017 int status; 85018 }; 85019 85020 struct usb_anchor { 85021 struct list_head urb_list; 85022 wait_queue_head_t wait; 85023 spinlock_t lock; 85024 atomic_t suspend_wakeups; 85025 unsigned int poisoned: 1; 85026 }; 85027 85028 struct urb; 85029 85030 typedef void (*usb_complete_t)(struct urb *); 85031 85032 struct urb { 85033 struct kref kref; 85034 int unlinked; 85035 void *hcpriv; 85036 atomic_t use_count; 85037 atomic_t reject; 85038 struct list_head urb_list; 85039 struct list_head anchor_list; 85040 struct usb_anchor *anchor; 85041 struct usb_device *dev; 85042 struct usb_host_endpoint *ep; 85043 unsigned int pipe; 85044 unsigned int stream_id; 85045 int status; 85046 unsigned int transfer_flags; 85047 void *transfer_buffer; 85048 dma_addr_t transfer_dma; 85049 struct scatterlist *sg; 85050 int num_mapped_sgs; 85051 int num_sgs; 85052 u32 transfer_buffer_length; 85053 u32 actual_length; 85054 unsigned char *setup_packet; 85055 dma_addr_t setup_dma; 85056 int start_frame; 85057 int number_of_packets; 85058 int interval; 85059 int error_count; 85060 void *context; 85061 usb_complete_t complete; 85062 struct usb_iso_packet_descriptor iso_frame_desc[0]; 85063 }; 85064 85065 struct giveback_urb_bh { 85066 bool running; 85067 spinlock_t lock; 85068 struct list_head head; 85069 struct tasklet_struct bh; 85070 struct usb_host_endpoint *completing_ep; 85071 }; 85072 85073 enum usb_dev_authorize_policy { 85074 USB_DEVICE_AUTHORIZE_NONE = 0, 85075 USB_DEVICE_AUTHORIZE_ALL = 1, 85076 USB_DEVICE_AUTHORIZE_INTERNAL = 2, 85077 }; 85078 85079 struct usb_phy_roothub; 85080 85081 struct hc_driver; 85082 85083 struct usb_phy; 85084 85085 struct usb_hcd { 85086 struct usb_bus self; 85087 struct kref kref; 85088 const char *product_desc; 85089 int speed; 85090 char irq_descr[24]; 85091 struct timer_list rh_timer; 85092 struct urb *status_urb; 85093 struct work_struct wakeup_work; 85094 struct work_struct died_work; 85095 const struct hc_driver *driver; 85096 struct usb_phy *usb_phy; 85097 struct usb_phy_roothub *phy_roothub; 85098 long unsigned int flags; 85099 enum usb_dev_authorize_policy dev_policy; 85100 unsigned int rh_registered: 1; 85101 unsigned int rh_pollable: 1; 85102 unsigned int msix_enabled: 1; 85103 unsigned int msi_enabled: 1; 85104 unsigned int skip_phy_initialization: 1; 85105 unsigned int uses_new_polling: 1; 85106 unsigned int wireless: 1; 85107 unsigned int has_tt: 1; 85108 unsigned int amd_resume_bug: 1; 85109 unsigned int can_do_streams: 1; 85110 unsigned int tpl_support: 1; 85111 unsigned int cant_recv_wakeups: 1; 85112 unsigned int irq; 85113 void *regs; 85114 resource_size_t rsrc_start; 85115 resource_size_t rsrc_len; 85116 unsigned int power_budget; 85117 struct giveback_urb_bh high_prio_bh; 85118 struct giveback_urb_bh low_prio_bh; 85119 struct mutex *address0_mutex; 85120 struct mutex *bandwidth_mutex; 85121 struct usb_hcd *shared_hcd; 85122 struct usb_hcd *primary_hcd; 85123 struct dma_pool___2 *pool[4]; 85124 int state; 85125 struct gen_pool *localmem_pool; 85126 long unsigned int hcd_priv[0]; 85127 }; 85128 85129 struct hc_driver { 85130 const char *description; 85131 const char *product_desc; 85132 size_t hcd_priv_size; 85133 irqreturn_t (*irq)(struct usb_hcd *); 85134 int flags; 85135 int (*reset)(struct usb_hcd *); 85136 int (*start)(struct usb_hcd *); 85137 int (*pci_suspend)(struct usb_hcd *, bool); 85138 int (*pci_resume)(struct usb_hcd *, bool); 85139 void (*stop)(struct usb_hcd *); 85140 void (*shutdown)(struct usb_hcd *); 85141 int (*get_frame_number)(struct usb_hcd *); 85142 int (*urb_enqueue)(struct usb_hcd *, struct urb *, gfp_t); 85143 int (*urb_dequeue)(struct usb_hcd *, struct urb *, int); 85144 int (*map_urb_for_dma)(struct usb_hcd *, struct urb *, gfp_t); 85145 void (*unmap_urb_for_dma)(struct usb_hcd *, struct urb *); 85146 void (*endpoint_disable)(struct usb_hcd *, struct usb_host_endpoint *); 85147 void (*endpoint_reset)(struct usb_hcd *, struct usb_host_endpoint *); 85148 int (*hub_status_data)(struct usb_hcd *, char *); 85149 int (*hub_control)(struct usb_hcd *, u16, u16, u16, char *, u16); 85150 int (*bus_suspend)(struct usb_hcd *); 85151 int (*bus_resume)(struct usb_hcd *); 85152 int (*start_port_reset)(struct usb_hcd *, unsigned int); 85153 long unsigned int (*get_resuming_ports)(struct usb_hcd *); 85154 void (*relinquish_port)(struct usb_hcd *, int); 85155 int (*port_handed_over)(struct usb_hcd *, int); 85156 void (*clear_tt_buffer_complete)(struct usb_hcd *, struct usb_host_endpoint *); 85157 int (*alloc_dev)(struct usb_hcd *, struct usb_device *); 85158 void (*free_dev)(struct usb_hcd *, struct usb_device *); 85159 int (*alloc_streams)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint **, unsigned int, unsigned int, gfp_t); 85160 int (*free_streams)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint **, unsigned int, gfp_t); 85161 int (*add_endpoint)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint *); 85162 int (*drop_endpoint)(struct usb_hcd *, struct usb_device *, struct usb_host_endpoint *); 85163 int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); 85164 void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); 85165 int (*address_device)(struct usb_hcd *, struct usb_device *); 85166 int (*enable_device)(struct usb_hcd *, struct usb_device *); 85167 int (*update_hub_device)(struct usb_hcd *, struct usb_device *, struct usb_tt *, gfp_t); 85168 int (*reset_device)(struct usb_hcd *, struct usb_device *); 85169 int (*update_device)(struct usb_hcd *, struct usb_device *); 85170 int (*set_usb2_hw_lpm)(struct usb_hcd *, struct usb_device *, int); 85171 int (*enable_usb3_lpm_timeout)(struct usb_hcd *, struct usb_device *, enum usb3_link_state); 85172 int (*disable_usb3_lpm_timeout)(struct usb_hcd *, struct usb_device *, enum usb3_link_state); 85173 int (*find_raw_port_number)(struct usb_hcd *, int); 85174 int (*port_power)(struct usb_hcd *, int, bool); 85175 }; 85176 85177 struct physdev_dbgp_op { 85178 uint8_t op; 85179 uint8_t bus; 85180 union { 85181 struct physdev_pci_device pci; 85182 } u; 85183 }; 85184 85185 struct pcpu { 85186 struct list_head list; 85187 struct device dev; 85188 uint32_t cpu_id; 85189 uint32_t flags; 85190 }; 85191 85192 typedef uint8_t xen_domain_handle_t[16]; 85193 85194 struct xen_compile_info { 85195 char compiler[64]; 85196 char compile_by[16]; 85197 char compile_domain[32]; 85198 char compile_date[32]; 85199 }; 85200 85201 struct xen_platform_parameters { 85202 xen_ulong_t virt_start; 85203 }; 85204 85205 struct xen_build_id { 85206 uint32_t len; 85207 unsigned char buf[0]; 85208 }; 85209 85210 struct hyp_sysfs_attr { 85211 struct attribute attr; 85212 ssize_t (*show)(struct hyp_sysfs_attr *, char *); 85213 ssize_t (*store)(struct hyp_sysfs_attr *, const char *, size_t); 85214 void *hyp_attr_data; 85215 }; 85216 85217 struct pmu_mode { 85218 const char *name; 85219 uint32_t mode; 85220 }; 85221 85222 enum xen_swiotlb_err { 85223 XEN_SWIOTLB_UNKNOWN = 0, 85224 XEN_SWIOTLB_ENOMEM = 1, 85225 XEN_SWIOTLB_EFIXUP = 2, 85226 }; 85227 85228 typedef int *__guest_handle_int; 85229 85230 typedef xen_ulong_t *__guest_handle_xen_ulong_t; 85231 85232 struct xen_add_to_physmap_range { 85233 domid_t domid; 85234 uint16_t space; 85235 uint16_t size; 85236 domid_t foreign_domid; 85237 __guest_handle_xen_ulong_t idxs; 85238 __guest_handle_xen_pfn_t gpfns; 85239 __guest_handle_int errs; 85240 }; 85241 85242 struct xen_remove_from_physmap { 85243 domid_t domid; 85244 xen_pfn_t gpfn; 85245 }; 85246 85247 typedef void (*xen_gfn_fn_t)(long unsigned int, void *); 85248 85249 struct xen_remap_gfn_info; 85250 85251 struct remap_data___2 { 85252 xen_pfn_t *fgfn; 85253 int nr_fgfn; 85254 pgprot_t prot; 85255 domid_t domid; 85256 struct vm_area_struct *vma; 85257 int index; 85258 struct page **pages; 85259 struct xen_remap_gfn_info *info; 85260 int *err_ptr; 85261 int mapped; 85262 int h_errs[1]; 85263 xen_ulong_t h_idxs[1]; 85264 xen_pfn_t h_gpfns[1]; 85265 int h_iter; 85266 }; 85267 85268 struct map_balloon_pages { 85269 xen_pfn_t *pfns; 85270 unsigned int idx; 85271 }; 85272 85273 struct remap_pfn { 85274 struct mm_struct *mm; 85275 struct page **pages; 85276 pgprot_t prot; 85277 long unsigned int i; 85278 }; 85279 85280 struct ww_class { 85281 atomic_long_t stamp; 85282 struct lock_class_key acquire_key; 85283 struct lock_class_key mutex_key; 85284 const char *acquire_name; 85285 const char *mutex_name; 85286 unsigned int is_wait_die; 85287 }; 85288 85289 struct regulator_state { 85290 int uV; 85291 int min_uV; 85292 int max_uV; 85293 unsigned int mode; 85294 int enabled; 85295 bool changeable; 85296 }; 85297 85298 struct regulation_constraints { 85299 const char *name; 85300 int min_uV; 85301 int max_uV; 85302 int uV_offset; 85303 int min_uA; 85304 int max_uA; 85305 int ilim_uA; 85306 int system_load; 85307 u32 *max_spread; 85308 int max_uV_step; 85309 unsigned int valid_modes_mask; 85310 unsigned int valid_ops_mask; 85311 int input_uV; 85312 struct regulator_state state_disk; 85313 struct regulator_state state_mem; 85314 struct regulator_state state_standby; 85315 suspend_state_t initial_state; 85316 unsigned int initial_mode; 85317 unsigned int ramp_delay; 85318 unsigned int settling_time; 85319 unsigned int settling_time_up; 85320 unsigned int settling_time_down; 85321 unsigned int enable_time; 85322 unsigned int active_discharge; 85323 unsigned int always_on: 1; 85324 unsigned int boot_on: 1; 85325 unsigned int apply_uV: 1; 85326 unsigned int ramp_disable: 1; 85327 unsigned int soft_start: 1; 85328 unsigned int pull_down: 1; 85329 unsigned int over_current_protection: 1; 85330 }; 85331 85332 struct regulator_consumer_supply; 85333 85334 struct regulator_init_data { 85335 const char *supply_regulator; 85336 struct regulation_constraints constraints; 85337 int num_consumer_supplies; 85338 struct regulator_consumer_supply *consumer_supplies; 85339 int (*regulator_init)(void *); 85340 void *driver_data; 85341 }; 85342 85343 enum regulator_type { 85344 REGULATOR_VOLTAGE = 0, 85345 REGULATOR_CURRENT = 1, 85346 }; 85347 85348 struct regulator_config; 85349 85350 struct regulator_ops; 85351 85352 struct regulator_desc { 85353 const char *name; 85354 const char *supply_name; 85355 const char *of_match; 85356 bool of_match_full_name; 85357 const char *regulators_node; 85358 int (*of_parse_cb)(struct device_node *, const struct regulator_desc *, struct regulator_config *); 85359 int id; 85360 unsigned int continuous_voltage_range: 1; 85361 unsigned int n_voltages; 85362 unsigned int n_current_limits; 85363 const struct regulator_ops *ops; 85364 int irq; 85365 enum regulator_type type; 85366 struct module *owner; 85367 unsigned int min_uV; 85368 unsigned int uV_step; 85369 unsigned int linear_min_sel; 85370 int fixed_uV; 85371 unsigned int ramp_delay; 85372 int min_dropout_uV; 85373 const struct linear_range *linear_ranges; 85374 const unsigned int *linear_range_selectors; 85375 int n_linear_ranges; 85376 const unsigned int *volt_table; 85377 const unsigned int *curr_table; 85378 unsigned int vsel_range_reg; 85379 unsigned int vsel_range_mask; 85380 unsigned int vsel_reg; 85381 unsigned int vsel_mask; 85382 unsigned int vsel_step; 85383 unsigned int csel_reg; 85384 unsigned int csel_mask; 85385 unsigned int apply_reg; 85386 unsigned int apply_bit; 85387 unsigned int enable_reg; 85388 unsigned int enable_mask; 85389 unsigned int enable_val; 85390 unsigned int disable_val; 85391 bool enable_is_inverted; 85392 unsigned int bypass_reg; 85393 unsigned int bypass_mask; 85394 unsigned int bypass_val_on; 85395 unsigned int bypass_val_off; 85396 unsigned int active_discharge_on; 85397 unsigned int active_discharge_off; 85398 unsigned int active_discharge_mask; 85399 unsigned int active_discharge_reg; 85400 unsigned int soft_start_reg; 85401 unsigned int soft_start_mask; 85402 unsigned int soft_start_val_on; 85403 unsigned int pull_down_reg; 85404 unsigned int pull_down_mask; 85405 unsigned int pull_down_val_on; 85406 unsigned int enable_time; 85407 unsigned int off_on_delay; 85408 unsigned int poll_enabled_time; 85409 unsigned int (*of_map_mode)(unsigned int); 85410 }; 85411 85412 struct pre_voltage_change_data { 85413 long unsigned int old_uV; 85414 long unsigned int min_uV; 85415 long unsigned int max_uV; 85416 }; 85417 85418 struct regulator_bulk_data { 85419 const char *supply; 85420 struct regulator *consumer; 85421 int ret; 85422 }; 85423 85424 struct regulator_voltage { 85425 int min_uV; 85426 int max_uV; 85427 }; 85428 85429 struct regulator_dev; 85430 85431 struct regulator { 85432 struct device *dev; 85433 struct list_head list; 85434 unsigned int always_on: 1; 85435 unsigned int bypass: 1; 85436 unsigned int device_link: 1; 85437 int uA_load; 85438 unsigned int enable_count; 85439 unsigned int deferred_disables; 85440 struct regulator_voltage voltage[5]; 85441 const char *supply_name; 85442 struct device_attribute dev_attr; 85443 struct regulator_dev *rdev; 85444 struct dentry *debugfs; 85445 }; 85446 85447 struct regulator_coupler { 85448 struct list_head list; 85449 int (*attach_regulator)(struct regulator_coupler *, struct regulator_dev *); 85450 int (*detach_regulator)(struct regulator_coupler *, struct regulator_dev *); 85451 int (*balance_voltage)(struct regulator_coupler *, struct regulator_dev *, suspend_state_t); 85452 }; 85453 85454 struct coupling_desc { 85455 struct regulator_dev **coupled_rdevs; 85456 struct regulator_coupler *coupler; 85457 int n_resolved; 85458 int n_coupled; 85459 }; 85460 85461 struct regulator_enable_gpio; 85462 85463 struct regulator_dev { 85464 const struct regulator_desc *desc; 85465 int exclusive; 85466 u32 use_count; 85467 u32 open_count; 85468 u32 bypass_count; 85469 struct list_head list; 85470 struct list_head consumer_list; 85471 struct coupling_desc coupling_desc; 85472 struct blocking_notifier_head notifier; 85473 struct ww_mutex mutex; 85474 struct task_struct *mutex_owner; 85475 int ref_cnt; 85476 struct module *owner; 85477 struct device dev; 85478 struct regulation_constraints *constraints; 85479 struct regulator *supply; 85480 const char *supply_name; 85481 struct regmap *regmap; 85482 struct delayed_work disable_work; 85483 void *reg_data; 85484 struct dentry *debugfs; 85485 struct regulator_enable_gpio *ena_pin; 85486 unsigned int ena_gpio_state: 1; 85487 unsigned int is_switch: 1; 85488 long unsigned int last_off_jiffy; 85489 }; 85490 85491 enum regulator_status { 85492 REGULATOR_STATUS_OFF = 0, 85493 REGULATOR_STATUS_ON = 1, 85494 REGULATOR_STATUS_ERROR = 2, 85495 REGULATOR_STATUS_FAST = 3, 85496 REGULATOR_STATUS_NORMAL = 4, 85497 REGULATOR_STATUS_IDLE = 5, 85498 REGULATOR_STATUS_STANDBY = 6, 85499 REGULATOR_STATUS_BYPASS = 7, 85500 REGULATOR_STATUS_UNDEFINED = 8, 85501 }; 85502 85503 struct regulator_ops { 85504 int (*list_voltage)(struct regulator_dev *, unsigned int); 85505 int (*set_voltage)(struct regulator_dev *, int, int, unsigned int *); 85506 int (*map_voltage)(struct regulator_dev *, int, int); 85507 int (*set_voltage_sel)(struct regulator_dev *, unsigned int); 85508 int (*get_voltage)(struct regulator_dev *); 85509 int (*get_voltage_sel)(struct regulator_dev *); 85510 int (*set_current_limit)(struct regulator_dev *, int, int); 85511 int (*get_current_limit)(struct regulator_dev *); 85512 int (*set_input_current_limit)(struct regulator_dev *, int); 85513 int (*set_over_current_protection)(struct regulator_dev *); 85514 int (*set_active_discharge)(struct regulator_dev *, bool); 85515 int (*enable)(struct regulator_dev *); 85516 int (*disable)(struct regulator_dev *); 85517 int (*is_enabled)(struct regulator_dev *); 85518 int (*set_mode)(struct regulator_dev *, unsigned int); 85519 unsigned int (*get_mode)(struct regulator_dev *); 85520 int (*get_error_flags)(struct regulator_dev *, unsigned int *); 85521 int (*enable_time)(struct regulator_dev *); 85522 int (*set_ramp_delay)(struct regulator_dev *, int); 85523 int (*set_voltage_time)(struct regulator_dev *, int, int); 85524 int (*set_voltage_time_sel)(struct regulator_dev *, unsigned int, unsigned int); 85525 int (*set_soft_start)(struct regulator_dev *); 85526 int (*get_status)(struct regulator_dev *); 85527 unsigned int (*get_optimum_mode)(struct regulator_dev *, int, int, int); 85528 int (*set_load)(struct regulator_dev *, int); 85529 int (*set_bypass)(struct regulator_dev *, bool); 85530 int (*get_bypass)(struct regulator_dev *, bool *); 85531 int (*set_suspend_voltage)(struct regulator_dev *, int); 85532 int (*set_suspend_enable)(struct regulator_dev *); 85533 int (*set_suspend_disable)(struct regulator_dev *); 85534 int (*set_suspend_mode)(struct regulator_dev *, unsigned int); 85535 int (*resume)(struct regulator_dev *); 85536 int (*set_pull_down)(struct regulator_dev *); 85537 }; 85538 85539 struct regulator_config { 85540 struct device *dev; 85541 const struct regulator_init_data *init_data; 85542 void *driver_data; 85543 struct device_node *of_node; 85544 struct regmap *regmap; 85545 struct gpio_desc___2 *ena_gpiod; 85546 }; 85547 85548 struct regulator_enable_gpio { 85549 struct list_head list; 85550 struct gpio_desc___2 *gpiod; 85551 u32 enable_count; 85552 u32 request_count; 85553 }; 85554 85555 enum regulator_active_discharge { 85556 REGULATOR_ACTIVE_DISCHARGE_DEFAULT = 0, 85557 REGULATOR_ACTIVE_DISCHARGE_DISABLE = 1, 85558 REGULATOR_ACTIVE_DISCHARGE_ENABLE = 2, 85559 }; 85560 85561 struct regulator_consumer_supply { 85562 const char *dev_name; 85563 const char *supply; 85564 }; 85565 85566 struct trace_event_raw_regulator_basic { 85567 struct trace_entry ent; 85568 u32 __data_loc_name; 85569 char __data[0]; 85570 }; 85571 85572 struct trace_event_raw_regulator_range { 85573 struct trace_entry ent; 85574 u32 __data_loc_name; 85575 int min; 85576 int max; 85577 char __data[0]; 85578 }; 85579 85580 struct trace_event_raw_regulator_value { 85581 struct trace_entry ent; 85582 u32 __data_loc_name; 85583 unsigned int val; 85584 char __data[0]; 85585 }; 85586 85587 struct trace_event_data_offsets_regulator_basic { 85588 u32 name; 85589 }; 85590 85591 struct trace_event_data_offsets_regulator_range { 85592 u32 name; 85593 }; 85594 85595 struct trace_event_data_offsets_regulator_value { 85596 u32 name; 85597 }; 85598 85599 typedef void (*btf_trace_regulator_enable)(void *, const char *); 85600 85601 typedef void (*btf_trace_regulator_enable_delay)(void *, const char *); 85602 85603 typedef void (*btf_trace_regulator_enable_complete)(void *, const char *); 85604 85605 typedef void (*btf_trace_regulator_disable)(void *, const char *); 85606 85607 typedef void (*btf_trace_regulator_disable_complete)(void *, const char *); 85608 85609 typedef void (*btf_trace_regulator_bypass_enable)(void *, const char *); 85610 85611 typedef void (*btf_trace_regulator_bypass_enable_complete)(void *, const char *); 85612 85613 typedef void (*btf_trace_regulator_bypass_disable)(void *, const char *); 85614 85615 typedef void (*btf_trace_regulator_bypass_disable_complete)(void *, const char *); 85616 85617 typedef void (*btf_trace_regulator_set_voltage)(void *, const char *, int, int); 85618 85619 typedef void (*btf_trace_regulator_set_voltage_complete)(void *, const char *, unsigned int); 85620 85621 enum regulator_get_type { 85622 NORMAL_GET = 0, 85623 EXCLUSIVE_GET = 1, 85624 OPTIONAL_GET = 2, 85625 MAX_GET_TYPE = 3, 85626 }; 85627 85628 struct regulator_map { 85629 struct list_head list; 85630 const char *dev_name; 85631 const char *supply; 85632 struct regulator_dev *regulator; 85633 }; 85634 85635 struct regulator_supply_alias { 85636 struct list_head list; 85637 struct device *src_dev; 85638 const char *src_supply; 85639 struct device *alias_dev; 85640 const char *alias_supply; 85641 }; 85642 85643 struct summary_data { 85644 struct seq_file *s; 85645 struct regulator_dev *parent; 85646 int level; 85647 }; 85648 85649 struct summary_lock_data { 85650 struct ww_acquire_ctx *ww_ctx; 85651 struct regulator_dev **new_contended_rdev; 85652 struct regulator_dev **old_contended_rdev; 85653 }; 85654 85655 struct fixed_voltage_config { 85656 const char *supply_name; 85657 const char *input_supply; 85658 int microvolts; 85659 unsigned int startup_delay; 85660 unsigned int off_on_delay; 85661 unsigned int enabled_at_boot: 1; 85662 struct regulator_init_data *init_data; 85663 }; 85664 85665 struct fixed_regulator_data { 85666 struct fixed_voltage_config cfg; 85667 struct regulator_init_data init_data; 85668 struct platform_device pdev; 85669 }; 85670 85671 struct regulator_bulk_devres { 85672 struct regulator_bulk_data *consumers; 85673 int num_consumers; 85674 }; 85675 85676 struct regulator_supply_alias_match { 85677 struct device *dev; 85678 const char *id; 85679 }; 85680 85681 struct regulator_notifier_match { 85682 struct regulator *regulator; 85683 struct notifier_block *nb; 85684 }; 85685 85686 struct reset_controller_dev; 85687 85688 struct reset_control_ops { 85689 int (*reset)(struct reset_controller_dev *, long unsigned int); 85690 int (*assert)(struct reset_controller_dev *, long unsigned int); 85691 int (*deassert)(struct reset_controller_dev *, long unsigned int); 85692 int (*status)(struct reset_controller_dev *, long unsigned int); 85693 }; 85694 85695 struct reset_controller_dev { 85696 const struct reset_control_ops *ops; 85697 struct module *owner; 85698 struct list_head list; 85699 struct list_head reset_control_head; 85700 struct device *dev; 85701 struct device_node *of_node; 85702 int of_reset_n_cells; 85703 int (*of_xlate)(struct reset_controller_dev *, const struct of_phandle_args *); 85704 unsigned int nr_resets; 85705 }; 85706 85707 struct reset_control_lookup { 85708 struct list_head list; 85709 const char *provider; 85710 unsigned int index; 85711 const char *dev_id; 85712 const char *con_id; 85713 }; 85714 85715 struct reset_control { 85716 struct reset_controller_dev *rcdev; 85717 struct list_head list; 85718 unsigned int id; 85719 struct kref refcnt; 85720 bool acquired; 85721 bool shared; 85722 bool array; 85723 atomic_t deassert_count; 85724 atomic_t triggered_count; 85725 }; 85726 85727 struct reset_control_array { 85728 struct reset_control base; 85729 unsigned int num_rstcs; 85730 struct reset_control *rstc[0]; 85731 }; 85732 85733 struct serial_struct32 { 85734 compat_int_t type; 85735 compat_int_t line; 85736 compat_uint_t port; 85737 compat_int_t irq; 85738 compat_int_t flags; 85739 compat_int_t xmit_fifo_size; 85740 compat_int_t custom_divisor; 85741 compat_int_t baud_base; 85742 short unsigned int close_delay; 85743 char io_type; 85744 char reserved_char; 85745 compat_int_t hub6; 85746 short unsigned int closing_wait; 85747 short unsigned int closing_wait2; 85748 compat_uint_t iomem_base; 85749 short unsigned int iomem_reg_shift; 85750 unsigned int port_high; 85751 compat_int_t reserved; 85752 }; 85753 85754 struct n_tty_data { 85755 size_t read_head; 85756 size_t commit_head; 85757 size_t canon_head; 85758 size_t echo_head; 85759 size_t echo_commit; 85760 size_t echo_mark; 85761 long unsigned int char_map[4]; 85762 long unsigned int overrun_time; 85763 int num_overrun; 85764 bool no_room; 85765 unsigned char lnext: 1; 85766 unsigned char erasing: 1; 85767 unsigned char raw: 1; 85768 unsigned char real_raw: 1; 85769 unsigned char icanon: 1; 85770 unsigned char push: 1; 85771 char read_buf[4096]; 85772 long unsigned int read_flags[64]; 85773 unsigned char echo_buf[4096]; 85774 size_t read_tail; 85775 size_t line_start; 85776 unsigned int column; 85777 unsigned int canon_column; 85778 size_t echo_tail; 85779 struct mutex atomic_read_lock; 85780 struct mutex output_lock; 85781 }; 85782 85783 enum { 85784 ERASE = 0, 85785 WERASE = 1, 85786 KILL = 2, 85787 }; 85788 85789 struct termios { 85790 tcflag_t c_iflag; 85791 tcflag_t c_oflag; 85792 tcflag_t c_cflag; 85793 tcflag_t c_lflag; 85794 cc_t c_line; 85795 cc_t c_cc[19]; 85796 }; 85797 85798 struct termios2 { 85799 tcflag_t c_iflag; 85800 tcflag_t c_oflag; 85801 tcflag_t c_cflag; 85802 tcflag_t c_lflag; 85803 cc_t c_line; 85804 cc_t c_cc[19]; 85805 speed_t c_ispeed; 85806 speed_t c_ospeed; 85807 }; 85808 85809 struct termio { 85810 short unsigned int c_iflag; 85811 short unsigned int c_oflag; 85812 short unsigned int c_cflag; 85813 short unsigned int c_lflag; 85814 unsigned char c_line; 85815 unsigned char c_cc[8]; 85816 }; 85817 85818 struct ldsem_waiter { 85819 struct list_head list; 85820 struct task_struct *task; 85821 }; 85822 85823 struct pts_fs_info___2; 85824 85825 struct tty_audit_buf { 85826 struct mutex mutex; 85827 dev_t dev; 85828 unsigned int icanon: 1; 85829 size_t valid; 85830 unsigned char *data; 85831 }; 85832 85833 struct sysrq_state { 85834 struct input_handle handle; 85835 struct work_struct reinject_work; 85836 long unsigned int key_down[12]; 85837 unsigned int alt; 85838 unsigned int alt_use; 85839 unsigned int shift; 85840 unsigned int shift_use; 85841 bool active; 85842 bool need_reinject; 85843 bool reinjecting; 85844 bool reset_canceled; 85845 bool reset_requested; 85846 long unsigned int reset_keybit[12]; 85847 int reset_seq_len; 85848 int reset_seq_cnt; 85849 int reset_seq_version; 85850 struct timer_list keyreset_timer; 85851 }; 85852 85853 struct consolefontdesc { 85854 short unsigned int charcount; 85855 short unsigned int charheight; 85856 char *chardata; 85857 }; 85858 85859 struct unipair { 85860 short unsigned int unicode; 85861 short unsigned int fontpos; 85862 }; 85863 85864 struct unimapdesc { 85865 short unsigned int entry_ct; 85866 struct unipair *entries; 85867 }; 85868 85869 struct kbentry { 85870 unsigned char kb_table; 85871 unsigned char kb_index; 85872 short unsigned int kb_value; 85873 }; 85874 85875 struct kbsentry { 85876 unsigned char kb_func; 85877 unsigned char kb_string[512]; 85878 }; 85879 85880 struct kbkeycode { 85881 unsigned int scancode; 85882 unsigned int keycode; 85883 }; 85884 85885 struct kbd_repeat { 85886 int delay; 85887 int period; 85888 }; 85889 85890 struct console_font_op { 85891 unsigned int op; 85892 unsigned int flags; 85893 unsigned int width; 85894 unsigned int height; 85895 unsigned int charcount; 85896 unsigned char *data; 85897 }; 85898 85899 struct vt_stat { 85900 short unsigned int v_active; 85901 short unsigned int v_signal; 85902 short unsigned int v_state; 85903 }; 85904 85905 struct vt_sizes { 85906 short unsigned int v_rows; 85907 short unsigned int v_cols; 85908 short unsigned int v_scrollsize; 85909 }; 85910 85911 struct vt_consize { 85912 short unsigned int v_rows; 85913 short unsigned int v_cols; 85914 short unsigned int v_vlin; 85915 short unsigned int v_clin; 85916 short unsigned int v_vcol; 85917 short unsigned int v_ccol; 85918 }; 85919 85920 struct vt_event { 85921 unsigned int event; 85922 unsigned int oldev; 85923 unsigned int newev; 85924 unsigned int pad[4]; 85925 }; 85926 85927 struct vt_setactivate { 85928 unsigned int console; 85929 struct vt_mode mode; 85930 }; 85931 85932 struct vt_spawn_console { 85933 spinlock_t lock; 85934 struct pid *pid; 85935 int sig; 85936 }; 85937 85938 struct vt_event_wait { 85939 struct list_head list; 85940 struct vt_event event; 85941 int done; 85942 }; 85943 85944 struct compat_consolefontdesc { 85945 short unsigned int charcount; 85946 short unsigned int charheight; 85947 compat_caddr_t chardata; 85948 }; 85949 85950 struct compat_console_font_op { 85951 compat_uint_t op; 85952 compat_uint_t flags; 85953 compat_uint_t width; 85954 compat_uint_t height; 85955 compat_uint_t charcount; 85956 compat_caddr_t data; 85957 }; 85958 85959 struct compat_unimapdesc { 85960 short unsigned int entry_ct; 85961 compat_caddr_t entries; 85962 }; 85963 85964 struct vt_notifier_param { 85965 struct vc_data *vc; 85966 unsigned int c; 85967 }; 85968 85969 struct vcs_poll_data { 85970 struct notifier_block notifier; 85971 unsigned int cons_num; 85972 int event; 85973 wait_queue_head_t waitq; 85974 struct fasync_struct *fasync; 85975 }; 85976 85977 struct tiocl_selection { 85978 short unsigned int xs; 85979 short unsigned int ys; 85980 short unsigned int xe; 85981 short unsigned int ye; 85982 short unsigned int sel_mode; 85983 }; 85984 85985 struct vc_selection { 85986 struct mutex lock; 85987 struct vc_data *cons; 85988 char *buffer; 85989 unsigned int buf_len; 85990 volatile int start; 85991 int end; 85992 }; 85993 85994 struct kbdiacr { 85995 unsigned char diacr; 85996 unsigned char base; 85997 unsigned char result; 85998 }; 85999 86000 struct kbdiacrs { 86001 unsigned int kb_cnt; 86002 struct kbdiacr kbdiacr[256]; 86003 }; 86004 86005 struct kbdiacruc { 86006 unsigned int diacr; 86007 unsigned int base; 86008 unsigned int result; 86009 }; 86010 86011 struct kbdiacrsuc { 86012 unsigned int kb_cnt; 86013 struct kbdiacruc kbdiacruc[256]; 86014 }; 86015 86016 struct keyboard_notifier_param { 86017 struct vc_data *vc; 86018 int down; 86019 int shift; 86020 int ledstate; 86021 unsigned int value; 86022 }; 86023 86024 struct kbd_struct { 86025 unsigned char lockstate; 86026 unsigned char slockstate; 86027 unsigned char ledmode: 1; 86028 unsigned char ledflagstate: 4; 86029 char: 3; 86030 unsigned char default_ledflagstate: 4; 86031 unsigned char kbdmode: 3; 86032 char: 1; 86033 unsigned char modeflags: 5; 86034 }; 86035 86036 typedef void k_handler_fn(struct vc_data *, unsigned char, char); 86037 86038 typedef void fn_handler_fn(struct vc_data *); 86039 86040 struct getset_keycode_data { 86041 struct input_keymap_entry ke; 86042 int error; 86043 }; 86044 86045 struct kbd_led_trigger { 86046 struct led_trigger trigger; 86047 unsigned int mask; 86048 }; 86049 86050 struct uni_pagedir { 86051 u16 **uni_pgdir[32]; 86052 long unsigned int refcount; 86053 long unsigned int sum; 86054 unsigned char *inverse_translations[4]; 86055 u16 *inverse_trans_unicode; 86056 }; 86057 86058 typedef uint32_t char32_t; 86059 86060 struct uni_screen { 86061 char32_t *lines[0]; 86062 }; 86063 86064 struct con_driver { 86065 const struct consw *con; 86066 const char *desc; 86067 struct device *dev; 86068 int node; 86069 int first; 86070 int last; 86071 int flag; 86072 }; 86073 86074 enum { 86075 blank_off = 0, 86076 blank_normal_wait = 1, 86077 blank_vesa_wait = 2, 86078 }; 86079 86080 enum { 86081 EPecma = 0, 86082 EPdec = 1, 86083 EPeq = 2, 86084 EPgt = 3, 86085 EPlt = 4, 86086 }; 86087 86088 struct rgb { 86089 u8 r; 86090 u8 g; 86091 u8 b; 86092 }; 86093 86094 enum { 86095 ESnormal = 0, 86096 ESesc = 1, 86097 ESsquare = 2, 86098 ESgetpars = 3, 86099 ESfunckey = 4, 86100 EShash = 5, 86101 ESsetG0 = 6, 86102 ESsetG1 = 7, 86103 ESpercent = 8, 86104 EScsiignore = 9, 86105 ESnonstd = 10, 86106 ESpalette = 11, 86107 ESosc = 12, 86108 }; 86109 86110 struct interval { 86111 uint32_t first; 86112 uint32_t last; 86113 }; 86114 86115 struct vc_draw_region { 86116 long unsigned int from; 86117 long unsigned int to; 86118 int x; 86119 }; 86120 86121 struct hv_ops; 86122 86123 struct hvc_struct { 86124 struct tty_port port; 86125 spinlock_t lock; 86126 int index; 86127 int do_wakeup; 86128 char *outbuf; 86129 int outbuf_size; 86130 int n_outbuf; 86131 uint32_t vtermno; 86132 const struct hv_ops *ops; 86133 int irq_requested; 86134 int data; 86135 struct winsize ws; 86136 struct work_struct tty_resize; 86137 struct list_head next; 86138 long unsigned int flags; 86139 }; 86140 86141 struct hv_ops { 86142 int (*get_chars)(uint32_t, char *, int); 86143 int (*put_chars)(uint32_t, const char *, int); 86144 int (*flush)(uint32_t, bool); 86145 int (*notifier_add)(struct hvc_struct *, int); 86146 void (*notifier_del)(struct hvc_struct *, int); 86147 void (*notifier_hangup)(struct hvc_struct *, int); 86148 int (*tiocmget)(struct hvc_struct *); 86149 int (*tiocmset)(struct hvc_struct *, unsigned int, unsigned int); 86150 void (*dtr_rts)(struct hvc_struct *, int); 86151 }; 86152 86153 struct circ_buf { 86154 char *buf; 86155 int head; 86156 int tail; 86157 }; 86158 86159 struct serial_rs485 { 86160 __u32 flags; 86161 __u32 delay_rts_before_send; 86162 __u32 delay_rts_after_send; 86163 __u32 padding[5]; 86164 }; 86165 86166 struct serial_iso7816 { 86167 __u32 flags; 86168 __u32 tg; 86169 __u32 sc_fi; 86170 __u32 sc_di; 86171 __u32 clk; 86172 __u32 reserved[5]; 86173 }; 86174 86175 struct uart_port; 86176 86177 struct uart_ops { 86178 unsigned int (*tx_empty)(struct uart_port *); 86179 void (*set_mctrl)(struct uart_port *, unsigned int); 86180 unsigned int (*get_mctrl)(struct uart_port *); 86181 void (*stop_tx)(struct uart_port *); 86182 void (*start_tx)(struct uart_port *); 86183 void (*throttle)(struct uart_port *); 86184 void (*unthrottle)(struct uart_port *); 86185 void (*send_xchar)(struct uart_port *, char); 86186 void (*stop_rx)(struct uart_port *); 86187 void (*enable_ms)(struct uart_port *); 86188 void (*break_ctl)(struct uart_port *, int); 86189 int (*startup)(struct uart_port *); 86190 void (*shutdown)(struct uart_port *); 86191 void (*flush_buffer)(struct uart_port *); 86192 void (*set_termios)(struct uart_port *, struct ktermios *, struct ktermios *); 86193 void (*set_ldisc)(struct uart_port *, struct ktermios *); 86194 void (*pm)(struct uart_port *, unsigned int, unsigned int); 86195 const char * (*type)(struct uart_port *); 86196 void (*release_port)(struct uart_port *); 86197 int (*request_port)(struct uart_port *); 86198 void (*config_port)(struct uart_port *, int); 86199 int (*verify_port)(struct uart_port *, struct serial_struct *); 86200 int (*ioctl)(struct uart_port *, unsigned int, long unsigned int); 86201 int (*poll_init)(struct uart_port *); 86202 void (*poll_put_char)(struct uart_port *, unsigned char); 86203 int (*poll_get_char)(struct uart_port *); 86204 }; 86205 86206 struct uart_icount { 86207 __u32 cts; 86208 __u32 dsr; 86209 __u32 rng; 86210 __u32 dcd; 86211 __u32 rx; 86212 __u32 tx; 86213 __u32 frame; 86214 __u32 overrun; 86215 __u32 parity; 86216 __u32 brk; 86217 __u32 buf_overrun; 86218 }; 86219 86220 typedef unsigned int upf_t; 86221 86222 typedef unsigned int upstat_t; 86223 86224 struct uart_state; 86225 86226 struct uart_port { 86227 spinlock_t lock; 86228 long unsigned int iobase; 86229 unsigned char *membase; 86230 unsigned int (*serial_in)(struct uart_port *, int); 86231 void (*serial_out)(struct uart_port *, int, int); 86232 void (*set_termios)(struct uart_port *, struct ktermios *, struct ktermios *); 86233 void (*set_ldisc)(struct uart_port *, struct ktermios *); 86234 unsigned int (*get_mctrl)(struct uart_port *); 86235 void (*set_mctrl)(struct uart_port *, unsigned int); 86236 unsigned int (*get_divisor)(struct uart_port *, unsigned int, unsigned int *); 86237 void (*set_divisor)(struct uart_port *, unsigned int, unsigned int, unsigned int); 86238 int (*startup)(struct uart_port *); 86239 void (*shutdown)(struct uart_port *); 86240 void (*throttle)(struct uart_port *); 86241 void (*unthrottle)(struct uart_port *); 86242 int (*handle_irq)(struct uart_port *); 86243 void (*pm)(struct uart_port *, unsigned int, unsigned int); 86244 void (*handle_break)(struct uart_port *); 86245 int (*rs485_config)(struct uart_port *, struct serial_rs485 *); 86246 int (*iso7816_config)(struct uart_port *, struct serial_iso7816 *); 86247 unsigned int irq; 86248 long unsigned int irqflags; 86249 unsigned int uartclk; 86250 unsigned int fifosize; 86251 unsigned char x_char; 86252 unsigned char regshift; 86253 unsigned char iotype; 86254 unsigned char quirks; 86255 unsigned int read_status_mask; 86256 unsigned int ignore_status_mask; 86257 struct uart_state *state; 86258 struct uart_icount icount; 86259 struct console *cons; 86260 upf_t flags; 86261 upstat_t status; 86262 int hw_stopped; 86263 unsigned int mctrl; 86264 unsigned int timeout; 86265 unsigned int type; 86266 const struct uart_ops *ops; 86267 unsigned int custom_divisor; 86268 unsigned int line; 86269 unsigned int minor; 86270 resource_size_t mapbase; 86271 resource_size_t mapsize; 86272 struct device *dev; 86273 long unsigned int sysrq; 86274 unsigned int sysrq_ch; 86275 unsigned char has_sysrq; 86276 unsigned char sysrq_seq; 86277 unsigned char hub6; 86278 unsigned char suspended; 86279 unsigned char console_reinit; 86280 const char *name; 86281 struct attribute_group *attr_group; 86282 const struct attribute_group **tty_groups; 86283 struct serial_rs485 rs485; 86284 struct gpio_desc___2 *rs485_term_gpio; 86285 struct serial_iso7816 iso7816; 86286 void *private_data; 86287 }; 86288 86289 enum uart_pm_state { 86290 UART_PM_STATE_ON = 0, 86291 UART_PM_STATE_OFF = 3, 86292 UART_PM_STATE_UNDEFINED = 4, 86293 }; 86294 86295 struct uart_state { 86296 struct tty_port port; 86297 enum uart_pm_state pm_state; 86298 struct circ_buf xmit; 86299 atomic_t refcount; 86300 wait_queue_head_t remove_wait; 86301 struct uart_port *uart_port; 86302 }; 86303 86304 struct earlycon_device { 86305 struct console *con; 86306 struct uart_port port; 86307 char options[16]; 86308 unsigned int baud; 86309 }; 86310 86311 struct earlycon_id { 86312 char name[15]; 86313 char name_term; 86314 char compatible[128]; 86315 int (*setup)(struct earlycon_device *, const char *); 86316 }; 86317 86318 typedef uint32_t XENCONS_RING_IDX; 86319 86320 struct xencons_interface { 86321 char in[1024]; 86322 char out[2048]; 86323 XENCONS_RING_IDX in_cons; 86324 XENCONS_RING_IDX in_prod; 86325 XENCONS_RING_IDX out_cons; 86326 XENCONS_RING_IDX out_prod; 86327 }; 86328 86329 struct xencons_info { 86330 struct list_head list; 86331 struct xenbus_device *xbdev; 86332 struct xencons_interface *intf; 86333 unsigned int evtchn; 86334 struct hvc_struct *hvc; 86335 int irq; 86336 int vtermno; 86337 grant_ref_t gntref; 86338 }; 86339 86340 struct uart_driver { 86341 struct module *owner; 86342 const char *driver_name; 86343 const char *dev_name; 86344 int major; 86345 int minor; 86346 int nr; 86347 struct console *cons; 86348 struct uart_state *state; 86349 struct tty_driver *tty_driver; 86350 }; 86351 86352 struct uart_match { 86353 struct uart_port *port; 86354 struct uart_driver *driver; 86355 }; 86356 86357 enum hwparam_type { 86358 hwparam_ioport = 0, 86359 hwparam_iomem = 1, 86360 hwparam_ioport_or_iomem = 2, 86361 hwparam_irq = 3, 86362 hwparam_dma = 4, 86363 hwparam_dma_addr = 5, 86364 hwparam_other = 6, 86365 }; 86366 86367 struct plat_serial8250_port { 86368 long unsigned int iobase; 86369 void *membase; 86370 resource_size_t mapbase; 86371 unsigned int irq; 86372 long unsigned int irqflags; 86373 unsigned int uartclk; 86374 void *private_data; 86375 unsigned char regshift; 86376 unsigned char iotype; 86377 unsigned char hub6; 86378 unsigned char has_sysrq; 86379 upf_t flags; 86380 unsigned int type; 86381 unsigned int (*serial_in)(struct uart_port *, int); 86382 void (*serial_out)(struct uart_port *, int, int); 86383 void (*set_termios)(struct uart_port *, struct ktermios *, struct ktermios *); 86384 void (*set_ldisc)(struct uart_port *, struct ktermios *); 86385 unsigned int (*get_mctrl)(struct uart_port *); 86386 int (*handle_irq)(struct uart_port *); 86387 void (*pm)(struct uart_port *, unsigned int, unsigned int); 86388 void (*handle_break)(struct uart_port *); 86389 }; 86390 86391 enum { 86392 PLAT8250_DEV_LEGACY = 4294967295, 86393 PLAT8250_DEV_PLATFORM = 0, 86394 PLAT8250_DEV_PLATFORM1 = 1, 86395 PLAT8250_DEV_PLATFORM2 = 2, 86396 PLAT8250_DEV_FOURPORT = 3, 86397 PLAT8250_DEV_ACCENT = 4, 86398 PLAT8250_DEV_BOCA = 5, 86399 PLAT8250_DEV_EXAR_ST16C554 = 6, 86400 PLAT8250_DEV_HUB6 = 7, 86401 PLAT8250_DEV_AU1X00 = 8, 86402 PLAT8250_DEV_SM501 = 9, 86403 }; 86404 86405 struct uart_8250_port; 86406 86407 struct uart_8250_ops { 86408 int (*setup_irq)(struct uart_8250_port *); 86409 void (*release_irq)(struct uart_8250_port *); 86410 }; 86411 86412 struct mctrl_gpios; 86413 86414 struct uart_8250_dma; 86415 86416 struct uart_8250_em485; 86417 86418 struct uart_8250_port { 86419 struct uart_port port; 86420 struct timer_list timer; 86421 struct list_head list; 86422 u32 capabilities; 86423 short unsigned int bugs; 86424 bool fifo_bug; 86425 unsigned int tx_loadsz; 86426 unsigned char acr; 86427 unsigned char fcr; 86428 unsigned char ier; 86429 unsigned char lcr; 86430 unsigned char mcr; 86431 unsigned char mcr_mask; 86432 unsigned char mcr_force; 86433 unsigned char cur_iotype; 86434 unsigned int rpm_tx_active; 86435 unsigned char canary; 86436 unsigned char probe; 86437 struct mctrl_gpios *gpios; 86438 unsigned char lsr_saved_flags; 86439 unsigned char msr_saved_flags; 86440 struct uart_8250_dma *dma; 86441 const struct uart_8250_ops *ops; 86442 int (*dl_read)(struct uart_8250_port *); 86443 void (*dl_write)(struct uart_8250_port *, int); 86444 struct uart_8250_em485 *em485; 86445 void (*rs485_start_tx)(struct uart_8250_port *); 86446 void (*rs485_stop_tx)(struct uart_8250_port *); 86447 struct delayed_work overrun_backoff; 86448 u32 overrun_backoff_time_ms; 86449 }; 86450 86451 struct uart_8250_em485 { 86452 struct hrtimer start_tx_timer; 86453 struct hrtimer stop_tx_timer; 86454 struct hrtimer *active_timer; 86455 struct uart_8250_port *port; 86456 unsigned int tx_stopped: 1; 86457 }; 86458 86459 struct uart_8250_dma { 86460 int (*tx_dma)(struct uart_8250_port *); 86461 int (*rx_dma)(struct uart_8250_port *); 86462 dma_filter_fn fn; 86463 void *rx_param; 86464 void *tx_param; 86465 struct dma_slave_config rxconf; 86466 struct dma_slave_config txconf; 86467 struct dma_chan___2 *rxchan; 86468 struct dma_chan___2 *txchan; 86469 phys_addr_t rx_dma_addr; 86470 phys_addr_t tx_dma_addr; 86471 dma_addr_t rx_addr; 86472 dma_addr_t tx_addr; 86473 dma_cookie_t rx_cookie; 86474 dma_cookie_t tx_cookie; 86475 void *rx_buf; 86476 size_t rx_size; 86477 size_t tx_size; 86478 unsigned char tx_running; 86479 unsigned char tx_err; 86480 unsigned char rx_running; 86481 }; 86482 86483 struct old_serial_port { 86484 unsigned int uart; 86485 unsigned int baud_base; 86486 unsigned int port; 86487 unsigned int irq; 86488 upf_t flags; 86489 unsigned char io_type; 86490 unsigned char *iomem_base; 86491 short unsigned int iomem_reg_shift; 86492 }; 86493 86494 struct irq_info___2 { 86495 struct hlist_node node; 86496 int irq; 86497 spinlock_t lock; 86498 struct list_head *head; 86499 }; 86500 86501 struct serial8250_config { 86502 const char *name; 86503 short unsigned int fifo_size; 86504 short unsigned int tx_loadsz; 86505 unsigned char fcr; 86506 unsigned char rxtrig_bytes[4]; 86507 unsigned int flags; 86508 }; 86509 86510 struct dw8250_port_data { 86511 int line; 86512 struct uart_8250_dma dma; 86513 u8 dlf_size; 86514 }; 86515 86516 struct pciserial_board { 86517 unsigned int flags; 86518 unsigned int num_ports; 86519 unsigned int base_baud; 86520 unsigned int uart_offset; 86521 unsigned int reg_shift; 86522 unsigned int first_offset; 86523 }; 86524 86525 struct serial_private; 86526 86527 struct pci_serial_quirk { 86528 u32 vendor; 86529 u32 device; 86530 u32 subvendor; 86531 u32 subdevice; 86532 int (*probe)(struct pci_dev *); 86533 int (*init)(struct pci_dev *); 86534 int (*setup)(struct serial_private *, const struct pciserial_board *, struct uart_8250_port *, int); 86535 void (*exit)(struct pci_dev *); 86536 }; 86537 86538 struct serial_private { 86539 struct pci_dev *dev; 86540 unsigned int nr; 86541 struct pci_serial_quirk *quirk; 86542 const struct pciserial_board *board; 86543 int line[0]; 86544 }; 86545 86546 struct f815xxa_data { 86547 spinlock_t lock; 86548 int idx; 86549 }; 86550 86551 struct timedia_struct { 86552 int num; 86553 const short unsigned int *ids; 86554 }; 86555 86556 struct quatech_feature { 86557 u16 devid; 86558 bool amcc; 86559 }; 86560 86561 enum pci_board_num_t { 86562 pbn_default = 0, 86563 pbn_b0_1_115200 = 1, 86564 pbn_b0_2_115200 = 2, 86565 pbn_b0_4_115200 = 3, 86566 pbn_b0_5_115200 = 4, 86567 pbn_b0_8_115200 = 5, 86568 pbn_b0_1_921600 = 6, 86569 pbn_b0_2_921600 = 7, 86570 pbn_b0_4_921600 = 8, 86571 pbn_b0_2_1130000 = 9, 86572 pbn_b0_4_1152000 = 10, 86573 pbn_b0_4_1250000 = 11, 86574 pbn_b0_2_1843200 = 12, 86575 pbn_b0_4_1843200 = 13, 86576 pbn_b0_1_4000000 = 14, 86577 pbn_b0_bt_1_115200 = 15, 86578 pbn_b0_bt_2_115200 = 16, 86579 pbn_b0_bt_4_115200 = 17, 86580 pbn_b0_bt_8_115200 = 18, 86581 pbn_b0_bt_1_460800 = 19, 86582 pbn_b0_bt_2_460800 = 20, 86583 pbn_b0_bt_4_460800 = 21, 86584 pbn_b0_bt_1_921600 = 22, 86585 pbn_b0_bt_2_921600 = 23, 86586 pbn_b0_bt_4_921600 = 24, 86587 pbn_b0_bt_8_921600 = 25, 86588 pbn_b1_1_115200 = 26, 86589 pbn_b1_2_115200 = 27, 86590 pbn_b1_4_115200 = 28, 86591 pbn_b1_8_115200 = 29, 86592 pbn_b1_16_115200 = 30, 86593 pbn_b1_1_921600 = 31, 86594 pbn_b1_2_921600 = 32, 86595 pbn_b1_4_921600 = 33, 86596 pbn_b1_8_921600 = 34, 86597 pbn_b1_2_1250000 = 35, 86598 pbn_b1_bt_1_115200 = 36, 86599 pbn_b1_bt_2_115200 = 37, 86600 pbn_b1_bt_4_115200 = 38, 86601 pbn_b1_bt_2_921600 = 39, 86602 pbn_b1_1_1382400 = 40, 86603 pbn_b1_2_1382400 = 41, 86604 pbn_b1_4_1382400 = 42, 86605 pbn_b1_8_1382400 = 43, 86606 pbn_b2_1_115200 = 44, 86607 pbn_b2_2_115200 = 45, 86608 pbn_b2_4_115200 = 46, 86609 pbn_b2_8_115200 = 47, 86610 pbn_b2_1_460800 = 48, 86611 pbn_b2_4_460800 = 49, 86612 pbn_b2_8_460800 = 50, 86613 pbn_b2_16_460800 = 51, 86614 pbn_b2_1_921600 = 52, 86615 pbn_b2_4_921600 = 53, 86616 pbn_b2_8_921600 = 54, 86617 pbn_b2_8_1152000 = 55, 86618 pbn_b2_bt_1_115200 = 56, 86619 pbn_b2_bt_2_115200 = 57, 86620 pbn_b2_bt_4_115200 = 58, 86621 pbn_b2_bt_2_921600 = 59, 86622 pbn_b2_bt_4_921600 = 60, 86623 pbn_b3_2_115200 = 61, 86624 pbn_b3_4_115200 = 62, 86625 pbn_b3_8_115200 = 63, 86626 pbn_b4_bt_2_921600 = 64, 86627 pbn_b4_bt_4_921600 = 65, 86628 pbn_b4_bt_8_921600 = 66, 86629 pbn_panacom = 67, 86630 pbn_panacom2 = 68, 86631 pbn_panacom4 = 69, 86632 pbn_plx_romulus = 70, 86633 pbn_endrun_2_4000000 = 71, 86634 pbn_oxsemi = 72, 86635 pbn_oxsemi_1_4000000 = 73, 86636 pbn_oxsemi_2_4000000 = 74, 86637 pbn_oxsemi_4_4000000 = 75, 86638 pbn_oxsemi_8_4000000 = 76, 86639 pbn_intel_i960 = 77, 86640 pbn_sgi_ioc3 = 78, 86641 pbn_computone_4 = 79, 86642 pbn_computone_6 = 80, 86643 pbn_computone_8 = 81, 86644 pbn_sbsxrsio = 82, 86645 pbn_pasemi_1682M = 83, 86646 pbn_ni8430_2 = 84, 86647 pbn_ni8430_4 = 85, 86648 pbn_ni8430_8 = 86, 86649 pbn_ni8430_16 = 87, 86650 pbn_ADDIDATA_PCIe_1_3906250 = 88, 86651 pbn_ADDIDATA_PCIe_2_3906250 = 89, 86652 pbn_ADDIDATA_PCIe_4_3906250 = 90, 86653 pbn_ADDIDATA_PCIe_8_3906250 = 91, 86654 pbn_ce4100_1_115200 = 92, 86655 pbn_omegapci = 93, 86656 pbn_NETMOS9900_2s_115200 = 94, 86657 pbn_brcm_trumanage = 95, 86658 pbn_fintek_4 = 96, 86659 pbn_fintek_8 = 97, 86660 pbn_fintek_12 = 98, 86661 pbn_fintek_F81504A = 99, 86662 pbn_fintek_F81508A = 100, 86663 pbn_fintek_F81512A = 101, 86664 pbn_wch382_2 = 102, 86665 pbn_wch384_4 = 103, 86666 pbn_wch384_8 = 104, 86667 pbn_pericom_PI7C9X7951 = 105, 86668 pbn_pericom_PI7C9X7952 = 106, 86669 pbn_pericom_PI7C9X7954 = 107, 86670 pbn_pericom_PI7C9X7958 = 108, 86671 pbn_sunix_pci_1s = 109, 86672 pbn_sunix_pci_2s = 110, 86673 pbn_sunix_pci_4s = 111, 86674 pbn_sunix_pci_8s = 112, 86675 pbn_sunix_pci_16s = 113, 86676 pbn_moxa8250_2p = 114, 86677 pbn_moxa8250_4p = 115, 86678 pbn_moxa8250_8p = 116, 86679 }; 86680 86681 struct reset_control___2; 86682 86683 struct dw8250_data { 86684 struct dw8250_port_data data; 86685 u8 usr_reg; 86686 int msr_mask_on; 86687 int msr_mask_off; 86688 struct clk *clk; 86689 struct clk *pclk; 86690 struct notifier_block clk_notifier; 86691 struct work_struct clk_work; 86692 struct reset_control___2 *rst; 86693 unsigned int skip_autocfg: 1; 86694 unsigned int uart_16550_compatible: 1; 86695 }; 86696 86697 struct hsu_dma_slave { 86698 struct device *dma_dev; 86699 int chan_id; 86700 }; 86701 86702 struct mid8250; 86703 86704 struct mid8250_board { 86705 unsigned int flags; 86706 long unsigned int freq; 86707 unsigned int base_baud; 86708 int (*setup)(struct mid8250 *, struct uart_port *); 86709 void (*exit)(struct mid8250 *); 86710 }; 86711 86712 struct mid8250 { 86713 int line; 86714 int dma_index; 86715 struct pci_dev *dma_dev; 86716 struct uart_8250_dma dma; 86717 struct mid8250_board *board; 86718 struct hsu_dma_chip dma_chip; 86719 }; 86720 86721 struct gpio_array___2; 86722 86723 enum mctrl_gpio_idx { 86724 UART_GPIO_CTS = 0, 86725 UART_GPIO_DSR = 1, 86726 UART_GPIO_DCD = 2, 86727 UART_GPIO_RNG = 3, 86728 UART_GPIO_RI = 3, 86729 UART_GPIO_RTS = 4, 86730 UART_GPIO_DTR = 5, 86731 UART_GPIO_MAX = 6, 86732 }; 86733 86734 struct mctrl_gpios___2 { 86735 struct uart_port *port; 86736 struct gpio_desc___2 *gpio[6]; 86737 int irq[6]; 86738 unsigned int mctrl_prev; 86739 bool mctrl_on; 86740 }; 86741 86742 struct serdev_device; 86743 86744 struct serdev_device_ops { 86745 int (*receive_buf)(struct serdev_device *, const unsigned char *, size_t); 86746 void (*write_wakeup)(struct serdev_device *); 86747 }; 86748 86749 struct serdev_controller; 86750 86751 struct serdev_device { 86752 struct device dev; 86753 int nr; 86754 struct serdev_controller *ctrl; 86755 const struct serdev_device_ops *ops; 86756 struct completion write_comp; 86757 struct mutex write_lock; 86758 }; 86759 86760 struct serdev_controller_ops; 86761 86762 struct serdev_controller { 86763 struct device dev; 86764 unsigned int nr; 86765 struct serdev_device *serdev; 86766 const struct serdev_controller_ops *ops; 86767 }; 86768 86769 struct serdev_device_driver { 86770 struct device_driver driver; 86771 int (*probe)(struct serdev_device *); 86772 void (*remove)(struct serdev_device *); 86773 }; 86774 86775 enum serdev_parity { 86776 SERDEV_PARITY_NONE = 0, 86777 SERDEV_PARITY_EVEN = 1, 86778 SERDEV_PARITY_ODD = 2, 86779 }; 86780 86781 struct serdev_controller_ops { 86782 int (*write_buf)(struct serdev_controller *, const unsigned char *, size_t); 86783 void (*write_flush)(struct serdev_controller *); 86784 int (*write_room)(struct serdev_controller *); 86785 int (*open)(struct serdev_controller *); 86786 void (*close)(struct serdev_controller *); 86787 void (*set_flow_control)(struct serdev_controller *, bool); 86788 int (*set_parity)(struct serdev_controller *, enum serdev_parity); 86789 unsigned int (*set_baudrate)(struct serdev_controller *, unsigned int); 86790 void (*wait_until_sent)(struct serdev_controller *, long int); 86791 int (*get_tiocm)(struct serdev_controller *); 86792 int (*set_tiocm)(struct serdev_controller *, unsigned int, unsigned int); 86793 }; 86794 86795 struct acpi_serdev_lookup { 86796 acpi_handle device_handle; 86797 acpi_handle controller_handle; 86798 int n; 86799 int index; 86800 }; 86801 86802 struct serport { 86803 struct tty_port *port; 86804 struct tty_struct *tty; 86805 struct tty_driver *tty_drv; 86806 int tty_idx; 86807 long unsigned int flags; 86808 }; 86809 86810 struct memdev { 86811 const char *name; 86812 umode_t mode; 86813 const struct file_operations *fops; 86814 fmode_t fmode; 86815 }; 86816 86817 struct timer_rand_state { 86818 cycles_t last_time; 86819 long int last_delta; 86820 long int last_delta2; 86821 }; 86822 86823 struct trace_event_raw_add_device_randomness { 86824 struct trace_entry ent; 86825 int bytes; 86826 long unsigned int IP; 86827 char __data[0]; 86828 }; 86829 86830 struct trace_event_raw_random__mix_pool_bytes { 86831 struct trace_entry ent; 86832 const char *pool_name; 86833 int bytes; 86834 long unsigned int IP; 86835 char __data[0]; 86836 }; 86837 86838 struct trace_event_raw_credit_entropy_bits { 86839 struct trace_entry ent; 86840 const char *pool_name; 86841 int bits; 86842 int entropy_count; 86843 long unsigned int IP; 86844 char __data[0]; 86845 }; 86846 86847 struct trace_event_raw_push_to_pool { 86848 struct trace_entry ent; 86849 const char *pool_name; 86850 int pool_bits; 86851 int input_bits; 86852 char __data[0]; 86853 }; 86854 86855 struct trace_event_raw_debit_entropy { 86856 struct trace_entry ent; 86857 const char *pool_name; 86858 int debit_bits; 86859 char __data[0]; 86860 }; 86861 86862 struct trace_event_raw_add_input_randomness { 86863 struct trace_entry ent; 86864 int input_bits; 86865 char __data[0]; 86866 }; 86867 86868 struct trace_event_raw_add_disk_randomness { 86869 struct trace_entry ent; 86870 dev_t dev; 86871 int input_bits; 86872 char __data[0]; 86873 }; 86874 86875 struct trace_event_raw_xfer_secondary_pool { 86876 struct trace_entry ent; 86877 const char *pool_name; 86878 int xfer_bits; 86879 int request_bits; 86880 int pool_entropy; 86881 int input_entropy; 86882 char __data[0]; 86883 }; 86884 86885 struct trace_event_raw_random__get_random_bytes { 86886 struct trace_entry ent; 86887 int nbytes; 86888 long unsigned int IP; 86889 char __data[0]; 86890 }; 86891 86892 struct trace_event_raw_random__extract_entropy { 86893 struct trace_entry ent; 86894 const char *pool_name; 86895 int nbytes; 86896 int entropy_count; 86897 long unsigned int IP; 86898 char __data[0]; 86899 }; 86900 86901 struct trace_event_raw_random_read { 86902 struct trace_entry ent; 86903 int got_bits; 86904 int need_bits; 86905 int pool_left; 86906 int input_left; 86907 char __data[0]; 86908 }; 86909 86910 struct trace_event_raw_urandom_read { 86911 struct trace_entry ent; 86912 int got_bits; 86913 int pool_left; 86914 int input_left; 86915 char __data[0]; 86916 }; 86917 86918 struct trace_event_raw_prandom_u32 { 86919 struct trace_entry ent; 86920 unsigned int ret; 86921 char __data[0]; 86922 }; 86923 86924 struct trace_event_data_offsets_add_device_randomness {}; 86925 86926 struct trace_event_data_offsets_random__mix_pool_bytes {}; 86927 86928 struct trace_event_data_offsets_credit_entropy_bits {}; 86929 86930 struct trace_event_data_offsets_push_to_pool {}; 86931 86932 struct trace_event_data_offsets_debit_entropy {}; 86933 86934 struct trace_event_data_offsets_add_input_randomness {}; 86935 86936 struct trace_event_data_offsets_add_disk_randomness {}; 86937 86938 struct trace_event_data_offsets_xfer_secondary_pool {}; 86939 86940 struct trace_event_data_offsets_random__get_random_bytes {}; 86941 86942 struct trace_event_data_offsets_random__extract_entropy {}; 86943 86944 struct trace_event_data_offsets_random_read {}; 86945 86946 struct trace_event_data_offsets_urandom_read {}; 86947 86948 struct trace_event_data_offsets_prandom_u32 {}; 86949 86950 typedef void (*btf_trace_add_device_randomness)(void *, int, long unsigned int); 86951 86952 typedef void (*btf_trace_mix_pool_bytes)(void *, const char *, int, long unsigned int); 86953 86954 typedef void (*btf_trace_mix_pool_bytes_nolock)(void *, const char *, int, long unsigned int); 86955 86956 typedef void (*btf_trace_credit_entropy_bits)(void *, const char *, int, int, long unsigned int); 86957 86958 typedef void (*btf_trace_push_to_pool)(void *, const char *, int, int); 86959 86960 typedef void (*btf_trace_debit_entropy)(void *, const char *, int); 86961 86962 typedef void (*btf_trace_add_input_randomness)(void *, int); 86963 86964 typedef void (*btf_trace_add_disk_randomness)(void *, dev_t, int); 86965 86966 typedef void (*btf_trace_xfer_secondary_pool)(void *, const char *, int, int, int, int); 86967 86968 typedef void (*btf_trace_get_random_bytes)(void *, int, long unsigned int); 86969 86970 typedef void (*btf_trace_get_random_bytes_arch)(void *, int, long unsigned int); 86971 86972 typedef void (*btf_trace_extract_entropy)(void *, const char *, int, int, long unsigned int); 86973 86974 typedef void (*btf_trace_extract_entropy_user)(void *, const char *, int, int, long unsigned int); 86975 86976 typedef void (*btf_trace_random_read)(void *, int, int, int, int); 86977 86978 typedef void (*btf_trace_urandom_read)(void *, int, int, int); 86979 86980 typedef void (*btf_trace_prandom_u32)(void *, unsigned int); 86981 86982 struct poolinfo { 86983 int poolbitshift; 86984 int poolwords; 86985 int poolbytes; 86986 int poolfracbits; 86987 int tap1; 86988 int tap2; 86989 int tap3; 86990 int tap4; 86991 int tap5; 86992 }; 86993 86994 struct crng_state { 86995 __u32 state[16]; 86996 long unsigned int init_time; 86997 spinlock_t lock; 86998 }; 86999 87000 struct entropy_store { 87001 const struct poolinfo *poolinfo; 87002 __u32 *pool; 87003 const char *name; 87004 spinlock_t lock; 87005 short unsigned int add_ptr; 87006 short unsigned int input_rotate; 87007 int entropy_count; 87008 unsigned int initialized: 1; 87009 unsigned int last_data_init: 1; 87010 __u8 last_data[10]; 87011 }; 87012 87013 struct fast_pool { 87014 __u32 pool[4]; 87015 long unsigned int last; 87016 short unsigned int reg_idx; 87017 unsigned char count; 87018 }; 87019 87020 struct batched_entropy { 87021 union { 87022 u64 entropy_u64[8]; 87023 u32 entropy_u32[16]; 87024 }; 87025 unsigned int position; 87026 spinlock_t batch_lock; 87027 }; 87028 87029 struct raw_config_request { 87030 int raw_minor; 87031 __u64 block_major; 87032 __u64 block_minor; 87033 }; 87034 87035 struct raw_device_data { 87036 dev_t binding; 87037 struct block_device *bdev; 87038 int inuse; 87039 }; 87040 87041 struct raw32_config_request { 87042 compat_int_t raw_minor; 87043 compat_u64 block_major; 87044 compat_u64 block_minor; 87045 } __attribute__((packed)); 87046 87047 struct hpet_info { 87048 long unsigned int hi_ireqfreq; 87049 long unsigned int hi_flags; 87050 short unsigned int hi_hpet; 87051 short unsigned int hi_timer; 87052 }; 87053 87054 struct hpet_timer { 87055 u64 hpet_config; 87056 union { 87057 u64 _hpet_hc64; 87058 u32 _hpet_hc32; 87059 long unsigned int _hpet_compare; 87060 } _u1; 87061 u64 hpet_fsb[2]; 87062 }; 87063 87064 struct hpet { 87065 u64 hpet_cap; 87066 u64 res0; 87067 u64 hpet_config; 87068 u64 res1; 87069 u64 hpet_isr; 87070 u64 res2[25]; 87071 union { 87072 u64 _hpet_mc64; 87073 u32 _hpet_mc32; 87074 long unsigned int _hpet_mc; 87075 } _u0; 87076 u64 res3; 87077 struct hpet_timer hpet_timers[1]; 87078 }; 87079 87080 struct hpets; 87081 87082 struct hpet_dev { 87083 struct hpets *hd_hpets; 87084 struct hpet *hd_hpet; 87085 struct hpet_timer *hd_timer; 87086 long unsigned int hd_ireqfreq; 87087 long unsigned int hd_irqdata; 87088 wait_queue_head_t hd_waitqueue; 87089 struct fasync_struct *hd_async_queue; 87090 unsigned int hd_flags; 87091 unsigned int hd_irq; 87092 unsigned int hd_hdwirq; 87093 char hd_name[7]; 87094 }; 87095 87096 struct hpets { 87097 struct hpets *hp_next; 87098 struct hpet *hp_hpet; 87099 long unsigned int hp_hpet_phys; 87100 struct clocksource *hp_clocksource; 87101 long long unsigned int hp_tick_freq; 87102 long unsigned int hp_delta; 87103 unsigned int hp_ntimer; 87104 unsigned int hp_which; 87105 struct hpet_dev hp_dev[0]; 87106 }; 87107 87108 struct compat_hpet_info { 87109 compat_ulong_t hi_ireqfreq; 87110 compat_ulong_t hi_flags; 87111 short unsigned int hi_hpet; 87112 short unsigned int hi_timer; 87113 }; 87114 87115 struct nvram_ops { 87116 ssize_t (*get_size)(); 87117 unsigned char (*read_byte)(int); 87118 void (*write_byte)(unsigned char, int); 87119 ssize_t (*read)(char *, size_t, loff_t *); 87120 ssize_t (*write)(char *, size_t, loff_t *); 87121 long int (*initialize)(); 87122 long int (*set_checksum)(); 87123 }; 87124 87125 struct virtrng_info { 87126 struct hwrng hwrng; 87127 struct virtqueue *vq; 87128 struct completion have_data; 87129 char name[25]; 87130 unsigned int data_avail; 87131 int index; 87132 bool busy; 87133 bool hwrng_register_done; 87134 bool hwrng_removed; 87135 }; 87136 87137 enum chipset_type { 87138 NOT_SUPPORTED = 0, 87139 SUPPORTED = 1, 87140 }; 87141 87142 struct agp_version { 87143 u16 major; 87144 u16 minor; 87145 }; 87146 87147 struct agp_bridge_data; 87148 87149 struct agp_memory { 87150 struct agp_memory *next; 87151 struct agp_memory *prev; 87152 struct agp_bridge_data *bridge; 87153 struct page **pages; 87154 size_t page_count; 87155 int key; 87156 int num_scratch_pages; 87157 off_t pg_start; 87158 u32 type; 87159 u32 physical; 87160 bool is_bound; 87161 bool is_flushed; 87162 struct list_head mapped_list; 87163 struct scatterlist *sg_list; 87164 int num_sg; 87165 }; 87166 87167 struct agp_bridge_driver; 87168 87169 struct agp_bridge_data { 87170 const struct agp_version *version; 87171 const struct agp_bridge_driver *driver; 87172 const struct vm_operations_struct *vm_ops; 87173 void *previous_size; 87174 void *current_size; 87175 void *dev_private_data; 87176 struct pci_dev *dev; 87177 u32 *gatt_table; 87178 u32 *gatt_table_real; 87179 long unsigned int scratch_page; 87180 struct page *scratch_page_page; 87181 dma_addr_t scratch_page_dma; 87182 long unsigned int gart_bus_addr; 87183 long unsigned int gatt_bus_addr; 87184 u32 mode; 87185 enum chipset_type type; 87186 long unsigned int *key_list; 87187 atomic_t current_memory_agp; 87188 atomic_t agp_in_use; 87189 int max_memory_agp; 87190 int aperture_size_idx; 87191 int capndx; 87192 int flags; 87193 char major_version; 87194 char minor_version; 87195 struct list_head list; 87196 u32 apbase_config; 87197 struct list_head mapped_list; 87198 spinlock_t mapped_lock; 87199 }; 87200 87201 enum aper_size_type { 87202 U8_APER_SIZE = 0, 87203 U16_APER_SIZE = 1, 87204 U32_APER_SIZE = 2, 87205 LVL2_APER_SIZE = 3, 87206 FIXED_APER_SIZE = 4, 87207 }; 87208 87209 struct gatt_mask { 87210 long unsigned int mask; 87211 u32 type; 87212 }; 87213 87214 struct agp_bridge_driver { 87215 struct module *owner; 87216 const void *aperture_sizes; 87217 int num_aperture_sizes; 87218 enum aper_size_type size_type; 87219 bool cant_use_aperture; 87220 bool needs_scratch_page; 87221 const struct gatt_mask *masks; 87222 int (*fetch_size)(); 87223 int (*configure)(); 87224 void (*agp_enable)(struct agp_bridge_data *, u32); 87225 void (*cleanup)(); 87226 void (*tlb_flush)(struct agp_memory *); 87227 long unsigned int (*mask_memory)(struct agp_bridge_data *, dma_addr_t, int); 87228 void (*cache_flush)(); 87229 int (*create_gatt_table)(struct agp_bridge_data *); 87230 int (*free_gatt_table)(struct agp_bridge_data *); 87231 int (*insert_memory)(struct agp_memory *, off_t, int); 87232 int (*remove_memory)(struct agp_memory *, off_t, int); 87233 struct agp_memory * (*alloc_by_type)(size_t, int); 87234 void (*free_by_type)(struct agp_memory *); 87235 struct page * (*agp_alloc_page)(struct agp_bridge_data *); 87236 int (*agp_alloc_pages)(struct agp_bridge_data *, struct agp_memory *, size_t); 87237 void (*agp_destroy_page)(struct page *, int); 87238 void (*agp_destroy_pages)(struct agp_memory *); 87239 int (*agp_type_to_mask_type)(struct agp_bridge_data *, int); 87240 }; 87241 87242 struct agp_kern_info { 87243 struct agp_version version; 87244 struct pci_dev *device; 87245 enum chipset_type chipset; 87246 long unsigned int mode; 87247 long unsigned int aper_base; 87248 size_t aper_size; 87249 int max_memory; 87250 int current_memory; 87251 bool cant_use_aperture; 87252 long unsigned int page_mask; 87253 const struct vm_operations_struct *vm_ops; 87254 }; 87255 87256 struct aper_size_info_8 { 87257 int size; 87258 int num_entries; 87259 int page_order; 87260 u8 size_value; 87261 }; 87262 87263 struct aper_size_info_16 { 87264 int size; 87265 int num_entries; 87266 int page_order; 87267 u16 size_value; 87268 }; 87269 87270 struct aper_size_info_32 { 87271 int size; 87272 int num_entries; 87273 int page_order; 87274 u32 size_value; 87275 }; 87276 87277 struct aper_size_info_lvl2 { 87278 int size; 87279 int num_entries; 87280 u32 size_value; 87281 }; 87282 87283 struct aper_size_info_fixed { 87284 int size; 87285 int num_entries; 87286 int page_order; 87287 }; 87288 87289 struct agp_3_5_dev { 87290 struct list_head list; 87291 u8 capndx; 87292 u32 maxbw; 87293 struct pci_dev *dev; 87294 }; 87295 87296 struct isoch_data { 87297 u32 maxbw; 87298 u32 n; 87299 u32 y; 87300 u32 l; 87301 u32 rq; 87302 struct agp_3_5_dev *dev; 87303 }; 87304 87305 struct intel_agp_driver_description { 87306 unsigned int chip_id; 87307 char *name; 87308 const struct agp_bridge_driver *driver; 87309 }; 87310 87311 struct intel_gtt_driver { 87312 unsigned int gen: 8; 87313 unsigned int is_g33: 1; 87314 unsigned int is_pineview: 1; 87315 unsigned int is_ironlake: 1; 87316 unsigned int has_pgtbl_enable: 1; 87317 unsigned int dma_mask_size: 8; 87318 int (*setup)(); 87319 void (*cleanup)(); 87320 void (*write_entry)(dma_addr_t, unsigned int, unsigned int); 87321 bool (*check_flags)(unsigned int); 87322 void (*chipset_flush)(); 87323 }; 87324 87325 struct _intel_private { 87326 const struct intel_gtt_driver *driver; 87327 struct pci_dev *pcidev; 87328 struct pci_dev *bridge_dev; 87329 u8 *registers; 87330 phys_addr_t gtt_phys_addr; 87331 u32 PGETBL_save; 87332 u32 *gtt; 87333 bool clear_fake_agp; 87334 int num_dcache_entries; 87335 void *i9xx_flush_page; 87336 char *i81x_gtt_table; 87337 struct resource ifp_resource; 87338 int resource_valid; 87339 struct page *scratch_page; 87340 phys_addr_t scratch_page_dma; 87341 int refcount; 87342 unsigned int needs_dmar: 1; 87343 phys_addr_t gma_bus_addr; 87344 resource_size_t stolen_size; 87345 unsigned int gtt_total_entries; 87346 unsigned int gtt_mappable_entries; 87347 }; 87348 87349 struct intel_gtt_driver_description { 87350 unsigned int gmch_chip_id; 87351 char *name; 87352 const struct intel_gtt_driver *gtt_driver; 87353 }; 87354 87355 struct agp_device_ids { 87356 short unsigned int device_id; 87357 enum chipset_type chipset; 87358 const char *chipset_name; 87359 int (*chipset_setup)(struct pci_dev *); 87360 }; 87361 87362 enum tpm2_startup_types { 87363 TPM2_SU_CLEAR = 0, 87364 TPM2_SU_STATE = 1, 87365 }; 87366 87367 enum tpm_chip_flags { 87368 TPM_CHIP_FLAG_TPM2 = 2, 87369 TPM_CHIP_FLAG_IRQ = 4, 87370 TPM_CHIP_FLAG_VIRTUAL = 8, 87371 TPM_CHIP_FLAG_HAVE_TIMEOUTS = 16, 87372 TPM_CHIP_FLAG_ALWAYS_POWERED = 32, 87373 TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED = 64, 87374 }; 87375 87376 enum tpm2_structures { 87377 TPM2_ST_NO_SESSIONS = 32769, 87378 TPM2_ST_SESSIONS = 32770, 87379 }; 87380 87381 enum tpm2_return_codes { 87382 TPM2_RC_SUCCESS = 0, 87383 TPM2_RC_HASH = 131, 87384 TPM2_RC_HANDLE = 139, 87385 TPM2_RC_INITIALIZE = 256, 87386 TPM2_RC_FAILURE = 257, 87387 TPM2_RC_DISABLED = 288, 87388 TPM2_RC_COMMAND_CODE = 323, 87389 TPM2_RC_TESTING = 2314, 87390 TPM2_RC_REFERENCE_H0 = 2320, 87391 TPM2_RC_RETRY = 2338, 87392 }; 87393 87394 struct tpm_header { 87395 __be16 tag; 87396 __be32 length; 87397 union { 87398 __be32 ordinal; 87399 __be32 return_code; 87400 }; 87401 } __attribute__((packed)); 87402 87403 struct file_priv { 87404 struct tpm_chip *chip; 87405 struct tpm_space *space; 87406 struct mutex buffer_mutex; 87407 struct timer_list user_read_timer; 87408 struct work_struct timeout_work; 87409 struct work_struct async_work; 87410 wait_queue_head_t async_wait; 87411 ssize_t response_length; 87412 bool response_read; 87413 bool command_enqueued; 87414 u8 data_buffer[4096]; 87415 }; 87416 87417 enum TPM_OPS_FLAGS { 87418 TPM_OPS_AUTO_STARTUP = 1, 87419 }; 87420 87421 enum tpm2_timeouts { 87422 TPM2_TIMEOUT_A = 750, 87423 TPM2_TIMEOUT_B = 2000, 87424 TPM2_TIMEOUT_C = 200, 87425 TPM2_TIMEOUT_D = 30, 87426 TPM2_DURATION_SHORT = 20, 87427 TPM2_DURATION_MEDIUM = 750, 87428 TPM2_DURATION_LONG = 2000, 87429 TPM2_DURATION_LONG_LONG = 300000, 87430 TPM2_DURATION_DEFAULT = 120000, 87431 }; 87432 87433 enum tpm2_command_codes { 87434 TPM2_CC_FIRST = 287, 87435 TPM2_CC_HIERARCHY_CONTROL = 289, 87436 TPM2_CC_HIERARCHY_CHANGE_AUTH = 297, 87437 TPM2_CC_CREATE_PRIMARY = 305, 87438 TPM2_CC_SEQUENCE_COMPLETE = 318, 87439 TPM2_CC_SELF_TEST = 323, 87440 TPM2_CC_STARTUP = 324, 87441 TPM2_CC_SHUTDOWN = 325, 87442 TPM2_CC_NV_READ = 334, 87443 TPM2_CC_CREATE = 339, 87444 TPM2_CC_LOAD = 343, 87445 TPM2_CC_SEQUENCE_UPDATE = 348, 87446 TPM2_CC_UNSEAL = 350, 87447 TPM2_CC_CONTEXT_LOAD = 353, 87448 TPM2_CC_CONTEXT_SAVE = 354, 87449 TPM2_CC_FLUSH_CONTEXT = 357, 87450 TPM2_CC_VERIFY_SIGNATURE = 375, 87451 TPM2_CC_GET_CAPABILITY = 378, 87452 TPM2_CC_GET_RANDOM = 379, 87453 TPM2_CC_PCR_READ = 382, 87454 TPM2_CC_PCR_EXTEND = 386, 87455 TPM2_CC_EVENT_SEQUENCE_COMPLETE = 389, 87456 TPM2_CC_HASH_SEQUENCE_START = 390, 87457 TPM2_CC_CREATE_LOADED = 401, 87458 TPM2_CC_LAST = 403, 87459 }; 87460 87461 struct tpm_buf { 87462 unsigned int flags; 87463 u8 *data; 87464 }; 87465 87466 enum tpm_timeout { 87467 TPM_TIMEOUT = 5, 87468 TPM_TIMEOUT_RETRY = 100, 87469 TPM_TIMEOUT_RANGE_US = 300, 87470 TPM_TIMEOUT_POLL = 1, 87471 TPM_TIMEOUT_USECS_MIN = 100, 87472 TPM_TIMEOUT_USECS_MAX = 500, 87473 }; 87474 87475 enum tpm_buf_flags { 87476 TPM_BUF_OVERFLOW = 1, 87477 }; 87478 87479 struct stclear_flags_t { 87480 __be16 tag; 87481 u8 deactivated; 87482 u8 disableForceClear; 87483 u8 physicalPresence; 87484 u8 physicalPresenceLock; 87485 u8 bGlobalLock; 87486 } __attribute__((packed)); 87487 87488 struct tpm1_version { 87489 u8 major; 87490 u8 minor; 87491 u8 rev_major; 87492 u8 rev_minor; 87493 }; 87494 87495 struct tpm1_version2 { 87496 __be16 tag; 87497 struct tpm1_version version; 87498 }; 87499 87500 struct timeout_t { 87501 __be32 a; 87502 __be32 b; 87503 __be32 c; 87504 __be32 d; 87505 }; 87506 87507 struct duration_t { 87508 __be32 tpm_short; 87509 __be32 tpm_medium; 87510 __be32 tpm_long; 87511 }; 87512 87513 struct permanent_flags_t { 87514 __be16 tag; 87515 u8 disable; 87516 u8 ownership; 87517 u8 deactivated; 87518 u8 readPubek; 87519 u8 disableOwnerClear; 87520 u8 allowMaintenance; 87521 u8 physicalPresenceLifetimeLock; 87522 u8 physicalPresenceHWEnable; 87523 u8 physicalPresenceCMDEnable; 87524 u8 CEKPUsed; 87525 u8 TPMpost; 87526 u8 TPMpostLock; 87527 u8 FIPS; 87528 u8 operator; 87529 u8 enableRevokeEK; 87530 u8 nvLocked; 87531 u8 readSRKPub; 87532 u8 tpmEstablished; 87533 u8 maintenanceDone; 87534 u8 disableFullDALogicInfo; 87535 }; 87536 87537 typedef union { 87538 struct permanent_flags_t perm_flags; 87539 struct stclear_flags_t stclear_flags; 87540 __u8 owned; 87541 __be32 num_pcrs; 87542 struct tpm1_version version1; 87543 struct tpm1_version2 version2; 87544 __be32 manufacturer_id; 87545 struct timeout_t timeout; 87546 struct duration_t duration; 87547 } cap_t; 87548 87549 enum tpm_capabilities { 87550 TPM_CAP_FLAG = 4, 87551 TPM_CAP_PROP = 5, 87552 TPM_CAP_VERSION_1_1 = 6, 87553 TPM_CAP_VERSION_1_2 = 26, 87554 }; 87555 87556 enum tpm_sub_capabilities { 87557 TPM_CAP_PROP_PCR = 257, 87558 TPM_CAP_PROP_MANUFACTURER = 259, 87559 TPM_CAP_FLAG_PERM = 264, 87560 TPM_CAP_FLAG_VOL = 265, 87561 TPM_CAP_PROP_OWNER = 273, 87562 TPM_CAP_PROP_TIS_TIMEOUT = 277, 87563 TPM_CAP_PROP_TIS_DURATION = 288, 87564 }; 87565 87566 struct tpm1_get_random_out { 87567 __be32 rng_data_len; 87568 u8 rng_data[128]; 87569 }; 87570 87571 enum tpm2_const { 87572 TPM2_PLATFORM_PCR = 24, 87573 TPM2_PCR_SELECT_MIN = 3, 87574 }; 87575 87576 enum tpm2_permanent_handles { 87577 TPM2_RS_PW = 1073741833, 87578 }; 87579 87580 enum tpm2_capabilities { 87581 TPM2_CAP_HANDLES = 1, 87582 TPM2_CAP_COMMANDS = 2, 87583 TPM2_CAP_PCRS = 5, 87584 TPM2_CAP_TPM_PROPERTIES = 6, 87585 }; 87586 87587 enum tpm2_properties { 87588 TPM_PT_TOTAL_COMMANDS = 297, 87589 }; 87590 87591 enum tpm2_cc_attrs { 87592 TPM2_CC_ATTR_CHANDLES = 25, 87593 TPM2_CC_ATTR_RHANDLE = 28, 87594 }; 87595 87596 struct tpm2_hash { 87597 unsigned int crypto_id; 87598 unsigned int tpm_id; 87599 }; 87600 87601 struct tpm2_pcr_read_out { 87602 __be32 update_cnt; 87603 __be32 pcr_selects_cnt; 87604 __be16 hash_alg; 87605 u8 pcr_select_size; 87606 u8 pcr_select[3]; 87607 __be32 digests_cnt; 87608 __be16 digest_size; 87609 u8 digest[0]; 87610 } __attribute__((packed)); 87611 87612 struct tpm2_null_auth_area { 87613 __be32 handle; 87614 __be16 nonce_size; 87615 u8 attributes; 87616 __be16 auth_size; 87617 } __attribute__((packed)); 87618 87619 struct tpm2_get_random_out { 87620 __be16 size; 87621 u8 buffer[128]; 87622 }; 87623 87624 struct tpm2_get_cap_out { 87625 u8 more_data; 87626 __be32 subcap_id; 87627 __be32 property_cnt; 87628 __be32 property_id; 87629 __be32 value; 87630 } __attribute__((packed)); 87631 87632 struct tpm2_pcr_selection { 87633 __be16 hash_alg; 87634 u8 size_of_select; 87635 u8 pcr_select[3]; 87636 }; 87637 87638 struct tpmrm_priv { 87639 struct file_priv priv; 87640 struct tpm_space space; 87641 }; 87642 87643 enum tpm2_handle_types { 87644 TPM2_HT_HMAC_SESSION = 33554432, 87645 TPM2_HT_POLICY_SESSION = 50331648, 87646 TPM2_HT_TRANSIENT = 2147483648, 87647 }; 87648 87649 struct tpm2_context { 87650 __be64 sequence; 87651 __be32 saved_handle; 87652 __be32 hierarchy; 87653 __be16 blob_size; 87654 } __attribute__((packed)); 87655 87656 struct tpm2_cap_handles { 87657 u8 more_data; 87658 __be32 capability; 87659 __be32 count; 87660 __be32 handles[0]; 87661 } __attribute__((packed)); 87662 87663 struct tpm_readpubek_out { 87664 u8 algorithm[4]; 87665 u8 encscheme[2]; 87666 u8 sigscheme[2]; 87667 __be32 paramsize; 87668 u8 parameters[12]; 87669 __be32 keysize; 87670 u8 modulus[256]; 87671 u8 checksum[20]; 87672 }; 87673 87674 struct tcpa_event { 87675 u32 pcr_index; 87676 u32 event_type; 87677 u8 pcr_value[20]; 87678 u32 event_size; 87679 u8 event_data[0]; 87680 }; 87681 87682 enum tcpa_event_types { 87683 PREBOOT = 0, 87684 POST_CODE = 1, 87685 UNUSED = 2, 87686 NO_ACTION = 3, 87687 SEPARATOR = 4, 87688 ACTION = 5, 87689 EVENT_TAG = 6, 87690 SCRTM_CONTENTS = 7, 87691 SCRTM_VERSION = 8, 87692 CPU_MICROCODE = 9, 87693 PLATFORM_CONFIG_FLAGS = 10, 87694 TABLE_OF_DEVICES = 11, 87695 COMPACT_HASH = 12, 87696 IPL = 13, 87697 IPL_PARTITION_DATA = 14, 87698 NONHOST_CODE = 15, 87699 NONHOST_CONFIG = 16, 87700 NONHOST_INFO = 17, 87701 }; 87702 87703 struct tcpa_pc_event { 87704 u32 event_id; 87705 u32 event_size; 87706 u8 event_data[0]; 87707 }; 87708 87709 enum tcpa_pc_event_ids { 87710 SMBIOS = 1, 87711 BIS_CERT = 2, 87712 POST_BIOS_ROM = 3, 87713 ESCD = 4, 87714 CMOS = 5, 87715 NVRAM = 6, 87716 OPTION_ROM_EXEC = 7, 87717 OPTION_ROM_CONFIG = 8, 87718 OPTION_ROM_MICROCODE = 10, 87719 S_CRTM_VERSION = 11, 87720 S_CRTM_CONTENTS = 12, 87721 POST_CONTENTS = 13, 87722 HOST_TABLE_OF_DEVICES = 14, 87723 }; 87724 87725 struct tcg_efi_specid_event_algs { 87726 u16 alg_id; 87727 u16 digest_size; 87728 }; 87729 87730 struct tcg_efi_specid_event_head { 87731 u8 signature[16]; 87732 u32 platform_class; 87733 u8 spec_version_minor; 87734 u8 spec_version_major; 87735 u8 spec_errata; 87736 u8 uintnsize; 87737 u32 num_algs; 87738 struct tcg_efi_specid_event_algs digest_sizes[0]; 87739 }; 87740 87741 struct tcg_pcr_event { 87742 u32 pcr_idx; 87743 u32 event_type; 87744 u8 digest[20]; 87745 u32 event_size; 87746 u8 event[0]; 87747 }; 87748 87749 struct tcg_event_field { 87750 u32 event_size; 87751 u8 event[0]; 87752 }; 87753 87754 struct tcg_pcr_event2_head { 87755 u32 pcr_idx; 87756 u32 event_type; 87757 u32 count; 87758 struct tpm_digest digests[0]; 87759 }; 87760 87761 struct acpi_table_tpm2 { 87762 struct acpi_table_header header; 87763 u16 platform_class; 87764 u16 reserved; 87765 u64 control_address; 87766 u32 start_method; 87767 } __attribute__((packed)); 87768 87769 struct acpi_tpm2_phy { 87770 u8 start_method_specific[12]; 87771 u32 log_area_minimum_length; 87772 u64 log_area_start_address; 87773 }; 87774 87775 enum bios_platform_class { 87776 BIOS_CLIENT = 0, 87777 BIOS_SERVER = 1, 87778 }; 87779 87780 struct client_hdr { 87781 u32 log_max_len; 87782 u64 log_start_addr; 87783 } __attribute__((packed)); 87784 87785 struct server_hdr { 87786 u16 reserved; 87787 u64 log_max_len; 87788 u64 log_start_addr; 87789 } __attribute__((packed)); 87790 87791 struct acpi_tcpa { 87792 struct acpi_table_header hdr; 87793 u16 platform_class; 87794 union { 87795 struct client_hdr client; 87796 struct server_hdr server; 87797 }; 87798 } __attribute__((packed)); 87799 87800 struct linux_efi_tpm_eventlog { 87801 u32 size; 87802 u32 final_events_preboot_size; 87803 u8 version; 87804 u8 log[0]; 87805 }; 87806 87807 struct efi_tcg2_final_events_table { 87808 u64 version; 87809 u64 nr_events; 87810 u8 events[0]; 87811 }; 87812 87813 enum tis_access { 87814 TPM_ACCESS_VALID = 128, 87815 TPM_ACCESS_ACTIVE_LOCALITY = 32, 87816 TPM_ACCESS_REQUEST_PENDING = 4, 87817 TPM_ACCESS_REQUEST_USE = 2, 87818 }; 87819 87820 enum tis_status { 87821 TPM_STS_VALID = 128, 87822 TPM_STS_COMMAND_READY = 64, 87823 TPM_STS_GO = 32, 87824 TPM_STS_DATA_AVAIL = 16, 87825 TPM_STS_DATA_EXPECT = 8, 87826 TPM_STS_READ_ZERO = 35, 87827 }; 87828 87829 enum tis_int_flags { 87830 TPM_GLOBAL_INT_ENABLE = 2147483648, 87831 TPM_INTF_BURST_COUNT_STATIC = 256, 87832 TPM_INTF_CMD_READY_INT = 128, 87833 TPM_INTF_INT_EDGE_FALLING = 64, 87834 TPM_INTF_INT_EDGE_RISING = 32, 87835 TPM_INTF_INT_LEVEL_LOW = 16, 87836 TPM_INTF_INT_LEVEL_HIGH = 8, 87837 TPM_INTF_LOCALITY_CHANGE_INT = 4, 87838 TPM_INTF_STS_VALID_INT = 2, 87839 TPM_INTF_DATA_AVAIL_INT = 1, 87840 }; 87841 87842 enum tis_defaults { 87843 TIS_MEM_LEN = 20480, 87844 TIS_SHORT_TIMEOUT = 750, 87845 TIS_LONG_TIMEOUT = 2000, 87846 }; 87847 87848 enum tpm_tis_flags { 87849 TPM_TIS_ITPM_WORKAROUND = 1, 87850 }; 87851 87852 struct tpm_tis_phy_ops; 87853 87854 struct tpm_tis_data { 87855 u16 manufacturer_id; 87856 int locality; 87857 int irq; 87858 bool irq_tested; 87859 unsigned int flags; 87860 void *ilb_base_addr; 87861 u16 clkrun_enabled; 87862 wait_queue_head_t int_queue; 87863 wait_queue_head_t read_queue; 87864 const struct tpm_tis_phy_ops *phy_ops; 87865 short unsigned int rng_quality; 87866 }; 87867 87868 struct tpm_tis_phy_ops { 87869 int (*read_bytes)(struct tpm_tis_data *, u32, u16, u8 *); 87870 int (*write_bytes)(struct tpm_tis_data *, u32, u16, const u8 *); 87871 int (*read16)(struct tpm_tis_data *, u32, u16 *); 87872 int (*read32)(struct tpm_tis_data *, u32, u32 *); 87873 int (*write32)(struct tpm_tis_data *, u32, u32); 87874 }; 87875 87876 struct tis_vendor_durations_override { 87877 u32 did_vid; 87878 struct tpm1_version version; 87879 long unsigned int durations[3]; 87880 }; 87881 87882 struct tis_vendor_timeout_override { 87883 u32 did_vid; 87884 long unsigned int timeout_us[4]; 87885 }; 87886 87887 struct tpm_info { 87888 struct resource res; 87889 int irq; 87890 }; 87891 87892 struct tpm_tis_tcg_phy { 87893 struct tpm_tis_data priv; 87894 void *iobase; 87895 }; 87896 87897 enum crb_defaults { 87898 CRB_ACPI_START_REVISION_ID = 1, 87899 CRB_ACPI_START_INDEX = 1, 87900 }; 87901 87902 enum crb_loc_ctrl { 87903 CRB_LOC_CTRL_REQUEST_ACCESS = 1, 87904 CRB_LOC_CTRL_RELINQUISH = 2, 87905 }; 87906 87907 enum crb_loc_state { 87908 CRB_LOC_STATE_LOC_ASSIGNED = 2, 87909 CRB_LOC_STATE_TPM_REG_VALID_STS = 128, 87910 }; 87911 87912 enum crb_ctrl_req { 87913 CRB_CTRL_REQ_CMD_READY = 1, 87914 CRB_CTRL_REQ_GO_IDLE = 2, 87915 }; 87916 87917 enum crb_ctrl_sts { 87918 CRB_CTRL_STS_ERROR = 1, 87919 CRB_CTRL_STS_TPM_IDLE = 2, 87920 }; 87921 87922 enum crb_start { 87923 CRB_START_INVOKE = 1, 87924 }; 87925 87926 enum crb_cancel { 87927 CRB_CANCEL_INVOKE = 1, 87928 }; 87929 87930 struct crb_regs_head { 87931 u32 loc_state; 87932 u32 reserved1; 87933 u32 loc_ctrl; 87934 u32 loc_sts; 87935 u8 reserved2[32]; 87936 u64 intf_id; 87937 u64 ctrl_ext; 87938 }; 87939 87940 struct crb_regs_tail { 87941 u32 ctrl_req; 87942 u32 ctrl_sts; 87943 u32 ctrl_cancel; 87944 u32 ctrl_start; 87945 u32 ctrl_int_enable; 87946 u32 ctrl_int_sts; 87947 u32 ctrl_cmd_size; 87948 u32 ctrl_cmd_pa_low; 87949 u32 ctrl_cmd_pa_high; 87950 u32 ctrl_rsp_size; 87951 u64 ctrl_rsp_pa; 87952 }; 87953 87954 enum crb_status { 87955 CRB_DRV_STS_COMPLETE = 1, 87956 }; 87957 87958 struct crb_priv { 87959 u32 sm; 87960 const char *hid; 87961 struct crb_regs_head *regs_h; 87962 struct crb_regs_tail *regs_t; 87963 u8 *cmd; 87964 u8 *rsp; 87965 u32 cmd_size; 87966 u32 smc_func_id; 87967 }; 87968 87969 struct tpm2_crb_smc { 87970 u32 interrupt; 87971 u8 interrupt_flags; 87972 u8 op_flags; 87973 u16 reserved2; 87974 u32 smc_func_id; 87975 }; 87976 87977 struct vcpu_data; 87978 87979 struct amd_iommu_pi_data { 87980 u32 ga_tag; 87981 u32 prev_ga_tag; 87982 u64 base; 87983 bool is_guest_mode; 87984 struct vcpu_data *vcpu_data; 87985 void *ir_data; 87986 }; 87987 87988 struct vcpu_data { 87989 u64 pi_desc_addr; 87990 u32 vector; 87991 }; 87992 87993 struct amd_iommu_device_info { 87994 int max_pasids; 87995 u32 flags; 87996 }; 87997 87998 struct irq_remap_table { 87999 raw_spinlock_t lock; 88000 unsigned int min_index; 88001 u32 *table; 88002 }; 88003 88004 struct amd_iommu_fault { 88005 u64 address; 88006 u32 pasid; 88007 u16 device_id; 88008 u16 tag; 88009 u16 flags; 88010 }; 88011 88012 struct protection_domain { 88013 struct list_head dev_list; 88014 struct iommu_domain domain; 88015 spinlock_t lock; 88016 u16 id; 88017 atomic64_t pt_root; 88018 int glx; 88019 u64 *gcr3_tbl; 88020 long unsigned int flags; 88021 unsigned int dev_cnt; 88022 unsigned int dev_iommu[32]; 88023 }; 88024 88025 struct domain_pgtable { 88026 int mode; 88027 u64 *root; 88028 }; 88029 88030 struct amd_irte_ops; 88031 88032 struct amd_iommu___2 { 88033 struct list_head list; 88034 int index; 88035 raw_spinlock_t lock; 88036 struct pci_dev *dev; 88037 struct pci_dev *root_pdev; 88038 u64 mmio_phys; 88039 u64 mmio_phys_end; 88040 u8 *mmio_base; 88041 u32 cap; 88042 u8 acpi_flags; 88043 u64 features; 88044 bool is_iommu_v2; 88045 u16 devid; 88046 u16 cap_ptr; 88047 u16 pci_seg; 88048 u64 exclusion_start; 88049 u64 exclusion_length; 88050 u8 *cmd_buf; 88051 u32 cmd_buf_head; 88052 u32 cmd_buf_tail; 88053 u8 *evt_buf; 88054 u8 *ppr_log; 88055 u8 *ga_log; 88056 u8 *ga_log_tail; 88057 bool int_enabled; 88058 bool need_sync; 88059 struct iommu_device iommu; 88060 u32 stored_addr_lo; 88061 u32 stored_addr_hi; 88062 u32 stored_l1[108]; 88063 u32 stored_l2[131]; 88064 u8 max_banks; 88065 u8 max_counters; 88066 struct irq_domain *ir_domain; 88067 struct irq_domain *msi_domain; 88068 struct amd_irte_ops *irte_ops; 88069 u32 flags; 88070 volatile u64 *cmd_sem; 88071 u64 cmd_sem_val; 88072 struct irq_affinity_notify intcapxt_notify; 88073 }; 88074 88075 struct amd_irte_ops { 88076 void (*prepare)(void *, u32, bool, u8, u32, int); 88077 void (*activate)(void *, u16, u16); 88078 void (*deactivate)(void *, u16, u16); 88079 void (*set_affinity)(void *, u16, u16, u8, u32); 88080 void * (*get)(struct irq_remap_table *, int); 88081 void (*set_allocated)(struct irq_remap_table *, int); 88082 bool (*is_allocated)(struct irq_remap_table *, int); 88083 void (*clear_allocated)(struct irq_remap_table *, int); 88084 }; 88085 88086 struct acpihid_map_entry { 88087 struct list_head list; 88088 u8 uid[256]; 88089 u8 hid[9]; 88090 u16 devid; 88091 u16 root_devid; 88092 bool cmd_line; 88093 struct iommu_group *group; 88094 }; 88095 88096 struct devid_map { 88097 struct list_head list; 88098 u8 id; 88099 u16 devid; 88100 bool cmd_line; 88101 }; 88102 88103 struct iommu_dev_data { 88104 spinlock_t lock; 88105 struct list_head list; 88106 struct llist_node dev_data_list; 88107 struct protection_domain *domain; 88108 struct pci_dev *pdev; 88109 u16 devid; 88110 bool iommu_v2; 88111 struct { 88112 bool enabled; 88113 int qdep; 88114 } ats; 88115 bool pri_tlp; 88116 u32 errata; 88117 bool use_vapic; 88118 bool defer_attach; 88119 struct ratelimit_state rs; 88120 }; 88121 88122 struct dev_table_entry { 88123 u64 data[4]; 88124 }; 88125 88126 struct unity_map_entry { 88127 struct list_head list; 88128 u16 devid_start; 88129 u16 devid_end; 88130 u64 address_start; 88131 u64 address_end; 88132 int prot; 88133 }; 88134 88135 enum amd_iommu_intr_mode_type { 88136 AMD_IOMMU_GUEST_IR_LEGACY = 0, 88137 AMD_IOMMU_GUEST_IR_LEGACY_GA = 1, 88138 AMD_IOMMU_GUEST_IR_VAPIC = 2, 88139 }; 88140 88141 union irte { 88142 u32 val; 88143 struct { 88144 u32 valid: 1; 88145 u32 no_fault: 1; 88146 u32 int_type: 3; 88147 u32 rq_eoi: 1; 88148 u32 dm: 1; 88149 u32 rsvd_1: 1; 88150 u32 destination: 8; 88151 u32 vector: 8; 88152 u32 rsvd_2: 8; 88153 } fields; 88154 }; 88155 88156 union irte_ga_lo { 88157 u64 val; 88158 struct { 88159 u64 valid: 1; 88160 u64 no_fault: 1; 88161 u64 int_type: 3; 88162 u64 rq_eoi: 1; 88163 u64 dm: 1; 88164 u64 guest_mode: 1; 88165 u64 destination: 24; 88166 u64 ga_tag: 32; 88167 } fields_remap; 88168 struct { 88169 u64 valid: 1; 88170 u64 no_fault: 1; 88171 u64 ga_log_intr: 1; 88172 u64 rsvd1: 3; 88173 u64 is_run: 1; 88174 u64 guest_mode: 1; 88175 u64 destination: 24; 88176 u64 ga_tag: 32; 88177 } fields_vapic; 88178 }; 88179 88180 union irte_ga_hi { 88181 u64 val; 88182 struct { 88183 u64 vector: 8; 88184 u64 rsvd_1: 4; 88185 u64 ga_root_ptr: 40; 88186 u64 rsvd_2: 4; 88187 u64 destination: 8; 88188 } fields; 88189 }; 88190 88191 struct irte_ga { 88192 union irte_ga_lo lo; 88193 union irte_ga_hi hi; 88194 }; 88195 88196 struct irq_2_irte { 88197 u16 devid; 88198 u16 index; 88199 }; 88200 88201 struct amd_ir_data { 88202 u32 cached_ga_tag; 88203 struct irq_2_irte irq_2_irte; 88204 struct msi_msg msi_entry; 88205 void *entry; 88206 void *ref; 88207 struct irq_cfg *cfg; 88208 int ga_vector; 88209 int ga_root_ptr; 88210 int ga_tag; 88211 }; 88212 88213 struct irq_remap_ops { 88214 int capability; 88215 int (*prepare)(); 88216 int (*enable)(); 88217 void (*disable)(); 88218 int (*reenable)(int); 88219 int (*enable_faulting)(); 88220 }; 88221 88222 struct iommu_cmd { 88223 u32 data[4]; 88224 }; 88225 88226 enum irq_remap_cap { 88227 IRQ_POSTING_CAP = 0, 88228 }; 88229 88230 struct ivhd_header { 88231 u8 type; 88232 u8 flags; 88233 u16 length; 88234 u16 devid; 88235 u16 cap_ptr; 88236 u64 mmio_phys; 88237 u16 pci_seg; 88238 u16 info; 88239 u32 efr_attr; 88240 u64 efr_reg; 88241 u64 res; 88242 }; 88243 88244 struct ivhd_entry { 88245 u8 type; 88246 u16 devid; 88247 u8 flags; 88248 u32 ext; 88249 u32 hidh; 88250 u64 cid; 88251 u8 uidf; 88252 u8 uidl; 88253 u8 uid; 88254 } __attribute__((packed)); 88255 88256 struct ivmd_header { 88257 u8 type; 88258 u8 flags; 88259 u16 length; 88260 u16 devid; 88261 u16 aux; 88262 u64 resv; 88263 u64 range_start; 88264 u64 range_length; 88265 }; 88266 88267 enum iommu_init_state { 88268 IOMMU_START_STATE = 0, 88269 IOMMU_IVRS_DETECTED = 1, 88270 IOMMU_ACPI_FINISHED = 2, 88271 IOMMU_ENABLED = 3, 88272 IOMMU_PCI_INIT = 4, 88273 IOMMU_INTERRUPTS_EN = 5, 88274 IOMMU_DMA_OPS = 6, 88275 IOMMU_INITIALIZED = 7, 88276 IOMMU_NOT_FOUND = 8, 88277 IOMMU_INIT_ERROR = 9, 88278 IOMMU_CMDLINE_DISABLED = 10, 88279 }; 88280 88281 union intcapxt { 88282 u64 capxt; 88283 struct { 88284 u64 reserved_0: 2; 88285 u64 dest_mode_logical: 1; 88286 u64 reserved_1: 5; 88287 u64 destid_0_23: 24; 88288 u64 vector: 8; 88289 u64 reserved_2: 16; 88290 u64 destid_24_31: 8; 88291 }; 88292 }; 88293 88294 struct ivrs_quirk_entry { 88295 u8 id; 88296 u16 devid; 88297 }; 88298 88299 enum { 88300 DELL_INSPIRON_7375 = 0, 88301 DELL_LATITUDE_5495 = 1, 88302 LENOVO_IDEAPAD_330S_15ARR = 2, 88303 }; 88304 88305 struct acpi_table_dmar { 88306 struct acpi_table_header header; 88307 u8 width; 88308 u8 flags; 88309 u8 reserved[10]; 88310 }; 88311 88312 struct acpi_dmar_header { 88313 u16 type; 88314 u16 length; 88315 }; 88316 88317 enum acpi_dmar_type { 88318 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0, 88319 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1, 88320 ACPI_DMAR_TYPE_ROOT_ATS = 2, 88321 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3, 88322 ACPI_DMAR_TYPE_NAMESPACE = 4, 88323 ACPI_DMAR_TYPE_RESERVED = 5, 88324 }; 88325 88326 struct acpi_dmar_device_scope { 88327 u8 entry_type; 88328 u8 length; 88329 u16 reserved; 88330 u8 enumeration_id; 88331 u8 bus; 88332 }; 88333 88334 enum acpi_dmar_scope_type { 88335 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0, 88336 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1, 88337 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2, 88338 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3, 88339 ACPI_DMAR_SCOPE_TYPE_HPET = 4, 88340 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5, 88341 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6, 88342 }; 88343 88344 struct acpi_dmar_pci_path { 88345 u8 device; 88346 u8 function; 88347 }; 88348 88349 struct acpi_dmar_hardware_unit { 88350 struct acpi_dmar_header header; 88351 u8 flags; 88352 u8 reserved; 88353 u16 segment; 88354 u64 address; 88355 }; 88356 88357 struct acpi_dmar_reserved_memory { 88358 struct acpi_dmar_header header; 88359 u16 reserved; 88360 u16 segment; 88361 u64 base_address; 88362 u64 end_address; 88363 }; 88364 88365 struct acpi_dmar_atsr { 88366 struct acpi_dmar_header header; 88367 u8 flags; 88368 u8 reserved; 88369 u16 segment; 88370 }; 88371 88372 struct acpi_dmar_rhsa { 88373 struct acpi_dmar_header header; 88374 u32 reserved; 88375 u64 base_address; 88376 u32 proximity_domain; 88377 } __attribute__((packed)); 88378 88379 struct acpi_dmar_andd { 88380 struct acpi_dmar_header header; 88381 u8 reserved[3]; 88382 u8 device_number; 88383 char device_name[1]; 88384 } __attribute__((packed)); 88385 88386 struct dmar_dev_scope { 88387 struct device *dev; 88388 u8 bus; 88389 u8 devfn; 88390 }; 88391 88392 struct intel_iommu; 88393 88394 struct dmar_drhd_unit { 88395 struct list_head list; 88396 struct acpi_dmar_header *hdr; 88397 u64 reg_base_addr; 88398 struct dmar_dev_scope *devices; 88399 int devices_cnt; 88400 u16 segment; 88401 u8 ignored: 1; 88402 u8 include_all: 1; 88403 u8 gfx_dedicated: 1; 88404 struct intel_iommu *iommu; 88405 }; 88406 88407 struct iommu_flush { 88408 void (*flush_context)(struct intel_iommu *, u16, u16, u8, u64); 88409 void (*flush_iotlb)(struct intel_iommu *, u16, u64, unsigned int, u64); 88410 }; 88411 88412 typedef unsigned int ioasid_t; 88413 88414 typedef ioasid_t (*ioasid_alloc_fn_t)(ioasid_t, ioasid_t, void *); 88415 88416 typedef void (*ioasid_free_fn_t)(ioasid_t, void *); 88417 88418 struct ioasid_allocator_ops { 88419 ioasid_alloc_fn_t alloc; 88420 ioasid_free_fn_t free; 88421 struct list_head list; 88422 void *pdata; 88423 }; 88424 88425 struct dmar_domain; 88426 88427 struct root_entry; 88428 88429 struct page_req_dsc; 88430 88431 struct q_inval; 88432 88433 struct ir_table; 88434 88435 struct intel_iommu { 88436 void *reg; 88437 u64 reg_phys; 88438 u64 reg_size; 88439 u64 cap; 88440 u64 ecap; 88441 u64 vccap; 88442 u32 gcmd; 88443 raw_spinlock_t register_lock; 88444 int seq_id; 88445 int agaw; 88446 int msagaw; 88447 unsigned int irq; 88448 unsigned int pr_irq; 88449 u16 segment; 88450 unsigned char name[13]; 88451 long unsigned int *domain_ids; 88452 struct dmar_domain ***domains; 88453 spinlock_t lock; 88454 struct root_entry *root_entry; 88455 struct iommu_flush flush; 88456 struct page_req_dsc *prq; 88457 unsigned char prq_name[16]; 88458 struct completion prq_complete; 88459 struct ioasid_allocator_ops pasid_allocator; 88460 struct q_inval *qi; 88461 u32 *iommu_state; 88462 struct ir_table *ir_table; 88463 struct irq_domain *ir_domain; 88464 struct irq_domain *ir_msi_domain; 88465 struct iommu_device iommu; 88466 int node; 88467 u32 flags; 88468 struct dmar_drhd_unit *drhd; 88469 }; 88470 88471 struct dmar_pci_path { 88472 u8 bus; 88473 u8 device; 88474 u8 function; 88475 }; 88476 88477 struct dmar_pci_notify_info { 88478 struct pci_dev *dev; 88479 long unsigned int event; 88480 int bus; 88481 u16 seg; 88482 u16 level; 88483 struct dmar_pci_path path[0]; 88484 }; 88485 88486 struct irte___2 { 88487 union { 88488 struct { 88489 __u64 present: 1; 88490 __u64 fpd: 1; 88491 __u64 __res0: 6; 88492 __u64 avail: 4; 88493 __u64 __res1: 3; 88494 __u64 pst: 1; 88495 __u64 vector: 8; 88496 __u64 __res2: 40; 88497 }; 88498 struct { 88499 __u64 r_present: 1; 88500 __u64 r_fpd: 1; 88501 __u64 dst_mode: 1; 88502 __u64 redir_hint: 1; 88503 __u64 trigger_mode: 1; 88504 __u64 dlvry_mode: 3; 88505 __u64 r_avail: 4; 88506 __u64 r_res0: 4; 88507 __u64 r_vector: 8; 88508 __u64 r_res1: 8; 88509 __u64 dest_id: 32; 88510 }; 88511 struct { 88512 __u64 p_present: 1; 88513 __u64 p_fpd: 1; 88514 __u64 p_res0: 6; 88515 __u64 p_avail: 4; 88516 __u64 p_res1: 2; 88517 __u64 p_urgent: 1; 88518 __u64 p_pst: 1; 88519 __u64 p_vector: 8; 88520 __u64 p_res2: 14; 88521 __u64 pda_l: 26; 88522 }; 88523 __u64 low; 88524 }; 88525 union { 88526 struct { 88527 __u64 sid: 16; 88528 __u64 sq: 2; 88529 __u64 svt: 2; 88530 __u64 __res3: 44; 88531 }; 88532 struct { 88533 __u64 p_sid: 16; 88534 __u64 p_sq: 2; 88535 __u64 p_svt: 2; 88536 __u64 p_res3: 12; 88537 __u64 pda_h: 32; 88538 }; 88539 __u64 high; 88540 }; 88541 }; 88542 88543 struct iova { 88544 struct rb_node node; 88545 long unsigned int pfn_hi; 88546 long unsigned int pfn_lo; 88547 }; 88548 88549 struct iova_magazine; 88550 88551 struct iova_cpu_rcache; 88552 88553 struct iova_rcache { 88554 spinlock_t lock; 88555 long unsigned int depot_size; 88556 struct iova_magazine *depot[32]; 88557 struct iova_cpu_rcache *cpu_rcaches; 88558 }; 88559 88560 struct iova_domain; 88561 88562 typedef void (*iova_flush_cb)(struct iova_domain *); 88563 88564 typedef void (*iova_entry_dtor)(long unsigned int); 88565 88566 struct iova_fq; 88567 88568 struct iova_domain { 88569 spinlock_t iova_rbtree_lock; 88570 struct rb_root rbroot; 88571 struct rb_node *cached_node; 88572 struct rb_node *cached32_node; 88573 long unsigned int granule; 88574 long unsigned int start_pfn; 88575 long unsigned int dma_32bit_pfn; 88576 long unsigned int max32_alloc_size; 88577 struct iova_fq *fq; 88578 atomic64_t fq_flush_start_cnt; 88579 atomic64_t fq_flush_finish_cnt; 88580 struct iova anchor; 88581 struct iova_rcache rcaches[6]; 88582 iova_flush_cb flush_cb; 88583 iova_entry_dtor entry_dtor; 88584 struct timer_list fq_timer; 88585 atomic_t fq_timer_on; 88586 }; 88587 88588 struct iova_fq_entry { 88589 long unsigned int iova_pfn; 88590 long unsigned int pages; 88591 long unsigned int data; 88592 u64 counter; 88593 }; 88594 88595 struct iova_fq { 88596 struct iova_fq_entry entries[256]; 88597 unsigned int head; 88598 unsigned int tail; 88599 spinlock_t lock; 88600 }; 88601 88602 enum { 88603 QI_FREE = 0, 88604 QI_IN_USE = 1, 88605 QI_DONE = 2, 88606 QI_ABORT = 3, 88607 }; 88608 88609 struct qi_desc { 88610 u64 qw0; 88611 u64 qw1; 88612 u64 qw2; 88613 u64 qw3; 88614 }; 88615 88616 struct q_inval { 88617 raw_spinlock_t q_lock; 88618 void *desc; 88619 int *desc_status; 88620 int free_head; 88621 int free_tail; 88622 int free_cnt; 88623 }; 88624 88625 struct ir_table { 88626 struct irte___2 *base; 88627 long unsigned int *bitmap; 88628 }; 88629 88630 struct root_entry { 88631 u64 lo; 88632 u64 hi; 88633 }; 88634 88635 struct dma_pte; 88636 88637 struct dmar_domain { 88638 int nid; 88639 unsigned int iommu_refcnt[128]; 88640 u16 iommu_did[128]; 88641 bool has_iotlb_device; 88642 struct list_head devices; 88643 struct list_head subdevices; 88644 struct iova_domain iovad; 88645 struct dma_pte *pgd; 88646 int gaw; 88647 int agaw; 88648 int flags; 88649 int iommu_coherency; 88650 int iommu_snooping; 88651 int iommu_count; 88652 int iommu_superpage; 88653 u64 max_addr; 88654 u32 default_pasid; 88655 struct iommu_domain domain; 88656 }; 88657 88658 struct dma_pte { 88659 u64 val; 88660 }; 88661 88662 typedef int (*dmar_res_handler_t)(struct acpi_dmar_header *, void *); 88663 88664 struct dmar_res_callback { 88665 dmar_res_handler_t cb[5]; 88666 void *arg[5]; 88667 bool ignore_unhandled; 88668 bool print_entry; 88669 }; 88670 88671 enum faulttype { 88672 DMA_REMAP = 0, 88673 INTR_REMAP = 1, 88674 UNKNOWN = 2, 88675 }; 88676 88677 struct ioasid_set { 88678 int dummy; 88679 }; 88680 88681 enum iommu_inv_granularity { 88682 IOMMU_INV_GRANU_DOMAIN = 0, 88683 IOMMU_INV_GRANU_PASID = 1, 88684 IOMMU_INV_GRANU_ADDR = 2, 88685 IOMMU_INV_GRANU_NR = 3, 88686 }; 88687 88688 enum { 88689 SR_DMAR_FECTL_REG = 0, 88690 SR_DMAR_FEDATA_REG = 1, 88691 SR_DMAR_FEADDR_REG = 2, 88692 SR_DMAR_FEUADDR_REG = 3, 88693 MAX_SR_DMAR_REGS = 4, 88694 }; 88695 88696 struct context_entry { 88697 u64 lo; 88698 u64 hi; 88699 }; 88700 88701 struct subdev_domain_info { 88702 struct list_head link_phys; 88703 struct list_head link_domain; 88704 struct device *pdev; 88705 struct dmar_domain *domain; 88706 int users; 88707 }; 88708 88709 struct pasid_table; 88710 88711 struct device_domain_info { 88712 struct list_head link; 88713 struct list_head global; 88714 struct list_head table; 88715 struct list_head subdevices; 88716 u32 segment; 88717 u8 bus; 88718 u8 devfn; 88719 u16 pfsid; 88720 u8 pasid_supported: 3; 88721 u8 pasid_enabled: 1; 88722 u8 pri_supported: 1; 88723 u8 pri_enabled: 1; 88724 u8 ats_supported: 1; 88725 u8 ats_enabled: 1; 88726 u8 auxd_enabled: 1; 88727 u8 ats_qdep; 88728 struct device *dev; 88729 struct intel_iommu *iommu; 88730 struct dmar_domain *domain; 88731 struct pasid_table *pasid_table; 88732 }; 88733 88734 struct pasid_table { 88735 void *table; 88736 int order; 88737 u32 max_pasid; 88738 struct list_head dev; 88739 }; 88740 88741 struct dmar_rmrr_unit { 88742 struct list_head list; 88743 struct acpi_dmar_header *hdr; 88744 u64 base_address; 88745 u64 end_address; 88746 struct dmar_dev_scope *devices; 88747 int devices_cnt; 88748 }; 88749 88750 struct dmar_atsr_unit { 88751 struct list_head list; 88752 struct acpi_dmar_header *hdr; 88753 struct dmar_dev_scope *devices; 88754 int devices_cnt; 88755 u8 include_all: 1; 88756 }; 88757 88758 struct domain_context_mapping_data { 88759 struct dmar_domain *domain; 88760 struct intel_iommu *iommu; 88761 struct pasid_table *table; 88762 }; 88763 88764 struct pasid_dir_entry { 88765 u64 val; 88766 }; 88767 88768 struct pasid_entry { 88769 u64 val[8]; 88770 }; 88771 88772 struct pasid_table_opaque { 88773 struct pasid_table **pasid_table; 88774 int segment; 88775 int bus; 88776 int devfn; 88777 }; 88778 88779 struct trace_event_raw_dma_map { 88780 struct trace_entry ent; 88781 u32 __data_loc_dev_name; 88782 dma_addr_t dev_addr; 88783 phys_addr_t phys_addr; 88784 size_t size; 88785 char __data[0]; 88786 }; 88787 88788 struct trace_event_raw_dma_unmap { 88789 struct trace_entry ent; 88790 u32 __data_loc_dev_name; 88791 dma_addr_t dev_addr; 88792 size_t size; 88793 char __data[0]; 88794 }; 88795 88796 struct trace_event_raw_dma_map_sg { 88797 struct trace_entry ent; 88798 u32 __data_loc_dev_name; 88799 dma_addr_t dev_addr; 88800 phys_addr_t phys_addr; 88801 size_t size; 88802 int index; 88803 int total; 88804 char __data[0]; 88805 }; 88806 88807 struct trace_event_data_offsets_dma_map { 88808 u32 dev_name; 88809 }; 88810 88811 struct trace_event_data_offsets_dma_unmap { 88812 u32 dev_name; 88813 }; 88814 88815 struct trace_event_data_offsets_dma_map_sg { 88816 u32 dev_name; 88817 }; 88818 88819 typedef void (*btf_trace_map_single)(void *, struct device *, dma_addr_t, phys_addr_t, size_t); 88820 88821 typedef void (*btf_trace_bounce_map_single)(void *, struct device *, dma_addr_t, phys_addr_t, size_t); 88822 88823 typedef void (*btf_trace_unmap_single)(void *, struct device *, dma_addr_t, size_t); 88824 88825 typedef void (*btf_trace_unmap_sg)(void *, struct device *, dma_addr_t, size_t); 88826 88827 typedef void (*btf_trace_bounce_unmap_single)(void *, struct device *, dma_addr_t, size_t); 88828 88829 typedef void (*btf_trace_map_sg)(void *, struct device *, int, int, struct scatterlist *); 88830 88831 typedef void (*btf_trace_bounce_map_sg)(void *, struct device *, int, int, struct scatterlist *); 88832 88833 enum iommu_fault_type { 88834 IOMMU_FAULT_DMA_UNRECOV = 1, 88835 IOMMU_FAULT_PAGE_REQ = 2, 88836 }; 88837 88838 struct page_req_dsc { 88839 union { 88840 struct { 88841 u64 type: 8; 88842 u64 pasid_present: 1; 88843 u64 priv_data_present: 1; 88844 u64 rsvd: 6; 88845 u64 rid: 16; 88846 u64 pasid: 20; 88847 u64 exe_req: 1; 88848 u64 pm_req: 1; 88849 u64 rsvd2: 10; 88850 }; 88851 u64 qw_0; 88852 }; 88853 union { 88854 struct { 88855 u64 rd_req: 1; 88856 u64 wr_req: 1; 88857 u64 lpig: 1; 88858 u64 prg_index: 9; 88859 u64 addr: 52; 88860 }; 88861 u64 qw_1; 88862 }; 88863 u64 priv_data[2]; 88864 }; 88865 88866 struct svm_dev_ops; 88867 88868 struct intel_svm_dev { 88869 struct list_head list; 88870 struct callback_head rcu; 88871 struct device *dev; 88872 struct intel_iommu *iommu; 88873 struct svm_dev_ops *ops; 88874 struct iommu_sva sva; 88875 u32 pasid; 88876 int users; 88877 u16 did; 88878 u16 dev_iotlb: 1; 88879 u16 sid; 88880 u16 qdep; 88881 }; 88882 88883 struct svm_dev_ops { 88884 void (*fault_cb)(struct device *, u32, u64, void *, int, int); 88885 }; 88886 88887 struct intel_svm { 88888 struct mmu_notifier notifier; 88889 struct mm_struct *mm; 88890 unsigned int flags; 88891 u32 pasid; 88892 int gpasid; 88893 struct list_head devs; 88894 struct list_head list; 88895 }; 88896 88897 enum irq_mode { 88898 IRQ_REMAPPING = 0, 88899 IRQ_POSTING = 1, 88900 }; 88901 88902 struct ioapic_scope { 88903 struct intel_iommu *iommu; 88904 unsigned int id; 88905 unsigned int bus; 88906 unsigned int devfn; 88907 }; 88908 88909 struct hpet_scope { 88910 struct intel_iommu *iommu; 88911 u8 id; 88912 unsigned int bus; 88913 unsigned int devfn; 88914 }; 88915 88916 struct irq_2_iommu { 88917 struct intel_iommu *iommu; 88918 u16 irte_index; 88919 u16 sub_handle; 88920 u8 irte_mask; 88921 enum irq_mode mode; 88922 }; 88923 88924 struct intel_ir_data { 88925 struct irq_2_iommu irq_2_iommu; 88926 struct irte___2 irte_entry; 88927 union { 88928 struct msi_msg msi_entry; 88929 }; 88930 }; 88931 88932 struct set_msi_sid_data { 88933 struct pci_dev *pdev; 88934 u16 alias; 88935 int count; 88936 int busmatch_count; 88937 }; 88938 88939 struct iommu_group { 88940 struct kobject kobj; 88941 struct kobject *devices_kobj; 88942 struct list_head devices; 88943 struct mutex mutex; 88944 struct blocking_notifier_head notifier; 88945 void *iommu_data; 88946 void (*iommu_data_release)(void *); 88947 char *name; 88948 int id; 88949 struct iommu_domain *default_domain; 88950 struct iommu_domain *domain; 88951 struct list_head entry; 88952 }; 88953 88954 struct fsl_mc_obj_desc { 88955 char type[16]; 88956 int id; 88957 u16 vendor; 88958 u16 ver_major; 88959 u16 ver_minor; 88960 u8 irq_count; 88961 u8 region_count; 88962 u32 state; 88963 char label[16]; 88964 u16 flags; 88965 }; 88966 88967 struct fsl_mc_io; 88968 88969 struct fsl_mc_device_irq; 88970 88971 struct fsl_mc_resource; 88972 88973 struct fsl_mc_device { 88974 struct device dev; 88975 u64 dma_mask; 88976 u16 flags; 88977 u32 icid; 88978 u16 mc_handle; 88979 struct fsl_mc_io *mc_io; 88980 struct fsl_mc_obj_desc obj_desc; 88981 struct resource *regions; 88982 struct fsl_mc_device_irq **irqs; 88983 struct fsl_mc_resource *resource; 88984 struct device_link *consumer_link; 88985 char *driver_override; 88986 }; 88987 88988 enum fsl_mc_pool_type { 88989 FSL_MC_POOL_DPMCP = 0, 88990 FSL_MC_POOL_DPBP = 1, 88991 FSL_MC_POOL_DPCON = 2, 88992 FSL_MC_POOL_IRQ = 3, 88993 FSL_MC_NUM_POOL_TYPES = 4, 88994 }; 88995 88996 struct fsl_mc_resource_pool; 88997 88998 struct fsl_mc_resource { 88999 enum fsl_mc_pool_type type; 89000 s32 id; 89001 void *data; 89002 struct fsl_mc_resource_pool *parent_pool; 89003 struct list_head node; 89004 }; 89005 89006 struct fsl_mc_device_irq { 89007 struct msi_desc *msi_desc; 89008 struct fsl_mc_device *mc_dev; 89009 u8 dev_irq_index; 89010 struct fsl_mc_resource resource; 89011 }; 89012 89013 struct fsl_mc_io { 89014 struct device *dev; 89015 u16 flags; 89016 u32 portal_size; 89017 phys_addr_t portal_phys_addr; 89018 void *portal_virt_addr; 89019 struct fsl_mc_device *dpmcp_dev; 89020 union { 89021 struct mutex mutex; 89022 raw_spinlock_t spinlock; 89023 }; 89024 }; 89025 89026 struct group_device { 89027 struct list_head list; 89028 struct device *dev; 89029 char *name; 89030 }; 89031 89032 struct iommu_group_attribute { 89033 struct attribute attr; 89034 ssize_t (*show)(struct iommu_group *, char *); 89035 ssize_t (*store)(struct iommu_group *, const char *, size_t); 89036 }; 89037 89038 struct group_for_pci_data { 89039 struct pci_dev *pdev; 89040 struct iommu_group *group; 89041 }; 89042 89043 struct __group_domain_type { 89044 struct device *dev; 89045 unsigned int type; 89046 }; 89047 89048 struct trace_event_raw_iommu_group_event { 89049 struct trace_entry ent; 89050 int gid; 89051 u32 __data_loc_device; 89052 char __data[0]; 89053 }; 89054 89055 struct trace_event_raw_iommu_device_event { 89056 struct trace_entry ent; 89057 u32 __data_loc_device; 89058 char __data[0]; 89059 }; 89060 89061 struct trace_event_raw_map { 89062 struct trace_entry ent; 89063 u64 iova; 89064 u64 paddr; 89065 size_t size; 89066 char __data[0]; 89067 }; 89068 89069 struct trace_event_raw_unmap { 89070 struct trace_entry ent; 89071 u64 iova; 89072 size_t size; 89073 size_t unmapped_size; 89074 char __data[0]; 89075 }; 89076 89077 struct trace_event_raw_iommu_error { 89078 struct trace_entry ent; 89079 u32 __data_loc_device; 89080 u32 __data_loc_driver; 89081 u64 iova; 89082 int flags; 89083 char __data[0]; 89084 }; 89085 89086 struct trace_event_data_offsets_iommu_group_event { 89087 u32 device; 89088 }; 89089 89090 struct trace_event_data_offsets_iommu_device_event { 89091 u32 device; 89092 }; 89093 89094 struct trace_event_data_offsets_map {}; 89095 89096 struct trace_event_data_offsets_unmap {}; 89097 89098 struct trace_event_data_offsets_iommu_error { 89099 u32 device; 89100 u32 driver; 89101 }; 89102 89103 typedef void (*btf_trace_add_device_to_group)(void *, int, struct device *); 89104 89105 typedef void (*btf_trace_remove_device_from_group)(void *, int, struct device *); 89106 89107 typedef void (*btf_trace_attach_device_to_domain)(void *, struct device *); 89108 89109 typedef void (*btf_trace_detach_device_from_domain)(void *, struct device *); 89110 89111 typedef void (*btf_trace_map)(void *, long unsigned int, phys_addr_t, size_t); 89112 89113 typedef void (*btf_trace_unmap)(void *, long unsigned int, size_t, size_t); 89114 89115 typedef void (*btf_trace_io_page_fault)(void *, struct device *, long unsigned int, int); 89116 89117 struct iommu_dma_msi_page { 89118 struct list_head list; 89119 dma_addr_t iova; 89120 phys_addr_t phys; 89121 }; 89122 89123 enum iommu_dma_cookie_type { 89124 IOMMU_DMA_IOVA_COOKIE = 0, 89125 IOMMU_DMA_MSI_COOKIE = 1, 89126 }; 89127 89128 struct iommu_dma_cookie { 89129 enum iommu_dma_cookie_type type; 89130 union { 89131 struct iova_domain iovad; 89132 dma_addr_t msi_iova; 89133 }; 89134 struct list_head msi_page_list; 89135 struct iommu_domain *fq_domain; 89136 }; 89137 89138 struct ioasid_data { 89139 ioasid_t id; 89140 struct ioasid_set *set; 89141 void *private; 89142 struct callback_head rcu; 89143 refcount_t refs; 89144 }; 89145 89146 struct ioasid_allocator_data { 89147 struct ioasid_allocator_ops *ops; 89148 struct list_head list; 89149 struct list_head slist; 89150 long unsigned int flags; 89151 struct xarray xa; 89152 struct callback_head rcu; 89153 }; 89154 89155 struct iova_magazine { 89156 long unsigned int size; 89157 long unsigned int pfns[128]; 89158 }; 89159 89160 struct iova_cpu_rcache { 89161 spinlock_t lock; 89162 struct iova_magazine *loaded; 89163 struct iova_magazine *prev; 89164 }; 89165 89166 struct mipi_dsi_msg { 89167 u8 channel; 89168 u8 type; 89169 u16 flags; 89170 size_t tx_len; 89171 const void *tx_buf; 89172 size_t rx_len; 89173 void *rx_buf; 89174 }; 89175 89176 struct mipi_dsi_packet { 89177 size_t size; 89178 u8 header[4]; 89179 size_t payload_length; 89180 const u8 *payload; 89181 }; 89182 89183 struct mipi_dsi_host; 89184 89185 struct mipi_dsi_device; 89186 89187 struct mipi_dsi_host_ops { 89188 int (*attach)(struct mipi_dsi_host *, struct mipi_dsi_device *); 89189 int (*detach)(struct mipi_dsi_host *, struct mipi_dsi_device *); 89190 ssize_t (*transfer)(struct mipi_dsi_host *, const struct mipi_dsi_msg *); 89191 }; 89192 89193 struct mipi_dsi_host { 89194 struct device *dev; 89195 const struct mipi_dsi_host_ops *ops; 89196 struct list_head list; 89197 }; 89198 89199 enum mipi_dsi_pixel_format { 89200 MIPI_DSI_FMT_RGB888 = 0, 89201 MIPI_DSI_FMT_RGB666 = 1, 89202 MIPI_DSI_FMT_RGB666_PACKED = 2, 89203 MIPI_DSI_FMT_RGB565 = 3, 89204 }; 89205 89206 struct mipi_dsi_device { 89207 struct mipi_dsi_host *host; 89208 struct device dev; 89209 char name[20]; 89210 unsigned int channel; 89211 unsigned int lanes; 89212 enum mipi_dsi_pixel_format format; 89213 long unsigned int mode_flags; 89214 long unsigned int hs_rate; 89215 long unsigned int lp_rate; 89216 }; 89217 89218 struct mipi_dsi_device_info { 89219 char type[20]; 89220 u32 channel; 89221 struct device_node *node; 89222 }; 89223 89224 enum mipi_dsi_dcs_tear_mode { 89225 MIPI_DSI_DCS_TEAR_MODE_VBLANK = 0, 89226 MIPI_DSI_DCS_TEAR_MODE_VHBLANK = 1, 89227 }; 89228 89229 struct mipi_dsi_driver { 89230 struct device_driver driver; 89231 int (*probe)(struct mipi_dsi_device *); 89232 int (*remove)(struct mipi_dsi_device *); 89233 void (*shutdown)(struct mipi_dsi_device *); 89234 }; 89235 89236 struct drm_dsc_picture_parameter_set { 89237 u8 dsc_version; 89238 u8 pps_identifier; 89239 u8 pps_reserved; 89240 u8 pps_3; 89241 u8 pps_4; 89242 u8 bits_per_pixel_low; 89243 __be16 pic_height; 89244 __be16 pic_width; 89245 __be16 slice_height; 89246 __be16 slice_width; 89247 __be16 chunk_size; 89248 u8 initial_xmit_delay_high; 89249 u8 initial_xmit_delay_low; 89250 __be16 initial_dec_delay; 89251 u8 pps20_reserved; 89252 u8 initial_scale_value; 89253 __be16 scale_increment_interval; 89254 u8 scale_decrement_interval_high; 89255 u8 scale_decrement_interval_low; 89256 u8 pps26_reserved; 89257 u8 first_line_bpg_offset; 89258 __be16 nfl_bpg_offset; 89259 __be16 slice_bpg_offset; 89260 __be16 initial_offset; 89261 __be16 final_offset; 89262 u8 flatness_min_qp; 89263 u8 flatness_max_qp; 89264 __be16 rc_model_size; 89265 u8 rc_edge_factor; 89266 u8 rc_quant_incr_limit0; 89267 u8 rc_quant_incr_limit1; 89268 u8 rc_tgt_offset; 89269 u8 rc_buf_thresh[14]; 89270 __be16 rc_range_parameters[15]; 89271 u8 native_422_420; 89272 u8 second_line_bpg_offset; 89273 __be16 nsl_bpg_offset; 89274 __be16 second_line_offset_adj; 89275 u32 pps_long_94_reserved; 89276 u32 pps_long_98_reserved; 89277 u32 pps_long_102_reserved; 89278 u32 pps_long_106_reserved; 89279 u32 pps_long_110_reserved; 89280 u32 pps_long_114_reserved; 89281 u32 pps_long_118_reserved; 89282 u32 pps_long_122_reserved; 89283 __be16 pps_short_126_reserved; 89284 } __attribute__((packed)); 89285 89286 enum { 89287 MIPI_DSI_V_SYNC_START = 1, 89288 MIPI_DSI_V_SYNC_END = 17, 89289 MIPI_DSI_H_SYNC_START = 33, 89290 MIPI_DSI_H_SYNC_END = 49, 89291 MIPI_DSI_COMPRESSION_MODE = 7, 89292 MIPI_DSI_END_OF_TRANSMISSION = 8, 89293 MIPI_DSI_COLOR_MODE_OFF = 2, 89294 MIPI_DSI_COLOR_MODE_ON = 18, 89295 MIPI_DSI_SHUTDOWN_PERIPHERAL = 34, 89296 MIPI_DSI_TURN_ON_PERIPHERAL = 50, 89297 MIPI_DSI_GENERIC_SHORT_WRITE_0_PARAM = 3, 89298 MIPI_DSI_GENERIC_SHORT_WRITE_1_PARAM = 19, 89299 MIPI_DSI_GENERIC_SHORT_WRITE_2_PARAM = 35, 89300 MIPI_DSI_GENERIC_READ_REQUEST_0_PARAM = 4, 89301 MIPI_DSI_GENERIC_READ_REQUEST_1_PARAM = 20, 89302 MIPI_DSI_GENERIC_READ_REQUEST_2_PARAM = 36, 89303 MIPI_DSI_DCS_SHORT_WRITE = 5, 89304 MIPI_DSI_DCS_SHORT_WRITE_PARAM = 21, 89305 MIPI_DSI_DCS_READ = 6, 89306 MIPI_DSI_EXECUTE_QUEUE = 22, 89307 MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE = 55, 89308 MIPI_DSI_NULL_PACKET = 9, 89309 MIPI_DSI_BLANKING_PACKET = 25, 89310 MIPI_DSI_GENERIC_LONG_WRITE = 41, 89311 MIPI_DSI_DCS_LONG_WRITE = 57, 89312 MIPI_DSI_PICTURE_PARAMETER_SET = 10, 89313 MIPI_DSI_COMPRESSED_PIXEL_STREAM = 11, 89314 MIPI_DSI_LOOSELY_PACKED_PIXEL_STREAM_YCBCR20 = 12, 89315 MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR24 = 28, 89316 MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16 = 44, 89317 MIPI_DSI_PACKED_PIXEL_STREAM_30 = 13, 89318 MIPI_DSI_PACKED_PIXEL_STREAM_36 = 29, 89319 MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12 = 61, 89320 MIPI_DSI_PACKED_PIXEL_STREAM_16 = 14, 89321 MIPI_DSI_PACKED_PIXEL_STREAM_18 = 30, 89322 MIPI_DSI_PIXEL_STREAM_3BYTE_18 = 46, 89323 MIPI_DSI_PACKED_PIXEL_STREAM_24 = 62, 89324 }; 89325 89326 enum { 89327 MIPI_DCS_NOP = 0, 89328 MIPI_DCS_SOFT_RESET = 1, 89329 MIPI_DCS_GET_COMPRESSION_MODE = 3, 89330 MIPI_DCS_GET_DISPLAY_ID = 4, 89331 MIPI_DCS_GET_ERROR_COUNT_ON_DSI = 5, 89332 MIPI_DCS_GET_RED_CHANNEL = 6, 89333 MIPI_DCS_GET_GREEN_CHANNEL = 7, 89334 MIPI_DCS_GET_BLUE_CHANNEL = 8, 89335 MIPI_DCS_GET_DISPLAY_STATUS = 9, 89336 MIPI_DCS_GET_POWER_MODE = 10, 89337 MIPI_DCS_GET_ADDRESS_MODE = 11, 89338 MIPI_DCS_GET_PIXEL_FORMAT = 12, 89339 MIPI_DCS_GET_DISPLAY_MODE = 13, 89340 MIPI_DCS_GET_SIGNAL_MODE = 14, 89341 MIPI_DCS_GET_DIAGNOSTIC_RESULT = 15, 89342 MIPI_DCS_ENTER_SLEEP_MODE = 16, 89343 MIPI_DCS_EXIT_SLEEP_MODE = 17, 89344 MIPI_DCS_ENTER_PARTIAL_MODE = 18, 89345 MIPI_DCS_ENTER_NORMAL_MODE = 19, 89346 MIPI_DCS_GET_IMAGE_CHECKSUM_RGB = 20, 89347 MIPI_DCS_GET_IMAGE_CHECKSUM_CT = 21, 89348 MIPI_DCS_EXIT_INVERT_MODE = 32, 89349 MIPI_DCS_ENTER_INVERT_MODE = 33, 89350 MIPI_DCS_SET_GAMMA_CURVE = 38, 89351 MIPI_DCS_SET_DISPLAY_OFF = 40, 89352 MIPI_DCS_SET_DISPLAY_ON = 41, 89353 MIPI_DCS_SET_COLUMN_ADDRESS = 42, 89354 MIPI_DCS_SET_PAGE_ADDRESS = 43, 89355 MIPI_DCS_WRITE_MEMORY_START = 44, 89356 MIPI_DCS_WRITE_LUT = 45, 89357 MIPI_DCS_READ_MEMORY_START = 46, 89358 MIPI_DCS_SET_PARTIAL_ROWS = 48, 89359 MIPI_DCS_SET_PARTIAL_COLUMNS = 49, 89360 MIPI_DCS_SET_SCROLL_AREA = 51, 89361 MIPI_DCS_SET_TEAR_OFF = 52, 89362 MIPI_DCS_SET_TEAR_ON = 53, 89363 MIPI_DCS_SET_ADDRESS_MODE = 54, 89364 MIPI_DCS_SET_SCROLL_START = 55, 89365 MIPI_DCS_EXIT_IDLE_MODE = 56, 89366 MIPI_DCS_ENTER_IDLE_MODE = 57, 89367 MIPI_DCS_SET_PIXEL_FORMAT = 58, 89368 MIPI_DCS_WRITE_MEMORY_CONTINUE = 60, 89369 MIPI_DCS_SET_3D_CONTROL = 61, 89370 MIPI_DCS_READ_MEMORY_CONTINUE = 62, 89371 MIPI_DCS_GET_3D_CONTROL = 63, 89372 MIPI_DCS_SET_VSYNC_TIMING = 64, 89373 MIPI_DCS_SET_TEAR_SCANLINE = 68, 89374 MIPI_DCS_GET_SCANLINE = 69, 89375 MIPI_DCS_SET_DISPLAY_BRIGHTNESS = 81, 89376 MIPI_DCS_GET_DISPLAY_BRIGHTNESS = 82, 89377 MIPI_DCS_WRITE_CONTROL_DISPLAY = 83, 89378 MIPI_DCS_GET_CONTROL_DISPLAY = 84, 89379 MIPI_DCS_WRITE_POWER_SAVE = 85, 89380 MIPI_DCS_GET_POWER_SAVE = 86, 89381 MIPI_DCS_SET_CABC_MIN_BRIGHTNESS = 94, 89382 MIPI_DCS_GET_CABC_MIN_BRIGHTNESS = 95, 89383 MIPI_DCS_READ_DDB_START = 161, 89384 MIPI_DCS_READ_PPS_START = 162, 89385 MIPI_DCS_READ_DDB_CONTINUE = 168, 89386 MIPI_DCS_READ_PPS_CONTINUE = 169, 89387 }; 89388 89389 struct drm_dmi_panel_orientation_data { 89390 int width; 89391 int height; 89392 const char * const *bios_dates; 89393 int orientation; 89394 }; 89395 89396 struct vga_device { 89397 struct list_head list; 89398 struct pci_dev *pdev; 89399 unsigned int decodes; 89400 unsigned int owns; 89401 unsigned int locks; 89402 unsigned int io_lock_cnt; 89403 unsigned int mem_lock_cnt; 89404 unsigned int io_norm_cnt; 89405 unsigned int mem_norm_cnt; 89406 bool bridge_has_one_vga; 89407 void *cookie; 89408 void (*irq_set_state)(void *, bool); 89409 unsigned int (*set_vga_decode)(void *, bool); 89410 }; 89411 89412 struct vga_arb_user_card { 89413 struct pci_dev *pdev; 89414 unsigned int mem_cnt; 89415 unsigned int io_cnt; 89416 }; 89417 89418 struct vga_arb_private { 89419 struct list_head list; 89420 struct pci_dev *target; 89421 struct vga_arb_user_card cards[16]; 89422 spinlock_t lock; 89423 }; 89424 89425 enum vga_switcheroo_handler_flags_t { 89426 VGA_SWITCHEROO_CAN_SWITCH_DDC = 1, 89427 VGA_SWITCHEROO_NEEDS_EDP_CONFIG = 2, 89428 }; 89429 89430 enum vga_switcheroo_state { 89431 VGA_SWITCHEROO_OFF = 0, 89432 VGA_SWITCHEROO_ON = 1, 89433 VGA_SWITCHEROO_NOT_FOUND = 2, 89434 }; 89435 89436 enum vga_switcheroo_client_id { 89437 VGA_SWITCHEROO_UNKNOWN_ID = 4096, 89438 VGA_SWITCHEROO_IGD = 0, 89439 VGA_SWITCHEROO_DIS = 1, 89440 VGA_SWITCHEROO_MAX_CLIENTS = 2, 89441 }; 89442 89443 struct vga_switcheroo_handler { 89444 int (*init)(); 89445 int (*switchto)(enum vga_switcheroo_client_id); 89446 int (*switch_ddc)(enum vga_switcheroo_client_id); 89447 int (*power_state)(enum vga_switcheroo_client_id, enum vga_switcheroo_state); 89448 enum vga_switcheroo_client_id (*get_client_id)(struct pci_dev *); 89449 }; 89450 89451 struct vga_switcheroo_client_ops { 89452 void (*set_gpu_state)(struct pci_dev *, enum vga_switcheroo_state); 89453 void (*reprobe)(struct pci_dev *); 89454 bool (*can_switch)(struct pci_dev *); 89455 void (*gpu_bound)(struct pci_dev *, enum vga_switcheroo_client_id); 89456 }; 89457 89458 struct vga_switcheroo_client { 89459 struct pci_dev *pdev; 89460 struct fb_info *fb_info; 89461 enum vga_switcheroo_state pwr_state; 89462 const struct vga_switcheroo_client_ops *ops; 89463 enum vga_switcheroo_client_id id; 89464 bool active; 89465 bool driver_power_control; 89466 struct list_head list; 89467 struct pci_dev *vga_dev; 89468 }; 89469 89470 struct vgasr_priv { 89471 bool active; 89472 bool delayed_switch_active; 89473 enum vga_switcheroo_client_id delayed_client_id; 89474 struct dentry *debugfs_root; 89475 int registered_clients; 89476 struct list_head clients; 89477 const struct vga_switcheroo_handler *handler; 89478 enum vga_switcheroo_handler_flags_t handler_flags; 89479 struct mutex mux_hw_lock; 89480 int old_ddc_owner; 89481 }; 89482 89483 struct cb_id { 89484 __u32 idx; 89485 __u32 val; 89486 }; 89487 89488 struct cn_msg { 89489 struct cb_id id; 89490 __u32 seq; 89491 __u32 ack; 89492 __u16 len; 89493 __u16 flags; 89494 __u8 data[0]; 89495 }; 89496 89497 struct cn_queue_dev { 89498 atomic_t refcnt; 89499 unsigned char name[32]; 89500 struct list_head queue_list; 89501 spinlock_t queue_lock; 89502 struct sock *nls; 89503 }; 89504 89505 struct cn_callback_id { 89506 unsigned char name[32]; 89507 struct cb_id id; 89508 }; 89509 89510 struct cn_callback_entry { 89511 struct list_head callback_entry; 89512 refcount_t refcnt; 89513 struct cn_queue_dev *pdev; 89514 struct cn_callback_id id; 89515 void (*callback)(struct cn_msg *, struct netlink_skb_parms *); 89516 u32 seq; 89517 u32 group; 89518 }; 89519 89520 struct cn_dev { 89521 struct cb_id id; 89522 u32 seq; 89523 u32 groups; 89524 struct sock *nls; 89525 struct cn_queue_dev *cbdev; 89526 }; 89527 89528 enum proc_cn_mcast_op { 89529 PROC_CN_MCAST_LISTEN = 1, 89530 PROC_CN_MCAST_IGNORE = 2, 89531 }; 89532 89533 struct fork_proc_event { 89534 __kernel_pid_t parent_pid; 89535 __kernel_pid_t parent_tgid; 89536 __kernel_pid_t child_pid; 89537 __kernel_pid_t child_tgid; 89538 }; 89539 89540 struct exec_proc_event { 89541 __kernel_pid_t process_pid; 89542 __kernel_pid_t process_tgid; 89543 }; 89544 89545 struct id_proc_event { 89546 __kernel_pid_t process_pid; 89547 __kernel_pid_t process_tgid; 89548 union { 89549 __u32 ruid; 89550 __u32 rgid; 89551 } r; 89552 union { 89553 __u32 euid; 89554 __u32 egid; 89555 } e; 89556 }; 89557 89558 struct sid_proc_event { 89559 __kernel_pid_t process_pid; 89560 __kernel_pid_t process_tgid; 89561 }; 89562 89563 struct ptrace_proc_event { 89564 __kernel_pid_t process_pid; 89565 __kernel_pid_t process_tgid; 89566 __kernel_pid_t tracer_pid; 89567 __kernel_pid_t tracer_tgid; 89568 }; 89569 89570 struct comm_proc_event { 89571 __kernel_pid_t process_pid; 89572 __kernel_pid_t process_tgid; 89573 char comm[16]; 89574 }; 89575 89576 struct coredump_proc_event { 89577 __kernel_pid_t process_pid; 89578 __kernel_pid_t process_tgid; 89579 __kernel_pid_t parent_pid; 89580 __kernel_pid_t parent_tgid; 89581 }; 89582 89583 struct exit_proc_event { 89584 __kernel_pid_t process_pid; 89585 __kernel_pid_t process_tgid; 89586 __u32 exit_code; 89587 __u32 exit_signal; 89588 __kernel_pid_t parent_pid; 89589 __kernel_pid_t parent_tgid; 89590 }; 89591 89592 struct proc_event { 89593 enum what what; 89594 __u32 cpu; 89595 __u64 timestamp_ns; 89596 union { 89597 struct { 89598 __u32 err; 89599 } ack; 89600 struct fork_proc_event fork; 89601 struct exec_proc_event exec; 89602 struct id_proc_event id; 89603 struct sid_proc_event sid; 89604 struct ptrace_proc_event ptrace; 89605 struct comm_proc_event comm; 89606 struct coredump_proc_event coredump; 89607 struct exit_proc_event exit; 89608 } event_data; 89609 }; 89610 89611 struct local_event { 89612 local_lock_t lock; 89613 __u32 count; 89614 }; 89615 89616 struct component_ops { 89617 int (*bind)(struct device *, struct device *, void *); 89618 void (*unbind)(struct device *, struct device *, void *); 89619 }; 89620 89621 struct component_master_ops { 89622 int (*bind)(struct device *); 89623 void (*unbind)(struct device *); 89624 }; 89625 89626 struct component; 89627 89628 struct component_match_array { 89629 void *data; 89630 int (*compare)(struct device *, void *); 89631 int (*compare_typed)(struct device *, int, void *); 89632 void (*release)(struct device *, void *); 89633 struct component *component; 89634 bool duplicate; 89635 }; 89636 89637 struct master; 89638 89639 struct component { 89640 struct list_head node; 89641 struct master *master; 89642 bool bound; 89643 const struct component_ops *ops; 89644 int subcomponent; 89645 struct device *dev; 89646 }; 89647 89648 struct component_match { 89649 size_t alloc; 89650 size_t num; 89651 struct component_match_array *compare; 89652 }; 89653 89654 struct master { 89655 struct list_head node; 89656 bool bound; 89657 const struct component_master_ops *ops; 89658 struct device *dev; 89659 struct component_match *match; 89660 struct dentry *dentry; 89661 }; 89662 89663 struct fwnode_link { 89664 struct fwnode_handle *supplier; 89665 struct list_head s_hook; 89666 struct fwnode_handle *consumer; 89667 struct list_head c_hook; 89668 }; 89669 89670 struct wake_irq { 89671 struct device *dev; 89672 unsigned int status; 89673 int irq; 89674 const char *name; 89675 }; 89676 89677 enum dpm_order { 89678 DPM_ORDER_NONE = 0, 89679 DPM_ORDER_DEV_AFTER_PARENT = 1, 89680 DPM_ORDER_PARENT_BEFORE_DEV = 2, 89681 DPM_ORDER_DEV_LAST = 3, 89682 }; 89683 89684 struct subsys_private { 89685 struct kset subsys; 89686 struct kset *devices_kset; 89687 struct list_head interfaces; 89688 struct mutex mutex; 89689 struct kset *drivers_kset; 89690 struct klist klist_devices; 89691 struct klist klist_drivers; 89692 struct blocking_notifier_head bus_notifier; 89693 unsigned int drivers_autoprobe: 1; 89694 struct bus_type *bus; 89695 struct kset glue_dirs; 89696 struct class *class; 89697 }; 89698 89699 struct driver_private { 89700 struct kobject kobj; 89701 struct klist klist_devices; 89702 struct klist_node knode_bus; 89703 struct module_kobject *mkobj; 89704 struct device_driver *driver; 89705 }; 89706 89707 struct device_private { 89708 struct klist klist_children; 89709 struct klist_node knode_parent; 89710 struct klist_node knode_driver; 89711 struct klist_node knode_bus; 89712 struct klist_node knode_class; 89713 struct list_head deferred_probe; 89714 struct device_driver *async_driver; 89715 char *deferred_probe_reason; 89716 struct device *device; 89717 u8 dead: 1; 89718 }; 89719 89720 union device_attr_group_devres { 89721 const struct attribute_group *group; 89722 const struct attribute_group **groups; 89723 }; 89724 89725 struct class_dir { 89726 struct kobject kobj; 89727 struct class *class; 89728 }; 89729 89730 struct root_device { 89731 struct device dev; 89732 struct module *owner; 89733 }; 89734 89735 struct subsys_dev_iter { 89736 struct klist_iter ki; 89737 const struct device_type *type; 89738 }; 89739 89740 struct device_attach_data { 89741 struct device *dev; 89742 bool check_async; 89743 bool want_async; 89744 bool have_async; 89745 }; 89746 89747 struct class_attribute { 89748 struct attribute attr; 89749 ssize_t (*show)(struct class *, struct class_attribute *, char *); 89750 ssize_t (*store)(struct class *, struct class_attribute *, const char *, size_t); 89751 }; 89752 89753 struct class_attribute_string { 89754 struct class_attribute attr; 89755 char *str; 89756 }; 89757 89758 struct class_compat { 89759 struct kobject *kobj; 89760 }; 89761 89762 struct irq_affinity_devres { 89763 unsigned int count; 89764 unsigned int irq[0]; 89765 }; 89766 89767 struct platform_object { 89768 struct platform_device pdev; 89769 char name[0]; 89770 }; 89771 89772 struct cpu_attr { 89773 struct device_attribute attr; 89774 const struct cpumask * const map; 89775 }; 89776 89777 struct probe { 89778 struct probe *next; 89779 dev_t dev; 89780 long unsigned int range; 89781 struct module *owner; 89782 kobj_probe_t *get; 89783 int (*lock)(dev_t, void *); 89784 void *data; 89785 }; 89786 89787 struct kobj_map___2 { 89788 struct probe *probes[255]; 89789 struct mutex *lock; 89790 }; 89791 89792 struct devres_node { 89793 struct list_head entry; 89794 dr_release_t release; 89795 const char *name; 89796 size_t size; 89797 }; 89798 89799 struct devres___2 { 89800 struct devres_node node; 89801 u8 data[0]; 89802 }; 89803 89804 struct devres_group { 89805 struct devres_node node[2]; 89806 void *id; 89807 int color; 89808 }; 89809 89810 struct action_devres { 89811 void *data; 89812 void (*action)(void *); 89813 }; 89814 89815 struct pages_devres { 89816 long unsigned int addr; 89817 unsigned int order; 89818 }; 89819 89820 struct attribute_container { 89821 struct list_head node; 89822 struct klist containers; 89823 struct class *class; 89824 const struct attribute_group *grp; 89825 struct device_attribute **attrs; 89826 int (*match)(struct attribute_container *, struct device *); 89827 long unsigned int flags; 89828 }; 89829 89830 struct internal_container { 89831 struct klist_node node; 89832 struct attribute_container *cont; 89833 struct device classdev; 89834 }; 89835 89836 struct transport_container; 89837 89838 struct transport_class { 89839 struct class class; 89840 int (*setup)(struct transport_container *, struct device *, struct device *); 89841 int (*configure)(struct transport_container *, struct device *, struct device *); 89842 int (*remove)(struct transport_container *, struct device *, struct device *); 89843 }; 89844 89845 struct transport_container { 89846 struct attribute_container ac; 89847 const struct attribute_group *statistics; 89848 }; 89849 89850 struct anon_transport_class { 89851 struct transport_class tclass; 89852 struct attribute_container container; 89853 }; 89854 89855 typedef void * (*devcon_match_fn_t)(struct fwnode_handle *, const char *, void *); 89856 89857 struct mii_bus; 89858 89859 struct mdio_device { 89860 struct device dev; 89861 struct mii_bus *bus; 89862 char modalias[32]; 89863 int (*bus_match)(struct device *, struct device_driver *); 89864 void (*device_free)(struct mdio_device *); 89865 void (*device_remove)(struct mdio_device *); 89866 int addr; 89867 int flags; 89868 struct gpio_desc___2 *reset_gpio; 89869 struct reset_control___2 *reset_ctrl; 89870 unsigned int reset_assert_delay; 89871 unsigned int reset_deassert_delay; 89872 }; 89873 89874 struct phy_c45_device_ids { 89875 u32 devices_in_package; 89876 u32 mmds_present; 89877 u32 device_ids[32]; 89878 }; 89879 89880 enum phy_state { 89881 PHY_DOWN = 0, 89882 PHY_READY = 1, 89883 PHY_HALTED = 2, 89884 PHY_UP = 3, 89885 PHY_RUNNING = 4, 89886 PHY_NOLINK = 5, 89887 PHY_CABLETEST = 6, 89888 }; 89889 89890 typedef enum { 89891 PHY_INTERFACE_MODE_NA = 0, 89892 PHY_INTERFACE_MODE_INTERNAL = 1, 89893 PHY_INTERFACE_MODE_MII = 2, 89894 PHY_INTERFACE_MODE_GMII = 3, 89895 PHY_INTERFACE_MODE_SGMII = 4, 89896 PHY_INTERFACE_MODE_TBI = 5, 89897 PHY_INTERFACE_MODE_REVMII = 6, 89898 PHY_INTERFACE_MODE_RMII = 7, 89899 PHY_INTERFACE_MODE_RGMII = 8, 89900 PHY_INTERFACE_MODE_RGMII_ID = 9, 89901 PHY_INTERFACE_MODE_RGMII_RXID = 10, 89902 PHY_INTERFACE_MODE_RGMII_TXID = 11, 89903 PHY_INTERFACE_MODE_RTBI = 12, 89904 PHY_INTERFACE_MODE_SMII = 13, 89905 PHY_INTERFACE_MODE_XGMII = 14, 89906 PHY_INTERFACE_MODE_XLGMII = 15, 89907 PHY_INTERFACE_MODE_MOCA = 16, 89908 PHY_INTERFACE_MODE_QSGMII = 17, 89909 PHY_INTERFACE_MODE_TRGMII = 18, 89910 PHY_INTERFACE_MODE_1000BASEX = 19, 89911 PHY_INTERFACE_MODE_2500BASEX = 20, 89912 PHY_INTERFACE_MODE_RXAUI = 21, 89913 PHY_INTERFACE_MODE_XAUI = 22, 89914 PHY_INTERFACE_MODE_10GBASER = 23, 89915 PHY_INTERFACE_MODE_USXGMII = 24, 89916 PHY_INTERFACE_MODE_10GKR = 25, 89917 PHY_INTERFACE_MODE_MAX = 26, 89918 } phy_interface_t; 89919 89920 struct phylink; 89921 89922 struct phy_driver; 89923 89924 struct phy_led_trigger; 89925 89926 struct phy_package_shared; 89927 89928 struct mii_timestamper; 89929 89930 struct phy_device { 89931 struct mdio_device mdio; 89932 struct phy_driver *drv; 89933 u32 phy_id; 89934 struct phy_c45_device_ids c45_ids; 89935 unsigned int is_c45: 1; 89936 unsigned int is_internal: 1; 89937 unsigned int is_pseudo_fixed_link: 1; 89938 unsigned int is_gigabit_capable: 1; 89939 unsigned int has_fixups: 1; 89940 unsigned int suspended: 1; 89941 unsigned int suspended_by_mdio_bus: 1; 89942 unsigned int sysfs_links: 1; 89943 unsigned int loopback_enabled: 1; 89944 unsigned int downshifted_rate: 1; 89945 unsigned int autoneg: 1; 89946 unsigned int link: 1; 89947 unsigned int autoneg_complete: 1; 89948 unsigned int interrupts: 1; 89949 enum phy_state state; 89950 u32 dev_flags; 89951 phy_interface_t interface; 89952 int speed; 89953 int duplex; 89954 int port; 89955 int pause; 89956 int asym_pause; 89957 u8 master_slave_get; 89958 u8 master_slave_set; 89959 u8 master_slave_state; 89960 long unsigned int supported[2]; 89961 long unsigned int advertising[2]; 89962 long unsigned int lp_advertising[2]; 89963 long unsigned int adv_old[2]; 89964 u32 eee_broken_modes; 89965 struct phy_led_trigger *phy_led_triggers; 89966 unsigned int phy_num_led_triggers; 89967 struct phy_led_trigger *last_triggered; 89968 struct phy_led_trigger *led_link_trigger; 89969 int irq; 89970 void *priv; 89971 struct phy_package_shared *shared; 89972 struct sk_buff *skb; 89973 void *ehdr; 89974 struct nlattr *nest; 89975 struct delayed_work state_queue; 89976 struct mutex lock; 89977 bool sfp_bus_attached; 89978 struct sfp_bus *sfp_bus; 89979 struct phylink *phylink; 89980 struct net_device *attached_dev; 89981 struct mii_timestamper *mii_ts; 89982 u8 mdix; 89983 u8 mdix_ctrl; 89984 void (*phy_link_change)(struct phy_device *, bool); 89985 void (*adjust_link)(struct net_device *); 89986 const struct macsec_ops *macsec_ops; 89987 }; 89988 89989 struct phy_tdr_config { 89990 u32 first; 89991 u32 last; 89992 u32 step; 89993 s8 pair; 89994 }; 89995 89996 struct mdio_bus_stats { 89997 u64_stats_t transfers; 89998 u64_stats_t errors; 89999 u64_stats_t writes; 90000 u64_stats_t reads; 90001 struct u64_stats_sync syncp; 90002 }; 90003 90004 struct mii_bus { 90005 struct module *owner; 90006 const char *name; 90007 char id[61]; 90008 void *priv; 90009 int (*read)(struct mii_bus *, int, int); 90010 int (*write)(struct mii_bus *, int, int, u16); 90011 int (*reset)(struct mii_bus *); 90012 struct mdio_bus_stats stats[32]; 90013 struct mutex mdio_lock; 90014 struct device *parent; 90015 enum { 90016 MDIOBUS_ALLOCATED = 1, 90017 MDIOBUS_REGISTERED = 2, 90018 MDIOBUS_UNREGISTERED = 3, 90019 MDIOBUS_RELEASED = 4, 90020 } state; 90021 struct device dev; 90022 struct mdio_device *mdio_map[32]; 90023 u32 phy_mask; 90024 u32 phy_ignore_ta_mask; 90025 int irq[32]; 90026 int reset_delay_us; 90027 int reset_post_delay_us; 90028 struct gpio_desc___2 *reset_gpiod; 90029 enum { 90030 MDIOBUS_NO_CAP = 0, 90031 MDIOBUS_C22 = 1, 90032 MDIOBUS_C45 = 2, 90033 MDIOBUS_C22_C45 = 3, 90034 } probe_capabilities; 90035 struct mutex shared_lock; 90036 struct phy_package_shared *shared[32]; 90037 }; 90038 90039 struct mdio_driver_common { 90040 struct device_driver driver; 90041 int flags; 90042 }; 90043 90044 struct mii_timestamper { 90045 bool (*rxtstamp)(struct mii_timestamper *, struct sk_buff *, int); 90046 void (*txtstamp)(struct mii_timestamper *, struct sk_buff *, int); 90047 int (*hwtstamp)(struct mii_timestamper *, struct ifreq *); 90048 void (*link_state)(struct mii_timestamper *, struct phy_device *); 90049 int (*ts_info)(struct mii_timestamper *, struct ethtool_ts_info *); 90050 struct device *device; 90051 }; 90052 90053 struct phy_package_shared { 90054 int addr; 90055 refcount_t refcnt; 90056 long unsigned int flags; 90057 size_t priv_size; 90058 void *priv; 90059 }; 90060 90061 struct phy_driver { 90062 struct mdio_driver_common mdiodrv; 90063 u32 phy_id; 90064 char *name; 90065 u32 phy_id_mask; 90066 const long unsigned int * const features; 90067 u32 flags; 90068 const void *driver_data; 90069 int (*soft_reset)(struct phy_device *); 90070 int (*config_init)(struct phy_device *); 90071 int (*probe)(struct phy_device *); 90072 int (*get_features)(struct phy_device *); 90073 int (*suspend)(struct phy_device *); 90074 int (*resume)(struct phy_device *); 90075 int (*config_aneg)(struct phy_device *); 90076 int (*aneg_done)(struct phy_device *); 90077 int (*read_status)(struct phy_device *); 90078 int (*config_intr)(struct phy_device *); 90079 irqreturn_t (*handle_interrupt)(struct phy_device *); 90080 void (*remove)(struct phy_device *); 90081 int (*match_phy_device)(struct phy_device *); 90082 int (*set_wol)(struct phy_device *, struct ethtool_wolinfo *); 90083 void (*get_wol)(struct phy_device *, struct ethtool_wolinfo *); 90084 void (*link_change_notify)(struct phy_device *); 90085 int (*read_mmd)(struct phy_device *, int, u16); 90086 int (*write_mmd)(struct phy_device *, int, u16, u16); 90087 int (*read_page)(struct phy_device *); 90088 int (*write_page)(struct phy_device *, int); 90089 int (*module_info)(struct phy_device *, struct ethtool_modinfo *); 90090 int (*module_eeprom)(struct phy_device *, struct ethtool_eeprom *, u8 *); 90091 int (*cable_test_start)(struct phy_device *); 90092 int (*cable_test_tdr_start)(struct phy_device *, const struct phy_tdr_config *); 90093 int (*cable_test_get_status)(struct phy_device *, bool *); 90094 int (*get_sset_count)(struct phy_device *); 90095 void (*get_strings)(struct phy_device *, u8 *); 90096 void (*get_stats)(struct phy_device *, struct ethtool_stats *, u64 *); 90097 int (*get_tunable)(struct phy_device *, struct ethtool_tunable *, void *); 90098 int (*set_tunable)(struct phy_device *, struct ethtool_tunable *, const void *); 90099 int (*set_loopback)(struct phy_device *, bool); 90100 int (*get_sqi)(struct phy_device *); 90101 int (*get_sqi_max)(struct phy_device *); 90102 }; 90103 90104 struct software_node; 90105 90106 struct software_node_ref_args { 90107 const struct software_node *node; 90108 unsigned int nargs; 90109 u64 args[8]; 90110 }; 90111 90112 struct software_node { 90113 const char *name; 90114 const struct software_node *parent; 90115 const struct property_entry *properties; 90116 }; 90117 90118 struct swnode { 90119 int id; 90120 struct kobject kobj; 90121 struct fwnode_handle fwnode; 90122 const struct software_node *node; 90123 struct ida child_ids; 90124 struct list_head entry; 90125 struct list_head children; 90126 struct swnode *parent; 90127 unsigned int allocated: 1; 90128 }; 90129 90130 struct auxiliary_device_id { 90131 char name[32]; 90132 kernel_ulong_t driver_data; 90133 }; 90134 90135 struct auxiliary_device { 90136 struct device dev; 90137 const char *name; 90138 u32 id; 90139 }; 90140 90141 struct auxiliary_driver { 90142 int (*probe)(struct auxiliary_device *, const struct auxiliary_device_id *); 90143 void (*remove)(struct auxiliary_device *); 90144 void (*shutdown)(struct auxiliary_device *); 90145 int (*suspend)(struct auxiliary_device *, pm_message_t); 90146 int (*resume)(struct auxiliary_device *); 90147 const char *name; 90148 struct device_driver driver; 90149 const struct auxiliary_device_id *id_table; 90150 }; 90151 90152 struct req { 90153 struct req *next; 90154 struct completion done; 90155 int err; 90156 const char *name; 90157 umode_t mode; 90158 kuid_t uid; 90159 kgid_t gid; 90160 struct device *dev; 90161 }; 90162 90163 typedef int (*pm_callback_t)(struct device *); 90164 90165 enum gpd_status { 90166 GENPD_STATE_ON = 0, 90167 GENPD_STATE_OFF = 1, 90168 }; 90169 90170 enum genpd_notication { 90171 GENPD_NOTIFY_PRE_OFF = 0, 90172 GENPD_NOTIFY_OFF = 1, 90173 GENPD_NOTIFY_PRE_ON = 2, 90174 GENPD_NOTIFY_ON = 3, 90175 }; 90176 90177 struct dev_power_governor { 90178 bool (*power_down_ok)(struct dev_pm_domain *); 90179 bool (*suspend_ok)(struct device *); 90180 }; 90181 90182 struct gpd_dev_ops { 90183 int (*start)(struct device *); 90184 int (*stop)(struct device *); 90185 }; 90186 90187 struct genpd_power_state { 90188 s64 power_off_latency_ns; 90189 s64 power_on_latency_ns; 90190 s64 residency_ns; 90191 u64 usage; 90192 u64 rejected; 90193 struct fwnode_handle *fwnode; 90194 ktime_t idle_time; 90195 void *data; 90196 }; 90197 90198 struct opp_table; 90199 90200 struct dev_pm_opp; 90201 90202 struct genpd_lock_ops; 90203 90204 struct generic_pm_domain { 90205 struct device dev; 90206 struct dev_pm_domain domain; 90207 struct list_head gpd_list_node; 90208 struct list_head parent_links; 90209 struct list_head child_links; 90210 struct list_head dev_list; 90211 struct dev_power_governor *gov; 90212 struct work_struct power_off_work; 90213 struct fwnode_handle *provider; 90214 bool has_provider; 90215 const char *name; 90216 atomic_t sd_count; 90217 enum gpd_status status; 90218 unsigned int device_count; 90219 unsigned int suspended_count; 90220 unsigned int prepared_count; 90221 unsigned int performance_state; 90222 cpumask_var_t cpus; 90223 int (*power_off)(struct generic_pm_domain *); 90224 int (*power_on)(struct generic_pm_domain *); 90225 struct raw_notifier_head power_notifiers; 90226 struct opp_table *opp_table; 90227 unsigned int (*opp_to_performance_state)(struct generic_pm_domain *, struct dev_pm_opp *); 90228 int (*set_performance_state)(struct generic_pm_domain *, unsigned int); 90229 struct gpd_dev_ops dev_ops; 90230 s64 max_off_time_ns; 90231 bool max_off_time_changed; 90232 bool cached_power_down_ok; 90233 bool cached_power_down_state_idx; 90234 int (*attach_dev)(struct generic_pm_domain *, struct device *); 90235 void (*detach_dev)(struct generic_pm_domain *, struct device *); 90236 unsigned int flags; 90237 struct genpd_power_state *states; 90238 void (*free_states)(struct genpd_power_state *, unsigned int); 90239 unsigned int state_count; 90240 unsigned int state_idx; 90241 ktime_t on_time; 90242 ktime_t accounting_time; 90243 const struct genpd_lock_ops *lock_ops; 90244 union { 90245 struct mutex mlock; 90246 struct { 90247 spinlock_t slock; 90248 long unsigned int lock_flags; 90249 }; 90250 }; 90251 }; 90252 90253 struct genpd_lock_ops { 90254 void (*lock)(struct generic_pm_domain *); 90255 void (*lock_nested)(struct generic_pm_domain *, int); 90256 int (*lock_interruptible)(struct generic_pm_domain *); 90257 void (*unlock)(struct generic_pm_domain *); 90258 }; 90259 90260 struct gpd_link { 90261 struct generic_pm_domain *parent; 90262 struct list_head parent_node; 90263 struct generic_pm_domain *child; 90264 struct list_head child_node; 90265 unsigned int performance_state; 90266 unsigned int prev_performance_state; 90267 }; 90268 90269 struct gpd_timing_data { 90270 s64 suspend_latency_ns; 90271 s64 resume_latency_ns; 90272 s64 effective_constraint_ns; 90273 bool constraint_changed; 90274 bool cached_suspend_ok; 90275 }; 90276 90277 struct generic_pm_domain_data { 90278 struct pm_domain_data base; 90279 struct gpd_timing_data td; 90280 struct notifier_block nb; 90281 struct notifier_block *power_nb; 90282 int cpu; 90283 unsigned int performance_state; 90284 void *data; 90285 }; 90286 90287 struct pm_clk_notifier_block { 90288 struct notifier_block nb; 90289 struct dev_pm_domain *pm_domain; 90290 char *con_ids[0]; 90291 }; 90292 90293 enum pce_status { 90294 PCE_STATUS_NONE = 0, 90295 PCE_STATUS_ACQUIRED = 1, 90296 PCE_STATUS_ENABLED = 2, 90297 PCE_STATUS_ERROR = 3, 90298 }; 90299 90300 struct pm_clock_entry { 90301 struct list_head node; 90302 char *con_id; 90303 struct clk *clk; 90304 enum pce_status status; 90305 }; 90306 90307 struct firmware_fallback_config { 90308 unsigned int force_sysfs_fallback; 90309 unsigned int ignore_sysfs_fallback; 90310 int old_timeout; 90311 int loading_timeout; 90312 }; 90313 90314 enum fw_opt { 90315 FW_OPT_UEVENT = 1, 90316 FW_OPT_NOWAIT = 2, 90317 FW_OPT_USERHELPER = 4, 90318 FW_OPT_NO_WARN = 8, 90319 FW_OPT_NOCACHE = 16, 90320 FW_OPT_NOFALLBACK_SYSFS = 32, 90321 FW_OPT_FALLBACK_PLATFORM = 64, 90322 FW_OPT_PARTIAL = 128, 90323 }; 90324 90325 enum fw_status { 90326 FW_STATUS_UNKNOWN = 0, 90327 FW_STATUS_LOADING = 1, 90328 FW_STATUS_DONE = 2, 90329 FW_STATUS_ABORTED = 3, 90330 }; 90331 90332 struct fw_state { 90333 struct completion completion; 90334 enum fw_status status; 90335 }; 90336 90337 struct firmware_cache; 90338 90339 struct fw_priv { 90340 struct kref ref; 90341 struct list_head list; 90342 struct firmware_cache *fwc; 90343 struct fw_state fw_st; 90344 void *data; 90345 size_t size; 90346 size_t allocated_size; 90347 size_t offset; 90348 u32 opt_flags; 90349 bool is_paged_buf; 90350 struct page **pages; 90351 int nr_pages; 90352 int page_array_size; 90353 bool need_uevent; 90354 struct list_head pending_list; 90355 const char *fw_name; 90356 }; 90357 90358 struct firmware_cache { 90359 spinlock_t lock; 90360 struct list_head head; 90361 int state; 90362 spinlock_t name_lock; 90363 struct list_head fw_names; 90364 struct delayed_work work; 90365 struct notifier_block pm_notify; 90366 }; 90367 90368 struct fw_cache_entry { 90369 struct list_head list; 90370 const char *name; 90371 }; 90372 90373 struct fw_name_devm { 90374 long unsigned int magic; 90375 const char *name; 90376 }; 90377 90378 struct firmware_work { 90379 struct work_struct work; 90380 struct module *module; 90381 const char *name; 90382 struct device *device; 90383 void *context; 90384 void (*cont)(const struct firmware *, void *); 90385 u32 opt_flags; 90386 }; 90387 90388 struct fw_sysfs { 90389 bool nowait; 90390 struct device dev; 90391 struct fw_priv *fw_priv; 90392 struct firmware *fw; 90393 }; 90394 90395 struct node_access_nodes { 90396 struct device dev; 90397 struct list_head list_node; 90398 unsigned int access; 90399 struct node_hmem_attrs hmem_attrs; 90400 }; 90401 90402 struct node_cache_info { 90403 struct device dev; 90404 struct list_head node; 90405 struct node_cache_attrs cache_attrs; 90406 }; 90407 90408 struct node_attr { 90409 struct device_attribute attr; 90410 enum node_states state; 90411 }; 90412 90413 struct for_each_memory_block_cb_data { 90414 walk_memory_blocks_func_t func; 90415 void *arg; 90416 }; 90417 90418 struct reg_sequence { 90419 unsigned int reg; 90420 unsigned int def; 90421 unsigned int delay_us; 90422 }; 90423 90424 typedef int (*regmap_hw_write)(void *, const void *, size_t); 90425 90426 typedef int (*regmap_hw_gather_write)(void *, const void *, size_t, const void *, size_t); 90427 90428 struct regmap_async; 90429 90430 typedef int (*regmap_hw_async_write)(void *, const void *, size_t, const void *, size_t, struct regmap_async *); 90431 90432 struct regmap___2; 90433 90434 struct regmap_async { 90435 struct list_head list; 90436 struct regmap___2 *map; 90437 void *work_buf; 90438 }; 90439 90440 typedef int (*regmap_hw_read)(void *, const void *, size_t, void *, size_t); 90441 90442 typedef int (*regmap_hw_reg_read)(void *, unsigned int, unsigned int *); 90443 90444 typedef int (*regmap_hw_reg_write)(void *, unsigned int, unsigned int); 90445 90446 typedef int (*regmap_hw_reg_update_bits)(void *, unsigned int, unsigned int, unsigned int); 90447 90448 typedef struct regmap_async * (*regmap_hw_async_alloc)(); 90449 90450 typedef void (*regmap_hw_free_context)(void *); 90451 90452 struct regmap_bus { 90453 bool fast_io; 90454 regmap_hw_write write; 90455 regmap_hw_gather_write gather_write; 90456 regmap_hw_async_write async_write; 90457 regmap_hw_reg_write reg_write; 90458 regmap_hw_reg_update_bits reg_update_bits; 90459 regmap_hw_read read; 90460 regmap_hw_reg_read reg_read; 90461 regmap_hw_free_context free_context; 90462 regmap_hw_async_alloc async_alloc; 90463 u8 read_flag_mask; 90464 enum regmap_endian reg_format_endian_default; 90465 enum regmap_endian val_format_endian_default; 90466 size_t max_raw_read; 90467 size_t max_raw_write; 90468 }; 90469 90470 struct reg_field { 90471 unsigned int reg; 90472 unsigned int lsb; 90473 unsigned int msb; 90474 unsigned int id_size; 90475 unsigned int id_offset; 90476 }; 90477 90478 struct regmap_format { 90479 size_t buf_size; 90480 size_t reg_bytes; 90481 size_t pad_bytes; 90482 size_t val_bytes; 90483 void (*format_write)(struct regmap___2 *, unsigned int, unsigned int); 90484 void (*format_reg)(void *, unsigned int, unsigned int); 90485 void (*format_val)(void *, unsigned int, unsigned int); 90486 unsigned int (*parse_val)(const void *); 90487 void (*parse_inplace)(void *); 90488 }; 90489 90490 struct hwspinlock; 90491 90492 struct regcache_ops; 90493 90494 struct regmap___2 { 90495 union { 90496 struct mutex mutex; 90497 struct { 90498 spinlock_t spinlock; 90499 long unsigned int spinlock_flags; 90500 }; 90501 }; 90502 regmap_lock lock; 90503 regmap_unlock unlock; 90504 void *lock_arg; 90505 gfp_t alloc_flags; 90506 struct device *dev; 90507 void *work_buf; 90508 struct regmap_format format; 90509 const struct regmap_bus *bus; 90510 void *bus_context; 90511 const char *name; 90512 bool async; 90513 spinlock_t async_lock; 90514 wait_queue_head_t async_waitq; 90515 struct list_head async_list; 90516 struct list_head async_free; 90517 int async_ret; 90518 bool debugfs_disable; 90519 struct dentry *debugfs; 90520 const char *debugfs_name; 90521 unsigned int debugfs_reg_len; 90522 unsigned int debugfs_val_len; 90523 unsigned int debugfs_tot_len; 90524 struct list_head debugfs_off_cache; 90525 struct mutex cache_lock; 90526 unsigned int max_register; 90527 bool (*writeable_reg)(struct device *, unsigned int); 90528 bool (*readable_reg)(struct device *, unsigned int); 90529 bool (*volatile_reg)(struct device *, unsigned int); 90530 bool (*precious_reg)(struct device *, unsigned int); 90531 bool (*writeable_noinc_reg)(struct device *, unsigned int); 90532 bool (*readable_noinc_reg)(struct device *, unsigned int); 90533 const struct regmap_access_table *wr_table; 90534 const struct regmap_access_table *rd_table; 90535 const struct regmap_access_table *volatile_table; 90536 const struct regmap_access_table *precious_table; 90537 const struct regmap_access_table *wr_noinc_table; 90538 const struct regmap_access_table *rd_noinc_table; 90539 int (*reg_read)(void *, unsigned int, unsigned int *); 90540 int (*reg_write)(void *, unsigned int, unsigned int); 90541 int (*reg_update_bits)(void *, unsigned int, unsigned int, unsigned int); 90542 bool defer_caching; 90543 long unsigned int read_flag_mask; 90544 long unsigned int write_flag_mask; 90545 int reg_shift; 90546 int reg_stride; 90547 int reg_stride_order; 90548 const struct regcache_ops *cache_ops; 90549 enum regcache_type cache_type; 90550 unsigned int cache_size_raw; 90551 unsigned int cache_word_size; 90552 unsigned int num_reg_defaults; 90553 unsigned int num_reg_defaults_raw; 90554 bool cache_only; 90555 bool cache_bypass; 90556 bool cache_free; 90557 struct reg_default *reg_defaults; 90558 const void *reg_defaults_raw; 90559 void *cache; 90560 bool cache_dirty; 90561 bool no_sync_defaults; 90562 struct reg_sequence *patch; 90563 int patch_regs; 90564 bool use_single_read; 90565 bool use_single_write; 90566 bool can_multi_write; 90567 size_t max_raw_read; 90568 size_t max_raw_write; 90569 struct rb_root range_tree; 90570 void *selector_work_buf; 90571 struct hwspinlock *hwlock; 90572 bool can_sleep; 90573 }; 90574 90575 struct regcache_ops { 90576 const char *name; 90577 enum regcache_type type; 90578 int (*init)(struct regmap___2 *); 90579 int (*exit)(struct regmap___2 *); 90580 void (*debugfs_init)(struct regmap___2 *); 90581 int (*read)(struct regmap___2 *, unsigned int, unsigned int *); 90582 int (*write)(struct regmap___2 *, unsigned int, unsigned int); 90583 int (*sync)(struct regmap___2 *, unsigned int, unsigned int); 90584 int (*drop)(struct regmap___2 *, unsigned int, unsigned int); 90585 }; 90586 90587 struct regmap_range_node { 90588 struct rb_node node; 90589 const char *name; 90590 struct regmap___2 *map; 90591 unsigned int range_min; 90592 unsigned int range_max; 90593 unsigned int selector_reg; 90594 unsigned int selector_mask; 90595 int selector_shift; 90596 unsigned int window_start; 90597 unsigned int window_len; 90598 }; 90599 90600 struct regmap_field { 90601 struct regmap___2 *regmap; 90602 unsigned int mask; 90603 unsigned int shift; 90604 unsigned int reg; 90605 unsigned int id_size; 90606 unsigned int id_offset; 90607 }; 90608 90609 struct trace_event_raw_regmap_reg { 90610 struct trace_entry ent; 90611 u32 __data_loc_name; 90612 unsigned int reg; 90613 unsigned int val; 90614 char __data[0]; 90615 }; 90616 90617 struct trace_event_raw_regmap_block { 90618 struct trace_entry ent; 90619 u32 __data_loc_name; 90620 unsigned int reg; 90621 int count; 90622 char __data[0]; 90623 }; 90624 90625 struct trace_event_raw_regcache_sync { 90626 struct trace_entry ent; 90627 u32 __data_loc_name; 90628 u32 __data_loc_status; 90629 u32 __data_loc_type; 90630 char __data[0]; 90631 }; 90632 90633 struct trace_event_raw_regmap_bool { 90634 struct trace_entry ent; 90635 u32 __data_loc_name; 90636 int flag; 90637 char __data[0]; 90638 }; 90639 90640 struct trace_event_raw_regmap_async { 90641 struct trace_entry ent; 90642 u32 __data_loc_name; 90643 char __data[0]; 90644 }; 90645 90646 struct trace_event_raw_regcache_drop_region { 90647 struct trace_entry ent; 90648 u32 __data_loc_name; 90649 unsigned int from; 90650 unsigned int to; 90651 char __data[0]; 90652 }; 90653 90654 struct trace_event_data_offsets_regmap_reg { 90655 u32 name; 90656 }; 90657 90658 struct trace_event_data_offsets_regmap_block { 90659 u32 name; 90660 }; 90661 90662 struct trace_event_data_offsets_regcache_sync { 90663 u32 name; 90664 u32 status; 90665 u32 type; 90666 }; 90667 90668 struct trace_event_data_offsets_regmap_bool { 90669 u32 name; 90670 }; 90671 90672 struct trace_event_data_offsets_regmap_async { 90673 u32 name; 90674 }; 90675 90676 struct trace_event_data_offsets_regcache_drop_region { 90677 u32 name; 90678 }; 90679 90680 typedef void (*btf_trace_regmap_reg_write)(void *, struct regmap___2 *, unsigned int, unsigned int); 90681 90682 typedef void (*btf_trace_regmap_reg_read)(void *, struct regmap___2 *, unsigned int, unsigned int); 90683 90684 typedef void (*btf_trace_regmap_reg_read_cache)(void *, struct regmap___2 *, unsigned int, unsigned int); 90685 90686 typedef void (*btf_trace_regmap_hw_read_start)(void *, struct regmap___2 *, unsigned int, int); 90687 90688 typedef void (*btf_trace_regmap_hw_read_done)(void *, struct regmap___2 *, unsigned int, int); 90689 90690 typedef void (*btf_trace_regmap_hw_write_start)(void *, struct regmap___2 *, unsigned int, int); 90691 90692 typedef void (*btf_trace_regmap_hw_write_done)(void *, struct regmap___2 *, unsigned int, int); 90693 90694 typedef void (*btf_trace_regcache_sync)(void *, struct regmap___2 *, const char *, const char *); 90695 90696 typedef void (*btf_trace_regmap_cache_only)(void *, struct regmap___2 *, bool); 90697 90698 typedef void (*btf_trace_regmap_cache_bypass)(void *, struct regmap___2 *, bool); 90699 90700 typedef void (*btf_trace_regmap_async_write_start)(void *, struct regmap___2 *, unsigned int, int); 90701 90702 typedef void (*btf_trace_regmap_async_io_complete)(void *, struct regmap___2 *); 90703 90704 typedef void (*btf_trace_regmap_async_complete_start)(void *, struct regmap___2 *); 90705 90706 typedef void (*btf_trace_regmap_async_complete_done)(void *, struct regmap___2 *); 90707 90708 typedef void (*btf_trace_regcache_drop_region)(void *, struct regmap___2 *, unsigned int, unsigned int); 90709 90710 struct regcache_rbtree_node { 90711 void *block; 90712 long int *cache_present; 90713 unsigned int base_reg; 90714 unsigned int blklen; 90715 struct rb_node node; 90716 }; 90717 90718 struct regcache_rbtree_ctx { 90719 struct rb_root root; 90720 struct regcache_rbtree_node *cached_rbnode; 90721 }; 90722 90723 struct regmap_debugfs_off_cache { 90724 struct list_head list; 90725 off_t min; 90726 off_t max; 90727 unsigned int base_reg; 90728 unsigned int max_reg; 90729 }; 90730 90731 struct regmap_debugfs_node { 90732 struct regmap___2 *map; 90733 struct list_head link; 90734 }; 90735 90736 struct i2c_msg { 90737 __u16 addr; 90738 __u16 flags; 90739 __u16 len; 90740 __u8 *buf; 90741 }; 90742 90743 union i2c_smbus_data { 90744 __u8 byte; 90745 __u16 word; 90746 __u8 block[34]; 90747 }; 90748 90749 enum i2c_slave_event { 90750 I2C_SLAVE_READ_REQUESTED = 0, 90751 I2C_SLAVE_WRITE_REQUESTED = 1, 90752 I2C_SLAVE_READ_PROCESSED = 2, 90753 I2C_SLAVE_WRITE_RECEIVED = 3, 90754 I2C_SLAVE_STOP = 4, 90755 }; 90756 90757 struct i2c_client; 90758 90759 typedef int (*i2c_slave_cb_t)(struct i2c_client *, enum i2c_slave_event, u8 *); 90760 90761 struct i2c_adapter; 90762 90763 struct i2c_client { 90764 short unsigned int flags; 90765 short unsigned int addr; 90766 char name[20]; 90767 struct i2c_adapter *adapter; 90768 struct device dev; 90769 int init_irq; 90770 int irq; 90771 struct list_head detected; 90772 i2c_slave_cb_t slave_cb; 90773 }; 90774 90775 struct i2c_algorithm; 90776 90777 struct i2c_lock_operations; 90778 90779 struct i2c_bus_recovery_info; 90780 90781 struct i2c_adapter_quirks; 90782 90783 struct i2c_adapter { 90784 struct module *owner; 90785 unsigned int class; 90786 const struct i2c_algorithm *algo; 90787 void *algo_data; 90788 const struct i2c_lock_operations *lock_ops; 90789 struct rt_mutex bus_lock; 90790 struct rt_mutex mux_lock; 90791 int timeout; 90792 int retries; 90793 struct device dev; 90794 long unsigned int locked_flags; 90795 int nr; 90796 char name[48]; 90797 struct completion dev_released; 90798 struct mutex userspace_clients_lock; 90799 struct list_head userspace_clients; 90800 struct i2c_bus_recovery_info *bus_recovery_info; 90801 const struct i2c_adapter_quirks *quirks; 90802 struct irq_domain *host_notify_domain; 90803 }; 90804 90805 struct i2c_algorithm { 90806 int (*master_xfer)(struct i2c_adapter *, struct i2c_msg *, int); 90807 int (*master_xfer_atomic)(struct i2c_adapter *, struct i2c_msg *, int); 90808 int (*smbus_xfer)(struct i2c_adapter *, u16, short unsigned int, char, u8, int, union i2c_smbus_data *); 90809 int (*smbus_xfer_atomic)(struct i2c_adapter *, u16, short unsigned int, char, u8, int, union i2c_smbus_data *); 90810 u32 (*functionality)(struct i2c_adapter *); 90811 int (*reg_slave)(struct i2c_client *); 90812 int (*unreg_slave)(struct i2c_client *); 90813 }; 90814 90815 struct i2c_lock_operations { 90816 void (*lock_bus)(struct i2c_adapter *, unsigned int); 90817 int (*trylock_bus)(struct i2c_adapter *, unsigned int); 90818 void (*unlock_bus)(struct i2c_adapter *, unsigned int); 90819 }; 90820 90821 struct i2c_bus_recovery_info { 90822 int (*recover_bus)(struct i2c_adapter *); 90823 int (*get_scl)(struct i2c_adapter *); 90824 void (*set_scl)(struct i2c_adapter *, int); 90825 int (*get_sda)(struct i2c_adapter *); 90826 void (*set_sda)(struct i2c_adapter *, int); 90827 int (*get_bus_free)(struct i2c_adapter *); 90828 void (*prepare_recovery)(struct i2c_adapter *); 90829 void (*unprepare_recovery)(struct i2c_adapter *); 90830 struct gpio_desc___2 *scl_gpiod; 90831 struct gpio_desc___2 *sda_gpiod; 90832 struct pinctrl *pinctrl; 90833 struct pinctrl_state *pins_default; 90834 struct pinctrl_state *pins_gpio; 90835 }; 90836 90837 struct i2c_adapter_quirks { 90838 u64 flags; 90839 int max_num_msgs; 90840 u16 max_write_len; 90841 u16 max_read_len; 90842 u16 max_comb_1st_msg_len; 90843 u16 max_comb_2nd_msg_len; 90844 }; 90845 90846 struct regmap_mmio_context { 90847 void *regs; 90848 unsigned int val_bytes; 90849 bool relaxed_mmio; 90850 bool attached_clk; 90851 struct clk *clk; 90852 void (*reg_write)(struct regmap_mmio_context *, unsigned int, unsigned int); 90853 unsigned int (*reg_read)(struct regmap_mmio_context *, unsigned int); 90854 }; 90855 90856 struct regmap_irq_chip_data___2 { 90857 struct mutex lock; 90858 struct irq_chip irq_chip; 90859 struct regmap___2 *map; 90860 const struct regmap_irq_chip *chip; 90861 int irq_base; 90862 struct irq_domain *domain; 90863 int irq; 90864 int wake_count; 90865 void *status_reg_buf; 90866 unsigned int *main_status_buf; 90867 unsigned int *status_buf; 90868 unsigned int *mask_buf; 90869 unsigned int *mask_buf_def; 90870 unsigned int *wake_buf; 90871 unsigned int *type_buf; 90872 unsigned int *type_buf_def; 90873 unsigned int irq_reg_stride; 90874 unsigned int type_reg_stride; 90875 bool clear_status: 1; 90876 }; 90877 90878 struct devcd_entry { 90879 struct device devcd_dev; 90880 void *data; 90881 size_t datalen; 90882 struct module *owner; 90883 ssize_t (*read)(char *, loff_t, size_t, void *, size_t); 90884 void (*free)(void *); 90885 struct delayed_work del_wk; 90886 struct device *failing_dev; 90887 }; 90888 90889 typedef void (*irq_write_msi_msg_t)(struct msi_desc *, struct msi_msg *); 90890 90891 struct platform_msi_priv_data { 90892 struct device *dev; 90893 void *host_data; 90894 msi_alloc_info_t arg; 90895 irq_write_msi_msg_t write_msg; 90896 int devid; 90897 }; 90898 90899 struct test_struct { 90900 char *get; 90901 char *put; 90902 void (*get_handler)(char *); 90903 int (*put_handler)(char *, char *); 90904 }; 90905 90906 struct test_state { 90907 char *name; 90908 struct test_struct *tst; 90909 int idx; 90910 int (*run_test)(int, int); 90911 int (*validate_put)(char *); 90912 }; 90913 90914 struct i2c_device_id { 90915 char name[20]; 90916 kernel_ulong_t driver_data; 90917 }; 90918 90919 enum i2c_alert_protocol { 90920 I2C_PROTOCOL_SMBUS_ALERT = 0, 90921 I2C_PROTOCOL_SMBUS_HOST_NOTIFY = 1, 90922 }; 90923 90924 struct i2c_board_info; 90925 90926 struct i2c_driver { 90927 unsigned int class; 90928 int (*probe)(struct i2c_client *, const struct i2c_device_id *); 90929 int (*remove)(struct i2c_client *); 90930 int (*probe_new)(struct i2c_client *); 90931 void (*shutdown)(struct i2c_client *); 90932 void (*alert)(struct i2c_client *, enum i2c_alert_protocol, unsigned int); 90933 int (*command)(struct i2c_client *, unsigned int, void *); 90934 struct device_driver driver; 90935 const struct i2c_device_id *id_table; 90936 int (*detect)(struct i2c_client *, struct i2c_board_info *); 90937 const short unsigned int *address_list; 90938 struct list_head clients; 90939 }; 90940 90941 struct i2c_board_info { 90942 char type[20]; 90943 short unsigned int flags; 90944 short unsigned int addr; 90945 const char *dev_name; 90946 void *platform_data; 90947 struct device_node *of_node; 90948 struct fwnode_handle *fwnode; 90949 const struct property_entry *properties; 90950 const struct resource *resources; 90951 unsigned int num_resources; 90952 int irq; 90953 }; 90954 90955 struct mfd_cell_acpi_match { 90956 const char *pnpid; 90957 const long long unsigned int adr; 90958 }; 90959 90960 struct mfd_of_node_entry { 90961 struct list_head list; 90962 struct device *dev; 90963 struct device_node *np; 90964 }; 90965 90966 enum axp20x_variants { 90967 AXP152_ID = 0, 90968 AXP202_ID = 1, 90969 AXP209_ID = 2, 90970 AXP221_ID = 3, 90971 AXP223_ID = 4, 90972 AXP288_ID = 5, 90973 AXP803_ID = 6, 90974 AXP806_ID = 7, 90975 AXP809_ID = 8, 90976 AXP813_ID = 9, 90977 NR_AXP20X_VARIANTS = 10, 90978 }; 90979 90980 enum { 90981 AXP152_IRQ_LDO0IN_CONNECT = 1, 90982 AXP152_IRQ_LDO0IN_REMOVAL = 2, 90983 AXP152_IRQ_ALDO0IN_CONNECT = 3, 90984 AXP152_IRQ_ALDO0IN_REMOVAL = 4, 90985 AXP152_IRQ_DCDC1_V_LOW = 5, 90986 AXP152_IRQ_DCDC2_V_LOW = 6, 90987 AXP152_IRQ_DCDC3_V_LOW = 7, 90988 AXP152_IRQ_DCDC4_V_LOW = 8, 90989 AXP152_IRQ_PEK_SHORT = 9, 90990 AXP152_IRQ_PEK_LONG = 10, 90991 AXP152_IRQ_TIMER = 11, 90992 AXP152_IRQ_PEK_RIS_EDGE = 12, 90993 AXP152_IRQ_PEK_FAL_EDGE = 13, 90994 AXP152_IRQ_GPIO3_INPUT = 14, 90995 AXP152_IRQ_GPIO2_INPUT = 15, 90996 AXP152_IRQ_GPIO1_INPUT = 16, 90997 AXP152_IRQ_GPIO0_INPUT = 17, 90998 }; 90999 91000 enum { 91001 AXP20X_IRQ_ACIN_OVER_V = 1, 91002 AXP20X_IRQ_ACIN_PLUGIN = 2, 91003 AXP20X_IRQ_ACIN_REMOVAL = 3, 91004 AXP20X_IRQ_VBUS_OVER_V = 4, 91005 AXP20X_IRQ_VBUS_PLUGIN = 5, 91006 AXP20X_IRQ_VBUS_REMOVAL = 6, 91007 AXP20X_IRQ_VBUS_V_LOW = 7, 91008 AXP20X_IRQ_BATT_PLUGIN = 8, 91009 AXP20X_IRQ_BATT_REMOVAL = 9, 91010 AXP20X_IRQ_BATT_ENT_ACT_MODE = 10, 91011 AXP20X_IRQ_BATT_EXIT_ACT_MODE = 11, 91012 AXP20X_IRQ_CHARG = 12, 91013 AXP20X_IRQ_CHARG_DONE = 13, 91014 AXP20X_IRQ_BATT_TEMP_HIGH = 14, 91015 AXP20X_IRQ_BATT_TEMP_LOW = 15, 91016 AXP20X_IRQ_DIE_TEMP_HIGH = 16, 91017 AXP20X_IRQ_CHARG_I_LOW = 17, 91018 AXP20X_IRQ_DCDC1_V_LONG = 18, 91019 AXP20X_IRQ_DCDC2_V_LONG = 19, 91020 AXP20X_IRQ_DCDC3_V_LONG = 20, 91021 AXP20X_IRQ_PEK_SHORT = 22, 91022 AXP20X_IRQ_PEK_LONG = 23, 91023 AXP20X_IRQ_N_OE_PWR_ON = 24, 91024 AXP20X_IRQ_N_OE_PWR_OFF = 25, 91025 AXP20X_IRQ_VBUS_VALID = 26, 91026 AXP20X_IRQ_VBUS_NOT_VALID = 27, 91027 AXP20X_IRQ_VBUS_SESS_VALID = 28, 91028 AXP20X_IRQ_VBUS_SESS_END = 29, 91029 AXP20X_IRQ_LOW_PWR_LVL1 = 30, 91030 AXP20X_IRQ_LOW_PWR_LVL2 = 31, 91031 AXP20X_IRQ_TIMER = 32, 91032 AXP20X_IRQ_PEK_RIS_EDGE = 33, 91033 AXP20X_IRQ_PEK_FAL_EDGE = 34, 91034 AXP20X_IRQ_GPIO3_INPUT = 35, 91035 AXP20X_IRQ_GPIO2_INPUT = 36, 91036 AXP20X_IRQ_GPIO1_INPUT = 37, 91037 AXP20X_IRQ_GPIO0_INPUT = 38, 91038 }; 91039 91040 enum axp22x_irqs { 91041 AXP22X_IRQ_ACIN_OVER_V = 1, 91042 AXP22X_IRQ_ACIN_PLUGIN = 2, 91043 AXP22X_IRQ_ACIN_REMOVAL = 3, 91044 AXP22X_IRQ_VBUS_OVER_V = 4, 91045 AXP22X_IRQ_VBUS_PLUGIN = 5, 91046 AXP22X_IRQ_VBUS_REMOVAL = 6, 91047 AXP22X_IRQ_VBUS_V_LOW = 7, 91048 AXP22X_IRQ_BATT_PLUGIN = 8, 91049 AXP22X_IRQ_BATT_REMOVAL = 9, 91050 AXP22X_IRQ_BATT_ENT_ACT_MODE = 10, 91051 AXP22X_IRQ_BATT_EXIT_ACT_MODE = 11, 91052 AXP22X_IRQ_CHARG = 12, 91053 AXP22X_IRQ_CHARG_DONE = 13, 91054 AXP22X_IRQ_BATT_TEMP_HIGH = 14, 91055 AXP22X_IRQ_BATT_TEMP_LOW = 15, 91056 AXP22X_IRQ_DIE_TEMP_HIGH = 16, 91057 AXP22X_IRQ_PEK_SHORT = 17, 91058 AXP22X_IRQ_PEK_LONG = 18, 91059 AXP22X_IRQ_LOW_PWR_LVL1 = 19, 91060 AXP22X_IRQ_LOW_PWR_LVL2 = 20, 91061 AXP22X_IRQ_TIMER = 21, 91062 AXP22X_IRQ_PEK_RIS_EDGE = 22, 91063 AXP22X_IRQ_PEK_FAL_EDGE = 23, 91064 AXP22X_IRQ_GPIO1_INPUT = 24, 91065 AXP22X_IRQ_GPIO0_INPUT = 25, 91066 }; 91067 91068 enum axp288_irqs { 91069 AXP288_IRQ_VBUS_FALL = 2, 91070 AXP288_IRQ_VBUS_RISE = 3, 91071 AXP288_IRQ_OV = 4, 91072 AXP288_IRQ_FALLING_ALT = 5, 91073 AXP288_IRQ_RISING_ALT = 6, 91074 AXP288_IRQ_OV_ALT = 7, 91075 AXP288_IRQ_DONE = 10, 91076 AXP288_IRQ_CHARGING = 11, 91077 AXP288_IRQ_SAFE_QUIT = 12, 91078 AXP288_IRQ_SAFE_ENTER = 13, 91079 AXP288_IRQ_ABSENT = 14, 91080 AXP288_IRQ_APPEND = 15, 91081 AXP288_IRQ_QWBTU = 16, 91082 AXP288_IRQ_WBTU = 17, 91083 AXP288_IRQ_QWBTO = 18, 91084 AXP288_IRQ_WBTO = 19, 91085 AXP288_IRQ_QCBTU = 20, 91086 AXP288_IRQ_CBTU = 21, 91087 AXP288_IRQ_QCBTO = 22, 91088 AXP288_IRQ_CBTO = 23, 91089 AXP288_IRQ_WL2 = 24, 91090 AXP288_IRQ_WL1 = 25, 91091 AXP288_IRQ_GPADC = 26, 91092 AXP288_IRQ_OT = 31, 91093 AXP288_IRQ_GPIO0 = 32, 91094 AXP288_IRQ_GPIO1 = 33, 91095 AXP288_IRQ_POKO = 34, 91096 AXP288_IRQ_POKL = 35, 91097 AXP288_IRQ_POKS = 36, 91098 AXP288_IRQ_POKN = 37, 91099 AXP288_IRQ_POKP = 38, 91100 AXP288_IRQ_TIMER = 39, 91101 AXP288_IRQ_MV_CHNG = 40, 91102 AXP288_IRQ_BC_USB_CHNG = 41, 91103 }; 91104 91105 enum axp803_irqs { 91106 AXP803_IRQ_ACIN_OVER_V = 1, 91107 AXP803_IRQ_ACIN_PLUGIN = 2, 91108 AXP803_IRQ_ACIN_REMOVAL = 3, 91109 AXP803_IRQ_VBUS_OVER_V = 4, 91110 AXP803_IRQ_VBUS_PLUGIN = 5, 91111 AXP803_IRQ_VBUS_REMOVAL = 6, 91112 AXP803_IRQ_BATT_PLUGIN = 7, 91113 AXP803_IRQ_BATT_REMOVAL = 8, 91114 AXP803_IRQ_BATT_ENT_ACT_MODE = 9, 91115 AXP803_IRQ_BATT_EXIT_ACT_MODE = 10, 91116 AXP803_IRQ_CHARG = 11, 91117 AXP803_IRQ_CHARG_DONE = 12, 91118 AXP803_IRQ_BATT_CHG_TEMP_HIGH = 13, 91119 AXP803_IRQ_BATT_CHG_TEMP_HIGH_END = 14, 91120 AXP803_IRQ_BATT_CHG_TEMP_LOW = 15, 91121 AXP803_IRQ_BATT_CHG_TEMP_LOW_END = 16, 91122 AXP803_IRQ_BATT_ACT_TEMP_HIGH = 17, 91123 AXP803_IRQ_BATT_ACT_TEMP_HIGH_END = 18, 91124 AXP803_IRQ_BATT_ACT_TEMP_LOW = 19, 91125 AXP803_IRQ_BATT_ACT_TEMP_LOW_END = 20, 91126 AXP803_IRQ_DIE_TEMP_HIGH = 21, 91127 AXP803_IRQ_GPADC = 22, 91128 AXP803_IRQ_LOW_PWR_LVL1 = 23, 91129 AXP803_IRQ_LOW_PWR_LVL2 = 24, 91130 AXP803_IRQ_TIMER = 25, 91131 AXP803_IRQ_PEK_RIS_EDGE = 26, 91132 AXP803_IRQ_PEK_FAL_EDGE = 27, 91133 AXP803_IRQ_PEK_SHORT = 28, 91134 AXP803_IRQ_PEK_LONG = 29, 91135 AXP803_IRQ_PEK_OVER_OFF = 30, 91136 AXP803_IRQ_GPIO1_INPUT = 31, 91137 AXP803_IRQ_GPIO0_INPUT = 32, 91138 AXP803_IRQ_BC_USB_CHNG = 33, 91139 AXP803_IRQ_MV_CHNG = 34, 91140 }; 91141 91142 enum axp806_irqs { 91143 AXP806_IRQ_DIE_TEMP_HIGH_LV1 = 0, 91144 AXP806_IRQ_DIE_TEMP_HIGH_LV2 = 1, 91145 AXP806_IRQ_DCDCA_V_LOW = 2, 91146 AXP806_IRQ_DCDCB_V_LOW = 3, 91147 AXP806_IRQ_DCDCC_V_LOW = 4, 91148 AXP806_IRQ_DCDCD_V_LOW = 5, 91149 AXP806_IRQ_DCDCE_V_LOW = 6, 91150 AXP806_IRQ_POK_LONG = 7, 91151 AXP806_IRQ_POK_SHORT = 8, 91152 AXP806_IRQ_WAKEUP = 9, 91153 AXP806_IRQ_POK_FALL = 10, 91154 AXP806_IRQ_POK_RISE = 11, 91155 }; 91156 91157 enum axp809_irqs { 91158 AXP809_IRQ_ACIN_OVER_V = 1, 91159 AXP809_IRQ_ACIN_PLUGIN = 2, 91160 AXP809_IRQ_ACIN_REMOVAL = 3, 91161 AXP809_IRQ_VBUS_OVER_V = 4, 91162 AXP809_IRQ_VBUS_PLUGIN = 5, 91163 AXP809_IRQ_VBUS_REMOVAL = 6, 91164 AXP809_IRQ_VBUS_V_LOW = 7, 91165 AXP809_IRQ_BATT_PLUGIN = 8, 91166 AXP809_IRQ_BATT_REMOVAL = 9, 91167 AXP809_IRQ_BATT_ENT_ACT_MODE = 10, 91168 AXP809_IRQ_BATT_EXIT_ACT_MODE = 11, 91169 AXP809_IRQ_CHARG = 12, 91170 AXP809_IRQ_CHARG_DONE = 13, 91171 AXP809_IRQ_BATT_CHG_TEMP_HIGH = 14, 91172 AXP809_IRQ_BATT_CHG_TEMP_HIGH_END = 15, 91173 AXP809_IRQ_BATT_CHG_TEMP_LOW = 16, 91174 AXP809_IRQ_BATT_CHG_TEMP_LOW_END = 17, 91175 AXP809_IRQ_BATT_ACT_TEMP_HIGH = 18, 91176 AXP809_IRQ_BATT_ACT_TEMP_HIGH_END = 19, 91177 AXP809_IRQ_BATT_ACT_TEMP_LOW = 20, 91178 AXP809_IRQ_BATT_ACT_TEMP_LOW_END = 21, 91179 AXP809_IRQ_DIE_TEMP_HIGH = 22, 91180 AXP809_IRQ_LOW_PWR_LVL1 = 23, 91181 AXP809_IRQ_LOW_PWR_LVL2 = 24, 91182 AXP809_IRQ_TIMER = 25, 91183 AXP809_IRQ_PEK_RIS_EDGE = 26, 91184 AXP809_IRQ_PEK_FAL_EDGE = 27, 91185 AXP809_IRQ_PEK_SHORT = 28, 91186 AXP809_IRQ_PEK_LONG = 29, 91187 AXP809_IRQ_PEK_OVER_OFF = 30, 91188 AXP809_IRQ_GPIO1_INPUT = 31, 91189 AXP809_IRQ_GPIO0_INPUT = 32, 91190 }; 91191 91192 struct intel_lpss_platform_info { 91193 struct resource *mem; 91194 int irq; 91195 long unsigned int clk_rate; 91196 const char *clk_con_id; 91197 struct property_entry *properties; 91198 }; 91199 91200 enum intel_lpss_dev_type { 91201 LPSS_DEV_I2C = 0, 91202 LPSS_DEV_UART = 1, 91203 LPSS_DEV_SPI = 2, 91204 }; 91205 91206 struct intel_lpss { 91207 const struct intel_lpss_platform_info *info; 91208 enum intel_lpss_dev_type type; 91209 struct clk *clk; 91210 struct clk_lookup *clock; 91211 struct mfd_cell *cell; 91212 struct device *dev; 91213 void *priv; 91214 u32 priv_ctx[64]; 91215 int devid; 91216 u32 caps; 91217 u32 active_ltr; 91218 u32 idle_ltr; 91219 struct dentry *debugfs; 91220 }; 91221 91222 struct intel_msic_ocd_pdata { 91223 unsigned int gpio; 91224 }; 91225 91226 struct intel_msic_platform_data { 91227 int irq[9]; 91228 struct intel_msic_gpio_pdata *gpio; 91229 struct intel_msic_ocd_pdata *ocd; 91230 }; 91231 91232 struct intel_msic___2 { 91233 struct platform_device *pdev; 91234 unsigned int vendor; 91235 unsigned int version; 91236 void *irq_base; 91237 }; 91238 91239 struct syscon_platform_data { 91240 const char *label; 91241 }; 91242 91243 struct syscon { 91244 struct device_node *np; 91245 struct regmap *regmap; 91246 struct list_head list; 91247 }; 91248 91249 struct intel_soc_pmic_config { 91250 long unsigned int irq_flags; 91251 struct mfd_cell *cell_dev; 91252 int n_cell_devs; 91253 const struct regmap_config *regmap_config; 91254 const struct regmap_irq_chip *irq_chip; 91255 }; 91256 91257 enum { 91258 CHT_WC_PWRSRC_IRQ = 0, 91259 CHT_WC_THRM_IRQ = 1, 91260 CHT_WC_BCU_IRQ = 2, 91261 CHT_WC_ADC_IRQ = 3, 91262 CHT_WC_EXT_CHGR_IRQ = 4, 91263 CHT_WC_GPIO_IRQ = 5, 91264 CHT_WC_CRIT_IRQ = 7, 91265 }; 91266 91267 struct dax_operations { 91268 long int (*direct_access)(struct dax_device *, long unsigned int, long int, void **, pfn_t *); 91269 bool (*dax_supported)(struct dax_device *, struct block_device *, int, sector_t, sector_t); 91270 size_t (*copy_from_iter)(struct dax_device *, long unsigned int, void *, size_t, struct iov_iter *); 91271 size_t (*copy_to_iter)(struct dax_device *, long unsigned int, void *, size_t, struct iov_iter *); 91272 int (*zero_page_range)(struct dax_device *, long unsigned int, size_t); 91273 }; 91274 91275 struct dax_device { 91276 struct hlist_node list; 91277 struct inode inode; 91278 struct cdev cdev; 91279 const char *host; 91280 void *private; 91281 long unsigned int flags; 91282 const struct dax_operations *ops; 91283 }; 91284 91285 enum dax_device_flags { 91286 DAXDEV_ALIVE = 0, 91287 DAXDEV_WRITE_CACHE = 1, 91288 DAXDEV_SYNC = 2, 91289 }; 91290 91291 struct dax_region { 91292 int id; 91293 int target_node; 91294 struct kref kref; 91295 struct device *dev; 91296 unsigned int align; 91297 struct ida ida; 91298 struct resource res; 91299 struct device *seed; 91300 struct device *youngest; 91301 }; 91302 91303 struct dax_mapping { 91304 struct device dev; 91305 int range_id; 91306 int id; 91307 }; 91308 91309 struct dev_dax_range { 91310 long unsigned int pgoff; 91311 struct range range; 91312 struct dax_mapping *mapping; 91313 }; 91314 91315 struct dev_dax { 91316 struct dax_region *region; 91317 struct dax_device *dax_dev; 91318 unsigned int align; 91319 int target_node; 91320 int id; 91321 struct ida ida; 91322 struct device dev; 91323 struct dev_pagemap *pgmap; 91324 int nr_range; 91325 struct dev_dax_range *ranges; 91326 }; 91327 91328 enum dev_dax_subsys { 91329 DEV_DAX_BUS = 0, 91330 DEV_DAX_CLASS = 1, 91331 }; 91332 91333 struct dev_dax_data { 91334 struct dax_region *dax_region; 91335 struct dev_pagemap *pgmap; 91336 enum dev_dax_subsys subsys; 91337 resource_size_t size; 91338 int id; 91339 }; 91340 91341 struct dax_device_driver { 91342 struct device_driver drv; 91343 struct list_head ids; 91344 int match_always; 91345 int (*probe)(struct dev_dax *); 91346 int (*remove)(struct dev_dax *); 91347 }; 91348 91349 struct dax_id { 91350 struct list_head list; 91351 char dev_name[30]; 91352 }; 91353 91354 enum id_action { 91355 ID_REMOVE = 0, 91356 ID_ADD = 1, 91357 }; 91358 91359 struct memregion_info { 91360 int target_node; 91361 }; 91362 91363 struct seqcount_ww_mutex { 91364 seqcount_t seqcount; 91365 }; 91366 91367 typedef struct seqcount_ww_mutex seqcount_ww_mutex_t; 91368 91369 struct dma_buf_map { 91370 union { 91371 void *vaddr_iomem; 91372 void *vaddr; 91373 }; 91374 bool is_iomem; 91375 }; 91376 91377 struct dma_fence_ops; 91378 91379 struct dma_fence { 91380 spinlock_t *lock; 91381 const struct dma_fence_ops *ops; 91382 union { 91383 struct list_head cb_list; 91384 ktime_t timestamp; 91385 struct callback_head rcu; 91386 }; 91387 u64 context; 91388 u64 seqno; 91389 long unsigned int flags; 91390 struct kref refcount; 91391 int error; 91392 }; 91393 91394 struct dma_fence_ops { 91395 bool use_64bit_seqno; 91396 const char * (*get_driver_name)(struct dma_fence *); 91397 const char * (*get_timeline_name)(struct dma_fence *); 91398 bool (*enable_signaling)(struct dma_fence *); 91399 bool (*signaled)(struct dma_fence *); 91400 long int (*wait)(struct dma_fence *, bool, long int); 91401 void (*release)(struct dma_fence *); 91402 void (*fence_value_str)(struct dma_fence *, char *, int); 91403 void (*timeline_value_str)(struct dma_fence *, char *, int); 91404 }; 91405 91406 enum dma_fence_flag_bits { 91407 DMA_FENCE_FLAG_SIGNALED_BIT = 0, 91408 DMA_FENCE_FLAG_TIMESTAMP_BIT = 1, 91409 DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT = 2, 91410 DMA_FENCE_FLAG_USER_BITS = 3, 91411 }; 91412 91413 struct dma_fence_cb; 91414 91415 typedef void (*dma_fence_func_t)(struct dma_fence *, struct dma_fence_cb *); 91416 91417 struct dma_fence_cb { 91418 struct list_head node; 91419 dma_fence_func_t func; 91420 }; 91421 91422 struct dma_buf; 91423 91424 struct dma_buf_attachment; 91425 91426 struct dma_buf_ops { 91427 bool cache_sgt_mapping; 91428 int (*attach)(struct dma_buf *, struct dma_buf_attachment *); 91429 void (*detach)(struct dma_buf *, struct dma_buf_attachment *); 91430 int (*pin)(struct dma_buf_attachment *); 91431 void (*unpin)(struct dma_buf_attachment *); 91432 struct sg_table * (*map_dma_buf)(struct dma_buf_attachment *, enum dma_data_direction); 91433 void (*unmap_dma_buf)(struct dma_buf_attachment *, struct sg_table *, enum dma_data_direction); 91434 void (*release)(struct dma_buf *); 91435 int (*begin_cpu_access)(struct dma_buf *, enum dma_data_direction); 91436 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); 91437 int (*mmap)(struct dma_buf *, struct vm_area_struct *); 91438 int (*vmap)(struct dma_buf *, struct dma_buf_map *); 91439 void (*vunmap)(struct dma_buf *, struct dma_buf_map *); 91440 }; 91441 91442 struct dma_buf_poll_cb_t { 91443 struct dma_fence_cb cb; 91444 wait_queue_head_t *poll; 91445 __poll_t active; 91446 }; 91447 91448 struct dma_resv; 91449 91450 struct dma_buf { 91451 size_t size; 91452 struct file *file; 91453 struct list_head attachments; 91454 const struct dma_buf_ops *ops; 91455 struct mutex lock; 91456 unsigned int vmapping_counter; 91457 struct dma_buf_map vmap_ptr; 91458 const char *exp_name; 91459 const char *name; 91460 spinlock_t name_lock; 91461 struct module *owner; 91462 struct list_head list_node; 91463 void *priv; 91464 struct dma_resv *resv; 91465 wait_queue_head_t poll; 91466 struct dma_buf_poll_cb_t cb_excl; 91467 struct dma_buf_poll_cb_t cb_shared; 91468 }; 91469 91470 struct dma_buf_attach_ops; 91471 91472 struct dma_buf_attachment { 91473 struct dma_buf *dmabuf; 91474 struct device *dev; 91475 struct list_head node; 91476 struct sg_table *sgt; 91477 enum dma_data_direction dir; 91478 bool peer2peer; 91479 const struct dma_buf_attach_ops *importer_ops; 91480 void *importer_priv; 91481 void *priv; 91482 }; 91483 91484 struct dma_resv_list; 91485 91486 struct dma_resv { 91487 struct ww_mutex lock; 91488 seqcount_ww_mutex_t seq; 91489 struct dma_fence *fence_excl; 91490 struct dma_resv_list *fence; 91491 }; 91492 91493 struct dma_buf_attach_ops { 91494 bool allow_peer2peer; 91495 void (*move_notify)(struct dma_buf_attachment *); 91496 }; 91497 91498 struct dma_buf_export_info { 91499 const char *exp_name; 91500 struct module *owner; 91501 const struct dma_buf_ops *ops; 91502 size_t size; 91503 int flags; 91504 struct dma_resv *resv; 91505 void *priv; 91506 }; 91507 91508 struct dma_resv_list { 91509 struct callback_head rcu; 91510 u32 shared_count; 91511 u32 shared_max; 91512 struct dma_fence *shared[0]; 91513 }; 91514 91515 struct dma_buf_sync { 91516 __u64 flags; 91517 }; 91518 91519 struct dma_buf_list { 91520 struct list_head head; 91521 struct mutex lock; 91522 }; 91523 91524 struct trace_event_raw_dma_fence { 91525 struct trace_entry ent; 91526 u32 __data_loc_driver; 91527 u32 __data_loc_timeline; 91528 unsigned int context; 91529 unsigned int seqno; 91530 char __data[0]; 91531 }; 91532 91533 struct trace_event_data_offsets_dma_fence { 91534 u32 driver; 91535 u32 timeline; 91536 }; 91537 91538 typedef void (*btf_trace_dma_fence_emit)(void *, struct dma_fence *); 91539 91540 typedef void (*btf_trace_dma_fence_init)(void *, struct dma_fence *); 91541 91542 typedef void (*btf_trace_dma_fence_destroy)(void *, struct dma_fence *); 91543 91544 typedef void (*btf_trace_dma_fence_enable_signal)(void *, struct dma_fence *); 91545 91546 typedef void (*btf_trace_dma_fence_signaled)(void *, struct dma_fence *); 91547 91548 typedef void (*btf_trace_dma_fence_wait_start)(void *, struct dma_fence *); 91549 91550 typedef void (*btf_trace_dma_fence_wait_end)(void *, struct dma_fence *); 91551 91552 struct default_wait_cb { 91553 struct dma_fence_cb base; 91554 struct task_struct *task; 91555 }; 91556 91557 struct dma_fence_array; 91558 91559 struct dma_fence_array_cb { 91560 struct dma_fence_cb cb; 91561 struct dma_fence_array *array; 91562 }; 91563 91564 struct dma_fence_array { 91565 struct dma_fence base; 91566 spinlock_t lock; 91567 unsigned int num_fences; 91568 atomic_t num_pending; 91569 struct dma_fence **fences; 91570 struct irq_work work; 91571 }; 91572 91573 struct dma_fence_chain { 91574 struct dma_fence base; 91575 spinlock_t lock; 91576 struct dma_fence *prev; 91577 u64 prev_seqno; 91578 struct dma_fence *fence; 91579 struct dma_fence_cb cb; 91580 struct irq_work work; 91581 }; 91582 91583 enum seqno_fence_condition { 91584 SEQNO_FENCE_WAIT_GEQUAL = 0, 91585 SEQNO_FENCE_WAIT_NONZERO = 1, 91586 }; 91587 91588 struct seqno_fence { 91589 struct dma_fence base; 91590 const struct dma_fence_ops *ops; 91591 struct dma_buf *sync_buf; 91592 uint32_t seqno_ofs; 91593 enum seqno_fence_condition condition; 91594 }; 91595 91596 struct dma_heap; 91597 91598 struct dma_heap_ops { 91599 int (*allocate)(struct dma_heap *, long unsigned int, long unsigned int, long unsigned int); 91600 }; 91601 91602 struct dma_heap { 91603 const char *name; 91604 const struct dma_heap_ops *ops; 91605 void *priv; 91606 dev_t heap_devt; 91607 struct list_head list; 91608 struct cdev heap_cdev; 91609 }; 91610 91611 struct dma_heap_export_info { 91612 const char *name; 91613 const struct dma_heap_ops *ops; 91614 void *priv; 91615 }; 91616 91617 struct dma_heap_allocation_data { 91618 __u64 len; 91619 __u32 fd; 91620 __u32 fd_flags; 91621 __u64 heap_flags; 91622 }; 91623 91624 struct system_heap_buffer { 91625 struct dma_heap *heap; 91626 struct list_head attachments; 91627 struct mutex lock; 91628 long unsigned int len; 91629 struct sg_table sg_table; 91630 int vmap_cnt; 91631 void *vaddr; 91632 }; 91633 91634 struct dma_heap_attachment { 91635 struct device *dev; 91636 struct sg_table *table; 91637 struct list_head list; 91638 bool mapped; 91639 }; 91640 91641 struct cma_heap { 91642 struct dma_heap *heap; 91643 struct cma *cma; 91644 }; 91645 91646 struct cma_heap_buffer { 91647 struct cma_heap *heap; 91648 struct list_head attachments; 91649 struct mutex lock; 91650 long unsigned int len; 91651 struct page *cma_pages; 91652 struct page **pages; 91653 long unsigned int pagecount; 91654 int vmap_cnt; 91655 void *vaddr; 91656 }; 91657 91658 struct dma_heap_attachment___2 { 91659 struct device *dev; 91660 struct sg_table table; 91661 struct list_head list; 91662 bool mapped; 91663 }; 91664 91665 struct sync_file { 91666 struct file *file; 91667 char user_name[32]; 91668 struct list_head sync_file_list; 91669 wait_queue_head_t wq; 91670 long unsigned int flags; 91671 struct dma_fence *fence; 91672 struct dma_fence_cb cb; 91673 }; 91674 91675 struct sync_merge_data { 91676 char name[32]; 91677 __s32 fd2; 91678 __s32 fence; 91679 __u32 flags; 91680 __u32 pad; 91681 }; 91682 91683 struct sync_fence_info { 91684 char obj_name[32]; 91685 char driver_name[32]; 91686 __s32 status; 91687 __u32 flags; 91688 __u64 timestamp_ns; 91689 }; 91690 91691 struct sync_file_info { 91692 char name[32]; 91693 __s32 status; 91694 __u32 flags; 91695 __u32 num_fences; 91696 __u32 pad; 91697 __u64 sync_fence_info; 91698 }; 91699 91700 struct udmabuf_create { 91701 __u32 memfd; 91702 __u32 flags; 91703 __u64 offset; 91704 __u64 size; 91705 }; 91706 91707 struct udmabuf_create_item { 91708 __u32 memfd; 91709 __u32 __pad; 91710 __u64 offset; 91711 __u64 size; 91712 }; 91713 91714 struct udmabuf_create_list { 91715 __u32 flags; 91716 __u32 count; 91717 struct udmabuf_create_item list[0]; 91718 }; 91719 91720 struct udmabuf { 91721 long unsigned int pagecount; 91722 struct page **pages; 91723 struct sg_table *sg; 91724 struct miscdevice *device; 91725 }; 91726 91727 typedef __u64 blist_flags_t; 91728 91729 enum scsi_device_state { 91730 SDEV_CREATED = 1, 91731 SDEV_RUNNING = 2, 91732 SDEV_CANCEL = 3, 91733 SDEV_DEL = 4, 91734 SDEV_QUIESCE = 5, 91735 SDEV_OFFLINE = 6, 91736 SDEV_TRANSPORT_OFFLINE = 7, 91737 SDEV_BLOCK = 8, 91738 SDEV_CREATED_BLOCK = 9, 91739 }; 91740 91741 struct scsi_vpd { 91742 struct callback_head rcu; 91743 int len; 91744 unsigned char data[0]; 91745 }; 91746 91747 struct Scsi_Host; 91748 91749 struct scsi_target; 91750 91751 struct scsi_device_handler; 91752 91753 struct scsi_device { 91754 struct Scsi_Host *host; 91755 struct request_queue *request_queue; 91756 struct list_head siblings; 91757 struct list_head same_target_siblings; 91758 atomic_t device_busy; 91759 atomic_t device_blocked; 91760 atomic_t restarts; 91761 spinlock_t list_lock; 91762 struct list_head starved_entry; 91763 short unsigned int queue_depth; 91764 short unsigned int max_queue_depth; 91765 short unsigned int last_queue_full_depth; 91766 short unsigned int last_queue_full_count; 91767 long unsigned int last_queue_full_time; 91768 long unsigned int queue_ramp_up_period; 91769 long unsigned int last_queue_ramp_up; 91770 unsigned int id; 91771 unsigned int channel; 91772 u64 lun; 91773 unsigned int manufacturer; 91774 unsigned int sector_size; 91775 void *hostdata; 91776 unsigned char type; 91777 char scsi_level; 91778 char inq_periph_qual; 91779 struct mutex inquiry_mutex; 91780 unsigned char inquiry_len; 91781 unsigned char *inquiry; 91782 const char *vendor; 91783 const char *model; 91784 const char *rev; 91785 struct scsi_vpd *vpd_pg0; 91786 struct scsi_vpd *vpd_pg83; 91787 struct scsi_vpd *vpd_pg80; 91788 struct scsi_vpd *vpd_pg89; 91789 unsigned char current_tag; 91790 struct scsi_target *sdev_target; 91791 blist_flags_t sdev_bflags; 91792 unsigned int eh_timeout; 91793 unsigned int removable: 1; 91794 unsigned int changed: 1; 91795 unsigned int busy: 1; 91796 unsigned int lockable: 1; 91797 unsigned int locked: 1; 91798 unsigned int borken: 1; 91799 unsigned int disconnect: 1; 91800 unsigned int soft_reset: 1; 91801 unsigned int sdtr: 1; 91802 unsigned int wdtr: 1; 91803 unsigned int ppr: 1; 91804 unsigned int tagged_supported: 1; 91805 unsigned int simple_tags: 1; 91806 unsigned int was_reset: 1; 91807 unsigned int expecting_cc_ua: 1; 91808 unsigned int use_10_for_rw: 1; 91809 unsigned int use_10_for_ms: 1; 91810 unsigned int set_dbd_for_ms: 1; 91811 unsigned int no_report_opcodes: 1; 91812 unsigned int no_write_same: 1; 91813 unsigned int use_16_for_rw: 1; 91814 unsigned int skip_ms_page_8: 1; 91815 unsigned int skip_ms_page_3f: 1; 91816 unsigned int skip_vpd_pages: 1; 91817 unsigned int try_vpd_pages: 1; 91818 unsigned int use_192_bytes_for_3f: 1; 91819 unsigned int no_start_on_add: 1; 91820 unsigned int allow_restart: 1; 91821 unsigned int manage_start_stop: 1; 91822 unsigned int start_stop_pwr_cond: 1; 91823 unsigned int no_uld_attach: 1; 91824 unsigned int select_no_atn: 1; 91825 unsigned int fix_capacity: 1; 91826 unsigned int guess_capacity: 1; 91827 unsigned int retry_hwerror: 1; 91828 unsigned int last_sector_bug: 1; 91829 unsigned int no_read_disc_info: 1; 91830 unsigned int no_read_capacity_16: 1; 91831 unsigned int try_rc_10_first: 1; 91832 unsigned int security_supported: 1; 91833 unsigned int is_visible: 1; 91834 unsigned int wce_default_on: 1; 91835 unsigned int no_dif: 1; 91836 unsigned int broken_fua: 1; 91837 unsigned int lun_in_cdb: 1; 91838 unsigned int unmap_limit_for_ws: 1; 91839 unsigned int rpm_autosuspend: 1; 91840 bool offline_already; 91841 atomic_t disk_events_disable_depth; 91842 long unsigned int supported_events[1]; 91843 long unsigned int pending_events[1]; 91844 struct list_head event_list; 91845 struct work_struct event_work; 91846 unsigned int max_device_blocked; 91847 atomic_t iorequest_cnt; 91848 atomic_t iodone_cnt; 91849 atomic_t ioerr_cnt; 91850 struct device sdev_gendev; 91851 struct device sdev_dev; 91852 struct execute_work ew; 91853 struct work_struct requeue_work; 91854 struct scsi_device_handler *handler; 91855 void *handler_data; 91856 size_t dma_drain_len; 91857 void *dma_drain_buf; 91858 unsigned char access_state; 91859 struct mutex state_mutex; 91860 enum scsi_device_state sdev_state; 91861 struct task_struct *quiesced_by; 91862 long unsigned int sdev_data[0]; 91863 }; 91864 91865 enum scsi_host_state { 91866 SHOST_CREATED = 1, 91867 SHOST_RUNNING = 2, 91868 SHOST_CANCEL = 3, 91869 SHOST_DEL = 4, 91870 SHOST_RECOVERY = 5, 91871 SHOST_CANCEL_RECOVERY = 6, 91872 SHOST_DEL_RECOVERY = 7, 91873 }; 91874 91875 struct scsi_host_template; 91876 91877 struct scsi_transport_template; 91878 91879 struct Scsi_Host { 91880 struct list_head __devices; 91881 struct list_head __targets; 91882 struct list_head starved_list; 91883 spinlock_t default_lock; 91884 spinlock_t *host_lock; 91885 struct mutex scan_mutex; 91886 struct list_head eh_cmd_q; 91887 struct task_struct *ehandler; 91888 struct completion *eh_action; 91889 wait_queue_head_t host_wait; 91890 struct scsi_host_template *hostt; 91891 struct scsi_transport_template *transportt; 91892 struct blk_mq_tag_set tag_set; 91893 atomic_t host_blocked; 91894 unsigned int host_failed; 91895 unsigned int host_eh_scheduled; 91896 unsigned int host_no; 91897 int eh_deadline; 91898 long unsigned int last_reset; 91899 unsigned int max_channel; 91900 unsigned int max_id; 91901 u64 max_lun; 91902 unsigned int unique_id; 91903 short unsigned int max_cmd_len; 91904 int this_id; 91905 int can_queue; 91906 short int cmd_per_lun; 91907 short unsigned int sg_tablesize; 91908 short unsigned int sg_prot_tablesize; 91909 unsigned int max_sectors; 91910 unsigned int max_segment_size; 91911 long unsigned int dma_boundary; 91912 long unsigned int virt_boundary_mask; 91913 unsigned int nr_hw_queues; 91914 unsigned int active_mode: 2; 91915 unsigned int unchecked_isa_dma: 1; 91916 unsigned int host_self_blocked: 1; 91917 unsigned int reverse_ordering: 1; 91918 unsigned int tmf_in_progress: 1; 91919 unsigned int async_scan: 1; 91920 unsigned int eh_noresume: 1; 91921 unsigned int no_write_same: 1; 91922 unsigned int host_tagset: 1; 91923 unsigned int short_inquiry: 1; 91924 unsigned int no_scsi2_lun_in_cdb: 1; 91925 char work_q_name[20]; 91926 struct workqueue_struct *work_q; 91927 struct workqueue_struct *tmf_work_q; 91928 unsigned int max_host_blocked; 91929 unsigned int prot_capabilities; 91930 unsigned char prot_guard_type; 91931 long unsigned int base; 91932 long unsigned int io_port; 91933 unsigned char n_io_port; 91934 unsigned char dma_channel; 91935 unsigned int irq; 91936 enum scsi_host_state shost_state; 91937 struct device shost_gendev; 91938 struct device shost_dev; 91939 void *shost_data; 91940 struct device *dma_dev; 91941 long unsigned int hostdata[0]; 91942 }; 91943 91944 enum scsi_target_state { 91945 STARGET_CREATED = 1, 91946 STARGET_RUNNING = 2, 91947 STARGET_REMOVE = 3, 91948 STARGET_CREATED_REMOVE = 4, 91949 STARGET_DEL = 5, 91950 }; 91951 91952 struct scsi_target { 91953 struct scsi_device *starget_sdev_user; 91954 struct list_head siblings; 91955 struct list_head devices; 91956 struct device dev; 91957 struct kref reap_ref; 91958 unsigned int channel; 91959 unsigned int id; 91960 unsigned int create: 1; 91961 unsigned int single_lun: 1; 91962 unsigned int pdt_1f_for_no_lun: 1; 91963 unsigned int no_report_luns: 1; 91964 unsigned int expecting_lun_change: 1; 91965 atomic_t target_busy; 91966 atomic_t target_blocked; 91967 unsigned int can_queue; 91968 unsigned int max_target_blocked; 91969 char scsi_level; 91970 enum scsi_target_state state; 91971 void *hostdata; 91972 long unsigned int starget_data[0]; 91973 }; 91974 91975 struct scsi_data_buffer { 91976 struct sg_table table; 91977 unsigned int length; 91978 }; 91979 91980 struct scsi_pointer { 91981 char *ptr; 91982 int this_residual; 91983 struct scatterlist *buffer; 91984 int buffers_residual; 91985 dma_addr_t dma_handle; 91986 volatile int Status; 91987 volatile int Message; 91988 volatile int have_data_in; 91989 volatile int sent_command; 91990 volatile int phase; 91991 }; 91992 91993 struct scsi_cmnd { 91994 struct scsi_request req; 91995 struct scsi_device *device; 91996 struct list_head eh_entry; 91997 struct delayed_work abort_work; 91998 struct callback_head rcu; 91999 int eh_eflags; 92000 long unsigned int jiffies_at_alloc; 92001 int retries; 92002 int allowed; 92003 unsigned char prot_op; 92004 unsigned char prot_type; 92005 unsigned char prot_flags; 92006 short unsigned int cmd_len; 92007 enum dma_data_direction sc_data_direction; 92008 unsigned char *cmnd; 92009 struct scsi_data_buffer sdb; 92010 struct scsi_data_buffer *prot_sdb; 92011 unsigned int underflow; 92012 unsigned int transfersize; 92013 struct request *request; 92014 unsigned char *sense_buffer; 92015 void (*scsi_done)(struct scsi_cmnd *); 92016 struct scsi_pointer SCp; 92017 unsigned char *host_scribble; 92018 int result; 92019 int flags; 92020 long unsigned int state; 92021 unsigned char tag; 92022 unsigned int extra_len; 92023 }; 92024 92025 enum scsi_prot_operations { 92026 SCSI_PROT_NORMAL = 0, 92027 SCSI_PROT_READ_INSERT = 1, 92028 SCSI_PROT_WRITE_STRIP = 2, 92029 SCSI_PROT_READ_STRIP = 3, 92030 SCSI_PROT_WRITE_INSERT = 4, 92031 SCSI_PROT_READ_PASS = 5, 92032 SCSI_PROT_WRITE_PASS = 6, 92033 }; 92034 92035 struct scsi_driver { 92036 struct device_driver gendrv; 92037 void (*rescan)(struct device *); 92038 blk_status_t (*init_command)(struct scsi_cmnd *); 92039 void (*uninit_command)(struct scsi_cmnd *); 92040 int (*done)(struct scsi_cmnd *); 92041 int (*eh_action)(struct scsi_cmnd *, int); 92042 void (*eh_reset)(struct scsi_cmnd *); 92043 }; 92044 92045 struct scsi_host_cmd_pool; 92046 92047 struct scsi_host_template { 92048 struct module *module; 92049 const char *name; 92050 const char * (*info)(struct Scsi_Host *); 92051 int (*ioctl)(struct scsi_device *, unsigned int, void *); 92052 int (*compat_ioctl)(struct scsi_device *, unsigned int, void *); 92053 int (*init_cmd_priv)(struct Scsi_Host *, struct scsi_cmnd *); 92054 int (*exit_cmd_priv)(struct Scsi_Host *, struct scsi_cmnd *); 92055 int (*queuecommand)(struct Scsi_Host *, struct scsi_cmnd *); 92056 void (*commit_rqs)(struct Scsi_Host *, u16); 92057 int (*eh_abort_handler)(struct scsi_cmnd *); 92058 int (*eh_device_reset_handler)(struct scsi_cmnd *); 92059 int (*eh_target_reset_handler)(struct scsi_cmnd *); 92060 int (*eh_bus_reset_handler)(struct scsi_cmnd *); 92061 int (*eh_host_reset_handler)(struct scsi_cmnd *); 92062 int (*slave_alloc)(struct scsi_device *); 92063 int (*slave_configure)(struct scsi_device *); 92064 void (*slave_destroy)(struct scsi_device *); 92065 int (*target_alloc)(struct scsi_target *); 92066 void (*target_destroy)(struct scsi_target *); 92067 int (*scan_finished)(struct Scsi_Host *, long unsigned int); 92068 void (*scan_start)(struct Scsi_Host *); 92069 int (*change_queue_depth)(struct scsi_device *, int); 92070 int (*map_queues)(struct Scsi_Host *); 92071 bool (*dma_need_drain)(struct request *); 92072 int (*bios_param)(struct scsi_device *, struct block_device *, sector_t, int *); 92073 void (*unlock_native_capacity)(struct scsi_device *); 92074 int (*show_info)(struct seq_file *, struct Scsi_Host *); 92075 int (*write_info)(struct Scsi_Host *, char *, int); 92076 enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *); 92077 int (*host_reset)(struct Scsi_Host *, int); 92078 const char *proc_name; 92079 struct proc_dir_entry *proc_dir; 92080 int can_queue; 92081 int this_id; 92082 short unsigned int sg_tablesize; 92083 short unsigned int sg_prot_tablesize; 92084 unsigned int max_sectors; 92085 unsigned int max_segment_size; 92086 long unsigned int dma_boundary; 92087 long unsigned int virt_boundary_mask; 92088 short int cmd_per_lun; 92089 unsigned char present; 92090 int tag_alloc_policy; 92091 unsigned int track_queue_depth: 1; 92092 unsigned int supported_mode: 2; 92093 unsigned int unchecked_isa_dma: 1; 92094 unsigned int emulated: 1; 92095 unsigned int skip_settle_delay: 1; 92096 unsigned int no_write_same: 1; 92097 unsigned int host_tagset: 1; 92098 unsigned int max_host_blocked; 92099 struct device_attribute **shost_attrs; 92100 struct device_attribute **sdev_attrs; 92101 const struct attribute_group **sdev_groups; 92102 u64 vendor_id; 92103 unsigned int cmd_size; 92104 struct scsi_host_cmd_pool *cmd_pool; 92105 int rpm_autosuspend_delay; 92106 }; 92107 92108 struct trace_event_raw_scsi_dispatch_cmd_start { 92109 struct trace_entry ent; 92110 unsigned int host_no; 92111 unsigned int channel; 92112 unsigned int id; 92113 unsigned int lun; 92114 unsigned int opcode; 92115 unsigned int cmd_len; 92116 unsigned int data_sglen; 92117 unsigned int prot_sglen; 92118 unsigned char prot_op; 92119 u32 __data_loc_cmnd; 92120 char __data[0]; 92121 }; 92122 92123 struct trace_event_raw_scsi_dispatch_cmd_error { 92124 struct trace_entry ent; 92125 unsigned int host_no; 92126 unsigned int channel; 92127 unsigned int id; 92128 unsigned int lun; 92129 int rtn; 92130 unsigned int opcode; 92131 unsigned int cmd_len; 92132 unsigned int data_sglen; 92133 unsigned int prot_sglen; 92134 unsigned char prot_op; 92135 u32 __data_loc_cmnd; 92136 char __data[0]; 92137 }; 92138 92139 struct trace_event_raw_scsi_cmd_done_timeout_template { 92140 struct trace_entry ent; 92141 unsigned int host_no; 92142 unsigned int channel; 92143 unsigned int id; 92144 unsigned int lun; 92145 int result; 92146 unsigned int opcode; 92147 unsigned int cmd_len; 92148 unsigned int data_sglen; 92149 unsigned int prot_sglen; 92150 unsigned char prot_op; 92151 u32 __data_loc_cmnd; 92152 char __data[0]; 92153 }; 92154 92155 struct trace_event_raw_scsi_eh_wakeup { 92156 struct trace_entry ent; 92157 unsigned int host_no; 92158 char __data[0]; 92159 }; 92160 92161 struct trace_event_data_offsets_scsi_dispatch_cmd_start { 92162 u32 cmnd; 92163 }; 92164 92165 struct trace_event_data_offsets_scsi_dispatch_cmd_error { 92166 u32 cmnd; 92167 }; 92168 92169 struct trace_event_data_offsets_scsi_cmd_done_timeout_template { 92170 u32 cmnd; 92171 }; 92172 92173 struct trace_event_data_offsets_scsi_eh_wakeup {}; 92174 92175 typedef void (*btf_trace_scsi_dispatch_cmd_start)(void *, struct scsi_cmnd *); 92176 92177 typedef void (*btf_trace_scsi_dispatch_cmd_error)(void *, struct scsi_cmnd *, int); 92178 92179 typedef void (*btf_trace_scsi_dispatch_cmd_done)(void *, struct scsi_cmnd *); 92180 92181 typedef void (*btf_trace_scsi_dispatch_cmd_timeout)(void *, struct scsi_cmnd *); 92182 92183 typedef void (*btf_trace_scsi_eh_wakeup)(void *, struct Scsi_Host *); 92184 92185 struct scsi_transport_template { 92186 struct transport_container host_attrs; 92187 struct transport_container target_attrs; 92188 struct transport_container device_attrs; 92189 int (*user_scan)(struct Scsi_Host *, uint, uint, u64); 92190 int device_size; 92191 int device_private_offset; 92192 int target_size; 92193 int target_private_offset; 92194 int host_size; 92195 unsigned int create_work_queue: 1; 92196 void (*eh_strategy_handler)(struct Scsi_Host *); 92197 }; 92198 92199 struct scsi_host_busy_iter_data { 92200 bool (*fn)(struct scsi_cmnd *, void *, bool); 92201 void *priv; 92202 }; 92203 92204 struct scsi_idlun { 92205 __u32 dev_id; 92206 __u32 host_unique_id; 92207 }; 92208 92209 typedef void (*activate_complete)(void *, int); 92210 92211 struct scsi_device_handler { 92212 struct list_head list; 92213 struct module *module; 92214 const char *name; 92215 int (*check_sense)(struct scsi_device *, struct scsi_sense_hdr *); 92216 int (*attach)(struct scsi_device *); 92217 void (*detach)(struct scsi_device *); 92218 int (*activate)(struct scsi_device *, activate_complete, void *); 92219 blk_status_t (*prep_fn)(struct scsi_device *, struct request *); 92220 int (*set_params)(struct scsi_device *, const char *); 92221 void (*rescan)(struct scsi_device *); 92222 }; 92223 92224 struct scsi_eh_save { 92225 int result; 92226 unsigned int resid_len; 92227 int eh_eflags; 92228 enum dma_data_direction data_direction; 92229 unsigned int underflow; 92230 unsigned char cmd_len; 92231 unsigned char prot_op; 92232 unsigned char *cmnd; 92233 struct scsi_data_buffer sdb; 92234 unsigned char eh_cmnd[16]; 92235 struct scatterlist sense_sgl; 92236 }; 92237 92238 struct scsi_varlen_cdb_hdr { 92239 __u8 opcode; 92240 __u8 control; 92241 __u8 misc[5]; 92242 __u8 additional_cdb_length; 92243 __be16 service_action; 92244 }; 92245 92246 struct scsi_mode_data { 92247 __u32 length; 92248 __u16 block_descriptor_length; 92249 __u8 medium_type; 92250 __u8 device_specific; 92251 __u8 header_length; 92252 __u8 longlba: 1; 92253 }; 92254 92255 struct scsi_event { 92256 enum scsi_device_event evt_type; 92257 struct list_head node; 92258 }; 92259 92260 enum scsi_host_prot_capabilities { 92261 SHOST_DIF_TYPE1_PROTECTION = 1, 92262 SHOST_DIF_TYPE2_PROTECTION = 2, 92263 SHOST_DIF_TYPE3_PROTECTION = 4, 92264 SHOST_DIX_TYPE0_PROTECTION = 8, 92265 SHOST_DIX_TYPE1_PROTECTION = 16, 92266 SHOST_DIX_TYPE2_PROTECTION = 32, 92267 SHOST_DIX_TYPE3_PROTECTION = 64, 92268 }; 92269 92270 enum { 92271 ACTION_FAIL = 0, 92272 ACTION_REPREP = 1, 92273 ACTION_RETRY = 2, 92274 ACTION_DELAYED_RETRY = 3, 92275 }; 92276 92277 struct value_name_pair; 92278 92279 struct sa_name_list { 92280 int opcode; 92281 const struct value_name_pair *arr; 92282 int arr_sz; 92283 }; 92284 92285 struct value_name_pair { 92286 int value; 92287 const char *name; 92288 }; 92289 92290 struct error_info { 92291 short unsigned int code12; 92292 short unsigned int size; 92293 }; 92294 92295 struct error_info2 { 92296 unsigned char code1; 92297 unsigned char code2_min; 92298 unsigned char code2_max; 92299 const char *str; 92300 const char *fmt; 92301 }; 92302 92303 struct scsi_lun { 92304 __u8 scsi_lun[8]; 92305 }; 92306 92307 enum scsi_timeouts { 92308 SCSI_DEFAULT_EH_TIMEOUT = 10000, 92309 }; 92310 92311 enum scsi_scan_mode { 92312 SCSI_SCAN_INITIAL = 0, 92313 SCSI_SCAN_RESCAN = 1, 92314 SCSI_SCAN_MANUAL = 2, 92315 }; 92316 92317 struct async_scan_data { 92318 struct list_head list; 92319 struct Scsi_Host *shost; 92320 struct completion prev_finished; 92321 }; 92322 92323 enum scsi_devinfo_key { 92324 SCSI_DEVINFO_GLOBAL = 0, 92325 SCSI_DEVINFO_SPI = 1, 92326 }; 92327 92328 struct scsi_dev_info_list { 92329 struct list_head dev_info_list; 92330 char vendor[8]; 92331 char model[16]; 92332 blist_flags_t flags; 92333 unsigned int compatible; 92334 }; 92335 92336 struct scsi_dev_info_list_table { 92337 struct list_head node; 92338 struct list_head scsi_dev_info_list; 92339 const char *name; 92340 int key; 92341 }; 92342 92343 struct double_list { 92344 struct list_head *top; 92345 struct list_head *bottom; 92346 }; 92347 92348 struct scsi_nl_hdr { 92349 __u8 version; 92350 __u8 transport; 92351 __u16 magic; 92352 __u16 msgtype; 92353 __u16 msglen; 92354 }; 92355 92356 enum { 92357 SCSI_DH_OK = 0, 92358 SCSI_DH_DEV_FAILED = 1, 92359 SCSI_DH_DEV_TEMP_BUSY = 2, 92360 SCSI_DH_DEV_UNSUPP = 3, 92361 SCSI_DH_DEVICE_MAX = 4, 92362 SCSI_DH_NOTCONN = 5, 92363 SCSI_DH_CONN_FAILURE = 6, 92364 SCSI_DH_TRANSPORT_MAX = 7, 92365 SCSI_DH_IO = 8, 92366 SCSI_DH_INVALID_IO = 9, 92367 SCSI_DH_RETRY = 10, 92368 SCSI_DH_IMM_RETRY = 11, 92369 SCSI_DH_TIMED_OUT = 12, 92370 SCSI_DH_RES_TEMP_UNAVAIL = 13, 92371 SCSI_DH_DEV_OFFLINED = 14, 92372 SCSI_DH_NOMEM = 15, 92373 SCSI_DH_NOSYS = 16, 92374 SCSI_DH_DRIVER_MAX = 17, 92375 }; 92376 92377 struct scsi_dh_blist { 92378 const char *vendor; 92379 const char *model; 92380 const char *driver; 92381 }; 92382 92383 enum scsi_prot_flags { 92384 SCSI_PROT_TRANSFER_PI = 1, 92385 SCSI_PROT_GUARD_CHECK = 2, 92386 SCSI_PROT_REF_CHECK = 4, 92387 SCSI_PROT_REF_INCREMENT = 8, 92388 SCSI_PROT_IP_CHECKSUM = 16, 92389 }; 92390 92391 enum { 92392 SD_EXT_CDB_SIZE = 32, 92393 SD_MEMPOOL_SIZE = 2, 92394 }; 92395 92396 enum { 92397 SD_DEF_XFER_BLOCKS = 65535, 92398 SD_MAX_XFER_BLOCKS = 4294967295, 92399 SD_MAX_WS10_BLOCKS = 65535, 92400 SD_MAX_WS16_BLOCKS = 8388607, 92401 }; 92402 92403 enum { 92404 SD_LBP_FULL = 0, 92405 SD_LBP_UNMAP = 1, 92406 SD_LBP_WS16 = 2, 92407 SD_LBP_WS10 = 3, 92408 SD_LBP_ZERO = 4, 92409 SD_LBP_DISABLE = 5, 92410 }; 92411 92412 enum { 92413 SD_ZERO_WRITE = 0, 92414 SD_ZERO_WS = 1, 92415 SD_ZERO_WS16_UNMAP = 2, 92416 SD_ZERO_WS10_UNMAP = 3, 92417 }; 92418 92419 struct opal_dev___2; 92420 92421 struct scsi_disk { 92422 struct scsi_driver *driver; 92423 struct scsi_device *device; 92424 struct device dev; 92425 struct gendisk *disk; 92426 struct opal_dev___2 *opal_dev; 92427 u32 nr_zones; 92428 u32 rev_nr_zones; 92429 u32 zone_blocks; 92430 u32 rev_zone_blocks; 92431 u32 zones_optimal_open; 92432 u32 zones_optimal_nonseq; 92433 u32 zones_max_open; 92434 u32 *zones_wp_offset; 92435 spinlock_t zones_wp_offset_lock; 92436 u32 *rev_wp_offset; 92437 struct mutex rev_mutex; 92438 struct work_struct zone_wp_offset_work; 92439 char *zone_wp_update_buf; 92440 atomic_t openers; 92441 sector_t capacity; 92442 int max_retries; 92443 u32 max_xfer_blocks; 92444 u32 opt_xfer_blocks; 92445 u32 max_ws_blocks; 92446 u32 max_unmap_blocks; 92447 u32 unmap_granularity; 92448 u32 unmap_alignment; 92449 u32 index; 92450 unsigned int physical_block_size; 92451 unsigned int max_medium_access_timeouts; 92452 unsigned int medium_access_timed_out; 92453 u8 media_present; 92454 u8 write_prot; 92455 u8 protection_type; 92456 u8 provisioning_mode; 92457 u8 zeroing_mode; 92458 unsigned int ATO: 1; 92459 unsigned int cache_override: 1; 92460 unsigned int WCE: 1; 92461 unsigned int RCD: 1; 92462 unsigned int DPOFUA: 1; 92463 unsigned int first_scan: 1; 92464 unsigned int lbpme: 1; 92465 unsigned int lbprz: 1; 92466 unsigned int lbpu: 1; 92467 unsigned int lbpws: 1; 92468 unsigned int lbpws10: 1; 92469 unsigned int lbpvpd: 1; 92470 unsigned int ws10: 1; 92471 unsigned int ws16: 1; 92472 unsigned int rc_basis: 2; 92473 unsigned int zoned: 2; 92474 unsigned int urswrz: 1; 92475 unsigned int security: 1; 92476 unsigned int ignore_medium_access_errors: 1; 92477 }; 92478 92479 enum scsi_host_guard_type { 92480 SHOST_DIX_GUARD_CRC = 1, 92481 SHOST_DIX_GUARD_IP = 2, 92482 }; 92483 92484 enum zbc_zone_type { 92485 ZBC_ZONE_TYPE_CONV = 1, 92486 ZBC_ZONE_TYPE_SEQWRITE_REQ = 2, 92487 ZBC_ZONE_TYPE_SEQWRITE_PREF = 3, 92488 }; 92489 92490 enum zbc_zone_cond { 92491 ZBC_ZONE_COND_NO_WP = 0, 92492 ZBC_ZONE_COND_EMPTY = 1, 92493 ZBC_ZONE_COND_IMP_OPEN = 2, 92494 ZBC_ZONE_COND_EXP_OPEN = 3, 92495 ZBC_ZONE_COND_CLOSED = 4, 92496 ZBC_ZONE_COND_READONLY = 13, 92497 ZBC_ZONE_COND_FULL = 14, 92498 ZBC_ZONE_COND_OFFLINE = 15, 92499 }; 92500 92501 enum { 92502 mechtype_caddy = 0, 92503 mechtype_tray = 1, 92504 mechtype_popup = 2, 92505 mechtype_individual_changer = 4, 92506 mechtype_cartridge_changer = 5, 92507 }; 92508 92509 struct event_header { 92510 __be16 data_len; 92511 __u8 notification_class: 3; 92512 __u8 reserved1: 4; 92513 __u8 nea: 1; 92514 __u8 supp_event_class; 92515 }; 92516 92517 struct media_event_desc { 92518 __u8 media_event_code: 4; 92519 __u8 reserved1: 4; 92520 __u8 door_open: 1; 92521 __u8 media_present: 1; 92522 __u8 reserved2: 6; 92523 __u8 start_slot; 92524 __u8 end_slot; 92525 }; 92526 92527 struct scsi_cd { 92528 struct scsi_driver *driver; 92529 unsigned int capacity; 92530 struct scsi_device *device; 92531 unsigned int vendor; 92532 long unsigned int ms_offset; 92533 unsigned int writeable: 1; 92534 unsigned int use: 1; 92535 unsigned int xa_flag: 1; 92536 unsigned int readcd_known: 1; 92537 unsigned int readcd_cdda: 1; 92538 unsigned int media_present: 1; 92539 int tur_mismatch; 92540 bool tur_changed: 1; 92541 bool get_event_changed: 1; 92542 bool ignore_get_event: 1; 92543 struct cdrom_device_info cdi; 92544 struct mutex lock; 92545 struct kref kref; 92546 struct gendisk *disk; 92547 }; 92548 92549 typedef struct scsi_cd Scsi_CD; 92550 92551 struct cdrom_ti { 92552 __u8 cdti_trk0; 92553 __u8 cdti_ind0; 92554 __u8 cdti_trk1; 92555 __u8 cdti_ind1; 92556 }; 92557 92558 struct cdrom_tochdr { 92559 __u8 cdth_trk0; 92560 __u8 cdth_trk1; 92561 }; 92562 92563 struct cdrom_tocentry { 92564 __u8 cdte_track; 92565 __u8 cdte_adr: 4; 92566 __u8 cdte_ctrl: 4; 92567 __u8 cdte_format; 92568 union cdrom_addr cdte_addr; 92569 __u8 cdte_datamode; 92570 }; 92571 92572 struct ccs_modesel_head { 92573 __u8 _r1; 92574 __u8 medium; 92575 __u8 _r2; 92576 __u8 block_desc_length; 92577 __u8 density; 92578 __u8 number_blocks_hi; 92579 __u8 number_blocks_med; 92580 __u8 number_blocks_lo; 92581 __u8 _r3; 92582 __u8 block_length_hi; 92583 __u8 block_length_med; 92584 __u8 block_length_lo; 92585 }; 92586 92587 typedef struct sg_io_hdr sg_io_hdr_t; 92588 92589 struct sg_scsi_id { 92590 int host_no; 92591 int channel; 92592 int scsi_id; 92593 int lun; 92594 int scsi_type; 92595 short int h_cmd_per_lun; 92596 short int d_queue_depth; 92597 int unused[2]; 92598 }; 92599 92600 typedef struct sg_scsi_id sg_scsi_id_t; 92601 92602 struct sg_req_info { 92603 char req_state; 92604 char orphan; 92605 char sg_io_owned; 92606 char problem; 92607 int pack_id; 92608 void *usr_ptr; 92609 unsigned int duration; 92610 int unused; 92611 }; 92612 92613 typedef struct sg_req_info sg_req_info_t; 92614 92615 struct sg_header { 92616 int pack_len; 92617 int reply_len; 92618 int pack_id; 92619 int result; 92620 unsigned int twelve_byte: 1; 92621 unsigned int target_status: 5; 92622 unsigned int host_status: 8; 92623 unsigned int driver_status: 8; 92624 unsigned int other_flags: 10; 92625 unsigned char sense_buffer[16]; 92626 }; 92627 92628 struct sg_scatter_hold { 92629 short unsigned int k_use_sg; 92630 unsigned int sglist_len; 92631 unsigned int bufflen; 92632 struct page **pages; 92633 int page_order; 92634 char dio_in_use; 92635 unsigned char cmd_opcode; 92636 }; 92637 92638 typedef struct sg_scatter_hold Sg_scatter_hold; 92639 92640 struct sg_fd; 92641 92642 struct sg_request { 92643 struct list_head entry; 92644 struct sg_fd *parentfp; 92645 Sg_scatter_hold data; 92646 sg_io_hdr_t header; 92647 unsigned char sense_b[96]; 92648 char res_used; 92649 char orphan; 92650 char sg_io_owned; 92651 char done; 92652 struct request *rq; 92653 struct bio *bio; 92654 struct execute_work ew; 92655 }; 92656 92657 typedef struct sg_request Sg_request; 92658 92659 struct sg_device; 92660 92661 struct sg_fd { 92662 struct list_head sfd_siblings; 92663 struct sg_device *parentdp; 92664 wait_queue_head_t read_wait; 92665 rwlock_t rq_list_lock; 92666 struct mutex f_mutex; 92667 int timeout; 92668 int timeout_user; 92669 Sg_scatter_hold reserve; 92670 struct list_head rq_list; 92671 struct fasync_struct *async_qp; 92672 Sg_request req_arr[16]; 92673 char force_packid; 92674 char cmd_q; 92675 unsigned char next_cmd_len; 92676 char keep_orphan; 92677 char mmap_called; 92678 char res_in_use; 92679 struct kref f_ref; 92680 struct execute_work ew; 92681 }; 92682 92683 struct sg_device { 92684 struct scsi_device *device; 92685 wait_queue_head_t open_wait; 92686 struct mutex open_rel_lock; 92687 int sg_tablesize; 92688 u32 index; 92689 struct list_head sfds; 92690 rwlock_t sfd_lock; 92691 atomic_t detaching; 92692 bool exclude; 92693 int open_cnt; 92694 char sgdebug; 92695 struct gendisk *disk; 92696 struct cdev *cdev; 92697 struct kref d_ref; 92698 }; 92699 92700 typedef struct sg_fd Sg_fd; 92701 92702 typedef struct sg_device Sg_device; 92703 92704 struct compat_sg_req_info { 92705 char req_state; 92706 char orphan; 92707 char sg_io_owned; 92708 char problem; 92709 int pack_id; 92710 compat_uptr_t usr_ptr; 92711 unsigned int duration; 92712 int unused; 92713 }; 92714 92715 struct sg_proc_deviter { 92716 loff_t index; 92717 size_t max; 92718 }; 92719 92720 enum { 92721 ATA_MAX_DEVICES = 2, 92722 ATA_MAX_PRD = 256, 92723 ATA_SECT_SIZE = 512, 92724 ATA_MAX_SECTORS_128 = 128, 92725 ATA_MAX_SECTORS = 256, 92726 ATA_MAX_SECTORS_1024 = 1024, 92727 ATA_MAX_SECTORS_LBA48 = 65535, 92728 ATA_MAX_SECTORS_TAPE = 65535, 92729 ATA_MAX_TRIM_RNUM = 64, 92730 ATA_ID_WORDS = 256, 92731 ATA_ID_CONFIG = 0, 92732 ATA_ID_CYLS = 1, 92733 ATA_ID_HEADS = 3, 92734 ATA_ID_SECTORS = 6, 92735 ATA_ID_SERNO = 10, 92736 ATA_ID_BUF_SIZE = 21, 92737 ATA_ID_FW_REV = 23, 92738 ATA_ID_PROD = 27, 92739 ATA_ID_MAX_MULTSECT = 47, 92740 ATA_ID_DWORD_IO = 48, 92741 ATA_ID_TRUSTED = 48, 92742 ATA_ID_CAPABILITY = 49, 92743 ATA_ID_OLD_PIO_MODES = 51, 92744 ATA_ID_OLD_DMA_MODES = 52, 92745 ATA_ID_FIELD_VALID = 53, 92746 ATA_ID_CUR_CYLS = 54, 92747 ATA_ID_CUR_HEADS = 55, 92748 ATA_ID_CUR_SECTORS = 56, 92749 ATA_ID_MULTSECT = 59, 92750 ATA_ID_LBA_CAPACITY = 60, 92751 ATA_ID_SWDMA_MODES = 62, 92752 ATA_ID_MWDMA_MODES = 63, 92753 ATA_ID_PIO_MODES = 64, 92754 ATA_ID_EIDE_DMA_MIN = 65, 92755 ATA_ID_EIDE_DMA_TIME = 66, 92756 ATA_ID_EIDE_PIO = 67, 92757 ATA_ID_EIDE_PIO_IORDY = 68, 92758 ATA_ID_ADDITIONAL_SUPP = 69, 92759 ATA_ID_QUEUE_DEPTH = 75, 92760 ATA_ID_SATA_CAPABILITY = 76, 92761 ATA_ID_SATA_CAPABILITY_2 = 77, 92762 ATA_ID_FEATURE_SUPP = 78, 92763 ATA_ID_MAJOR_VER = 80, 92764 ATA_ID_COMMAND_SET_1 = 82, 92765 ATA_ID_COMMAND_SET_2 = 83, 92766 ATA_ID_CFSSE = 84, 92767 ATA_ID_CFS_ENABLE_1 = 85, 92768 ATA_ID_CFS_ENABLE_2 = 86, 92769 ATA_ID_CSF_DEFAULT = 87, 92770 ATA_ID_UDMA_MODES = 88, 92771 ATA_ID_HW_CONFIG = 93, 92772 ATA_ID_SPG = 98, 92773 ATA_ID_LBA_CAPACITY_2 = 100, 92774 ATA_ID_SECTOR_SIZE = 106, 92775 ATA_ID_WWN = 108, 92776 ATA_ID_LOGICAL_SECTOR_SIZE = 117, 92777 ATA_ID_COMMAND_SET_3 = 119, 92778 ATA_ID_COMMAND_SET_4 = 120, 92779 ATA_ID_LAST_LUN = 126, 92780 ATA_ID_DLF = 128, 92781 ATA_ID_CSFO = 129, 92782 ATA_ID_CFA_POWER = 160, 92783 ATA_ID_CFA_KEY_MGMT = 162, 92784 ATA_ID_CFA_MODES = 163, 92785 ATA_ID_DATA_SET_MGMT = 169, 92786 ATA_ID_SCT_CMD_XPORT = 206, 92787 ATA_ID_ROT_SPEED = 217, 92788 ATA_ID_PIO4 = 2, 92789 ATA_ID_SERNO_LEN = 20, 92790 ATA_ID_FW_REV_LEN = 8, 92791 ATA_ID_PROD_LEN = 40, 92792 ATA_ID_WWN_LEN = 8, 92793 ATA_PCI_CTL_OFS = 2, 92794 ATA_PIO0 = 1, 92795 ATA_PIO1 = 3, 92796 ATA_PIO2 = 7, 92797 ATA_PIO3 = 15, 92798 ATA_PIO4 = 31, 92799 ATA_PIO5 = 63, 92800 ATA_PIO6 = 127, 92801 ATA_PIO4_ONLY = 16, 92802 ATA_SWDMA0 = 1, 92803 ATA_SWDMA1 = 3, 92804 ATA_SWDMA2 = 7, 92805 ATA_SWDMA2_ONLY = 4, 92806 ATA_MWDMA0 = 1, 92807 ATA_MWDMA1 = 3, 92808 ATA_MWDMA2 = 7, 92809 ATA_MWDMA3 = 15, 92810 ATA_MWDMA4 = 31, 92811 ATA_MWDMA12_ONLY = 6, 92812 ATA_MWDMA2_ONLY = 4, 92813 ATA_UDMA0 = 1, 92814 ATA_UDMA1 = 3, 92815 ATA_UDMA2 = 7, 92816 ATA_UDMA3 = 15, 92817 ATA_UDMA4 = 31, 92818 ATA_UDMA5 = 63, 92819 ATA_UDMA6 = 127, 92820 ATA_UDMA7 = 255, 92821 ATA_UDMA24_ONLY = 20, 92822 ATA_UDMA_MASK_40C = 7, 92823 ATA_PRD_SZ = 8, 92824 ATA_PRD_TBL_SZ = 2048, 92825 ATA_PRD_EOT = 2147483648, 92826 ATA_DMA_TABLE_OFS = 4, 92827 ATA_DMA_STATUS = 2, 92828 ATA_DMA_CMD = 0, 92829 ATA_DMA_WR = 8, 92830 ATA_DMA_START = 1, 92831 ATA_DMA_INTR = 4, 92832 ATA_DMA_ERR = 2, 92833 ATA_DMA_ACTIVE = 1, 92834 ATA_HOB = 128, 92835 ATA_NIEN = 2, 92836 ATA_LBA = 64, 92837 ATA_DEV1 = 16, 92838 ATA_DEVICE_OBS = 160, 92839 ATA_DEVCTL_OBS = 8, 92840 ATA_BUSY = 128, 92841 ATA_DRDY = 64, 92842 ATA_DF = 32, 92843 ATA_DSC = 16, 92844 ATA_DRQ = 8, 92845 ATA_CORR = 4, 92846 ATA_SENSE = 2, 92847 ATA_ERR = 1, 92848 ATA_SRST = 4, 92849 ATA_ICRC = 128, 92850 ATA_BBK = 128, 92851 ATA_UNC = 64, 92852 ATA_MC = 32, 92853 ATA_IDNF = 16, 92854 ATA_MCR = 8, 92855 ATA_ABORTED = 4, 92856 ATA_TRK0NF = 2, 92857 ATA_AMNF = 1, 92858 ATAPI_LFS = 240, 92859 ATAPI_EOM = 2, 92860 ATAPI_ILI = 1, 92861 ATAPI_IO = 2, 92862 ATAPI_COD = 1, 92863 ATA_REG_DATA = 0, 92864 ATA_REG_ERR = 1, 92865 ATA_REG_NSECT = 2, 92866 ATA_REG_LBAL = 3, 92867 ATA_REG_LBAM = 4, 92868 ATA_REG_LBAH = 5, 92869 ATA_REG_DEVICE = 6, 92870 ATA_REG_STATUS = 7, 92871 ATA_REG_FEATURE = 1, 92872 ATA_REG_CMD = 7, 92873 ATA_REG_BYTEL = 4, 92874 ATA_REG_BYTEH = 5, 92875 ATA_REG_DEVSEL = 6, 92876 ATA_REG_IRQ = 2, 92877 ATA_CMD_DEV_RESET = 8, 92878 ATA_CMD_CHK_POWER = 229, 92879 ATA_CMD_STANDBY = 226, 92880 ATA_CMD_IDLE = 227, 92881 ATA_CMD_EDD = 144, 92882 ATA_CMD_DOWNLOAD_MICRO = 146, 92883 ATA_CMD_DOWNLOAD_MICRO_DMA = 147, 92884 ATA_CMD_NOP = 0, 92885 ATA_CMD_FLUSH = 231, 92886 ATA_CMD_FLUSH_EXT = 234, 92887 ATA_CMD_ID_ATA = 236, 92888 ATA_CMD_ID_ATAPI = 161, 92889 ATA_CMD_SERVICE = 162, 92890 ATA_CMD_READ = 200, 92891 ATA_CMD_READ_EXT = 37, 92892 ATA_CMD_READ_QUEUED = 38, 92893 ATA_CMD_READ_STREAM_EXT = 43, 92894 ATA_CMD_READ_STREAM_DMA_EXT = 42, 92895 ATA_CMD_WRITE = 202, 92896 ATA_CMD_WRITE_EXT = 53, 92897 ATA_CMD_WRITE_QUEUED = 54, 92898 ATA_CMD_WRITE_STREAM_EXT = 59, 92899 ATA_CMD_WRITE_STREAM_DMA_EXT = 58, 92900 ATA_CMD_WRITE_FUA_EXT = 61, 92901 ATA_CMD_WRITE_QUEUED_FUA_EXT = 62, 92902 ATA_CMD_FPDMA_READ = 96, 92903 ATA_CMD_FPDMA_WRITE = 97, 92904 ATA_CMD_NCQ_NON_DATA = 99, 92905 ATA_CMD_FPDMA_SEND = 100, 92906 ATA_CMD_FPDMA_RECV = 101, 92907 ATA_CMD_PIO_READ = 32, 92908 ATA_CMD_PIO_READ_EXT = 36, 92909 ATA_CMD_PIO_WRITE = 48, 92910 ATA_CMD_PIO_WRITE_EXT = 52, 92911 ATA_CMD_READ_MULTI = 196, 92912 ATA_CMD_READ_MULTI_EXT = 41, 92913 ATA_CMD_WRITE_MULTI = 197, 92914 ATA_CMD_WRITE_MULTI_EXT = 57, 92915 ATA_CMD_WRITE_MULTI_FUA_EXT = 206, 92916 ATA_CMD_SET_FEATURES = 239, 92917 ATA_CMD_SET_MULTI = 198, 92918 ATA_CMD_PACKET = 160, 92919 ATA_CMD_VERIFY = 64, 92920 ATA_CMD_VERIFY_EXT = 66, 92921 ATA_CMD_WRITE_UNCORR_EXT = 69, 92922 ATA_CMD_STANDBYNOW1 = 224, 92923 ATA_CMD_IDLEIMMEDIATE = 225, 92924 ATA_CMD_SLEEP = 230, 92925 ATA_CMD_INIT_DEV_PARAMS = 145, 92926 ATA_CMD_READ_NATIVE_MAX = 248, 92927 ATA_CMD_READ_NATIVE_MAX_EXT = 39, 92928 ATA_CMD_SET_MAX = 249, 92929 ATA_CMD_SET_MAX_EXT = 55, 92930 ATA_CMD_READ_LOG_EXT = 47, 92931 ATA_CMD_WRITE_LOG_EXT = 63, 92932 ATA_CMD_READ_LOG_DMA_EXT = 71, 92933 ATA_CMD_WRITE_LOG_DMA_EXT = 87, 92934 ATA_CMD_TRUSTED_NONDATA = 91, 92935 ATA_CMD_TRUSTED_RCV = 92, 92936 ATA_CMD_TRUSTED_RCV_DMA = 93, 92937 ATA_CMD_TRUSTED_SND = 94, 92938 ATA_CMD_TRUSTED_SND_DMA = 95, 92939 ATA_CMD_PMP_READ = 228, 92940 ATA_CMD_PMP_READ_DMA = 233, 92941 ATA_CMD_PMP_WRITE = 232, 92942 ATA_CMD_PMP_WRITE_DMA = 235, 92943 ATA_CMD_CONF_OVERLAY = 177, 92944 ATA_CMD_SEC_SET_PASS = 241, 92945 ATA_CMD_SEC_UNLOCK = 242, 92946 ATA_CMD_SEC_ERASE_PREP = 243, 92947 ATA_CMD_SEC_ERASE_UNIT = 244, 92948 ATA_CMD_SEC_FREEZE_LOCK = 245, 92949 ATA_CMD_SEC_DISABLE_PASS = 246, 92950 ATA_CMD_CONFIG_STREAM = 81, 92951 ATA_CMD_SMART = 176, 92952 ATA_CMD_MEDIA_LOCK = 222, 92953 ATA_CMD_MEDIA_UNLOCK = 223, 92954 ATA_CMD_DSM = 6, 92955 ATA_CMD_CHK_MED_CRD_TYP = 209, 92956 ATA_CMD_CFA_REQ_EXT_ERR = 3, 92957 ATA_CMD_CFA_WRITE_NE = 56, 92958 ATA_CMD_CFA_TRANS_SECT = 135, 92959 ATA_CMD_CFA_ERASE = 192, 92960 ATA_CMD_CFA_WRITE_MULT_NE = 205, 92961 ATA_CMD_REQ_SENSE_DATA = 11, 92962 ATA_CMD_SANITIZE_DEVICE = 180, 92963 ATA_CMD_ZAC_MGMT_IN = 74, 92964 ATA_CMD_ZAC_MGMT_OUT = 159, 92965 ATA_CMD_RESTORE = 16, 92966 ATA_SUBCMD_FPDMA_RECV_RD_LOG_DMA_EXT = 1, 92967 ATA_SUBCMD_FPDMA_RECV_ZAC_MGMT_IN = 2, 92968 ATA_SUBCMD_FPDMA_SEND_DSM = 0, 92969 ATA_SUBCMD_FPDMA_SEND_WR_LOG_DMA_EXT = 2, 92970 ATA_SUBCMD_NCQ_NON_DATA_ABORT_QUEUE = 0, 92971 ATA_SUBCMD_NCQ_NON_DATA_SET_FEATURES = 5, 92972 ATA_SUBCMD_NCQ_NON_DATA_ZERO_EXT = 6, 92973 ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT = 7, 92974 ATA_SUBCMD_ZAC_MGMT_IN_REPORT_ZONES = 0, 92975 ATA_SUBCMD_ZAC_MGMT_OUT_CLOSE_ZONE = 1, 92976 ATA_SUBCMD_ZAC_MGMT_OUT_FINISH_ZONE = 2, 92977 ATA_SUBCMD_ZAC_MGMT_OUT_OPEN_ZONE = 3, 92978 ATA_SUBCMD_ZAC_MGMT_OUT_RESET_WRITE_POINTER = 4, 92979 ATA_LOG_DIRECTORY = 0, 92980 ATA_LOG_SATA_NCQ = 16, 92981 ATA_LOG_NCQ_NON_DATA = 18, 92982 ATA_LOG_NCQ_SEND_RECV = 19, 92983 ATA_LOG_IDENTIFY_DEVICE = 48, 92984 ATA_LOG_SECURITY = 6, 92985 ATA_LOG_SATA_SETTINGS = 8, 92986 ATA_LOG_ZONED_INFORMATION = 9, 92987 ATA_LOG_DEVSLP_OFFSET = 48, 92988 ATA_LOG_DEVSLP_SIZE = 8, 92989 ATA_LOG_DEVSLP_MDAT = 0, 92990 ATA_LOG_DEVSLP_MDAT_MASK = 31, 92991 ATA_LOG_DEVSLP_DETO = 1, 92992 ATA_LOG_DEVSLP_VALID = 7, 92993 ATA_LOG_DEVSLP_VALID_MASK = 128, 92994 ATA_LOG_NCQ_PRIO_OFFSET = 9, 92995 ATA_LOG_NCQ_SEND_RECV_SUBCMDS_OFFSET = 0, 92996 ATA_LOG_NCQ_SEND_RECV_SUBCMDS_DSM = 1, 92997 ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET = 4, 92998 ATA_LOG_NCQ_SEND_RECV_DSM_TRIM = 1, 92999 ATA_LOG_NCQ_SEND_RECV_RD_LOG_OFFSET = 8, 93000 ATA_LOG_NCQ_SEND_RECV_RD_LOG_SUPPORTED = 1, 93001 ATA_LOG_NCQ_SEND_RECV_WR_LOG_OFFSET = 12, 93002 ATA_LOG_NCQ_SEND_RECV_WR_LOG_SUPPORTED = 1, 93003 ATA_LOG_NCQ_SEND_RECV_ZAC_MGMT_OFFSET = 16, 93004 ATA_LOG_NCQ_SEND_RECV_ZAC_MGMT_OUT_SUPPORTED = 1, 93005 ATA_LOG_NCQ_SEND_RECV_ZAC_MGMT_IN_SUPPORTED = 2, 93006 ATA_LOG_NCQ_SEND_RECV_SIZE = 20, 93007 ATA_LOG_NCQ_NON_DATA_SUBCMDS_OFFSET = 0, 93008 ATA_LOG_NCQ_NON_DATA_ABORT_OFFSET = 0, 93009 ATA_LOG_NCQ_NON_DATA_ABORT_NCQ = 1, 93010 ATA_LOG_NCQ_NON_DATA_ABORT_ALL = 2, 93011 ATA_LOG_NCQ_NON_DATA_ABORT_STREAMING = 4, 93012 ATA_LOG_NCQ_NON_DATA_ABORT_NON_STREAMING = 8, 93013 ATA_LOG_NCQ_NON_DATA_ABORT_SELECTED = 16, 93014 ATA_LOG_NCQ_NON_DATA_ZAC_MGMT_OFFSET = 28, 93015 ATA_LOG_NCQ_NON_DATA_ZAC_MGMT_OUT = 1, 93016 ATA_LOG_NCQ_NON_DATA_SIZE = 64, 93017 ATA_CMD_READ_LONG = 34, 93018 ATA_CMD_READ_LONG_ONCE = 35, 93019 ATA_CMD_WRITE_LONG = 50, 93020 ATA_CMD_WRITE_LONG_ONCE = 51, 93021 SETFEATURES_XFER = 3, 93022 XFER_UDMA_7 = 71, 93023 XFER_UDMA_6 = 70, 93024 XFER_UDMA_5 = 69, 93025 XFER_UDMA_4 = 68, 93026 XFER_UDMA_3 = 67, 93027 XFER_UDMA_2 = 66, 93028 XFER_UDMA_1 = 65, 93029 XFER_UDMA_0 = 64, 93030 XFER_MW_DMA_4 = 36, 93031 XFER_MW_DMA_3 = 35, 93032 XFER_MW_DMA_2 = 34, 93033 XFER_MW_DMA_1 = 33, 93034 XFER_MW_DMA_0 = 32, 93035 XFER_SW_DMA_2 = 18, 93036 XFER_SW_DMA_1 = 17, 93037 XFER_SW_DMA_0 = 16, 93038 XFER_PIO_6 = 14, 93039 XFER_PIO_5 = 13, 93040 XFER_PIO_4 = 12, 93041 XFER_PIO_3 = 11, 93042 XFER_PIO_2 = 10, 93043 XFER_PIO_1 = 9, 93044 XFER_PIO_0 = 8, 93045 XFER_PIO_SLOW = 0, 93046 SETFEATURES_WC_ON = 2, 93047 SETFEATURES_WC_OFF = 130, 93048 SETFEATURES_RA_ON = 170, 93049 SETFEATURES_RA_OFF = 85, 93050 SETFEATURES_AAM_ON = 66, 93051 SETFEATURES_AAM_OFF = 194, 93052 SETFEATURES_SPINUP = 7, 93053 SETFEATURES_SPINUP_TIMEOUT = 30000, 93054 SETFEATURES_SATA_ENABLE = 16, 93055 SETFEATURES_SATA_DISABLE = 144, 93056 SATA_FPDMA_OFFSET = 1, 93057 SATA_FPDMA_AA = 2, 93058 SATA_DIPM = 3, 93059 SATA_FPDMA_IN_ORDER = 4, 93060 SATA_AN = 5, 93061 SATA_SSP = 6, 93062 SATA_DEVSLP = 9, 93063 SETFEATURE_SENSE_DATA = 195, 93064 ATA_SET_MAX_ADDR = 0, 93065 ATA_SET_MAX_PASSWD = 1, 93066 ATA_SET_MAX_LOCK = 2, 93067 ATA_SET_MAX_UNLOCK = 3, 93068 ATA_SET_MAX_FREEZE_LOCK = 4, 93069 ATA_SET_MAX_PASSWD_DMA = 5, 93070 ATA_SET_MAX_UNLOCK_DMA = 6, 93071 ATA_DCO_RESTORE = 192, 93072 ATA_DCO_FREEZE_LOCK = 193, 93073 ATA_DCO_IDENTIFY = 194, 93074 ATA_DCO_SET = 195, 93075 ATA_SMART_ENABLE = 216, 93076 ATA_SMART_READ_VALUES = 208, 93077 ATA_SMART_READ_THRESHOLDS = 209, 93078 ATA_DSM_TRIM = 1, 93079 ATA_SMART_LBAM_PASS = 79, 93080 ATA_SMART_LBAH_PASS = 194, 93081 ATAPI_PKT_DMA = 1, 93082 ATAPI_DMADIR = 4, 93083 ATAPI_CDB_LEN = 16, 93084 SATA_PMP_MAX_PORTS = 15, 93085 SATA_PMP_CTRL_PORT = 15, 93086 SATA_PMP_GSCR_DWORDS = 128, 93087 SATA_PMP_GSCR_PROD_ID = 0, 93088 SATA_PMP_GSCR_REV = 1, 93089 SATA_PMP_GSCR_PORT_INFO = 2, 93090 SATA_PMP_GSCR_ERROR = 32, 93091 SATA_PMP_GSCR_ERROR_EN = 33, 93092 SATA_PMP_GSCR_FEAT = 64, 93093 SATA_PMP_GSCR_FEAT_EN = 96, 93094 SATA_PMP_PSCR_STATUS = 0, 93095 SATA_PMP_PSCR_ERROR = 1, 93096 SATA_PMP_PSCR_CONTROL = 2, 93097 SATA_PMP_FEAT_BIST = 1, 93098 SATA_PMP_FEAT_PMREQ = 2, 93099 SATA_PMP_FEAT_DYNSSC = 4, 93100 SATA_PMP_FEAT_NOTIFY = 8, 93101 ATA_CBL_NONE = 0, 93102 ATA_CBL_PATA40 = 1, 93103 ATA_CBL_PATA80 = 2, 93104 ATA_CBL_PATA40_SHORT = 3, 93105 ATA_CBL_PATA_UNK = 4, 93106 ATA_CBL_PATA_IGN = 5, 93107 ATA_CBL_SATA = 6, 93108 SCR_STATUS = 0, 93109 SCR_ERROR = 1, 93110 SCR_CONTROL = 2, 93111 SCR_ACTIVE = 3, 93112 SCR_NOTIFICATION = 4, 93113 SERR_DATA_RECOVERED = 1, 93114 SERR_COMM_RECOVERED = 2, 93115 SERR_DATA = 256, 93116 SERR_PERSISTENT = 512, 93117 SERR_PROTOCOL = 1024, 93118 SERR_INTERNAL = 2048, 93119 SERR_PHYRDY_CHG = 65536, 93120 SERR_PHY_INT_ERR = 131072, 93121 SERR_COMM_WAKE = 262144, 93122 SERR_10B_8B_ERR = 524288, 93123 SERR_DISPARITY = 1048576, 93124 SERR_CRC = 2097152, 93125 SERR_HANDSHAKE = 4194304, 93126 SERR_LINK_SEQ_ERR = 8388608, 93127 SERR_TRANS_ST_ERROR = 16777216, 93128 SERR_UNRECOG_FIS = 33554432, 93129 SERR_DEV_XCHG = 67108864, 93130 }; 93131 93132 enum ata_prot_flags { 93133 ATA_PROT_FLAG_PIO = 1, 93134 ATA_PROT_FLAG_DMA = 2, 93135 ATA_PROT_FLAG_NCQ = 4, 93136 ATA_PROT_FLAG_ATAPI = 8, 93137 ATA_PROT_UNKNOWN = 255, 93138 ATA_PROT_NODATA = 0, 93139 ATA_PROT_PIO = 1, 93140 ATA_PROT_DMA = 2, 93141 ATA_PROT_NCQ_NODATA = 4, 93142 ATA_PROT_NCQ = 6, 93143 ATAPI_PROT_NODATA = 8, 93144 ATAPI_PROT_PIO = 9, 93145 ATAPI_PROT_DMA = 10, 93146 }; 93147 93148 struct ata_bmdma_prd { 93149 __le32 addr; 93150 __le32 flags_len; 93151 }; 93152 93153 enum { 93154 ATA_MSG_DRV = 1, 93155 ATA_MSG_INFO = 2, 93156 ATA_MSG_PROBE = 4, 93157 ATA_MSG_WARN = 8, 93158 ATA_MSG_MALLOC = 16, 93159 ATA_MSG_CTL = 32, 93160 ATA_MSG_INTR = 64, 93161 ATA_MSG_ERR = 128, 93162 }; 93163 93164 enum { 93165 LIBATA_MAX_PRD = 128, 93166 LIBATA_DUMB_MAX_PRD = 64, 93167 ATA_DEF_QUEUE = 1, 93168 ATA_MAX_QUEUE = 32, 93169 ATA_TAG_INTERNAL = 32, 93170 ATA_SHORT_PAUSE = 16, 93171 ATAPI_MAX_DRAIN = 16384, 93172 ATA_ALL_DEVICES = 3, 93173 ATA_SHT_EMULATED = 1, 93174 ATA_SHT_THIS_ID = 4294967295, 93175 ATA_TFLAG_LBA48 = 1, 93176 ATA_TFLAG_ISADDR = 2, 93177 ATA_TFLAG_DEVICE = 4, 93178 ATA_TFLAG_WRITE = 8, 93179 ATA_TFLAG_LBA = 16, 93180 ATA_TFLAG_FUA = 32, 93181 ATA_TFLAG_POLLING = 64, 93182 ATA_DFLAG_LBA = 1, 93183 ATA_DFLAG_LBA48 = 2, 93184 ATA_DFLAG_CDB_INTR = 4, 93185 ATA_DFLAG_NCQ = 8, 93186 ATA_DFLAG_FLUSH_EXT = 16, 93187 ATA_DFLAG_ACPI_PENDING = 32, 93188 ATA_DFLAG_ACPI_FAILED = 64, 93189 ATA_DFLAG_AN = 128, 93190 ATA_DFLAG_TRUSTED = 256, 93191 ATA_DFLAG_DMADIR = 1024, 93192 ATA_DFLAG_CFG_MASK = 4095, 93193 ATA_DFLAG_PIO = 4096, 93194 ATA_DFLAG_NCQ_OFF = 8192, 93195 ATA_DFLAG_SLEEPING = 32768, 93196 ATA_DFLAG_DUBIOUS_XFER = 65536, 93197 ATA_DFLAG_NO_UNLOAD = 131072, 93198 ATA_DFLAG_UNLOCK_HPA = 262144, 93199 ATA_DFLAG_NCQ_SEND_RECV = 524288, 93200 ATA_DFLAG_NCQ_PRIO = 1048576, 93201 ATA_DFLAG_NCQ_PRIO_ENABLE = 2097152, 93202 ATA_DFLAG_INIT_MASK = 16777215, 93203 ATA_DFLAG_DETACH = 16777216, 93204 ATA_DFLAG_DETACHED = 33554432, 93205 ATA_DFLAG_DA = 67108864, 93206 ATA_DFLAG_DEVSLP = 134217728, 93207 ATA_DFLAG_ACPI_DISABLED = 268435456, 93208 ATA_DFLAG_D_SENSE = 536870912, 93209 ATA_DFLAG_ZAC = 1073741824, 93210 ATA_DEV_UNKNOWN = 0, 93211 ATA_DEV_ATA = 1, 93212 ATA_DEV_ATA_UNSUP = 2, 93213 ATA_DEV_ATAPI = 3, 93214 ATA_DEV_ATAPI_UNSUP = 4, 93215 ATA_DEV_PMP = 5, 93216 ATA_DEV_PMP_UNSUP = 6, 93217 ATA_DEV_SEMB = 7, 93218 ATA_DEV_SEMB_UNSUP = 8, 93219 ATA_DEV_ZAC = 9, 93220 ATA_DEV_ZAC_UNSUP = 10, 93221 ATA_DEV_NONE = 11, 93222 ATA_LFLAG_NO_HRST = 2, 93223 ATA_LFLAG_NO_SRST = 4, 93224 ATA_LFLAG_ASSUME_ATA = 8, 93225 ATA_LFLAG_ASSUME_SEMB = 16, 93226 ATA_LFLAG_ASSUME_CLASS = 24, 93227 ATA_LFLAG_NO_RETRY = 32, 93228 ATA_LFLAG_DISABLED = 64, 93229 ATA_LFLAG_SW_ACTIVITY = 128, 93230 ATA_LFLAG_NO_LPM = 256, 93231 ATA_LFLAG_RST_ONCE = 512, 93232 ATA_LFLAG_CHANGED = 1024, 93233 ATA_LFLAG_NO_DB_DELAY = 2048, 93234 ATA_FLAG_SLAVE_POSS = 1, 93235 ATA_FLAG_SATA = 2, 93236 ATA_FLAG_NO_LPM = 4, 93237 ATA_FLAG_NO_LOG_PAGE = 32, 93238 ATA_FLAG_NO_ATAPI = 64, 93239 ATA_FLAG_PIO_DMA = 128, 93240 ATA_FLAG_PIO_LBA48 = 256, 93241 ATA_FLAG_PIO_POLLING = 512, 93242 ATA_FLAG_NCQ = 1024, 93243 ATA_FLAG_NO_POWEROFF_SPINDOWN = 2048, 93244 ATA_FLAG_NO_HIBERNATE_SPINDOWN = 4096, 93245 ATA_FLAG_DEBUGMSG = 8192, 93246 ATA_FLAG_FPDMA_AA = 16384, 93247 ATA_FLAG_IGN_SIMPLEX = 32768, 93248 ATA_FLAG_NO_IORDY = 65536, 93249 ATA_FLAG_ACPI_SATA = 131072, 93250 ATA_FLAG_AN = 262144, 93251 ATA_FLAG_PMP = 524288, 93252 ATA_FLAG_FPDMA_AUX = 1048576, 93253 ATA_FLAG_EM = 2097152, 93254 ATA_FLAG_SW_ACTIVITY = 4194304, 93255 ATA_FLAG_NO_DIPM = 8388608, 93256 ATA_FLAG_SAS_HOST = 16777216, 93257 ATA_PFLAG_EH_PENDING = 1, 93258 ATA_PFLAG_EH_IN_PROGRESS = 2, 93259 ATA_PFLAG_FROZEN = 4, 93260 ATA_PFLAG_RECOVERED = 8, 93261 ATA_PFLAG_LOADING = 16, 93262 ATA_PFLAG_SCSI_HOTPLUG = 64, 93263 ATA_PFLAG_INITIALIZING = 128, 93264 ATA_PFLAG_RESETTING = 256, 93265 ATA_PFLAG_UNLOADING = 512, 93266 ATA_PFLAG_UNLOADED = 1024, 93267 ATA_PFLAG_SUSPENDED = 131072, 93268 ATA_PFLAG_PM_PENDING = 262144, 93269 ATA_PFLAG_INIT_GTM_VALID = 524288, 93270 ATA_PFLAG_PIO32 = 1048576, 93271 ATA_PFLAG_PIO32CHANGE = 2097152, 93272 ATA_PFLAG_EXTERNAL = 4194304, 93273 ATA_QCFLAG_ACTIVE = 1, 93274 ATA_QCFLAG_DMAMAP = 2, 93275 ATA_QCFLAG_IO = 8, 93276 ATA_QCFLAG_RESULT_TF = 16, 93277 ATA_QCFLAG_CLEAR_EXCL = 32, 93278 ATA_QCFLAG_QUIET = 64, 93279 ATA_QCFLAG_RETRY = 128, 93280 ATA_QCFLAG_FAILED = 65536, 93281 ATA_QCFLAG_SENSE_VALID = 131072, 93282 ATA_QCFLAG_EH_SCHEDULED = 262144, 93283 ATA_HOST_SIMPLEX = 1, 93284 ATA_HOST_STARTED = 2, 93285 ATA_HOST_PARALLEL_SCAN = 4, 93286 ATA_HOST_IGNORE_ATA = 8, 93287 ATA_TMOUT_BOOT = 30000, 93288 ATA_TMOUT_BOOT_QUICK = 7000, 93289 ATA_TMOUT_INTERNAL_QUICK = 5000, 93290 ATA_TMOUT_MAX_PARK = 30000, 93291 ATA_TMOUT_FF_WAIT_LONG = 2000, 93292 ATA_TMOUT_FF_WAIT = 800, 93293 ATA_WAIT_AFTER_RESET = 150, 93294 ATA_TMOUT_PMP_SRST_WAIT = 5000, 93295 ATA_TMOUT_SPURIOUS_PHY = 10000, 93296 BUS_UNKNOWN = 0, 93297 BUS_DMA = 1, 93298 BUS_IDLE = 2, 93299 BUS_NOINTR = 3, 93300 BUS_NODATA = 4, 93301 BUS_TIMER = 5, 93302 BUS_PIO = 6, 93303 BUS_EDD = 7, 93304 BUS_IDENTIFY = 8, 93305 BUS_PACKET = 9, 93306 PORT_UNKNOWN = 0, 93307 PORT_ENABLED = 1, 93308 PORT_DISABLED = 2, 93309 ATA_NR_PIO_MODES = 7, 93310 ATA_NR_MWDMA_MODES = 5, 93311 ATA_NR_UDMA_MODES = 8, 93312 ATA_SHIFT_PIO = 0, 93313 ATA_SHIFT_MWDMA = 7, 93314 ATA_SHIFT_UDMA = 12, 93315 ATA_SHIFT_PRIO = 6, 93316 ATA_PRIO_HIGH = 2, 93317 ATA_DMA_PAD_SZ = 4, 93318 ATA_ERING_SIZE = 32, 93319 ATA_DEFER_LINK = 1, 93320 ATA_DEFER_PORT = 2, 93321 ATA_EH_DESC_LEN = 80, 93322 ATA_EH_REVALIDATE = 1, 93323 ATA_EH_SOFTRESET = 2, 93324 ATA_EH_HARDRESET = 4, 93325 ATA_EH_RESET = 6, 93326 ATA_EH_ENABLE_LINK = 8, 93327 ATA_EH_PARK = 32, 93328 ATA_EH_PERDEV_MASK = 33, 93329 ATA_EH_ALL_ACTIONS = 15, 93330 ATA_EHI_HOTPLUGGED = 1, 93331 ATA_EHI_NO_AUTOPSY = 4, 93332 ATA_EHI_QUIET = 8, 93333 ATA_EHI_NO_RECOVERY = 16, 93334 ATA_EHI_DID_SOFTRESET = 65536, 93335 ATA_EHI_DID_HARDRESET = 131072, 93336 ATA_EHI_PRINTINFO = 262144, 93337 ATA_EHI_SETMODE = 524288, 93338 ATA_EHI_POST_SETMODE = 1048576, 93339 ATA_EHI_DID_RESET = 196608, 93340 ATA_EHI_TO_SLAVE_MASK = 12, 93341 ATA_EH_MAX_TRIES = 5, 93342 ATA_LINK_RESUME_TRIES = 5, 93343 ATA_PROBE_MAX_TRIES = 3, 93344 ATA_EH_DEV_TRIES = 3, 93345 ATA_EH_PMP_TRIES = 5, 93346 ATA_EH_PMP_LINK_TRIES = 3, 93347 SATA_PMP_RW_TIMEOUT = 3000, 93348 ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, 93349 ATA_HORKAGE_DIAGNOSTIC = 1, 93350 ATA_HORKAGE_NODMA = 2, 93351 ATA_HORKAGE_NONCQ = 4, 93352 ATA_HORKAGE_MAX_SEC_128 = 8, 93353 ATA_HORKAGE_BROKEN_HPA = 16, 93354 ATA_HORKAGE_DISABLE = 32, 93355 ATA_HORKAGE_HPA_SIZE = 64, 93356 ATA_HORKAGE_IVB = 256, 93357 ATA_HORKAGE_STUCK_ERR = 512, 93358 ATA_HORKAGE_BRIDGE_OK = 1024, 93359 ATA_HORKAGE_ATAPI_MOD16_DMA = 2048, 93360 ATA_HORKAGE_FIRMWARE_WARN = 4096, 93361 ATA_HORKAGE_1_5_GBPS = 8192, 93362 ATA_HORKAGE_NOSETXFER = 16384, 93363 ATA_HORKAGE_BROKEN_FPDMA_AA = 32768, 93364 ATA_HORKAGE_DUMP_ID = 65536, 93365 ATA_HORKAGE_MAX_SEC_LBA48 = 131072, 93366 ATA_HORKAGE_ATAPI_DMADIR = 262144, 93367 ATA_HORKAGE_NO_NCQ_TRIM = 524288, 93368 ATA_HORKAGE_NOLPM = 1048576, 93369 ATA_HORKAGE_WD_BROKEN_LPM = 2097152, 93370 ATA_HORKAGE_ZERO_AFTER_TRIM = 4194304, 93371 ATA_HORKAGE_NO_DMA_LOG = 8388608, 93372 ATA_HORKAGE_NOTRIM = 16777216, 93373 ATA_HORKAGE_MAX_SEC_1024 = 33554432, 93374 ATA_HORKAGE_MAX_TRIM_128M = 67108864, 93375 ATA_DMA_MASK_ATA = 1, 93376 ATA_DMA_MASK_ATAPI = 2, 93377 ATA_DMA_MASK_CFA = 4, 93378 ATAPI_READ = 0, 93379 ATAPI_WRITE = 1, 93380 ATAPI_READ_CD = 2, 93381 ATAPI_PASS_THRU = 3, 93382 ATAPI_MISC = 4, 93383 ATA_TIMING_SETUP = 1, 93384 ATA_TIMING_ACT8B = 2, 93385 ATA_TIMING_REC8B = 4, 93386 ATA_TIMING_CYC8B = 8, 93387 ATA_TIMING_8BIT = 14, 93388 ATA_TIMING_ACTIVE = 16, 93389 ATA_TIMING_RECOVER = 32, 93390 ATA_TIMING_DMACK_HOLD = 64, 93391 ATA_TIMING_CYCLE = 128, 93392 ATA_TIMING_UDMA = 256, 93393 ATA_TIMING_ALL = 511, 93394 ATA_ACPI_FILTER_SETXFER = 1, 93395 ATA_ACPI_FILTER_LOCK = 2, 93396 ATA_ACPI_FILTER_DIPM = 4, 93397 ATA_ACPI_FILTER_FPDMA_OFFSET = 8, 93398 ATA_ACPI_FILTER_FPDMA_AA = 16, 93399 ATA_ACPI_FILTER_DEFAULT = 7, 93400 }; 93401 93402 enum ata_xfer_mask { 93403 ATA_MASK_PIO = 127, 93404 ATA_MASK_MWDMA = 3968, 93405 ATA_MASK_UDMA = 1044480, 93406 }; 93407 93408 enum ata_completion_errors { 93409 AC_ERR_OK = 0, 93410 AC_ERR_DEV = 1, 93411 AC_ERR_HSM = 2, 93412 AC_ERR_TIMEOUT = 4, 93413 AC_ERR_MEDIA = 8, 93414 AC_ERR_ATA_BUS = 16, 93415 AC_ERR_HOST_BUS = 32, 93416 AC_ERR_SYSTEM = 64, 93417 AC_ERR_INVALID = 128, 93418 AC_ERR_OTHER = 256, 93419 AC_ERR_NODEV_HINT = 512, 93420 AC_ERR_NCQ = 1024, 93421 }; 93422 93423 enum ata_lpm_policy { 93424 ATA_LPM_UNKNOWN = 0, 93425 ATA_LPM_MAX_POWER = 1, 93426 ATA_LPM_MED_POWER = 2, 93427 ATA_LPM_MED_POWER_WITH_DIPM = 3, 93428 ATA_LPM_MIN_POWER_WITH_PARTIAL = 4, 93429 ATA_LPM_MIN_POWER = 5, 93430 }; 93431 93432 struct ata_queued_cmd; 93433 93434 typedef void (*ata_qc_cb_t)(struct ata_queued_cmd *); 93435 93436 struct ata_taskfile { 93437 long unsigned int flags; 93438 u8 protocol; 93439 u8 ctl; 93440 u8 hob_feature; 93441 u8 hob_nsect; 93442 u8 hob_lbal; 93443 u8 hob_lbam; 93444 u8 hob_lbah; 93445 u8 feature; 93446 u8 nsect; 93447 u8 lbal; 93448 u8 lbam; 93449 u8 lbah; 93450 u8 device; 93451 u8 command; 93452 u32 auxiliary; 93453 }; 93454 93455 struct ata_port; 93456 93457 struct ata_device; 93458 93459 struct ata_queued_cmd { 93460 struct ata_port *ap; 93461 struct ata_device *dev; 93462 struct scsi_cmnd *scsicmd; 93463 void (*scsidone)(struct scsi_cmnd *); 93464 struct ata_taskfile tf; 93465 u8 cdb[16]; 93466 long unsigned int flags; 93467 unsigned int tag; 93468 unsigned int hw_tag; 93469 unsigned int n_elem; 93470 unsigned int orig_n_elem; 93471 int dma_dir; 93472 unsigned int sect_size; 93473 unsigned int nbytes; 93474 unsigned int extrabytes; 93475 unsigned int curbytes; 93476 struct scatterlist sgent; 93477 struct scatterlist *sg; 93478 struct scatterlist *cursg; 93479 unsigned int cursg_ofs; 93480 unsigned int err_mask; 93481 struct ata_taskfile result_tf; 93482 ata_qc_cb_t complete_fn; 93483 void *private_data; 93484 void *lldd_task; 93485 }; 93486 93487 struct ata_link; 93488 93489 typedef int (*ata_prereset_fn_t)(struct ata_link *, long unsigned int); 93490 93491 struct ata_eh_info { 93492 struct ata_device *dev; 93493 u32 serror; 93494 unsigned int err_mask; 93495 unsigned int action; 93496 unsigned int dev_action[2]; 93497 unsigned int flags; 93498 unsigned int probe_mask; 93499 char desc[80]; 93500 int desc_len; 93501 }; 93502 93503 struct ata_eh_context { 93504 struct ata_eh_info i; 93505 int tries[2]; 93506 int cmd_timeout_idx[12]; 93507 unsigned int classes[2]; 93508 unsigned int did_probe_mask; 93509 unsigned int unloaded_mask; 93510 unsigned int saved_ncq_enabled; 93511 u8 saved_xfer_mode[2]; 93512 long unsigned int last_reset; 93513 }; 93514 93515 struct ata_ering_entry { 93516 unsigned int eflags; 93517 unsigned int err_mask; 93518 u64 timestamp; 93519 }; 93520 93521 struct ata_ering { 93522 int cursor; 93523 struct ata_ering_entry ring[32]; 93524 }; 93525 93526 struct ata_device { 93527 struct ata_link *link; 93528 unsigned int devno; 93529 unsigned int horkage; 93530 long unsigned int flags; 93531 struct scsi_device *sdev; 93532 void *private_data; 93533 union acpi_object *gtf_cache; 93534 unsigned int gtf_filter; 93535 struct device tdev; 93536 u64 n_sectors; 93537 u64 n_native_sectors; 93538 unsigned int class; 93539 long unsigned int unpark_deadline; 93540 u8 pio_mode; 93541 u8 dma_mode; 93542 u8 xfer_mode; 93543 unsigned int xfer_shift; 93544 unsigned int multi_count; 93545 unsigned int max_sectors; 93546 unsigned int cdb_len; 93547 long unsigned int pio_mask; 93548 long unsigned int mwdma_mask; 93549 long unsigned int udma_mask; 93550 u16 cylinders; 93551 u16 heads; 93552 u16 sectors; 93553 long: 16; 93554 long: 64; 93555 long: 64; 93556 union { 93557 u16 id[256]; 93558 u32 gscr[128]; 93559 }; 93560 u8 devslp_timing[8]; 93561 u8 ncq_send_recv_cmds[20]; 93562 u8 ncq_non_data_cmds[64]; 93563 u32 zac_zoned_cap; 93564 u32 zac_zones_optimal_open; 93565 u32 zac_zones_optimal_nonseq; 93566 u32 zac_zones_max_open; 93567 int spdn_cnt; 93568 struct ata_ering ering; 93569 long: 64; 93570 }; 93571 93572 struct ata_link { 93573 struct ata_port *ap; 93574 int pmp; 93575 struct device tdev; 93576 unsigned int active_tag; 93577 u32 sactive; 93578 unsigned int flags; 93579 u32 saved_scontrol; 93580 unsigned int hw_sata_spd_limit; 93581 unsigned int sata_spd_limit; 93582 unsigned int sata_spd; 93583 enum ata_lpm_policy lpm_policy; 93584 struct ata_eh_info eh_info; 93585 struct ata_eh_context eh_context; 93586 long: 64; 93587 long: 64; 93588 long: 64; 93589 long: 64; 93590 long: 64; 93591 struct ata_device device[2]; 93592 long unsigned int last_lpm_change; 93593 long: 64; 93594 long: 64; 93595 long: 64; 93596 long: 64; 93597 long: 64; 93598 long: 64; 93599 long: 64; 93600 }; 93601 93602 typedef int (*ata_reset_fn_t)(struct ata_link *, unsigned int *, long unsigned int); 93603 93604 typedef void (*ata_postreset_fn_t)(struct ata_link *, unsigned int *); 93605 93606 enum sw_activity { 93607 OFF = 0, 93608 BLINK_ON = 1, 93609 BLINK_OFF = 2, 93610 }; 93611 93612 struct ata_ioports { 93613 void *cmd_addr; 93614 void *data_addr; 93615 void *error_addr; 93616 void *feature_addr; 93617 void *nsect_addr; 93618 void *lbal_addr; 93619 void *lbam_addr; 93620 void *lbah_addr; 93621 void *device_addr; 93622 void *status_addr; 93623 void *command_addr; 93624 void *altstatus_addr; 93625 void *ctl_addr; 93626 void *bmdma_addr; 93627 void *scr_addr; 93628 }; 93629 93630 struct ata_port_operations; 93631 93632 struct ata_host { 93633 spinlock_t lock; 93634 struct device *dev; 93635 void * const *iomap; 93636 unsigned int n_ports; 93637 unsigned int n_tags; 93638 void *private_data; 93639 struct ata_port_operations *ops; 93640 long unsigned int flags; 93641 struct kref kref; 93642 struct mutex eh_mutex; 93643 struct task_struct *eh_owner; 93644 struct ata_port *simplex_claimed; 93645 struct ata_port *ports[0]; 93646 }; 93647 93648 struct ata_port_operations { 93649 int (*qc_defer)(struct ata_queued_cmd *); 93650 int (*check_atapi_dma)(struct ata_queued_cmd *); 93651 enum ata_completion_errors (*qc_prep)(struct ata_queued_cmd *); 93652 unsigned int (*qc_issue)(struct ata_queued_cmd *); 93653 bool (*qc_fill_rtf)(struct ata_queued_cmd *); 93654 int (*cable_detect)(struct ata_port *); 93655 long unsigned int (*mode_filter)(struct ata_device *, long unsigned int); 93656 void (*set_piomode)(struct ata_port *, struct ata_device *); 93657 void (*set_dmamode)(struct ata_port *, struct ata_device *); 93658 int (*set_mode)(struct ata_link *, struct ata_device **); 93659 unsigned int (*read_id)(struct ata_device *, struct ata_taskfile *, u16 *); 93660 void (*dev_config)(struct ata_device *); 93661 void (*freeze)(struct ata_port *); 93662 void (*thaw)(struct ata_port *); 93663 ata_prereset_fn_t prereset; 93664 ata_reset_fn_t softreset; 93665 ata_reset_fn_t hardreset; 93666 ata_postreset_fn_t postreset; 93667 ata_prereset_fn_t pmp_prereset; 93668 ata_reset_fn_t pmp_softreset; 93669 ata_reset_fn_t pmp_hardreset; 93670 ata_postreset_fn_t pmp_postreset; 93671 void (*error_handler)(struct ata_port *); 93672 void (*lost_interrupt)(struct ata_port *); 93673 void (*post_internal_cmd)(struct ata_queued_cmd *); 93674 void (*sched_eh)(struct ata_port *); 93675 void (*end_eh)(struct ata_port *); 93676 int (*scr_read)(struct ata_link *, unsigned int, u32 *); 93677 int (*scr_write)(struct ata_link *, unsigned int, u32); 93678 void (*pmp_attach)(struct ata_port *); 93679 void (*pmp_detach)(struct ata_port *); 93680 int (*set_lpm)(struct ata_link *, enum ata_lpm_policy, unsigned int); 93681 int (*port_suspend)(struct ata_port *, pm_message_t); 93682 int (*port_resume)(struct ata_port *); 93683 int (*port_start)(struct ata_port *); 93684 void (*port_stop)(struct ata_port *); 93685 void (*host_stop)(struct ata_host *); 93686 void (*sff_dev_select)(struct ata_port *, unsigned int); 93687 void (*sff_set_devctl)(struct ata_port *, u8); 93688 u8 (*sff_check_status)(struct ata_port *); 93689 u8 (*sff_check_altstatus)(struct ata_port *); 93690 void (*sff_tf_load)(struct ata_port *, const struct ata_taskfile *); 93691 void (*sff_tf_read)(struct ata_port *, struct ata_taskfile *); 93692 void (*sff_exec_command)(struct ata_port *, const struct ata_taskfile *); 93693 unsigned int (*sff_data_xfer)(struct ata_queued_cmd *, unsigned char *, unsigned int, int); 93694 void (*sff_irq_on)(struct ata_port *); 93695 bool (*sff_irq_check)(struct ata_port *); 93696 void (*sff_irq_clear)(struct ata_port *); 93697 void (*sff_drain_fifo)(struct ata_queued_cmd *); 93698 void (*bmdma_setup)(struct ata_queued_cmd *); 93699 void (*bmdma_start)(struct ata_queued_cmd *); 93700 void (*bmdma_stop)(struct ata_queued_cmd *); 93701 u8 (*bmdma_status)(struct ata_port *); 93702 ssize_t (*em_show)(struct ata_port *, char *); 93703 ssize_t (*em_store)(struct ata_port *, const char *, size_t); 93704 ssize_t (*sw_activity_show)(struct ata_device *, char *); 93705 ssize_t (*sw_activity_store)(struct ata_device *, enum sw_activity); 93706 ssize_t (*transmit_led_message)(struct ata_port *, u32, ssize_t); 93707 void (*phy_reset)(struct ata_port *); 93708 void (*eng_timeout)(struct ata_port *); 93709 const struct ata_port_operations *inherits; 93710 }; 93711 93712 struct ata_port_stats { 93713 long unsigned int unhandled_irq; 93714 long unsigned int idle_irq; 93715 long unsigned int rw_reqbuf; 93716 }; 93717 93718 struct ata_acpi_drive { 93719 u32 pio; 93720 u32 dma; 93721 }; 93722 93723 struct ata_acpi_gtm { 93724 struct ata_acpi_drive drive[2]; 93725 u32 flags; 93726 }; 93727 93728 struct ata_port { 93729 struct Scsi_Host *scsi_host; 93730 struct ata_port_operations *ops; 93731 spinlock_t *lock; 93732 long unsigned int flags; 93733 unsigned int pflags; 93734 unsigned int print_id; 93735 unsigned int local_port_no; 93736 unsigned int port_no; 93737 struct ata_ioports ioaddr; 93738 u8 ctl; 93739 u8 last_ctl; 93740 struct ata_link *sff_pio_task_link; 93741 struct delayed_work sff_pio_task; 93742 struct ata_bmdma_prd *bmdma_prd; 93743 dma_addr_t bmdma_prd_dma; 93744 unsigned int pio_mask; 93745 unsigned int mwdma_mask; 93746 unsigned int udma_mask; 93747 unsigned int cbl; 93748 struct ata_queued_cmd qcmd[33]; 93749 long unsigned int sas_tag_allocated; 93750 u64 qc_active; 93751 int nr_active_links; 93752 unsigned int sas_last_tag; 93753 long: 64; 93754 struct ata_link link; 93755 struct ata_link *slave_link; 93756 int nr_pmp_links; 93757 struct ata_link *pmp_link; 93758 struct ata_link *excl_link; 93759 struct ata_port_stats stats; 93760 struct ata_host *host; 93761 struct device *dev; 93762 struct device tdev; 93763 struct mutex scsi_scan_mutex; 93764 struct delayed_work hotplug_task; 93765 struct work_struct scsi_rescan_task; 93766 unsigned int hsm_task_state; 93767 u32 msg_enable; 93768 struct list_head eh_done_q; 93769 wait_queue_head_t eh_wait_q; 93770 int eh_tries; 93771 struct completion park_req_pending; 93772 pm_message_t pm_mesg; 93773 enum ata_lpm_policy target_lpm_policy; 93774 struct timer_list fastdrain_timer; 93775 long unsigned int fastdrain_cnt; 93776 async_cookie_t cookie; 93777 int em_message_type; 93778 void *private_data; 93779 struct ata_acpi_gtm __acpi_init_gtm; 93780 int: 32; 93781 u8 sector_buf[512]; 93782 }; 93783 93784 struct ata_port_info { 93785 long unsigned int flags; 93786 long unsigned int link_flags; 93787 long unsigned int pio_mask; 93788 long unsigned int mwdma_mask; 93789 long unsigned int udma_mask; 93790 struct ata_port_operations *port_ops; 93791 void *private_data; 93792 }; 93793 93794 struct ata_timing { 93795 short unsigned int mode; 93796 short unsigned int setup; 93797 short unsigned int act8b; 93798 short unsigned int rec8b; 93799 short unsigned int cyc8b; 93800 short unsigned int active; 93801 short unsigned int recover; 93802 short unsigned int dmack_hold; 93803 short unsigned int cycle; 93804 short unsigned int udma; 93805 }; 93806 93807 struct pci_bits { 93808 unsigned int reg; 93809 unsigned int width; 93810 long unsigned int mask; 93811 long unsigned int val; 93812 }; 93813 93814 enum ata_link_iter_mode { 93815 ATA_LITER_EDGE = 0, 93816 ATA_LITER_HOST_FIRST = 1, 93817 ATA_LITER_PMP_FIRST = 2, 93818 }; 93819 93820 enum ata_dev_iter_mode { 93821 ATA_DITER_ENABLED = 0, 93822 ATA_DITER_ENABLED_REVERSE = 1, 93823 ATA_DITER_ALL = 2, 93824 ATA_DITER_ALL_REVERSE = 3, 93825 }; 93826 93827 struct trace_event_raw_ata_qc_issue { 93828 struct trace_entry ent; 93829 unsigned int ata_port; 93830 unsigned int ata_dev; 93831 unsigned int tag; 93832 unsigned char cmd; 93833 unsigned char dev; 93834 unsigned char lbal; 93835 unsigned char lbam; 93836 unsigned char lbah; 93837 unsigned char nsect; 93838 unsigned char feature; 93839 unsigned char hob_lbal; 93840 unsigned char hob_lbam; 93841 unsigned char hob_lbah; 93842 unsigned char hob_nsect; 93843 unsigned char hob_feature; 93844 unsigned char ctl; 93845 unsigned char proto; 93846 long unsigned int flags; 93847 char __data[0]; 93848 }; 93849 93850 struct trace_event_raw_ata_qc_complete_template { 93851 struct trace_entry ent; 93852 unsigned int ata_port; 93853 unsigned int ata_dev; 93854 unsigned int tag; 93855 unsigned char status; 93856 unsigned char dev; 93857 unsigned char lbal; 93858 unsigned char lbam; 93859 unsigned char lbah; 93860 unsigned char nsect; 93861 unsigned char error; 93862 unsigned char hob_lbal; 93863 unsigned char hob_lbam; 93864 unsigned char hob_lbah; 93865 unsigned char hob_nsect; 93866 unsigned char hob_feature; 93867 unsigned char ctl; 93868 long unsigned int flags; 93869 char __data[0]; 93870 }; 93871 93872 struct trace_event_raw_ata_eh_link_autopsy { 93873 struct trace_entry ent; 93874 unsigned int ata_port; 93875 unsigned int ata_dev; 93876 unsigned int eh_action; 93877 unsigned int eh_err_mask; 93878 char __data[0]; 93879 }; 93880 93881 struct trace_event_raw_ata_eh_link_autopsy_qc { 93882 struct trace_entry ent; 93883 unsigned int ata_port; 93884 unsigned int ata_dev; 93885 unsigned int tag; 93886 unsigned int qc_flags; 93887 unsigned int eh_err_mask; 93888 char __data[0]; 93889 }; 93890 93891 struct trace_event_data_offsets_ata_qc_issue {}; 93892 93893 struct trace_event_data_offsets_ata_qc_complete_template {}; 93894 93895 struct trace_event_data_offsets_ata_eh_link_autopsy {}; 93896 93897 struct trace_event_data_offsets_ata_eh_link_autopsy_qc {}; 93898 93899 typedef void (*btf_trace_ata_qc_issue)(void *, struct ata_queued_cmd *); 93900 93901 typedef void (*btf_trace_ata_qc_complete_internal)(void *, struct ata_queued_cmd *); 93902 93903 typedef void (*btf_trace_ata_qc_complete_failed)(void *, struct ata_queued_cmd *); 93904 93905 typedef void (*btf_trace_ata_qc_complete_done)(void *, struct ata_queued_cmd *); 93906 93907 typedef void (*btf_trace_ata_eh_link_autopsy)(void *, struct ata_device *, unsigned int, unsigned int); 93908 93909 typedef void (*btf_trace_ata_eh_link_autopsy_qc)(void *, struct ata_queued_cmd *); 93910 93911 enum { 93912 ATA_READID_POSTRESET = 1, 93913 ATA_DNXFER_PIO = 0, 93914 ATA_DNXFER_DMA = 1, 93915 ATA_DNXFER_40C = 2, 93916 ATA_DNXFER_FORCE_PIO = 3, 93917 ATA_DNXFER_FORCE_PIO0 = 4, 93918 ATA_DNXFER_QUIET = 2147483648, 93919 }; 93920 93921 struct ata_force_param { 93922 const char *name; 93923 u8 cbl; 93924 u8 spd_limit; 93925 long unsigned int xfer_mask; 93926 unsigned int horkage_on; 93927 unsigned int horkage_off; 93928 u16 lflags; 93929 }; 93930 93931 struct ata_force_ent { 93932 int port; 93933 int device; 93934 struct ata_force_param param; 93935 }; 93936 93937 struct ata_xfer_ent { 93938 int shift; 93939 int bits; 93940 u8 base; 93941 }; 93942 93943 struct ata_blacklist_entry { 93944 const char *model_num; 93945 const char *model_rev; 93946 long unsigned int horkage; 93947 }; 93948 93949 typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *); 93950 93951 struct ata_scsi_args { 93952 struct ata_device *dev; 93953 u16 *id; 93954 struct scsi_cmnd *cmd; 93955 }; 93956 93957 enum ata_lpm_hints { 93958 ATA_LPM_EMPTY = 1, 93959 ATA_LPM_HIPM = 2, 93960 ATA_LPM_WAKE_ONLY = 4, 93961 }; 93962 93963 enum { 93964 ATA_EH_SPDN_NCQ_OFF = 1, 93965 ATA_EH_SPDN_SPEED_DOWN = 2, 93966 ATA_EH_SPDN_FALLBACK_TO_PIO = 4, 93967 ATA_EH_SPDN_KEEP_ERRORS = 8, 93968 ATA_EFLAG_IS_IO = 1, 93969 ATA_EFLAG_DUBIOUS_XFER = 2, 93970 ATA_EFLAG_OLD_ER = 2147483648, 93971 ATA_ECAT_NONE = 0, 93972 ATA_ECAT_ATA_BUS = 1, 93973 ATA_ECAT_TOUT_HSM = 2, 93974 ATA_ECAT_UNK_DEV = 3, 93975 ATA_ECAT_DUBIOUS_NONE = 4, 93976 ATA_ECAT_DUBIOUS_ATA_BUS = 5, 93977 ATA_ECAT_DUBIOUS_TOUT_HSM = 6, 93978 ATA_ECAT_DUBIOUS_UNK_DEV = 7, 93979 ATA_ECAT_NR = 8, 93980 ATA_EH_CMD_DFL_TIMEOUT = 5000, 93981 ATA_EH_RESET_COOL_DOWN = 5000, 93982 ATA_EH_PRERESET_TIMEOUT = 10000, 93983 ATA_EH_FASTDRAIN_INTERVAL = 3000, 93984 ATA_EH_UA_TRIES = 5, 93985 ATA_EH_PROBE_TRIAL_INTERVAL = 60000, 93986 ATA_EH_PROBE_TRIALS = 2, 93987 }; 93988 93989 struct ata_eh_cmd_timeout_ent { 93990 const u8 *commands; 93991 const long unsigned int *timeouts; 93992 }; 93993 93994 struct speed_down_verdict_arg { 93995 u64 since; 93996 int xfer_ok; 93997 int nr_errors[8]; 93998 }; 93999 94000 struct ata_internal { 94001 struct scsi_transport_template t; 94002 struct device_attribute private_port_attrs[3]; 94003 struct device_attribute private_link_attrs[3]; 94004 struct device_attribute private_dev_attrs[9]; 94005 struct transport_container link_attr_cont; 94006 struct transport_container dev_attr_cont; 94007 struct device_attribute *link_attrs[4]; 94008 struct device_attribute *port_attrs[4]; 94009 struct device_attribute *dev_attrs[10]; 94010 }; 94011 94012 struct ata_show_ering_arg { 94013 char *buf; 94014 int written; 94015 }; 94016 94017 enum hsm_task_states { 94018 HSM_ST_IDLE = 0, 94019 HSM_ST_FIRST = 1, 94020 HSM_ST = 2, 94021 HSM_ST_LAST = 3, 94022 HSM_ST_ERR = 4, 94023 }; 94024 94025 struct ata_acpi_gtf { 94026 u8 tf[7]; 94027 }; 94028 94029 struct ata_acpi_hotplug_context { 94030 struct acpi_hotplug_context hp; 94031 union { 94032 struct ata_port *ap; 94033 struct ata_device *dev; 94034 } data; 94035 }; 94036 94037 enum { 94038 AHCI_MAX_PORTS = 32, 94039 AHCI_MAX_CLKS = 5, 94040 AHCI_MAX_SG = 168, 94041 AHCI_DMA_BOUNDARY = 4294967295, 94042 AHCI_MAX_CMDS = 32, 94043 AHCI_CMD_SZ = 32, 94044 AHCI_CMD_SLOT_SZ = 1024, 94045 AHCI_RX_FIS_SZ = 256, 94046 AHCI_CMD_TBL_CDB = 64, 94047 AHCI_CMD_TBL_HDR_SZ = 128, 94048 AHCI_CMD_TBL_SZ = 2816, 94049 AHCI_CMD_TBL_AR_SZ = 90112, 94050 AHCI_PORT_PRIV_DMA_SZ = 91392, 94051 AHCI_PORT_PRIV_FBS_DMA_SZ = 95232, 94052 AHCI_IRQ_ON_SG = 2147483648, 94053 AHCI_CMD_ATAPI = 32, 94054 AHCI_CMD_WRITE = 64, 94055 AHCI_CMD_PREFETCH = 128, 94056 AHCI_CMD_RESET = 256, 94057 AHCI_CMD_CLR_BUSY = 1024, 94058 RX_FIS_PIO_SETUP = 32, 94059 RX_FIS_D2H_REG = 64, 94060 RX_FIS_SDB = 88, 94061 RX_FIS_UNK = 96, 94062 HOST_CAP = 0, 94063 HOST_CTL = 4, 94064 HOST_IRQ_STAT = 8, 94065 HOST_PORTS_IMPL = 12, 94066 HOST_VERSION = 16, 94067 HOST_EM_LOC = 28, 94068 HOST_EM_CTL = 32, 94069 HOST_CAP2 = 36, 94070 HOST_RESET = 1, 94071 HOST_IRQ_EN = 2, 94072 HOST_MRSM = 4, 94073 HOST_AHCI_EN = 2147483648, 94074 HOST_CAP_SXS = 32, 94075 HOST_CAP_EMS = 64, 94076 HOST_CAP_CCC = 128, 94077 HOST_CAP_PART = 8192, 94078 HOST_CAP_SSC = 16384, 94079 HOST_CAP_PIO_MULTI = 32768, 94080 HOST_CAP_FBS = 65536, 94081 HOST_CAP_PMP = 131072, 94082 HOST_CAP_ONLY = 262144, 94083 HOST_CAP_CLO = 16777216, 94084 HOST_CAP_LED = 33554432, 94085 HOST_CAP_ALPM = 67108864, 94086 HOST_CAP_SSS = 134217728, 94087 HOST_CAP_MPS = 268435456, 94088 HOST_CAP_SNTF = 536870912, 94089 HOST_CAP_NCQ = 1073741824, 94090 HOST_CAP_64 = 2147483648, 94091 HOST_CAP2_BOH = 1, 94092 HOST_CAP2_NVMHCI = 2, 94093 HOST_CAP2_APST = 4, 94094 HOST_CAP2_SDS = 8, 94095 HOST_CAP2_SADM = 16, 94096 HOST_CAP2_DESO = 32, 94097 PORT_LST_ADDR = 0, 94098 PORT_LST_ADDR_HI = 4, 94099 PORT_FIS_ADDR = 8, 94100 PORT_FIS_ADDR_HI = 12, 94101 PORT_IRQ_STAT = 16, 94102 PORT_IRQ_MASK = 20, 94103 PORT_CMD = 24, 94104 PORT_TFDATA = 32, 94105 PORT_SIG = 36, 94106 PORT_CMD_ISSUE = 56, 94107 PORT_SCR_STAT = 40, 94108 PORT_SCR_CTL = 44, 94109 PORT_SCR_ERR = 48, 94110 PORT_SCR_ACT = 52, 94111 PORT_SCR_NTF = 60, 94112 PORT_FBS = 64, 94113 PORT_DEVSLP = 68, 94114 PORT_IRQ_COLD_PRES = 2147483648, 94115 PORT_IRQ_TF_ERR = 1073741824, 94116 PORT_IRQ_HBUS_ERR = 536870912, 94117 PORT_IRQ_HBUS_DATA_ERR = 268435456, 94118 PORT_IRQ_IF_ERR = 134217728, 94119 PORT_IRQ_IF_NONFATAL = 67108864, 94120 PORT_IRQ_OVERFLOW = 16777216, 94121 PORT_IRQ_BAD_PMP = 8388608, 94122 PORT_IRQ_PHYRDY = 4194304, 94123 PORT_IRQ_DEV_ILCK = 128, 94124 PORT_IRQ_CONNECT = 64, 94125 PORT_IRQ_SG_DONE = 32, 94126 PORT_IRQ_UNK_FIS = 16, 94127 PORT_IRQ_SDB_FIS = 8, 94128 PORT_IRQ_DMAS_FIS = 4, 94129 PORT_IRQ_PIOS_FIS = 2, 94130 PORT_IRQ_D2H_REG_FIS = 1, 94131 PORT_IRQ_FREEZE = 683671632, 94132 PORT_IRQ_ERROR = 2025848912, 94133 DEF_PORT_IRQ = 2025848959, 94134 PORT_CMD_ASP = 134217728, 94135 PORT_CMD_ALPE = 67108864, 94136 PORT_CMD_ATAPI = 16777216, 94137 PORT_CMD_FBSCP = 4194304, 94138 PORT_CMD_ESP = 2097152, 94139 PORT_CMD_HPCP = 262144, 94140 PORT_CMD_PMP = 131072, 94141 PORT_CMD_LIST_ON = 32768, 94142 PORT_CMD_FIS_ON = 16384, 94143 PORT_CMD_FIS_RX = 16, 94144 PORT_CMD_CLO = 8, 94145 PORT_CMD_POWER_ON = 4, 94146 PORT_CMD_SPIN_UP = 2, 94147 PORT_CMD_START = 1, 94148 PORT_CMD_ICC_MASK = 4026531840, 94149 PORT_CMD_ICC_ACTIVE = 268435456, 94150 PORT_CMD_ICC_PARTIAL = 536870912, 94151 PORT_CMD_ICC_SLUMBER = 1610612736, 94152 PORT_FBS_DWE_OFFSET = 16, 94153 PORT_FBS_ADO_OFFSET = 12, 94154 PORT_FBS_DEV_OFFSET = 8, 94155 PORT_FBS_DEV_MASK = 3840, 94156 PORT_FBS_SDE = 4, 94157 PORT_FBS_DEC = 2, 94158 PORT_FBS_EN = 1, 94159 PORT_DEVSLP_DM_OFFSET = 25, 94160 PORT_DEVSLP_DM_MASK = 503316480, 94161 PORT_DEVSLP_DITO_OFFSET = 15, 94162 PORT_DEVSLP_MDAT_OFFSET = 10, 94163 PORT_DEVSLP_DETO_OFFSET = 2, 94164 PORT_DEVSLP_DSP = 2, 94165 PORT_DEVSLP_ADSE = 1, 94166 AHCI_HFLAG_NO_NCQ = 1, 94167 AHCI_HFLAG_IGN_IRQ_IF_ERR = 2, 94168 AHCI_HFLAG_IGN_SERR_INTERNAL = 4, 94169 AHCI_HFLAG_32BIT_ONLY = 8, 94170 AHCI_HFLAG_MV_PATA = 16, 94171 AHCI_HFLAG_NO_MSI = 32, 94172 AHCI_HFLAG_NO_PMP = 64, 94173 AHCI_HFLAG_SECT255 = 256, 94174 AHCI_HFLAG_YES_NCQ = 512, 94175 AHCI_HFLAG_NO_SUSPEND = 1024, 94176 AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = 2048, 94177 AHCI_HFLAG_NO_SNTF = 4096, 94178 AHCI_HFLAG_NO_FPDMA_AA = 8192, 94179 AHCI_HFLAG_YES_FBS = 16384, 94180 AHCI_HFLAG_DELAY_ENGINE = 32768, 94181 AHCI_HFLAG_NO_DEVSLP = 131072, 94182 AHCI_HFLAG_NO_FBS = 262144, 94183 AHCI_HFLAG_MULTI_MSI = 1048576, 94184 AHCI_HFLAG_WAKE_BEFORE_STOP = 4194304, 94185 AHCI_HFLAG_YES_ALPM = 8388608, 94186 AHCI_HFLAG_NO_WRITE_TO_RO = 16777216, 94187 AHCI_HFLAG_IS_MOBILE = 33554432, 94188 AHCI_HFLAG_SUSPEND_PHYS = 67108864, 94189 AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = 134217728, 94190 AHCI_FLAG_COMMON = 393346, 94191 ICH_MAP = 144, 94192 PCS_6 = 146, 94193 PCS_7 = 148, 94194 EM_MAX_SLOTS = 8, 94195 EM_MAX_RETRY = 5, 94196 EM_CTL_RST = 512, 94197 EM_CTL_TM = 256, 94198 EM_CTL_MR = 1, 94199 EM_CTL_ALHD = 67108864, 94200 EM_CTL_XMT = 33554432, 94201 EM_CTL_SMB = 16777216, 94202 EM_CTL_SGPIO = 524288, 94203 EM_CTL_SES = 262144, 94204 EM_CTL_SAFTE = 131072, 94205 EM_CTL_LED = 65536, 94206 EM_MSG_TYPE_LED = 1, 94207 EM_MSG_TYPE_SAFTE = 2, 94208 EM_MSG_TYPE_SES2 = 4, 94209 EM_MSG_TYPE_SGPIO = 8, 94210 }; 94211 94212 struct ahci_cmd_hdr { 94213 __le32 opts; 94214 __le32 status; 94215 __le32 tbl_addr; 94216 __le32 tbl_addr_hi; 94217 __le32 reserved[4]; 94218 }; 94219 94220 struct ahci_em_priv { 94221 enum sw_activity blink_policy; 94222 struct timer_list timer; 94223 long unsigned int saved_activity; 94224 long unsigned int activity; 94225 long unsigned int led_state; 94226 struct ata_link *link; 94227 }; 94228 94229 struct ahci_port_priv { 94230 struct ata_link *active_link; 94231 struct ahci_cmd_hdr *cmd_slot; 94232 dma_addr_t cmd_slot_dma; 94233 void *cmd_tbl; 94234 dma_addr_t cmd_tbl_dma; 94235 void *rx_fis; 94236 dma_addr_t rx_fis_dma; 94237 unsigned int ncq_saw_d2h: 1; 94238 unsigned int ncq_saw_dmas: 1; 94239 unsigned int ncq_saw_sdb: 1; 94240 spinlock_t lock; 94241 u32 intr_mask; 94242 bool fbs_supported; 94243 bool fbs_enabled; 94244 int fbs_last_dev; 94245 struct ahci_em_priv em_priv[8]; 94246 char *irq_desc; 94247 }; 94248 94249 struct ahci_host_priv { 94250 unsigned int flags; 94251 u32 force_port_map; 94252 u32 mask_port_map; 94253 void *mmio; 94254 u32 cap; 94255 u32 cap2; 94256 u32 version; 94257 u32 port_map; 94258 u32 saved_cap; 94259 u32 saved_cap2; 94260 u32 saved_port_map; 94261 u32 em_loc; 94262 u32 em_buf_sz; 94263 u32 em_msg_type; 94264 u32 remapped_nvme; 94265 bool got_runtime_pm; 94266 struct clk *clks[5]; 94267 struct reset_control___2 *rsts; 94268 struct regulator **target_pwrs; 94269 struct regulator *ahci_regulator; 94270 struct regulator *phy_regulator; 94271 struct phy **phys; 94272 unsigned int nports; 94273 void *plat_data; 94274 unsigned int irq; 94275 void (*start_engine)(struct ata_port *); 94276 int (*stop_engine)(struct ata_port *); 94277 irqreturn_t (*irq_handler)(int, void *); 94278 int (*get_irq_vector)(struct ata_host *, int); 94279 }; 94280 94281 enum { 94282 AHCI_PCI_BAR_STA2X11 = 0, 94283 AHCI_PCI_BAR_CAVIUM = 0, 94284 AHCI_PCI_BAR_LOONGSON = 0, 94285 AHCI_PCI_BAR_ENMOTUS = 2, 94286 AHCI_PCI_BAR_CAVIUM_GEN5 = 4, 94287 AHCI_PCI_BAR_STANDARD = 5, 94288 }; 94289 94290 enum board_ids { 94291 board_ahci = 0, 94292 board_ahci_ign_iferr = 1, 94293 board_ahci_mobile = 2, 94294 board_ahci_nomsi = 3, 94295 board_ahci_noncq = 4, 94296 board_ahci_nosntf = 5, 94297 board_ahci_yes_fbs = 6, 94298 board_ahci_al = 7, 94299 board_ahci_avn = 8, 94300 board_ahci_mcp65 = 9, 94301 board_ahci_mcp77 = 10, 94302 board_ahci_mcp89 = 11, 94303 board_ahci_mv = 12, 94304 board_ahci_sb600 = 13, 94305 board_ahci_sb700 = 14, 94306 board_ahci_vt8251 = 15, 94307 board_ahci_pcs7 = 16, 94308 board_ahci_mcp_linux = 9, 94309 board_ahci_mcp67 = 9, 94310 board_ahci_mcp73 = 9, 94311 board_ahci_mcp79 = 10, 94312 }; 94313 94314 struct ahci_sg { 94315 __le32 addr; 94316 __le32 addr_hi; 94317 __le32 reserved; 94318 __le32 flags_size; 94319 }; 94320 94321 enum { 94322 PIIX_IOCFG = 84, 94323 ICH5_PMR = 144, 94324 ICH5_PCS = 146, 94325 PIIX_SIDPR_BAR = 5, 94326 PIIX_SIDPR_LEN = 16, 94327 PIIX_SIDPR_IDX = 0, 94328 PIIX_SIDPR_DATA = 4, 94329 PIIX_FLAG_CHECKINTR = 268435456, 94330 PIIX_FLAG_SIDPR = 536870912, 94331 PIIX_PATA_FLAGS = 1, 94332 PIIX_SATA_FLAGS = 268435458, 94333 PIIX_FLAG_PIO16 = 1073741824, 94334 PIIX_80C_PRI = 48, 94335 PIIX_80C_SEC = 192, 94336 P0 = 0, 94337 P1 = 1, 94338 P2 = 2, 94339 P3 = 3, 94340 IDE = 4294967295, 94341 NA = 4294967294, 94342 RV = 4294967293, 94343 PIIX_AHCI_DEVICE = 6, 94344 PIIX_HOST_BROKEN_SUSPEND = 16777216, 94345 }; 94346 94347 enum piix_controller_ids { 94348 piix_pata_mwdma = 0, 94349 piix_pata_33 = 1, 94350 ich_pata_33 = 2, 94351 ich_pata_66 = 3, 94352 ich_pata_100 = 4, 94353 ich_pata_100_nomwdma1 = 5, 94354 ich5_sata = 6, 94355 ich6_sata = 7, 94356 ich6m_sata = 8, 94357 ich8_sata = 9, 94358 ich8_2port_sata = 10, 94359 ich8m_apple_sata = 11, 94360 tolapai_sata = 12, 94361 piix_pata_vmw = 13, 94362 ich8_sata_snb = 14, 94363 ich8_2port_sata_snb = 15, 94364 ich8_2port_sata_byt = 16, 94365 }; 94366 94367 struct piix_map_db { 94368 const u32 mask; 94369 const u16 port_enable; 94370 const int map[0]; 94371 }; 94372 94373 struct piix_host_priv { 94374 const int *map; 94375 u32 saved_iocfg; 94376 void *sidpr; 94377 }; 94378 94379 struct ich_laptop { 94380 u16 device; 94381 u16 subvendor; 94382 u16 subdevice; 94383 }; 94384 94385 struct spi_device_id { 94386 char name[32]; 94387 kernel_ulong_t driver_data; 94388 }; 94389 94390 struct ptp_system_timestamp { 94391 struct timespec64 pre_ts; 94392 struct timespec64 post_ts; 94393 }; 94394 94395 struct spi_statistics { 94396 spinlock_t lock; 94397 long unsigned int messages; 94398 long unsigned int transfers; 94399 long unsigned int errors; 94400 long unsigned int timedout; 94401 long unsigned int spi_sync; 94402 long unsigned int spi_sync_immediate; 94403 long unsigned int spi_async; 94404 long long unsigned int bytes; 94405 long long unsigned int bytes_rx; 94406 long long unsigned int bytes_tx; 94407 long unsigned int transfer_bytes_histo[17]; 94408 long unsigned int transfers_split_maxsize; 94409 }; 94410 94411 struct spi_delay { 94412 u16 value; 94413 u8 unit; 94414 }; 94415 94416 struct spi_controller; 94417 94418 struct spi_device { 94419 struct device dev; 94420 struct spi_controller *controller; 94421 struct spi_controller *master; 94422 u32 max_speed_hz; 94423 u8 chip_select; 94424 u8 bits_per_word; 94425 bool rt; 94426 u32 mode; 94427 int irq; 94428 void *controller_state; 94429 void *controller_data; 94430 char modalias[32]; 94431 const char *driver_override; 94432 int cs_gpio; 94433 struct gpio_desc___2 *cs_gpiod; 94434 struct spi_delay word_delay; 94435 struct spi_statistics statistics; 94436 }; 94437 94438 struct spi_message; 94439 94440 struct spi_transfer; 94441 94442 struct spi_controller_mem_ops; 94443 94444 struct spi_controller { 94445 struct device dev; 94446 struct list_head list; 94447 s16 bus_num; 94448 u16 num_chipselect; 94449 u16 dma_alignment; 94450 u32 mode_bits; 94451 u32 buswidth_override_bits; 94452 u32 bits_per_word_mask; 94453 u32 min_speed_hz; 94454 u32 max_speed_hz; 94455 u16 flags; 94456 bool slave; 94457 size_t (*max_transfer_size)(struct spi_device *); 94458 size_t (*max_message_size)(struct spi_device *); 94459 struct mutex io_mutex; 94460 spinlock_t bus_lock_spinlock; 94461 struct mutex bus_lock_mutex; 94462 bool bus_lock_flag; 94463 int (*setup)(struct spi_device *); 94464 int (*set_cs_timing)(struct spi_device *, struct spi_delay *, struct spi_delay *, struct spi_delay *); 94465 int (*transfer)(struct spi_device *, struct spi_message *); 94466 void (*cleanup)(struct spi_device *); 94467 bool (*can_dma)(struct spi_controller *, struct spi_device *, struct spi_transfer *); 94468 bool queued; 94469 struct kthread_worker *kworker; 94470 struct kthread_work pump_messages; 94471 spinlock_t queue_lock; 94472 struct list_head queue; 94473 struct spi_message *cur_msg; 94474 bool idling; 94475 bool busy; 94476 bool running; 94477 bool rt; 94478 bool auto_runtime_pm; 94479 bool cur_msg_prepared; 94480 bool cur_msg_mapped; 94481 bool last_cs_enable; 94482 bool last_cs_mode_high; 94483 bool fallback; 94484 struct completion xfer_completion; 94485 size_t max_dma_len; 94486 int (*prepare_transfer_hardware)(struct spi_controller *); 94487 int (*transfer_one_message)(struct spi_controller *, struct spi_message *); 94488 int (*unprepare_transfer_hardware)(struct spi_controller *); 94489 int (*prepare_message)(struct spi_controller *, struct spi_message *); 94490 int (*unprepare_message)(struct spi_controller *, struct spi_message *); 94491 int (*slave_abort)(struct spi_controller *); 94492 void (*set_cs)(struct spi_device *, bool); 94493 int (*transfer_one)(struct spi_controller *, struct spi_device *, struct spi_transfer *); 94494 void (*handle_err)(struct spi_controller *, struct spi_message *); 94495 const struct spi_controller_mem_ops *mem_ops; 94496 struct spi_delay cs_setup; 94497 struct spi_delay cs_hold; 94498 struct spi_delay cs_inactive; 94499 int *cs_gpios; 94500 struct gpio_desc___2 **cs_gpiods; 94501 bool use_gpio_descriptors; 94502 u8 unused_native_cs; 94503 u8 max_native_cs; 94504 struct spi_statistics statistics; 94505 struct dma_chan___2 *dma_tx; 94506 struct dma_chan___2 *dma_rx; 94507 void *dummy_rx; 94508 void *dummy_tx; 94509 int (*fw_translate_cs)(struct spi_controller *, unsigned int); 94510 bool ptp_sts_supported; 94511 long unsigned int irq_flags; 94512 }; 94513 94514 struct spi_driver { 94515 const struct spi_device_id *id_table; 94516 int (*probe)(struct spi_device *); 94517 int (*remove)(struct spi_device *); 94518 void (*shutdown)(struct spi_device *); 94519 struct device_driver driver; 94520 }; 94521 94522 struct spi_message { 94523 struct list_head transfers; 94524 struct spi_device *spi; 94525 unsigned int is_dma_mapped: 1; 94526 void (*complete)(void *); 94527 void *context; 94528 unsigned int frame_length; 94529 unsigned int actual_length; 94530 int status; 94531 struct list_head queue; 94532 void *state; 94533 struct list_head resources; 94534 }; 94535 94536 struct spi_transfer { 94537 const void *tx_buf; 94538 void *rx_buf; 94539 unsigned int len; 94540 dma_addr_t tx_dma; 94541 dma_addr_t rx_dma; 94542 struct sg_table tx_sg; 94543 struct sg_table rx_sg; 94544 unsigned int cs_change: 1; 94545 unsigned int tx_nbits: 3; 94546 unsigned int rx_nbits: 3; 94547 u8 bits_per_word; 94548 u16 delay_usecs; 94549 struct spi_delay delay; 94550 struct spi_delay cs_change_delay; 94551 struct spi_delay word_delay; 94552 u32 speed_hz; 94553 u32 effective_speed_hz; 94554 unsigned int ptp_sts_word_pre; 94555 unsigned int ptp_sts_word_post; 94556 struct ptp_system_timestamp *ptp_sts; 94557 bool timestamped; 94558 struct list_head transfer_list; 94559 u16 error; 94560 }; 94561 94562 struct spi_mem; 94563 94564 struct spi_mem_op; 94565 94566 struct spi_mem_dirmap_desc; 94567 94568 struct spi_controller_mem_ops { 94569 int (*adjust_op_size)(struct spi_mem *, struct spi_mem_op *); 94570 bool (*supports_op)(struct spi_mem *, const struct spi_mem_op *); 94571 int (*exec_op)(struct spi_mem *, const struct spi_mem_op *); 94572 const char * (*get_name)(struct spi_mem *); 94573 int (*dirmap_create)(struct spi_mem_dirmap_desc *); 94574 void (*dirmap_destroy)(struct spi_mem_dirmap_desc *); 94575 ssize_t (*dirmap_read)(struct spi_mem_dirmap_desc *, u64, size_t, void *); 94576 ssize_t (*dirmap_write)(struct spi_mem_dirmap_desc *, u64, size_t, const void *); 94577 }; 94578 94579 typedef void (*spi_res_release_t)(struct spi_controller *, struct spi_message *, void *); 94580 94581 struct spi_res { 94582 struct list_head entry; 94583 spi_res_release_t release; 94584 long long unsigned int data[0]; 94585 }; 94586 94587 struct spi_replaced_transfers; 94588 94589 typedef void (*spi_replaced_release_t)(struct spi_controller *, struct spi_message *, struct spi_replaced_transfers *); 94590 94591 struct spi_replaced_transfers { 94592 spi_replaced_release_t release; 94593 void *extradata; 94594 struct list_head replaced_transfers; 94595 struct list_head *replaced_after; 94596 size_t inserted; 94597 struct spi_transfer inserted_transfers[0]; 94598 }; 94599 94600 struct spi_board_info { 94601 char modalias[32]; 94602 const void *platform_data; 94603 const struct property_entry *properties; 94604 void *controller_data; 94605 int irq; 94606 u32 max_speed_hz; 94607 u16 bus_num; 94608 u16 chip_select; 94609 u32 mode; 94610 }; 94611 94612 enum spi_mem_data_dir { 94613 SPI_MEM_NO_DATA = 0, 94614 SPI_MEM_DATA_IN = 1, 94615 SPI_MEM_DATA_OUT = 2, 94616 }; 94617 94618 struct spi_mem_op { 94619 struct { 94620 u8 nbytes; 94621 u8 buswidth; 94622 u8 dtr: 1; 94623 u16 opcode; 94624 } cmd; 94625 struct { 94626 u8 nbytes; 94627 u8 buswidth; 94628 u8 dtr: 1; 94629 u64 val; 94630 } addr; 94631 struct { 94632 u8 nbytes; 94633 u8 buswidth; 94634 u8 dtr: 1; 94635 } dummy; 94636 struct { 94637 u8 buswidth; 94638 u8 dtr: 1; 94639 enum spi_mem_data_dir dir; 94640 unsigned int nbytes; 94641 union { 94642 void *in; 94643 const void *out; 94644 } buf; 94645 } data; 94646 }; 94647 94648 struct spi_mem_dirmap_info { 94649 struct spi_mem_op op_tmpl; 94650 u64 offset; 94651 u64 length; 94652 }; 94653 94654 struct spi_mem_dirmap_desc { 94655 struct spi_mem *mem; 94656 struct spi_mem_dirmap_info info; 94657 unsigned int nodirmap; 94658 void *priv; 94659 }; 94660 94661 struct spi_mem { 94662 struct spi_device *spi; 94663 void *drvpriv; 94664 const char *name; 94665 }; 94666 94667 struct trace_event_raw_spi_controller { 94668 struct trace_entry ent; 94669 int bus_num; 94670 char __data[0]; 94671 }; 94672 94673 struct trace_event_raw_spi_message { 94674 struct trace_entry ent; 94675 int bus_num; 94676 int chip_select; 94677 struct spi_message *msg; 94678 char __data[0]; 94679 }; 94680 94681 struct trace_event_raw_spi_message_done { 94682 struct trace_entry ent; 94683 int bus_num; 94684 int chip_select; 94685 struct spi_message *msg; 94686 unsigned int frame; 94687 unsigned int actual; 94688 char __data[0]; 94689 }; 94690 94691 struct trace_event_raw_spi_transfer { 94692 struct trace_entry ent; 94693 int bus_num; 94694 int chip_select; 94695 struct spi_transfer *xfer; 94696 int len; 94697 u32 __data_loc_rx_buf; 94698 u32 __data_loc_tx_buf; 94699 char __data[0]; 94700 }; 94701 94702 struct trace_event_data_offsets_spi_controller {}; 94703 94704 struct trace_event_data_offsets_spi_message {}; 94705 94706 struct trace_event_data_offsets_spi_message_done {}; 94707 94708 struct trace_event_data_offsets_spi_transfer { 94709 u32 rx_buf; 94710 u32 tx_buf; 94711 }; 94712 94713 typedef void (*btf_trace_spi_controller_idle)(void *, struct spi_controller *); 94714 94715 typedef void (*btf_trace_spi_controller_busy)(void *, struct spi_controller *); 94716 94717 typedef void (*btf_trace_spi_message_submit)(void *, struct spi_message *); 94718 94719 typedef void (*btf_trace_spi_message_start)(void *, struct spi_message *); 94720 94721 typedef void (*btf_trace_spi_message_done)(void *, struct spi_message *); 94722 94723 typedef void (*btf_trace_spi_transfer_start)(void *, struct spi_message *, struct spi_transfer *); 94724 94725 typedef void (*btf_trace_spi_transfer_stop)(void *, struct spi_message *, struct spi_transfer *); 94726 94727 struct boardinfo { 94728 struct list_head list; 94729 struct spi_board_info board_info; 94730 }; 94731 94732 struct acpi_spi_lookup { 94733 struct spi_controller *ctlr; 94734 u32 max_speed_hz; 94735 u32 mode; 94736 int irq; 94737 u8 bits_per_word; 94738 u8 chip_select; 94739 }; 94740 94741 struct amd_spi { 94742 void *io_remap_addr; 94743 long unsigned int io_base_addr; 94744 u32 rom_addr; 94745 u8 chip_select; 94746 }; 94747 94748 struct devprobe2 { 94749 struct net_device * (*probe)(int); 94750 int status; 94751 }; 94752 94753 enum { 94754 NETIF_F_SG_BIT = 0, 94755 NETIF_F_IP_CSUM_BIT = 1, 94756 __UNUSED_NETIF_F_1 = 2, 94757 NETIF_F_HW_CSUM_BIT = 3, 94758 NETIF_F_IPV6_CSUM_BIT = 4, 94759 NETIF_F_HIGHDMA_BIT = 5, 94760 NETIF_F_FRAGLIST_BIT = 6, 94761 NETIF_F_HW_VLAN_CTAG_TX_BIT = 7, 94762 NETIF_F_HW_VLAN_CTAG_RX_BIT = 8, 94763 NETIF_F_HW_VLAN_CTAG_FILTER_BIT = 9, 94764 NETIF_F_VLAN_CHALLENGED_BIT = 10, 94765 NETIF_F_GSO_BIT = 11, 94766 NETIF_F_LLTX_BIT = 12, 94767 NETIF_F_NETNS_LOCAL_BIT = 13, 94768 NETIF_F_GRO_BIT = 14, 94769 NETIF_F_LRO_BIT = 15, 94770 NETIF_F_GSO_SHIFT = 16, 94771 NETIF_F_TSO_BIT = 16, 94772 NETIF_F_GSO_ROBUST_BIT = 17, 94773 NETIF_F_TSO_ECN_BIT = 18, 94774 NETIF_F_TSO_MANGLEID_BIT = 19, 94775 NETIF_F_TSO6_BIT = 20, 94776 NETIF_F_FSO_BIT = 21, 94777 NETIF_F_GSO_GRE_BIT = 22, 94778 NETIF_F_GSO_GRE_CSUM_BIT = 23, 94779 NETIF_F_GSO_IPXIP4_BIT = 24, 94780 NETIF_F_GSO_IPXIP6_BIT = 25, 94781 NETIF_F_GSO_UDP_TUNNEL_BIT = 26, 94782 NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT = 27, 94783 NETIF_F_GSO_PARTIAL_BIT = 28, 94784 NETIF_F_GSO_TUNNEL_REMCSUM_BIT = 29, 94785 NETIF_F_GSO_SCTP_BIT = 30, 94786 NETIF_F_GSO_ESP_BIT = 31, 94787 NETIF_F_GSO_UDP_BIT = 32, 94788 NETIF_F_GSO_UDP_L4_BIT = 33, 94789 NETIF_F_GSO_FRAGLIST_BIT = 34, 94790 NETIF_F_GSO_LAST = 34, 94791 NETIF_F_FCOE_CRC_BIT = 35, 94792 NETIF_F_SCTP_CRC_BIT = 36, 94793 NETIF_F_FCOE_MTU_BIT = 37, 94794 NETIF_F_NTUPLE_BIT = 38, 94795 NETIF_F_RXHASH_BIT = 39, 94796 NETIF_F_RXCSUM_BIT = 40, 94797 NETIF_F_NOCACHE_COPY_BIT = 41, 94798 NETIF_F_LOOPBACK_BIT = 42, 94799 NETIF_F_RXFCS_BIT = 43, 94800 NETIF_F_RXALL_BIT = 44, 94801 NETIF_F_HW_VLAN_STAG_TX_BIT = 45, 94802 NETIF_F_HW_VLAN_STAG_RX_BIT = 46, 94803 NETIF_F_HW_VLAN_STAG_FILTER_BIT = 47, 94804 NETIF_F_HW_L2FW_DOFFLOAD_BIT = 48, 94805 NETIF_F_HW_TC_BIT = 49, 94806 NETIF_F_HW_ESP_BIT = 50, 94807 NETIF_F_HW_ESP_TX_CSUM_BIT = 51, 94808 NETIF_F_RX_UDP_TUNNEL_PORT_BIT = 52, 94809 NETIF_F_HW_TLS_TX_BIT = 53, 94810 NETIF_F_HW_TLS_RX_BIT = 54, 94811 NETIF_F_GRO_HW_BIT = 55, 94812 NETIF_F_HW_TLS_RECORD_BIT = 56, 94813 NETIF_F_GRO_FRAGLIST_BIT = 57, 94814 NETIF_F_HW_MACSEC_BIT = 58, 94815 NETDEV_FEATURE_COUNT = 59, 94816 }; 94817 94818 enum { 94819 SKBTX_HW_TSTAMP = 1, 94820 SKBTX_SW_TSTAMP = 2, 94821 SKBTX_IN_PROGRESS = 4, 94822 SKBTX_DEV_ZEROCOPY = 8, 94823 SKBTX_WIFI_STATUS = 16, 94824 SKBTX_SHARED_FRAG = 32, 94825 SKBTX_SCHED_TSTAMP = 64, 94826 }; 94827 94828 enum netdev_priv_flags { 94829 IFF_802_1Q_VLAN = 1, 94830 IFF_EBRIDGE = 2, 94831 IFF_BONDING = 4, 94832 IFF_ISATAP = 8, 94833 IFF_WAN_HDLC = 16, 94834 IFF_XMIT_DST_RELEASE = 32, 94835 IFF_DONT_BRIDGE = 64, 94836 IFF_DISABLE_NETPOLL = 128, 94837 IFF_MACVLAN_PORT = 256, 94838 IFF_BRIDGE_PORT = 512, 94839 IFF_OVS_DATAPATH = 1024, 94840 IFF_TX_SKB_SHARING = 2048, 94841 IFF_UNICAST_FLT = 4096, 94842 IFF_TEAM_PORT = 8192, 94843 IFF_SUPP_NOFCS = 16384, 94844 IFF_LIVE_ADDR_CHANGE = 32768, 94845 IFF_MACVLAN = 65536, 94846 IFF_XMIT_DST_RELEASE_PERM = 131072, 94847 IFF_L3MDEV_MASTER = 262144, 94848 IFF_NO_QUEUE = 524288, 94849 IFF_OPENVSWITCH = 1048576, 94850 IFF_L3MDEV_SLAVE = 2097152, 94851 IFF_TEAM = 4194304, 94852 IFF_RXFH_CONFIGURED = 8388608, 94853 IFF_PHONY_HEADROOM = 16777216, 94854 IFF_MACSEC = 33554432, 94855 IFF_NO_RX_HANDLER = 67108864, 94856 IFF_FAILOVER = 134217728, 94857 IFF_FAILOVER_SLAVE = 268435456, 94858 IFF_L3MDEV_RX_HANDLER = 536870912, 94859 IFF_LIVE_RENAME_OK = 1073741824, 94860 }; 94861 94862 struct mdio_board_info { 94863 const char *bus_id; 94864 char modalias[32]; 94865 int mdio_addr; 94866 const void *platform_data; 94867 }; 94868 94869 struct mdio_board_entry { 94870 struct list_head list; 94871 struct mdio_board_info board_info; 94872 }; 94873 94874 struct mdiobus_devres { 94875 struct mii_bus *mii; 94876 }; 94877 94878 enum netdev_state_t { 94879 __LINK_STATE_START = 0, 94880 __LINK_STATE_PRESENT = 1, 94881 __LINK_STATE_NOCARRIER = 2, 94882 __LINK_STATE_LINKWATCH_PENDING = 3, 94883 __LINK_STATE_DORMANT = 4, 94884 __LINK_STATE_TESTING = 5, 94885 }; 94886 94887 struct mii_ioctl_data { 94888 __u16 phy_id; 94889 __u16 reg_num; 94890 __u16 val_in; 94891 __u16 val_out; 94892 }; 94893 94894 enum { 94895 ETHTOOL_MSG_KERNEL_NONE = 0, 94896 ETHTOOL_MSG_STRSET_GET_REPLY = 1, 94897 ETHTOOL_MSG_LINKINFO_GET_REPLY = 2, 94898 ETHTOOL_MSG_LINKINFO_NTF = 3, 94899 ETHTOOL_MSG_LINKMODES_GET_REPLY = 4, 94900 ETHTOOL_MSG_LINKMODES_NTF = 5, 94901 ETHTOOL_MSG_LINKSTATE_GET_REPLY = 6, 94902 ETHTOOL_MSG_DEBUG_GET_REPLY = 7, 94903 ETHTOOL_MSG_DEBUG_NTF = 8, 94904 ETHTOOL_MSG_WOL_GET_REPLY = 9, 94905 ETHTOOL_MSG_WOL_NTF = 10, 94906 ETHTOOL_MSG_FEATURES_GET_REPLY = 11, 94907 ETHTOOL_MSG_FEATURES_SET_REPLY = 12, 94908 ETHTOOL_MSG_FEATURES_NTF = 13, 94909 ETHTOOL_MSG_PRIVFLAGS_GET_REPLY = 14, 94910 ETHTOOL_MSG_PRIVFLAGS_NTF = 15, 94911 ETHTOOL_MSG_RINGS_GET_REPLY = 16, 94912 ETHTOOL_MSG_RINGS_NTF = 17, 94913 ETHTOOL_MSG_CHANNELS_GET_REPLY = 18, 94914 ETHTOOL_MSG_CHANNELS_NTF = 19, 94915 ETHTOOL_MSG_COALESCE_GET_REPLY = 20, 94916 ETHTOOL_MSG_COALESCE_NTF = 21, 94917 ETHTOOL_MSG_PAUSE_GET_REPLY = 22, 94918 ETHTOOL_MSG_PAUSE_NTF = 23, 94919 ETHTOOL_MSG_EEE_GET_REPLY = 24, 94920 ETHTOOL_MSG_EEE_NTF = 25, 94921 ETHTOOL_MSG_TSINFO_GET_REPLY = 26, 94922 ETHTOOL_MSG_CABLE_TEST_NTF = 27, 94923 ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 28, 94924 ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 29, 94925 __ETHTOOL_MSG_KERNEL_CNT = 30, 94926 ETHTOOL_MSG_KERNEL_MAX = 29, 94927 }; 94928 94929 struct phy_led_trigger { 94930 struct led_trigger trigger; 94931 char name[76]; 94932 unsigned int speed; 94933 }; 94934 94935 struct phy_setting { 94936 u32 speed; 94937 u8 duplex; 94938 u8 bit; 94939 }; 94940 94941 struct ethtool_phy_ops { 94942 int (*get_sset_count)(struct phy_device *); 94943 int (*get_strings)(struct phy_device *, u8 *); 94944 int (*get_stats)(struct phy_device *, struct ethtool_stats *, u64 *); 94945 int (*start_cable_test)(struct phy_device *, struct netlink_ext_ack *); 94946 int (*start_cable_test_tdr)(struct phy_device *, struct netlink_ext_ack *, const struct phy_tdr_config *); 94947 }; 94948 94949 struct phy_fixup { 94950 struct list_head list; 94951 char bus_id[64]; 94952 u32 phy_uid; 94953 u32 phy_uid_mask; 94954 int (*run)(struct phy_device *); 94955 }; 94956 94957 struct sfp_eeprom_base { 94958 u8 phys_id; 94959 u8 phys_ext_id; 94960 u8 connector; 94961 u8 if_1x_copper_passive: 1; 94962 u8 if_1x_copper_active: 1; 94963 u8 if_1x_lx: 1; 94964 u8 if_1x_sx: 1; 94965 u8 e10g_base_sr: 1; 94966 u8 e10g_base_lr: 1; 94967 u8 e10g_base_lrm: 1; 94968 u8 e10g_base_er: 1; 94969 u8 sonet_oc3_short_reach: 1; 94970 u8 sonet_oc3_smf_intermediate_reach: 1; 94971 u8 sonet_oc3_smf_long_reach: 1; 94972 u8 unallocated_5_3: 1; 94973 u8 sonet_oc12_short_reach: 1; 94974 u8 sonet_oc12_smf_intermediate_reach: 1; 94975 u8 sonet_oc12_smf_long_reach: 1; 94976 u8 unallocated_5_7: 1; 94977 u8 sonet_oc48_short_reach: 1; 94978 u8 sonet_oc48_intermediate_reach: 1; 94979 u8 sonet_oc48_long_reach: 1; 94980 u8 sonet_reach_bit2: 1; 94981 u8 sonet_reach_bit1: 1; 94982 u8 sonet_oc192_short_reach: 1; 94983 u8 escon_smf_1310_laser: 1; 94984 u8 escon_mmf_1310_led: 1; 94985 u8 e1000_base_sx: 1; 94986 u8 e1000_base_lx: 1; 94987 u8 e1000_base_cx: 1; 94988 u8 e1000_base_t: 1; 94989 u8 e100_base_lx: 1; 94990 u8 e100_base_fx: 1; 94991 u8 e_base_bx10: 1; 94992 u8 e_base_px: 1; 94993 u8 fc_tech_electrical_inter_enclosure: 1; 94994 u8 fc_tech_lc: 1; 94995 u8 fc_tech_sa: 1; 94996 u8 fc_ll_m: 1; 94997 u8 fc_ll_l: 1; 94998 u8 fc_ll_i: 1; 94999 u8 fc_ll_s: 1; 95000 u8 fc_ll_v: 1; 95001 u8 unallocated_8_0: 1; 95002 u8 unallocated_8_1: 1; 95003 u8 sfp_ct_passive: 1; 95004 u8 sfp_ct_active: 1; 95005 u8 fc_tech_ll: 1; 95006 u8 fc_tech_sl: 1; 95007 u8 fc_tech_sn: 1; 95008 u8 fc_tech_electrical_intra_enclosure: 1; 95009 u8 fc_media_sm: 1; 95010 u8 unallocated_9_1: 1; 95011 u8 fc_media_m5: 1; 95012 u8 fc_media_m6: 1; 95013 u8 fc_media_tv: 1; 95014 u8 fc_media_mi: 1; 95015 u8 fc_media_tp: 1; 95016 u8 fc_media_tw: 1; 95017 u8 fc_speed_100: 1; 95018 u8 unallocated_10_1: 1; 95019 u8 fc_speed_200: 1; 95020 u8 fc_speed_3200: 1; 95021 u8 fc_speed_400: 1; 95022 u8 fc_speed_1600: 1; 95023 u8 fc_speed_800: 1; 95024 u8 fc_speed_1200: 1; 95025 u8 encoding; 95026 u8 br_nominal; 95027 u8 rate_id; 95028 u8 link_len[6]; 95029 char vendor_name[16]; 95030 u8 extended_cc; 95031 char vendor_oui[3]; 95032 char vendor_pn[16]; 95033 char vendor_rev[4]; 95034 union { 95035 __be16 optical_wavelength; 95036 __be16 cable_compliance; 95037 struct { 95038 u8 sff8431_app_e: 1; 95039 u8 fc_pi_4_app_h: 1; 95040 u8 reserved60_2: 6; 95041 u8 reserved61: 8; 95042 } passive; 95043 struct { 95044 u8 sff8431_app_e: 1; 95045 u8 fc_pi_4_app_h: 1; 95046 u8 sff8431_lim: 1; 95047 u8 fc_pi_4_lim: 1; 95048 u8 reserved60_4: 4; 95049 u8 reserved61: 8; 95050 } active; 95051 }; 95052 u8 reserved62; 95053 u8 cc_base; 95054 }; 95055 95056 struct sfp_eeprom_ext { 95057 __be16 options; 95058 u8 br_max; 95059 u8 br_min; 95060 char vendor_sn[16]; 95061 char datecode[8]; 95062 u8 diagmon; 95063 u8 enhopts; 95064 u8 sff8472_compliance; 95065 u8 cc_ext; 95066 }; 95067 95068 struct sfp_eeprom_id { 95069 struct sfp_eeprom_base base; 95070 struct sfp_eeprom_ext ext; 95071 }; 95072 95073 struct sfp_upstream_ops { 95074 void (*attach)(void *, struct sfp_bus *); 95075 void (*detach)(void *, struct sfp_bus *); 95076 int (*module_insert)(void *, const struct sfp_eeprom_id *); 95077 void (*module_remove)(void *); 95078 int (*module_start)(void *); 95079 void (*module_stop)(void *); 95080 void (*link_down)(void *); 95081 void (*link_up)(void *); 95082 int (*connect_phy)(void *, struct phy_device *); 95083 void (*disconnect_phy)(void *); 95084 }; 95085 95086 struct trace_event_raw_mdio_access { 95087 struct trace_entry ent; 95088 char busid[61]; 95089 char read; 95090 u8 addr; 95091 u16 val; 95092 unsigned int regnum; 95093 char __data[0]; 95094 }; 95095 95096 struct trace_event_data_offsets_mdio_access {}; 95097 95098 typedef void (*btf_trace_mdio_access)(void *, struct mii_bus *, char, u8, unsigned int, u16, int); 95099 95100 struct mdio_bus_stat_attr { 95101 int addr; 95102 unsigned int field_offset; 95103 }; 95104 95105 struct mdio_driver { 95106 struct mdio_driver_common mdiodrv; 95107 int (*probe)(struct mdio_device *); 95108 void (*remove)(struct mdio_device *); 95109 }; 95110 95111 struct fixed_phy_status { 95112 int link; 95113 int speed; 95114 int duplex; 95115 int pause; 95116 int asym_pause; 95117 }; 95118 95119 struct swmii_regs { 95120 u16 bmsr; 95121 u16 lpa; 95122 u16 lpagb; 95123 u16 estat; 95124 }; 95125 95126 enum { 95127 SWMII_SPEED_10 = 0, 95128 SWMII_SPEED_100 = 1, 95129 SWMII_SPEED_1000 = 2, 95130 SWMII_DUPLEX_HALF = 0, 95131 SWMII_DUPLEX_FULL = 1, 95132 }; 95133 95134 struct mii_timestamping_ctrl { 95135 struct mii_timestamper * (*probe_channel)(struct device *, unsigned int); 95136 void (*release_channel)(struct device *, struct mii_timestamper *); 95137 }; 95138 95139 struct mii_timestamping_desc { 95140 struct list_head list; 95141 struct mii_timestamping_ctrl *ctrl; 95142 struct device *device; 95143 }; 95144 95145 struct sfp; 95146 95147 struct sfp_socket_ops; 95148 95149 struct sfp_quirk; 95150 95151 struct sfp_bus { 95152 struct kref kref; 95153 struct list_head node; 95154 struct fwnode_handle *fwnode; 95155 const struct sfp_socket_ops *socket_ops; 95156 struct device *sfp_dev; 95157 struct sfp *sfp; 95158 const struct sfp_quirk *sfp_quirk; 95159 const struct sfp_upstream_ops *upstream_ops; 95160 void *upstream; 95161 struct phy_device *phydev; 95162 bool registered; 95163 bool started; 95164 }; 95165 95166 enum { 95167 SFF8024_ID_UNK = 0, 95168 SFF8024_ID_SFF_8472 = 2, 95169 SFF8024_ID_SFP = 3, 95170 SFF8024_ID_DWDM_SFP = 11, 95171 SFF8024_ID_QSFP_8438 = 12, 95172 SFF8024_ID_QSFP_8436_8636 = 13, 95173 SFF8024_ID_QSFP28_8636 = 17, 95174 SFF8024_ENCODING_UNSPEC = 0, 95175 SFF8024_ENCODING_8B10B = 1, 95176 SFF8024_ENCODING_4B5B = 2, 95177 SFF8024_ENCODING_NRZ = 3, 95178 SFF8024_ENCODING_8472_MANCHESTER = 4, 95179 SFF8024_ENCODING_8472_SONET = 5, 95180 SFF8024_ENCODING_8472_64B66B = 6, 95181 SFF8024_ENCODING_8436_MANCHESTER = 6, 95182 SFF8024_ENCODING_8436_SONET = 4, 95183 SFF8024_ENCODING_8436_64B66B = 5, 95184 SFF8024_ENCODING_256B257B = 7, 95185 SFF8024_ENCODING_PAM4 = 8, 95186 SFF8024_CONNECTOR_UNSPEC = 0, 95187 SFF8024_CONNECTOR_SC = 1, 95188 SFF8024_CONNECTOR_FIBERJACK = 6, 95189 SFF8024_CONNECTOR_LC = 7, 95190 SFF8024_CONNECTOR_MT_RJ = 8, 95191 SFF8024_CONNECTOR_MU = 9, 95192 SFF8024_CONNECTOR_SG = 10, 95193 SFF8024_CONNECTOR_OPTICAL_PIGTAIL = 11, 95194 SFF8024_CONNECTOR_MPO_1X12 = 12, 95195 SFF8024_CONNECTOR_MPO_2X16 = 13, 95196 SFF8024_CONNECTOR_HSSDC_II = 32, 95197 SFF8024_CONNECTOR_COPPER_PIGTAIL = 33, 95198 SFF8024_CONNECTOR_RJ45 = 34, 95199 SFF8024_CONNECTOR_NOSEPARATE = 35, 95200 SFF8024_CONNECTOR_MXC_2X16 = 36, 95201 SFF8024_ECC_UNSPEC = 0, 95202 SFF8024_ECC_100G_25GAUI_C2M_AOC = 1, 95203 SFF8024_ECC_100GBASE_SR4_25GBASE_SR = 2, 95204 SFF8024_ECC_100GBASE_LR4_25GBASE_LR = 3, 95205 SFF8024_ECC_100GBASE_ER4_25GBASE_ER = 4, 95206 SFF8024_ECC_100GBASE_SR10 = 5, 95207 SFF8024_ECC_100GBASE_CR4 = 11, 95208 SFF8024_ECC_25GBASE_CR_S = 12, 95209 SFF8024_ECC_25GBASE_CR_N = 13, 95210 SFF8024_ECC_10GBASE_T_SFI = 22, 95211 SFF8024_ECC_10GBASE_T_SR = 28, 95212 SFF8024_ECC_5GBASE_T = 29, 95213 SFF8024_ECC_2_5GBASE_T = 30, 95214 }; 95215 95216 struct sfp_socket_ops { 95217 void (*attach)(struct sfp *); 95218 void (*detach)(struct sfp *); 95219 void (*start)(struct sfp *); 95220 void (*stop)(struct sfp *); 95221 int (*module_info)(struct sfp *, struct ethtool_modinfo *); 95222 int (*module_eeprom)(struct sfp *, struct ethtool_eeprom *, u8 *); 95223 }; 95224 95225 struct sfp_quirk { 95226 const char *vendor; 95227 const char *part; 95228 void (*modes)(const struct sfp_eeprom_id *, long unsigned int *); 95229 }; 95230 95231 struct fixed_mdio_bus { 95232 struct mii_bus *mii_bus; 95233 struct list_head phys; 95234 }; 95235 95236 struct fixed_phy { 95237 int addr; 95238 struct phy_device *phydev; 95239 struct fixed_phy_status status; 95240 bool no_carrier; 95241 int (*link_update)(struct net_device *, struct fixed_phy_status *); 95242 struct list_head node; 95243 struct gpio_desc___2 *link_gpiod; 95244 }; 95245 95246 struct mdio_device_id { 95247 __u32 phy_id; 95248 __u32 phy_id_mask; 95249 }; 95250 95251 struct flow_dissector { 95252 unsigned int used_keys; 95253 short unsigned int offset[28]; 95254 }; 95255 95256 struct flow_match { 95257 struct flow_dissector *dissector; 95258 void *mask; 95259 void *key; 95260 }; 95261 95262 enum flow_action_id { 95263 FLOW_ACTION_ACCEPT = 0, 95264 FLOW_ACTION_DROP = 1, 95265 FLOW_ACTION_TRAP = 2, 95266 FLOW_ACTION_GOTO = 3, 95267 FLOW_ACTION_REDIRECT = 4, 95268 FLOW_ACTION_MIRRED = 5, 95269 FLOW_ACTION_REDIRECT_INGRESS = 6, 95270 FLOW_ACTION_MIRRED_INGRESS = 7, 95271 FLOW_ACTION_VLAN_PUSH = 8, 95272 FLOW_ACTION_VLAN_POP = 9, 95273 FLOW_ACTION_VLAN_MANGLE = 10, 95274 FLOW_ACTION_TUNNEL_ENCAP = 11, 95275 FLOW_ACTION_TUNNEL_DECAP = 12, 95276 FLOW_ACTION_MANGLE = 13, 95277 FLOW_ACTION_ADD = 14, 95278 FLOW_ACTION_CSUM = 15, 95279 FLOW_ACTION_MARK = 16, 95280 FLOW_ACTION_PTYPE = 17, 95281 FLOW_ACTION_PRIORITY = 18, 95282 FLOW_ACTION_WAKE = 19, 95283 FLOW_ACTION_QUEUE = 20, 95284 FLOW_ACTION_SAMPLE = 21, 95285 FLOW_ACTION_POLICE = 22, 95286 FLOW_ACTION_CT = 23, 95287 FLOW_ACTION_CT_METADATA = 24, 95288 FLOW_ACTION_MPLS_PUSH = 25, 95289 FLOW_ACTION_MPLS_POP = 26, 95290 FLOW_ACTION_MPLS_MANGLE = 27, 95291 FLOW_ACTION_GATE = 28, 95292 NUM_FLOW_ACTIONS = 29, 95293 }; 95294 95295 enum flow_action_hw_stats { 95296 FLOW_ACTION_HW_STATS_IMMEDIATE = 1, 95297 FLOW_ACTION_HW_STATS_DELAYED = 2, 95298 FLOW_ACTION_HW_STATS_ANY = 3, 95299 FLOW_ACTION_HW_STATS_DISABLED = 4, 95300 FLOW_ACTION_HW_STATS_DONT_CARE = 7, 95301 }; 95302 95303 typedef void (*action_destr)(void *); 95304 95305 enum flow_action_mangle_base { 95306 FLOW_ACT_MANGLE_UNSPEC = 0, 95307 FLOW_ACT_MANGLE_HDR_TYPE_ETH = 1, 95308 FLOW_ACT_MANGLE_HDR_TYPE_IP4 = 2, 95309 FLOW_ACT_MANGLE_HDR_TYPE_IP6 = 3, 95310 FLOW_ACT_MANGLE_HDR_TYPE_TCP = 4, 95311 FLOW_ACT_MANGLE_HDR_TYPE_UDP = 5, 95312 }; 95313 95314 struct nf_flowtable; 95315 95316 struct ip_tunnel_info; 95317 95318 struct psample_group; 95319 95320 struct action_gate_entry; 95321 95322 struct flow_action_cookie; 95323 95324 struct flow_action_entry { 95325 enum flow_action_id id; 95326 enum flow_action_hw_stats hw_stats; 95327 action_destr destructor; 95328 void *destructor_priv; 95329 union { 95330 u32 chain_index; 95331 struct net_device *dev; 95332 struct { 95333 u16 vid; 95334 __be16 proto; 95335 u8 prio; 95336 } vlan; 95337 struct { 95338 enum flow_action_mangle_base htype; 95339 u32 offset; 95340 u32 mask; 95341 u32 val; 95342 } mangle; 95343 struct ip_tunnel_info *tunnel; 95344 u32 csum_flags; 95345 u32 mark; 95346 u16 ptype; 95347 u32 priority; 95348 struct { 95349 u32 ctx; 95350 u32 index; 95351 u8 vf; 95352 } queue; 95353 struct { 95354 struct psample_group *psample_group; 95355 u32 rate; 95356 u32 trunc_size; 95357 bool truncate; 95358 } sample; 95359 struct { 95360 u32 index; 95361 u32 burst; 95362 u64 rate_bytes_ps; 95363 u32 mtu; 95364 } police; 95365 struct { 95366 int action; 95367 u16 zone; 95368 struct nf_flowtable *flow_table; 95369 } ct; 95370 struct { 95371 long unsigned int cookie; 95372 u32 mark; 95373 u32 labels[4]; 95374 } ct_metadata; 95375 struct { 95376 u32 label; 95377 __be16 proto; 95378 u8 tc; 95379 u8 bos; 95380 u8 ttl; 95381 } mpls_push; 95382 struct { 95383 __be16 proto; 95384 } mpls_pop; 95385 struct { 95386 u32 label; 95387 u8 tc; 95388 u8 bos; 95389 u8 ttl; 95390 } mpls_mangle; 95391 struct { 95392 u32 index; 95393 s32 prio; 95394 u64 basetime; 95395 u64 cycletime; 95396 u64 cycletimeext; 95397 u32 num_entries; 95398 struct action_gate_entry *entries; 95399 } gate; 95400 }; 95401 struct flow_action_cookie *cookie; 95402 }; 95403 95404 struct flow_action { 95405 unsigned int num_entries; 95406 struct flow_action_entry entries[0]; 95407 }; 95408 95409 struct flow_rule { 95410 struct flow_match match; 95411 struct flow_action action; 95412 }; 95413 95414 struct dsa_chip_data { 95415 struct device *host_dev; 95416 int sw_addr; 95417 struct device *netdev[12]; 95418 int eeprom_len; 95419 struct device_node *of_node; 95420 char *port_names[12]; 95421 struct device_node *port_dn[12]; 95422 s8 rtable[4]; 95423 }; 95424 95425 struct dsa_platform_data { 95426 struct device *netdev; 95427 struct net_device *of_netdev; 95428 int nr_chips; 95429 struct dsa_chip_data *chip; 95430 }; 95431 95432 struct phylink_link_state { 95433 long unsigned int advertising[2]; 95434 long unsigned int lp_advertising[2]; 95435 phy_interface_t interface; 95436 int speed; 95437 int duplex; 95438 int pause; 95439 unsigned int link: 1; 95440 unsigned int an_enabled: 1; 95441 unsigned int an_complete: 1; 95442 }; 95443 95444 enum phylink_op_type { 95445 PHYLINK_NETDEV = 0, 95446 PHYLINK_DEV = 1, 95447 }; 95448 95449 struct phylink_config { 95450 struct device *dev; 95451 enum phylink_op_type type; 95452 bool pcs_poll; 95453 bool poll_fixed_state; 95454 void (*get_fixed_state)(struct phylink_config *, struct phylink_link_state *); 95455 }; 95456 95457 enum devlink_port_type { 95458 DEVLINK_PORT_TYPE_NOTSET = 0, 95459 DEVLINK_PORT_TYPE_AUTO = 1, 95460 DEVLINK_PORT_TYPE_ETH = 2, 95461 DEVLINK_PORT_TYPE_IB = 3, 95462 }; 95463 95464 enum devlink_port_flavour { 95465 DEVLINK_PORT_FLAVOUR_PHYSICAL = 0, 95466 DEVLINK_PORT_FLAVOUR_CPU = 1, 95467 DEVLINK_PORT_FLAVOUR_DSA = 2, 95468 DEVLINK_PORT_FLAVOUR_PCI_PF = 3, 95469 DEVLINK_PORT_FLAVOUR_PCI_VF = 4, 95470 DEVLINK_PORT_FLAVOUR_VIRTUAL = 5, 95471 DEVLINK_PORT_FLAVOUR_UNUSED = 6, 95472 }; 95473 95474 struct devlink_port_phys_attrs { 95475 u32 port_number; 95476 u32 split_subport_number; 95477 }; 95478 95479 struct devlink_port_pci_pf_attrs { 95480 u32 controller; 95481 u16 pf; 95482 u8 external: 1; 95483 }; 95484 95485 struct devlink_port_pci_vf_attrs { 95486 u32 controller; 95487 u16 pf; 95488 u16 vf; 95489 u8 external: 1; 95490 }; 95491 95492 struct devlink_port_attrs { 95493 u8 split: 1; 95494 u8 splittable: 1; 95495 u32 lanes; 95496 enum devlink_port_flavour flavour; 95497 struct netdev_phys_item_id switch_id; 95498 union { 95499 struct devlink_port_phys_attrs phys; 95500 struct devlink_port_pci_pf_attrs pci_pf; 95501 struct devlink_port_pci_vf_attrs pci_vf; 95502 }; 95503 }; 95504 95505 struct devlink; 95506 95507 struct devlink_port { 95508 struct list_head list; 95509 struct list_head param_list; 95510 struct list_head region_list; 95511 struct devlink *devlink; 95512 unsigned int index; 95513 bool registered; 95514 spinlock_t type_lock; 95515 enum devlink_port_type type; 95516 enum devlink_port_type desired_type; 95517 void *type_dev; 95518 struct devlink_port_attrs attrs; 95519 u8 attrs_set: 1; 95520 u8 switch_port: 1; 95521 struct delayed_work type_warn_dw; 95522 struct list_head reporter_list; 95523 struct mutex reporters_lock; 95524 }; 95525 95526 struct dsa_device_ops; 95527 95528 struct dsa_switch_tree; 95529 95530 struct packet_type; 95531 95532 struct dsa_switch; 95533 95534 struct dsa_netdevice_ops; 95535 95536 struct dsa_port { 95537 union { 95538 struct net_device *master; 95539 struct net_device *slave; 95540 }; 95541 const struct dsa_device_ops *tag_ops; 95542 struct dsa_switch_tree *dst; 95543 struct sk_buff * (*rcv)(struct sk_buff *, struct net_device *, struct packet_type *); 95544 bool (*filter)(const struct sk_buff *, struct net_device *); 95545 enum { 95546 DSA_PORT_TYPE_UNUSED = 0, 95547 DSA_PORT_TYPE_CPU = 1, 95548 DSA_PORT_TYPE_DSA = 2, 95549 DSA_PORT_TYPE_USER = 3, 95550 } type; 95551 struct dsa_switch *ds; 95552 unsigned int index; 95553 const char *name; 95554 struct dsa_port *cpu_dp; 95555 const char *mac; 95556 struct device_node *dn; 95557 unsigned int ageing_time; 95558 bool vlan_filtering; 95559 u8 stp_state; 95560 struct net_device *bridge_dev; 95561 struct devlink_port devlink_port; 95562 bool devlink_port_setup; 95563 struct phylink *pl; 95564 struct phylink_config pl_config; 95565 struct list_head list; 95566 void *priv; 95567 const struct ethtool_ops *orig_ethtool_ops; 95568 const struct dsa_netdevice_ops *netdev_ops; 95569 bool setup; 95570 }; 95571 95572 struct packet_type { 95573 __be16 type; 95574 bool ignore_outgoing; 95575 struct net_device *dev; 95576 int (*func)(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 95577 void (*list_func)(struct list_head *, struct packet_type *, struct net_device *); 95578 bool (*id_match)(struct packet_type *, struct sock *); 95579 void *af_packet_priv; 95580 struct list_head list; 95581 }; 95582 95583 struct netdev_notifier_changeupper_info { 95584 struct netdev_notifier_info info; 95585 struct net_device *upper_dev; 95586 bool master; 95587 bool linking; 95588 void *upper_info; 95589 }; 95590 95591 struct flow_action_cookie { 95592 u32 cookie_len; 95593 u8 cookie[0]; 95594 }; 95595 95596 struct flow_stats { 95597 u64 pkts; 95598 u64 bytes; 95599 u64 drops; 95600 u64 lastused; 95601 enum flow_action_hw_stats used_hw_stats; 95602 bool used_hw_stats_valid; 95603 }; 95604 95605 enum flow_cls_command { 95606 FLOW_CLS_REPLACE = 0, 95607 FLOW_CLS_DESTROY = 1, 95608 FLOW_CLS_STATS = 2, 95609 FLOW_CLS_TMPLT_CREATE = 3, 95610 FLOW_CLS_TMPLT_DESTROY = 4, 95611 }; 95612 95613 struct flow_cls_common_offload { 95614 u32 chain_index; 95615 __be16 protocol; 95616 u32 prio; 95617 struct netlink_ext_ack *extack; 95618 }; 95619 95620 struct flow_cls_offload { 95621 struct flow_cls_common_offload common; 95622 enum flow_cls_command command; 95623 long unsigned int cookie; 95624 struct flow_rule *rule; 95625 struct flow_stats stats; 95626 u32 classid; 95627 }; 95628 95629 enum devlink_sb_pool_type { 95630 DEVLINK_SB_POOL_TYPE_INGRESS = 0, 95631 DEVLINK_SB_POOL_TYPE_EGRESS = 1, 95632 }; 95633 95634 enum devlink_sb_threshold_type { 95635 DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0, 95636 DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 1, 95637 }; 95638 95639 enum devlink_eswitch_encap_mode { 95640 DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0, 95641 DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 1, 95642 }; 95643 95644 enum devlink_param_cmode { 95645 DEVLINK_PARAM_CMODE_RUNTIME = 0, 95646 DEVLINK_PARAM_CMODE_DRIVERINIT = 1, 95647 DEVLINK_PARAM_CMODE_PERMANENT = 2, 95648 __DEVLINK_PARAM_CMODE_MAX = 3, 95649 DEVLINK_PARAM_CMODE_MAX = 2, 95650 }; 95651 95652 enum devlink_trap_action { 95653 DEVLINK_TRAP_ACTION_DROP = 0, 95654 DEVLINK_TRAP_ACTION_TRAP = 1, 95655 DEVLINK_TRAP_ACTION_MIRROR = 2, 95656 }; 95657 95658 enum devlink_trap_type { 95659 DEVLINK_TRAP_TYPE_DROP = 0, 95660 DEVLINK_TRAP_TYPE_EXCEPTION = 1, 95661 DEVLINK_TRAP_TYPE_CONTROL = 2, 95662 }; 95663 95664 enum devlink_reload_action { 95665 DEVLINK_RELOAD_ACTION_UNSPEC = 0, 95666 DEVLINK_RELOAD_ACTION_DRIVER_REINIT = 1, 95667 DEVLINK_RELOAD_ACTION_FW_ACTIVATE = 2, 95668 __DEVLINK_RELOAD_ACTION_MAX = 3, 95669 DEVLINK_RELOAD_ACTION_MAX = 2, 95670 }; 95671 95672 enum devlink_reload_limit { 95673 DEVLINK_RELOAD_LIMIT_UNSPEC = 0, 95674 DEVLINK_RELOAD_LIMIT_NO_RESET = 1, 95675 __DEVLINK_RELOAD_LIMIT_MAX = 2, 95676 DEVLINK_RELOAD_LIMIT_MAX = 1, 95677 }; 95678 95679 enum devlink_dpipe_field_mapping_type { 95680 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0, 95681 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 1, 95682 }; 95683 95684 struct devlink_dev_stats { 95685 u32 reload_stats[6]; 95686 u32 remote_reload_stats[6]; 95687 }; 95688 95689 struct devlink_dpipe_headers; 95690 95691 struct devlink_ops; 95692 95693 struct devlink { 95694 struct list_head list; 95695 struct list_head port_list; 95696 struct list_head sb_list; 95697 struct list_head dpipe_table_list; 95698 struct list_head resource_list; 95699 struct list_head param_list; 95700 struct list_head region_list; 95701 struct list_head reporter_list; 95702 struct mutex reporters_lock; 95703 struct devlink_dpipe_headers *dpipe_headers; 95704 struct list_head trap_list; 95705 struct list_head trap_group_list; 95706 struct list_head trap_policer_list; 95707 const struct devlink_ops *ops; 95708 struct xarray snapshot_ids; 95709 struct devlink_dev_stats stats; 95710 struct device *dev; 95711 possible_net_t _net; 95712 struct mutex lock; 95713 u8 reload_failed: 1; 95714 u8 reload_enabled: 1; 95715 u8 registered: 1; 95716 long: 61; 95717 long: 64; 95718 char priv[0]; 95719 }; 95720 95721 struct devlink_dpipe_header; 95722 95723 struct devlink_dpipe_headers { 95724 struct devlink_dpipe_header **headers; 95725 unsigned int headers_count; 95726 }; 95727 95728 struct devlink_sb_pool_info; 95729 95730 struct devlink_info_req; 95731 95732 struct devlink_flash_update_params; 95733 95734 struct devlink_trap; 95735 95736 struct devlink_trap_group; 95737 95738 struct devlink_trap_policer; 95739 95740 struct devlink_ops { 95741 u32 supported_flash_update_params; 95742 long unsigned int reload_actions; 95743 long unsigned int reload_limits; 95744 int (*reload_down)(struct devlink *, bool, enum devlink_reload_action, enum devlink_reload_limit, struct netlink_ext_ack *); 95745 int (*reload_up)(struct devlink *, enum devlink_reload_action, enum devlink_reload_limit, u32 *, struct netlink_ext_ack *); 95746 int (*port_type_set)(struct devlink_port *, enum devlink_port_type); 95747 int (*port_split)(struct devlink *, unsigned int, unsigned int, struct netlink_ext_ack *); 95748 int (*port_unsplit)(struct devlink *, unsigned int, struct netlink_ext_ack *); 95749 int (*sb_pool_get)(struct devlink *, unsigned int, u16, struct devlink_sb_pool_info *); 95750 int (*sb_pool_set)(struct devlink *, unsigned int, u16, u32, enum devlink_sb_threshold_type, struct netlink_ext_ack *); 95751 int (*sb_port_pool_get)(struct devlink_port *, unsigned int, u16, u32 *); 95752 int (*sb_port_pool_set)(struct devlink_port *, unsigned int, u16, u32, struct netlink_ext_ack *); 95753 int (*sb_tc_pool_bind_get)(struct devlink_port *, unsigned int, u16, enum devlink_sb_pool_type, u16 *, u32 *); 95754 int (*sb_tc_pool_bind_set)(struct devlink_port *, unsigned int, u16, enum devlink_sb_pool_type, u16, u32, struct netlink_ext_ack *); 95755 int (*sb_occ_snapshot)(struct devlink *, unsigned int); 95756 int (*sb_occ_max_clear)(struct devlink *, unsigned int); 95757 int (*sb_occ_port_pool_get)(struct devlink_port *, unsigned int, u16, u32 *, u32 *); 95758 int (*sb_occ_tc_port_bind_get)(struct devlink_port *, unsigned int, u16, enum devlink_sb_pool_type, u32 *, u32 *); 95759 int (*eswitch_mode_get)(struct devlink *, u16 *); 95760 int (*eswitch_mode_set)(struct devlink *, u16, struct netlink_ext_ack *); 95761 int (*eswitch_inline_mode_get)(struct devlink *, u8 *); 95762 int (*eswitch_inline_mode_set)(struct devlink *, u8, struct netlink_ext_ack *); 95763 int (*eswitch_encap_mode_get)(struct devlink *, enum devlink_eswitch_encap_mode *); 95764 int (*eswitch_encap_mode_set)(struct devlink *, enum devlink_eswitch_encap_mode, struct netlink_ext_ack *); 95765 int (*info_get)(struct devlink *, struct devlink_info_req *, struct netlink_ext_ack *); 95766 int (*flash_update)(struct devlink *, struct devlink_flash_update_params *, struct netlink_ext_ack *); 95767 int (*trap_init)(struct devlink *, const struct devlink_trap *, void *); 95768 void (*trap_fini)(struct devlink *, const struct devlink_trap *, void *); 95769 int (*trap_action_set)(struct devlink *, const struct devlink_trap *, enum devlink_trap_action, struct netlink_ext_ack *); 95770 int (*trap_group_init)(struct devlink *, const struct devlink_trap_group *); 95771 int (*trap_group_set)(struct devlink *, const struct devlink_trap_group *, const struct devlink_trap_policer *, struct netlink_ext_ack *); 95772 int (*trap_group_action_set)(struct devlink *, const struct devlink_trap_group *, enum devlink_trap_action, struct netlink_ext_ack *); 95773 int (*trap_policer_init)(struct devlink *, const struct devlink_trap_policer *); 95774 void (*trap_policer_fini)(struct devlink *, const struct devlink_trap_policer *); 95775 int (*trap_policer_set)(struct devlink *, const struct devlink_trap_policer *, u64, u64, struct netlink_ext_ack *); 95776 int (*trap_policer_counter_get)(struct devlink *, const struct devlink_trap_policer *, u64 *); 95777 int (*port_function_hw_addr_get)(struct devlink *, struct devlink_port *, u8 *, int *, struct netlink_ext_ack *); 95778 int (*port_function_hw_addr_set)(struct devlink *, struct devlink_port *, const u8 *, int, struct netlink_ext_ack *); 95779 }; 95780 95781 struct devlink_sb_pool_info { 95782 enum devlink_sb_pool_type pool_type; 95783 u32 size; 95784 enum devlink_sb_threshold_type threshold_type; 95785 u32 cell_size; 95786 }; 95787 95788 struct devlink_dpipe_field { 95789 const char *name; 95790 unsigned int id; 95791 unsigned int bitwidth; 95792 enum devlink_dpipe_field_mapping_type mapping_type; 95793 }; 95794 95795 struct devlink_dpipe_header { 95796 const char *name; 95797 unsigned int id; 95798 struct devlink_dpipe_field *fields; 95799 unsigned int fields_count; 95800 bool global; 95801 }; 95802 95803 union devlink_param_value { 95804 u8 vu8; 95805 u16 vu16; 95806 u32 vu32; 95807 char vstr[32]; 95808 bool vbool; 95809 }; 95810 95811 struct devlink_param_gset_ctx { 95812 union devlink_param_value val; 95813 enum devlink_param_cmode cmode; 95814 }; 95815 95816 struct devlink_flash_update_params { 95817 const struct firmware *fw; 95818 const char *component; 95819 u32 overwrite_mask; 95820 }; 95821 95822 struct devlink_trap_policer { 95823 u32 id; 95824 u64 init_rate; 95825 u64 init_burst; 95826 u64 max_rate; 95827 u64 min_rate; 95828 u64 max_burst; 95829 u64 min_burst; 95830 }; 95831 95832 struct devlink_trap_group { 95833 const char *name; 95834 u16 id; 95835 bool generic; 95836 u32 init_policer_id; 95837 }; 95838 95839 struct devlink_trap { 95840 enum devlink_trap_type type; 95841 enum devlink_trap_action init_action; 95842 bool generic; 95843 u16 id; 95844 const char *name; 95845 u16 init_group_id; 95846 u32 metadata_cap; 95847 }; 95848 95849 struct switchdev_trans { 95850 bool ph_prepare; 95851 }; 95852 95853 enum switchdev_obj_id { 95854 SWITCHDEV_OBJ_ID_UNDEFINED = 0, 95855 SWITCHDEV_OBJ_ID_PORT_VLAN = 1, 95856 SWITCHDEV_OBJ_ID_PORT_MDB = 2, 95857 SWITCHDEV_OBJ_ID_HOST_MDB = 3, 95858 SWITCHDEV_OBJ_ID_MRP = 4, 95859 SWITCHDEV_OBJ_ID_RING_TEST_MRP = 5, 95860 SWITCHDEV_OBJ_ID_RING_ROLE_MRP = 6, 95861 SWITCHDEV_OBJ_ID_RING_STATE_MRP = 7, 95862 SWITCHDEV_OBJ_ID_IN_TEST_MRP = 8, 95863 SWITCHDEV_OBJ_ID_IN_ROLE_MRP = 9, 95864 SWITCHDEV_OBJ_ID_IN_STATE_MRP = 10, 95865 }; 95866 95867 struct switchdev_obj { 95868 struct net_device *orig_dev; 95869 enum switchdev_obj_id id; 95870 u32 flags; 95871 void *complete_priv; 95872 void (*complete)(struct net_device *, int, void *); 95873 }; 95874 95875 struct switchdev_obj_port_vlan { 95876 struct switchdev_obj obj; 95877 u16 flags; 95878 u16 vid_begin; 95879 u16 vid_end; 95880 }; 95881 95882 struct switchdev_obj_port_mdb { 95883 struct switchdev_obj obj; 95884 unsigned char addr[6]; 95885 u16 vid; 95886 }; 95887 95888 enum dsa_tag_protocol { 95889 DSA_TAG_PROTO_NONE = 0, 95890 DSA_TAG_PROTO_BRCM = 1, 95891 DSA_TAG_PROTO_BRCM_PREPEND = 2, 95892 DSA_TAG_PROTO_DSA = 3, 95893 DSA_TAG_PROTO_EDSA = 4, 95894 DSA_TAG_PROTO_GSWIP = 5, 95895 DSA_TAG_PROTO_KSZ9477 = 6, 95896 DSA_TAG_PROTO_KSZ9893 = 7, 95897 DSA_TAG_PROTO_LAN9303 = 8, 95898 DSA_TAG_PROTO_MTK = 9, 95899 DSA_TAG_PROTO_QCA = 10, 95900 DSA_TAG_PROTO_TRAILER = 11, 95901 DSA_TAG_PROTO_8021Q = 12, 95902 DSA_TAG_PROTO_SJA1105 = 13, 95903 DSA_TAG_PROTO_KSZ8795 = 14, 95904 DSA_TAG_PROTO_OCELOT = 15, 95905 DSA_TAG_PROTO_AR9331 = 16, 95906 DSA_TAG_PROTO_RTL4_A = 17, 95907 DSA_TAG_PROTO_HELLCREEK = 18, 95908 }; 95909 95910 struct dsa_device_ops { 95911 struct sk_buff * (*xmit)(struct sk_buff *, struct net_device *); 95912 struct sk_buff * (*rcv)(struct sk_buff *, struct net_device *, struct packet_type *); 95913 void (*flow_dissect)(const struct sk_buff *, __be16 *, int *); 95914 bool (*filter)(const struct sk_buff *, struct net_device *); 95915 unsigned int overhead; 95916 const char *name; 95917 enum dsa_tag_protocol proto; 95918 bool promisc_on_master; 95919 bool tail_tag; 95920 }; 95921 95922 struct dsa_netdevice_ops { 95923 int (*ndo_do_ioctl)(struct net_device *, struct ifreq *, int); 95924 }; 95925 95926 struct dsa_switch_tree { 95927 struct list_head list; 95928 struct raw_notifier_head nh; 95929 unsigned int index; 95930 struct kref refcount; 95931 bool setup; 95932 struct dsa_platform_data *pd; 95933 struct list_head ports; 95934 struct list_head rtable; 95935 }; 95936 95937 struct dsa_mall_mirror_tc_entry { 95938 u8 to_local_port; 95939 bool ingress; 95940 }; 95941 95942 struct dsa_mall_policer_tc_entry { 95943 u32 burst; 95944 u64 rate_bytes_per_sec; 95945 }; 95946 95947 struct dsa_switch_ops; 95948 95949 struct dsa_switch { 95950 bool setup; 95951 struct device *dev; 95952 struct dsa_switch_tree *dst; 95953 unsigned int index; 95954 struct notifier_block nb; 95955 void *priv; 95956 struct dsa_chip_data *cd; 95957 const struct dsa_switch_ops *ops; 95958 u32 phys_mii_mask; 95959 struct mii_bus *slave_mii_bus; 95960 unsigned int ageing_time_min; 95961 unsigned int ageing_time_max; 95962 struct devlink *devlink; 95963 unsigned int num_tx_queues; 95964 bool vlan_filtering_is_global; 95965 bool configure_vlan_while_not_filtering; 95966 bool untag_bridge_pvid; 95967 bool vlan_filtering; 95968 bool pcs_poll; 95969 bool mtu_enforcement_ingress; 95970 size_t num_ports; 95971 }; 95972 95973 struct fixed_phy_status___2; 95974 95975 typedef int dsa_fdb_dump_cb_t(const unsigned char *, u16, bool, void *); 95976 95977 struct dsa_switch_ops { 95978 enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *, int, enum dsa_tag_protocol); 95979 int (*setup)(struct dsa_switch *); 95980 void (*teardown)(struct dsa_switch *); 95981 u32 (*get_phy_flags)(struct dsa_switch *, int); 95982 int (*phy_read)(struct dsa_switch *, int, int); 95983 int (*phy_write)(struct dsa_switch *, int, int, u16); 95984 void (*adjust_link)(struct dsa_switch *, int, struct phy_device *); 95985 void (*fixed_link_update)(struct dsa_switch *, int, struct fixed_phy_status___2 *); 95986 void (*phylink_validate)(struct dsa_switch *, int, long unsigned int *, struct phylink_link_state *); 95987 int (*phylink_mac_link_state)(struct dsa_switch *, int, struct phylink_link_state *); 95988 void (*phylink_mac_config)(struct dsa_switch *, int, unsigned int, const struct phylink_link_state *); 95989 void (*phylink_mac_an_restart)(struct dsa_switch *, int); 95990 void (*phylink_mac_link_down)(struct dsa_switch *, int, unsigned int, phy_interface_t); 95991 void (*phylink_mac_link_up)(struct dsa_switch *, int, unsigned int, phy_interface_t, struct phy_device *, int, int, bool, bool); 95992 void (*phylink_fixed_state)(struct dsa_switch *, int, struct phylink_link_state *); 95993 void (*get_strings)(struct dsa_switch *, int, u32, uint8_t *); 95994 void (*get_ethtool_stats)(struct dsa_switch *, int, uint64_t *); 95995 int (*get_sset_count)(struct dsa_switch *, int, int); 95996 void (*get_ethtool_phy_stats)(struct dsa_switch *, int, uint64_t *); 95997 void (*get_wol)(struct dsa_switch *, int, struct ethtool_wolinfo *); 95998 int (*set_wol)(struct dsa_switch *, int, struct ethtool_wolinfo *); 95999 int (*get_ts_info)(struct dsa_switch *, int, struct ethtool_ts_info *); 96000 int (*suspend)(struct dsa_switch *); 96001 int (*resume)(struct dsa_switch *); 96002 int (*port_enable)(struct dsa_switch *, int, struct phy_device *); 96003 void (*port_disable)(struct dsa_switch *, int); 96004 int (*set_mac_eee)(struct dsa_switch *, int, struct ethtool_eee *); 96005 int (*get_mac_eee)(struct dsa_switch *, int, struct ethtool_eee *); 96006 int (*get_eeprom_len)(struct dsa_switch *); 96007 int (*get_eeprom)(struct dsa_switch *, struct ethtool_eeprom *, u8 *); 96008 int (*set_eeprom)(struct dsa_switch *, struct ethtool_eeprom *, u8 *); 96009 int (*get_regs_len)(struct dsa_switch *, int); 96010 void (*get_regs)(struct dsa_switch *, int, struct ethtool_regs *, void *); 96011 int (*port_prechangeupper)(struct dsa_switch *, int, struct netdev_notifier_changeupper_info *); 96012 int (*set_ageing_time)(struct dsa_switch *, unsigned int); 96013 int (*port_bridge_join)(struct dsa_switch *, int, struct net_device *); 96014 void (*port_bridge_leave)(struct dsa_switch *, int, struct net_device *); 96015 void (*port_stp_state_set)(struct dsa_switch *, int, u8); 96016 void (*port_fast_age)(struct dsa_switch *, int); 96017 int (*port_egress_floods)(struct dsa_switch *, int, bool, bool); 96018 int (*port_vlan_filtering)(struct dsa_switch *, int, bool, struct switchdev_trans *); 96019 int (*port_vlan_prepare)(struct dsa_switch *, int, const struct switchdev_obj_port_vlan *); 96020 void (*port_vlan_add)(struct dsa_switch *, int, const struct switchdev_obj_port_vlan *); 96021 int (*port_vlan_del)(struct dsa_switch *, int, const struct switchdev_obj_port_vlan *); 96022 int (*port_fdb_add)(struct dsa_switch *, int, const unsigned char *, u16); 96023 int (*port_fdb_del)(struct dsa_switch *, int, const unsigned char *, u16); 96024 int (*port_fdb_dump)(struct dsa_switch *, int, dsa_fdb_dump_cb_t *, void *); 96025 int (*port_mdb_prepare)(struct dsa_switch *, int, const struct switchdev_obj_port_mdb *); 96026 void (*port_mdb_add)(struct dsa_switch *, int, const struct switchdev_obj_port_mdb *); 96027 int (*port_mdb_del)(struct dsa_switch *, int, const struct switchdev_obj_port_mdb *); 96028 int (*get_rxnfc)(struct dsa_switch *, int, struct ethtool_rxnfc *, u32 *); 96029 int (*set_rxnfc)(struct dsa_switch *, int, struct ethtool_rxnfc *); 96030 int (*cls_flower_add)(struct dsa_switch *, int, struct flow_cls_offload *, bool); 96031 int (*cls_flower_del)(struct dsa_switch *, int, struct flow_cls_offload *, bool); 96032 int (*cls_flower_stats)(struct dsa_switch *, int, struct flow_cls_offload *, bool); 96033 int (*port_mirror_add)(struct dsa_switch *, int, struct dsa_mall_mirror_tc_entry *, bool); 96034 void (*port_mirror_del)(struct dsa_switch *, int, struct dsa_mall_mirror_tc_entry *); 96035 int (*port_policer_add)(struct dsa_switch *, int, struct dsa_mall_policer_tc_entry *); 96036 void (*port_policer_del)(struct dsa_switch *, int); 96037 int (*port_setup_tc)(struct dsa_switch *, int, enum tc_setup_type, void *); 96038 int (*crosschip_bridge_join)(struct dsa_switch *, int, int, int, struct net_device *); 96039 void (*crosschip_bridge_leave)(struct dsa_switch *, int, int, int, struct net_device *); 96040 int (*port_hwtstamp_get)(struct dsa_switch *, int, struct ifreq *); 96041 int (*port_hwtstamp_set)(struct dsa_switch *, int, struct ifreq *); 96042 bool (*port_txtstamp)(struct dsa_switch *, int, struct sk_buff *, unsigned int); 96043 bool (*port_rxtstamp)(struct dsa_switch *, int, struct sk_buff *, unsigned int); 96044 int (*devlink_param_get)(struct dsa_switch *, u32, struct devlink_param_gset_ctx *); 96045 int (*devlink_param_set)(struct dsa_switch *, u32, struct devlink_param_gset_ctx *); 96046 int (*devlink_info_get)(struct dsa_switch *, struct devlink_info_req *, struct netlink_ext_ack *); 96047 int (*port_change_mtu)(struct dsa_switch *, int, int); 96048 int (*port_max_mtu)(struct dsa_switch *, int); 96049 }; 96050 96051 struct dsa_loop_pdata { 96052 struct dsa_chip_data cd; 96053 const char *name; 96054 unsigned int enabled_ports; 96055 const char *netdev; 96056 }; 96057 96058 struct wl1251_platform_data { 96059 int power_gpio; 96060 int irq; 96061 bool use_eeprom; 96062 }; 96063 96064 struct ohci { 96065 void *registers; 96066 }; 96067 96068 struct cdrom_msf { 96069 __u8 cdmsf_min0; 96070 __u8 cdmsf_sec0; 96071 __u8 cdmsf_frame0; 96072 __u8 cdmsf_min1; 96073 __u8 cdmsf_sec1; 96074 __u8 cdmsf_frame1; 96075 }; 96076 96077 struct cdrom_volctrl { 96078 __u8 channel0; 96079 __u8 channel1; 96080 __u8 channel2; 96081 __u8 channel3; 96082 }; 96083 96084 struct cdrom_subchnl { 96085 __u8 cdsc_format; 96086 __u8 cdsc_audiostatus; 96087 __u8 cdsc_adr: 4; 96088 __u8 cdsc_ctrl: 4; 96089 __u8 cdsc_trk; 96090 __u8 cdsc_ind; 96091 union cdrom_addr cdsc_absaddr; 96092 union cdrom_addr cdsc_reladdr; 96093 }; 96094 96095 struct cdrom_read_audio { 96096 union cdrom_addr addr; 96097 __u8 addr_format; 96098 int nframes; 96099 __u8 *buf; 96100 }; 96101 96102 struct cdrom_blk { 96103 unsigned int from; 96104 short unsigned int len; 96105 }; 96106 96107 struct dvd_layer { 96108 __u8 book_version: 4; 96109 __u8 book_type: 4; 96110 __u8 min_rate: 4; 96111 __u8 disc_size: 4; 96112 __u8 layer_type: 4; 96113 __u8 track_path: 1; 96114 __u8 nlayers: 2; 96115 char: 1; 96116 __u8 track_density: 4; 96117 __u8 linear_density: 4; 96118 __u8 bca: 1; 96119 __u32 start_sector; 96120 __u32 end_sector; 96121 __u32 end_sector_l0; 96122 }; 96123 96124 struct dvd_physical { 96125 __u8 type; 96126 __u8 layer_num; 96127 struct dvd_layer layer[4]; 96128 }; 96129 96130 struct dvd_copyright { 96131 __u8 type; 96132 __u8 layer_num; 96133 __u8 cpst; 96134 __u8 rmi; 96135 }; 96136 96137 struct dvd_disckey { 96138 __u8 type; 96139 unsigned int agid: 2; 96140 __u8 value[2048]; 96141 }; 96142 96143 struct dvd_bca { 96144 __u8 type; 96145 int len; 96146 __u8 value[188]; 96147 }; 96148 96149 struct dvd_manufact { 96150 __u8 type; 96151 __u8 layer_num; 96152 int len; 96153 __u8 value[2048]; 96154 }; 96155 96156 typedef union { 96157 __u8 type; 96158 struct dvd_physical physical; 96159 struct dvd_copyright copyright; 96160 struct dvd_disckey disckey; 96161 struct dvd_bca bca; 96162 struct dvd_manufact manufact; 96163 } dvd_struct; 96164 96165 typedef __u8 dvd_key[5]; 96166 96167 typedef __u8 dvd_challenge[10]; 96168 96169 struct dvd_lu_send_agid { 96170 __u8 type; 96171 unsigned int agid: 2; 96172 }; 96173 96174 struct dvd_host_send_challenge { 96175 __u8 type; 96176 unsigned int agid: 2; 96177 dvd_challenge chal; 96178 }; 96179 96180 struct dvd_send_key { 96181 __u8 type; 96182 unsigned int agid: 2; 96183 dvd_key key; 96184 }; 96185 96186 struct dvd_lu_send_challenge { 96187 __u8 type; 96188 unsigned int agid: 2; 96189 dvd_challenge chal; 96190 }; 96191 96192 struct dvd_lu_send_title_key { 96193 __u8 type; 96194 unsigned int agid: 2; 96195 dvd_key title_key; 96196 int lba; 96197 unsigned int cpm: 1; 96198 unsigned int cp_sec: 1; 96199 unsigned int cgms: 2; 96200 }; 96201 96202 struct dvd_lu_send_asf { 96203 __u8 type; 96204 unsigned int agid: 2; 96205 unsigned int asf: 1; 96206 }; 96207 96208 struct dvd_host_send_rpcstate { 96209 __u8 type; 96210 __u8 pdrc; 96211 }; 96212 96213 struct dvd_lu_send_rpcstate { 96214 __u8 type: 2; 96215 __u8 vra: 3; 96216 __u8 ucca: 3; 96217 __u8 region_mask; 96218 __u8 rpc_scheme; 96219 }; 96220 96221 typedef union { 96222 __u8 type; 96223 struct dvd_lu_send_agid lsa; 96224 struct dvd_host_send_challenge hsc; 96225 struct dvd_send_key lsk; 96226 struct dvd_lu_send_challenge lsc; 96227 struct dvd_send_key hsk; 96228 struct dvd_lu_send_title_key lstk; 96229 struct dvd_lu_send_asf lsasf; 96230 struct dvd_host_send_rpcstate hrpcs; 96231 struct dvd_lu_send_rpcstate lrpcs; 96232 } dvd_authinfo; 96233 96234 struct mrw_feature_desc { 96235 __be16 feature_code; 96236 __u8 curr: 1; 96237 __u8 persistent: 1; 96238 __u8 feature_version: 4; 96239 __u8 reserved1: 2; 96240 __u8 add_len; 96241 __u8 write: 1; 96242 __u8 reserved2: 7; 96243 __u8 reserved3; 96244 __u8 reserved4; 96245 __u8 reserved5; 96246 }; 96247 96248 struct rwrt_feature_desc { 96249 __be16 feature_code; 96250 __u8 curr: 1; 96251 __u8 persistent: 1; 96252 __u8 feature_version: 4; 96253 __u8 reserved1: 2; 96254 __u8 add_len; 96255 __u32 last_lba; 96256 __u32 block_size; 96257 __u16 blocking; 96258 __u8 page_present: 1; 96259 __u8 reserved2: 7; 96260 __u8 reserved3; 96261 }; 96262 96263 typedef struct { 96264 __be16 disc_information_length; 96265 __u8 disc_status: 2; 96266 __u8 border_status: 2; 96267 __u8 erasable: 1; 96268 __u8 reserved1: 3; 96269 __u8 n_first_track; 96270 __u8 n_sessions_lsb; 96271 __u8 first_track_lsb; 96272 __u8 last_track_lsb; 96273 __u8 mrw_status: 2; 96274 __u8 dbit: 1; 96275 __u8 reserved2: 2; 96276 __u8 uru: 1; 96277 __u8 dbc_v: 1; 96278 __u8 did_v: 1; 96279 __u8 disc_type; 96280 __u8 n_sessions_msb; 96281 __u8 first_track_msb; 96282 __u8 last_track_msb; 96283 __u32 disc_id; 96284 __u32 lead_in; 96285 __u32 lead_out; 96286 __u8 disc_bar_code[8]; 96287 __u8 reserved3; 96288 __u8 n_opc; 96289 } disc_information; 96290 96291 typedef struct { 96292 __be16 track_information_length; 96293 __u8 track_lsb; 96294 __u8 session_lsb; 96295 __u8 reserved1; 96296 __u8 track_mode: 4; 96297 __u8 copy: 1; 96298 __u8 damage: 1; 96299 __u8 reserved2: 2; 96300 __u8 data_mode: 4; 96301 __u8 fp: 1; 96302 __u8 packet: 1; 96303 __u8 blank: 1; 96304 __u8 rt: 1; 96305 __u8 nwa_v: 1; 96306 __u8 lra_v: 1; 96307 __u8 reserved3: 6; 96308 __be32 track_start; 96309 __be32 next_writable; 96310 __be32 free_blocks; 96311 __be32 fixed_packet_size; 96312 __be32 track_size; 96313 __be32 last_rec_address; 96314 } track_information; 96315 96316 struct mode_page_header { 96317 __be16 mode_data_length; 96318 __u8 medium_type; 96319 __u8 reserved1; 96320 __u8 reserved2; 96321 __u8 reserved3; 96322 __be16 desc_length; 96323 }; 96324 96325 typedef struct { 96326 int data; 96327 int audio; 96328 int cdi; 96329 int xa; 96330 long int error; 96331 } tracktype; 96332 96333 struct cdrom_mechstat_header { 96334 __u8 curslot: 5; 96335 __u8 changer_state: 2; 96336 __u8 fault: 1; 96337 __u8 reserved1: 4; 96338 __u8 door_open: 1; 96339 __u8 mech_state: 3; 96340 __u8 curlba[3]; 96341 __u8 nslots; 96342 __u16 slot_tablelen; 96343 }; 96344 96345 struct cdrom_slot { 96346 __u8 change: 1; 96347 __u8 reserved1: 6; 96348 __u8 disc_present: 1; 96349 __u8 reserved2[3]; 96350 }; 96351 96352 struct cdrom_changer_info { 96353 struct cdrom_mechstat_header hdr; 96354 struct cdrom_slot slots[256]; 96355 }; 96356 96357 struct modesel_head { 96358 __u8 reserved1; 96359 __u8 medium; 96360 __u8 reserved2; 96361 __u8 block_desc_length; 96362 __u8 density; 96363 __u8 number_of_blocks_hi; 96364 __u8 number_of_blocks_med; 96365 __u8 number_of_blocks_lo; 96366 __u8 reserved3; 96367 __u8 block_length_hi; 96368 __u8 block_length_med; 96369 __u8 block_length_lo; 96370 }; 96371 96372 typedef struct { 96373 __u16 report_key_length; 96374 __u8 reserved1; 96375 __u8 reserved2; 96376 __u8 ucca: 3; 96377 __u8 vra: 3; 96378 __u8 type_code: 2; 96379 __u8 region_mask; 96380 __u8 rpc_scheme; 96381 __u8 reserved3; 96382 } rpc_state_t; 96383 96384 struct cdrom_sysctl_settings { 96385 char info[1000]; 96386 int autoclose; 96387 int autoeject; 96388 int debug; 96389 int lock; 96390 int check; 96391 }; 96392 96393 enum cdrom_print_option { 96394 CTL_NAME = 0, 96395 CTL_SPEED = 1, 96396 CTL_SLOTS = 2, 96397 CTL_CAPABILITY = 3, 96398 }; 96399 96400 struct compat_cdrom_read_audio { 96401 union cdrom_addr addr; 96402 u8 addr_format; 96403 compat_int_t nframes; 96404 compat_caddr_t buf; 96405 }; 96406 96407 struct socket_state_t { 96408 u_int flags; 96409 u_int csc_mask; 96410 u_char Vcc; 96411 u_char Vpp; 96412 u_char io_irq; 96413 }; 96414 96415 typedef struct socket_state_t socket_state_t; 96416 96417 struct pccard_io_map { 96418 u_char map; 96419 u_char flags; 96420 u_short speed; 96421 phys_addr_t start; 96422 phys_addr_t stop; 96423 }; 96424 96425 struct pccard_mem_map { 96426 u_char map; 96427 u_char flags; 96428 u_short speed; 96429 phys_addr_t static_start; 96430 u_int card_start; 96431 struct resource *res; 96432 }; 96433 96434 typedef struct pccard_mem_map pccard_mem_map; 96435 96436 struct io_window_t { 96437 u_int InUse; 96438 u_int Config; 96439 struct resource *res; 96440 }; 96441 96442 typedef struct io_window_t io_window_t; 96443 96444 struct pcmcia_socket; 96445 96446 struct pccard_operations { 96447 int (*init)(struct pcmcia_socket *); 96448 int (*suspend)(struct pcmcia_socket *); 96449 int (*get_status)(struct pcmcia_socket *, u_int *); 96450 int (*set_socket)(struct pcmcia_socket *, socket_state_t *); 96451 int (*set_io_map)(struct pcmcia_socket *, struct pccard_io_map *); 96452 int (*set_mem_map)(struct pcmcia_socket *, struct pccard_mem_map *); 96453 }; 96454 96455 struct pccard_resource_ops; 96456 96457 struct pcmcia_callback; 96458 96459 struct pcmcia_socket { 96460 struct module *owner; 96461 socket_state_t socket; 96462 u_int state; 96463 u_int suspended_state; 96464 u_short functions; 96465 u_short lock_count; 96466 pccard_mem_map cis_mem; 96467 void *cis_virt; 96468 io_window_t io[2]; 96469 pccard_mem_map win[4]; 96470 struct list_head cis_cache; 96471 size_t fake_cis_len; 96472 u8 *fake_cis; 96473 struct list_head socket_list; 96474 struct completion socket_released; 96475 unsigned int sock; 96476 u_int features; 96477 u_int irq_mask; 96478 u_int map_size; 96479 u_int io_offset; 96480 u_int pci_irq; 96481 struct pci_dev *cb_dev; 96482 u8 resource_setup_done; 96483 struct pccard_operations *ops; 96484 struct pccard_resource_ops *resource_ops; 96485 void *resource_data; 96486 void (*zoom_video)(struct pcmcia_socket *, int); 96487 int (*power_hook)(struct pcmcia_socket *, int); 96488 void (*tune_bridge)(struct pcmcia_socket *, struct pci_bus *); 96489 struct task_struct *thread; 96490 struct completion thread_done; 96491 unsigned int thread_events; 96492 unsigned int sysfs_events; 96493 struct mutex skt_mutex; 96494 struct mutex ops_mutex; 96495 spinlock_t thread_lock; 96496 struct pcmcia_callback *callback; 96497 struct list_head devices_list; 96498 u8 device_count; 96499 u8 pcmcia_pfc; 96500 atomic_t present; 96501 unsigned int pcmcia_irq; 96502 struct device dev; 96503 void *driver_data; 96504 int resume_status; 96505 }; 96506 96507 struct pccard_resource_ops { 96508 int (*validate_mem)(struct pcmcia_socket *); 96509 int (*find_io)(struct pcmcia_socket *, unsigned int, unsigned int *, unsigned int, unsigned int, struct resource **); 96510 struct resource * (*find_mem)(long unsigned int, long unsigned int, long unsigned int, int, struct pcmcia_socket *); 96511 int (*init)(struct pcmcia_socket *); 96512 void (*exit)(struct pcmcia_socket *); 96513 }; 96514 96515 struct pcmcia_callback { 96516 struct module *owner; 96517 int (*add)(struct pcmcia_socket *); 96518 int (*remove)(struct pcmcia_socket *); 96519 void (*requery)(struct pcmcia_socket *); 96520 int (*validate)(struct pcmcia_socket *, unsigned int *); 96521 int (*suspend)(struct pcmcia_socket *); 96522 int (*early_resume)(struct pcmcia_socket *); 96523 int (*resume)(struct pcmcia_socket *); 96524 }; 96525 96526 enum { 96527 PCMCIA_IOPORT_0 = 0, 96528 PCMCIA_IOPORT_1 = 1, 96529 PCMCIA_IOMEM_0 = 2, 96530 PCMCIA_IOMEM_1 = 3, 96531 PCMCIA_IOMEM_2 = 4, 96532 PCMCIA_IOMEM_3 = 5, 96533 PCMCIA_NUM_RESOURCES = 6, 96534 }; 96535 96536 typedef unsigned char cisdata_t; 96537 96538 struct cistpl_longlink_mfc_t { 96539 u_char nfn; 96540 struct { 96541 u_char space; 96542 u_int addr; 96543 } fn[8]; 96544 }; 96545 96546 typedef struct cistpl_longlink_mfc_t cistpl_longlink_mfc_t; 96547 96548 struct cistpl_vers_1_t { 96549 u_char major; 96550 u_char minor; 96551 u_char ns; 96552 u_char ofs[4]; 96553 char str[254]; 96554 }; 96555 96556 typedef struct cistpl_vers_1_t cistpl_vers_1_t; 96557 96558 struct cistpl_manfid_t { 96559 u_short manf; 96560 u_short card; 96561 }; 96562 96563 typedef struct cistpl_manfid_t cistpl_manfid_t; 96564 96565 struct cistpl_funcid_t { 96566 u_char func; 96567 u_char sysinit; 96568 }; 96569 96570 typedef struct cistpl_funcid_t cistpl_funcid_t; 96571 96572 struct cistpl_config_t { 96573 u_char last_idx; 96574 u_int base; 96575 u_int rmask[4]; 96576 u_char subtuples; 96577 }; 96578 96579 typedef struct cistpl_config_t cistpl_config_t; 96580 96581 struct cistpl_device_geo_t { 96582 u_char ngeo; 96583 struct { 96584 u_char buswidth; 96585 u_int erase_block; 96586 u_int read_block; 96587 u_int write_block; 96588 u_int partition; 96589 u_int interleave; 96590 } geo[4]; 96591 }; 96592 96593 typedef struct cistpl_device_geo_t cistpl_device_geo_t; 96594 96595 struct pcmcia_device_id { 96596 __u16 match_flags; 96597 __u16 manf_id; 96598 __u16 card_id; 96599 __u8 func_id; 96600 __u8 function; 96601 __u8 device_no; 96602 __u32 prod_id_hash[4]; 96603 const char *prod_id[4]; 96604 kernel_ulong_t driver_info; 96605 char *cisfile; 96606 }; 96607 96608 struct pcmcia_dynids { 96609 struct mutex lock; 96610 struct list_head list; 96611 }; 96612 96613 struct pcmcia_device; 96614 96615 struct pcmcia_driver { 96616 const char *name; 96617 int (*probe)(struct pcmcia_device *); 96618 void (*remove)(struct pcmcia_device *); 96619 int (*suspend)(struct pcmcia_device *); 96620 int (*resume)(struct pcmcia_device *); 96621 struct module *owner; 96622 const struct pcmcia_device_id *id_table; 96623 struct device_driver drv; 96624 struct pcmcia_dynids dynids; 96625 }; 96626 96627 struct config_t; 96628 96629 struct pcmcia_device { 96630 struct pcmcia_socket *socket; 96631 char *devname; 96632 u8 device_no; 96633 u8 func; 96634 struct config_t *function_config; 96635 struct list_head socket_device_list; 96636 unsigned int irq; 96637 struct resource *resource[6]; 96638 resource_size_t card_addr; 96639 unsigned int vpp; 96640 unsigned int config_flags; 96641 unsigned int config_base; 96642 unsigned int config_index; 96643 unsigned int config_regs; 96644 unsigned int io_lines; 96645 u16 suspended: 1; 96646 u16 _irq: 1; 96647 u16 _io: 1; 96648 u16 _win: 4; 96649 u16 _locked: 1; 96650 u16 allow_func_id_match: 1; 96651 u16 has_manf_id: 1; 96652 u16 has_card_id: 1; 96653 u16 has_func_id: 1; 96654 u16 reserved: 4; 96655 u8 func_id; 96656 u16 manf_id; 96657 u16 card_id; 96658 char *prod_id[4]; 96659 u64 dma_mask; 96660 struct device dev; 96661 void *priv; 96662 unsigned int open; 96663 }; 96664 96665 struct config_t { 96666 struct kref ref; 96667 unsigned int state; 96668 struct resource io[2]; 96669 struct resource mem[4]; 96670 }; 96671 96672 typedef struct config_t config_t; 96673 96674 struct pcmcia_dynid { 96675 struct list_head node; 96676 struct pcmcia_device_id id; 96677 }; 96678 96679 typedef long unsigned int u_long; 96680 96681 typedef struct pccard_io_map pccard_io_map; 96682 96683 struct cistpl_longlink_t { 96684 u_int addr; 96685 }; 96686 96687 typedef struct cistpl_longlink_t cistpl_longlink_t; 96688 96689 struct cistpl_checksum_t { 96690 u_short addr; 96691 u_short len; 96692 u_char sum; 96693 }; 96694 96695 typedef struct cistpl_checksum_t cistpl_checksum_t; 96696 96697 struct cistpl_altstr_t { 96698 u_char ns; 96699 u_char ofs[4]; 96700 char str[254]; 96701 }; 96702 96703 typedef struct cistpl_altstr_t cistpl_altstr_t; 96704 96705 struct cistpl_device_t { 96706 u_char ndev; 96707 struct { 96708 u_char type; 96709 u_char wp; 96710 u_int speed; 96711 u_int size; 96712 } dev[4]; 96713 }; 96714 96715 typedef struct cistpl_device_t cistpl_device_t; 96716 96717 struct cistpl_jedec_t { 96718 u_char nid; 96719 struct { 96720 u_char mfr; 96721 u_char info; 96722 } id[4]; 96723 }; 96724 96725 typedef struct cistpl_jedec_t cistpl_jedec_t; 96726 96727 struct cistpl_funce_t { 96728 u_char type; 96729 u_char data[0]; 96730 }; 96731 96732 typedef struct cistpl_funce_t cistpl_funce_t; 96733 96734 struct cistpl_bar_t { 96735 u_char attr; 96736 u_int size; 96737 }; 96738 96739 typedef struct cistpl_bar_t cistpl_bar_t; 96740 96741 struct cistpl_power_t { 96742 u_char present; 96743 u_char flags; 96744 u_int param[7]; 96745 }; 96746 96747 typedef struct cistpl_power_t cistpl_power_t; 96748 96749 struct cistpl_timing_t { 96750 u_int wait; 96751 u_int waitscale; 96752 u_int ready; 96753 u_int rdyscale; 96754 u_int reserved; 96755 u_int rsvscale; 96756 }; 96757 96758 typedef struct cistpl_timing_t cistpl_timing_t; 96759 96760 struct cistpl_io_t { 96761 u_char flags; 96762 u_char nwin; 96763 struct { 96764 u_int base; 96765 u_int len; 96766 } win[16]; 96767 }; 96768 96769 typedef struct cistpl_io_t cistpl_io_t; 96770 96771 struct cistpl_irq_t { 96772 u_int IRQInfo1; 96773 u_int IRQInfo2; 96774 }; 96775 96776 typedef struct cistpl_irq_t cistpl_irq_t; 96777 96778 struct cistpl_mem_t { 96779 u_char flags; 96780 u_char nwin; 96781 struct { 96782 u_int len; 96783 u_int card_addr; 96784 u_int host_addr; 96785 } win[8]; 96786 }; 96787 96788 typedef struct cistpl_mem_t cistpl_mem_t; 96789 96790 struct cistpl_cftable_entry_t { 96791 u_char index; 96792 u_short flags; 96793 u_char interface; 96794 cistpl_power_t vcc; 96795 cistpl_power_t vpp1; 96796 cistpl_power_t vpp2; 96797 cistpl_timing_t timing; 96798 cistpl_io_t io; 96799 cistpl_irq_t irq; 96800 cistpl_mem_t mem; 96801 u_char subtuples; 96802 }; 96803 96804 typedef struct cistpl_cftable_entry_t cistpl_cftable_entry_t; 96805 96806 struct cistpl_cftable_entry_cb_t { 96807 u_char index; 96808 u_int flags; 96809 cistpl_power_t vcc; 96810 cistpl_power_t vpp1; 96811 cistpl_power_t vpp2; 96812 u_char io; 96813 cistpl_irq_t irq; 96814 u_char mem; 96815 u_char subtuples; 96816 }; 96817 96818 typedef struct cistpl_cftable_entry_cb_t cistpl_cftable_entry_cb_t; 96819 96820 struct cistpl_vers_2_t { 96821 u_char vers; 96822 u_char comply; 96823 u_short dindex; 96824 u_char vspec8; 96825 u_char vspec9; 96826 u_char nhdr; 96827 u_char vendor; 96828 u_char info; 96829 char str[244]; 96830 }; 96831 96832 typedef struct cistpl_vers_2_t cistpl_vers_2_t; 96833 96834 struct cistpl_org_t { 96835 u_char data_org; 96836 char desc[30]; 96837 }; 96838 96839 typedef struct cistpl_org_t cistpl_org_t; 96840 96841 struct cistpl_format_t { 96842 u_char type; 96843 u_char edc; 96844 u_int offset; 96845 u_int length; 96846 }; 96847 96848 typedef struct cistpl_format_t cistpl_format_t; 96849 96850 union cisparse_t { 96851 cistpl_device_t device; 96852 cistpl_checksum_t checksum; 96853 cistpl_longlink_t longlink; 96854 cistpl_longlink_mfc_t longlink_mfc; 96855 cistpl_vers_1_t version_1; 96856 cistpl_altstr_t altstr; 96857 cistpl_jedec_t jedec; 96858 cistpl_manfid_t manfid; 96859 cistpl_funcid_t funcid; 96860 cistpl_funce_t funce; 96861 cistpl_bar_t bar; 96862 cistpl_config_t config; 96863 cistpl_cftable_entry_t cftable_entry; 96864 cistpl_cftable_entry_cb_t cftable_entry_cb; 96865 cistpl_device_geo_t device_geo; 96866 cistpl_vers_2_t vers_2; 96867 cistpl_org_t org; 96868 cistpl_format_t format; 96869 }; 96870 96871 typedef union cisparse_t cisparse_t; 96872 96873 struct tuple_t { 96874 u_int Attributes; 96875 cisdata_t DesiredTuple; 96876 u_int Flags; 96877 u_int LinkOffset; 96878 u_int CISOffset; 96879 cisdata_t TupleCode; 96880 cisdata_t TupleLink; 96881 cisdata_t TupleOffset; 96882 cisdata_t TupleDataMax; 96883 cisdata_t TupleDataLen; 96884 cisdata_t *TupleData; 96885 }; 96886 96887 typedef struct tuple_t tuple_t; 96888 96889 struct cis_cache_entry { 96890 struct list_head node; 96891 unsigned int addr; 96892 unsigned int len; 96893 unsigned int attr; 96894 unsigned char cache[0]; 96895 }; 96896 96897 struct tuple_flags { 96898 u_int link_space: 4; 96899 u_int has_link: 1; 96900 u_int mfc_fn: 3; 96901 u_int space: 4; 96902 }; 96903 96904 struct pcmcia_cfg_mem { 96905 struct pcmcia_device *p_dev; 96906 int (*conf_check)(struct pcmcia_device *, void *); 96907 void *priv_data; 96908 cisparse_t parse; 96909 cistpl_cftable_entry_t dflt; 96910 }; 96911 96912 struct pcmcia_loop_mem { 96913 struct pcmcia_device *p_dev; 96914 void *priv_data; 96915 int (*loop_tuple)(struct pcmcia_device *, tuple_t *, void *); 96916 }; 96917 96918 struct pcmcia_loop_get { 96919 size_t len; 96920 cisdata_t **buf; 96921 }; 96922 96923 struct resource_map { 96924 u_long base; 96925 u_long num; 96926 struct resource_map *next; 96927 }; 96928 96929 struct socket_data { 96930 struct resource_map mem_db; 96931 struct resource_map mem_db_valid; 96932 struct resource_map io_db; 96933 }; 96934 96935 struct pcmcia_align_data { 96936 long unsigned int mask; 96937 long unsigned int offset; 96938 struct resource_map *map; 96939 }; 96940 96941 enum usb_otg_state { 96942 OTG_STATE_UNDEFINED = 0, 96943 OTG_STATE_B_IDLE = 1, 96944 OTG_STATE_B_SRP_INIT = 2, 96945 OTG_STATE_B_PERIPHERAL = 3, 96946 OTG_STATE_B_WAIT_ACON = 4, 96947 OTG_STATE_B_HOST = 5, 96948 OTG_STATE_A_IDLE = 6, 96949 OTG_STATE_A_WAIT_VRISE = 7, 96950 OTG_STATE_A_WAIT_BCON = 8, 96951 OTG_STATE_A_HOST = 9, 96952 OTG_STATE_A_SUSPEND = 10, 96953 OTG_STATE_A_PERIPHERAL = 11, 96954 OTG_STATE_A_WAIT_VFALL = 12, 96955 OTG_STATE_A_VBUS_ERR = 13, 96956 }; 96957 96958 enum usb_dr_mode { 96959 USB_DR_MODE_UNKNOWN = 0, 96960 USB_DR_MODE_HOST = 1, 96961 USB_DR_MODE_PERIPHERAL = 2, 96962 USB_DR_MODE_OTG = 3, 96963 }; 96964 96965 enum usb_led_event { 96966 USB_LED_EVENT_HOST = 0, 96967 USB_LED_EVENT_GADGET = 1, 96968 }; 96969 96970 struct usb_device_id { 96971 __u16 match_flags; 96972 __u16 idVendor; 96973 __u16 idProduct; 96974 __u16 bcdDevice_lo; 96975 __u16 bcdDevice_hi; 96976 __u8 bDeviceClass; 96977 __u8 bDeviceSubClass; 96978 __u8 bDeviceProtocol; 96979 __u8 bInterfaceClass; 96980 __u8 bInterfaceSubClass; 96981 __u8 bInterfaceProtocol; 96982 __u8 bInterfaceNumber; 96983 kernel_ulong_t driver_info; 96984 }; 96985 96986 struct usb_descriptor_header { 96987 __u8 bLength; 96988 __u8 bDescriptorType; 96989 }; 96990 96991 enum usb_port_connect_type { 96992 USB_PORT_CONNECT_TYPE_UNKNOWN = 0, 96993 USB_PORT_CONNECT_TYPE_HOT_PLUG = 1, 96994 USB_PORT_CONNECT_TYPE_HARD_WIRED = 2, 96995 USB_PORT_NOT_USED = 3, 96996 }; 96997 96998 struct usb_dynids { 96999 spinlock_t lock; 97000 struct list_head list; 97001 }; 97002 97003 struct usbdrv_wrap { 97004 struct device_driver driver; 97005 int for_devices; 97006 }; 97007 97008 struct usb_driver { 97009 const char *name; 97010 int (*probe)(struct usb_interface *, const struct usb_device_id *); 97011 void (*disconnect)(struct usb_interface *); 97012 int (*unlocked_ioctl)(struct usb_interface *, unsigned int, void *); 97013 int (*suspend)(struct usb_interface *, pm_message_t); 97014 int (*resume)(struct usb_interface *); 97015 int (*reset_resume)(struct usb_interface *); 97016 int (*pre_reset)(struct usb_interface *); 97017 int (*post_reset)(struct usb_interface *); 97018 const struct usb_device_id *id_table; 97019 const struct attribute_group **dev_groups; 97020 struct usb_dynids dynids; 97021 struct usbdrv_wrap drvwrap; 97022 unsigned int no_dynamic_id: 1; 97023 unsigned int supports_autosuspend: 1; 97024 unsigned int disable_hub_initiated_lpm: 1; 97025 unsigned int soft_unbind: 1; 97026 }; 97027 97028 struct usb_device_driver { 97029 const char *name; 97030 bool (*match)(struct usb_device *); 97031 int (*probe)(struct usb_device *); 97032 void (*disconnect)(struct usb_device *); 97033 int (*suspend)(struct usb_device *, pm_message_t); 97034 int (*resume)(struct usb_device *, pm_message_t); 97035 const struct attribute_group **dev_groups; 97036 struct usbdrv_wrap drvwrap; 97037 const struct usb_device_id *id_table; 97038 unsigned int supports_autosuspend: 1; 97039 unsigned int generic_subclass: 1; 97040 }; 97041 97042 enum usb_phy_type { 97043 USB_PHY_TYPE_UNDEFINED = 0, 97044 USB_PHY_TYPE_USB2 = 1, 97045 USB_PHY_TYPE_USB3 = 2, 97046 }; 97047 97048 enum usb_phy_events { 97049 USB_EVENT_NONE = 0, 97050 USB_EVENT_VBUS = 1, 97051 USB_EVENT_ID = 2, 97052 USB_EVENT_CHARGER = 3, 97053 USB_EVENT_ENUMERATED = 4, 97054 }; 97055 97056 struct extcon_dev; 97057 97058 enum usb_charger_type { 97059 UNKNOWN_TYPE = 0, 97060 SDP_TYPE = 1, 97061 DCP_TYPE = 2, 97062 CDP_TYPE = 3, 97063 ACA_TYPE = 4, 97064 }; 97065 97066 enum usb_charger_state { 97067 USB_CHARGER_DEFAULT = 0, 97068 USB_CHARGER_PRESENT = 1, 97069 USB_CHARGER_ABSENT = 2, 97070 }; 97071 97072 struct usb_charger_current { 97073 unsigned int sdp_min; 97074 unsigned int sdp_max; 97075 unsigned int dcp_min; 97076 unsigned int dcp_max; 97077 unsigned int cdp_min; 97078 unsigned int cdp_max; 97079 unsigned int aca_min; 97080 unsigned int aca_max; 97081 }; 97082 97083 struct usb_otg; 97084 97085 struct usb_phy_io_ops; 97086 97087 struct usb_phy { 97088 struct device *dev; 97089 const char *label; 97090 unsigned int flags; 97091 enum usb_phy_type type; 97092 enum usb_phy_events last_event; 97093 struct usb_otg *otg; 97094 struct device *io_dev; 97095 struct usb_phy_io_ops *io_ops; 97096 void *io_priv; 97097 struct extcon_dev *edev; 97098 struct extcon_dev *id_edev; 97099 struct notifier_block vbus_nb; 97100 struct notifier_block id_nb; 97101 struct notifier_block type_nb; 97102 enum usb_charger_type chg_type; 97103 enum usb_charger_state chg_state; 97104 struct usb_charger_current chg_cur; 97105 struct work_struct chg_work; 97106 struct atomic_notifier_head notifier; 97107 u16 port_status; 97108 u16 port_change; 97109 struct list_head head; 97110 int (*init)(struct usb_phy *); 97111 void (*shutdown)(struct usb_phy *); 97112 int (*set_vbus)(struct usb_phy *, int); 97113 int (*set_power)(struct usb_phy *, unsigned int); 97114 int (*set_suspend)(struct usb_phy *, int); 97115 int (*set_wakeup)(struct usb_phy *, bool); 97116 int (*notify_connect)(struct usb_phy *, enum usb_device_speed); 97117 int (*notify_disconnect)(struct usb_phy *, enum usb_device_speed); 97118 enum usb_charger_type (*charger_detect)(struct usb_phy *); 97119 }; 97120 97121 struct usb_port_status { 97122 __le16 wPortStatus; 97123 __le16 wPortChange; 97124 __le32 dwExtPortStatus; 97125 }; 97126 97127 struct usb_hub_status { 97128 __le16 wHubStatus; 97129 __le16 wHubChange; 97130 }; 97131 97132 struct usb_hub_descriptor { 97133 __u8 bDescLength; 97134 __u8 bDescriptorType; 97135 __u8 bNbrPorts; 97136 __le16 wHubCharacteristics; 97137 __u8 bPwrOn2PwrGood; 97138 __u8 bHubContrCurrent; 97139 union { 97140 struct { 97141 __u8 DeviceRemovable[4]; 97142 __u8 PortPwrCtrlMask[4]; 97143 } hs; 97144 struct { 97145 __u8 bHubHdrDecLat; 97146 __le16 wHubDelay; 97147 __le16 DeviceRemovable; 97148 } __attribute__((packed)) ss; 97149 } u; 97150 } __attribute__((packed)); 97151 97152 struct usb_phy_io_ops { 97153 int (*read)(struct usb_phy *, u32); 97154 int (*write)(struct usb_phy *, u32, u32); 97155 }; 97156 97157 struct usb_gadget; 97158 97159 struct usb_otg { 97160 u8 default_a; 97161 struct phy *phy; 97162 struct usb_phy *usb_phy; 97163 struct usb_bus *host; 97164 struct usb_gadget *gadget; 97165 enum usb_otg_state state; 97166 int (*set_host)(struct usb_otg *, struct usb_bus *); 97167 int (*set_peripheral)(struct usb_otg *, struct usb_gadget *); 97168 int (*set_vbus)(struct usb_otg *, bool); 97169 int (*start_srp)(struct usb_otg *); 97170 int (*start_hnp)(struct usb_otg *); 97171 }; 97172 97173 typedef u32 usb_port_location_t; 97174 97175 struct usb_port; 97176 97177 struct usb_hub { 97178 struct device *intfdev; 97179 struct usb_device *hdev; 97180 struct kref kref; 97181 struct urb *urb; 97182 u8 (*buffer)[8]; 97183 union { 97184 struct usb_hub_status hub; 97185 struct usb_port_status port; 97186 } *status; 97187 struct mutex status_mutex; 97188 int error; 97189 int nerrors; 97190 long unsigned int event_bits[1]; 97191 long unsigned int change_bits[1]; 97192 long unsigned int removed_bits[1]; 97193 long unsigned int wakeup_bits[1]; 97194 long unsigned int power_bits[1]; 97195 long unsigned int child_usage_bits[1]; 97196 long unsigned int warm_reset_bits[1]; 97197 struct usb_hub_descriptor *descriptor; 97198 struct usb_tt tt; 97199 unsigned int mA_per_port; 97200 unsigned int wakeup_enabled_descendants; 97201 unsigned int limited_power: 1; 97202 unsigned int quiescing: 1; 97203 unsigned int disconnected: 1; 97204 unsigned int in_reset: 1; 97205 unsigned int quirk_disable_autosuspend: 1; 97206 unsigned int quirk_check_port_auto_suspend: 1; 97207 unsigned int has_indicators: 1; 97208 u8 indicator[31]; 97209 struct delayed_work leds; 97210 struct delayed_work init_work; 97211 struct work_struct events; 97212 spinlock_t irq_urb_lock; 97213 struct timer_list irq_urb_retry; 97214 struct usb_port **ports; 97215 }; 97216 97217 struct usb_dev_state; 97218 97219 struct usb_port { 97220 struct usb_device *child; 97221 struct device dev; 97222 struct usb_dev_state *port_owner; 97223 struct usb_port *peer; 97224 struct dev_pm_qos_request *req; 97225 enum usb_port_connect_type connect_type; 97226 usb_port_location_t location; 97227 struct mutex status_lock; 97228 u32 over_current_count; 97229 u8 portnum; 97230 u32 quirks; 97231 unsigned int is_superspeed: 1; 97232 unsigned int usb3_lpm_u1_permit: 1; 97233 unsigned int usb3_lpm_u2_permit: 1; 97234 }; 97235 97236 struct find_interface_arg { 97237 int minor; 97238 struct device_driver *drv; 97239 }; 97240 97241 struct each_dev_arg { 97242 void *data; 97243 int (*fn)(struct usb_device *, void *); 97244 }; 97245 97246 struct usb_qualifier_descriptor { 97247 __u8 bLength; 97248 __u8 bDescriptorType; 97249 __le16 bcdUSB; 97250 __u8 bDeviceClass; 97251 __u8 bDeviceSubClass; 97252 __u8 bDeviceProtocol; 97253 __u8 bMaxPacketSize0; 97254 __u8 bNumConfigurations; 97255 __u8 bRESERVED; 97256 }; 97257 97258 struct usb_set_sel_req { 97259 __u8 u1_sel; 97260 __u8 u1_pel; 97261 __le16 u2_sel; 97262 __le16 u2_pel; 97263 }; 97264 97265 struct usbdevfs_hub_portinfo { 97266 char nports; 97267 char port[127]; 97268 }; 97269 97270 enum hub_led_mode { 97271 INDICATOR_AUTO = 0, 97272 INDICATOR_CYCLE = 1, 97273 INDICATOR_GREEN_BLINK = 2, 97274 INDICATOR_GREEN_BLINK_OFF = 3, 97275 INDICATOR_AMBER_BLINK = 4, 97276 INDICATOR_AMBER_BLINK_OFF = 5, 97277 INDICATOR_ALT_BLINK = 6, 97278 INDICATOR_ALT_BLINK_OFF = 7, 97279 }; 97280 97281 struct usb_tt_clear { 97282 struct list_head clear_list; 97283 unsigned int tt; 97284 u16 devinfo; 97285 struct usb_hcd *hcd; 97286 struct usb_host_endpoint *ep; 97287 }; 97288 97289 enum hub_activation_type { 97290 HUB_INIT = 0, 97291 HUB_INIT2 = 1, 97292 HUB_INIT3 = 2, 97293 HUB_POST_RESET = 3, 97294 HUB_RESUME = 4, 97295 HUB_RESET_RESUME = 5, 97296 }; 97297 97298 enum hub_quiescing_type { 97299 HUB_DISCONNECT = 0, 97300 HUB_PRE_RESET = 1, 97301 HUB_SUSPEND = 2, 97302 }; 97303 97304 struct usb_ctrlrequest { 97305 __u8 bRequestType; 97306 __u8 bRequest; 97307 __le16 wValue; 97308 __le16 wIndex; 97309 __le16 wLength; 97310 }; 97311 97312 struct usb_mon_operations { 97313 void (*urb_submit)(struct usb_bus *, struct urb *); 97314 void (*urb_submit_error)(struct usb_bus *, struct urb *, int); 97315 void (*urb_complete)(struct usb_bus *, struct urb *, int); 97316 }; 97317 97318 struct usb_sg_request { 97319 int status; 97320 size_t bytes; 97321 spinlock_t lock; 97322 struct usb_device *dev; 97323 int pipe; 97324 int entries; 97325 struct urb **urbs; 97326 int count; 97327 struct completion complete; 97328 }; 97329 97330 struct usb_cdc_header_desc { 97331 __u8 bLength; 97332 __u8 bDescriptorType; 97333 __u8 bDescriptorSubType; 97334 __le16 bcdCDC; 97335 } __attribute__((packed)); 97336 97337 struct usb_cdc_call_mgmt_descriptor { 97338 __u8 bLength; 97339 __u8 bDescriptorType; 97340 __u8 bDescriptorSubType; 97341 __u8 bmCapabilities; 97342 __u8 bDataInterface; 97343 }; 97344 97345 struct usb_cdc_acm_descriptor { 97346 __u8 bLength; 97347 __u8 bDescriptorType; 97348 __u8 bDescriptorSubType; 97349 __u8 bmCapabilities; 97350 }; 97351 97352 struct usb_cdc_union_desc { 97353 __u8 bLength; 97354 __u8 bDescriptorType; 97355 __u8 bDescriptorSubType; 97356 __u8 bMasterInterface0; 97357 __u8 bSlaveInterface0; 97358 }; 97359 97360 struct usb_cdc_country_functional_desc { 97361 __u8 bLength; 97362 __u8 bDescriptorType; 97363 __u8 bDescriptorSubType; 97364 __u8 iCountryCodeRelDate; 97365 __le16 wCountyCode0; 97366 }; 97367 97368 struct usb_cdc_network_terminal_desc { 97369 __u8 bLength; 97370 __u8 bDescriptorType; 97371 __u8 bDescriptorSubType; 97372 __u8 bEntityId; 97373 __u8 iName; 97374 __u8 bChannelIndex; 97375 __u8 bPhysicalInterface; 97376 }; 97377 97378 struct usb_cdc_ether_desc { 97379 __u8 bLength; 97380 __u8 bDescriptorType; 97381 __u8 bDescriptorSubType; 97382 __u8 iMACAddress; 97383 __le32 bmEthernetStatistics; 97384 __le16 wMaxSegmentSize; 97385 __le16 wNumberMCFilters; 97386 __u8 bNumberPowerFilters; 97387 } __attribute__((packed)); 97388 97389 struct usb_cdc_dmm_desc { 97390 __u8 bFunctionLength; 97391 __u8 bDescriptorType; 97392 __u8 bDescriptorSubtype; 97393 __u16 bcdVersion; 97394 __le16 wMaxCommand; 97395 } __attribute__((packed)); 97396 97397 struct usb_cdc_mdlm_desc { 97398 __u8 bLength; 97399 __u8 bDescriptorType; 97400 __u8 bDescriptorSubType; 97401 __le16 bcdVersion; 97402 __u8 bGUID[16]; 97403 } __attribute__((packed)); 97404 97405 struct usb_cdc_mdlm_detail_desc { 97406 __u8 bLength; 97407 __u8 bDescriptorType; 97408 __u8 bDescriptorSubType; 97409 __u8 bGuidDescriptorType; 97410 __u8 bDetailData[0]; 97411 }; 97412 97413 struct usb_cdc_obex_desc { 97414 __u8 bLength; 97415 __u8 bDescriptorType; 97416 __u8 bDescriptorSubType; 97417 __le16 bcdVersion; 97418 } __attribute__((packed)); 97419 97420 struct usb_cdc_ncm_desc { 97421 __u8 bLength; 97422 __u8 bDescriptorType; 97423 __u8 bDescriptorSubType; 97424 __le16 bcdNcmVersion; 97425 __u8 bmNetworkCapabilities; 97426 } __attribute__((packed)); 97427 97428 struct usb_cdc_mbim_desc { 97429 __u8 bLength; 97430 __u8 bDescriptorType; 97431 __u8 bDescriptorSubType; 97432 __le16 bcdMBIMVersion; 97433 __le16 wMaxControlMessage; 97434 __u8 bNumberFilters; 97435 __u8 bMaxFilterSize; 97436 __le16 wMaxSegmentSize; 97437 __u8 bmNetworkCapabilities; 97438 } __attribute__((packed)); 97439 97440 struct usb_cdc_mbim_extended_desc { 97441 __u8 bLength; 97442 __u8 bDescriptorType; 97443 __u8 bDescriptorSubType; 97444 __le16 bcdMBIMExtendedVersion; 97445 __u8 bMaxOutstandingCommandMessages; 97446 __le16 wMTU; 97447 } __attribute__((packed)); 97448 97449 struct usb_cdc_parsed_header { 97450 struct usb_cdc_union_desc *usb_cdc_union_desc; 97451 struct usb_cdc_header_desc *usb_cdc_header_desc; 97452 struct usb_cdc_call_mgmt_descriptor *usb_cdc_call_mgmt_descriptor; 97453 struct usb_cdc_acm_descriptor *usb_cdc_acm_descriptor; 97454 struct usb_cdc_country_functional_desc *usb_cdc_country_functional_desc; 97455 struct usb_cdc_network_terminal_desc *usb_cdc_network_terminal_desc; 97456 struct usb_cdc_ether_desc *usb_cdc_ether_desc; 97457 struct usb_cdc_dmm_desc *usb_cdc_dmm_desc; 97458 struct usb_cdc_mdlm_desc *usb_cdc_mdlm_desc; 97459 struct usb_cdc_mdlm_detail_desc *usb_cdc_mdlm_detail_desc; 97460 struct usb_cdc_obex_desc *usb_cdc_obex_desc; 97461 struct usb_cdc_ncm_desc *usb_cdc_ncm_desc; 97462 struct usb_cdc_mbim_desc *usb_cdc_mbim_desc; 97463 struct usb_cdc_mbim_extended_desc *usb_cdc_mbim_extended_desc; 97464 bool phonet_magic_present; 97465 }; 97466 97467 struct api_context { 97468 struct completion done; 97469 int status; 97470 }; 97471 97472 struct set_config_request { 97473 struct usb_device *udev; 97474 int config; 97475 struct work_struct work; 97476 struct list_head node; 97477 }; 97478 97479 struct usb_dynid { 97480 struct list_head node; 97481 struct usb_device_id id; 97482 }; 97483 97484 struct usb_dev_cap_header { 97485 __u8 bLength; 97486 __u8 bDescriptorType; 97487 __u8 bDevCapabilityType; 97488 }; 97489 97490 struct usb_class_driver { 97491 char *name; 97492 char * (*devnode)(struct device *, umode_t *); 97493 const struct file_operations *fops; 97494 int minor_base; 97495 }; 97496 97497 struct usb_class { 97498 struct kref kref; 97499 struct class *class; 97500 }; 97501 97502 struct ep_device { 97503 struct usb_endpoint_descriptor *desc; 97504 struct usb_device *udev; 97505 struct device dev; 97506 }; 97507 97508 struct usbdevfs_ctrltransfer { 97509 __u8 bRequestType; 97510 __u8 bRequest; 97511 __u16 wValue; 97512 __u16 wIndex; 97513 __u16 wLength; 97514 __u32 timeout; 97515 void *data; 97516 }; 97517 97518 struct usbdevfs_bulktransfer { 97519 unsigned int ep; 97520 unsigned int len; 97521 unsigned int timeout; 97522 void *data; 97523 }; 97524 97525 struct usbdevfs_setinterface { 97526 unsigned int interface; 97527 unsigned int altsetting; 97528 }; 97529 97530 struct usbdevfs_disconnectsignal { 97531 unsigned int signr; 97532 void *context; 97533 }; 97534 97535 struct usbdevfs_getdriver { 97536 unsigned int interface; 97537 char driver[256]; 97538 }; 97539 97540 struct usbdevfs_connectinfo { 97541 unsigned int devnum; 97542 unsigned char slow; 97543 }; 97544 97545 struct usbdevfs_conninfo_ex { 97546 __u32 size; 97547 __u32 busnum; 97548 __u32 devnum; 97549 __u32 speed; 97550 __u8 num_ports; 97551 __u8 ports[7]; 97552 }; 97553 97554 struct usbdevfs_iso_packet_desc { 97555 unsigned int length; 97556 unsigned int actual_length; 97557 unsigned int status; 97558 }; 97559 97560 struct usbdevfs_urb { 97561 unsigned char type; 97562 unsigned char endpoint; 97563 int status; 97564 unsigned int flags; 97565 void *buffer; 97566 int buffer_length; 97567 int actual_length; 97568 int start_frame; 97569 union { 97570 int number_of_packets; 97571 unsigned int stream_id; 97572 }; 97573 int error_count; 97574 unsigned int signr; 97575 void *usercontext; 97576 struct usbdevfs_iso_packet_desc iso_frame_desc[0]; 97577 }; 97578 97579 struct usbdevfs_ioctl { 97580 int ifno; 97581 int ioctl_code; 97582 void *data; 97583 }; 97584 97585 struct usbdevfs_disconnect_claim { 97586 unsigned int interface; 97587 unsigned int flags; 97588 char driver[256]; 97589 }; 97590 97591 struct usbdevfs_streams { 97592 unsigned int num_streams; 97593 unsigned int num_eps; 97594 unsigned char eps[0]; 97595 }; 97596 97597 struct usbdevfs_ctrltransfer32 { 97598 u8 bRequestType; 97599 u8 bRequest; 97600 u16 wValue; 97601 u16 wIndex; 97602 u16 wLength; 97603 u32 timeout; 97604 compat_caddr_t data; 97605 }; 97606 97607 struct usbdevfs_bulktransfer32 { 97608 compat_uint_t ep; 97609 compat_uint_t len; 97610 compat_uint_t timeout; 97611 compat_caddr_t data; 97612 }; 97613 97614 struct usbdevfs_disconnectsignal32 { 97615 compat_int_t signr; 97616 compat_caddr_t context; 97617 }; 97618 97619 struct usbdevfs_urb32 { 97620 unsigned char type; 97621 unsigned char endpoint; 97622 compat_int_t status; 97623 compat_uint_t flags; 97624 compat_caddr_t buffer; 97625 compat_int_t buffer_length; 97626 compat_int_t actual_length; 97627 compat_int_t start_frame; 97628 compat_int_t number_of_packets; 97629 compat_int_t error_count; 97630 compat_uint_t signr; 97631 compat_caddr_t usercontext; 97632 struct usbdevfs_iso_packet_desc iso_frame_desc[0]; 97633 }; 97634 97635 struct usbdevfs_ioctl32 { 97636 s32 ifno; 97637 s32 ioctl_code; 97638 compat_caddr_t data; 97639 }; 97640 97641 struct usb_dev_state___2 { 97642 struct list_head list; 97643 struct usb_device *dev; 97644 struct file *file; 97645 spinlock_t lock; 97646 struct list_head async_pending; 97647 struct list_head async_completed; 97648 struct list_head memory_list; 97649 wait_queue_head_t wait; 97650 wait_queue_head_t wait_for_resume; 97651 unsigned int discsignr; 97652 struct pid *disc_pid; 97653 const struct cred *cred; 97654 sigval_t disccontext; 97655 long unsigned int ifclaimed; 97656 u32 disabled_bulk_eps; 97657 long unsigned int interface_allowed_mask; 97658 int not_yet_resumed; 97659 bool suspend_allowed; 97660 bool privileges_dropped; 97661 }; 97662 97663 struct usb_memory { 97664 struct list_head memlist; 97665 int vma_use_count; 97666 int urb_use_count; 97667 u32 size; 97668 void *mem; 97669 dma_addr_t dma_handle; 97670 long unsigned int vm_start; 97671 struct usb_dev_state___2 *ps; 97672 }; 97673 97674 struct async { 97675 struct list_head asynclist; 97676 struct usb_dev_state___2 *ps; 97677 struct pid *pid; 97678 const struct cred *cred; 97679 unsigned int signr; 97680 unsigned int ifnum; 97681 void *userbuffer; 97682 void *userurb; 97683 sigval_t userurb_sigval; 97684 struct urb *urb; 97685 struct usb_memory *usbm; 97686 unsigned int mem_usage; 97687 int status; 97688 u8 bulk_addr; 97689 u8 bulk_status; 97690 }; 97691 97692 enum snoop_when { 97693 SUBMIT = 0, 97694 COMPLETE = 1, 97695 }; 97696 97697 struct quirk_entry { 97698 u16 vid; 97699 u16 pid; 97700 u32 flags; 97701 }; 97702 97703 struct class_info { 97704 int class; 97705 char *class_name; 97706 }; 97707 97708 struct usb_phy_roothub___2 { 97709 struct phy *phy; 97710 struct list_head list; 97711 }; 97712 97713 typedef void (*companion_fn)(struct pci_dev *, struct usb_hcd *, struct pci_dev *, struct usb_hcd *); 97714 97715 struct phy_devm { 97716 struct usb_phy *phy; 97717 struct notifier_block *nb; 97718 }; 97719 97720 struct mon_bus { 97721 struct list_head bus_link; 97722 spinlock_t lock; 97723 struct usb_bus *u_bus; 97724 int text_inited; 97725 int bin_inited; 97726 struct dentry *dent_s; 97727 struct dentry *dent_t; 97728 struct dentry *dent_u; 97729 struct device *classdev; 97730 int nreaders; 97731 struct list_head r_list; 97732 struct kref ref; 97733 unsigned int cnt_events; 97734 unsigned int cnt_text_lost; 97735 }; 97736 97737 struct mon_reader { 97738 struct list_head r_link; 97739 struct mon_bus *m_bus; 97740 void *r_data; 97741 void (*rnf_submit)(void *, struct urb *); 97742 void (*rnf_error)(void *, struct urb *, int); 97743 void (*rnf_complete)(void *, struct urb *, int); 97744 }; 97745 97746 struct snap { 97747 int slen; 97748 char str[80]; 97749 }; 97750 97751 struct mon_iso_desc { 97752 int status; 97753 unsigned int offset; 97754 unsigned int length; 97755 }; 97756 97757 struct mon_event_text { 97758 struct list_head e_link; 97759 int type; 97760 long unsigned int id; 97761 unsigned int tstamp; 97762 int busnum; 97763 char devnum; 97764 char epnum; 97765 char is_in; 97766 char xfertype; 97767 int length; 97768 int status; 97769 int interval; 97770 int start_frame; 97771 int error_count; 97772 char setup_flag; 97773 char data_flag; 97774 int numdesc; 97775 struct mon_iso_desc isodesc[5]; 97776 unsigned char setup[8]; 97777 unsigned char data[32]; 97778 }; 97779 97780 struct mon_reader_text { 97781 struct kmem_cache *e_slab; 97782 int nevents; 97783 struct list_head e_list; 97784 struct mon_reader r; 97785 wait_queue_head_t wait; 97786 int printf_size; 97787 size_t printf_offset; 97788 size_t printf_togo; 97789 char *printf_buf; 97790 struct mutex printf_lock; 97791 char slab_name[30]; 97792 }; 97793 97794 struct mon_text_ptr { 97795 int cnt; 97796 int limit; 97797 char *pbuf; 97798 }; 97799 97800 enum { 97801 NAMESZ = 10, 97802 }; 97803 97804 struct iso_rec { 97805 int error_count; 97806 int numdesc; 97807 }; 97808 97809 struct mon_bin_hdr { 97810 u64 id; 97811 unsigned char type; 97812 unsigned char xfer_type; 97813 unsigned char epnum; 97814 unsigned char devnum; 97815 short unsigned int busnum; 97816 char flag_setup; 97817 char flag_data; 97818 s64 ts_sec; 97819 s32 ts_usec; 97820 int status; 97821 unsigned int len_urb; 97822 unsigned int len_cap; 97823 union { 97824 unsigned char setup[8]; 97825 struct iso_rec iso; 97826 } s; 97827 int interval; 97828 int start_frame; 97829 unsigned int xfer_flags; 97830 unsigned int ndesc; 97831 }; 97832 97833 struct mon_bin_isodesc { 97834 int iso_status; 97835 unsigned int iso_off; 97836 unsigned int iso_len; 97837 u32 _pad; 97838 }; 97839 97840 struct mon_bin_stats { 97841 u32 queued; 97842 u32 dropped; 97843 }; 97844 97845 struct mon_bin_get { 97846 struct mon_bin_hdr *hdr; 97847 void *data; 97848 size_t alloc; 97849 }; 97850 97851 struct mon_bin_mfetch { 97852 u32 *offvec; 97853 u32 nfetch; 97854 u32 nflush; 97855 }; 97856 97857 struct mon_bin_get32 { 97858 u32 hdr32; 97859 u32 data32; 97860 u32 alloc32; 97861 }; 97862 97863 struct mon_bin_mfetch32 { 97864 u32 offvec32; 97865 u32 nfetch32; 97866 u32 nflush32; 97867 }; 97868 97869 struct mon_pgmap { 97870 struct page *pg; 97871 unsigned char *ptr; 97872 }; 97873 97874 struct mon_reader_bin { 97875 spinlock_t b_lock; 97876 unsigned int b_size; 97877 unsigned int b_cnt; 97878 unsigned int b_in; 97879 unsigned int b_out; 97880 unsigned int b_read; 97881 struct mon_pgmap *b_vec; 97882 wait_queue_head_t b_wait; 97883 struct mutex fetch_lock; 97884 int mmap_active; 97885 struct mon_reader r; 97886 unsigned int cnt_lost; 97887 }; 97888 97889 enum amd_chipset_gen { 97890 NOT_AMD_CHIPSET = 0, 97891 AMD_CHIPSET_SB600 = 1, 97892 AMD_CHIPSET_SB700 = 2, 97893 AMD_CHIPSET_SB800 = 3, 97894 AMD_CHIPSET_HUDSON2 = 4, 97895 AMD_CHIPSET_BOLTON = 5, 97896 AMD_CHIPSET_YANGTZE = 6, 97897 AMD_CHIPSET_TAISHAN = 7, 97898 AMD_CHIPSET_UNKNOWN = 8, 97899 }; 97900 97901 struct amd_chipset_type { 97902 enum amd_chipset_gen gen; 97903 u8 rev; 97904 }; 97905 97906 struct amd_chipset_info { 97907 struct pci_dev *nb_dev; 97908 struct pci_dev *smbus_dev; 97909 int nb_type; 97910 struct amd_chipset_type sb_type; 97911 int isoc_reqs; 97912 int probe_count; 97913 bool need_pll_quirk; 97914 }; 97915 97916 struct ehci_stats { 97917 long unsigned int normal; 97918 long unsigned int error; 97919 long unsigned int iaa; 97920 long unsigned int lost_iaa; 97921 long unsigned int complete; 97922 long unsigned int unlink; 97923 }; 97924 97925 struct ehci_per_sched { 97926 struct usb_device *udev; 97927 struct usb_host_endpoint *ep; 97928 struct list_head ps_list; 97929 u16 tt_usecs; 97930 u16 cs_mask; 97931 u16 period; 97932 u16 phase; 97933 u8 bw_phase; 97934 u8 phase_uf; 97935 u8 usecs; 97936 u8 c_usecs; 97937 u8 bw_uperiod; 97938 u8 bw_period; 97939 }; 97940 97941 enum ehci_rh_state { 97942 EHCI_RH_HALTED = 0, 97943 EHCI_RH_SUSPENDED = 1, 97944 EHCI_RH_RUNNING = 2, 97945 EHCI_RH_STOPPING = 3, 97946 }; 97947 97948 enum ehci_hrtimer_event { 97949 EHCI_HRTIMER_POLL_ASS = 0, 97950 EHCI_HRTIMER_POLL_PSS = 1, 97951 EHCI_HRTIMER_POLL_DEAD = 2, 97952 EHCI_HRTIMER_UNLINK_INTR = 3, 97953 EHCI_HRTIMER_FREE_ITDS = 4, 97954 EHCI_HRTIMER_ACTIVE_UNLINK = 5, 97955 EHCI_HRTIMER_START_UNLINK_INTR = 6, 97956 EHCI_HRTIMER_ASYNC_UNLINKS = 7, 97957 EHCI_HRTIMER_IAA_WATCHDOG = 8, 97958 EHCI_HRTIMER_DISABLE_PERIODIC = 9, 97959 EHCI_HRTIMER_DISABLE_ASYNC = 10, 97960 EHCI_HRTIMER_IO_WATCHDOG = 11, 97961 EHCI_HRTIMER_NUM_EVENTS = 12, 97962 }; 97963 97964 struct ehci_caps; 97965 97966 struct ehci_regs; 97967 97968 struct ehci_dbg_port; 97969 97970 struct ehci_qh; 97971 97972 union ehci_shadow; 97973 97974 struct ehci_itd; 97975 97976 struct ehci_sitd; 97977 97978 struct ehci_hcd { 97979 enum ehci_hrtimer_event next_hrtimer_event; 97980 unsigned int enabled_hrtimer_events; 97981 ktime_t hr_timeouts[12]; 97982 struct hrtimer hrtimer; 97983 int PSS_poll_count; 97984 int ASS_poll_count; 97985 int died_poll_count; 97986 struct ehci_caps *caps; 97987 struct ehci_regs *regs; 97988 struct ehci_dbg_port *debug; 97989 __u32 hcs_params; 97990 spinlock_t lock; 97991 enum ehci_rh_state rh_state; 97992 bool scanning: 1; 97993 bool need_rescan: 1; 97994 bool intr_unlinking: 1; 97995 bool iaa_in_progress: 1; 97996 bool async_unlinking: 1; 97997 bool shutdown: 1; 97998 struct ehci_qh *qh_scan_next; 97999 struct ehci_qh *async; 98000 struct ehci_qh *dummy; 98001 struct list_head async_unlink; 98002 struct list_head async_idle; 98003 unsigned int async_unlink_cycle; 98004 unsigned int async_count; 98005 __le32 old_current; 98006 __le32 old_token; 98007 unsigned int periodic_size; 98008 __le32 *periodic; 98009 dma_addr_t periodic_dma; 98010 struct list_head intr_qh_list; 98011 unsigned int i_thresh; 98012 union ehci_shadow *pshadow; 98013 struct list_head intr_unlink_wait; 98014 struct list_head intr_unlink; 98015 unsigned int intr_unlink_wait_cycle; 98016 unsigned int intr_unlink_cycle; 98017 unsigned int now_frame; 98018 unsigned int last_iso_frame; 98019 unsigned int intr_count; 98020 unsigned int isoc_count; 98021 unsigned int periodic_count; 98022 unsigned int uframe_periodic_max; 98023 struct list_head cached_itd_list; 98024 struct ehci_itd *last_itd_to_free; 98025 struct list_head cached_sitd_list; 98026 struct ehci_sitd *last_sitd_to_free; 98027 long unsigned int reset_done[15]; 98028 long unsigned int bus_suspended; 98029 long unsigned int companion_ports; 98030 long unsigned int owned_ports; 98031 long unsigned int port_c_suspend; 98032 long unsigned int suspended_ports; 98033 long unsigned int resuming_ports; 98034 struct dma_pool___2 *qh_pool; 98035 struct dma_pool___2 *qtd_pool; 98036 struct dma_pool___2 *itd_pool; 98037 struct dma_pool___2 *sitd_pool; 98038 unsigned int random_frame; 98039 long unsigned int next_statechange; 98040 ktime_t last_periodic_enable; 98041 u32 command; 98042 unsigned int no_selective_suspend: 1; 98043 unsigned int has_fsl_port_bug: 1; 98044 unsigned int has_fsl_hs_errata: 1; 98045 unsigned int has_fsl_susp_errata: 1; 98046 unsigned int big_endian_mmio: 1; 98047 unsigned int big_endian_desc: 1; 98048 unsigned int big_endian_capbase: 1; 98049 unsigned int has_amcc_usb23: 1; 98050 unsigned int need_io_watchdog: 1; 98051 unsigned int amd_pll_fix: 1; 98052 unsigned int use_dummy_qh: 1; 98053 unsigned int has_synopsys_hc_bug: 1; 98054 unsigned int frame_index_bug: 1; 98055 unsigned int need_oc_pp_cycle: 1; 98056 unsigned int imx28_write_fix: 1; 98057 __le32 *ohci_hcctrl_reg; 98058 unsigned int has_hostpc: 1; 98059 unsigned int has_tdi_phy_lpm: 1; 98060 unsigned int has_ppcd: 1; 98061 u8 sbrn; 98062 struct ehci_stats stats; 98063 struct dentry *debug_dir; 98064 u8 bandwidth[64]; 98065 u8 tt_budget[64]; 98066 struct list_head tt_list; 98067 long unsigned int priv[0]; 98068 }; 98069 98070 struct ehci_caps { 98071 u32 hc_capbase; 98072 u32 hcs_params; 98073 u32 hcc_params; 98074 u8 portroute[8]; 98075 }; 98076 98077 struct ehci_regs { 98078 u32 command; 98079 u32 status; 98080 u32 intr_enable; 98081 u32 frame_index; 98082 u32 segment; 98083 u32 frame_list; 98084 u32 async_next; 98085 u32 reserved1[2]; 98086 u32 txfill_tuning; 98087 u32 reserved2[6]; 98088 u32 configured_flag; 98089 u32 port_status[0]; 98090 u32 reserved3[9]; 98091 u32 usbmode; 98092 u32 reserved4[6]; 98093 u32 hostpc[0]; 98094 u32 reserved5[17]; 98095 u32 usbmode_ex; 98096 }; 98097 98098 struct ehci_dbg_port { 98099 u32 control; 98100 u32 pids; 98101 u32 data03; 98102 u32 data47; 98103 u32 address; 98104 }; 98105 98106 struct ehci_fstn; 98107 98108 union ehci_shadow { 98109 struct ehci_qh *qh; 98110 struct ehci_itd *itd; 98111 struct ehci_sitd *sitd; 98112 struct ehci_fstn *fstn; 98113 __le32 *hw_next; 98114 void *ptr; 98115 }; 98116 98117 struct ehci_qh_hw; 98118 98119 struct ehci_qtd; 98120 98121 struct ehci_qh { 98122 struct ehci_qh_hw *hw; 98123 dma_addr_t qh_dma; 98124 union ehci_shadow qh_next; 98125 struct list_head qtd_list; 98126 struct list_head intr_node; 98127 struct ehci_qtd *dummy; 98128 struct list_head unlink_node; 98129 struct ehci_per_sched ps; 98130 unsigned int unlink_cycle; 98131 u8 qh_state; 98132 u8 xacterrs; 98133 u8 unlink_reason; 98134 u8 gap_uf; 98135 unsigned int is_out: 1; 98136 unsigned int clearing_tt: 1; 98137 unsigned int dequeue_during_giveback: 1; 98138 unsigned int should_be_inactive: 1; 98139 }; 98140 98141 struct ehci_iso_stream; 98142 98143 struct ehci_itd { 98144 __le32 hw_next; 98145 __le32 hw_transaction[8]; 98146 __le32 hw_bufp[7]; 98147 __le32 hw_bufp_hi[7]; 98148 dma_addr_t itd_dma; 98149 union ehci_shadow itd_next; 98150 struct urb *urb; 98151 struct ehci_iso_stream *stream; 98152 struct list_head itd_list; 98153 unsigned int frame; 98154 unsigned int pg; 98155 unsigned int index[8]; 98156 long: 64; 98157 }; 98158 98159 struct ehci_sitd { 98160 __le32 hw_next; 98161 __le32 hw_fullspeed_ep; 98162 __le32 hw_uframe; 98163 __le32 hw_results; 98164 __le32 hw_buf[2]; 98165 __le32 hw_backpointer; 98166 __le32 hw_buf_hi[2]; 98167 dma_addr_t sitd_dma; 98168 union ehci_shadow sitd_next; 98169 struct urb *urb; 98170 struct ehci_iso_stream *stream; 98171 struct list_head sitd_list; 98172 unsigned int frame; 98173 unsigned int index; 98174 }; 98175 98176 struct ehci_qtd { 98177 __le32 hw_next; 98178 __le32 hw_alt_next; 98179 __le32 hw_token; 98180 __le32 hw_buf[5]; 98181 __le32 hw_buf_hi[5]; 98182 dma_addr_t qtd_dma; 98183 struct list_head qtd_list; 98184 struct urb *urb; 98185 size_t length; 98186 }; 98187 98188 struct ehci_fstn { 98189 __le32 hw_next; 98190 __le32 hw_prev; 98191 dma_addr_t fstn_dma; 98192 union ehci_shadow fstn_next; 98193 long: 64; 98194 }; 98195 98196 struct ehci_qh_hw { 98197 __le32 hw_next; 98198 __le32 hw_info1; 98199 __le32 hw_info2; 98200 __le32 hw_current; 98201 __le32 hw_qtd_next; 98202 __le32 hw_alt_next; 98203 __le32 hw_token; 98204 __le32 hw_buf[5]; 98205 __le32 hw_buf_hi[5]; 98206 long: 32; 98207 long: 64; 98208 long: 64; 98209 long: 64; 98210 }; 98211 98212 struct ehci_iso_packet { 98213 u64 bufp; 98214 __le32 transaction; 98215 u8 cross; 98216 u32 buf1; 98217 }; 98218 98219 struct ehci_iso_sched { 98220 struct list_head td_list; 98221 unsigned int span; 98222 unsigned int first_packet; 98223 struct ehci_iso_packet packet[0]; 98224 }; 98225 98226 struct ehci_iso_stream { 98227 struct ehci_qh_hw *hw; 98228 u8 bEndpointAddress; 98229 u8 highspeed; 98230 struct list_head td_list; 98231 struct list_head free_list; 98232 struct ehci_per_sched ps; 98233 unsigned int next_uframe; 98234 __le32 splits; 98235 u16 uperiod; 98236 u16 maxp; 98237 unsigned int bandwidth; 98238 __le32 buf0; 98239 __le32 buf1; 98240 __le32 buf2; 98241 __le32 address; 98242 }; 98243 98244 struct ehci_tt { 98245 u16 bandwidth[8]; 98246 struct list_head tt_list; 98247 struct list_head ps_list; 98248 struct usb_tt *usb_tt; 98249 int tt_port; 98250 }; 98251 98252 struct ehci_driver_overrides { 98253 size_t extra_priv_size; 98254 int (*reset)(struct usb_hcd *); 98255 int (*port_power)(struct usb_hcd *, int, bool); 98256 }; 98257 98258 struct debug_buffer { 98259 ssize_t (*fill_func)(struct debug_buffer *); 98260 struct usb_bus *bus; 98261 struct mutex mutex; 98262 size_t count; 98263 char *output_buf; 98264 size_t alloc_size; 98265 }; 98266 98267 typedef __u32 __hc32; 98268 98269 typedef __u16 __hc16; 98270 98271 struct td; 98272 98273 struct ed { 98274 __hc32 hwINFO; 98275 __hc32 hwTailP; 98276 __hc32 hwHeadP; 98277 __hc32 hwNextED; 98278 dma_addr_t dma; 98279 struct td *dummy; 98280 struct ed *ed_next; 98281 struct ed *ed_prev; 98282 struct list_head td_list; 98283 struct list_head in_use_list; 98284 u8 state; 98285 u8 type; 98286 u8 branch; 98287 u16 interval; 98288 u16 load; 98289 u16 last_iso; 98290 u16 tick; 98291 unsigned int takeback_wdh_cnt; 98292 struct td *pending_td; 98293 long: 64; 98294 }; 98295 98296 struct td { 98297 __hc32 hwINFO; 98298 __hc32 hwCBP; 98299 __hc32 hwNextTD; 98300 __hc32 hwBE; 98301 __hc16 hwPSW[2]; 98302 __u8 index; 98303 struct ed *ed; 98304 struct td *td_hash; 98305 struct td *next_dl_td; 98306 struct urb *urb; 98307 dma_addr_t td_dma; 98308 dma_addr_t data_dma; 98309 struct list_head td_list; 98310 long: 64; 98311 }; 98312 98313 struct ohci_hcca { 98314 __hc32 int_table[32]; 98315 __hc32 frame_no; 98316 __hc32 done_head; 98317 u8 reserved_for_hc[116]; 98318 u8 what[4]; 98319 }; 98320 98321 struct ohci_roothub_regs { 98322 __hc32 a; 98323 __hc32 b; 98324 __hc32 status; 98325 __hc32 portstatus[15]; 98326 }; 98327 98328 struct ohci_regs { 98329 __hc32 revision; 98330 __hc32 control; 98331 __hc32 cmdstatus; 98332 __hc32 intrstatus; 98333 __hc32 intrenable; 98334 __hc32 intrdisable; 98335 __hc32 hcca; 98336 __hc32 ed_periodcurrent; 98337 __hc32 ed_controlhead; 98338 __hc32 ed_controlcurrent; 98339 __hc32 ed_bulkhead; 98340 __hc32 ed_bulkcurrent; 98341 __hc32 donehead; 98342 __hc32 fminterval; 98343 __hc32 fmremaining; 98344 __hc32 fmnumber; 98345 __hc32 periodicstart; 98346 __hc32 lsthresh; 98347 struct ohci_roothub_regs roothub; 98348 long: 64; 98349 long: 64; 98350 }; 98351 98352 struct urb_priv { 98353 struct ed *ed; 98354 u16 length; 98355 u16 td_cnt; 98356 struct list_head pending; 98357 struct td *td[0]; 98358 }; 98359 98360 typedef struct urb_priv urb_priv_t; 98361 98362 enum ohci_rh_state { 98363 OHCI_RH_HALTED = 0, 98364 OHCI_RH_SUSPENDED = 1, 98365 OHCI_RH_RUNNING = 2, 98366 }; 98367 98368 struct ohci_hcd { 98369 spinlock_t lock; 98370 struct ohci_regs *regs; 98371 struct ohci_hcca *hcca; 98372 dma_addr_t hcca_dma; 98373 struct ed *ed_rm_list; 98374 struct ed *ed_bulktail; 98375 struct ed *ed_controltail; 98376 struct ed *periodic[32]; 98377 void (*start_hnp)(struct ohci_hcd *); 98378 struct dma_pool___2 *td_cache; 98379 struct dma_pool___2 *ed_cache; 98380 struct td *td_hash[64]; 98381 struct td *dl_start; 98382 struct td *dl_end; 98383 struct list_head pending; 98384 struct list_head eds_in_use; 98385 enum ohci_rh_state rh_state; 98386 int num_ports; 98387 int load[32]; 98388 u32 hc_control; 98389 long unsigned int next_statechange; 98390 u32 fminterval; 98391 unsigned int autostop: 1; 98392 unsigned int working: 1; 98393 unsigned int restart_work: 1; 98394 long unsigned int flags; 98395 unsigned int prev_frame_no; 98396 unsigned int wdh_cnt; 98397 unsigned int prev_wdh_cnt; 98398 u32 prev_donehead; 98399 struct timer_list io_watchdog; 98400 struct work_struct nec_work; 98401 struct dentry *debug_dir; 98402 long unsigned int priv[0]; 98403 }; 98404 98405 struct ohci_driver_overrides { 98406 const char *product_desc; 98407 size_t extra_priv_size; 98408 int (*reset)(struct usb_hcd *); 98409 }; 98410 98411 struct debug_buffer___2 { 98412 ssize_t (*fill_func)(struct debug_buffer___2 *); 98413 struct ohci_hcd *ohci; 98414 struct mutex mutex; 98415 size_t count; 98416 char *page; 98417 }; 98418 98419 struct uhci_td; 98420 98421 struct uhci_qh { 98422 __le32 link; 98423 __le32 element; 98424 dma_addr_t dma_handle; 98425 struct list_head node; 98426 struct usb_host_endpoint *hep; 98427 struct usb_device *udev; 98428 struct list_head queue; 98429 struct uhci_td *dummy_td; 98430 struct uhci_td *post_td; 98431 struct usb_iso_packet_descriptor *iso_packet_desc; 98432 long unsigned int advance_jiffies; 98433 unsigned int unlink_frame; 98434 unsigned int period; 98435 short int phase; 98436 short int load; 98437 unsigned int iso_frame; 98438 int state; 98439 int type; 98440 int skel; 98441 unsigned int initial_toggle: 1; 98442 unsigned int needs_fixup: 1; 98443 unsigned int is_stopped: 1; 98444 unsigned int wait_expired: 1; 98445 unsigned int bandwidth_reserved: 1; 98446 }; 98447 98448 struct uhci_td { 98449 __le32 link; 98450 __le32 status; 98451 __le32 token; 98452 __le32 buffer; 98453 dma_addr_t dma_handle; 98454 struct list_head list; 98455 int frame; 98456 struct list_head fl_list; 98457 }; 98458 98459 enum uhci_rh_state { 98460 UHCI_RH_RESET = 0, 98461 UHCI_RH_SUSPENDED = 1, 98462 UHCI_RH_AUTO_STOPPED = 2, 98463 UHCI_RH_RESUMING = 3, 98464 UHCI_RH_SUSPENDING = 4, 98465 UHCI_RH_RUNNING = 5, 98466 UHCI_RH_RUNNING_NODEVS = 6, 98467 }; 98468 98469 struct uhci_hcd { 98470 struct dentry *dentry; 98471 long unsigned int io_addr; 98472 void *regs; 98473 struct dma_pool___2 *qh_pool; 98474 struct dma_pool___2 *td_pool; 98475 struct uhci_td *term_td; 98476 struct uhci_qh *skelqh[11]; 98477 struct uhci_qh *next_qh; 98478 spinlock_t lock; 98479 dma_addr_t frame_dma_handle; 98480 __le32 *frame; 98481 void **frame_cpu; 98482 enum uhci_rh_state rh_state; 98483 long unsigned int auto_stop_time; 98484 unsigned int frame_number; 98485 unsigned int is_stopped; 98486 unsigned int last_iso_frame; 98487 unsigned int cur_iso_frame; 98488 unsigned int scan_in_progress: 1; 98489 unsigned int need_rescan: 1; 98490 unsigned int dead: 1; 98491 unsigned int RD_enable: 1; 98492 unsigned int is_initialized: 1; 98493 unsigned int fsbr_is_on: 1; 98494 unsigned int fsbr_is_wanted: 1; 98495 unsigned int fsbr_expiring: 1; 98496 struct timer_list fsbr_timer; 98497 unsigned int oc_low: 1; 98498 unsigned int wait_for_hp: 1; 98499 unsigned int big_endian_mmio: 1; 98500 unsigned int big_endian_desc: 1; 98501 unsigned int is_aspeed: 1; 98502 long unsigned int port_c_suspend; 98503 long unsigned int resuming_ports; 98504 long unsigned int ports_timeout; 98505 struct list_head idle_qh_list; 98506 int rh_numports; 98507 wait_queue_head_t waitqh; 98508 int num_waiting; 98509 int total_load; 98510 short int load[32]; 98511 struct clk *clk; 98512 void (*reset_hc)(struct uhci_hcd *); 98513 int (*check_and_reset_hc)(struct uhci_hcd *); 98514 void (*configure_hc)(struct uhci_hcd *); 98515 int (*resume_detect_interrupts_are_broken)(struct uhci_hcd *); 98516 int (*global_suspend_mode_is_broken)(struct uhci_hcd *); 98517 }; 98518 98519 struct urb_priv___2 { 98520 struct list_head node; 98521 struct urb *urb; 98522 struct uhci_qh *qh; 98523 struct list_head td_list; 98524 unsigned int fsbr: 1; 98525 }; 98526 98527 struct uhci_debug { 98528 int size; 98529 char *data; 98530 }; 98531 98532 struct xhci_cap_regs { 98533 __le32 hc_capbase; 98534 __le32 hcs_params1; 98535 __le32 hcs_params2; 98536 __le32 hcs_params3; 98537 __le32 hcc_params; 98538 __le32 db_off; 98539 __le32 run_regs_off; 98540 __le32 hcc_params2; 98541 }; 98542 98543 struct xhci_op_regs { 98544 __le32 command; 98545 __le32 status; 98546 __le32 page_size; 98547 __le32 reserved1; 98548 __le32 reserved2; 98549 __le32 dev_notification; 98550 __le64 cmd_ring; 98551 __le32 reserved3[4]; 98552 __le64 dcbaa_ptr; 98553 __le32 config_reg; 98554 __le32 reserved4[241]; 98555 __le32 port_status_base; 98556 __le32 port_power_base; 98557 __le32 port_link_base; 98558 __le32 reserved5; 98559 __le32 reserved6[1016]; 98560 }; 98561 98562 struct xhci_intr_reg { 98563 __le32 irq_pending; 98564 __le32 irq_control; 98565 __le32 erst_size; 98566 __le32 rsvd; 98567 __le64 erst_base; 98568 __le64 erst_dequeue; 98569 }; 98570 98571 struct xhci_run_regs { 98572 __le32 microframe_index; 98573 __le32 rsvd[7]; 98574 struct xhci_intr_reg ir_set[128]; 98575 }; 98576 98577 struct xhci_doorbell_array { 98578 __le32 doorbell[256]; 98579 }; 98580 98581 struct xhci_container_ctx { 98582 unsigned int type; 98583 int size; 98584 u8 *bytes; 98585 dma_addr_t dma; 98586 }; 98587 98588 struct xhci_slot_ctx { 98589 __le32 dev_info; 98590 __le32 dev_info2; 98591 __le32 tt_info; 98592 __le32 dev_state; 98593 __le32 reserved[4]; 98594 }; 98595 98596 struct xhci_ep_ctx { 98597 __le32 ep_info; 98598 __le32 ep_info2; 98599 __le64 deq; 98600 __le32 tx_info; 98601 __le32 reserved[3]; 98602 }; 98603 98604 struct xhci_input_control_ctx { 98605 __le32 drop_flags; 98606 __le32 add_flags; 98607 __le32 rsvd2[6]; 98608 }; 98609 98610 union xhci_trb; 98611 98612 struct xhci_command { 98613 struct xhci_container_ctx *in_ctx; 98614 u32 status; 98615 int slot_id; 98616 struct completion *completion; 98617 union xhci_trb *command_trb; 98618 struct list_head cmd_list; 98619 }; 98620 98621 struct xhci_link_trb { 98622 __le64 segment_ptr; 98623 __le32 intr_target; 98624 __le32 control; 98625 }; 98626 98627 struct xhci_transfer_event { 98628 __le64 buffer; 98629 __le32 transfer_len; 98630 __le32 flags; 98631 }; 98632 98633 struct xhci_event_cmd { 98634 __le64 cmd_trb; 98635 __le32 status; 98636 __le32 flags; 98637 }; 98638 98639 struct xhci_generic_trb { 98640 __le32 field[4]; 98641 }; 98642 98643 union xhci_trb { 98644 struct xhci_link_trb link; 98645 struct xhci_transfer_event trans_event; 98646 struct xhci_event_cmd event_cmd; 98647 struct xhci_generic_trb generic; 98648 }; 98649 98650 struct xhci_stream_ctx { 98651 __le64 stream_ring; 98652 __le32 reserved[2]; 98653 }; 98654 98655 struct xhci_ring; 98656 98657 struct xhci_stream_info { 98658 struct xhci_ring **stream_rings; 98659 unsigned int num_streams; 98660 struct xhci_stream_ctx *stream_ctx_array; 98661 unsigned int num_stream_ctxs; 98662 dma_addr_t ctx_array_dma; 98663 struct xarray trb_address_map; 98664 struct xhci_command *free_streams_command; 98665 }; 98666 98667 enum xhci_ring_type { 98668 TYPE_CTRL = 0, 98669 TYPE_ISOC = 1, 98670 TYPE_BULK = 2, 98671 TYPE_INTR = 3, 98672 TYPE_STREAM = 4, 98673 TYPE_COMMAND = 5, 98674 TYPE_EVENT = 6, 98675 }; 98676 98677 struct xhci_segment; 98678 98679 struct xhci_ring { 98680 struct xhci_segment *first_seg; 98681 struct xhci_segment *last_seg; 98682 union xhci_trb *enqueue; 98683 struct xhci_segment *enq_seg; 98684 union xhci_trb *dequeue; 98685 struct xhci_segment *deq_seg; 98686 struct list_head td_list; 98687 u32 cycle_state; 98688 unsigned int err_count; 98689 unsigned int stream_id; 98690 unsigned int num_segs; 98691 unsigned int num_trbs_free; 98692 unsigned int num_trbs_free_temp; 98693 unsigned int bounce_buf_len; 98694 enum xhci_ring_type type; 98695 bool last_td_was_short; 98696 struct xarray *trb_address_map; 98697 }; 98698 98699 struct xhci_bw_info { 98700 unsigned int ep_interval; 98701 unsigned int mult; 98702 unsigned int num_packets; 98703 unsigned int max_packet_size; 98704 unsigned int max_esit_payload; 98705 unsigned int type; 98706 }; 98707 98708 struct xhci_hcd; 98709 98710 struct xhci_virt_ep { 98711 struct xhci_ring *ring; 98712 struct xhci_stream_info *stream_info; 98713 struct xhci_ring *new_ring; 98714 unsigned int ep_state; 98715 struct list_head cancelled_td_list; 98716 struct timer_list stop_cmd_timer; 98717 struct xhci_hcd *xhci; 98718 struct xhci_segment *queued_deq_seg; 98719 union xhci_trb *queued_deq_ptr; 98720 bool skip; 98721 struct xhci_bw_info bw_info; 98722 struct list_head bw_endpoint_list; 98723 int next_frame_id; 98724 bool use_extended_tbc; 98725 }; 98726 98727 struct xhci_erst_entry; 98728 98729 struct xhci_erst { 98730 struct xhci_erst_entry *entries; 98731 unsigned int num_entries; 98732 dma_addr_t erst_dma_addr; 98733 unsigned int erst_size; 98734 }; 98735 98736 struct s3_save { 98737 u32 command; 98738 u32 dev_nt; 98739 u64 dcbaa_ptr; 98740 u32 config_reg; 98741 u32 irq_pending; 98742 u32 irq_control; 98743 u32 erst_size; 98744 u64 erst_base; 98745 u64 erst_dequeue; 98746 }; 98747 98748 struct xhci_bus_state { 98749 long unsigned int bus_suspended; 98750 long unsigned int next_statechange; 98751 u32 port_c_suspend; 98752 u32 suspended_ports; 98753 u32 port_remote_wakeup; 98754 long unsigned int resume_done[31]; 98755 long unsigned int resuming_ports; 98756 long unsigned int rexit_ports; 98757 struct completion rexit_done[31]; 98758 struct completion u3exit_done[31]; 98759 }; 98760 98761 struct xhci_port; 98762 98763 struct xhci_hub { 98764 struct xhci_port **ports; 98765 unsigned int num_ports; 98766 struct usb_hcd *hcd; 98767 struct xhci_bus_state bus_state; 98768 u8 maj_rev; 98769 u8 min_rev; 98770 }; 98771 98772 struct xhci_device_context_array; 98773 98774 struct xhci_scratchpad; 98775 98776 struct xhci_virt_device; 98777 98778 struct xhci_root_port_bw_info; 98779 98780 struct xhci_port_cap; 98781 98782 struct xhci_hcd { 98783 struct usb_hcd *main_hcd; 98784 struct usb_hcd *shared_hcd; 98785 struct xhci_cap_regs *cap_regs; 98786 struct xhci_op_regs *op_regs; 98787 struct xhci_run_regs *run_regs; 98788 struct xhci_doorbell_array *dba; 98789 struct xhci_intr_reg *ir_set; 98790 __u32 hcs_params1; 98791 __u32 hcs_params2; 98792 __u32 hcs_params3; 98793 __u32 hcc_params; 98794 __u32 hcc_params2; 98795 spinlock_t lock; 98796 u8 sbrn; 98797 u16 hci_version; 98798 u8 max_slots; 98799 u8 max_interrupters; 98800 u8 max_ports; 98801 u8 isoc_threshold; 98802 u32 imod_interval; 98803 int event_ring_max; 98804 int page_size; 98805 int page_shift; 98806 int msix_count; 98807 struct clk *clk; 98808 struct clk *reg_clk; 98809 struct reset_control___2 *reset; 98810 struct xhci_device_context_array *dcbaa; 98811 struct xhci_ring *cmd_ring; 98812 unsigned int cmd_ring_state; 98813 struct list_head cmd_list; 98814 unsigned int cmd_ring_reserved_trbs; 98815 struct delayed_work cmd_timer; 98816 struct completion cmd_ring_stop_completion; 98817 struct xhci_command *current_cmd; 98818 struct xhci_ring *event_ring; 98819 struct xhci_erst erst; 98820 struct xhci_scratchpad *scratchpad; 98821 struct list_head lpm_failed_devs; 98822 struct mutex mutex; 98823 struct xhci_command *lpm_command; 98824 struct xhci_virt_device *devs[256]; 98825 struct xhci_root_port_bw_info *rh_bw; 98826 struct dma_pool___2 *device_pool; 98827 struct dma_pool___2 *segment_pool; 98828 struct dma_pool___2 *small_streams_pool; 98829 struct dma_pool___2 *medium_streams_pool; 98830 unsigned int xhc_state; 98831 u32 command; 98832 struct s3_save s3; 98833 long long unsigned int quirks; 98834 unsigned int num_active_eps; 98835 unsigned int limit_active_eps; 98836 struct xhci_port *hw_ports; 98837 struct xhci_hub usb2_rhub; 98838 struct xhci_hub usb3_rhub; 98839 unsigned int hw_lpm_support: 1; 98840 unsigned int broken_suspend: 1; 98841 u32 *ext_caps; 98842 unsigned int num_ext_caps; 98843 struct xhci_port_cap *port_caps; 98844 unsigned int num_port_caps; 98845 struct timer_list comp_mode_recovery_timer; 98846 u32 port_status_u0; 98847 u16 test_mode; 98848 struct dentry *debugfs_root; 98849 struct dentry *debugfs_slots; 98850 struct list_head regset_list; 98851 void *dbc; 98852 long unsigned int priv[0]; 98853 }; 98854 98855 struct xhci_segment { 98856 union xhci_trb *trbs; 98857 struct xhci_segment *next; 98858 dma_addr_t dma; 98859 dma_addr_t bounce_dma; 98860 void *bounce_buf; 98861 unsigned int bounce_offs; 98862 unsigned int bounce_len; 98863 }; 98864 98865 enum xhci_overhead_type { 98866 LS_OVERHEAD_TYPE = 0, 98867 FS_OVERHEAD_TYPE = 1, 98868 HS_OVERHEAD_TYPE = 2, 98869 }; 98870 98871 struct xhci_interval_bw { 98872 unsigned int num_packets; 98873 struct list_head endpoints; 98874 unsigned int overhead[3]; 98875 }; 98876 98877 struct xhci_interval_bw_table { 98878 unsigned int interval0_esit_payload; 98879 struct xhci_interval_bw interval_bw[16]; 98880 unsigned int bw_used; 98881 unsigned int ss_bw_in; 98882 unsigned int ss_bw_out; 98883 }; 98884 98885 struct xhci_tt_bw_info; 98886 98887 struct xhci_virt_device { 98888 struct usb_device *udev; 98889 struct xhci_container_ctx *out_ctx; 98890 struct xhci_container_ctx *in_ctx; 98891 struct xhci_virt_ep eps[31]; 98892 u8 fake_port; 98893 u8 real_port; 98894 struct xhci_interval_bw_table *bw_table; 98895 struct xhci_tt_bw_info *tt_info; 98896 long unsigned int flags; 98897 u16 current_mel; 98898 void *debugfs_private; 98899 }; 98900 98901 struct xhci_tt_bw_info { 98902 struct list_head tt_list; 98903 int slot_id; 98904 int ttport; 98905 struct xhci_interval_bw_table bw_table; 98906 int active_eps; 98907 }; 98908 98909 struct xhci_root_port_bw_info { 98910 struct list_head tts; 98911 unsigned int num_active_tts; 98912 struct xhci_interval_bw_table bw_table; 98913 }; 98914 98915 struct xhci_device_context_array { 98916 __le64 dev_context_ptrs[256]; 98917 dma_addr_t dma; 98918 }; 98919 98920 enum xhci_setup_dev { 98921 SETUP_CONTEXT_ONLY = 0, 98922 SETUP_CONTEXT_ADDRESS = 1, 98923 }; 98924 98925 struct xhci_td { 98926 struct list_head td_list; 98927 struct list_head cancelled_td_list; 98928 struct urb *urb; 98929 struct xhci_segment *start_seg; 98930 union xhci_trb *first_trb; 98931 union xhci_trb *last_trb; 98932 struct xhci_segment *bounce_seg; 98933 bool urb_length_set; 98934 }; 98935 98936 struct xhci_dequeue_state { 98937 struct xhci_segment *new_deq_seg; 98938 union xhci_trb *new_deq_ptr; 98939 int new_cycle_state; 98940 unsigned int stream_id; 98941 }; 98942 98943 struct xhci_erst_entry { 98944 __le64 seg_addr; 98945 __le32 seg_size; 98946 __le32 rsvd; 98947 }; 98948 98949 struct xhci_scratchpad { 98950 u64 *sp_array; 98951 dma_addr_t sp_dma; 98952 void **sp_buffers; 98953 }; 98954 98955 struct urb_priv___3 { 98956 int num_tds; 98957 int num_tds_done; 98958 struct xhci_td td[0]; 98959 }; 98960 98961 struct xhci_port_cap { 98962 u32 *psi; 98963 u8 psi_count; 98964 u8 psi_uid_count; 98965 u8 maj_rev; 98966 u8 min_rev; 98967 }; 98968 98969 struct xhci_port { 98970 __le32 *addr; 98971 int hw_portnum; 98972 int hcd_portnum; 98973 struct xhci_hub *rhub; 98974 struct xhci_port_cap *port_cap; 98975 }; 98976 98977 struct xhci_driver_overrides { 98978 size_t extra_priv_size; 98979 int (*reset)(struct usb_hcd *); 98980 int (*start)(struct usb_hcd *); 98981 int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); 98982 void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); 98983 }; 98984 98985 typedef void (*xhci_get_quirks_t)(struct device *, struct xhci_hcd *); 98986 98987 enum xhci_ep_reset_type { 98988 EP_HARD_RESET = 0, 98989 EP_SOFT_RESET = 1, 98990 }; 98991 98992 struct dbc_regs { 98993 __le32 capability; 98994 __le32 doorbell; 98995 __le32 ersts; 98996 __le32 __reserved_0; 98997 __le64 erstba; 98998 __le64 erdp; 98999 __le32 control; 99000 __le32 status; 99001 __le32 portsc; 99002 __le32 __reserved_1; 99003 __le64 dccp; 99004 __le32 devinfo1; 99005 __le32 devinfo2; 99006 }; 99007 99008 struct dbc_str_descs { 99009 char string0[64]; 99010 char manufacturer[64]; 99011 char product[64]; 99012 char serial[64]; 99013 }; 99014 99015 enum dbc_state { 99016 DS_DISABLED = 0, 99017 DS_INITIALIZED = 1, 99018 DS_ENABLED = 2, 99019 DS_CONNECTED = 3, 99020 DS_CONFIGURED = 4, 99021 DS_STALLED = 5, 99022 }; 99023 99024 struct xhci_dbc; 99025 99026 struct dbc_ep { 99027 struct xhci_dbc *dbc; 99028 struct list_head list_pending; 99029 struct xhci_ring *ring; 99030 unsigned int direction: 1; 99031 }; 99032 99033 struct dbc_driver; 99034 99035 struct xhci_dbc { 99036 spinlock_t lock; 99037 struct device *dev; 99038 struct xhci_hcd *xhci; 99039 struct dbc_regs *regs; 99040 struct xhci_ring *ring_evt; 99041 struct xhci_ring *ring_in; 99042 struct xhci_ring *ring_out; 99043 struct xhci_erst erst; 99044 struct xhci_container_ctx *ctx; 99045 struct dbc_str_descs *string; 99046 dma_addr_t string_dma; 99047 size_t string_size; 99048 enum dbc_state state; 99049 struct delayed_work event_work; 99050 unsigned int resume_required: 1; 99051 struct dbc_ep eps[2]; 99052 const struct dbc_driver *driver; 99053 void *priv; 99054 }; 99055 99056 struct dbc_driver { 99057 int (*configure)(struct xhci_dbc *); 99058 void (*disconnect)(struct xhci_dbc *); 99059 }; 99060 99061 struct dbc_request { 99062 void *buf; 99063 unsigned int length; 99064 dma_addr_t dma; 99065 void (*complete)(struct xhci_dbc *, struct dbc_request *); 99066 struct list_head list_pool; 99067 int status; 99068 unsigned int actual; 99069 struct xhci_dbc *dbc; 99070 struct list_head list_pending; 99071 dma_addr_t trb_dma; 99072 union xhci_trb *trb; 99073 unsigned int direction: 1; 99074 }; 99075 99076 struct trace_event_raw_xhci_log_msg { 99077 struct trace_entry ent; 99078 u32 __data_loc_msg; 99079 char __data[0]; 99080 }; 99081 99082 struct trace_event_raw_xhci_log_ctx { 99083 struct trace_entry ent; 99084 int ctx_64; 99085 unsigned int ctx_type; 99086 dma_addr_t ctx_dma; 99087 u8 *ctx_va; 99088 unsigned int ctx_ep_num; 99089 int slot_id; 99090 u32 __data_loc_ctx_data; 99091 char __data[0]; 99092 }; 99093 99094 struct trace_event_raw_xhci_log_trb { 99095 struct trace_entry ent; 99096 u32 type; 99097 u32 field0; 99098 u32 field1; 99099 u32 field2; 99100 u32 field3; 99101 char __data[0]; 99102 }; 99103 99104 struct trace_event_raw_xhci_log_free_virt_dev { 99105 struct trace_entry ent; 99106 void *vdev; 99107 long long unsigned int out_ctx; 99108 long long unsigned int in_ctx; 99109 u8 fake_port; 99110 u8 real_port; 99111 u16 current_mel; 99112 char __data[0]; 99113 }; 99114 99115 struct trace_event_raw_xhci_log_virt_dev { 99116 struct trace_entry ent; 99117 void *vdev; 99118 long long unsigned int out_ctx; 99119 long long unsigned int in_ctx; 99120 int devnum; 99121 int state; 99122 int speed; 99123 u8 portnum; 99124 u8 level; 99125 int slot_id; 99126 char __data[0]; 99127 }; 99128 99129 struct trace_event_raw_xhci_log_urb { 99130 struct trace_entry ent; 99131 void *urb; 99132 unsigned int pipe; 99133 unsigned int stream; 99134 int status; 99135 unsigned int flags; 99136 int num_mapped_sgs; 99137 int num_sgs; 99138 int length; 99139 int actual; 99140 int epnum; 99141 int dir_in; 99142 int type; 99143 int slot_id; 99144 char __data[0]; 99145 }; 99146 99147 struct trace_event_raw_xhci_log_ep_ctx { 99148 struct trace_entry ent; 99149 u32 info; 99150 u32 info2; 99151 u64 deq; 99152 u32 tx_info; 99153 char __data[0]; 99154 }; 99155 99156 struct trace_event_raw_xhci_log_slot_ctx { 99157 struct trace_entry ent; 99158 u32 info; 99159 u32 info2; 99160 u32 tt_info; 99161 u32 state; 99162 char __data[0]; 99163 }; 99164 99165 struct trace_event_raw_xhci_log_ctrl_ctx { 99166 struct trace_entry ent; 99167 u32 drop; 99168 u32 add; 99169 char __data[0]; 99170 }; 99171 99172 struct trace_event_raw_xhci_log_ring { 99173 struct trace_entry ent; 99174 u32 type; 99175 void *ring; 99176 dma_addr_t enq; 99177 dma_addr_t deq; 99178 dma_addr_t enq_seg; 99179 dma_addr_t deq_seg; 99180 unsigned int num_segs; 99181 unsigned int stream_id; 99182 unsigned int cycle_state; 99183 unsigned int num_trbs_free; 99184 unsigned int bounce_buf_len; 99185 char __data[0]; 99186 }; 99187 99188 struct trace_event_raw_xhci_log_portsc { 99189 struct trace_entry ent; 99190 u32 portnum; 99191 u32 portsc; 99192 char __data[0]; 99193 }; 99194 99195 struct trace_event_raw_xhci_log_doorbell { 99196 struct trace_entry ent; 99197 u32 slot; 99198 u32 doorbell; 99199 char __data[0]; 99200 }; 99201 99202 struct trace_event_raw_xhci_dbc_log_request { 99203 struct trace_entry ent; 99204 struct dbc_request *req; 99205 bool dir; 99206 unsigned int actual; 99207 unsigned int length; 99208 int status; 99209 char __data[0]; 99210 }; 99211 99212 struct trace_event_data_offsets_xhci_log_msg { 99213 u32 msg; 99214 }; 99215 99216 struct trace_event_data_offsets_xhci_log_ctx { 99217 u32 ctx_data; 99218 }; 99219 99220 struct trace_event_data_offsets_xhci_log_trb {}; 99221 99222 struct trace_event_data_offsets_xhci_log_free_virt_dev {}; 99223 99224 struct trace_event_data_offsets_xhci_log_virt_dev {}; 99225 99226 struct trace_event_data_offsets_xhci_log_urb {}; 99227 99228 struct trace_event_data_offsets_xhci_log_ep_ctx {}; 99229 99230 struct trace_event_data_offsets_xhci_log_slot_ctx {}; 99231 99232 struct trace_event_data_offsets_xhci_log_ctrl_ctx {}; 99233 99234 struct trace_event_data_offsets_xhci_log_ring {}; 99235 99236 struct trace_event_data_offsets_xhci_log_portsc {}; 99237 99238 struct trace_event_data_offsets_xhci_log_doorbell {}; 99239 99240 struct trace_event_data_offsets_xhci_dbc_log_request {}; 99241 99242 typedef void (*btf_trace_xhci_dbg_address)(void *, struct va_format *); 99243 99244 typedef void (*btf_trace_xhci_dbg_context_change)(void *, struct va_format *); 99245 99246 typedef void (*btf_trace_xhci_dbg_quirks)(void *, struct va_format *); 99247 99248 typedef void (*btf_trace_xhci_dbg_reset_ep)(void *, struct va_format *); 99249 99250 typedef void (*btf_trace_xhci_dbg_cancel_urb)(void *, struct va_format *); 99251 99252 typedef void (*btf_trace_xhci_dbg_init)(void *, struct va_format *); 99253 99254 typedef void (*btf_trace_xhci_dbg_ring_expansion)(void *, struct va_format *); 99255 99256 typedef void (*btf_trace_xhci_address_ctx)(void *, struct xhci_hcd *, struct xhci_container_ctx *, unsigned int); 99257 99258 typedef void (*btf_trace_xhci_handle_event)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99259 99260 typedef void (*btf_trace_xhci_handle_command)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99261 99262 typedef void (*btf_trace_xhci_handle_transfer)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99263 99264 typedef void (*btf_trace_xhci_queue_trb)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99265 99266 typedef void (*btf_trace_xhci_dbc_handle_event)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99267 99268 typedef void (*btf_trace_xhci_dbc_handle_transfer)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99269 99270 typedef void (*btf_trace_xhci_dbc_gadget_ep_queue)(void *, struct xhci_ring *, struct xhci_generic_trb *); 99271 99272 typedef void (*btf_trace_xhci_free_virt_device)(void *, struct xhci_virt_device *); 99273 99274 typedef void (*btf_trace_xhci_alloc_virt_device)(void *, struct xhci_virt_device *); 99275 99276 typedef void (*btf_trace_xhci_setup_device)(void *, struct xhci_virt_device *); 99277 99278 typedef void (*btf_trace_xhci_setup_addressable_virt_device)(void *, struct xhci_virt_device *); 99279 99280 typedef void (*btf_trace_xhci_stop_device)(void *, struct xhci_virt_device *); 99281 99282 typedef void (*btf_trace_xhci_urb_enqueue)(void *, struct urb *); 99283 99284 typedef void (*btf_trace_xhci_urb_giveback)(void *, struct urb *); 99285 99286 typedef void (*btf_trace_xhci_urb_dequeue)(void *, struct urb *); 99287 99288 typedef void (*btf_trace_xhci_handle_cmd_stop_ep)(void *, struct xhci_ep_ctx *); 99289 99290 typedef void (*btf_trace_xhci_handle_cmd_set_deq_ep)(void *, struct xhci_ep_ctx *); 99291 99292 typedef void (*btf_trace_xhci_handle_cmd_reset_ep)(void *, struct xhci_ep_ctx *); 99293 99294 typedef void (*btf_trace_xhci_handle_cmd_config_ep)(void *, struct xhci_ep_ctx *); 99295 99296 typedef void (*btf_trace_xhci_add_endpoint)(void *, struct xhci_ep_ctx *); 99297 99298 typedef void (*btf_trace_xhci_alloc_dev)(void *, struct xhci_slot_ctx *); 99299 99300 typedef void (*btf_trace_xhci_free_dev)(void *, struct xhci_slot_ctx *); 99301 99302 typedef void (*btf_trace_xhci_handle_cmd_disable_slot)(void *, struct xhci_slot_ctx *); 99303 99304 typedef void (*btf_trace_xhci_discover_or_reset_device)(void *, struct xhci_slot_ctx *); 99305 99306 typedef void (*btf_trace_xhci_setup_device_slot)(void *, struct xhci_slot_ctx *); 99307 99308 typedef void (*btf_trace_xhci_handle_cmd_addr_dev)(void *, struct xhci_slot_ctx *); 99309 99310 typedef void (*btf_trace_xhci_handle_cmd_reset_dev)(void *, struct xhci_slot_ctx *); 99311 99312 typedef void (*btf_trace_xhci_handle_cmd_set_deq)(void *, struct xhci_slot_ctx *); 99313 99314 typedef void (*btf_trace_xhci_configure_endpoint)(void *, struct xhci_slot_ctx *); 99315 99316 typedef void (*btf_trace_xhci_address_ctrl_ctx)(void *, struct xhci_input_control_ctx *); 99317 99318 typedef void (*btf_trace_xhci_configure_endpoint_ctrl_ctx)(void *, struct xhci_input_control_ctx *); 99319 99320 typedef void (*btf_trace_xhci_ring_alloc)(void *, struct xhci_ring *); 99321 99322 typedef void (*btf_trace_xhci_ring_free)(void *, struct xhci_ring *); 99323 99324 typedef void (*btf_trace_xhci_ring_expansion)(void *, struct xhci_ring *); 99325 99326 typedef void (*btf_trace_xhci_inc_enq)(void *, struct xhci_ring *); 99327 99328 typedef void (*btf_trace_xhci_inc_deq)(void *, struct xhci_ring *); 99329 99330 typedef void (*btf_trace_xhci_handle_port_status)(void *, u32, u32); 99331 99332 typedef void (*btf_trace_xhci_get_port_status)(void *, u32, u32); 99333 99334 typedef void (*btf_trace_xhci_hub_status_data)(void *, u32, u32); 99335 99336 typedef void (*btf_trace_xhci_ring_ep_doorbell)(void *, u32, u32); 99337 99338 typedef void (*btf_trace_xhci_ring_host_doorbell)(void *, u32, u32); 99339 99340 typedef void (*btf_trace_xhci_dbc_alloc_request)(void *, struct dbc_request *); 99341 99342 typedef void (*btf_trace_xhci_dbc_free_request)(void *, struct dbc_request *); 99343 99344 typedef void (*btf_trace_xhci_dbc_queue_request)(void *, struct dbc_request *); 99345 99346 typedef void (*btf_trace_xhci_dbc_giveback_request)(void *, struct dbc_request *); 99347 99348 struct usb_string_descriptor { 99349 __u8 bLength; 99350 __u8 bDescriptorType; 99351 __le16 wData[1]; 99352 }; 99353 99354 struct dbc_info_context { 99355 __le64 string0; 99356 __le64 manufacturer; 99357 __le64 product; 99358 __le64 serial; 99359 __le32 length; 99360 __le32 __reserved_0[7]; 99361 }; 99362 99363 enum evtreturn { 99364 EVT_ERR = 4294967295, 99365 EVT_DONE = 0, 99366 EVT_GSER = 1, 99367 EVT_DISC = 2, 99368 }; 99369 99370 struct kfifo { 99371 union { 99372 struct __kfifo kfifo; 99373 unsigned char *type; 99374 const unsigned char *const_type; 99375 char (*rectype)[0]; 99376 void *ptr; 99377 const void *ptr_const; 99378 }; 99379 unsigned char buf[0]; 99380 }; 99381 99382 struct dbc_port { 99383 struct tty_port port; 99384 spinlock_t port_lock; 99385 struct list_head read_pool; 99386 struct list_head read_queue; 99387 unsigned int n_read; 99388 struct tasklet_struct push; 99389 struct list_head write_pool; 99390 struct kfifo write_fifo; 99391 bool registered; 99392 }; 99393 99394 struct xhci_regset { 99395 char name[32]; 99396 struct debugfs_regset32 regset; 99397 size_t nregs; 99398 struct list_head list; 99399 }; 99400 99401 struct xhci_file_map { 99402 const char *name; 99403 int (*show)(struct seq_file *, void *); 99404 }; 99405 99406 struct xhci_ep_priv { 99407 char name[32]; 99408 struct dentry *root; 99409 struct xhci_stream_info *stream_info; 99410 struct xhci_ring *show_ring; 99411 unsigned int stream_id; 99412 }; 99413 99414 struct xhci_slot_priv { 99415 char name[32]; 99416 struct dentry *root; 99417 struct xhci_ep_priv *eps[31]; 99418 struct xhci_virt_device *dev; 99419 }; 99420 99421 struct xhci_driver_data { 99422 u64 quirks; 99423 const char *firmware; 99424 }; 99425 99426 struct async_icount { 99427 __u32 cts; 99428 __u32 dsr; 99429 __u32 rng; 99430 __u32 dcd; 99431 __u32 tx; 99432 __u32 rx; 99433 __u32 frame; 99434 __u32 parity; 99435 __u32 overrun; 99436 __u32 brk; 99437 __u32 buf_overrun; 99438 }; 99439 99440 struct usb_serial; 99441 99442 struct usb_serial_port { 99443 struct usb_serial *serial; 99444 struct tty_port port; 99445 spinlock_t lock; 99446 u32 minor; 99447 u8 port_number; 99448 unsigned char *interrupt_in_buffer; 99449 struct urb *interrupt_in_urb; 99450 __u8 interrupt_in_endpointAddress; 99451 unsigned char *interrupt_out_buffer; 99452 int interrupt_out_size; 99453 struct urb *interrupt_out_urb; 99454 __u8 interrupt_out_endpointAddress; 99455 unsigned char *bulk_in_buffer; 99456 int bulk_in_size; 99457 struct urb *read_urb; 99458 __u8 bulk_in_endpointAddress; 99459 unsigned char *bulk_in_buffers[2]; 99460 struct urb *read_urbs[2]; 99461 long unsigned int read_urbs_free; 99462 unsigned char *bulk_out_buffer; 99463 int bulk_out_size; 99464 struct urb *write_urb; 99465 struct kfifo write_fifo; 99466 unsigned char *bulk_out_buffers[2]; 99467 struct urb *write_urbs[2]; 99468 long unsigned int write_urbs_free; 99469 __u8 bulk_out_endpointAddress; 99470 struct async_icount icount; 99471 int tx_bytes; 99472 long unsigned int flags; 99473 struct work_struct work; 99474 long unsigned int sysrq; 99475 struct device dev; 99476 }; 99477 99478 struct usb_serial_driver; 99479 99480 struct usb_serial { 99481 struct usb_device *dev; 99482 struct usb_serial_driver *type; 99483 struct usb_interface *interface; 99484 unsigned char disconnected: 1; 99485 unsigned char suspending: 1; 99486 unsigned char attached: 1; 99487 unsigned char minors_reserved: 1; 99488 unsigned char num_ports; 99489 unsigned char num_port_pointers; 99490 unsigned char num_interrupt_in; 99491 unsigned char num_interrupt_out; 99492 unsigned char num_bulk_in; 99493 unsigned char num_bulk_out; 99494 struct usb_serial_port *port[16]; 99495 struct kref kref; 99496 struct mutex disc_mutex; 99497 void *private; 99498 }; 99499 99500 struct usb_serial_endpoints; 99501 99502 struct usb_serial_driver { 99503 const char *description; 99504 const struct usb_device_id *id_table; 99505 struct list_head driver_list; 99506 struct device_driver driver; 99507 struct usb_driver *usb_driver; 99508 struct usb_dynids dynids; 99509 unsigned char num_ports; 99510 unsigned char num_bulk_in; 99511 unsigned char num_bulk_out; 99512 unsigned char num_interrupt_in; 99513 unsigned char num_interrupt_out; 99514 size_t bulk_in_size; 99515 size_t bulk_out_size; 99516 int (*probe)(struct usb_serial *, const struct usb_device_id *); 99517 int (*attach)(struct usb_serial *); 99518 int (*calc_num_ports)(struct usb_serial *, struct usb_serial_endpoints *); 99519 void (*disconnect)(struct usb_serial *); 99520 void (*release)(struct usb_serial *); 99521 int (*port_probe)(struct usb_serial_port *); 99522 int (*port_remove)(struct usb_serial_port *); 99523 int (*suspend)(struct usb_serial *, pm_message_t); 99524 int (*resume)(struct usb_serial *); 99525 int (*reset_resume)(struct usb_serial *); 99526 int (*open)(struct tty_struct *, struct usb_serial_port *); 99527 void (*close)(struct usb_serial_port *); 99528 int (*write)(struct tty_struct *, struct usb_serial_port *, const unsigned char *, int); 99529 int (*write_room)(struct tty_struct *); 99530 int (*ioctl)(struct tty_struct *, unsigned int, long unsigned int); 99531 int (*get_serial)(struct tty_struct *, struct serial_struct *); 99532 int (*set_serial)(struct tty_struct *, struct serial_struct *); 99533 void (*set_termios)(struct tty_struct *, struct usb_serial_port *, struct ktermios *); 99534 void (*break_ctl)(struct tty_struct *, int); 99535 int (*chars_in_buffer)(struct tty_struct *); 99536 void (*wait_until_sent)(struct tty_struct *, long int); 99537 bool (*tx_empty)(struct usb_serial_port *); 99538 void (*throttle)(struct tty_struct *); 99539 void (*unthrottle)(struct tty_struct *); 99540 int (*tiocmget)(struct tty_struct *); 99541 int (*tiocmset)(struct tty_struct *, unsigned int, unsigned int); 99542 int (*tiocmiwait)(struct tty_struct *, long unsigned int); 99543 int (*get_icount)(struct tty_struct *, struct serial_icounter_struct *); 99544 void (*dtr_rts)(struct usb_serial_port *, int); 99545 int (*carrier_raised)(struct usb_serial_port *); 99546 void (*init_termios)(struct tty_struct *); 99547 void (*read_int_callback)(struct urb *); 99548 void (*write_int_callback)(struct urb *); 99549 void (*read_bulk_callback)(struct urb *); 99550 void (*write_bulk_callback)(struct urb *); 99551 void (*process_read_urb)(struct urb *); 99552 int (*prepare_write_buffer)(struct usb_serial_port *, void *, size_t); 99553 }; 99554 99555 struct usb_serial_endpoints { 99556 unsigned char num_bulk_in; 99557 unsigned char num_bulk_out; 99558 unsigned char num_interrupt_in; 99559 unsigned char num_interrupt_out; 99560 struct usb_endpoint_descriptor *bulk_in[16]; 99561 struct usb_endpoint_descriptor *bulk_out[16]; 99562 struct usb_endpoint_descriptor *interrupt_in[16]; 99563 struct usb_endpoint_descriptor *interrupt_out[16]; 99564 }; 99565 99566 struct usbcons_info { 99567 int magic; 99568 int break_flag; 99569 struct usb_serial_port *port; 99570 }; 99571 99572 struct usb_debug_descriptor { 99573 __u8 bLength; 99574 __u8 bDescriptorType; 99575 __u8 bDebugInEndpoint; 99576 __u8 bDebugOutEndpoint; 99577 }; 99578 99579 struct ehci_dev { 99580 u32 bus; 99581 u32 slot; 99582 u32 func; 99583 }; 99584 99585 typedef void (*set_debug_port_t)(int); 99586 99587 struct usb_hcd___2; 99588 99589 struct xdbc_regs { 99590 __le32 capability; 99591 __le32 doorbell; 99592 __le32 ersts; 99593 __le32 __reserved_0; 99594 __le64 erstba; 99595 __le64 erdp; 99596 __le32 control; 99597 __le32 status; 99598 __le32 portsc; 99599 __le32 __reserved_1; 99600 __le64 dccp; 99601 __le32 devinfo1; 99602 __le32 devinfo2; 99603 }; 99604 99605 struct xdbc_trb { 99606 __le32 field[4]; 99607 }; 99608 99609 struct xdbc_erst_entry { 99610 __le64 seg_addr; 99611 __le32 seg_size; 99612 __le32 __reserved_0; 99613 }; 99614 99615 struct xdbc_info_context { 99616 __le64 string0; 99617 __le64 manufacturer; 99618 __le64 product; 99619 __le64 serial; 99620 __le32 length; 99621 __le32 __reserved_0[7]; 99622 }; 99623 99624 struct xdbc_ep_context { 99625 __le32 ep_info1; 99626 __le32 ep_info2; 99627 __le64 deq; 99628 __le32 tx_info; 99629 __le32 __reserved_0[11]; 99630 }; 99631 99632 struct xdbc_context { 99633 struct xdbc_info_context info; 99634 struct xdbc_ep_context out; 99635 struct xdbc_ep_context in; 99636 }; 99637 99638 struct xdbc_strings { 99639 char string0[64]; 99640 char manufacturer[64]; 99641 char product[64]; 99642 char serial[64]; 99643 }; 99644 99645 struct xdbc_segment { 99646 struct xdbc_trb *trbs; 99647 dma_addr_t dma; 99648 }; 99649 99650 struct xdbc_ring { 99651 struct xdbc_segment *segment; 99652 struct xdbc_trb *enqueue; 99653 struct xdbc_trb *dequeue; 99654 u32 cycle_state; 99655 }; 99656 99657 struct xdbc_state { 99658 u16 vendor; 99659 u16 device; 99660 u32 bus; 99661 u32 dev; 99662 u32 func; 99663 void *xhci_base; 99664 u64 xhci_start; 99665 size_t xhci_length; 99666 int port_number; 99667 struct xdbc_regs *xdbc_reg; 99668 dma_addr_t table_dma; 99669 void *table_base; 99670 dma_addr_t erst_dma; 99671 size_t erst_size; 99672 void *erst_base; 99673 struct xdbc_ring evt_ring; 99674 struct xdbc_segment evt_seg; 99675 dma_addr_t dbcc_dma; 99676 size_t dbcc_size; 99677 void *dbcc_base; 99678 dma_addr_t string_dma; 99679 size_t string_size; 99680 void *string_base; 99681 struct xdbc_ring out_ring; 99682 struct xdbc_segment out_seg; 99683 void *out_buf; 99684 dma_addr_t out_dma; 99685 struct xdbc_ring in_ring; 99686 struct xdbc_segment in_seg; 99687 void *in_buf; 99688 dma_addr_t in_dma; 99689 u32 flags; 99690 raw_spinlock_t lock; 99691 }; 99692 99693 struct serio_device_id { 99694 __u8 type; 99695 __u8 extra; 99696 __u8 id; 99697 __u8 proto; 99698 }; 99699 99700 struct serio_driver; 99701 99702 struct serio { 99703 void *port_data; 99704 char name[32]; 99705 char phys[32]; 99706 char firmware_id[128]; 99707 bool manual_bind; 99708 struct serio_device_id id; 99709 spinlock_t lock; 99710 int (*write)(struct serio *, unsigned char); 99711 int (*open)(struct serio *); 99712 void (*close)(struct serio *); 99713 int (*start)(struct serio *); 99714 void (*stop)(struct serio *); 99715 struct serio *parent; 99716 struct list_head child_node; 99717 struct list_head children; 99718 unsigned int depth; 99719 struct serio_driver *drv; 99720 struct mutex drv_mutex; 99721 struct device dev; 99722 struct list_head node; 99723 struct mutex *ps2_cmd_mutex; 99724 }; 99725 99726 struct serio_driver { 99727 const char *description; 99728 const struct serio_device_id *id_table; 99729 bool manual_bind; 99730 void (*write_wakeup)(struct serio *); 99731 irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int); 99732 int (*connect)(struct serio *, struct serio_driver *); 99733 int (*reconnect)(struct serio *); 99734 int (*fast_reconnect)(struct serio *); 99735 void (*disconnect)(struct serio *); 99736 void (*cleanup)(struct serio *); 99737 struct device_driver driver; 99738 }; 99739 99740 enum serio_event_type { 99741 SERIO_RESCAN_PORT = 0, 99742 SERIO_RECONNECT_PORT = 1, 99743 SERIO_RECONNECT_SUBTREE = 2, 99744 SERIO_REGISTER_PORT = 3, 99745 SERIO_ATTACH_DRIVER = 4, 99746 }; 99747 99748 struct serio_event { 99749 enum serio_event_type type; 99750 void *object; 99751 struct module *owner; 99752 struct list_head node; 99753 }; 99754 99755 enum i8042_controller_reset_mode { 99756 I8042_RESET_NEVER = 0, 99757 I8042_RESET_ALWAYS = 1, 99758 I8042_RESET_ON_S2RAM = 2, 99759 }; 99760 99761 struct i8042_port { 99762 struct serio *serio; 99763 int irq; 99764 bool exists; 99765 bool driver_bound; 99766 signed char mux; 99767 }; 99768 99769 struct serport___2 { 99770 struct tty_struct *tty; 99771 wait_queue_head_t wait; 99772 struct serio *serio; 99773 struct serio_device_id id; 99774 spinlock_t lock; 99775 long unsigned int flags; 99776 }; 99777 99778 struct ps2dev { 99779 struct serio *serio; 99780 struct mutex cmd_mutex; 99781 wait_queue_head_t wait; 99782 long unsigned int flags; 99783 u8 cmdbuf[8]; 99784 u8 cmdcnt; 99785 u8 nak; 99786 }; 99787 99788 struct input_mt_slot { 99789 int abs[14]; 99790 unsigned int frame; 99791 unsigned int key; 99792 }; 99793 99794 struct input_mt { 99795 int trkid; 99796 int num_slots; 99797 int slot; 99798 unsigned int flags; 99799 unsigned int frame; 99800 int *red; 99801 struct input_mt_slot slots[0]; 99802 }; 99803 99804 union input_seq_state { 99805 struct { 99806 short unsigned int pos; 99807 bool mutex_acquired; 99808 }; 99809 void *p; 99810 }; 99811 99812 struct input_devres { 99813 struct input_dev *input; 99814 }; 99815 99816 struct input_event { 99817 __kernel_ulong_t __sec; 99818 __kernel_ulong_t __usec; 99819 __u16 type; 99820 __u16 code; 99821 __s32 value; 99822 }; 99823 99824 struct input_event_compat { 99825 compat_ulong_t sec; 99826 compat_ulong_t usec; 99827 __u16 type; 99828 __u16 code; 99829 __s32 value; 99830 }; 99831 99832 struct ff_periodic_effect_compat { 99833 __u16 waveform; 99834 __u16 period; 99835 __s16 magnitude; 99836 __s16 offset; 99837 __u16 phase; 99838 struct ff_envelope envelope; 99839 __u32 custom_len; 99840 compat_uptr_t custom_data; 99841 }; 99842 99843 struct ff_effect_compat { 99844 __u16 type; 99845 __s16 id; 99846 __u16 direction; 99847 struct ff_trigger trigger; 99848 struct ff_replay replay; 99849 union { 99850 struct ff_constant_effect constant; 99851 struct ff_ramp_effect ramp; 99852 struct ff_periodic_effect_compat periodic; 99853 struct ff_condition_effect condition[2]; 99854 struct ff_rumble_effect rumble; 99855 } u; 99856 }; 99857 99858 struct input_mt_pos { 99859 s16 x; 99860 s16 y; 99861 }; 99862 99863 struct input_dev_poller { 99864 void (*poll)(struct input_dev *); 99865 unsigned int poll_interval; 99866 unsigned int poll_interval_max; 99867 unsigned int poll_interval_min; 99868 struct input_dev *input; 99869 struct delayed_work work; 99870 }; 99871 99872 struct led_init_data { 99873 struct fwnode_handle *fwnode; 99874 const char *default_label; 99875 const char *devicename; 99876 bool devname_mandatory; 99877 }; 99878 99879 struct input_led { 99880 struct led_classdev cdev; 99881 struct input_handle *handle; 99882 unsigned int code; 99883 }; 99884 99885 struct input_leds { 99886 struct input_handle handle; 99887 unsigned int num_leds; 99888 struct input_led leds[0]; 99889 }; 99890 99891 struct mousedev_hw_data { 99892 int dx; 99893 int dy; 99894 int dz; 99895 int x; 99896 int y; 99897 int abs_event; 99898 long unsigned int buttons; 99899 }; 99900 99901 struct mousedev { 99902 int open; 99903 struct input_handle handle; 99904 wait_queue_head_t wait; 99905 struct list_head client_list; 99906 spinlock_t client_lock; 99907 struct mutex mutex; 99908 struct device dev; 99909 struct cdev cdev; 99910 bool exist; 99911 struct list_head mixdev_node; 99912 bool opened_by_mixdev; 99913 struct mousedev_hw_data packet; 99914 unsigned int pkt_count; 99915 int old_x[4]; 99916 int old_y[4]; 99917 int frac_dx; 99918 int frac_dy; 99919 long unsigned int touch; 99920 int (*open_device)(struct mousedev *); 99921 void (*close_device)(struct mousedev *); 99922 }; 99923 99924 enum mousedev_emul { 99925 MOUSEDEV_EMUL_PS2 = 0, 99926 MOUSEDEV_EMUL_IMPS = 1, 99927 MOUSEDEV_EMUL_EXPS = 2, 99928 }; 99929 99930 struct mousedev_motion { 99931 int dx; 99932 int dy; 99933 int dz; 99934 long unsigned int buttons; 99935 }; 99936 99937 struct mousedev_client { 99938 struct fasync_struct *fasync; 99939 struct mousedev *mousedev; 99940 struct list_head node; 99941 struct mousedev_motion packets[16]; 99942 unsigned int head; 99943 unsigned int tail; 99944 spinlock_t packet_lock; 99945 int pos_x; 99946 int pos_y; 99947 u8 ps2[6]; 99948 unsigned char ready; 99949 unsigned char buffer; 99950 unsigned char bufsiz; 99951 unsigned char imexseq; 99952 unsigned char impsseq; 99953 enum mousedev_emul mode; 99954 long unsigned int last_buttons; 99955 }; 99956 99957 enum { 99958 FRACTION_DENOM = 128, 99959 }; 99960 99961 struct input_mask { 99962 __u32 type; 99963 __u32 codes_size; 99964 __u64 codes_ptr; 99965 }; 99966 99967 struct evdev_client; 99968 99969 struct evdev { 99970 int open; 99971 struct input_handle handle; 99972 struct evdev_client *grab; 99973 struct list_head client_list; 99974 spinlock_t client_lock; 99975 struct mutex mutex; 99976 struct device dev; 99977 struct cdev cdev; 99978 bool exist; 99979 }; 99980 99981 struct evdev_client { 99982 unsigned int head; 99983 unsigned int tail; 99984 unsigned int packet_head; 99985 spinlock_t buffer_lock; 99986 wait_queue_head_t wait; 99987 struct fasync_struct *fasync; 99988 struct evdev *evdev; 99989 struct list_head node; 99990 enum input_clock_type clk_type; 99991 bool revoked; 99992 long unsigned int *evmasks[32]; 99993 unsigned int bufsize; 99994 struct input_event buffer[0]; 99995 }; 99996 99997 struct atkbd { 99998 struct ps2dev ps2dev; 99999 struct input_dev *dev; 100000 char name[64]; 100001 char phys[32]; 100002 short unsigned int id; 100003 short unsigned int keycode[512]; 100004 long unsigned int force_release_mask[8]; 100005 unsigned char set; 100006 bool translated; 100007 bool extra; 100008 bool write; 100009 bool softrepeat; 100010 bool softraw; 100011 bool scroll; 100012 bool enabled; 100013 unsigned char emul; 100014 bool resend; 100015 bool release; 100016 long unsigned int xl_bit; 100017 unsigned int last; 100018 long unsigned int time; 100019 long unsigned int err_count; 100020 struct delayed_work event_work; 100021 long unsigned int event_jiffies; 100022 long unsigned int event_mask; 100023 struct mutex mutex; 100024 u32 function_row_physmap[24]; 100025 int num_function_row_keys; 100026 }; 100027 100028 enum psmouse_state { 100029 PSMOUSE_IGNORE = 0, 100030 PSMOUSE_INITIALIZING = 1, 100031 PSMOUSE_RESYNCING = 2, 100032 PSMOUSE_CMD_MODE = 3, 100033 PSMOUSE_ACTIVATED = 4, 100034 }; 100035 100036 typedef enum { 100037 PSMOUSE_BAD_DATA = 0, 100038 PSMOUSE_GOOD_DATA = 1, 100039 PSMOUSE_FULL_PACKET = 2, 100040 } psmouse_ret_t; 100041 100042 enum psmouse_scale { 100043 PSMOUSE_SCALE11 = 0, 100044 PSMOUSE_SCALE21 = 1, 100045 }; 100046 100047 enum psmouse_type { 100048 PSMOUSE_NONE = 0, 100049 PSMOUSE_PS2 = 1, 100050 PSMOUSE_PS2PP = 2, 100051 PSMOUSE_THINKPS = 3, 100052 PSMOUSE_GENPS = 4, 100053 PSMOUSE_IMPS = 5, 100054 PSMOUSE_IMEX = 6, 100055 PSMOUSE_SYNAPTICS = 7, 100056 PSMOUSE_ALPS = 8, 100057 PSMOUSE_LIFEBOOK = 9, 100058 PSMOUSE_TRACKPOINT = 10, 100059 PSMOUSE_TOUCHKIT_PS2 = 11, 100060 PSMOUSE_CORTRON = 12, 100061 PSMOUSE_HGPK = 13, 100062 PSMOUSE_ELANTECH = 14, 100063 PSMOUSE_FSP = 15, 100064 PSMOUSE_SYNAPTICS_RELATIVE = 16, 100065 PSMOUSE_CYPRESS = 17, 100066 PSMOUSE_FOCALTECH = 18, 100067 PSMOUSE_VMMOUSE = 19, 100068 PSMOUSE_BYD = 20, 100069 PSMOUSE_SYNAPTICS_SMBUS = 21, 100070 PSMOUSE_ELANTECH_SMBUS = 22, 100071 PSMOUSE_AUTO = 23, 100072 }; 100073 100074 struct psmouse; 100075 100076 struct psmouse_protocol { 100077 enum psmouse_type type; 100078 bool maxproto; 100079 bool ignore_parity; 100080 bool try_passthru; 100081 bool smbus_companion; 100082 const char *name; 100083 const char *alias; 100084 int (*detect)(struct psmouse *, bool); 100085 int (*init)(struct psmouse *); 100086 }; 100087 100088 struct psmouse { 100089 void *private; 100090 struct input_dev *dev; 100091 struct ps2dev ps2dev; 100092 struct delayed_work resync_work; 100093 const char *vendor; 100094 const char *name; 100095 const struct psmouse_protocol *protocol; 100096 unsigned char packet[8]; 100097 unsigned char badbyte; 100098 unsigned char pktcnt; 100099 unsigned char pktsize; 100100 unsigned char oob_data_type; 100101 unsigned char extra_buttons; 100102 bool acks_disable_command; 100103 unsigned int model; 100104 long unsigned int last; 100105 long unsigned int out_of_sync_cnt; 100106 long unsigned int num_resyncs; 100107 enum psmouse_state state; 100108 char devname[64]; 100109 char phys[32]; 100110 unsigned int rate; 100111 unsigned int resolution; 100112 unsigned int resetafter; 100113 unsigned int resync_time; 100114 bool smartscroll; 100115 psmouse_ret_t (*protocol_handler)(struct psmouse *); 100116 void (*set_rate)(struct psmouse *, unsigned int); 100117 void (*set_resolution)(struct psmouse *, unsigned int); 100118 void (*set_scale)(struct psmouse *, enum psmouse_scale); 100119 int (*reconnect)(struct psmouse *); 100120 int (*fast_reconnect)(struct psmouse *); 100121 void (*disconnect)(struct psmouse *); 100122 void (*cleanup)(struct psmouse *); 100123 int (*poll)(struct psmouse *); 100124 void (*pt_activate)(struct psmouse *); 100125 void (*pt_deactivate)(struct psmouse *); 100126 }; 100127 100128 struct psmouse_attribute { 100129 struct device_attribute dattr; 100130 void *data; 100131 ssize_t (*show)(struct psmouse *, void *, char *); 100132 ssize_t (*set)(struct psmouse *, void *, const char *, size_t); 100133 bool protect; 100134 }; 100135 100136 struct rmi_2d_axis_alignment { 100137 bool swap_axes; 100138 bool flip_x; 100139 bool flip_y; 100140 u16 clip_x_low; 100141 u16 clip_y_low; 100142 u16 clip_x_high; 100143 u16 clip_y_high; 100144 u16 offset_x; 100145 u16 offset_y; 100146 u8 delta_x_threshold; 100147 u8 delta_y_threshold; 100148 }; 100149 100150 enum rmi_sensor_type { 100151 rmi_sensor_default = 0, 100152 rmi_sensor_touchscreen = 1, 100153 rmi_sensor_touchpad = 2, 100154 }; 100155 100156 struct rmi_2d_sensor_platform_data { 100157 struct rmi_2d_axis_alignment axis_align; 100158 enum rmi_sensor_type sensor_type; 100159 int x_mm; 100160 int y_mm; 100161 int disable_report_mask; 100162 u16 rezero_wait; 100163 bool topbuttonpad; 100164 bool kernel_tracking; 100165 int dmax; 100166 int dribble; 100167 int palm_detect; 100168 }; 100169 100170 struct rmi_gpio_data { 100171 bool buttonpad; 100172 bool trackstick_buttons; 100173 bool disable; 100174 }; 100175 100176 enum rmi_reg_state { 100177 RMI_REG_STATE_DEFAULT = 0, 100178 RMI_REG_STATE_OFF = 1, 100179 RMI_REG_STATE_ON = 2, 100180 }; 100181 100182 struct rmi_f01_power_management { 100183 enum rmi_reg_state nosleep; 100184 u8 wakeup_threshold; 100185 u8 doze_holdoff; 100186 u8 doze_interval; 100187 }; 100188 100189 struct rmi_device_platform_data_spi { 100190 u32 block_delay_us; 100191 u32 split_read_block_delay_us; 100192 u32 read_delay_us; 100193 u32 write_delay_us; 100194 u32 split_read_byte_delay_us; 100195 u32 pre_delay_us; 100196 u32 post_delay_us; 100197 u8 bits_per_word; 100198 u16 mode; 100199 void *cs_assert_data; 100200 int (*cs_assert)(const void *, const bool); 100201 }; 100202 100203 struct rmi_device_platform_data { 100204 int reset_delay_ms; 100205 int irq; 100206 struct rmi_device_platform_data_spi spi_data; 100207 struct rmi_2d_sensor_platform_data sensor_pdata; 100208 struct rmi_f01_power_management power_management; 100209 struct rmi_gpio_data gpio_data; 100210 }; 100211 100212 enum synaptics_pkt_type { 100213 SYN_NEWABS = 0, 100214 SYN_NEWABS_STRICT = 1, 100215 SYN_NEWABS_RELAXED = 2, 100216 SYN_OLDABS = 3, 100217 }; 100218 100219 struct synaptics_hw_state { 100220 int x; 100221 int y; 100222 int z; 100223 int w; 100224 unsigned int left: 1; 100225 unsigned int right: 1; 100226 unsigned int middle: 1; 100227 unsigned int up: 1; 100228 unsigned int down: 1; 100229 u8 ext_buttons; 100230 s8 scroll; 100231 }; 100232 100233 struct synaptics_device_info { 100234 u32 model_id; 100235 u32 firmware_id; 100236 u32 board_id; 100237 u32 capabilities; 100238 u32 ext_cap; 100239 u32 ext_cap_0c; 100240 u32 ext_cap_10; 100241 u32 identity; 100242 u32 x_res; 100243 u32 y_res; 100244 u32 x_max; 100245 u32 y_max; 100246 u32 x_min; 100247 u32 y_min; 100248 }; 100249 100250 struct synaptics_data { 100251 struct synaptics_device_info info; 100252 enum synaptics_pkt_type pkt_type; 100253 u8 mode; 100254 int scroll; 100255 bool absolute_mode; 100256 bool disable_gesture; 100257 struct serio *pt_port; 100258 struct synaptics_hw_state agm; 100259 unsigned int agm_count; 100260 long unsigned int press_start; 100261 bool press; 100262 bool report_press; 100263 bool is_forcepad; 100264 }; 100265 100266 struct min_max_quirk { 100267 const char * const *pnp_ids; 100268 struct { 100269 u32 min; 100270 u32 max; 100271 } board_id; 100272 u32 x_min; 100273 u32 x_max; 100274 u32 y_min; 100275 u32 y_max; 100276 }; 100277 100278 enum { 100279 SYNAPTICS_INTERTOUCH_NOT_SET = 4294967295, 100280 SYNAPTICS_INTERTOUCH_OFF = 0, 100281 SYNAPTICS_INTERTOUCH_ON = 1, 100282 }; 100283 100284 struct focaltech_finger_state { 100285 bool active; 100286 bool valid; 100287 unsigned int x; 100288 unsigned int y; 100289 }; 100290 100291 struct focaltech_hw_state { 100292 struct focaltech_finger_state fingers[5]; 100293 unsigned int width; 100294 bool pressed; 100295 }; 100296 100297 struct focaltech_data { 100298 unsigned int x_max; 100299 unsigned int y_max; 100300 struct focaltech_hw_state state; 100301 }; 100302 100303 enum SS4_PACKET_ID { 100304 SS4_PACKET_ID_IDLE = 0, 100305 SS4_PACKET_ID_ONE = 1, 100306 SS4_PACKET_ID_TWO = 2, 100307 SS4_PACKET_ID_MULTI = 3, 100308 SS4_PACKET_ID_STICK = 4, 100309 }; 100310 100311 enum V7_PACKET_ID { 100312 V7_PACKET_ID_IDLE = 0, 100313 V7_PACKET_ID_TWO = 1, 100314 V7_PACKET_ID_MULTI = 2, 100315 V7_PACKET_ID_NEW = 3, 100316 V7_PACKET_ID_UNKNOWN = 4, 100317 }; 100318 100319 struct alps_protocol_info { 100320 u16 version; 100321 u8 byte0; 100322 u8 mask0; 100323 unsigned int flags; 100324 }; 100325 100326 struct alps_model_info { 100327 u8 signature[3]; 100328 struct alps_protocol_info protocol_info; 100329 }; 100330 100331 struct alps_nibble_commands { 100332 int command; 100333 unsigned char data; 100334 }; 100335 100336 struct alps_bitmap_point { 100337 int start_bit; 100338 int num_bits; 100339 }; 100340 100341 struct alps_fields { 100342 unsigned int x_map; 100343 unsigned int y_map; 100344 unsigned int fingers; 100345 int pressure; 100346 struct input_mt_pos st; 100347 struct input_mt_pos mt[4]; 100348 unsigned int first_mp: 1; 100349 unsigned int is_mp: 1; 100350 unsigned int left: 1; 100351 unsigned int right: 1; 100352 unsigned int middle: 1; 100353 unsigned int ts_left: 1; 100354 unsigned int ts_right: 1; 100355 unsigned int ts_middle: 1; 100356 }; 100357 100358 struct alps_data { 100359 struct psmouse *psmouse; 100360 struct input_dev *dev2; 100361 struct input_dev *dev3; 100362 char phys2[32]; 100363 char phys3[32]; 100364 struct delayed_work dev3_register_work; 100365 const struct alps_nibble_commands *nibble_commands; 100366 int addr_command; 100367 u16 proto_version; 100368 u8 byte0; 100369 u8 mask0; 100370 u8 dev_id[3]; 100371 u8 fw_ver[3]; 100372 int flags; 100373 int x_max; 100374 int y_max; 100375 int x_bits; 100376 int y_bits; 100377 unsigned int x_res; 100378 unsigned int y_res; 100379 int (*hw_init)(struct psmouse *); 100380 void (*process_packet)(struct psmouse *); 100381 int (*decode_fields)(struct alps_fields *, unsigned char *, struct psmouse *); 100382 void (*set_abs_params)(struct alps_data *, struct input_dev *); 100383 int prev_fin; 100384 int multi_packet; 100385 int second_touch; 100386 unsigned char multi_data[6]; 100387 struct alps_fields f; 100388 u8 quirks; 100389 struct timer_list timer; 100390 }; 100391 100392 struct byd_data { 100393 struct timer_list timer; 100394 struct psmouse *psmouse; 100395 s32 abs_x; 100396 s32 abs_y; 100397 volatile long unsigned int last_touch_time; 100398 bool btn_left; 100399 bool btn_right; 100400 bool touch; 100401 }; 100402 100403 struct finger_pos { 100404 unsigned int x; 100405 unsigned int y; 100406 }; 100407 100408 struct elantech_device_info { 100409 unsigned char capabilities[3]; 100410 unsigned char samples[3]; 100411 unsigned char debug; 100412 unsigned char hw_version; 100413 unsigned char pattern; 100414 unsigned int fw_version; 100415 unsigned int ic_version; 100416 unsigned int product_id; 100417 unsigned int x_min; 100418 unsigned int y_min; 100419 unsigned int x_max; 100420 unsigned int y_max; 100421 unsigned int x_res; 100422 unsigned int y_res; 100423 unsigned int x_traces; 100424 unsigned int y_traces; 100425 unsigned int width; 100426 unsigned int bus; 100427 bool paritycheck; 100428 bool jumpy_cursor; 100429 bool reports_pressure; 100430 bool crc_enabled; 100431 bool set_hw_resolution; 100432 bool has_trackpoint; 100433 bool has_middle_button; 100434 int (*send_cmd)(struct psmouse *, unsigned char, unsigned char *); 100435 }; 100436 100437 struct elantech_data { 100438 struct input_dev *tp_dev; 100439 char tp_phys[32]; 100440 unsigned char reg_07; 100441 unsigned char reg_10; 100442 unsigned char reg_11; 100443 unsigned char reg_20; 100444 unsigned char reg_21; 100445 unsigned char reg_22; 100446 unsigned char reg_23; 100447 unsigned char reg_24; 100448 unsigned char reg_25; 100449 unsigned char reg_26; 100450 unsigned int single_finger_reports; 100451 unsigned int y_max; 100452 unsigned int width; 100453 struct finger_pos mt[5]; 100454 unsigned char parity[256]; 100455 struct elantech_device_info info; 100456 void (*original_set_rate)(struct psmouse *, unsigned int); 100457 }; 100458 100459 struct elantech_attr_data { 100460 size_t field_offset; 100461 unsigned char reg; 100462 }; 100463 100464 enum { 100465 ELANTECH_SMBUS_NOT_SET = 4294967295, 100466 ELANTECH_SMBUS_OFF = 0, 100467 ELANTECH_SMBUS_ON = 1, 100468 }; 100469 100470 struct ps2pp_info { 100471 u8 model; 100472 u8 kind; 100473 u16 features; 100474 }; 100475 100476 struct lifebook_data { 100477 struct input_dev *dev2; 100478 char phys[32]; 100479 }; 100480 100481 struct fsp_data { 100482 unsigned char ver; 100483 unsigned char rev; 100484 unsigned int buttons; 100485 unsigned int flags; 100486 bool vscroll; 100487 bool hscroll; 100488 unsigned char last_reg; 100489 unsigned char last_val; 100490 unsigned int last_mt_fgr; 100491 }; 100492 100493 struct trackpoint_data { 100494 u8 variant_id; 100495 u8 firmware_id; 100496 u8 sensitivity; 100497 u8 speed; 100498 u8 inertia; 100499 u8 reach; 100500 u8 draghys; 100501 u8 mindrag; 100502 u8 thresh; 100503 u8 upthresh; 100504 u8 ztime; 100505 u8 jenks; 100506 u8 drift_time; 100507 bool press_to_select; 100508 bool skipback; 100509 bool ext_dev; 100510 }; 100511 100512 struct trackpoint_attr_data { 100513 size_t field_offset; 100514 u8 command; 100515 u8 mask; 100516 bool inverted; 100517 u8 power_on_default; 100518 }; 100519 100520 struct cytp_contact { 100521 int x; 100522 int y; 100523 int z; 100524 }; 100525 100526 struct cytp_report_data { 100527 int contact_cnt; 100528 struct cytp_contact contacts[2]; 100529 unsigned int left: 1; 100530 unsigned int right: 1; 100531 unsigned int middle: 1; 100532 unsigned int tap: 1; 100533 }; 100534 100535 struct cytp_data { 100536 int fw_version; 100537 int pkt_size; 100538 int mode; 100539 int tp_min_pressure; 100540 int tp_max_pressure; 100541 int tp_width; 100542 int tp_high; 100543 int tp_max_abs_x; 100544 int tp_max_abs_y; 100545 int tp_res_x; 100546 int tp_res_y; 100547 int tp_metrics_supported; 100548 }; 100549 100550 struct vmmouse_data { 100551 struct input_dev *abs_dev; 100552 char phys[32]; 100553 char dev_name[128]; 100554 }; 100555 100556 struct psmouse_smbus_dev { 100557 struct i2c_board_info board; 100558 struct psmouse *psmouse; 100559 struct i2c_client *client; 100560 struct list_head node; 100561 bool dead; 100562 bool need_deactivate; 100563 }; 100564 100565 struct psmouse_smbus_removal_work { 100566 struct work_struct work; 100567 struct i2c_client *client; 100568 }; 100569 100570 struct touchscreen_properties { 100571 unsigned int max_x; 100572 unsigned int max_y; 100573 bool invert_x; 100574 bool invert_y; 100575 bool swap_x_y; 100576 }; 100577 100578 struct trace_event_raw_rtc_time_alarm_class { 100579 struct trace_entry ent; 100580 time64_t secs; 100581 int err; 100582 char __data[0]; 100583 }; 100584 100585 struct trace_event_raw_rtc_irq_set_freq { 100586 struct trace_entry ent; 100587 int freq; 100588 int err; 100589 char __data[0]; 100590 }; 100591 100592 struct trace_event_raw_rtc_irq_set_state { 100593 struct trace_entry ent; 100594 int enabled; 100595 int err; 100596 char __data[0]; 100597 }; 100598 100599 struct trace_event_raw_rtc_alarm_irq_enable { 100600 struct trace_entry ent; 100601 unsigned int enabled; 100602 int err; 100603 char __data[0]; 100604 }; 100605 100606 struct trace_event_raw_rtc_offset_class { 100607 struct trace_entry ent; 100608 long int offset; 100609 int err; 100610 char __data[0]; 100611 }; 100612 100613 struct trace_event_raw_rtc_timer_class { 100614 struct trace_entry ent; 100615 struct rtc_timer *timer; 100616 ktime_t expires; 100617 ktime_t period; 100618 char __data[0]; 100619 }; 100620 100621 struct trace_event_data_offsets_rtc_time_alarm_class {}; 100622 100623 struct trace_event_data_offsets_rtc_irq_set_freq {}; 100624 100625 struct trace_event_data_offsets_rtc_irq_set_state {}; 100626 100627 struct trace_event_data_offsets_rtc_alarm_irq_enable {}; 100628 100629 struct trace_event_data_offsets_rtc_offset_class {}; 100630 100631 struct trace_event_data_offsets_rtc_timer_class {}; 100632 100633 typedef void (*btf_trace_rtc_set_time)(void *, time64_t, int); 100634 100635 typedef void (*btf_trace_rtc_read_time)(void *, time64_t, int); 100636 100637 typedef void (*btf_trace_rtc_set_alarm)(void *, time64_t, int); 100638 100639 typedef void (*btf_trace_rtc_read_alarm)(void *, time64_t, int); 100640 100641 typedef void (*btf_trace_rtc_irq_set_freq)(void *, int, int); 100642 100643 typedef void (*btf_trace_rtc_irq_set_state)(void *, int, int); 100644 100645 typedef void (*btf_trace_rtc_alarm_irq_enable)(void *, unsigned int, int); 100646 100647 typedef void (*btf_trace_rtc_set_offset)(void *, long int, int); 100648 100649 typedef void (*btf_trace_rtc_read_offset)(void *, long int, int); 100650 100651 typedef void (*btf_trace_rtc_timer_enqueue)(void *, struct rtc_timer *); 100652 100653 typedef void (*btf_trace_rtc_timer_dequeue)(void *, struct rtc_timer *); 100654 100655 typedef void (*btf_trace_rtc_timer_fired)(void *, struct rtc_timer *); 100656 100657 enum { 100658 none = 0, 100659 day = 1, 100660 month = 2, 100661 year = 3, 100662 }; 100663 100664 struct nvmem_cell_info { 100665 const char *name; 100666 unsigned int offset; 100667 unsigned int bytes; 100668 unsigned int bit_offset; 100669 unsigned int nbits; 100670 }; 100671 100672 typedef int (*nvmem_reg_read_t)(void *, unsigned int, void *, size_t); 100673 100674 typedef int (*nvmem_reg_write_t)(void *, unsigned int, void *, size_t); 100675 100676 enum nvmem_type { 100677 NVMEM_TYPE_UNKNOWN = 0, 100678 NVMEM_TYPE_EEPROM = 1, 100679 NVMEM_TYPE_OTP = 2, 100680 NVMEM_TYPE_BATTERY_BACKED = 3, 100681 }; 100682 100683 struct nvmem_keepout { 100684 unsigned int start; 100685 unsigned int end; 100686 unsigned char value; 100687 }; 100688 100689 struct nvmem_config { 100690 struct device *dev; 100691 const char *name; 100692 int id; 100693 struct module *owner; 100694 struct gpio_desc___2 *wp_gpio; 100695 const struct nvmem_cell_info *cells; 100696 int ncells; 100697 const struct nvmem_keepout *keepout; 100698 unsigned int nkeepout; 100699 enum nvmem_type type; 100700 bool read_only; 100701 bool root_only; 100702 bool no_of_node; 100703 nvmem_reg_read_t reg_read; 100704 nvmem_reg_write_t reg_write; 100705 int size; 100706 int word_size; 100707 int stride; 100708 void *priv; 100709 bool compat; 100710 struct device *base_dev; 100711 }; 100712 100713 struct nvmem_device; 100714 100715 struct cmos_rtc_board_info { 100716 void (*wake_on)(struct device *); 100717 void (*wake_off)(struct device *); 100718 u32 flags; 100719 int address_space; 100720 u8 rtc_day_alarm; 100721 u8 rtc_mon_alarm; 100722 u8 rtc_century; 100723 }; 100724 100725 struct cmos_rtc { 100726 struct rtc_device *rtc; 100727 struct device *dev; 100728 int irq; 100729 struct resource *iomem; 100730 time64_t alarm_expires; 100731 void (*wake_on)(struct device *); 100732 void (*wake_off)(struct device *); 100733 u8 enabled_wake; 100734 u8 suspend_ctrl; 100735 u8 day_alrm; 100736 u8 mon_alrm; 100737 u8 century; 100738 struct rtc_wkalrm saved_wkalrm; 100739 }; 100740 100741 struct i2c_devinfo { 100742 struct list_head list; 100743 int busnum; 100744 struct i2c_board_info board_info; 100745 }; 100746 100747 struct i2c_device_identity { 100748 u16 manufacturer_id; 100749 u16 part_id; 100750 u8 die_revision; 100751 }; 100752 100753 struct i2c_timings { 100754 u32 bus_freq_hz; 100755 u32 scl_rise_ns; 100756 u32 scl_fall_ns; 100757 u32 scl_int_delay_ns; 100758 u32 sda_fall_ns; 100759 u32 sda_hold_ns; 100760 u32 digital_filter_width_ns; 100761 u32 analog_filter_cutoff_freq_hz; 100762 }; 100763 100764 struct trace_event_raw_i2c_write { 100765 struct trace_entry ent; 100766 int adapter_nr; 100767 __u16 msg_nr; 100768 __u16 addr; 100769 __u16 flags; 100770 __u16 len; 100771 u32 __data_loc_buf; 100772 char __data[0]; 100773 }; 100774 100775 struct trace_event_raw_i2c_read { 100776 struct trace_entry ent; 100777 int adapter_nr; 100778 __u16 msg_nr; 100779 __u16 addr; 100780 __u16 flags; 100781 __u16 len; 100782 char __data[0]; 100783 }; 100784 100785 struct trace_event_raw_i2c_reply { 100786 struct trace_entry ent; 100787 int adapter_nr; 100788 __u16 msg_nr; 100789 __u16 addr; 100790 __u16 flags; 100791 __u16 len; 100792 u32 __data_loc_buf; 100793 char __data[0]; 100794 }; 100795 100796 struct trace_event_raw_i2c_result { 100797 struct trace_entry ent; 100798 int adapter_nr; 100799 __u16 nr_msgs; 100800 __s16 ret; 100801 char __data[0]; 100802 }; 100803 100804 struct trace_event_data_offsets_i2c_write { 100805 u32 buf; 100806 }; 100807 100808 struct trace_event_data_offsets_i2c_read {}; 100809 100810 struct trace_event_data_offsets_i2c_reply { 100811 u32 buf; 100812 }; 100813 100814 struct trace_event_data_offsets_i2c_result {}; 100815 100816 typedef void (*btf_trace_i2c_write)(void *, const struct i2c_adapter *, const struct i2c_msg *, int); 100817 100818 typedef void (*btf_trace_i2c_read)(void *, const struct i2c_adapter *, const struct i2c_msg *, int); 100819 100820 typedef void (*btf_trace_i2c_reply)(void *, const struct i2c_adapter *, const struct i2c_msg *, int); 100821 100822 typedef void (*btf_trace_i2c_result)(void *, const struct i2c_adapter *, int, int); 100823 100824 struct i2c_dummy_devres { 100825 struct i2c_client *client; 100826 }; 100827 100828 struct class_compat___2; 100829 100830 struct i2c_cmd_arg { 100831 unsigned int cmd; 100832 void *arg; 100833 }; 100834 100835 struct i2c_smbus_alert_setup { 100836 int irq; 100837 }; 100838 100839 struct trace_event_raw_smbus_write { 100840 struct trace_entry ent; 100841 int adapter_nr; 100842 __u16 addr; 100843 __u16 flags; 100844 __u8 command; 100845 __u8 len; 100846 __u32 protocol; 100847 __u8 buf[34]; 100848 char __data[0]; 100849 }; 100850 100851 struct trace_event_raw_smbus_read { 100852 struct trace_entry ent; 100853 int adapter_nr; 100854 __u16 flags; 100855 __u16 addr; 100856 __u8 command; 100857 __u32 protocol; 100858 __u8 buf[34]; 100859 char __data[0]; 100860 }; 100861 100862 struct trace_event_raw_smbus_reply { 100863 struct trace_entry ent; 100864 int adapter_nr; 100865 __u16 addr; 100866 __u16 flags; 100867 __u8 command; 100868 __u8 len; 100869 __u32 protocol; 100870 __u8 buf[34]; 100871 char __data[0]; 100872 }; 100873 100874 struct trace_event_raw_smbus_result { 100875 struct trace_entry ent; 100876 int adapter_nr; 100877 __u16 addr; 100878 __u16 flags; 100879 __u8 read_write; 100880 __u8 command; 100881 __s16 res; 100882 __u32 protocol; 100883 char __data[0]; 100884 }; 100885 100886 struct trace_event_data_offsets_smbus_write {}; 100887 100888 struct trace_event_data_offsets_smbus_read {}; 100889 100890 struct trace_event_data_offsets_smbus_reply {}; 100891 100892 struct trace_event_data_offsets_smbus_result {}; 100893 100894 typedef void (*btf_trace_smbus_write)(void *, const struct i2c_adapter *, u16, short unsigned int, char, u8, int, const union i2c_smbus_data *); 100895 100896 typedef void (*btf_trace_smbus_read)(void *, const struct i2c_adapter *, u16, short unsigned int, char, u8, int); 100897 100898 typedef void (*btf_trace_smbus_reply)(void *, const struct i2c_adapter *, u16, short unsigned int, char, u8, int, const union i2c_smbus_data *, int); 100899 100900 typedef void (*btf_trace_smbus_result)(void *, const struct i2c_adapter *, u16, short unsigned int, char, u8, int, int); 100901 100902 struct i2c_acpi_handler_data { 100903 struct acpi_connection_info info; 100904 struct i2c_adapter *adapter; 100905 }; 100906 100907 struct gsb_buffer { 100908 u8 status; 100909 u8 len; 100910 union { 100911 u16 wdata; 100912 u8 bdata; 100913 u8 data[0]; 100914 }; 100915 }; 100916 100917 struct i2c_acpi_lookup { 100918 struct i2c_board_info *info; 100919 acpi_handle adapter_handle; 100920 acpi_handle device_handle; 100921 acpi_handle search_handle; 100922 int n; 100923 int index; 100924 u32 speed; 100925 u32 min_speed; 100926 u32 force_speed; 100927 }; 100928 100929 struct dw_i2c_dev { 100930 struct device *dev; 100931 struct regmap *map; 100932 struct regmap *sysmap; 100933 void *base; 100934 void *ext; 100935 struct completion cmd_complete; 100936 struct clk *clk; 100937 struct clk *pclk; 100938 struct reset_control___2 *rst; 100939 struct i2c_client *slave; 100940 u32 (*get_clk_rate_khz)(struct dw_i2c_dev *); 100941 int cmd_err; 100942 struct i2c_msg *msgs; 100943 int msgs_num; 100944 int msg_write_idx; 100945 u32 tx_buf_len; 100946 u8 *tx_buf; 100947 int msg_read_idx; 100948 u32 rx_buf_len; 100949 u8 *rx_buf; 100950 int msg_err; 100951 unsigned int status; 100952 u32 abort_source; 100953 int irq; 100954 u32 flags; 100955 struct i2c_adapter adapter; 100956 u32 functionality; 100957 u32 master_cfg; 100958 u32 slave_cfg; 100959 unsigned int tx_fifo_depth; 100960 unsigned int rx_fifo_depth; 100961 int rx_outstanding; 100962 struct i2c_timings timings; 100963 u32 sda_hold_time; 100964 u16 ss_hcnt; 100965 u16 ss_lcnt; 100966 u16 fs_hcnt; 100967 u16 fs_lcnt; 100968 u16 fp_hcnt; 100969 u16 fp_lcnt; 100970 u16 hs_hcnt; 100971 u16 hs_lcnt; 100972 int (*acquire_lock)(); 100973 void (*release_lock)(); 100974 bool shared_with_punit; 100975 void (*disable)(struct dw_i2c_dev *); 100976 void (*disable_int)(struct dw_i2c_dev *); 100977 int (*init)(struct dw_i2c_dev *); 100978 int (*set_sda_hold_time)(struct dw_i2c_dev *); 100979 int mode; 100980 struct i2c_bus_recovery_info rinfo; 100981 bool suspended; 100982 }; 100983 100984 struct dw_i2c_platform_data { 100985 unsigned int i2c_scl_freq; 100986 }; 100987 100988 enum dw_pci_ctl_id_t { 100989 medfield = 0, 100990 merrifield = 1, 100991 baytrail = 2, 100992 cherrytrail = 3, 100993 haswell = 4, 100994 elkhartlake = 5, 100995 }; 100996 100997 struct dw_scl_sda_cfg { 100998 u32 ss_hcnt; 100999 u32 fs_hcnt; 101000 u32 ss_lcnt; 101001 u32 fs_lcnt; 101002 u32 sda_hold; 101003 }; 101004 101005 struct dw_pci_controller { 101006 u32 bus_num; 101007 u32 flags; 101008 struct dw_scl_sda_cfg *scl_sda_cfg; 101009 int (*setup)(struct pci_dev *, struct dw_pci_controller *); 101010 u32 (*get_clk_rate_khz)(struct dw_i2c_dev *); 101011 }; 101012 101013 struct lirc_scancode { 101014 __u64 timestamp; 101015 __u16 flags; 101016 __u16 rc_proto; 101017 __u32 keycode; 101018 __u64 scancode; 101019 }; 101020 101021 enum rc_proto { 101022 RC_PROTO_UNKNOWN = 0, 101023 RC_PROTO_OTHER = 1, 101024 RC_PROTO_RC5 = 2, 101025 RC_PROTO_RC5X_20 = 3, 101026 RC_PROTO_RC5_SZ = 4, 101027 RC_PROTO_JVC = 5, 101028 RC_PROTO_SONY12 = 6, 101029 RC_PROTO_SONY15 = 7, 101030 RC_PROTO_SONY20 = 8, 101031 RC_PROTO_NEC = 9, 101032 RC_PROTO_NECX = 10, 101033 RC_PROTO_NEC32 = 11, 101034 RC_PROTO_SANYO = 12, 101035 RC_PROTO_MCIR2_KBD = 13, 101036 RC_PROTO_MCIR2_MSE = 14, 101037 RC_PROTO_RC6_0 = 15, 101038 RC_PROTO_RC6_6A_20 = 16, 101039 RC_PROTO_RC6_6A_24 = 17, 101040 RC_PROTO_RC6_6A_32 = 18, 101041 RC_PROTO_RC6_MCE = 19, 101042 RC_PROTO_SHARP = 20, 101043 RC_PROTO_XMP = 21, 101044 RC_PROTO_CEC = 22, 101045 RC_PROTO_IMON = 23, 101046 RC_PROTO_RCMM12 = 24, 101047 RC_PROTO_RCMM24 = 25, 101048 RC_PROTO_RCMM32 = 26, 101049 RC_PROTO_XBOX_DVD = 27, 101050 RC_PROTO_MAX = 27, 101051 }; 101052 101053 struct rc_map_table { 101054 u64 scancode; 101055 u32 keycode; 101056 }; 101057 101058 struct rc_map { 101059 struct rc_map_table *scan; 101060 unsigned int size; 101061 unsigned int len; 101062 unsigned int alloc; 101063 enum rc_proto rc_proto; 101064 const char *name; 101065 spinlock_t lock; 101066 }; 101067 101068 struct rc_map_list { 101069 struct list_head list; 101070 struct rc_map map; 101071 }; 101072 101073 enum rc_driver_type { 101074 RC_DRIVER_SCANCODE = 0, 101075 RC_DRIVER_IR_RAW = 1, 101076 RC_DRIVER_IR_RAW_TX = 2, 101077 }; 101078 101079 struct rc_scancode_filter { 101080 u32 data; 101081 u32 mask; 101082 }; 101083 101084 enum rc_filter_type { 101085 RC_FILTER_NORMAL = 0, 101086 RC_FILTER_WAKEUP = 1, 101087 RC_FILTER_MAX = 2, 101088 }; 101089 101090 struct ir_raw_event_ctrl; 101091 101092 struct rc_dev { 101093 struct device dev; 101094 bool managed_alloc; 101095 const struct attribute_group *sysfs_groups[5]; 101096 const char *device_name; 101097 const char *input_phys; 101098 struct input_id input_id; 101099 const char *driver_name; 101100 const char *map_name; 101101 struct rc_map rc_map; 101102 struct mutex lock; 101103 unsigned int minor; 101104 struct ir_raw_event_ctrl *raw; 101105 struct input_dev *input_dev; 101106 enum rc_driver_type driver_type; 101107 bool idle; 101108 bool encode_wakeup; 101109 u64 allowed_protocols; 101110 u64 enabled_protocols; 101111 u64 allowed_wakeup_protocols; 101112 enum rc_proto wakeup_protocol; 101113 struct rc_scancode_filter scancode_filter; 101114 struct rc_scancode_filter scancode_wakeup_filter; 101115 u32 scancode_mask; 101116 u32 users; 101117 void *priv; 101118 spinlock_t keylock; 101119 bool keypressed; 101120 long unsigned int keyup_jiffies; 101121 struct timer_list timer_keyup; 101122 struct timer_list timer_repeat; 101123 u32 last_keycode; 101124 enum rc_proto last_protocol; 101125 u64 last_scancode; 101126 u8 last_toggle; 101127 u32 timeout; 101128 u32 min_timeout; 101129 u32 max_timeout; 101130 u32 rx_resolution; 101131 u32 tx_resolution; 101132 struct device lirc_dev; 101133 struct cdev lirc_cdev; 101134 ktime_t gap_start; 101135 u64 gap_duration; 101136 bool gap; 101137 spinlock_t lirc_fh_lock; 101138 struct list_head lirc_fh; 101139 bool registered; 101140 int (*change_protocol)(struct rc_dev *, u64 *); 101141 int (*open)(struct rc_dev *); 101142 void (*close)(struct rc_dev *); 101143 int (*s_tx_mask)(struct rc_dev *, u32); 101144 int (*s_tx_carrier)(struct rc_dev *, u32); 101145 int (*s_tx_duty_cycle)(struct rc_dev *, u32); 101146 int (*s_rx_carrier_range)(struct rc_dev *, u32, u32); 101147 int (*tx_ir)(struct rc_dev *, unsigned int *, unsigned int); 101148 void (*s_idle)(struct rc_dev *, bool); 101149 int (*s_learning_mode)(struct rc_dev *, int); 101150 int (*s_carrier_report)(struct rc_dev *, int); 101151 int (*s_filter)(struct rc_dev *, struct rc_scancode_filter *); 101152 int (*s_wakeup_filter)(struct rc_dev *, struct rc_scancode_filter *); 101153 int (*s_timeout)(struct rc_dev *, unsigned int); 101154 }; 101155 101156 struct ir_raw_event { 101157 union { 101158 u32 duration; 101159 u32 carrier; 101160 }; 101161 u8 duty_cycle; 101162 unsigned int pulse: 1; 101163 unsigned int reset: 1; 101164 unsigned int timeout: 1; 101165 unsigned int carrier_report: 1; 101166 }; 101167 101168 struct nec_dec { 101169 int state; 101170 unsigned int count; 101171 u32 bits; 101172 bool is_nec_x; 101173 bool necx_repeat; 101174 }; 101175 101176 struct rc5_dec { 101177 int state; 101178 u32 bits; 101179 unsigned int count; 101180 bool is_rc5x; 101181 }; 101182 101183 struct rc6_dec { 101184 int state; 101185 u8 header; 101186 u32 body; 101187 bool toggle; 101188 unsigned int count; 101189 unsigned int wanted_bits; 101190 }; 101191 101192 struct sony_dec { 101193 int state; 101194 u32 bits; 101195 unsigned int count; 101196 }; 101197 101198 struct jvc_dec { 101199 int state; 101200 u16 bits; 101201 u16 old_bits; 101202 unsigned int count; 101203 bool first; 101204 bool toggle; 101205 }; 101206 101207 struct sanyo_dec { 101208 int state; 101209 unsigned int count; 101210 u64 bits; 101211 }; 101212 101213 struct sharp_dec { 101214 int state; 101215 unsigned int count; 101216 u32 bits; 101217 unsigned int pulse_len; 101218 }; 101219 101220 struct mce_kbd_dec { 101221 spinlock_t keylock; 101222 struct timer_list rx_timeout; 101223 int state; 101224 u8 header; 101225 u32 body; 101226 unsigned int count; 101227 unsigned int wanted_bits; 101228 }; 101229 101230 struct xmp_dec { 101231 int state; 101232 unsigned int count; 101233 u32 durations[16]; 101234 }; 101235 101236 struct imon_dec { 101237 int state; 101238 int count; 101239 int last_chk; 101240 unsigned int bits; 101241 bool stick_keyboard; 101242 }; 101243 101244 struct rcmm_dec { 101245 int state; 101246 unsigned int count; 101247 u32 bits; 101248 }; 101249 101250 struct ir_raw_event_ctrl { 101251 struct list_head list; 101252 struct task_struct *thread; 101253 struct { 101254 union { 101255 struct __kfifo kfifo; 101256 struct ir_raw_event *type; 101257 const struct ir_raw_event *const_type; 101258 char (*rectype)[0]; 101259 struct ir_raw_event *ptr; 101260 const struct ir_raw_event *ptr_const; 101261 }; 101262 struct ir_raw_event buf[512]; 101263 } kfifo; 101264 ktime_t last_event; 101265 struct rc_dev *dev; 101266 spinlock_t edge_spinlock; 101267 struct timer_list edge_handle; 101268 struct ir_raw_event prev_ev; 101269 struct ir_raw_event this_ev; 101270 u32 bpf_sample; 101271 struct bpf_prog_array *progs; 101272 struct nec_dec nec; 101273 struct rc5_dec rc5; 101274 struct rc6_dec rc6; 101275 struct sony_dec sony; 101276 struct jvc_dec jvc; 101277 struct sanyo_dec sanyo; 101278 struct sharp_dec sharp; 101279 struct mce_kbd_dec mce_kbd; 101280 struct xmp_dec xmp; 101281 struct imon_dec imon; 101282 struct rcmm_dec rcmm; 101283 }; 101284 101285 struct rc_filter_attribute { 101286 struct device_attribute attr; 101287 enum rc_filter_type type; 101288 bool mask; 101289 }; 101290 101291 struct ir_raw_handler { 101292 struct list_head list; 101293 u64 protocols; 101294 int (*decode)(struct rc_dev *, struct ir_raw_event); 101295 int (*encode)(enum rc_proto, u32, struct ir_raw_event *, unsigned int); 101296 u32 carrier; 101297 u32 min_timeout; 101298 int (*raw_register)(struct rc_dev *); 101299 int (*raw_unregister)(struct rc_dev *); 101300 }; 101301 101302 struct ir_raw_timings_manchester { 101303 unsigned int leader_pulse; 101304 unsigned int leader_space; 101305 unsigned int clock; 101306 unsigned int invert: 1; 101307 unsigned int trailer_space; 101308 }; 101309 101310 struct ir_raw_timings_pd { 101311 unsigned int header_pulse; 101312 unsigned int header_space; 101313 unsigned int bit_pulse; 101314 unsigned int bit_space[2]; 101315 unsigned int trailer_pulse; 101316 unsigned int trailer_space; 101317 unsigned int msb_first: 1; 101318 }; 101319 101320 struct ir_raw_timings_pl { 101321 unsigned int header_pulse; 101322 unsigned int bit_space; 101323 unsigned int bit_pulse[2]; 101324 unsigned int trailer_space; 101325 unsigned int msb_first: 1; 101326 }; 101327 101328 struct lirc_fh { 101329 struct list_head list; 101330 struct rc_dev *rc; 101331 int carrier_low; 101332 bool send_timeout_reports; 101333 struct { 101334 union { 101335 struct __kfifo kfifo; 101336 unsigned int *type; 101337 const unsigned int *const_type; 101338 char (*rectype)[0]; 101339 unsigned int *ptr; 101340 const unsigned int *ptr_const; 101341 }; 101342 unsigned int buf[0]; 101343 } rawir; 101344 struct { 101345 union { 101346 struct __kfifo kfifo; 101347 struct lirc_scancode *type; 101348 const struct lirc_scancode *const_type; 101349 char (*rectype)[0]; 101350 struct lirc_scancode *ptr; 101351 const struct lirc_scancode *ptr_const; 101352 }; 101353 struct lirc_scancode buf[0]; 101354 } scancodes; 101355 wait_queue_head_t wait_poll; 101356 u8 send_mode; 101357 u8 rec_mode; 101358 }; 101359 101360 typedef u64 (*btf_bpf_rc_repeat)(u32 *); 101361 101362 typedef u64 (*btf_bpf_rc_keydown)(u32 *, u32, u64, u32); 101363 101364 typedef u64 (*btf_bpf_rc_pointer_rel)(u32 *, s32, s32); 101365 101366 struct pps_ktime { 101367 __s64 sec; 101368 __s32 nsec; 101369 __u32 flags; 101370 }; 101371 101372 struct pps_ktime_compat { 101373 __s64 sec; 101374 __s32 nsec; 101375 __u32 flags; 101376 }; 101377 101378 struct pps_kinfo { 101379 __u32 assert_sequence; 101380 __u32 clear_sequence; 101381 struct pps_ktime assert_tu; 101382 struct pps_ktime clear_tu; 101383 int current_mode; 101384 }; 101385 101386 struct pps_kinfo_compat { 101387 __u32 assert_sequence; 101388 __u32 clear_sequence; 101389 struct pps_ktime_compat assert_tu; 101390 struct pps_ktime_compat clear_tu; 101391 int current_mode; 101392 } __attribute__((packed)); 101393 101394 struct pps_kparams { 101395 int api_version; 101396 int mode; 101397 struct pps_ktime assert_off_tu; 101398 struct pps_ktime clear_off_tu; 101399 }; 101400 101401 struct pps_fdata { 101402 struct pps_kinfo info; 101403 struct pps_ktime timeout; 101404 }; 101405 101406 struct pps_fdata_compat { 101407 struct pps_kinfo_compat info; 101408 struct pps_ktime_compat timeout; 101409 } __attribute__((packed)); 101410 101411 struct pps_bind_args { 101412 int tsformat; 101413 int edge; 101414 int consumer; 101415 }; 101416 101417 struct pps_device; 101418 101419 struct pps_source_info { 101420 char name[32]; 101421 char path[32]; 101422 int mode; 101423 void (*echo)(struct pps_device *, int, void *); 101424 struct module *owner; 101425 struct device *dev; 101426 }; 101427 101428 struct pps_device { 101429 struct pps_source_info info; 101430 struct pps_kparams params; 101431 __u32 assert_sequence; 101432 __u32 clear_sequence; 101433 struct pps_ktime assert_tu; 101434 struct pps_ktime clear_tu; 101435 int current_mode; 101436 unsigned int last_ev; 101437 wait_queue_head_t queue; 101438 unsigned int id; 101439 const void *lookup_cookie; 101440 struct cdev cdev; 101441 struct device *dev; 101442 struct fasync_struct *async_queue; 101443 spinlock_t lock; 101444 }; 101445 101446 struct pps_event_time { 101447 struct timespec64 ts_real; 101448 }; 101449 101450 struct ptp_clock_time { 101451 __s64 sec; 101452 __u32 nsec; 101453 __u32 reserved; 101454 }; 101455 101456 struct ptp_extts_request { 101457 unsigned int index; 101458 unsigned int flags; 101459 unsigned int rsv[2]; 101460 }; 101461 101462 struct ptp_perout_request { 101463 union { 101464 struct ptp_clock_time start; 101465 struct ptp_clock_time phase; 101466 }; 101467 struct ptp_clock_time period; 101468 unsigned int index; 101469 unsigned int flags; 101470 union { 101471 struct ptp_clock_time on; 101472 unsigned int rsv[4]; 101473 }; 101474 }; 101475 101476 enum ptp_pin_function { 101477 PTP_PF_NONE = 0, 101478 PTP_PF_EXTTS = 1, 101479 PTP_PF_PEROUT = 2, 101480 PTP_PF_PHYSYNC = 3, 101481 }; 101482 101483 struct ptp_pin_desc { 101484 char name[64]; 101485 unsigned int index; 101486 unsigned int func; 101487 unsigned int chan; 101488 unsigned int rsv[5]; 101489 }; 101490 101491 struct ptp_extts_event { 101492 struct ptp_clock_time t; 101493 unsigned int index; 101494 unsigned int flags; 101495 unsigned int rsv[2]; 101496 }; 101497 101498 struct ptp_clock_request { 101499 enum { 101500 PTP_CLK_REQ_EXTTS = 0, 101501 PTP_CLK_REQ_PEROUT = 1, 101502 PTP_CLK_REQ_PPS = 2, 101503 } type; 101504 union { 101505 struct ptp_extts_request extts; 101506 struct ptp_perout_request perout; 101507 }; 101508 }; 101509 101510 struct ptp_clock_info { 101511 struct module *owner; 101512 char name[16]; 101513 s32 max_adj; 101514 int n_alarm; 101515 int n_ext_ts; 101516 int n_per_out; 101517 int n_pins; 101518 int pps; 101519 struct ptp_pin_desc *pin_config; 101520 int (*adjfine)(struct ptp_clock_info *, long int); 101521 int (*adjfreq)(struct ptp_clock_info *, s32); 101522 int (*adjphase)(struct ptp_clock_info *, s32); 101523 int (*adjtime)(struct ptp_clock_info *, s64); 101524 int (*gettime64)(struct ptp_clock_info *, struct timespec64 *); 101525 int (*gettimex64)(struct ptp_clock_info *, struct timespec64 *, struct ptp_system_timestamp *); 101526 int (*getcrosststamp)(struct ptp_clock_info *, struct system_device_crosststamp *); 101527 int (*settime64)(struct ptp_clock_info *, const struct timespec64 *); 101528 int (*enable)(struct ptp_clock_info *, struct ptp_clock_request *, int); 101529 int (*verify)(struct ptp_clock_info *, unsigned int, enum ptp_pin_function, unsigned int); 101530 long int (*do_aux_work)(struct ptp_clock_info *); 101531 }; 101532 101533 enum ptp_clock_events { 101534 PTP_CLOCK_ALARM = 0, 101535 PTP_CLOCK_EXTTS = 1, 101536 PTP_CLOCK_PPS = 2, 101537 PTP_CLOCK_PPSUSR = 3, 101538 }; 101539 101540 struct ptp_clock_event { 101541 int type; 101542 int index; 101543 union { 101544 u64 timestamp; 101545 struct pps_event_time pps_times; 101546 }; 101547 }; 101548 101549 struct timestamp_event_queue { 101550 struct ptp_extts_event buf[128]; 101551 int head; 101552 int tail; 101553 spinlock_t lock; 101554 }; 101555 101556 struct ptp_clock { 101557 struct posix_clock clock; 101558 struct device dev; 101559 struct ptp_clock_info *info; 101560 dev_t devid; 101561 int index; 101562 struct pps_device *pps_source; 101563 long int dialed_frequency; 101564 struct timestamp_event_queue tsevq; 101565 struct mutex tsevq_mux; 101566 struct mutex pincfg_mux; 101567 wait_queue_head_t tsev_wq; 101568 int defunct; 101569 struct device_attribute *pin_dev_attr; 101570 struct attribute **pin_attr; 101571 struct attribute_group pin_attr_group; 101572 const struct attribute_group *pin_attr_groups[2]; 101573 struct kthread_worker *kworker; 101574 struct kthread_delayed_work aux_work; 101575 }; 101576 101577 struct ptp_clock_caps { 101578 int max_adj; 101579 int n_alarm; 101580 int n_ext_ts; 101581 int n_per_out; 101582 int pps; 101583 int n_pins; 101584 int cross_timestamping; 101585 int adjust_phase; 101586 int rsv[12]; 101587 }; 101588 101589 struct ptp_sys_offset { 101590 unsigned int n_samples; 101591 unsigned int rsv[3]; 101592 struct ptp_clock_time ts[51]; 101593 }; 101594 101595 struct ptp_sys_offset_extended { 101596 unsigned int n_samples; 101597 unsigned int rsv[3]; 101598 struct ptp_clock_time ts[75]; 101599 }; 101600 101601 struct ptp_sys_offset_precise { 101602 struct ptp_clock_time device; 101603 struct ptp_clock_time sys_realtime; 101604 struct ptp_clock_time sys_monoraw; 101605 unsigned int rsv[4]; 101606 }; 101607 101608 enum power_supply_notifier_events { 101609 PSY_EVENT_PROP_CHANGED = 0, 101610 }; 101611 101612 struct power_supply_battery_ocv_table { 101613 int ocv; 101614 int capacity; 101615 }; 101616 101617 struct power_supply_resistance_temp_table { 101618 int temp; 101619 int resistance; 101620 }; 101621 101622 struct power_supply_battery_info { 101623 int energy_full_design_uwh; 101624 int charge_full_design_uah; 101625 int voltage_min_design_uv; 101626 int voltage_max_design_uv; 101627 int tricklecharge_current_ua; 101628 int precharge_current_ua; 101629 int precharge_voltage_max_uv; 101630 int charge_term_current_ua; 101631 int charge_restart_voltage_uv; 101632 int overvoltage_limit_uv; 101633 int constant_charge_current_max_ua; 101634 int constant_charge_voltage_max_uv; 101635 int factory_internal_resistance_uohm; 101636 int ocv_temp[20]; 101637 int temp_ambient_alert_min; 101638 int temp_ambient_alert_max; 101639 int temp_alert_min; 101640 int temp_alert_max; 101641 int temp_min; 101642 int temp_max; 101643 struct power_supply_battery_ocv_table *ocv_table[20]; 101644 int ocv_table_size[20]; 101645 struct power_supply_resistance_temp_table *resist_table; 101646 int resist_table_size; 101647 }; 101648 101649 struct psy_am_i_supplied_data { 101650 struct power_supply *psy; 101651 unsigned int count; 101652 }; 101653 101654 enum { 101655 POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0, 101656 POWER_SUPPLY_CHARGE_TYPE_NONE = 1, 101657 POWER_SUPPLY_CHARGE_TYPE_TRICKLE = 2, 101658 POWER_SUPPLY_CHARGE_TYPE_FAST = 3, 101659 POWER_SUPPLY_CHARGE_TYPE_STANDARD = 4, 101660 POWER_SUPPLY_CHARGE_TYPE_ADAPTIVE = 5, 101661 POWER_SUPPLY_CHARGE_TYPE_CUSTOM = 6, 101662 POWER_SUPPLY_CHARGE_TYPE_LONGLIFE = 7, 101663 }; 101664 101665 enum { 101666 POWER_SUPPLY_HEALTH_UNKNOWN = 0, 101667 POWER_SUPPLY_HEALTH_GOOD = 1, 101668 POWER_SUPPLY_HEALTH_OVERHEAT = 2, 101669 POWER_SUPPLY_HEALTH_DEAD = 3, 101670 POWER_SUPPLY_HEALTH_OVERVOLTAGE = 4, 101671 POWER_SUPPLY_HEALTH_UNSPEC_FAILURE = 5, 101672 POWER_SUPPLY_HEALTH_COLD = 6, 101673 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE = 7, 101674 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE = 8, 101675 POWER_SUPPLY_HEALTH_OVERCURRENT = 9, 101676 POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED = 10, 101677 POWER_SUPPLY_HEALTH_WARM = 11, 101678 POWER_SUPPLY_HEALTH_COOL = 12, 101679 POWER_SUPPLY_HEALTH_HOT = 13, 101680 }; 101681 101682 enum { 101683 POWER_SUPPLY_SCOPE_UNKNOWN = 0, 101684 POWER_SUPPLY_SCOPE_SYSTEM = 1, 101685 POWER_SUPPLY_SCOPE_DEVICE = 2, 101686 }; 101687 101688 struct power_supply_attr { 101689 const char *prop_name; 101690 char attr_name[31]; 101691 struct device_attribute dev_attr; 101692 const char * const *text_values; 101693 int text_values_len; 101694 }; 101695 101696 enum hwmon_sensor_types { 101697 hwmon_chip = 0, 101698 hwmon_temp = 1, 101699 hwmon_in = 2, 101700 hwmon_curr = 3, 101701 hwmon_power = 4, 101702 hwmon_energy = 5, 101703 hwmon_humidity = 6, 101704 hwmon_fan = 7, 101705 hwmon_pwm = 8, 101706 hwmon_intrusion = 9, 101707 hwmon_max = 10, 101708 }; 101709 101710 enum hwmon_temp_attributes { 101711 hwmon_temp_enable = 0, 101712 hwmon_temp_input = 1, 101713 hwmon_temp_type = 2, 101714 hwmon_temp_lcrit = 3, 101715 hwmon_temp_lcrit_hyst = 4, 101716 hwmon_temp_min = 5, 101717 hwmon_temp_min_hyst = 6, 101718 hwmon_temp_max = 7, 101719 hwmon_temp_max_hyst = 8, 101720 hwmon_temp_crit = 9, 101721 hwmon_temp_crit_hyst = 10, 101722 hwmon_temp_emergency = 11, 101723 hwmon_temp_emergency_hyst = 12, 101724 hwmon_temp_alarm = 13, 101725 hwmon_temp_lcrit_alarm = 14, 101726 hwmon_temp_min_alarm = 15, 101727 hwmon_temp_max_alarm = 16, 101728 hwmon_temp_crit_alarm = 17, 101729 hwmon_temp_emergency_alarm = 18, 101730 hwmon_temp_fault = 19, 101731 hwmon_temp_offset = 20, 101732 hwmon_temp_label = 21, 101733 hwmon_temp_lowest = 22, 101734 hwmon_temp_highest = 23, 101735 hwmon_temp_reset_history = 24, 101736 hwmon_temp_rated_min = 25, 101737 hwmon_temp_rated_max = 26, 101738 }; 101739 101740 enum hwmon_in_attributes { 101741 hwmon_in_enable = 0, 101742 hwmon_in_input = 1, 101743 hwmon_in_min = 2, 101744 hwmon_in_max = 3, 101745 hwmon_in_lcrit = 4, 101746 hwmon_in_crit = 5, 101747 hwmon_in_average = 6, 101748 hwmon_in_lowest = 7, 101749 hwmon_in_highest = 8, 101750 hwmon_in_reset_history = 9, 101751 hwmon_in_label = 10, 101752 hwmon_in_alarm = 11, 101753 hwmon_in_min_alarm = 12, 101754 hwmon_in_max_alarm = 13, 101755 hwmon_in_lcrit_alarm = 14, 101756 hwmon_in_crit_alarm = 15, 101757 hwmon_in_rated_min = 16, 101758 hwmon_in_rated_max = 17, 101759 }; 101760 101761 enum hwmon_curr_attributes { 101762 hwmon_curr_enable = 0, 101763 hwmon_curr_input = 1, 101764 hwmon_curr_min = 2, 101765 hwmon_curr_max = 3, 101766 hwmon_curr_lcrit = 4, 101767 hwmon_curr_crit = 5, 101768 hwmon_curr_average = 6, 101769 hwmon_curr_lowest = 7, 101770 hwmon_curr_highest = 8, 101771 hwmon_curr_reset_history = 9, 101772 hwmon_curr_label = 10, 101773 hwmon_curr_alarm = 11, 101774 hwmon_curr_min_alarm = 12, 101775 hwmon_curr_max_alarm = 13, 101776 hwmon_curr_lcrit_alarm = 14, 101777 hwmon_curr_crit_alarm = 15, 101778 hwmon_curr_rated_min = 16, 101779 hwmon_curr_rated_max = 17, 101780 }; 101781 101782 struct hwmon_ops { 101783 umode_t (*is_visible)(const void *, enum hwmon_sensor_types, u32, int); 101784 int (*read)(struct device *, enum hwmon_sensor_types, u32, int, long int *); 101785 int (*read_string)(struct device *, enum hwmon_sensor_types, u32, int, const char **); 101786 int (*write)(struct device *, enum hwmon_sensor_types, u32, int, long int); 101787 }; 101788 101789 struct hwmon_channel_info { 101790 enum hwmon_sensor_types type; 101791 const u32 *config; 101792 }; 101793 101794 struct hwmon_chip_info { 101795 const struct hwmon_ops *ops; 101796 const struct hwmon_channel_info **info; 101797 }; 101798 101799 struct power_supply_hwmon { 101800 struct power_supply *psy; 101801 long unsigned int *props; 101802 }; 101803 101804 struct hwmon_type_attr_list { 101805 const u32 *attrs; 101806 size_t n_attrs; 101807 }; 101808 101809 enum hwmon_chip_attributes { 101810 hwmon_chip_temp_reset_history = 0, 101811 hwmon_chip_in_reset_history = 1, 101812 hwmon_chip_curr_reset_history = 2, 101813 hwmon_chip_power_reset_history = 3, 101814 hwmon_chip_register_tz = 4, 101815 hwmon_chip_update_interval = 5, 101816 hwmon_chip_alarms = 6, 101817 hwmon_chip_samples = 7, 101818 hwmon_chip_curr_samples = 8, 101819 hwmon_chip_in_samples = 9, 101820 hwmon_chip_power_samples = 10, 101821 hwmon_chip_temp_samples = 11, 101822 }; 101823 101824 enum hwmon_power_attributes { 101825 hwmon_power_enable = 0, 101826 hwmon_power_average = 1, 101827 hwmon_power_average_interval = 2, 101828 hwmon_power_average_interval_max = 3, 101829 hwmon_power_average_interval_min = 4, 101830 hwmon_power_average_highest = 5, 101831 hwmon_power_average_lowest = 6, 101832 hwmon_power_average_max = 7, 101833 hwmon_power_average_min = 8, 101834 hwmon_power_input = 9, 101835 hwmon_power_input_highest = 10, 101836 hwmon_power_input_lowest = 11, 101837 hwmon_power_reset_history = 12, 101838 hwmon_power_accuracy = 13, 101839 hwmon_power_cap = 14, 101840 hwmon_power_cap_hyst = 15, 101841 hwmon_power_cap_max = 16, 101842 hwmon_power_cap_min = 17, 101843 hwmon_power_min = 18, 101844 hwmon_power_max = 19, 101845 hwmon_power_crit = 20, 101846 hwmon_power_lcrit = 21, 101847 hwmon_power_label = 22, 101848 hwmon_power_alarm = 23, 101849 hwmon_power_cap_alarm = 24, 101850 hwmon_power_min_alarm = 25, 101851 hwmon_power_max_alarm = 26, 101852 hwmon_power_lcrit_alarm = 27, 101853 hwmon_power_crit_alarm = 28, 101854 hwmon_power_rated_min = 29, 101855 hwmon_power_rated_max = 30, 101856 }; 101857 101858 enum hwmon_energy_attributes { 101859 hwmon_energy_enable = 0, 101860 hwmon_energy_input = 1, 101861 hwmon_energy_label = 2, 101862 }; 101863 101864 enum hwmon_humidity_attributes { 101865 hwmon_humidity_enable = 0, 101866 hwmon_humidity_input = 1, 101867 hwmon_humidity_label = 2, 101868 hwmon_humidity_min = 3, 101869 hwmon_humidity_min_hyst = 4, 101870 hwmon_humidity_max = 5, 101871 hwmon_humidity_max_hyst = 6, 101872 hwmon_humidity_alarm = 7, 101873 hwmon_humidity_fault = 8, 101874 hwmon_humidity_rated_min = 9, 101875 hwmon_humidity_rated_max = 10, 101876 }; 101877 101878 enum hwmon_fan_attributes { 101879 hwmon_fan_enable = 0, 101880 hwmon_fan_input = 1, 101881 hwmon_fan_label = 2, 101882 hwmon_fan_min = 3, 101883 hwmon_fan_max = 4, 101884 hwmon_fan_div = 5, 101885 hwmon_fan_pulses = 6, 101886 hwmon_fan_target = 7, 101887 hwmon_fan_alarm = 8, 101888 hwmon_fan_min_alarm = 9, 101889 hwmon_fan_max_alarm = 10, 101890 hwmon_fan_fault = 11, 101891 }; 101892 101893 enum hwmon_pwm_attributes { 101894 hwmon_pwm_input = 0, 101895 hwmon_pwm_enable = 1, 101896 hwmon_pwm_mode = 2, 101897 hwmon_pwm_freq = 3, 101898 }; 101899 101900 enum hwmon_intrusion_attributes { 101901 hwmon_intrusion_alarm = 0, 101902 hwmon_intrusion_beep = 1, 101903 }; 101904 101905 struct trace_event_raw_hwmon_attr_class { 101906 struct trace_entry ent; 101907 int index; 101908 u32 __data_loc_attr_name; 101909 long int val; 101910 char __data[0]; 101911 }; 101912 101913 struct trace_event_raw_hwmon_attr_show_string { 101914 struct trace_entry ent; 101915 int index; 101916 u32 __data_loc_attr_name; 101917 u32 __data_loc_label; 101918 char __data[0]; 101919 }; 101920 101921 struct trace_event_data_offsets_hwmon_attr_class { 101922 u32 attr_name; 101923 }; 101924 101925 struct trace_event_data_offsets_hwmon_attr_show_string { 101926 u32 attr_name; 101927 u32 label; 101928 }; 101929 101930 typedef void (*btf_trace_hwmon_attr_show)(void *, int, const char *, long int); 101931 101932 typedef void (*btf_trace_hwmon_attr_store)(void *, int, const char *, long int); 101933 101934 typedef void (*btf_trace_hwmon_attr_show_string)(void *, int, const char *, const char *); 101935 101936 struct hwmon_device { 101937 const char *name; 101938 struct device dev; 101939 const struct hwmon_chip_info *chip; 101940 struct list_head tzdata; 101941 struct attribute_group group; 101942 const struct attribute_group **groups; 101943 }; 101944 101945 struct hwmon_device_attribute { 101946 struct device_attribute dev_attr; 101947 const struct hwmon_ops *ops; 101948 enum hwmon_sensor_types type; 101949 u32 attr; 101950 int index; 101951 char name[32]; 101952 }; 101953 101954 struct thermal_attr { 101955 struct device_attribute attr; 101956 char name[20]; 101957 }; 101958 101959 struct trace_event_raw_thermal_temperature { 101960 struct trace_entry ent; 101961 u32 __data_loc_thermal_zone; 101962 int id; 101963 int temp_prev; 101964 int temp; 101965 char __data[0]; 101966 }; 101967 101968 struct trace_event_raw_cdev_update { 101969 struct trace_entry ent; 101970 u32 __data_loc_type; 101971 long unsigned int target; 101972 char __data[0]; 101973 }; 101974 101975 struct trace_event_raw_thermal_zone_trip { 101976 struct trace_entry ent; 101977 u32 __data_loc_thermal_zone; 101978 int id; 101979 int trip; 101980 enum thermal_trip_type trip_type; 101981 char __data[0]; 101982 }; 101983 101984 struct trace_event_data_offsets_thermal_temperature { 101985 u32 thermal_zone; 101986 }; 101987 101988 struct trace_event_data_offsets_cdev_update { 101989 u32 type; 101990 }; 101991 101992 struct trace_event_data_offsets_thermal_zone_trip { 101993 u32 thermal_zone; 101994 }; 101995 101996 typedef void (*btf_trace_thermal_temperature)(void *, struct thermal_zone_device *); 101997 101998 typedef void (*btf_trace_cdev_update)(void *, struct thermal_cooling_device *, long unsigned int); 101999 102000 typedef void (*btf_trace_thermal_zone_trip)(void *, struct thermal_zone_device *, int, enum thermal_trip_type); 102001 102002 struct thermal_instance { 102003 int id; 102004 char name[20]; 102005 struct thermal_zone_device *tz; 102006 struct thermal_cooling_device *cdev; 102007 int trip; 102008 bool initialized; 102009 long unsigned int upper; 102010 long unsigned int lower; 102011 long unsigned int target; 102012 char attr_name[20]; 102013 struct device_attribute attr; 102014 char weight_attr_name[20]; 102015 struct device_attribute weight_attr; 102016 struct list_head tz_node; 102017 struct list_head cdev_node; 102018 unsigned int weight; 102019 }; 102020 102021 struct cooling_dev_stats { 102022 spinlock_t lock; 102023 unsigned int total_trans; 102024 long unsigned int state; 102025 long unsigned int max_states; 102026 ktime_t last_time; 102027 ktime_t *time_in_state; 102028 unsigned int *trans_table; 102029 }; 102030 102031 struct genl_dumpit_info { 102032 const struct genl_family *family; 102033 struct genl_ops op; 102034 struct nlattr **attrs; 102035 }; 102036 102037 enum thermal_genl_attr { 102038 THERMAL_GENL_ATTR_UNSPEC = 0, 102039 THERMAL_GENL_ATTR_TZ = 1, 102040 THERMAL_GENL_ATTR_TZ_ID = 2, 102041 THERMAL_GENL_ATTR_TZ_TEMP = 3, 102042 THERMAL_GENL_ATTR_TZ_TRIP = 4, 102043 THERMAL_GENL_ATTR_TZ_TRIP_ID = 5, 102044 THERMAL_GENL_ATTR_TZ_TRIP_TYPE = 6, 102045 THERMAL_GENL_ATTR_TZ_TRIP_TEMP = 7, 102046 THERMAL_GENL_ATTR_TZ_TRIP_HYST = 8, 102047 THERMAL_GENL_ATTR_TZ_MODE = 9, 102048 THERMAL_GENL_ATTR_TZ_NAME = 10, 102049 THERMAL_GENL_ATTR_TZ_CDEV_WEIGHT = 11, 102050 THERMAL_GENL_ATTR_TZ_GOV = 12, 102051 THERMAL_GENL_ATTR_TZ_GOV_NAME = 13, 102052 THERMAL_GENL_ATTR_CDEV = 14, 102053 THERMAL_GENL_ATTR_CDEV_ID = 15, 102054 THERMAL_GENL_ATTR_CDEV_CUR_STATE = 16, 102055 THERMAL_GENL_ATTR_CDEV_MAX_STATE = 17, 102056 THERMAL_GENL_ATTR_CDEV_NAME = 18, 102057 THERMAL_GENL_ATTR_GOV_NAME = 19, 102058 __THERMAL_GENL_ATTR_MAX = 20, 102059 }; 102060 102061 enum thermal_genl_sampling { 102062 THERMAL_GENL_SAMPLING_TEMP = 0, 102063 __THERMAL_GENL_SAMPLING_MAX = 1, 102064 }; 102065 102066 enum thermal_genl_event { 102067 THERMAL_GENL_EVENT_UNSPEC = 0, 102068 THERMAL_GENL_EVENT_TZ_CREATE = 1, 102069 THERMAL_GENL_EVENT_TZ_DELETE = 2, 102070 THERMAL_GENL_EVENT_TZ_DISABLE = 3, 102071 THERMAL_GENL_EVENT_TZ_ENABLE = 4, 102072 THERMAL_GENL_EVENT_TZ_TRIP_UP = 5, 102073 THERMAL_GENL_EVENT_TZ_TRIP_DOWN = 6, 102074 THERMAL_GENL_EVENT_TZ_TRIP_CHANGE = 7, 102075 THERMAL_GENL_EVENT_TZ_TRIP_ADD = 8, 102076 THERMAL_GENL_EVENT_TZ_TRIP_DELETE = 9, 102077 THERMAL_GENL_EVENT_CDEV_ADD = 10, 102078 THERMAL_GENL_EVENT_CDEV_DELETE = 11, 102079 THERMAL_GENL_EVENT_CDEV_STATE_UPDATE = 12, 102080 THERMAL_GENL_EVENT_TZ_GOV_CHANGE = 13, 102081 __THERMAL_GENL_EVENT_MAX = 14, 102082 }; 102083 102084 enum thermal_genl_cmd { 102085 THERMAL_GENL_CMD_UNSPEC = 0, 102086 THERMAL_GENL_CMD_TZ_GET_ID = 1, 102087 THERMAL_GENL_CMD_TZ_GET_TRIP = 2, 102088 THERMAL_GENL_CMD_TZ_GET_TEMP = 3, 102089 THERMAL_GENL_CMD_TZ_GET_GOV = 4, 102090 THERMAL_GENL_CMD_TZ_GET_MODE = 5, 102091 THERMAL_GENL_CMD_CDEV_GET = 6, 102092 __THERMAL_GENL_CMD_MAX = 7, 102093 }; 102094 102095 struct param { 102096 struct nlattr **attrs; 102097 struct sk_buff *msg; 102098 const char *name; 102099 int tz_id; 102100 int cdev_id; 102101 int trip_id; 102102 int trip_temp; 102103 int trip_type; 102104 int trip_hyst; 102105 int temp; 102106 int cdev_state; 102107 int cdev_max_state; 102108 }; 102109 102110 typedef int (*cb_t)(struct param *); 102111 102112 struct thermal_hwmon_device { 102113 char type[20]; 102114 struct device *device; 102115 int count; 102116 struct list_head tz_list; 102117 struct list_head node; 102118 }; 102119 102120 struct thermal_hwmon_attr { 102121 struct device_attribute attr; 102122 char name[16]; 102123 }; 102124 102125 struct thermal_hwmon_temp { 102126 struct list_head hwmon_node; 102127 struct thermal_zone_device *tz; 102128 struct thermal_hwmon_attr temp_input; 102129 struct thermal_hwmon_attr temp_crit; 102130 }; 102131 102132 struct watchdog_info { 102133 __u32 options; 102134 __u32 firmware_version; 102135 __u8 identity[32]; 102136 }; 102137 102138 struct watchdog_device; 102139 102140 struct watchdog_ops { 102141 struct module *owner; 102142 int (*start)(struct watchdog_device *); 102143 int (*stop)(struct watchdog_device *); 102144 int (*ping)(struct watchdog_device *); 102145 unsigned int (*status)(struct watchdog_device *); 102146 int (*set_timeout)(struct watchdog_device *, unsigned int); 102147 int (*set_pretimeout)(struct watchdog_device *, unsigned int); 102148 unsigned int (*get_timeleft)(struct watchdog_device *); 102149 int (*restart)(struct watchdog_device *, long unsigned int, void *); 102150 long int (*ioctl)(struct watchdog_device *, unsigned int, long unsigned int); 102151 }; 102152 102153 struct watchdog_governor; 102154 102155 struct watchdog_core_data; 102156 102157 struct watchdog_device { 102158 int id; 102159 struct device *parent; 102160 const struct attribute_group **groups; 102161 const struct watchdog_info *info; 102162 const struct watchdog_ops *ops; 102163 const struct watchdog_governor *gov; 102164 unsigned int bootstatus; 102165 unsigned int timeout; 102166 unsigned int pretimeout; 102167 unsigned int min_timeout; 102168 unsigned int max_timeout; 102169 unsigned int min_hw_heartbeat_ms; 102170 unsigned int max_hw_heartbeat_ms; 102171 struct notifier_block reboot_nb; 102172 struct notifier_block restart_nb; 102173 void *driver_data; 102174 struct watchdog_core_data *wd_data; 102175 long unsigned int status; 102176 struct list_head deferred; 102177 }; 102178 102179 struct watchdog_governor { 102180 const char name[20]; 102181 void (*pretimeout)(struct watchdog_device *); 102182 }; 102183 102184 struct watchdog_core_data { 102185 struct device dev; 102186 struct cdev cdev; 102187 struct watchdog_device *wdd; 102188 struct mutex lock; 102189 ktime_t last_keepalive; 102190 ktime_t last_hw_keepalive; 102191 ktime_t open_deadline; 102192 struct hrtimer timer; 102193 struct kthread_work work; 102194 long unsigned int status; 102195 }; 102196 102197 struct mdp_device_descriptor_s { 102198 __u32 number; 102199 __u32 major; 102200 __u32 minor; 102201 __u32 raid_disk; 102202 __u32 state; 102203 __u32 reserved[27]; 102204 }; 102205 102206 typedef struct mdp_device_descriptor_s mdp_disk_t; 102207 102208 struct mdp_superblock_s { 102209 __u32 md_magic; 102210 __u32 major_version; 102211 __u32 minor_version; 102212 __u32 patch_version; 102213 __u32 gvalid_words; 102214 __u32 set_uuid0; 102215 __u32 ctime; 102216 __u32 level; 102217 __u32 size; 102218 __u32 nr_disks; 102219 __u32 raid_disks; 102220 __u32 md_minor; 102221 __u32 not_persistent; 102222 __u32 set_uuid1; 102223 __u32 set_uuid2; 102224 __u32 set_uuid3; 102225 __u32 gstate_creserved[16]; 102226 __u32 utime; 102227 __u32 state; 102228 __u32 active_disks; 102229 __u32 working_disks; 102230 __u32 failed_disks; 102231 __u32 spare_disks; 102232 __u32 sb_csum; 102233 __u32 events_lo; 102234 __u32 events_hi; 102235 __u32 cp_events_lo; 102236 __u32 cp_events_hi; 102237 __u32 recovery_cp; 102238 __u64 reshape_position; 102239 __u32 new_level; 102240 __u32 delta_disks; 102241 __u32 new_layout; 102242 __u32 new_chunk; 102243 __u32 gstate_sreserved[14]; 102244 __u32 layout; 102245 __u32 chunk_size; 102246 __u32 root_pv; 102247 __u32 root_block; 102248 __u32 pstate_reserved[60]; 102249 mdp_disk_t disks[27]; 102250 __u32 reserved[0]; 102251 mdp_disk_t this_disk; 102252 }; 102253 102254 typedef struct mdp_superblock_s mdp_super_t; 102255 102256 struct mdp_superblock_1 { 102257 __le32 magic; 102258 __le32 major_version; 102259 __le32 feature_map; 102260 __le32 pad0; 102261 __u8 set_uuid[16]; 102262 char set_name[32]; 102263 __le64 ctime; 102264 __le32 level; 102265 __le32 layout; 102266 __le64 size; 102267 __le32 chunksize; 102268 __le32 raid_disks; 102269 union { 102270 __le32 bitmap_offset; 102271 struct { 102272 __le16 offset; 102273 __le16 size; 102274 } ppl; 102275 }; 102276 __le32 new_level; 102277 __le64 reshape_position; 102278 __le32 delta_disks; 102279 __le32 new_layout; 102280 __le32 new_chunk; 102281 __le32 new_offset; 102282 __le64 data_offset; 102283 __le64 data_size; 102284 __le64 super_offset; 102285 union { 102286 __le64 recovery_offset; 102287 __le64 journal_tail; 102288 }; 102289 __le32 dev_number; 102290 __le32 cnt_corrected_read; 102291 __u8 device_uuid[16]; 102292 __u8 devflags; 102293 __u8 bblog_shift; 102294 __le16 bblog_size; 102295 __le32 bblog_offset; 102296 __le64 utime; 102297 __le64 events; 102298 __le64 resync_offset; 102299 __le32 sb_csum; 102300 __le32 max_dev; 102301 __u8 pad3[32]; 102302 __le16 dev_roles[0]; 102303 }; 102304 102305 struct mdu_version_s { 102306 int major; 102307 int minor; 102308 int patchlevel; 102309 }; 102310 102311 typedef struct mdu_version_s mdu_version_t; 102312 102313 struct mdu_array_info_s { 102314 int major_version; 102315 int minor_version; 102316 int patch_version; 102317 unsigned int ctime; 102318 int level; 102319 int size; 102320 int nr_disks; 102321 int raid_disks; 102322 int md_minor; 102323 int not_persistent; 102324 unsigned int utime; 102325 int state; 102326 int active_disks; 102327 int working_disks; 102328 int failed_disks; 102329 int spare_disks; 102330 int layout; 102331 int chunk_size; 102332 }; 102333 102334 typedef struct mdu_array_info_s mdu_array_info_t; 102335 102336 struct mdu_disk_info_s { 102337 int number; 102338 int major; 102339 int minor; 102340 int raid_disk; 102341 int state; 102342 }; 102343 102344 typedef struct mdu_disk_info_s mdu_disk_info_t; 102345 102346 struct mdu_bitmap_file_s { 102347 char pathname[4096]; 102348 }; 102349 102350 typedef struct mdu_bitmap_file_s mdu_bitmap_file_t; 102351 102352 struct mddev; 102353 102354 struct md_rdev; 102355 102356 struct md_cluster_operations { 102357 int (*join)(struct mddev *, int); 102358 int (*leave)(struct mddev *); 102359 int (*slot_number)(struct mddev *); 102360 int (*resync_info_update)(struct mddev *, sector_t, sector_t); 102361 void (*resync_info_get)(struct mddev *, sector_t *, sector_t *); 102362 int (*metadata_update_start)(struct mddev *); 102363 int (*metadata_update_finish)(struct mddev *); 102364 void (*metadata_update_cancel)(struct mddev *); 102365 int (*resync_start)(struct mddev *); 102366 int (*resync_finish)(struct mddev *); 102367 int (*area_resyncing)(struct mddev *, int, sector_t, sector_t); 102368 int (*add_new_disk)(struct mddev *, struct md_rdev *); 102369 void (*add_new_disk_cancel)(struct mddev *); 102370 int (*new_disk_ack)(struct mddev *, bool); 102371 int (*remove_disk)(struct mddev *, struct md_rdev *); 102372 void (*load_bitmaps)(struct mddev *, int); 102373 int (*gather_bitmaps)(struct md_rdev *); 102374 int (*resize_bitmaps)(struct mddev *, sector_t, sector_t); 102375 int (*lock_all_bitmaps)(struct mddev *); 102376 void (*unlock_all_bitmaps)(struct mddev *); 102377 void (*update_size)(struct mddev *, sector_t); 102378 }; 102379 102380 struct md_cluster_info; 102381 102382 struct md_personality; 102383 102384 struct md_thread; 102385 102386 struct bitmap; 102387 102388 struct mddev { 102389 void *private; 102390 struct md_personality *pers; 102391 dev_t unit; 102392 int md_minor; 102393 struct list_head disks; 102394 long unsigned int flags; 102395 long unsigned int sb_flags; 102396 int suspended; 102397 atomic_t active_io; 102398 int ro; 102399 int sysfs_active; 102400 struct gendisk *gendisk; 102401 struct kobject kobj; 102402 int hold_active; 102403 int major_version; 102404 int minor_version; 102405 int patch_version; 102406 int persistent; 102407 int external; 102408 char metadata_type[17]; 102409 int chunk_sectors; 102410 time64_t ctime; 102411 time64_t utime; 102412 int level; 102413 int layout; 102414 char clevel[16]; 102415 int raid_disks; 102416 int max_disks; 102417 sector_t dev_sectors; 102418 sector_t array_sectors; 102419 int external_size; 102420 __u64 events; 102421 int can_decrease_events; 102422 char uuid[16]; 102423 sector_t reshape_position; 102424 int delta_disks; 102425 int new_level; 102426 int new_layout; 102427 int new_chunk_sectors; 102428 int reshape_backwards; 102429 struct md_thread *thread; 102430 struct md_thread *sync_thread; 102431 char *last_sync_action; 102432 sector_t curr_resync; 102433 sector_t curr_resync_completed; 102434 long unsigned int resync_mark; 102435 sector_t resync_mark_cnt; 102436 sector_t curr_mark_cnt; 102437 sector_t resync_max_sectors; 102438 atomic64_t resync_mismatches; 102439 sector_t suspend_lo; 102440 sector_t suspend_hi; 102441 int sync_speed_min; 102442 int sync_speed_max; 102443 int parallel_resync; 102444 int ok_start_degraded; 102445 long unsigned int recovery; 102446 int recovery_disabled; 102447 int in_sync; 102448 struct mutex open_mutex; 102449 struct mutex reconfig_mutex; 102450 atomic_t active; 102451 atomic_t openers; 102452 int changed; 102453 int degraded; 102454 atomic_t recovery_active; 102455 wait_queue_head_t recovery_wait; 102456 sector_t recovery_cp; 102457 sector_t resync_min; 102458 sector_t resync_max; 102459 struct kernfs_node *sysfs_state; 102460 struct kernfs_node *sysfs_action; 102461 struct kernfs_node *sysfs_completed; 102462 struct kernfs_node *sysfs_degraded; 102463 struct kernfs_node *sysfs_level; 102464 struct work_struct del_work; 102465 spinlock_t lock; 102466 wait_queue_head_t sb_wait; 102467 atomic_t pending_writes; 102468 unsigned int safemode; 102469 unsigned int safemode_delay; 102470 struct timer_list safemode_timer; 102471 struct percpu_ref writes_pending; 102472 int sync_checkers; 102473 struct request_queue *queue; 102474 struct bitmap *bitmap; 102475 struct { 102476 struct file *file; 102477 loff_t offset; 102478 long unsigned int space; 102479 loff_t default_offset; 102480 long unsigned int default_space; 102481 struct mutex mutex; 102482 long unsigned int chunksize; 102483 long unsigned int daemon_sleep; 102484 long unsigned int max_write_behind; 102485 int external; 102486 int nodes; 102487 char cluster_name[64]; 102488 } bitmap_info; 102489 atomic_t max_corr_read_errors; 102490 struct list_head all_mddevs; 102491 struct attribute_group *to_remove; 102492 struct bio_set bio_set; 102493 struct bio_set sync_set; 102494 mempool_t md_io_pool; 102495 struct bio *flush_bio; 102496 atomic_t flush_pending; 102497 ktime_t start_flush; 102498 ktime_t prev_flush_start; 102499 struct work_struct flush_work; 102500 struct work_struct event_work; 102501 mempool_t *serial_info_pool; 102502 void (*sync_super)(struct mddev *, struct md_rdev *); 102503 struct md_cluster_info *cluster_info; 102504 unsigned int good_device_nr; 102505 unsigned int noio_flag; 102506 bool has_superblocks: 1; 102507 bool fail_last_dev: 1; 102508 bool serialize_policy: 1; 102509 }; 102510 102511 struct serial_in_rdev; 102512 102513 struct md_rdev { 102514 struct list_head same_set; 102515 sector_t sectors; 102516 struct mddev *mddev; 102517 int last_events; 102518 struct block_device *meta_bdev; 102519 struct block_device *bdev; 102520 struct page *sb_page; 102521 struct page *bb_page; 102522 int sb_loaded; 102523 __u64 sb_events; 102524 sector_t data_offset; 102525 sector_t new_data_offset; 102526 sector_t sb_start; 102527 int sb_size; 102528 int preferred_minor; 102529 struct kobject kobj; 102530 long unsigned int flags; 102531 wait_queue_head_t blocked_wait; 102532 int desc_nr; 102533 int raid_disk; 102534 int new_raid_disk; 102535 int saved_raid_disk; 102536 union { 102537 sector_t recovery_offset; 102538 sector_t journal_tail; 102539 }; 102540 atomic_t nr_pending; 102541 atomic_t read_errors; 102542 time64_t last_read_error; 102543 atomic_t corrected_errors; 102544 struct serial_in_rdev *serial; 102545 struct work_struct del_work; 102546 struct kernfs_node *sysfs_state; 102547 struct kernfs_node *sysfs_unack_badblocks; 102548 struct kernfs_node *sysfs_badblocks; 102549 struct badblocks badblocks; 102550 struct { 102551 short int offset; 102552 unsigned int size; 102553 sector_t sector; 102554 } ppl; 102555 }; 102556 102557 struct serial_in_rdev { 102558 struct rb_root_cached serial_rb; 102559 spinlock_t serial_lock; 102560 wait_queue_head_t serial_io_wait; 102561 }; 102562 102563 enum flag_bits { 102564 Faulty = 0, 102565 In_sync = 1, 102566 Bitmap_sync = 2, 102567 WriteMostly = 3, 102568 AutoDetected = 4, 102569 Blocked = 5, 102570 WriteErrorSeen = 6, 102571 FaultRecorded = 7, 102572 BlockedBadBlocks = 8, 102573 WantReplacement = 9, 102574 Replacement = 10, 102575 Candidate = 11, 102576 Journal = 12, 102577 ClusterRemove = 13, 102578 RemoveSynchronized = 14, 102579 ExternalBbl = 15, 102580 FailFast = 16, 102581 LastDev = 17, 102582 CollisionCheck = 18, 102583 }; 102584 102585 enum mddev_flags { 102586 MD_ARRAY_FIRST_USE = 0, 102587 MD_CLOSING = 1, 102588 MD_JOURNAL_CLEAN = 2, 102589 MD_HAS_JOURNAL = 3, 102590 MD_CLUSTER_RESYNC_LOCKED = 4, 102591 MD_FAILFAST_SUPPORTED = 5, 102592 MD_HAS_PPL = 6, 102593 MD_HAS_MULTIPLE_PPLS = 7, 102594 MD_ALLOW_SB_UPDATE = 8, 102595 MD_UPDATING_SB = 9, 102596 MD_NOT_READY = 10, 102597 MD_BROKEN = 11, 102598 }; 102599 102600 enum mddev_sb_flags { 102601 MD_SB_CHANGE_DEVS = 0, 102602 MD_SB_CHANGE_CLEAN = 1, 102603 MD_SB_CHANGE_PENDING = 2, 102604 MD_SB_NEED_REWRITE = 3, 102605 }; 102606 102607 struct md_personality { 102608 char *name; 102609 int level; 102610 struct list_head list; 102611 struct module *owner; 102612 bool (*make_request)(struct mddev *, struct bio *); 102613 int (*run)(struct mddev *); 102614 int (*start)(struct mddev *); 102615 void (*free)(struct mddev *, void *); 102616 void (*status)(struct seq_file *, struct mddev *); 102617 void (*error_handler)(struct mddev *, struct md_rdev *); 102618 int (*hot_add_disk)(struct mddev *, struct md_rdev *); 102619 int (*hot_remove_disk)(struct mddev *, struct md_rdev *); 102620 int (*spare_active)(struct mddev *); 102621 sector_t (*sync_request)(struct mddev *, sector_t, int *); 102622 int (*resize)(struct mddev *, sector_t); 102623 sector_t (*size)(struct mddev *, sector_t, int); 102624 int (*check_reshape)(struct mddev *); 102625 int (*start_reshape)(struct mddev *); 102626 void (*finish_reshape)(struct mddev *); 102627 void (*update_reshape_pos)(struct mddev *); 102628 void (*quiesce)(struct mddev *, int); 102629 void * (*takeover)(struct mddev *); 102630 int (*change_consistency_policy)(struct mddev *, const char *); 102631 }; 102632 102633 struct md_thread { 102634 void (*run)(struct md_thread *); 102635 struct mddev *mddev; 102636 wait_queue_head_t wqueue; 102637 long unsigned int flags; 102638 struct task_struct *tsk; 102639 long unsigned int timeout; 102640 void *private; 102641 }; 102642 102643 struct bitmap_page; 102644 102645 struct bitmap_counts { 102646 spinlock_t lock; 102647 struct bitmap_page *bp; 102648 long unsigned int pages; 102649 long unsigned int missing_pages; 102650 long unsigned int chunkshift; 102651 long unsigned int chunks; 102652 }; 102653 102654 struct bitmap_storage { 102655 struct file *file; 102656 struct page *sb_page; 102657 struct page **filemap; 102658 long unsigned int *filemap_attr; 102659 long unsigned int file_pages; 102660 long unsigned int bytes; 102661 }; 102662 102663 struct bitmap { 102664 struct bitmap_counts counts; 102665 struct mddev *mddev; 102666 __u64 events_cleared; 102667 int need_sync; 102668 struct bitmap_storage storage; 102669 long unsigned int flags; 102670 int allclean; 102671 atomic_t behind_writes; 102672 long unsigned int behind_writes_used; 102673 long unsigned int daemon_lastrun; 102674 long unsigned int last_end_sync; 102675 atomic_t pending_writes; 102676 wait_queue_head_t write_wait; 102677 wait_queue_head_t overflow_wait; 102678 wait_queue_head_t behind_wait; 102679 struct kernfs_node *sysfs_can_clear; 102680 int cluster_slot; 102681 }; 102682 102683 enum recovery_flags { 102684 MD_RECOVERY_RUNNING = 0, 102685 MD_RECOVERY_SYNC = 1, 102686 MD_RECOVERY_RECOVER = 2, 102687 MD_RECOVERY_INTR = 3, 102688 MD_RECOVERY_DONE = 4, 102689 MD_RECOVERY_NEEDED = 5, 102690 MD_RECOVERY_REQUESTED = 6, 102691 MD_RECOVERY_CHECK = 7, 102692 MD_RECOVERY_RESHAPE = 8, 102693 MD_RECOVERY_FROZEN = 9, 102694 MD_RECOVERY_ERROR = 10, 102695 MD_RECOVERY_WAIT = 11, 102696 MD_RESYNCING_REMOTE = 12, 102697 }; 102698 102699 struct md_sysfs_entry { 102700 struct attribute attr; 102701 ssize_t (*show)(struct mddev *, char *); 102702 ssize_t (*store)(struct mddev *, const char *, size_t); 102703 }; 102704 102705 struct bitmap_page { 102706 char *map; 102707 unsigned int hijacked: 1; 102708 unsigned int pending: 1; 102709 unsigned int count: 30; 102710 }; 102711 102712 struct md_io { 102713 struct mddev *mddev; 102714 bio_end_io_t *orig_bi_end_io; 102715 void *orig_bi_private; 102716 long unsigned int start_time; 102717 struct block_device *part; 102718 }; 102719 102720 struct super_type { 102721 char *name; 102722 struct module *owner; 102723 int (*load_super)(struct md_rdev *, struct md_rdev *, int); 102724 int (*validate_super)(struct mddev *, struct md_rdev *); 102725 void (*sync_super)(struct mddev *, struct md_rdev *); 102726 long long unsigned int (*rdev_size_change)(struct md_rdev *, sector_t); 102727 int (*allow_new_offset)(struct md_rdev *, long long unsigned int); 102728 }; 102729 102730 struct rdev_sysfs_entry { 102731 struct attribute attr; 102732 ssize_t (*show)(struct md_rdev *, char *); 102733 ssize_t (*store)(struct md_rdev *, const char *, size_t); 102734 }; 102735 102736 enum array_state { 102737 clear = 0, 102738 inactive = 1, 102739 suspended = 2, 102740 readonly = 3, 102741 read_auto = 4, 102742 clean = 5, 102743 active = 6, 102744 write_pending = 7, 102745 active_idle = 8, 102746 broken = 9, 102747 bad_word = 10, 102748 }; 102749 102750 struct detected_devices_node { 102751 struct list_head list; 102752 dev_t dev; 102753 }; 102754 102755 typedef __u16 bitmap_counter_t; 102756 102757 enum bitmap_state { 102758 BITMAP_STALE = 1, 102759 BITMAP_WRITE_ERROR = 2, 102760 BITMAP_HOSTENDIAN = 15, 102761 }; 102762 102763 struct bitmap_super_s { 102764 __le32 magic; 102765 __le32 version; 102766 __u8 uuid[16]; 102767 __le64 events; 102768 __le64 events_cleared; 102769 __le64 sync_size; 102770 __le32 state; 102771 __le32 chunksize; 102772 __le32 daemon_sleep; 102773 __le32 write_behind; 102774 __le32 sectors_reserved; 102775 __le32 nodes; 102776 __u8 cluster_name[64]; 102777 __u8 pad[120]; 102778 }; 102779 102780 typedef struct bitmap_super_s bitmap_super_t; 102781 102782 enum bitmap_page_attr { 102783 BITMAP_PAGE_DIRTY = 0, 102784 BITMAP_PAGE_PENDING = 1, 102785 BITMAP_PAGE_NEEDWRITE = 2, 102786 }; 102787 102788 struct md_setup_args { 102789 int minor; 102790 int partitioned; 102791 int level; 102792 int chunk; 102793 char *device_names; 102794 }; 102795 102796 struct dm_ioctl { 102797 __u32 version[3]; 102798 __u32 data_size; 102799 __u32 data_start; 102800 __u32 target_count; 102801 __s32 open_count; 102802 __u32 flags; 102803 __u32 event_nr; 102804 __u32 padding; 102805 __u64 dev; 102806 char name[128]; 102807 char uuid[129]; 102808 char data[7]; 102809 }; 102810 102811 struct dm_target_spec { 102812 __u64 sector_start; 102813 __u64 length; 102814 __s32 status; 102815 __u32 next; 102816 char target_type[16]; 102817 }; 102818 102819 struct dm_device { 102820 struct dm_ioctl dmi; 102821 struct dm_target_spec *table[256]; 102822 char *target_args_array[256]; 102823 struct list_head list; 102824 }; 102825 102826 typedef enum { 102827 STATUSTYPE_INFO = 0, 102828 STATUSTYPE_TABLE = 1, 102829 } status_type_t; 102830 102831 union map_info___2 { 102832 void *ptr; 102833 }; 102834 102835 struct dm_target; 102836 102837 typedef int (*dm_ctr_fn)(struct dm_target *, unsigned int, char **); 102838 102839 struct dm_table; 102840 102841 struct target_type; 102842 102843 struct dm_target { 102844 struct dm_table *table; 102845 struct target_type *type; 102846 sector_t begin; 102847 sector_t len; 102848 uint32_t max_io_len; 102849 unsigned int num_flush_bios; 102850 unsigned int num_discard_bios; 102851 unsigned int num_secure_erase_bios; 102852 unsigned int num_write_same_bios; 102853 unsigned int num_write_zeroes_bios; 102854 unsigned int per_io_data_size; 102855 void *private; 102856 char *error; 102857 bool flush_supported: 1; 102858 bool discards_supported: 1; 102859 bool limit_swap_bios: 1; 102860 }; 102861 102862 typedef void (*dm_dtr_fn)(struct dm_target *); 102863 102864 typedef int (*dm_map_fn)(struct dm_target *, struct bio *); 102865 102866 typedef int (*dm_clone_and_map_request_fn)(struct dm_target *, struct request *, union map_info___2 *, struct request **); 102867 102868 typedef void (*dm_release_clone_request_fn)(struct request *, union map_info___2 *); 102869 102870 typedef int (*dm_endio_fn)(struct dm_target *, struct bio *, blk_status_t *); 102871 102872 typedef int (*dm_request_endio_fn)(struct dm_target *, struct request *, blk_status_t, union map_info___2 *); 102873 102874 typedef void (*dm_presuspend_fn)(struct dm_target *); 102875 102876 typedef void (*dm_presuspend_undo_fn)(struct dm_target *); 102877 102878 typedef void (*dm_postsuspend_fn)(struct dm_target *); 102879 102880 typedef int (*dm_preresume_fn)(struct dm_target *); 102881 102882 typedef void (*dm_resume_fn)(struct dm_target *); 102883 102884 typedef void (*dm_status_fn)(struct dm_target *, status_type_t, unsigned int, char *, unsigned int); 102885 102886 typedef int (*dm_message_fn)(struct dm_target *, unsigned int, char **, char *, unsigned int); 102887 102888 typedef int (*dm_prepare_ioctl_fn)(struct dm_target *, struct block_device **); 102889 102890 struct dm_report_zones_args; 102891 102892 typedef int (*dm_report_zones_fn)(struct dm_target *, struct dm_report_zones_args *, unsigned int); 102893 102894 struct dm_report_zones_args { 102895 struct dm_target *tgt; 102896 sector_t next_sector; 102897 void *orig_data; 102898 report_zones_cb orig_cb; 102899 unsigned int zone_idx; 102900 sector_t start; 102901 }; 102902 102903 struct dm_dev; 102904 102905 typedef int (*iterate_devices_callout_fn)(struct dm_target *, struct dm_dev *, sector_t, sector_t, void *); 102906 102907 struct dm_dev { 102908 struct block_device *bdev; 102909 struct dax_device *dax_dev; 102910 fmode_t mode; 102911 char name[16]; 102912 }; 102913 102914 typedef int (*dm_iterate_devices_fn)(struct dm_target *, iterate_devices_callout_fn, void *); 102915 102916 typedef void (*dm_io_hints_fn)(struct dm_target *, struct queue_limits *); 102917 102918 typedef int (*dm_busy_fn)(struct dm_target *); 102919 102920 typedef long int (*dm_dax_direct_access_fn)(struct dm_target *, long unsigned int, long int, void **, pfn_t *); 102921 102922 typedef size_t (*dm_dax_copy_iter_fn)(struct dm_target *, long unsigned int, void *, size_t, struct iov_iter *); 102923 102924 typedef int (*dm_dax_zero_page_range_fn)(struct dm_target *, long unsigned int, size_t); 102925 102926 struct target_type { 102927 uint64_t features; 102928 const char *name; 102929 struct module *module; 102930 unsigned int version[3]; 102931 dm_ctr_fn ctr; 102932 dm_dtr_fn dtr; 102933 dm_map_fn map; 102934 dm_clone_and_map_request_fn clone_and_map_rq; 102935 dm_release_clone_request_fn release_clone_rq; 102936 dm_endio_fn end_io; 102937 dm_request_endio_fn rq_end_io; 102938 dm_presuspend_fn presuspend; 102939 dm_presuspend_undo_fn presuspend_undo; 102940 dm_postsuspend_fn postsuspend; 102941 dm_preresume_fn preresume; 102942 dm_resume_fn resume; 102943 dm_status_fn status; 102944 dm_message_fn message; 102945 dm_prepare_ioctl_fn prepare_ioctl; 102946 dm_report_zones_fn report_zones; 102947 dm_busy_fn busy; 102948 dm_iterate_devices_fn iterate_devices; 102949 dm_io_hints_fn io_hints; 102950 dm_dax_direct_access_fn direct_access; 102951 dm_dax_copy_iter_fn dax_copy_from_iter; 102952 dm_dax_copy_iter_fn dax_copy_to_iter; 102953 dm_dax_zero_page_range_fn dax_zero_page_range; 102954 struct list_head list; 102955 }; 102956 102957 enum dm_uevent_type { 102958 DM_UEVENT_PATH_FAILED = 0, 102959 DM_UEVENT_PATH_REINSTATED = 1, 102960 }; 102961 102962 struct mapped_device; 102963 102964 struct dm_uevent { 102965 struct mapped_device *md; 102966 enum kobject_action action; 102967 struct kobj_uevent_env ku_env; 102968 struct list_head elist; 102969 char name[128]; 102970 char uuid[129]; 102971 }; 102972 102973 enum dm_queue_mode { 102974 DM_TYPE_NONE = 0, 102975 DM_TYPE_BIO_BASED = 1, 102976 DM_TYPE_REQUEST_BASED = 2, 102977 DM_TYPE_DAX_BIO_BASED = 3, 102978 }; 102979 102980 struct mapped_device___2; 102981 102982 struct dm_md_mempools; 102983 102984 struct dm_table { 102985 struct mapped_device___2 *md; 102986 enum dm_queue_mode type; 102987 unsigned int depth; 102988 unsigned int counts[16]; 102989 sector_t *index[16]; 102990 unsigned int num_targets; 102991 unsigned int num_allocated; 102992 sector_t *highs; 102993 struct dm_target *targets; 102994 struct target_type *immutable_target_type; 102995 bool integrity_supported: 1; 102996 bool singleton: 1; 102997 unsigned int integrity_added: 1; 102998 fmode_t mode; 102999 struct list_head devices; 103000 void (*event_fn)(void *); 103001 void *event_context; 103002 struct dm_md_mempools *mempools; 103003 }; 103004 103005 struct dm_stats_last_position; 103006 103007 struct dm_stats { 103008 struct mutex mutex; 103009 struct list_head list; 103010 struct dm_stats_last_position *last; 103011 sector_t last_sector; 103012 unsigned int last_rw; 103013 }; 103014 103015 struct dm_stats_aux { 103016 bool merged; 103017 long long unsigned int duration_ns; 103018 }; 103019 103020 struct dm_kobject_holder { 103021 struct kobject kobj; 103022 struct completion completion; 103023 }; 103024 103025 struct mapped_device___2 { 103026 struct mutex suspend_lock; 103027 struct mutex table_devices_lock; 103028 struct list_head table_devices; 103029 void *map; 103030 long unsigned int flags; 103031 struct mutex type_lock; 103032 enum dm_queue_mode type; 103033 int numa_node_id; 103034 struct request_queue *queue; 103035 atomic_t holders; 103036 atomic_t open_count; 103037 struct dm_target *immutable_target; 103038 struct target_type *immutable_target_type; 103039 char name[16]; 103040 struct gendisk *disk; 103041 struct dax_device *dax_dev; 103042 struct work_struct work; 103043 wait_queue_head_t wait; 103044 spinlock_t deferred_lock; 103045 struct bio_list deferred; 103046 void *interface_ptr; 103047 wait_queue_head_t eventq; 103048 atomic_t event_nr; 103049 atomic_t uevent_seq; 103050 struct list_head uevent_list; 103051 spinlock_t uevent_lock; 103052 unsigned int internal_suspend_count; 103053 struct bio_set io_bs; 103054 struct bio_set bs; 103055 struct workqueue_struct *wq; 103056 struct hd_geometry geometry; 103057 struct dm_kobject_holder kobj_holder; 103058 int swap_bios; 103059 struct semaphore swap_bios_semaphore; 103060 struct mutex swap_bios_lock; 103061 struct dm_stats stats; 103062 struct blk_mq_tag_set *tag_set; 103063 bool init_tio_pdu: 1; 103064 struct srcu_struct io_barrier; 103065 }; 103066 103067 struct dm_md_mempools { 103068 struct bio_set bs; 103069 struct bio_set io_bs; 103070 }; 103071 103072 struct dm_io; 103073 103074 struct clone_info { 103075 struct dm_table *map; 103076 struct bio *bio; 103077 struct dm_io *io; 103078 sector_t sector; 103079 unsigned int sector_count; 103080 }; 103081 103082 struct dm_target_io { 103083 unsigned int magic; 103084 struct dm_io *io; 103085 struct dm_target *ti; 103086 unsigned int target_bio_nr; 103087 unsigned int *len_ptr; 103088 bool inside_dm_io; 103089 struct bio clone; 103090 }; 103091 103092 struct dm_io { 103093 unsigned int magic; 103094 struct mapped_device___2 *md; 103095 blk_status_t status; 103096 atomic_t io_count; 103097 struct bio *orig_bio; 103098 long unsigned int start_time; 103099 spinlock_t endio_lock; 103100 struct dm_stats_aux stats_aux; 103101 struct dm_target_io tio; 103102 }; 103103 103104 struct table_device { 103105 struct list_head list; 103106 refcount_t count; 103107 struct dm_dev dm_dev; 103108 }; 103109 103110 struct dm_pr { 103111 u64 old_key; 103112 u64 new_key; 103113 u32 flags; 103114 bool fail_early; 103115 }; 103116 103117 struct dm_arg_set { 103118 unsigned int argc; 103119 char **argv; 103120 }; 103121 103122 struct dm_arg { 103123 unsigned int min; 103124 unsigned int max; 103125 char *error; 103126 }; 103127 103128 struct dm_dev_internal { 103129 struct list_head list; 103130 refcount_t count; 103131 struct dm_dev *dm_dev; 103132 }; 103133 103134 enum suspend_mode { 103135 PRESUSPEND = 0, 103136 PRESUSPEND_UNDO = 1, 103137 POSTSUSPEND = 2, 103138 }; 103139 103140 struct linear_c { 103141 struct dm_dev *dev; 103142 sector_t start; 103143 }; 103144 103145 struct stripe { 103146 struct dm_dev *dev; 103147 sector_t physical_start; 103148 atomic_t error_count; 103149 }; 103150 103151 struct stripe_c { 103152 uint32_t stripes; 103153 int stripes_shift; 103154 sector_t stripe_width; 103155 uint32_t chunk_size; 103156 int chunk_size_shift; 103157 struct dm_target *ti; 103158 struct work_struct trigger_event; 103159 struct stripe stripe[0]; 103160 }; 103161 103162 struct dm_target_deps { 103163 __u32 count; 103164 __u32 padding; 103165 __u64 dev[0]; 103166 }; 103167 103168 struct dm_name_list { 103169 __u64 dev; 103170 __u32 next; 103171 char name[0]; 103172 }; 103173 103174 struct dm_target_versions { 103175 __u32 next; 103176 __u32 version[3]; 103177 char name[0]; 103178 }; 103179 103180 struct dm_target_msg { 103181 __u64 sector; 103182 char message[0]; 103183 }; 103184 103185 enum { 103186 DM_VERSION_CMD = 0, 103187 DM_REMOVE_ALL_CMD = 1, 103188 DM_LIST_DEVICES_CMD = 2, 103189 DM_DEV_CREATE_CMD = 3, 103190 DM_DEV_REMOVE_CMD = 4, 103191 DM_DEV_RENAME_CMD = 5, 103192 DM_DEV_SUSPEND_CMD = 6, 103193 DM_DEV_STATUS_CMD = 7, 103194 DM_DEV_WAIT_CMD = 8, 103195 DM_TABLE_LOAD_CMD = 9, 103196 DM_TABLE_CLEAR_CMD = 10, 103197 DM_TABLE_DEPS_CMD = 11, 103198 DM_TABLE_STATUS_CMD = 12, 103199 DM_LIST_VERSIONS_CMD = 13, 103200 DM_TARGET_MSG_CMD = 14, 103201 DM_DEV_SET_GEOMETRY_CMD = 15, 103202 DM_DEV_ARM_POLL_CMD = 16, 103203 DM_GET_TARGET_VERSION_CMD = 17, 103204 }; 103205 103206 struct dm_file { 103207 volatile unsigned int global_event_nr; 103208 }; 103209 103210 struct hash_cell { 103211 struct list_head name_list; 103212 struct list_head uuid_list; 103213 char *name; 103214 char *uuid; 103215 struct mapped_device___2 *md; 103216 struct dm_table *new_map; 103217 }; 103218 103219 struct vers_iter { 103220 size_t param_size; 103221 struct dm_target_versions *vers; 103222 struct dm_target_versions *old_vers; 103223 char *end; 103224 uint32_t flags; 103225 }; 103226 103227 typedef int (*ioctl_fn___2)(struct file *, struct dm_ioctl *, size_t); 103228 103229 struct dm_io_region { 103230 struct block_device *bdev; 103231 sector_t sector; 103232 sector_t count; 103233 }; 103234 103235 struct page_list { 103236 struct page_list *next; 103237 struct page *page; 103238 }; 103239 103240 typedef void (*io_notify_fn)(long unsigned int, void *); 103241 103242 enum dm_io_mem_type { 103243 DM_IO_PAGE_LIST = 0, 103244 DM_IO_BIO = 1, 103245 DM_IO_VMA = 2, 103246 DM_IO_KMEM = 3, 103247 }; 103248 103249 struct dm_io_memory { 103250 enum dm_io_mem_type type; 103251 unsigned int offset; 103252 union { 103253 struct page_list *pl; 103254 struct bio *bio; 103255 void *vma; 103256 void *addr; 103257 } ptr; 103258 }; 103259 103260 struct dm_io_notify { 103261 io_notify_fn fn; 103262 void *context; 103263 }; 103264 103265 struct dm_io_client; 103266 103267 struct dm_io_request { 103268 int bi_op; 103269 int bi_op_flags; 103270 struct dm_io_memory mem; 103271 struct dm_io_notify notify; 103272 struct dm_io_client *client; 103273 }; 103274 103275 struct dm_io_client { 103276 mempool_t pool; 103277 struct bio_set bios; 103278 }; 103279 103280 struct io { 103281 long unsigned int error_bits; 103282 atomic_t count; 103283 struct dm_io_client *client; 103284 io_notify_fn callback; 103285 void *context; 103286 void *vma_invalidate_address; 103287 long unsigned int vma_invalidate_size; 103288 long: 64; 103289 }; 103290 103291 struct dpages { 103292 void (*get_page)(struct dpages *, struct page **, long unsigned int *, unsigned int *); 103293 void (*next_page)(struct dpages *); 103294 union { 103295 unsigned int context_u; 103296 struct bvec_iter context_bi; 103297 }; 103298 void *context_ptr; 103299 void *vma_invalidate_address; 103300 long unsigned int vma_invalidate_size; 103301 }; 103302 103303 struct sync_io { 103304 long unsigned int error_bits; 103305 struct completion wait; 103306 }; 103307 103308 struct dm_kcopyd_throttle { 103309 unsigned int throttle; 103310 unsigned int num_io_jobs; 103311 unsigned int io_period; 103312 unsigned int total_period; 103313 unsigned int last_jiffies; 103314 }; 103315 103316 typedef void (*dm_kcopyd_notify_fn)(int, long unsigned int, void *); 103317 103318 struct dm_kcopyd_client { 103319 struct page_list *pages; 103320 unsigned int nr_reserved_pages; 103321 unsigned int nr_free_pages; 103322 unsigned int sub_job_size; 103323 struct dm_io_client *io_client; 103324 wait_queue_head_t destroyq; 103325 mempool_t job_pool; 103326 struct workqueue_struct *kcopyd_wq; 103327 struct work_struct kcopyd_work; 103328 struct dm_kcopyd_throttle *throttle; 103329 atomic_t nr_jobs; 103330 spinlock_t job_lock; 103331 struct list_head callback_jobs; 103332 struct list_head complete_jobs; 103333 struct list_head io_jobs; 103334 struct list_head pages_jobs; 103335 }; 103336 103337 struct kcopyd_job { 103338 struct dm_kcopyd_client *kc; 103339 struct list_head list; 103340 long unsigned int flags; 103341 int read_err; 103342 long unsigned int write_err; 103343 int rw; 103344 struct dm_io_region source; 103345 unsigned int num_dests; 103346 struct dm_io_region dests[8]; 103347 struct page_list *pages; 103348 dm_kcopyd_notify_fn fn; 103349 void *context; 103350 struct mutex lock; 103351 atomic_t sub_jobs; 103352 sector_t progress; 103353 sector_t write_offset; 103354 struct kcopyd_job *master_job; 103355 }; 103356 103357 struct dm_sysfs_attr { 103358 struct attribute attr; 103359 ssize_t (*show)(struct mapped_device___2 *, char *); 103360 ssize_t (*store)(struct mapped_device___2 *, const char *, size_t); 103361 }; 103362 103363 struct dm_stats_last_position { 103364 sector_t last_sector; 103365 unsigned int last_rw; 103366 }; 103367 103368 struct dm_stat_percpu { 103369 long long unsigned int sectors[2]; 103370 long long unsigned int ios[2]; 103371 long long unsigned int merges[2]; 103372 long long unsigned int ticks[2]; 103373 long long unsigned int io_ticks[2]; 103374 long long unsigned int io_ticks_total; 103375 long long unsigned int time_in_queue; 103376 long long unsigned int *histogram; 103377 }; 103378 103379 struct dm_stat_shared { 103380 atomic_t in_flight[2]; 103381 long long unsigned int stamp; 103382 struct dm_stat_percpu tmp; 103383 }; 103384 103385 struct dm_stat { 103386 struct list_head list_entry; 103387 int id; 103388 unsigned int stat_flags; 103389 size_t n_entries; 103390 sector_t start; 103391 sector_t end; 103392 sector_t step; 103393 unsigned int n_histogram_entries; 103394 long long unsigned int *histogram_boundaries; 103395 const char *program_id; 103396 const char *aux_data; 103397 struct callback_head callback_head; 103398 size_t shared_alloc_size; 103399 size_t percpu_alloc_size; 103400 size_t histogram_alloc_size; 103401 struct dm_stat_percpu *stat_percpu[8192]; 103402 struct dm_stat_shared stat_shared[0]; 103403 }; 103404 103405 struct dm_rq_target_io; 103406 103407 struct dm_rq_clone_bio_info { 103408 struct bio *orig; 103409 struct dm_rq_target_io *tio; 103410 struct bio clone; 103411 }; 103412 103413 struct dm_rq_target_io { 103414 struct mapped_device___2 *md; 103415 struct dm_target *ti; 103416 struct request *orig; 103417 struct request *clone; 103418 struct kthread_work work; 103419 blk_status_t error; 103420 union map_info___2 info; 103421 struct dm_stats_aux stats_aux; 103422 long unsigned int duration_jiffies; 103423 unsigned int n_sectors; 103424 unsigned int completed; 103425 }; 103426 103427 struct dm_buffer; 103428 103429 struct dm_bufio_client { 103430 struct mutex lock; 103431 struct list_head lru[2]; 103432 long unsigned int n_buffers[2]; 103433 struct block_device *bdev; 103434 unsigned int block_size; 103435 s8 sectors_per_block_bits; 103436 void (*alloc_callback)(struct dm_buffer *); 103437 void (*write_callback)(struct dm_buffer *); 103438 struct kmem_cache *slab_buffer; 103439 struct kmem_cache *slab_cache; 103440 struct dm_io_client *dm_io; 103441 struct list_head reserved_buffers; 103442 unsigned int need_reserved_buffers; 103443 unsigned int minimum_buffers; 103444 struct rb_root buffer_tree; 103445 wait_queue_head_t free_buffer_wait; 103446 sector_t start; 103447 int async_write_error; 103448 struct list_head client_list; 103449 struct shrinker shrinker; 103450 struct work_struct shrink_work; 103451 atomic_long_t need_shrink; 103452 }; 103453 103454 struct dm_buffer { 103455 struct rb_node node; 103456 struct list_head lru_list; 103457 struct list_head global_list; 103458 sector_t block; 103459 void *data; 103460 unsigned char data_mode; 103461 unsigned char list_mode; 103462 blk_status_t read_error; 103463 blk_status_t write_error; 103464 unsigned int accessed; 103465 unsigned int hold_count; 103466 long unsigned int state; 103467 long unsigned int last_accessed; 103468 unsigned int dirty_start; 103469 unsigned int dirty_end; 103470 unsigned int write_start; 103471 unsigned int write_end; 103472 struct dm_bufio_client *c; 103473 struct list_head write_list; 103474 void (*end_io)(struct dm_buffer *, blk_status_t); 103475 }; 103476 103477 enum data_mode { 103478 DATA_MODE_SLAB = 0, 103479 DATA_MODE_GET_FREE_PAGES = 1, 103480 DATA_MODE_VMALLOC = 2, 103481 DATA_MODE_LIMIT = 3, 103482 }; 103483 103484 enum new_flag { 103485 NF_FRESH = 0, 103486 NF_READ = 1, 103487 NF_GET = 2, 103488 NF_PREFETCH = 3, 103489 }; 103490 103491 typedef sector_t chunk_t; 103492 103493 struct dm_exception { 103494 struct hlist_bl_node hash_list; 103495 chunk_t old_chunk; 103496 chunk_t new_chunk; 103497 }; 103498 103499 struct dm_exception_store; 103500 103501 struct dm_exception_store_type { 103502 const char *name; 103503 struct module *module; 103504 int (*ctr)(struct dm_exception_store *, char *); 103505 void (*dtr)(struct dm_exception_store *); 103506 int (*read_metadata)(struct dm_exception_store *, int (*)(void *, chunk_t, chunk_t), void *); 103507 int (*prepare_exception)(struct dm_exception_store *, struct dm_exception *); 103508 void (*commit_exception)(struct dm_exception_store *, struct dm_exception *, int, void (*)(void *, int), void *); 103509 int (*prepare_merge)(struct dm_exception_store *, chunk_t *, chunk_t *); 103510 int (*commit_merge)(struct dm_exception_store *, int); 103511 void (*drop_snapshot)(struct dm_exception_store *); 103512 unsigned int (*status)(struct dm_exception_store *, status_type_t, char *, unsigned int); 103513 void (*usage)(struct dm_exception_store *, sector_t *, sector_t *, sector_t *); 103514 struct list_head list; 103515 }; 103516 103517 struct dm_snapshot; 103518 103519 struct dm_exception_store { 103520 struct dm_exception_store_type *type; 103521 struct dm_snapshot *snap; 103522 unsigned int chunk_size; 103523 unsigned int chunk_mask; 103524 unsigned int chunk_shift; 103525 void *context; 103526 bool userspace_supports_overflow; 103527 }; 103528 103529 struct dm_exception_table { 103530 uint32_t hash_mask; 103531 unsigned int hash_shift; 103532 struct hlist_bl_head *table; 103533 }; 103534 103535 struct dm_kcopyd_client___2; 103536 103537 struct dm_snapshot { 103538 struct rw_semaphore lock; 103539 struct dm_dev *origin; 103540 struct dm_dev *cow; 103541 struct dm_target *ti; 103542 struct list_head list; 103543 int valid; 103544 int snapshot_overflowed; 103545 int active; 103546 atomic_t pending_exceptions_count; 103547 spinlock_t pe_allocation_lock; 103548 sector_t exception_start_sequence; 103549 sector_t exception_complete_sequence; 103550 struct rb_root out_of_order_tree; 103551 mempool_t pending_pool; 103552 struct dm_exception_table pending; 103553 struct dm_exception_table complete; 103554 spinlock_t pe_lock; 103555 spinlock_t tracked_chunk_lock; 103556 struct hlist_head tracked_chunk_hash[16]; 103557 struct dm_exception_store *store; 103558 unsigned int in_progress; 103559 struct wait_queue_head in_progress_wait; 103560 struct dm_kcopyd_client___2 *kcopyd_client; 103561 long unsigned int state_bits; 103562 chunk_t first_merging_chunk; 103563 int num_merging_chunks; 103564 bool merge_failed: 1; 103565 bool discard_zeroes_cow: 1; 103566 bool discard_passdown_origin: 1; 103567 struct bio_list bios_queued_during_merge; 103568 struct bio flush_bio; 103569 }; 103570 103571 struct dm_snap_pending_exception { 103572 struct dm_exception e; 103573 struct bio_list origin_bios; 103574 struct bio_list snapshot_bios; 103575 struct dm_snapshot *snap; 103576 int started; 103577 int copy_error; 103578 sector_t exception_sequence; 103579 struct rb_node out_of_order_node; 103580 struct bio *full_bio; 103581 bio_end_io_t *full_bio_end_io; 103582 }; 103583 103584 struct dm_snap_tracked_chunk { 103585 struct hlist_node node; 103586 chunk_t chunk; 103587 }; 103588 103589 struct origin { 103590 struct block_device *bdev; 103591 struct list_head hash_list; 103592 struct list_head snapshots; 103593 }; 103594 103595 struct dm_origin { 103596 struct dm_dev *dev; 103597 struct dm_target *ti; 103598 unsigned int split_boundary; 103599 struct list_head hash_list; 103600 }; 103601 103602 struct dm_exception_table_lock { 103603 struct hlist_bl_head *complete_slot; 103604 struct hlist_bl_head *pending_slot; 103605 }; 103606 103607 struct transient_c { 103608 sector_t next_free; 103609 }; 103610 103611 struct disk_header { 103612 __le32 magic; 103613 __le32 valid; 103614 __le32 version; 103615 __le32 chunk_size; 103616 }; 103617 103618 struct disk_exception { 103619 __le64 old_chunk; 103620 __le64 new_chunk; 103621 }; 103622 103623 struct core_exception { 103624 uint64_t old_chunk; 103625 uint64_t new_chunk; 103626 }; 103627 103628 struct commit_callback { 103629 void (*callback)(void *, int); 103630 void *context; 103631 }; 103632 103633 struct pstore { 103634 struct dm_exception_store *store; 103635 int version; 103636 int valid; 103637 uint32_t exceptions_per_area; 103638 void *area; 103639 void *zero_area; 103640 void *header_area; 103641 chunk_t current_area; 103642 chunk_t next_free; 103643 uint32_t current_committed; 103644 atomic_t pending_count; 103645 uint32_t callback_count; 103646 struct commit_callback *callbacks; 103647 struct dm_io_client *io_client; 103648 struct workqueue_struct *metadata_wq; 103649 }; 103650 103651 struct mdata_req { 103652 struct dm_io_region *where; 103653 struct dm_io_request *io_req; 103654 struct work_struct work; 103655 int result; 103656 }; 103657 103658 struct dm_bufio_client___2; 103659 103660 struct dm_buffer___2; 103661 103662 struct dm_bio_details { 103663 struct gendisk *bi_disk; 103664 u8 bi_partno; 103665 int __bi_remaining; 103666 long unsigned int bi_flags; 103667 struct bvec_iter bi_iter; 103668 bio_end_io_t *bi_end_io; 103669 struct bio_integrity_payload *bi_integrity; 103670 }; 103671 103672 typedef sector_t region_t; 103673 103674 struct dm_dirty_log_type; 103675 103676 struct dm_dirty_log { 103677 struct dm_dirty_log_type *type; 103678 int (*flush_callback_fn)(struct dm_target *); 103679 void *context; 103680 }; 103681 103682 struct dm_dirty_log_type { 103683 const char *name; 103684 struct module *module; 103685 struct list_head list; 103686 int (*ctr)(struct dm_dirty_log *, struct dm_target *, unsigned int, char **); 103687 void (*dtr)(struct dm_dirty_log *); 103688 int (*presuspend)(struct dm_dirty_log *); 103689 int (*postsuspend)(struct dm_dirty_log *); 103690 int (*resume)(struct dm_dirty_log *); 103691 uint32_t (*get_region_size)(struct dm_dirty_log *); 103692 int (*is_clean)(struct dm_dirty_log *, region_t); 103693 int (*in_sync)(struct dm_dirty_log *, region_t, int); 103694 int (*flush)(struct dm_dirty_log *); 103695 void (*mark_region)(struct dm_dirty_log *, region_t); 103696 void (*clear_region)(struct dm_dirty_log *, region_t); 103697 int (*get_resync_work)(struct dm_dirty_log *, region_t *); 103698 void (*set_region_sync)(struct dm_dirty_log *, region_t, int); 103699 region_t (*get_sync_count)(struct dm_dirty_log *); 103700 int (*status)(struct dm_dirty_log *, status_type_t, char *, unsigned int); 103701 int (*is_remote_recovering)(struct dm_dirty_log *, region_t); 103702 }; 103703 103704 enum dm_rh_region_states { 103705 DM_RH_CLEAN = 1, 103706 DM_RH_DIRTY = 2, 103707 DM_RH_NOSYNC = 4, 103708 DM_RH_RECOVERING = 8, 103709 }; 103710 103711 enum dm_raid1_error { 103712 DM_RAID1_WRITE_ERROR = 0, 103713 DM_RAID1_FLUSH_ERROR = 1, 103714 DM_RAID1_SYNC_ERROR = 2, 103715 DM_RAID1_READ_ERROR = 3, 103716 }; 103717 103718 struct mirror_set; 103719 103720 struct mirror { 103721 struct mirror_set *ms; 103722 atomic_t error_count; 103723 long unsigned int error_type; 103724 struct dm_dev *dev; 103725 sector_t offset; 103726 }; 103727 103728 struct dm_region_hash; 103729 103730 struct mirror_set { 103731 struct dm_target *ti; 103732 struct list_head list; 103733 uint64_t features; 103734 spinlock_t lock; 103735 struct bio_list reads; 103736 struct bio_list writes; 103737 struct bio_list failures; 103738 struct bio_list holds; 103739 struct dm_region_hash *rh; 103740 struct dm_kcopyd_client___2 *kcopyd_client; 103741 struct dm_io_client *io_client; 103742 region_t nr_regions; 103743 int in_sync; 103744 int log_failure; 103745 int leg_failure; 103746 atomic_t suspend; 103747 atomic_t default_mirror; 103748 struct workqueue_struct *kmirrord_wq; 103749 struct work_struct kmirrord_work; 103750 struct timer_list timer; 103751 long unsigned int timer_pending; 103752 struct work_struct trigger_event; 103753 unsigned int nr_mirrors; 103754 struct mirror mirror[0]; 103755 }; 103756 103757 struct dm_raid1_bio_record { 103758 struct mirror *m; 103759 struct dm_bio_details details; 103760 region_t write_region; 103761 }; 103762 103763 struct dm_region; 103764 103765 struct log_header_disk { 103766 __le32 magic; 103767 __le32 version; 103768 __le64 nr_regions; 103769 }; 103770 103771 struct log_header_core { 103772 uint32_t magic; 103773 uint32_t version; 103774 uint64_t nr_regions; 103775 }; 103776 103777 enum sync { 103778 DEFAULTSYNC = 0, 103779 NOSYNC = 1, 103780 FORCESYNC = 2, 103781 }; 103782 103783 struct log_c { 103784 struct dm_target *ti; 103785 int touched_dirtied; 103786 int touched_cleaned; 103787 int flush_failed; 103788 uint32_t region_size; 103789 unsigned int region_count; 103790 region_t sync_count; 103791 unsigned int bitset_uint32_count; 103792 uint32_t *clean_bits; 103793 uint32_t *sync_bits; 103794 uint32_t *recovering_bits; 103795 int sync_search; 103796 enum sync sync; 103797 struct dm_io_request io_req; 103798 int log_dev_failed; 103799 int log_dev_flush_failed; 103800 struct dm_dev *log_dev; 103801 struct log_header_core header; 103802 struct dm_io_region header_location; 103803 struct log_header_disk *disk_header; 103804 }; 103805 103806 struct dm_region_hash___2 { 103807 uint32_t region_size; 103808 unsigned int region_shift; 103809 struct dm_dirty_log *log; 103810 rwlock_t hash_lock; 103811 unsigned int mask; 103812 unsigned int nr_buckets; 103813 unsigned int prime; 103814 unsigned int shift; 103815 struct list_head *buckets; 103816 int flush_failure; 103817 unsigned int max_recovery; 103818 spinlock_t region_lock; 103819 atomic_t recovery_in_flight; 103820 struct list_head clean_regions; 103821 struct list_head quiesced_regions; 103822 struct list_head recovered_regions; 103823 struct list_head failed_recovered_regions; 103824 struct semaphore recovery_count; 103825 mempool_t region_pool; 103826 void *context; 103827 sector_t target_begin; 103828 void (*dispatch_bios)(void *, struct bio_list *); 103829 void (*wakeup_workers)(void *); 103830 void (*wakeup_all_recovery_waiters)(void *); 103831 }; 103832 103833 struct dm_region___2 { 103834 struct dm_region_hash___2 *rh; 103835 region_t key; 103836 int state; 103837 struct list_head hash_list; 103838 struct list_head list; 103839 atomic_t pending; 103840 struct bio_list delayed_bios; 103841 }; 103842 103843 enum dev_type { 103844 DEV_UNKNOWN = 0, 103845 DEV_X1 = 1, 103846 DEV_X2 = 2, 103847 DEV_X4 = 3, 103848 DEV_X8 = 4, 103849 DEV_X16 = 5, 103850 DEV_X32 = 6, 103851 DEV_X64 = 7, 103852 }; 103853 103854 enum hw_event_mc_err_type { 103855 HW_EVENT_ERR_CORRECTED = 0, 103856 HW_EVENT_ERR_UNCORRECTED = 1, 103857 HW_EVENT_ERR_DEFERRED = 2, 103858 HW_EVENT_ERR_FATAL = 3, 103859 HW_EVENT_ERR_INFO = 4, 103860 }; 103861 103862 enum mem_type { 103863 MEM_EMPTY = 0, 103864 MEM_RESERVED = 1, 103865 MEM_UNKNOWN = 2, 103866 MEM_FPM = 3, 103867 MEM_EDO = 4, 103868 MEM_BEDO = 5, 103869 MEM_SDR = 6, 103870 MEM_RDR = 7, 103871 MEM_DDR = 8, 103872 MEM_RDDR = 9, 103873 MEM_RMBS = 10, 103874 MEM_DDR2 = 11, 103875 MEM_FB_DDR2 = 12, 103876 MEM_RDDR2 = 13, 103877 MEM_XDR = 14, 103878 MEM_DDR3 = 15, 103879 MEM_RDDR3 = 16, 103880 MEM_LRDDR3 = 17, 103881 MEM_LPDDR3 = 18, 103882 MEM_DDR4 = 19, 103883 MEM_RDDR4 = 20, 103884 MEM_LRDDR4 = 21, 103885 MEM_LPDDR4 = 22, 103886 MEM_DDR5 = 23, 103887 MEM_NVDIMM = 24, 103888 MEM_WIO2 = 25, 103889 }; 103890 103891 enum edac_type { 103892 EDAC_UNKNOWN = 0, 103893 EDAC_NONE = 1, 103894 EDAC_RESERVED = 2, 103895 EDAC_PARITY = 3, 103896 EDAC_EC = 4, 103897 EDAC_SECDED = 5, 103898 EDAC_S2ECD2ED = 6, 103899 EDAC_S4ECD4ED = 7, 103900 EDAC_S8ECD8ED = 8, 103901 EDAC_S16ECD16ED = 9, 103902 }; 103903 103904 enum scrub_type { 103905 SCRUB_UNKNOWN = 0, 103906 SCRUB_NONE = 1, 103907 SCRUB_SW_PROG = 2, 103908 SCRUB_SW_SRC = 3, 103909 SCRUB_SW_PROG_SRC = 4, 103910 SCRUB_SW_TUNABLE = 5, 103911 SCRUB_HW_PROG = 6, 103912 SCRUB_HW_SRC = 7, 103913 SCRUB_HW_PROG_SRC = 8, 103914 SCRUB_HW_TUNABLE = 9, 103915 }; 103916 103917 enum edac_mc_layer_type { 103918 EDAC_MC_LAYER_BRANCH = 0, 103919 EDAC_MC_LAYER_CHANNEL = 1, 103920 EDAC_MC_LAYER_SLOT = 2, 103921 EDAC_MC_LAYER_CHIP_SELECT = 3, 103922 EDAC_MC_LAYER_ALL_MEM = 4, 103923 }; 103924 103925 struct edac_mc_layer { 103926 enum edac_mc_layer_type type; 103927 unsigned int size; 103928 bool is_virt_csrow; 103929 }; 103930 103931 struct mem_ctl_info; 103932 103933 struct dimm_info { 103934 struct device dev; 103935 char label[32]; 103936 unsigned int location[3]; 103937 struct mem_ctl_info *mci; 103938 unsigned int idx; 103939 u32 grain; 103940 enum dev_type dtype; 103941 enum mem_type mtype; 103942 enum edac_type edac_mode; 103943 u32 nr_pages; 103944 unsigned int csrow; 103945 unsigned int cschannel; 103946 u16 smbios_handle; 103947 u32 ce_count; 103948 u32 ue_count; 103949 }; 103950 103951 struct mcidev_sysfs_attribute; 103952 103953 struct edac_raw_error_desc { 103954 char location[256]; 103955 char label[296]; 103956 long int grain; 103957 u16 error_count; 103958 enum hw_event_mc_err_type type; 103959 int top_layer; 103960 int mid_layer; 103961 int low_layer; 103962 long unsigned int page_frame_number; 103963 long unsigned int offset_in_page; 103964 long unsigned int syndrome; 103965 const char *msg; 103966 const char *other_detail; 103967 }; 103968 103969 struct csrow_info; 103970 103971 struct mem_ctl_info { 103972 struct device dev; 103973 struct bus_type *bus; 103974 struct list_head link; 103975 struct module *owner; 103976 long unsigned int mtype_cap; 103977 long unsigned int edac_ctl_cap; 103978 long unsigned int edac_cap; 103979 long unsigned int scrub_cap; 103980 enum scrub_type scrub_mode; 103981 int (*set_sdram_scrub_rate)(struct mem_ctl_info *, u32); 103982 int (*get_sdram_scrub_rate)(struct mem_ctl_info *); 103983 void (*edac_check)(struct mem_ctl_info *); 103984 long unsigned int (*ctl_page_to_phys)(struct mem_ctl_info *, long unsigned int); 103985 int mc_idx; 103986 struct csrow_info **csrows; 103987 unsigned int nr_csrows; 103988 unsigned int num_cschannel; 103989 unsigned int n_layers; 103990 struct edac_mc_layer *layers; 103991 bool csbased; 103992 unsigned int tot_dimms; 103993 struct dimm_info **dimms; 103994 struct device *pdev; 103995 const char *mod_name; 103996 const char *ctl_name; 103997 const char *dev_name; 103998 void *pvt_info; 103999 long unsigned int start_time; 104000 u32 ce_noinfo_count; 104001 u32 ue_noinfo_count; 104002 u32 ue_mc; 104003 u32 ce_mc; 104004 struct completion complete; 104005 const struct mcidev_sysfs_attribute *mc_driver_sysfs_attributes; 104006 struct delayed_work work; 104007 struct edac_raw_error_desc error_desc; 104008 int op_state; 104009 struct dentry *debugfs; 104010 u8 fake_inject_layer[3]; 104011 bool fake_inject_ue; 104012 u16 fake_inject_count; 104013 }; 104014 104015 struct rank_info { 104016 int chan_idx; 104017 struct csrow_info *csrow; 104018 struct dimm_info *dimm; 104019 u32 ce_count; 104020 }; 104021 104022 struct csrow_info { 104023 struct device dev; 104024 long unsigned int first_page; 104025 long unsigned int last_page; 104026 long unsigned int page_mask; 104027 int csrow_idx; 104028 u32 ue_count; 104029 u32 ce_count; 104030 struct mem_ctl_info *mci; 104031 u32 nr_channels; 104032 struct rank_info **channels; 104033 }; 104034 104035 struct edac_device_counter { 104036 u32 ue_count; 104037 u32 ce_count; 104038 }; 104039 104040 struct edac_device_ctl_info; 104041 104042 struct edac_dev_sysfs_attribute { 104043 struct attribute attr; 104044 ssize_t (*show)(struct edac_device_ctl_info *, char *); 104045 ssize_t (*store)(struct edac_device_ctl_info *, const char *, size_t); 104046 }; 104047 104048 struct edac_device_instance; 104049 104050 struct edac_device_ctl_info { 104051 struct list_head link; 104052 struct module *owner; 104053 int dev_idx; 104054 int log_ue; 104055 int log_ce; 104056 int panic_on_ue; 104057 unsigned int poll_msec; 104058 long unsigned int delay; 104059 struct edac_dev_sysfs_attribute *sysfs_attributes; 104060 struct bus_type *edac_subsys; 104061 int op_state; 104062 struct delayed_work work; 104063 void (*edac_check)(struct edac_device_ctl_info *); 104064 struct device *dev; 104065 const char *mod_name; 104066 const char *ctl_name; 104067 const char *dev_name; 104068 void *pvt_info; 104069 long unsigned int start_time; 104070 struct completion removal_complete; 104071 char name[32]; 104072 u32 nr_instances; 104073 struct edac_device_instance *instances; 104074 struct edac_device_counter counters; 104075 struct kobject kobj; 104076 }; 104077 104078 struct edac_device_block; 104079 104080 struct edac_dev_sysfs_block_attribute { 104081 struct attribute attr; 104082 ssize_t (*show)(struct kobject *, struct attribute *, char *); 104083 ssize_t (*store)(struct kobject *, struct attribute *, const char *, size_t); 104084 struct edac_device_block *block; 104085 unsigned int value; 104086 }; 104087 104088 struct edac_device_block { 104089 struct edac_device_instance *instance; 104090 char name[32]; 104091 struct edac_device_counter counters; 104092 int nr_attribs; 104093 struct edac_dev_sysfs_block_attribute *block_attributes; 104094 struct kobject kobj; 104095 }; 104096 104097 struct edac_device_instance { 104098 struct edac_device_ctl_info *ctl; 104099 char name[35]; 104100 struct edac_device_counter counters; 104101 u32 nr_blocks; 104102 struct edac_device_block *blocks; 104103 struct kobject kobj; 104104 }; 104105 104106 struct dev_ch_attribute { 104107 struct device_attribute attr; 104108 unsigned int channel; 104109 }; 104110 104111 struct ctl_info_attribute { 104112 struct attribute attr; 104113 ssize_t (*show)(struct edac_device_ctl_info *, char *); 104114 ssize_t (*store)(struct edac_device_ctl_info *, const char *, size_t); 104115 }; 104116 104117 struct instance_attribute { 104118 struct attribute attr; 104119 ssize_t (*show)(struct edac_device_instance *, char *); 104120 ssize_t (*store)(struct edac_device_instance *, const char *, size_t); 104121 }; 104122 104123 struct edac_pci_counter { 104124 atomic_t pe_count; 104125 atomic_t npe_count; 104126 }; 104127 104128 struct edac_pci_ctl_info { 104129 struct list_head link; 104130 int pci_idx; 104131 struct bus_type *edac_subsys; 104132 int op_state; 104133 struct delayed_work work; 104134 void (*edac_check)(struct edac_pci_ctl_info *); 104135 struct device *dev; 104136 const char *mod_name; 104137 const char *ctl_name; 104138 const char *dev_name; 104139 void *pvt_info; 104140 long unsigned int start_time; 104141 struct completion complete; 104142 char name[32]; 104143 struct edac_pci_counter counters; 104144 struct kobject kobj; 104145 }; 104146 104147 struct edac_pci_gen_data { 104148 int edac_idx; 104149 }; 104150 104151 struct instance_attribute___2 { 104152 struct attribute attr; 104153 ssize_t (*show)(struct edac_pci_ctl_info *, char *); 104154 ssize_t (*store)(struct edac_pci_ctl_info *, const char *, size_t); 104155 }; 104156 104157 struct edac_pci_dev_attribute { 104158 struct attribute attr; 104159 void *value; 104160 ssize_t (*show)(void *, char *); 104161 ssize_t (*store)(void *, const char *, size_t); 104162 }; 104163 104164 typedef void (*pci_parity_check_fn_t)(struct pci_dev *); 104165 104166 struct ghes_pvt { 104167 struct mem_ctl_info *mci; 104168 char other_detail[400]; 104169 char msg[80]; 104170 }; 104171 104172 struct ghes_hw_desc { 104173 int num_dimms; 104174 struct dimm_info *dimms; 104175 }; 104176 104177 struct memdev_dmi_entry { 104178 u8 type; 104179 u8 length; 104180 u16 handle; 104181 u16 phys_mem_array_handle; 104182 u16 mem_err_info_handle; 104183 u16 total_width; 104184 u16 data_width; 104185 u16 size; 104186 u8 form_factor; 104187 u8 device_set; 104188 u8 device_locator; 104189 u8 bank_locator; 104190 u8 memory_type; 104191 u16 type_detail; 104192 u16 speed; 104193 u8 manufacturer; 104194 u8 serial_number; 104195 u8 asset_tag; 104196 u8 part_number; 104197 u8 attributes; 104198 u32 extended_size; 104199 u16 conf_mem_clk_speed; 104200 } __attribute__((packed)); 104201 104202 struct cpufreq_policy_data { 104203 struct cpufreq_cpuinfo cpuinfo; 104204 struct cpufreq_frequency_table *freq_table; 104205 unsigned int cpu; 104206 unsigned int min; 104207 unsigned int max; 104208 }; 104209 104210 struct freq_attr { 104211 struct attribute attr; 104212 ssize_t (*show)(struct cpufreq_policy *, char *); 104213 ssize_t (*store)(struct cpufreq_policy *, const char *, size_t); 104214 }; 104215 104216 struct cpufreq_driver { 104217 char name[16]; 104218 u16 flags; 104219 void *driver_data; 104220 int (*init)(struct cpufreq_policy *); 104221 int (*verify)(struct cpufreq_policy_data *); 104222 int (*setpolicy)(struct cpufreq_policy *); 104223 int (*target)(struct cpufreq_policy *, unsigned int, unsigned int); 104224 int (*target_index)(struct cpufreq_policy *, unsigned int); 104225 unsigned int (*fast_switch)(struct cpufreq_policy *, unsigned int); 104226 void (*adjust_perf)(unsigned int, long unsigned int, long unsigned int, long unsigned int); 104227 unsigned int (*resolve_freq)(struct cpufreq_policy *, unsigned int); 104228 unsigned int (*get_intermediate)(struct cpufreq_policy *, unsigned int); 104229 int (*target_intermediate)(struct cpufreq_policy *, unsigned int); 104230 unsigned int (*get)(unsigned int); 104231 void (*update_limits)(unsigned int); 104232 int (*bios_limit)(int, unsigned int *); 104233 int (*online)(struct cpufreq_policy *); 104234 int (*offline)(struct cpufreq_policy *); 104235 int (*exit)(struct cpufreq_policy *); 104236 void (*stop_cpu)(struct cpufreq_policy *); 104237 int (*suspend)(struct cpufreq_policy *); 104238 int (*resume)(struct cpufreq_policy *); 104239 void (*ready)(struct cpufreq_policy *); 104240 struct freq_attr **attr; 104241 bool boost_enabled; 104242 int (*set_boost)(struct cpufreq_policy *, int); 104243 }; 104244 104245 struct cpufreq_stats { 104246 unsigned int total_trans; 104247 long long unsigned int last_time; 104248 unsigned int max_state; 104249 unsigned int state_num; 104250 unsigned int last_index; 104251 u64 *time_in_state; 104252 unsigned int *freq_table; 104253 unsigned int *trans_table; 104254 unsigned int reset_pending; 104255 long long unsigned int reset_time; 104256 }; 104257 104258 enum { 104259 OD_NORMAL_SAMPLE = 0, 104260 OD_SUB_SAMPLE = 1, 104261 }; 104262 104263 struct dbs_data { 104264 struct gov_attr_set attr_set; 104265 void *tuners; 104266 unsigned int ignore_nice_load; 104267 unsigned int sampling_rate; 104268 unsigned int sampling_down_factor; 104269 unsigned int up_threshold; 104270 unsigned int io_is_busy; 104271 }; 104272 104273 struct policy_dbs_info { 104274 struct cpufreq_policy *policy; 104275 struct mutex update_mutex; 104276 u64 last_sample_time; 104277 s64 sample_delay_ns; 104278 atomic_t work_count; 104279 struct irq_work irq_work; 104280 struct work_struct work; 104281 struct dbs_data *dbs_data; 104282 struct list_head list; 104283 unsigned int rate_mult; 104284 unsigned int idle_periods; 104285 bool is_shared; 104286 bool work_in_progress; 104287 }; 104288 104289 struct dbs_governor { 104290 struct cpufreq_governor gov; 104291 struct kobj_type kobj_type; 104292 struct dbs_data *gdbs_data; 104293 unsigned int (*gov_dbs_update)(struct cpufreq_policy *); 104294 struct policy_dbs_info * (*alloc)(); 104295 void (*free)(struct policy_dbs_info *); 104296 int (*init)(struct dbs_data *); 104297 void (*exit)(struct dbs_data *); 104298 void (*start)(struct cpufreq_policy *); 104299 }; 104300 104301 struct od_ops { 104302 unsigned int (*powersave_bias_target)(struct cpufreq_policy *, unsigned int, unsigned int); 104303 }; 104304 104305 struct od_policy_dbs_info { 104306 struct policy_dbs_info policy_dbs; 104307 unsigned int freq_lo; 104308 unsigned int freq_lo_delay_us; 104309 unsigned int freq_hi_delay_us; 104310 unsigned int sample_type: 1; 104311 }; 104312 104313 struct od_dbs_tuners { 104314 unsigned int powersave_bias; 104315 }; 104316 104317 struct cs_policy_dbs_info { 104318 struct policy_dbs_info policy_dbs; 104319 unsigned int down_skip; 104320 unsigned int requested_freq; 104321 }; 104322 104323 struct cs_dbs_tuners { 104324 unsigned int down_threshold; 104325 unsigned int freq_step; 104326 }; 104327 104328 struct cpu_dbs_info { 104329 u64 prev_cpu_idle; 104330 u64 prev_update_time; 104331 u64 prev_cpu_nice; 104332 unsigned int prev_load; 104333 struct update_util_data update_util; 104334 struct policy_dbs_info *policy_dbs; 104335 }; 104336 104337 enum acpi_preferred_pm_profiles { 104338 PM_UNSPECIFIED = 0, 104339 PM_DESKTOP = 1, 104340 PM_MOBILE = 2, 104341 PM_WORKSTATION = 3, 104342 PM_ENTERPRISE_SERVER = 4, 104343 PM_SOHO_SERVER = 5, 104344 PM_APPLIANCE_PC = 6, 104345 PM_PERFORMANCE_SERVER = 7, 104346 PM_TABLET = 8, 104347 }; 104348 104349 struct sample { 104350 int32_t core_avg_perf; 104351 int32_t busy_scaled; 104352 u64 aperf; 104353 u64 mperf; 104354 u64 tsc; 104355 u64 time; 104356 }; 104357 104358 struct pstate_data { 104359 int current_pstate; 104360 int min_pstate; 104361 int max_pstate; 104362 int max_pstate_physical; 104363 int scaling; 104364 int turbo_pstate; 104365 unsigned int max_freq; 104366 unsigned int turbo_freq; 104367 }; 104368 104369 struct vid_data { 104370 int min; 104371 int max; 104372 int turbo; 104373 int32_t ratio; 104374 }; 104375 104376 struct global_params { 104377 bool no_turbo; 104378 bool turbo_disabled; 104379 bool turbo_disabled_mf; 104380 int max_perf_pct; 104381 int min_perf_pct; 104382 }; 104383 104384 struct cpudata { 104385 int cpu; 104386 unsigned int policy; 104387 struct update_util_data update_util; 104388 bool update_util_set; 104389 struct pstate_data pstate; 104390 struct vid_data vid; 104391 u64 last_update; 104392 u64 last_sample_time; 104393 u64 aperf_mperf_shift; 104394 u64 prev_aperf; 104395 u64 prev_mperf; 104396 u64 prev_tsc; 104397 u64 prev_cummulative_iowait; 104398 struct sample sample; 104399 int32_t min_perf_ratio; 104400 int32_t max_perf_ratio; 104401 struct acpi_processor_performance acpi_perf_data; 104402 bool valid_pss_table; 104403 unsigned int iowait_boost; 104404 s16 epp_powersave; 104405 s16 epp_policy; 104406 s16 epp_default; 104407 s16 epp_cached; 104408 u64 hwp_req_cached; 104409 u64 hwp_cap_cached; 104410 u64 last_io_update; 104411 unsigned int sched_flags; 104412 u32 hwp_boost_min; 104413 bool suspended; 104414 }; 104415 104416 struct pstate_funcs { 104417 int (*get_max)(); 104418 int (*get_max_physical)(); 104419 int (*get_min)(); 104420 int (*get_turbo)(); 104421 int (*get_scaling)(); 104422 int (*get_aperf_mperf_shift)(); 104423 u64 (*get_val)(struct cpudata *, int); 104424 void (*get_vid)(struct cpudata *); 104425 }; 104426 104427 enum { 104428 PSS = 0, 104429 PPC = 1, 104430 }; 104431 104432 struct cpuidle_governor { 104433 char name[16]; 104434 struct list_head governor_list; 104435 unsigned int rating; 104436 int (*enable)(struct cpuidle_driver *, struct cpuidle_device *); 104437 void (*disable)(struct cpuidle_driver *, struct cpuidle_device *); 104438 int (*select)(struct cpuidle_driver *, struct cpuidle_device *, bool *); 104439 void (*reflect)(struct cpuidle_device *, int); 104440 }; 104441 104442 struct cpuidle_state_kobj { 104443 struct cpuidle_state *state; 104444 struct cpuidle_state_usage *state_usage; 104445 struct completion kobj_unregister; 104446 struct kobject kobj; 104447 struct cpuidle_device *device; 104448 }; 104449 104450 struct cpuidle_device_kobj { 104451 struct cpuidle_device *dev; 104452 struct completion kobj_unregister; 104453 struct kobject kobj; 104454 }; 104455 104456 struct cpuidle_attr { 104457 struct attribute attr; 104458 ssize_t (*show)(struct cpuidle_device *, char *); 104459 ssize_t (*store)(struct cpuidle_device *, const char *, size_t); 104460 }; 104461 104462 struct cpuidle_state_attr { 104463 struct attribute attr; 104464 ssize_t (*show)(struct cpuidle_state *, struct cpuidle_state_usage *, char *); 104465 ssize_t (*store)(struct cpuidle_state *, struct cpuidle_state_usage *, const char *, size_t); 104466 }; 104467 104468 struct menu_device { 104469 int needs_update; 104470 int tick_wakeup; 104471 u64 next_timer_ns; 104472 unsigned int bucket; 104473 unsigned int correction_factor[12]; 104474 unsigned int intervals[8]; 104475 int interval_ptr; 104476 }; 104477 104478 struct pci_dev___2; 104479 104480 struct sdhci_pci_data { 104481 struct pci_dev___2 *pdev; 104482 int slotno; 104483 int rst_n_gpio; 104484 int cd_gpio; 104485 int (*setup)(struct sdhci_pci_data *); 104486 void (*cleanup)(struct sdhci_pci_data *); 104487 }; 104488 104489 struct led_properties { 104490 u32 color; 104491 bool color_present; 104492 const char *function; 104493 u32 func_enum; 104494 bool func_enum_present; 104495 const char *label; 104496 }; 104497 104498 struct dmi_memdev_info { 104499 const char *device; 104500 const char *bank; 104501 u64 size; 104502 u16 handle; 104503 u8 type; 104504 }; 104505 104506 struct dmi_sysfs_entry { 104507 struct dmi_header dh; 104508 struct kobject kobj; 104509 int instance; 104510 int position; 104511 struct list_head list; 104512 struct kobject *child; 104513 }; 104514 104515 struct dmi_sysfs_attribute { 104516 struct attribute attr; 104517 ssize_t (*show)(struct dmi_sysfs_entry *, char *); 104518 }; 104519 104520 struct dmi_sysfs_mapped_attribute { 104521 struct attribute attr; 104522 ssize_t (*show)(struct dmi_sysfs_entry *, const struct dmi_header *, char *); 104523 }; 104524 104525 typedef ssize_t (*dmi_callback)(struct dmi_sysfs_entry *, const struct dmi_header *, void *); 104526 104527 struct find_dmi_data { 104528 struct dmi_sysfs_entry *entry; 104529 dmi_callback callback; 104530 void *private; 104531 int instance_countdown; 104532 ssize_t ret; 104533 }; 104534 104535 struct dmi_read_state { 104536 char *buf; 104537 loff_t pos; 104538 size_t count; 104539 }; 104540 104541 struct dmi_entry_attr_show_data { 104542 struct attribute *attr; 104543 char *buf; 104544 }; 104545 104546 struct dmi_system_event_log { 104547 struct dmi_header header; 104548 u16 area_length; 104549 u16 header_start_offset; 104550 u16 data_start_offset; 104551 u8 access_method; 104552 u8 status; 104553 u32 change_token; 104554 union { 104555 struct { 104556 u16 index_addr; 104557 u16 data_addr; 104558 } io; 104559 u32 phys_addr32; 104560 u16 gpnv_handle; 104561 u32 access_method_address; 104562 }; 104563 u8 header_format; 104564 u8 type_descriptors_supported_count; 104565 u8 per_log_type_descriptor_length; 104566 u8 supported_log_type_descriptos[0]; 104567 } __attribute__((packed)); 104568 104569 typedef u8 (*sel_io_reader)(const struct dmi_system_event_log *, loff_t); 104570 104571 struct dmi_device_attribute { 104572 struct device_attribute dev_attr; 104573 int field; 104574 }; 104575 104576 struct mafield { 104577 const char *prefix; 104578 int field; 104579 }; 104580 104581 struct acpi_table_ibft { 104582 struct acpi_table_header header; 104583 u8 reserved[12]; 104584 }; 104585 104586 struct firmware_map_entry { 104587 u64 start; 104588 u64 end; 104589 const char *type; 104590 struct list_head list; 104591 struct kobject kobj; 104592 }; 104593 104594 struct memmap_attribute { 104595 struct attribute attr; 104596 ssize_t (*show)(struct firmware_map_entry *, char *); 104597 }; 104598 104599 struct bmp_header { 104600 u16 id; 104601 u32 size; 104602 } __attribute__((packed)); 104603 104604 typedef efi_status_t efi_query_variable_store_t(u32, long unsigned int, bool); 104605 104606 typedef struct { 104607 u16 version; 104608 u16 length; 104609 u32 runtime_services_supported; 104610 } efi_rt_properties_table_t; 104611 104612 struct efivar_operations { 104613 efi_get_variable_t *get_variable; 104614 efi_get_next_variable_t *get_next_variable; 104615 efi_set_variable_t *set_variable; 104616 efi_set_variable_t *set_variable_nonblocking; 104617 efi_query_variable_store_t *query_variable_store; 104618 }; 104619 104620 struct efivars { 104621 struct kset *kset; 104622 struct kobject *kobject; 104623 const struct efivar_operations *ops; 104624 }; 104625 104626 struct linux_efi_random_seed { 104627 u32 size; 104628 u8 bits[0]; 104629 }; 104630 104631 struct linux_efi_memreserve { 104632 int size; 104633 atomic_t count; 104634 phys_addr_t next; 104635 struct { 104636 phys_addr_t base; 104637 phys_addr_t size; 104638 } entry[0]; 104639 }; 104640 104641 struct efi_error_code { 104642 efi_status_t status; 104643 int errno; 104644 const char *description; 104645 }; 104646 104647 struct efi_generic_dev_path { 104648 u8 type; 104649 u8 sub_type; 104650 u16 length; 104651 }; 104652 104653 struct variable_validate { 104654 efi_guid_t vendor; 104655 char *name; 104656 bool (*validate)(efi_char16_t *, int, u8 *, long unsigned int); 104657 }; 104658 104659 typedef struct { 104660 u32 version; 104661 u32 num_entries; 104662 u32 desc_size; 104663 u32 reserved; 104664 efi_memory_desc_t entry[0]; 104665 } efi_memory_attributes_table_t; 104666 104667 struct efi_system_resource_entry_v1 { 104668 efi_guid_t fw_class; 104669 u32 fw_type; 104670 u32 fw_version; 104671 u32 lowest_supported_fw_version; 104672 u32 capsule_flags; 104673 u32 last_attempt_version; 104674 u32 last_attempt_status; 104675 }; 104676 104677 struct efi_system_resource_table { 104678 u32 fw_resource_count; 104679 u32 fw_resource_count_max; 104680 u64 fw_resource_version; 104681 u8 entries[0]; 104682 }; 104683 104684 struct esre_entry { 104685 union { 104686 struct efi_system_resource_entry_v1 *esre1; 104687 } esre; 104688 struct kobject kobj; 104689 struct list_head list; 104690 }; 104691 104692 struct esre_attribute { 104693 struct attribute attr; 104694 ssize_t (*show)(struct esre_entry *, char *); 104695 ssize_t (*store)(struct esre_entry *, const char *, size_t); 104696 }; 104697 104698 struct cper_sec_proc_generic { 104699 u64 validation_bits; 104700 u8 proc_type; 104701 u8 proc_isa; 104702 u8 proc_error_type; 104703 u8 operation; 104704 u8 flags; 104705 u8 level; 104706 u16 reserved; 104707 u64 cpu_version; 104708 char cpu_brand[128]; 104709 u64 proc_id; 104710 u64 target_addr; 104711 u64 requestor_id; 104712 u64 responder_id; 104713 u64 ip; 104714 }; 104715 104716 struct cper_sec_proc_ia { 104717 u64 validation_bits; 104718 u64 lapic_id; 104719 u8 cpuid[48]; 104720 }; 104721 104722 struct cper_mem_err_compact { 104723 u64 validation_bits; 104724 u16 node; 104725 u16 card; 104726 u16 module; 104727 u16 bank; 104728 u16 device; 104729 u16 row; 104730 u16 column; 104731 u16 bit_pos; 104732 u64 requestor_id; 104733 u64 responder_id; 104734 u64 target_id; 104735 u16 rank; 104736 u16 mem_array_handle; 104737 u16 mem_dev_handle; 104738 u8 extended; 104739 } __attribute__((packed)); 104740 104741 struct cper_sec_fw_err_rec_ref { 104742 u8 record_type; 104743 u8 revision; 104744 u8 reserved[6]; 104745 u64 record_identifier; 104746 guid_t record_identifier_guid; 104747 }; 104748 104749 struct efi_runtime_map_entry { 104750 efi_memory_desc_t md; 104751 struct kobject kobj; 104752 }; 104753 104754 struct map_attribute { 104755 struct attribute attr; 104756 ssize_t (*show)(struct efi_runtime_map_entry *, char *); 104757 }; 104758 104759 struct efi_acpi_dev_path { 104760 struct efi_generic_dev_path header; 104761 u32 hid; 104762 u32 uid; 104763 }; 104764 104765 struct efi_pci_dev_path { 104766 struct efi_generic_dev_path header; 104767 u8 fn; 104768 u8 dev; 104769 }; 104770 104771 struct efi_vendor_dev_path { 104772 struct efi_generic_dev_path header; 104773 efi_guid_t vendorguid; 104774 u8 vendordata[0]; 104775 }; 104776 104777 struct efi_dev_path { 104778 union { 104779 struct efi_generic_dev_path header; 104780 struct efi_acpi_dev_path acpi; 104781 struct efi_pci_dev_path pci; 104782 struct efi_vendor_dev_path vendor; 104783 }; 104784 }; 104785 104786 struct acpi_hid_uid { 104787 struct acpi_device_id hid[2]; 104788 char uid[11]; 104789 }; 104790 104791 struct dev_header { 104792 u32 len; 104793 u32 prop_count; 104794 struct efi_dev_path path[0]; 104795 }; 104796 104797 struct properties_header { 104798 u32 len; 104799 u32 version; 104800 u32 dev_count; 104801 struct dev_header dev_header[0]; 104802 }; 104803 104804 struct efi_embedded_fw { 104805 struct list_head list; 104806 const char *name; 104807 const u8 *data; 104808 size_t length; 104809 }; 104810 104811 struct efi_embedded_fw_desc { 104812 const char *name; 104813 u8 prefix[8]; 104814 u32 length; 104815 u8 sha256[32]; 104816 }; 104817 104818 struct efi_mokvar_sysfs_attr { 104819 struct bin_attribute bin_attr; 104820 struct list_head node; 104821 }; 104822 104823 struct cper_ia_err_info { 104824 guid_t err_type; 104825 u64 validation_bits; 104826 u64 check_info; 104827 u64 target_id; 104828 u64 requestor_id; 104829 u64 responder_id; 104830 u64 ip; 104831 }; 104832 104833 enum err_types { 104834 ERR_TYPE_CACHE = 0, 104835 ERR_TYPE_TLB = 1, 104836 ERR_TYPE_BUS = 2, 104837 ERR_TYPE_MS = 3, 104838 N_ERR_TYPES = 4, 104839 }; 104840 104841 struct hid_device_id { 104842 __u16 bus; 104843 __u16 group; 104844 __u32 vendor; 104845 __u32 product; 104846 kernel_ulong_t driver_data; 104847 }; 104848 104849 struct hid_item { 104850 unsigned int format; 104851 __u8 size; 104852 __u8 type; 104853 __u8 tag; 104854 union { 104855 __u8 u8; 104856 __s8 s8; 104857 __u16 u16; 104858 __s16 s16; 104859 __u32 u32; 104860 __s32 s32; 104861 __u8 *longdata; 104862 } data; 104863 }; 104864 104865 struct hid_global { 104866 unsigned int usage_page; 104867 __s32 logical_minimum; 104868 __s32 logical_maximum; 104869 __s32 physical_minimum; 104870 __s32 physical_maximum; 104871 __s32 unit_exponent; 104872 unsigned int unit; 104873 unsigned int report_id; 104874 unsigned int report_size; 104875 unsigned int report_count; 104876 }; 104877 104878 struct hid_local { 104879 unsigned int usage[12288]; 104880 u8 usage_size[12288]; 104881 unsigned int collection_index[12288]; 104882 unsigned int usage_index; 104883 unsigned int usage_minimum; 104884 unsigned int delimiter_depth; 104885 unsigned int delimiter_branch; 104886 }; 104887 104888 struct hid_collection { 104889 int parent_idx; 104890 unsigned int type; 104891 unsigned int usage; 104892 unsigned int level; 104893 }; 104894 104895 struct hid_usage { 104896 unsigned int hid; 104897 unsigned int collection_index; 104898 unsigned int usage_index; 104899 __s8 resolution_multiplier; 104900 __s8 wheel_factor; 104901 __u16 code; 104902 __u8 type; 104903 __s8 hat_min; 104904 __s8 hat_max; 104905 __s8 hat_dir; 104906 __s16 wheel_accumulated; 104907 }; 104908 104909 struct hid_report; 104910 104911 struct hid_input; 104912 104913 struct hid_field { 104914 unsigned int physical; 104915 unsigned int logical; 104916 unsigned int application; 104917 struct hid_usage *usage; 104918 unsigned int maxusage; 104919 unsigned int flags; 104920 unsigned int report_offset; 104921 unsigned int report_size; 104922 unsigned int report_count; 104923 unsigned int report_type; 104924 __s32 *value; 104925 __s32 logical_minimum; 104926 __s32 logical_maximum; 104927 __s32 physical_minimum; 104928 __s32 physical_maximum; 104929 __s32 unit_exponent; 104930 unsigned int unit; 104931 struct hid_report *report; 104932 unsigned int index; 104933 struct hid_input *hidinput; 104934 __u16 dpad; 104935 }; 104936 104937 struct hid_device; 104938 104939 struct hid_report { 104940 struct list_head list; 104941 struct list_head hidinput_list; 104942 unsigned int id; 104943 unsigned int type; 104944 unsigned int application; 104945 struct hid_field *field[256]; 104946 unsigned int maxfield; 104947 unsigned int size; 104948 struct hid_device *device; 104949 }; 104950 104951 struct hid_input { 104952 struct list_head list; 104953 struct hid_report *report; 104954 struct input_dev *input; 104955 const char *name; 104956 bool registered; 104957 struct list_head reports; 104958 unsigned int application; 104959 }; 104960 104961 enum hid_type { 104962 HID_TYPE_OTHER = 0, 104963 HID_TYPE_USBMOUSE = 1, 104964 HID_TYPE_USBNONE = 2, 104965 }; 104966 104967 struct hid_report_enum { 104968 unsigned int numbered; 104969 struct list_head report_list; 104970 struct hid_report *report_id_hash[256]; 104971 }; 104972 104973 enum hid_battery_status { 104974 HID_BATTERY_UNKNOWN = 0, 104975 HID_BATTERY_QUERIED = 1, 104976 HID_BATTERY_REPORTED = 2, 104977 }; 104978 104979 struct hid_driver; 104980 104981 struct hid_ll_driver; 104982 104983 struct hid_device { 104984 __u8 *dev_rdesc; 104985 unsigned int dev_rsize; 104986 __u8 *rdesc; 104987 unsigned int rsize; 104988 struct hid_collection *collection; 104989 unsigned int collection_size; 104990 unsigned int maxcollection; 104991 unsigned int maxapplication; 104992 __u16 bus; 104993 __u16 group; 104994 __u32 vendor; 104995 __u32 product; 104996 __u32 version; 104997 enum hid_type type; 104998 unsigned int country; 104999 struct hid_report_enum report_enum[3]; 105000 struct work_struct led_work; 105001 struct semaphore driver_input_lock; 105002 struct device dev; 105003 struct hid_driver *driver; 105004 struct hid_ll_driver *ll_driver; 105005 struct mutex ll_open_lock; 105006 unsigned int ll_open_count; 105007 struct power_supply *battery; 105008 __s32 battery_capacity; 105009 __s32 battery_min; 105010 __s32 battery_max; 105011 __s32 battery_report_type; 105012 __s32 battery_report_id; 105013 enum hid_battery_status battery_status; 105014 bool battery_avoid_query; 105015 ktime_t battery_ratelimit_time; 105016 long unsigned int status; 105017 unsigned int claimed; 105018 unsigned int quirks; 105019 bool io_started; 105020 struct list_head inputs; 105021 void *hiddev; 105022 void *hidraw; 105023 char name[128]; 105024 char phys[64]; 105025 char uniq[64]; 105026 void *driver_data; 105027 int (*ff_init)(struct hid_device *); 105028 int (*hiddev_connect)(struct hid_device *, unsigned int); 105029 void (*hiddev_disconnect)(struct hid_device *); 105030 void (*hiddev_hid_event)(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); 105031 void (*hiddev_report_event)(struct hid_device *, struct hid_report *); 105032 short unsigned int debug; 105033 struct dentry *debug_dir; 105034 struct dentry *debug_rdesc; 105035 struct dentry *debug_events; 105036 struct list_head debug_list; 105037 spinlock_t debug_list_lock; 105038 wait_queue_head_t debug_wait; 105039 }; 105040 105041 struct hid_report_id; 105042 105043 struct hid_usage_id; 105044 105045 struct hid_driver { 105046 char *name; 105047 const struct hid_device_id *id_table; 105048 struct list_head dyn_list; 105049 spinlock_t dyn_lock; 105050 bool (*match)(struct hid_device *, bool); 105051 int (*probe)(struct hid_device *, const struct hid_device_id *); 105052 void (*remove)(struct hid_device *); 105053 const struct hid_report_id *report_table; 105054 int (*raw_event)(struct hid_device *, struct hid_report *, u8 *, int); 105055 const struct hid_usage_id *usage_table; 105056 int (*event)(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); 105057 void (*report)(struct hid_device *, struct hid_report *); 105058 __u8 * (*report_fixup)(struct hid_device *, __u8 *, unsigned int *); 105059 int (*input_mapping)(struct hid_device *, struct hid_input *, struct hid_field *, struct hid_usage *, long unsigned int **, int *); 105060 int (*input_mapped)(struct hid_device *, struct hid_input *, struct hid_field *, struct hid_usage *, long unsigned int **, int *); 105061 int (*input_configured)(struct hid_device *, struct hid_input *); 105062 void (*feature_mapping)(struct hid_device *, struct hid_field *, struct hid_usage *); 105063 int (*suspend)(struct hid_device *, pm_message_t); 105064 int (*resume)(struct hid_device *); 105065 int (*reset_resume)(struct hid_device *); 105066 struct device_driver driver; 105067 }; 105068 105069 struct hid_ll_driver { 105070 int (*start)(struct hid_device *); 105071 void (*stop)(struct hid_device *); 105072 int (*open)(struct hid_device *); 105073 void (*close)(struct hid_device *); 105074 int (*power)(struct hid_device *, int); 105075 int (*parse)(struct hid_device *); 105076 void (*request)(struct hid_device *, struct hid_report *, int); 105077 int (*wait)(struct hid_device *); 105078 int (*raw_request)(struct hid_device *, unsigned char, __u8 *, size_t, unsigned char, int); 105079 int (*output_report)(struct hid_device *, __u8 *, size_t); 105080 int (*idle)(struct hid_device *, int, int, int); 105081 }; 105082 105083 struct hid_parser { 105084 struct hid_global global; 105085 struct hid_global global_stack[4]; 105086 unsigned int global_stack_ptr; 105087 struct hid_local local; 105088 unsigned int *collection_stack; 105089 unsigned int collection_stack_ptr; 105090 unsigned int collection_stack_size; 105091 struct hid_device *device; 105092 unsigned int scan_flags; 105093 }; 105094 105095 struct hid_report_id { 105096 __u32 report_type; 105097 }; 105098 105099 struct hid_usage_id { 105100 __u32 usage_hid; 105101 __u32 usage_type; 105102 __u32 usage_code; 105103 }; 105104 105105 struct hiddev { 105106 int minor; 105107 int exist; 105108 int open; 105109 struct mutex existancelock; 105110 wait_queue_head_t wait; 105111 struct hid_device *hid; 105112 struct list_head list; 105113 spinlock_t list_lock; 105114 bool initialized; 105115 }; 105116 105117 struct hidraw { 105118 unsigned int minor; 105119 int exist; 105120 int open; 105121 wait_queue_head_t wait; 105122 struct hid_device *hid; 105123 struct device *dev; 105124 spinlock_t list_lock; 105125 struct list_head list; 105126 }; 105127 105128 struct hid_dynid { 105129 struct list_head list; 105130 struct hid_device_id id; 105131 }; 105132 105133 typedef bool (*hid_usage_cmp_t)(struct hid_usage *, unsigned int, unsigned int); 105134 105135 struct quirks_list_struct { 105136 struct hid_device_id hid_bl_item; 105137 struct list_head node; 105138 }; 105139 105140 struct hid_debug_list { 105141 struct { 105142 union { 105143 struct __kfifo kfifo; 105144 char *type; 105145 const char *const_type; 105146 char (*rectype)[0]; 105147 char *ptr; 105148 const char *ptr_const; 105149 }; 105150 char buf[0]; 105151 } hid_debug_fifo; 105152 struct fasync_struct *fasync; 105153 struct hid_device *hdev; 105154 struct list_head node; 105155 struct mutex read_mutex; 105156 }; 105157 105158 struct hid_usage_entry { 105159 unsigned int page; 105160 unsigned int usage; 105161 const char *description; 105162 }; 105163 105164 struct hidraw_devinfo { 105165 __u32 bustype; 105166 __s16 vendor; 105167 __s16 product; 105168 }; 105169 105170 struct hidraw_report { 105171 __u8 *value; 105172 int len; 105173 }; 105174 105175 struct hidraw_list { 105176 struct hidraw_report buffer[64]; 105177 int head; 105178 int tail; 105179 struct fasync_struct *fasync; 105180 struct hidraw *hidraw; 105181 struct list_head node; 105182 struct mutex read_mutex; 105183 }; 105184 105185 struct magicmouse_sc { 105186 struct input_dev *input; 105187 long unsigned int quirks; 105188 int ntouches; 105189 int scroll_accel; 105190 long unsigned int scroll_jiffies; 105191 struct { 105192 short int x; 105193 short int y; 105194 short int scroll_x; 105195 short int scroll_y; 105196 u8 size; 105197 } touches[16]; 105198 int tracking_ids[16]; 105199 }; 105200 105201 struct ntrig_data { 105202 __u16 x; 105203 __u16 y; 105204 __u16 w; 105205 __u16 h; 105206 __u16 id; 105207 bool tipswitch; 105208 bool confidence; 105209 bool first_contact_touch; 105210 bool reading_mt; 105211 __u8 mt_footer[4]; 105212 __u8 mt_foot_count; 105213 __s8 act_state; 105214 __s8 deactivate_slack; 105215 __s8 activate_slack; 105216 __u16 min_width; 105217 __u16 min_height; 105218 __u16 activation_width; 105219 __u16 activation_height; 105220 __u16 sensor_logical_width; 105221 __u16 sensor_logical_height; 105222 __u16 sensor_physical_width; 105223 __u16 sensor_physical_height; 105224 }; 105225 105226 struct hid_control_fifo { 105227 unsigned char dir; 105228 struct hid_report *report; 105229 char *raw_report; 105230 }; 105231 105232 struct hid_output_fifo { 105233 struct hid_report *report; 105234 char *raw_report; 105235 }; 105236 105237 struct hid_class_descriptor { 105238 __u8 bDescriptorType; 105239 __le16 wDescriptorLength; 105240 } __attribute__((packed)); 105241 105242 struct hid_descriptor { 105243 __u8 bLength; 105244 __u8 bDescriptorType; 105245 __le16 bcdHID; 105246 __u8 bCountryCode; 105247 __u8 bNumDescriptors; 105248 struct hid_class_descriptor desc[1]; 105249 } __attribute__((packed)); 105250 105251 struct usbhid_device { 105252 struct hid_device *hid; 105253 struct usb_interface *intf; 105254 int ifnum; 105255 unsigned int bufsize; 105256 struct urb *urbin; 105257 char *inbuf; 105258 dma_addr_t inbuf_dma; 105259 struct urb *urbctrl; 105260 struct usb_ctrlrequest *cr; 105261 struct hid_control_fifo ctrl[256]; 105262 unsigned char ctrlhead; 105263 unsigned char ctrltail; 105264 char *ctrlbuf; 105265 dma_addr_t ctrlbuf_dma; 105266 long unsigned int last_ctrl; 105267 struct urb *urbout; 105268 struct hid_output_fifo out[256]; 105269 unsigned char outhead; 105270 unsigned char outtail; 105271 char *outbuf; 105272 dma_addr_t outbuf_dma; 105273 long unsigned int last_out; 105274 struct mutex mutex; 105275 spinlock_t lock; 105276 long unsigned int iofl; 105277 struct timer_list io_retry; 105278 long unsigned int stop_retry; 105279 unsigned int retry_delay; 105280 struct work_struct reset_work; 105281 wait_queue_head_t wait; 105282 }; 105283 105284 struct hiddev_event { 105285 unsigned int hid; 105286 int value; 105287 }; 105288 105289 struct hiddev_devinfo { 105290 __u32 bustype; 105291 __u32 busnum; 105292 __u32 devnum; 105293 __u32 ifnum; 105294 __s16 vendor; 105295 __s16 product; 105296 __s16 version; 105297 __u32 num_applications; 105298 }; 105299 105300 struct hiddev_collection_info { 105301 __u32 index; 105302 __u32 type; 105303 __u32 usage; 105304 __u32 level; 105305 }; 105306 105307 struct hiddev_report_info { 105308 __u32 report_type; 105309 __u32 report_id; 105310 __u32 num_fields; 105311 }; 105312 105313 struct hiddev_field_info { 105314 __u32 report_type; 105315 __u32 report_id; 105316 __u32 field_index; 105317 __u32 maxusage; 105318 __u32 flags; 105319 __u32 physical; 105320 __u32 logical; 105321 __u32 application; 105322 __s32 logical_minimum; 105323 __s32 logical_maximum; 105324 __s32 physical_minimum; 105325 __s32 physical_maximum; 105326 __u32 unit_exponent; 105327 __u32 unit; 105328 }; 105329 105330 struct hiddev_usage_ref { 105331 __u32 report_type; 105332 __u32 report_id; 105333 __u32 field_index; 105334 __u32 usage_index; 105335 __u32 usage_code; 105336 __s32 value; 105337 }; 105338 105339 struct hiddev_usage_ref_multi { 105340 struct hiddev_usage_ref uref; 105341 __u32 num_values; 105342 __s32 values[1024]; 105343 }; 105344 105345 struct hiddev_list { 105346 struct hiddev_usage_ref buffer[2048]; 105347 int head; 105348 int tail; 105349 unsigned int flags; 105350 struct fasync_struct *fasync; 105351 struct hiddev *hiddev; 105352 struct list_head node; 105353 struct mutex thread_lock; 105354 }; 105355 105356 struct pidff_usage { 105357 struct hid_field *field; 105358 s32 *value; 105359 }; 105360 105361 struct pidff_device { 105362 struct hid_device *hid; 105363 struct hid_report *reports[13]; 105364 struct pidff_usage set_effect[7]; 105365 struct pidff_usage set_envelope[5]; 105366 struct pidff_usage set_condition[8]; 105367 struct pidff_usage set_periodic[5]; 105368 struct pidff_usage set_constant[2]; 105369 struct pidff_usage set_ramp[3]; 105370 struct pidff_usage device_gain[1]; 105371 struct pidff_usage block_load[2]; 105372 struct pidff_usage pool[3]; 105373 struct pidff_usage effect_operation[2]; 105374 struct pidff_usage block_free[1]; 105375 struct hid_field *create_new_effect_type; 105376 struct hid_field *set_effect_type; 105377 struct hid_field *effect_direction; 105378 struct hid_field *device_control; 105379 struct hid_field *block_load_status; 105380 struct hid_field *effect_operation_status; 105381 int control_id[2]; 105382 int type_id[11]; 105383 int status_id[2]; 105384 int operation_id[2]; 105385 int pid_id[64]; 105386 }; 105387 105388 struct ts_dmi_data { 105389 struct efi_embedded_fw_desc embedded_fw; 105390 const char *acpi_name; 105391 const struct property_entry *properties; 105392 }; 105393 105394 enum ppfear_regs { 105395 SPT_PMC_XRAM_PPFEAR0A = 1424, 105396 SPT_PMC_XRAM_PPFEAR0B = 1425, 105397 SPT_PMC_XRAM_PPFEAR0C = 1426, 105398 SPT_PMC_XRAM_PPFEAR0D = 1427, 105399 SPT_PMC_XRAM_PPFEAR1A = 1428, 105400 }; 105401 105402 struct pmc_bit_map { 105403 const char *name; 105404 u32 bit_mask; 105405 }; 105406 105407 struct pmc_reg_map { 105408 const struct pmc_bit_map **pfear_sts; 105409 const struct pmc_bit_map *mphy_sts; 105410 const struct pmc_bit_map *pll_sts; 105411 const struct pmc_bit_map **slps0_dbg_maps; 105412 const struct pmc_bit_map *ltr_show_sts; 105413 const struct pmc_bit_map *msr_sts; 105414 const struct pmc_bit_map **lpm_sts; 105415 const u32 slp_s0_offset; 105416 const int slp_s0_res_counter_step; 105417 const u32 ltr_ignore_offset; 105418 const int regmap_length; 105419 const u32 ppfear0_offset; 105420 const int ppfear_buckets; 105421 const u32 pm_cfg_offset; 105422 const int pm_read_disable_bit; 105423 const u32 slps0_dbg_offset; 105424 const u32 ltr_ignore_max; 105425 const u32 pm_vric1_offset; 105426 const char **lpm_modes; 105427 const u32 lpm_en_offset; 105428 const u32 lpm_residency_offset; 105429 const u32 lpm_status_offset; 105430 const u32 lpm_live_status_offset; 105431 }; 105432 105433 struct pmc_dev { 105434 u32 base_addr; 105435 void *regbase; 105436 const struct pmc_reg_map *map; 105437 struct dentry *dbgfs_dir; 105438 int pmc_xram_read_bit; 105439 struct mutex lock; 105440 bool check_counters; 105441 u64 pc10_counter; 105442 u64 s0ix_counter; 105443 }; 105444 105445 struct intel_scu_ipc_data { 105446 struct resource mem; 105447 int irq; 105448 }; 105449 105450 struct intel_scu_ipc_dev___2 { 105451 struct device dev; 105452 struct resource mem; 105453 struct module *owner; 105454 int irq; 105455 void *ipc_base; 105456 struct completion cmd_complete; 105457 }; 105458 105459 struct intel_scu_ipc_devres { 105460 struct intel_scu_ipc_dev___2 *scu; 105461 }; 105462 105463 struct pmc_reg_map___2 { 105464 const struct pmc_bit_map *d3_sts_0; 105465 const struct pmc_bit_map *d3_sts_1; 105466 const struct pmc_bit_map *func_dis; 105467 const struct pmc_bit_map *func_dis_2; 105468 const struct pmc_bit_map *pss; 105469 }; 105470 105471 struct pmc_data { 105472 const struct pmc_reg_map___2 *map; 105473 const struct pmc_clk *clks; 105474 }; 105475 105476 struct pmc_dev___2 { 105477 u32 base_addr; 105478 void *regmap; 105479 const struct pmc_reg_map___2 *map; 105480 struct dentry *dbgfs_dir; 105481 bool init; 105482 }; 105483 105484 struct acpi_table_pcct { 105485 struct acpi_table_header header; 105486 u32 flags; 105487 u64 reserved; 105488 }; 105489 105490 enum acpi_pcct_type { 105491 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0, 105492 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1, 105493 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, 105494 ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, 105495 ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, 105496 ACPI_PCCT_TYPE_RESERVED = 5, 105497 }; 105498 105499 struct acpi_pcct_subspace { 105500 struct acpi_subtable_header header; 105501 u8 reserved[6]; 105502 u64 base_address; 105503 u64 length; 105504 struct acpi_generic_address doorbell_register; 105505 u64 preserve_mask; 105506 u64 write_mask; 105507 u32 latency; 105508 u32 max_access_rate; 105509 u16 min_turnaround_time; 105510 } __attribute__((packed)); 105511 105512 struct acpi_pcct_hw_reduced_type2 { 105513 struct acpi_subtable_header header; 105514 u32 platform_interrupt; 105515 u8 flags; 105516 u8 reserved; 105517 u64 base_address; 105518 u64 length; 105519 struct acpi_generic_address doorbell_register; 105520 u64 preserve_mask; 105521 u64 write_mask; 105522 u32 latency; 105523 u32 max_access_rate; 105524 u16 min_turnaround_time; 105525 struct acpi_generic_address platform_ack_register; 105526 u64 ack_preserve_mask; 105527 u64 ack_write_mask; 105528 } __attribute__((packed)); 105529 105530 struct hwspinlock___2; 105531 105532 struct hwspinlock_ops { 105533 int (*trylock)(struct hwspinlock___2 *); 105534 void (*unlock)(struct hwspinlock___2 *); 105535 void (*relax)(struct hwspinlock___2 *); 105536 }; 105537 105538 struct hwspinlock_device; 105539 105540 struct hwspinlock___2 { 105541 struct hwspinlock_device *bank; 105542 spinlock_t lock; 105543 void *priv; 105544 }; 105545 105546 struct hwspinlock_device { 105547 struct device *dev; 105548 const struct hwspinlock_ops *ops; 105549 int base_id; 105550 int num_locks; 105551 struct hwspinlock___2 lock[0]; 105552 }; 105553 105554 struct resource_table { 105555 u32 ver; 105556 u32 num; 105557 u32 reserved[2]; 105558 u32 offset[0]; 105559 }; 105560 105561 struct fw_rsc_hdr { 105562 u32 type; 105563 u8 data[0]; 105564 }; 105565 105566 enum fw_resource_type { 105567 RSC_CARVEOUT = 0, 105568 RSC_DEVMEM = 1, 105569 RSC_TRACE = 2, 105570 RSC_VDEV = 3, 105571 RSC_LAST = 4, 105572 RSC_VENDOR_START = 128, 105573 RSC_VENDOR_END = 512, 105574 }; 105575 105576 struct fw_rsc_carveout { 105577 u32 da; 105578 u32 pa; 105579 u32 len; 105580 u32 flags; 105581 u32 reserved; 105582 u8 name[32]; 105583 }; 105584 105585 struct fw_rsc_devmem { 105586 u32 da; 105587 u32 pa; 105588 u32 len; 105589 u32 flags; 105590 u32 reserved; 105591 u8 name[32]; 105592 }; 105593 105594 struct fw_rsc_trace { 105595 u32 da; 105596 u32 len; 105597 u32 reserved; 105598 u8 name[32]; 105599 }; 105600 105601 struct fw_rsc_vdev_vring { 105602 u32 da; 105603 u32 align; 105604 u32 num; 105605 u32 notifyid; 105606 u32 pa; 105607 }; 105608 105609 struct fw_rsc_vdev { 105610 u32 id; 105611 u32 notifyid; 105612 u32 dfeatures; 105613 u32 gfeatures; 105614 u32 config_len; 105615 u8 status; 105616 u8 num_of_vrings; 105617 u8 reserved[2]; 105618 struct fw_rsc_vdev_vring vring[0]; 105619 }; 105620 105621 struct rproc; 105622 105623 struct rproc_mem_entry { 105624 void *va; 105625 dma_addr_t dma; 105626 size_t len; 105627 u32 da; 105628 void *priv; 105629 char name[32]; 105630 struct list_head node; 105631 u32 rsc_offset; 105632 u32 flags; 105633 u32 of_resm_idx; 105634 int (*alloc)(struct rproc *, struct rproc_mem_entry *); 105635 int (*release)(struct rproc *, struct rproc_mem_entry *); 105636 }; 105637 105638 enum rproc_dump_mechanism { 105639 RPROC_COREDUMP_DISABLED = 0, 105640 RPROC_COREDUMP_ENABLED = 1, 105641 RPROC_COREDUMP_INLINE = 2, 105642 }; 105643 105644 struct rproc_ops; 105645 105646 struct rproc { 105647 struct list_head node; 105648 struct iommu_domain *domain; 105649 const char *name; 105650 const char *firmware; 105651 void *priv; 105652 struct rproc_ops *ops; 105653 struct device dev; 105654 atomic_t power; 105655 unsigned int state; 105656 enum rproc_dump_mechanism dump_conf; 105657 struct mutex lock; 105658 struct dentry *dbg_dir; 105659 struct list_head traces; 105660 int num_traces; 105661 struct list_head carveouts; 105662 struct list_head mappings; 105663 u64 bootaddr; 105664 struct list_head rvdevs; 105665 struct list_head subdevs; 105666 struct idr notifyids; 105667 int index; 105668 struct work_struct crash_handler; 105669 unsigned int crash_cnt; 105670 bool recovery_disabled; 105671 int max_notifyid; 105672 struct resource_table *table_ptr; 105673 struct resource_table *cached_table; 105674 size_t table_sz; 105675 bool has_iommu; 105676 bool auto_boot; 105677 bool autonomous; 105678 struct list_head dump_segments; 105679 int nb_vdev; 105680 u8 elf_class; 105681 u16 elf_machine; 105682 struct cdev cdev; 105683 bool cdev_put_on_release; 105684 }; 105685 105686 enum rsc_handling_status { 105687 RSC_HANDLED = 0, 105688 RSC_IGNORED = 1, 105689 }; 105690 105691 struct rproc_ops { 105692 int (*prepare)(struct rproc *); 105693 int (*unprepare)(struct rproc *); 105694 int (*start)(struct rproc *); 105695 int (*stop)(struct rproc *); 105696 int (*attach)(struct rproc *); 105697 void (*kick)(struct rproc *, int); 105698 void * (*da_to_va)(struct rproc *, u64, size_t); 105699 int (*parse_fw)(struct rproc *, const struct firmware *); 105700 int (*handle_rsc)(struct rproc *, u32, void *, int, int); 105701 struct resource_table * (*find_loaded_rsc_table)(struct rproc *, const struct firmware *); 105702 int (*load)(struct rproc *, const struct firmware *); 105703 int (*sanity_check)(struct rproc *, const struct firmware *); 105704 u64 (*get_boot_addr)(struct rproc *, const struct firmware *); 105705 long unsigned int (*panic)(struct rproc *); 105706 void (*coredump)(struct rproc *); 105707 }; 105708 105709 enum rproc_state { 105710 RPROC_OFFLINE = 0, 105711 RPROC_SUSPENDED = 1, 105712 RPROC_RUNNING = 2, 105713 RPROC_CRASHED = 3, 105714 RPROC_DELETED = 4, 105715 RPROC_DETACHED = 5, 105716 RPROC_LAST = 6, 105717 }; 105718 105719 enum rproc_crash_type { 105720 RPROC_MMUFAULT = 0, 105721 RPROC_WATCHDOG = 1, 105722 RPROC_FATAL_ERROR = 2, 105723 }; 105724 105725 struct rproc_subdev { 105726 struct list_head node; 105727 int (*prepare)(struct rproc_subdev *); 105728 int (*start)(struct rproc_subdev *); 105729 void (*stop)(struct rproc_subdev *, bool); 105730 void (*unprepare)(struct rproc_subdev *); 105731 }; 105732 105733 struct rproc_vdev; 105734 105735 struct rproc_vring { 105736 void *va; 105737 int len; 105738 u32 da; 105739 u32 align; 105740 int notifyid; 105741 struct rproc_vdev *rvdev; 105742 struct virtqueue *vq; 105743 }; 105744 105745 struct rproc_vdev { 105746 struct kref refcount; 105747 struct rproc_subdev subdev; 105748 struct device dev; 105749 unsigned int id; 105750 struct list_head node; 105751 struct rproc *rproc; 105752 struct rproc_vring vring[2]; 105753 u32 rsc_offset; 105754 u32 index; 105755 }; 105756 105757 struct rproc_debug_trace { 105758 struct rproc *rproc; 105759 struct dentry *tfile; 105760 struct list_head node; 105761 struct rproc_mem_entry trace_mem; 105762 }; 105763 105764 typedef int (*rproc_handle_resource_t)(struct rproc *, void *, int, int); 105765 105766 struct rproc_dump_segment { 105767 struct list_head node; 105768 dma_addr_t da; 105769 size_t size; 105770 void *priv; 105771 void (*dump)(struct rproc *, struct rproc_dump_segment *, void *, size_t, size_t); 105772 loff_t offset; 105773 }; 105774 105775 struct rproc_coredump_state { 105776 struct rproc *rproc; 105777 void *header; 105778 struct completion dump_done; 105779 }; 105780 105781 struct sdw_device_id { 105782 __u16 mfg_id; 105783 __u16 part_id; 105784 __u8 sdw_version; 105785 __u8 class_id; 105786 kernel_ulong_t driver_data; 105787 }; 105788 105789 enum sdw_slave_status { 105790 SDW_SLAVE_UNATTACHED = 0, 105791 SDW_SLAVE_ATTACHED = 1, 105792 SDW_SLAVE_ALERT = 2, 105793 SDW_SLAVE_RESERVED = 3, 105794 }; 105795 105796 enum sdw_clk_stop_type { 105797 SDW_CLK_PRE_PREPARE = 0, 105798 SDW_CLK_POST_PREPARE = 1, 105799 SDW_CLK_PRE_DEPREPARE = 2, 105800 SDW_CLK_POST_DEPREPARE = 3, 105801 }; 105802 105803 enum sdw_command_response { 105804 SDW_CMD_OK = 0, 105805 SDW_CMD_IGNORED = 1, 105806 SDW_CMD_FAIL = 2, 105807 SDW_CMD_TIMEOUT = 3, 105808 SDW_CMD_FAIL_OTHER = 4, 105809 }; 105810 105811 enum sdw_clk_stop_reset_behave { 105812 SDW_CLK_STOP_KEEP_STATUS = 1, 105813 }; 105814 105815 enum sdw_p15_behave { 105816 SDW_P15_READ_IGNORED = 0, 105817 SDW_P15_CMD_OK = 1, 105818 }; 105819 105820 enum sdw_dpn_type { 105821 SDW_DPN_FULL = 0, 105822 SDW_DPN_SIMPLE = 1, 105823 SDW_DPN_REDUCED = 2, 105824 }; 105825 105826 enum sdw_clk_stop_mode { 105827 SDW_CLK_STOP_MODE0 = 0, 105828 SDW_CLK_STOP_MODE1 = 1, 105829 }; 105830 105831 struct sdw_dp0_prop { 105832 u32 max_word; 105833 u32 min_word; 105834 u32 num_words; 105835 u32 *words; 105836 bool BRA_flow_controlled; 105837 bool simple_ch_prep_sm; 105838 bool imp_def_interrupts; 105839 }; 105840 105841 struct sdw_dpn_audio_mode { 105842 u32 bus_min_freq; 105843 u32 bus_max_freq; 105844 u32 bus_num_freq; 105845 u32 *bus_freq; 105846 u32 max_freq; 105847 u32 min_freq; 105848 u32 num_freq; 105849 u32 *freq; 105850 u32 prep_ch_behave; 105851 u32 glitchless; 105852 }; 105853 105854 struct sdw_dpn_prop { 105855 u32 num; 105856 u32 max_word; 105857 u32 min_word; 105858 u32 num_words; 105859 u32 *words; 105860 enum sdw_dpn_type type; 105861 u32 max_grouping; 105862 bool simple_ch_prep_sm; 105863 u32 ch_prep_timeout; 105864 u32 imp_def_interrupts; 105865 u32 max_ch; 105866 u32 min_ch; 105867 u32 num_channels; 105868 u32 *channels; 105869 u32 num_ch_combinations; 105870 u32 *ch_combinations; 105871 u32 modes; 105872 u32 max_async_buffer; 105873 bool block_pack_mode; 105874 bool read_only_wordlength; 105875 u32 port_encoding; 105876 struct sdw_dpn_audio_mode *audio_modes; 105877 }; 105878 105879 struct sdw_slave_prop { 105880 u32 mipi_revision; 105881 bool wake_capable; 105882 bool test_mode_capable; 105883 bool clk_stop_mode1; 105884 bool simple_clk_stop_capable; 105885 u32 clk_stop_timeout; 105886 u32 ch_prep_timeout; 105887 enum sdw_clk_stop_reset_behave reset_behave; 105888 bool high_PHY_capable; 105889 bool paging_support; 105890 bool bank_delay_support; 105891 enum sdw_p15_behave p15_behave; 105892 bool lane_control_support; 105893 u32 master_count; 105894 u32 source_ports; 105895 u32 sink_ports; 105896 struct sdw_dp0_prop *dp0_prop; 105897 struct sdw_dpn_prop *src_dpn_prop; 105898 struct sdw_dpn_prop *sink_dpn_prop; 105899 u8 scp_int1_mask; 105900 u32 quirks; 105901 bool is_sdca; 105902 }; 105903 105904 struct sdw_master_prop { 105905 u32 revision; 105906 u32 clk_stop_modes; 105907 u32 max_clk_freq; 105908 u32 num_clk_gears; 105909 u32 *clk_gears; 105910 u32 num_clk_freq; 105911 u32 *clk_freq; 105912 u32 default_frame_rate; 105913 u32 default_row; 105914 u32 default_col; 105915 bool dynamic_frame; 105916 u32 err_threshold; 105917 u32 mclk_freq; 105918 bool hw_disabled; 105919 }; 105920 105921 struct sdw_slave_id { 105922 __u16 mfg_id; 105923 __u16 part_id; 105924 __u8 class_id; 105925 __u8 unique_id; 105926 __u8 sdw_version: 4; 105927 }; 105928 105929 struct sdw_slave_intr_status { 105930 bool sdca_cascade; 105931 u8 control_port; 105932 u8 port[15]; 105933 }; 105934 105935 enum sdw_reg_bank { 105936 SDW_BANK0 = 0, 105937 SDW_BANK1 = 1, 105938 }; 105939 105940 struct sdw_prepare_ch { 105941 unsigned int num; 105942 unsigned int ch_mask; 105943 bool prepare; 105944 unsigned int bank; 105945 }; 105946 105947 enum sdw_port_prep_ops { 105948 SDW_OPS_PORT_PRE_PREP = 0, 105949 SDW_OPS_PORT_PREP = 1, 105950 SDW_OPS_PORT_POST_PREP = 2, 105951 }; 105952 105953 struct sdw_bus_params { 105954 enum sdw_reg_bank curr_bank; 105955 enum sdw_reg_bank next_bank; 105956 unsigned int max_dr_freq; 105957 unsigned int curr_dr_freq; 105958 unsigned int bandwidth; 105959 unsigned int col; 105960 unsigned int row; 105961 int s_data_mode; 105962 int m_data_mode; 105963 }; 105964 105965 struct sdw_slave; 105966 105967 struct sdw_slave_ops { 105968 int (*read_prop)(struct sdw_slave *); 105969 int (*interrupt_callback)(struct sdw_slave *, struct sdw_slave_intr_status *); 105970 int (*update_status)(struct sdw_slave *, enum sdw_slave_status); 105971 int (*bus_config)(struct sdw_slave *, struct sdw_bus_params *); 105972 int (*port_prep)(struct sdw_slave *, struct sdw_prepare_ch *, enum sdw_port_prep_ops); 105973 int (*get_clk_stop_mode)(struct sdw_slave *); 105974 int (*clk_stop)(struct sdw_slave *, enum sdw_clk_stop_mode, enum sdw_clk_stop_type); 105975 }; 105976 105977 struct sdw_bus; 105978 105979 struct sdw_slave { 105980 struct sdw_slave_id id; 105981 struct device dev; 105982 enum sdw_slave_status status; 105983 struct sdw_bus *bus; 105984 const struct sdw_slave_ops *ops; 105985 struct sdw_slave_prop prop; 105986 struct dentry *debugfs; 105987 struct list_head node; 105988 struct completion port_ready[15]; 105989 enum sdw_clk_stop_mode curr_clk_stop_mode; 105990 u16 dev_num; 105991 u16 dev_num_sticky; 105992 bool probed; 105993 struct completion probe_complete; 105994 struct completion enumeration_complete; 105995 struct completion initialization_complete; 105996 u32 unattach_request; 105997 bool first_interrupt_done; 105998 }; 105999 106000 struct sdw_msg; 106001 106002 struct sdw_defer { 106003 int length; 106004 struct completion complete; 106005 struct sdw_msg *msg; 106006 }; 106007 106008 struct sdw_master_device; 106009 106010 struct sdw_master_ops; 106011 106012 struct sdw_master_port_ops; 106013 106014 struct sdw_bus { 106015 struct device *dev; 106016 struct sdw_master_device *md; 106017 unsigned int link_id; 106018 int id; 106019 struct list_head slaves; 106020 long unsigned int assigned[1]; 106021 struct mutex bus_lock; 106022 struct mutex msg_lock; 106023 int (*compute_params)(struct sdw_bus *); 106024 const struct sdw_master_ops *ops; 106025 const struct sdw_master_port_ops *port_ops; 106026 struct sdw_bus_params params; 106027 struct sdw_master_prop prop; 106028 struct list_head m_rt_list; 106029 struct dentry *debugfs; 106030 struct sdw_defer defer_msg; 106031 unsigned int clk_stop_timeout; 106032 u32 bank_switch_timeout; 106033 bool multi_link; 106034 int hw_sync_min_links; 106035 }; 106036 106037 struct sdw_master_device { 106038 struct device dev; 106039 struct sdw_bus *bus; 106040 }; 106041 106042 struct sdw_driver { 106043 const char *name; 106044 int (*probe)(struct sdw_slave *, const struct sdw_device_id *); 106045 int (*remove)(struct sdw_slave *); 106046 void (*shutdown)(struct sdw_slave *); 106047 const struct sdw_device_id *id_table; 106048 const struct sdw_slave_ops *ops; 106049 struct device_driver driver; 106050 }; 106051 106052 struct sdw_port_params { 106053 unsigned int num; 106054 unsigned int bps; 106055 unsigned int flow_mode; 106056 unsigned int data_mode; 106057 }; 106058 106059 struct sdw_transport_params { 106060 bool blk_grp_ctrl_valid; 106061 unsigned int port_num; 106062 unsigned int blk_grp_ctrl; 106063 unsigned int sample_interval; 106064 unsigned int offset1; 106065 unsigned int offset2; 106066 unsigned int hstart; 106067 unsigned int hstop; 106068 unsigned int blk_pkg_mode; 106069 unsigned int lane_ctrl; 106070 }; 106071 106072 struct sdw_enable_ch { 106073 unsigned int port_num; 106074 unsigned int ch_mask; 106075 bool enable; 106076 }; 106077 106078 struct sdw_master_port_ops { 106079 int (*dpn_set_port_params)(struct sdw_bus *, struct sdw_port_params *, unsigned int); 106080 int (*dpn_set_port_transport_params)(struct sdw_bus *, struct sdw_transport_params *, enum sdw_reg_bank); 106081 int (*dpn_port_prep)(struct sdw_bus *, struct sdw_prepare_ch *); 106082 int (*dpn_port_enable_ch)(struct sdw_bus *, struct sdw_enable_ch *, unsigned int); 106083 }; 106084 106085 struct sdw_msg { 106086 u16 addr; 106087 u16 len; 106088 u8 dev_num; 106089 u8 addr_page1; 106090 u8 addr_page2; 106091 u8 flags; 106092 u8 *buf; 106093 bool ssp_sync; 106094 bool page; 106095 }; 106096 106097 struct sdw_master_ops { 106098 int (*read_prop)(struct sdw_bus *); 106099 enum sdw_command_response (*xfer_msg)(struct sdw_bus *, struct sdw_msg *); 106100 enum sdw_command_response (*xfer_msg_defer)(struct sdw_bus *, struct sdw_msg *, struct sdw_defer *); 106101 enum sdw_command_response (*reset_page_addr)(struct sdw_bus *, unsigned int); 106102 int (*set_bus_conf)(struct sdw_bus *, struct sdw_bus_params *); 106103 int (*pre_bank_switch)(struct sdw_bus *); 106104 int (*post_bank_switch)(struct sdw_bus *); 106105 }; 106106 106107 enum sdw_port_data_mode { 106108 SDW_PORT_DATA_MODE_NORMAL = 0, 106109 SDW_PORT_DATA_MODE_PRBS = 1, 106110 SDW_PORT_DATA_MODE_STATIC_0 = 2, 106111 SDW_PORT_DATA_MODE_STATIC_1 = 3, 106112 }; 106113 106114 enum { 106115 SDW_MSG_FLAG_READ = 0, 106116 SDW_MSG_FLAG_WRITE = 1, 106117 }; 106118 106119 enum sdw_stream_type { 106120 SDW_STREAM_PCM = 0, 106121 SDW_STREAM_PDM = 1, 106122 }; 106123 106124 enum sdw_data_direction { 106125 SDW_DATA_DIR_RX = 0, 106126 SDW_DATA_DIR_TX = 1, 106127 }; 106128 106129 struct sdw_port_config { 106130 unsigned int num; 106131 unsigned int ch_mask; 106132 }; 106133 106134 struct sdw_stream_config { 106135 unsigned int frame_rate; 106136 unsigned int ch_count; 106137 unsigned int bps; 106138 enum sdw_data_direction direction; 106139 enum sdw_stream_type type; 106140 }; 106141 106142 enum sdw_stream_state { 106143 SDW_STREAM_ALLOCATED = 0, 106144 SDW_STREAM_CONFIGURED = 1, 106145 SDW_STREAM_PREPARED = 2, 106146 SDW_STREAM_ENABLED = 3, 106147 SDW_STREAM_DISABLED = 4, 106148 SDW_STREAM_DEPREPARED = 5, 106149 SDW_STREAM_RELEASED = 6, 106150 }; 106151 106152 struct sdw_stream_params { 106153 unsigned int rate; 106154 unsigned int ch_count; 106155 unsigned int bps; 106156 }; 106157 106158 struct sdw_stream_runtime { 106159 const char *name; 106160 struct sdw_stream_params params; 106161 enum sdw_stream_state state; 106162 enum sdw_stream_type type; 106163 struct list_head master_list; 106164 int m_rt_count; 106165 }; 106166 106167 struct snd_shutdown_f_ops; 106168 106169 struct snd_mixer_oss; 106170 106171 struct snd_info_entry; 106172 106173 struct snd_card { 106174 int number; 106175 char id[16]; 106176 char driver[16]; 106177 char shortname[32]; 106178 char longname[80]; 106179 char irq_descr[32]; 106180 char mixername[80]; 106181 char components[128]; 106182 struct module *module; 106183 void *private_data; 106184 void (*private_free)(struct snd_card *); 106185 struct list_head devices; 106186 struct device ctl_dev; 106187 unsigned int last_numid; 106188 struct rw_semaphore controls_rwsem; 106189 rwlock_t ctl_files_rwlock; 106190 int controls_count; 106191 int user_ctl_count; 106192 struct list_head controls; 106193 struct list_head ctl_files; 106194 struct snd_info_entry *proc_root; 106195 struct proc_dir_entry *proc_root_link; 106196 struct list_head files_list; 106197 struct snd_shutdown_f_ops *s_f_ops; 106198 spinlock_t files_lock; 106199 int shutdown; 106200 struct completion *release_completion; 106201 struct device *dev; 106202 struct device card_dev; 106203 const struct attribute_group *dev_groups[4]; 106204 bool registered; 106205 int sync_irq; 106206 wait_queue_head_t remove_sleep; 106207 size_t total_pcm_alloc_bytes; 106208 struct mutex memory_mutex; 106209 unsigned int power_state; 106210 wait_queue_head_t power_sleep; 106211 struct snd_mixer_oss *mixer_oss; 106212 int mixer_oss_change_count; 106213 }; 106214 106215 struct snd_info_buffer; 106216 106217 struct snd_info_entry_text { 106218 void (*read)(struct snd_info_entry *, struct snd_info_buffer *); 106219 void (*write)(struct snd_info_entry *, struct snd_info_buffer *); 106220 }; 106221 106222 struct snd_info_entry_ops; 106223 106224 struct snd_info_entry { 106225 const char *name; 106226 umode_t mode; 106227 long int size; 106228 short unsigned int content; 106229 union { 106230 struct snd_info_entry_text text; 106231 const struct snd_info_entry_ops *ops; 106232 } c; 106233 struct snd_info_entry *parent; 106234 struct module *module; 106235 void *private_data; 106236 void (*private_free)(struct snd_info_entry *); 106237 struct proc_dir_entry *p; 106238 struct mutex access; 106239 struct list_head children; 106240 struct list_head list; 106241 }; 106242 106243 struct snd_aes_iec958 { 106244 unsigned char status[24]; 106245 unsigned char subcode[147]; 106246 unsigned char pad; 106247 unsigned char dig_subframe[4]; 106248 }; 106249 106250 typedef long unsigned int snd_pcm_uframes_t; 106251 106252 typedef long int snd_pcm_sframes_t; 106253 106254 enum { 106255 SNDRV_PCM_STREAM_PLAYBACK = 0, 106256 SNDRV_PCM_STREAM_CAPTURE = 1, 106257 SNDRV_PCM_STREAM_LAST = 1, 106258 }; 106259 106260 typedef int snd_pcm_access_t; 106261 106262 typedef int snd_pcm_format_t; 106263 106264 typedef int snd_pcm_subformat_t; 106265 106266 typedef int snd_pcm_state_t; 106267 106268 union snd_pcm_sync_id { 106269 unsigned char id[16]; 106270 short unsigned int id16[8]; 106271 unsigned int id32[4]; 106272 }; 106273 106274 struct snd_interval { 106275 unsigned int min; 106276 unsigned int max; 106277 unsigned int openmin: 1; 106278 unsigned int openmax: 1; 106279 unsigned int integer: 1; 106280 unsigned int empty: 1; 106281 }; 106282 106283 struct snd_mask { 106284 __u32 bits[8]; 106285 }; 106286 106287 struct snd_pcm_hw_params { 106288 unsigned int flags; 106289 struct snd_mask masks[3]; 106290 struct snd_mask mres[5]; 106291 struct snd_interval intervals[12]; 106292 struct snd_interval ires[9]; 106293 unsigned int rmask; 106294 unsigned int cmask; 106295 unsigned int info; 106296 unsigned int msbits; 106297 unsigned int rate_num; 106298 unsigned int rate_den; 106299 snd_pcm_uframes_t fifo_size; 106300 unsigned char reserved[64]; 106301 }; 106302 106303 typedef char __pad_before_uframe[0]; 106304 106305 typedef char __pad_after_uframe[0]; 106306 106307 struct snd_pcm_mmap_status { 106308 snd_pcm_state_t state; 106309 __u32 pad1; 106310 __pad_before_uframe __pad1; 106311 snd_pcm_uframes_t hw_ptr; 106312 __pad_after_uframe __pad2; 106313 struct __kernel_timespec tstamp; 106314 snd_pcm_state_t suspended_state; 106315 __u32 pad3; 106316 struct __kernel_timespec audio_tstamp; 106317 }; 106318 106319 struct snd_pcm_mmap_control { 106320 __pad_before_uframe __pad1; 106321 snd_pcm_uframes_t appl_ptr; 106322 __pad_before_uframe __pad2; 106323 __pad_before_uframe __pad3; 106324 snd_pcm_uframes_t avail_min; 106325 __pad_after_uframe __pad4; 106326 }; 106327 106328 typedef int snd_ctl_elem_type_t; 106329 106330 typedef int snd_ctl_elem_iface_t; 106331 106332 struct snd_ctl_elem_id { 106333 unsigned int numid; 106334 snd_ctl_elem_iface_t iface; 106335 unsigned int device; 106336 unsigned int subdevice; 106337 unsigned char name[44]; 106338 unsigned int index; 106339 }; 106340 106341 struct snd_ctl_elem_info { 106342 struct snd_ctl_elem_id id; 106343 snd_ctl_elem_type_t type; 106344 unsigned int access; 106345 unsigned int count; 106346 __kernel_pid_t owner; 106347 union { 106348 struct { 106349 long int min; 106350 long int max; 106351 long int step; 106352 } integer; 106353 struct { 106354 long long int min; 106355 long long int max; 106356 long long int step; 106357 } integer64; 106358 struct { 106359 unsigned int items; 106360 unsigned int item; 106361 char name[64]; 106362 __u64 names_ptr; 106363 unsigned int names_length; 106364 } enumerated; 106365 unsigned char reserved[128]; 106366 } value; 106367 unsigned char reserved[64]; 106368 }; 106369 106370 struct snd_ctl_elem_value { 106371 struct snd_ctl_elem_id id; 106372 unsigned int indirect: 1; 106373 union { 106374 union { 106375 long int value[128]; 106376 long int *value_ptr; 106377 } integer; 106378 union { 106379 long long int value[64]; 106380 long long int *value_ptr; 106381 } integer64; 106382 union { 106383 unsigned int item[128]; 106384 unsigned int *item_ptr; 106385 } enumerated; 106386 union { 106387 unsigned char data[512]; 106388 unsigned char *data_ptr; 106389 } bytes; 106390 struct snd_aes_iec958 iec958; 106391 } value; 106392 unsigned char reserved[128]; 106393 }; 106394 106395 struct snd_dma_device { 106396 int type; 106397 struct device *dev; 106398 }; 106399 106400 struct snd_dma_buffer { 106401 struct snd_dma_device dev; 106402 unsigned char *area; 106403 dma_addr_t addr; 106404 size_t bytes; 106405 void *private_data; 106406 }; 106407 106408 struct snd_pcm_oss_setup { 106409 char *task_name; 106410 unsigned int disable: 1; 106411 unsigned int direct: 1; 106412 unsigned int block: 1; 106413 unsigned int nonblock: 1; 106414 unsigned int partialfrag: 1; 106415 unsigned int nosilence: 1; 106416 unsigned int buggyptr: 1; 106417 unsigned int periods; 106418 unsigned int period_size; 106419 struct snd_pcm_oss_setup *next; 106420 }; 106421 106422 struct snd_pcm_plugin; 106423 106424 struct snd_pcm_oss_runtime { 106425 unsigned int params: 1; 106426 unsigned int prepare: 1; 106427 unsigned int trigger: 1; 106428 unsigned int sync_trigger: 1; 106429 int rate; 106430 int format; 106431 unsigned int channels; 106432 unsigned int fragshift; 106433 unsigned int maxfrags; 106434 unsigned int subdivision; 106435 size_t period_bytes; 106436 size_t period_frames; 106437 size_t period_ptr; 106438 unsigned int periods; 106439 size_t buffer_bytes; 106440 size_t bytes; 106441 size_t mmap_bytes; 106442 char *buffer; 106443 size_t buffer_used; 106444 struct mutex params_lock; 106445 atomic_t rw_ref; 106446 struct snd_pcm_plugin *plugin_first; 106447 struct snd_pcm_plugin *plugin_last; 106448 unsigned int prev_hw_ptr_period; 106449 }; 106450 106451 struct snd_timer; 106452 106453 struct snd_pcm_group { 106454 spinlock_t lock; 106455 struct mutex mutex; 106456 struct list_head substreams; 106457 refcount_t refs; 106458 }; 106459 106460 struct snd_pcm_oss_substream { 106461 unsigned int oss: 1; 106462 struct snd_pcm_oss_setup setup; 106463 }; 106464 106465 struct snd_pcm; 106466 106467 struct snd_pcm_str; 106468 106469 struct snd_pcm_ops; 106470 106471 struct snd_pcm_runtime; 106472 106473 struct snd_pcm_substream { 106474 struct snd_pcm *pcm; 106475 struct snd_pcm_str *pstr; 106476 void *private_data; 106477 int number; 106478 char name[32]; 106479 int stream; 106480 struct pm_qos_request latency_pm_qos_req; 106481 size_t buffer_bytes_max; 106482 struct snd_dma_buffer dma_buffer; 106483 size_t dma_max; 106484 const struct snd_pcm_ops *ops; 106485 struct snd_pcm_runtime *runtime; 106486 struct snd_timer *timer; 106487 unsigned int timer_running: 1; 106488 long int wait_time; 106489 struct snd_pcm_substream *next; 106490 struct list_head link_list; 106491 struct snd_pcm_group self_group; 106492 struct snd_pcm_group *group; 106493 int ref_count; 106494 atomic_t mmap_count; 106495 unsigned int f_flags; 106496 void (*pcm_release)(struct snd_pcm_substream *); 106497 struct pid *pid; 106498 struct snd_pcm_oss_substream oss; 106499 struct snd_info_entry *proc_root; 106500 unsigned int hw_opened: 1; 106501 unsigned int managed_buffer_alloc: 1; 106502 }; 106503 106504 struct snd_pcm_oss_stream { 106505 struct snd_pcm_oss_setup *setup_list; 106506 struct mutex setup_mutex; 106507 struct snd_info_entry *proc_entry; 106508 }; 106509 106510 struct snd_pcm_oss { 106511 int reg; 106512 unsigned int reg_mask; 106513 }; 106514 106515 struct snd_pcm_hardware { 106516 unsigned int info; 106517 u64 formats; 106518 unsigned int rates; 106519 unsigned int rate_min; 106520 unsigned int rate_max; 106521 unsigned int channels_min; 106522 unsigned int channels_max; 106523 size_t buffer_bytes_max; 106524 size_t period_bytes_min; 106525 size_t period_bytes_max; 106526 unsigned int periods_min; 106527 unsigned int periods_max; 106528 size_t fifo_size; 106529 }; 106530 106531 struct snd_pcm_audio_tstamp_config; 106532 106533 struct snd_pcm_audio_tstamp_report; 106534 106535 struct snd_pcm_ops { 106536 int (*open)(struct snd_pcm_substream *); 106537 int (*close)(struct snd_pcm_substream *); 106538 int (*ioctl)(struct snd_pcm_substream *, unsigned int, void *); 106539 int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *); 106540 int (*hw_free)(struct snd_pcm_substream *); 106541 int (*prepare)(struct snd_pcm_substream *); 106542 int (*trigger)(struct snd_pcm_substream *, int); 106543 int (*sync_stop)(struct snd_pcm_substream *); 106544 snd_pcm_uframes_t (*pointer)(struct snd_pcm_substream *); 106545 int (*get_time_info)(struct snd_pcm_substream *, struct timespec64 *, struct timespec64 *, struct snd_pcm_audio_tstamp_config *, struct snd_pcm_audio_tstamp_report *); 106546 int (*fill_silence)(struct snd_pcm_substream *, int, long unsigned int, long unsigned int); 106547 int (*copy_user)(struct snd_pcm_substream *, int, long unsigned int, void *, long unsigned int); 106548 int (*copy_kernel)(struct snd_pcm_substream *, int, long unsigned int, void *, long unsigned int); 106549 struct page * (*page)(struct snd_pcm_substream *, long unsigned int); 106550 int (*mmap)(struct snd_pcm_substream *, struct vm_area_struct *); 106551 int (*ack)(struct snd_pcm_substream *); 106552 }; 106553 106554 struct snd_pcm_audio_tstamp_config { 106555 u32 type_requested: 4; 106556 u32 report_delay: 1; 106557 }; 106558 106559 struct snd_pcm_audio_tstamp_report { 106560 u32 valid: 1; 106561 u32 actual_type: 4; 106562 u32 accuracy_report: 1; 106563 u32 accuracy; 106564 }; 106565 106566 struct snd_pcm_hw_rule; 106567 106568 typedef int (*snd_pcm_hw_rule_func_t)(struct snd_pcm_hw_params *, struct snd_pcm_hw_rule *); 106569 106570 struct snd_pcm_hw_rule { 106571 unsigned int cond; 106572 int var; 106573 int deps[5]; 106574 snd_pcm_hw_rule_func_t func; 106575 void *private; 106576 }; 106577 106578 struct snd_pcm_hw_constraints { 106579 struct snd_mask masks[3]; 106580 struct snd_interval intervals[12]; 106581 unsigned int rules_num; 106582 unsigned int rules_all; 106583 struct snd_pcm_hw_rule *rules; 106584 }; 106585 106586 struct snd_pcm_runtime { 106587 struct snd_pcm_substream *trigger_master; 106588 struct timespec64 trigger_tstamp; 106589 bool trigger_tstamp_latched; 106590 int overrange; 106591 snd_pcm_uframes_t avail_max; 106592 snd_pcm_uframes_t hw_ptr_base; 106593 snd_pcm_uframes_t hw_ptr_interrupt; 106594 long unsigned int hw_ptr_jiffies; 106595 long unsigned int hw_ptr_buffer_jiffies; 106596 snd_pcm_sframes_t delay; 106597 u64 hw_ptr_wrap; 106598 snd_pcm_access_t access; 106599 snd_pcm_format_t format; 106600 snd_pcm_subformat_t subformat; 106601 unsigned int rate; 106602 unsigned int channels; 106603 snd_pcm_uframes_t period_size; 106604 unsigned int periods; 106605 snd_pcm_uframes_t buffer_size; 106606 snd_pcm_uframes_t min_align; 106607 size_t byte_align; 106608 unsigned int frame_bits; 106609 unsigned int sample_bits; 106610 unsigned int info; 106611 unsigned int rate_num; 106612 unsigned int rate_den; 106613 unsigned int no_period_wakeup: 1; 106614 int tstamp_mode; 106615 unsigned int period_step; 106616 snd_pcm_uframes_t start_threshold; 106617 snd_pcm_uframes_t stop_threshold; 106618 snd_pcm_uframes_t silence_threshold; 106619 snd_pcm_uframes_t silence_size; 106620 snd_pcm_uframes_t boundary; 106621 snd_pcm_uframes_t silence_start; 106622 snd_pcm_uframes_t silence_filled; 106623 union snd_pcm_sync_id sync; 106624 struct snd_pcm_mmap_status *status; 106625 struct snd_pcm_mmap_control *control; 106626 snd_pcm_uframes_t twake; 106627 wait_queue_head_t sleep; 106628 wait_queue_head_t tsleep; 106629 struct fasync_struct *fasync; 106630 bool stop_operating; 106631 void *private_data; 106632 void (*private_free)(struct snd_pcm_runtime *); 106633 struct snd_pcm_hardware hw; 106634 struct snd_pcm_hw_constraints hw_constraints; 106635 unsigned int timer_resolution; 106636 int tstamp_type; 106637 unsigned char *dma_area; 106638 dma_addr_t dma_addr; 106639 size_t dma_bytes; 106640 struct snd_dma_buffer *dma_buffer_p; 106641 unsigned int buffer_changed: 1; 106642 struct snd_pcm_audio_tstamp_config audio_tstamp_config; 106643 struct snd_pcm_audio_tstamp_report audio_tstamp_report; 106644 struct timespec64 driver_tstamp; 106645 struct snd_pcm_oss_runtime oss; 106646 }; 106647 106648 struct snd_kcontrol; 106649 106650 struct snd_pcm_str { 106651 int stream; 106652 struct snd_pcm *pcm; 106653 unsigned int substream_count; 106654 unsigned int substream_opened; 106655 struct snd_pcm_substream *substream; 106656 struct snd_pcm_oss_stream oss; 106657 struct snd_info_entry *proc_root; 106658 struct snd_kcontrol *chmap_kctl; 106659 struct device dev; 106660 }; 106661 106662 struct snd_pcm { 106663 struct snd_card *card; 106664 struct list_head list; 106665 int device; 106666 unsigned int info_flags; 106667 short unsigned int dev_class; 106668 short unsigned int dev_subclass; 106669 char id[64]; 106670 char name[80]; 106671 struct snd_pcm_str streams[2]; 106672 struct mutex open_mutex; 106673 wait_queue_head_t open_wait; 106674 void *private_data; 106675 void (*private_free)(struct snd_pcm *); 106676 bool internal; 106677 bool nonatomic; 106678 bool no_device_suspend; 106679 struct snd_pcm_oss oss; 106680 }; 106681 106682 typedef int snd_kcontrol_info_t(struct snd_kcontrol *, struct snd_ctl_elem_info *); 106683 106684 typedef int snd_kcontrol_get_t(struct snd_kcontrol *, struct snd_ctl_elem_value *); 106685 106686 typedef int snd_kcontrol_put_t(struct snd_kcontrol *, struct snd_ctl_elem_value *); 106687 106688 typedef int snd_kcontrol_tlv_rw_t(struct snd_kcontrol *, int, unsigned int, unsigned int *); 106689 106690 struct snd_ctl_file; 106691 106692 struct snd_kcontrol_volatile { 106693 struct snd_ctl_file *owner; 106694 unsigned int access; 106695 }; 106696 106697 struct snd_kcontrol { 106698 struct list_head list; 106699 struct snd_ctl_elem_id id; 106700 unsigned int count; 106701 snd_kcontrol_info_t *info; 106702 snd_kcontrol_get_t *get; 106703 snd_kcontrol_put_t *put; 106704 union { 106705 snd_kcontrol_tlv_rw_t *c; 106706 const unsigned int *p; 106707 } tlv; 106708 long unsigned int private_value; 106709 void *private_data; 106710 void (*private_free)(struct snd_kcontrol *); 106711 struct snd_kcontrol_volatile vd[0]; 106712 }; 106713 106714 struct snd_enc_wma { 106715 __u32 super_block_align; 106716 }; 106717 106718 struct snd_enc_vorbis { 106719 __s32 quality; 106720 __u32 managed; 106721 __u32 max_bit_rate; 106722 __u32 min_bit_rate; 106723 __u32 downmix; 106724 }; 106725 106726 struct snd_enc_real { 106727 __u32 quant_bits; 106728 __u32 start_region; 106729 __u32 num_regions; 106730 }; 106731 106732 struct snd_enc_flac { 106733 __u32 num; 106734 __u32 gain; 106735 }; 106736 106737 struct snd_enc_generic { 106738 __u32 bw; 106739 __s32 reserved[15]; 106740 }; 106741 106742 struct snd_dec_flac { 106743 __u16 sample_size; 106744 __u16 min_blk_size; 106745 __u16 max_blk_size; 106746 __u16 min_frame_size; 106747 __u16 max_frame_size; 106748 __u16 reserved; 106749 }; 106750 106751 struct snd_dec_wma { 106752 __u32 encoder_option; 106753 __u32 adv_encoder_option; 106754 __u32 adv_encoder_option2; 106755 __u32 reserved; 106756 }; 106757 106758 struct snd_dec_alac { 106759 __u32 frame_length; 106760 __u8 compatible_version; 106761 __u8 pb; 106762 __u8 mb; 106763 __u8 kb; 106764 __u32 max_run; 106765 __u32 max_frame_bytes; 106766 }; 106767 106768 struct snd_dec_ape { 106769 __u16 compatible_version; 106770 __u16 compression_level; 106771 __u32 format_flags; 106772 __u32 blocks_per_frame; 106773 __u32 final_frame_blocks; 106774 __u32 total_frames; 106775 __u32 seek_table_present; 106776 }; 106777 106778 union snd_codec_options { 106779 struct snd_enc_wma wma; 106780 struct snd_enc_vorbis vorbis; 106781 struct snd_enc_real real; 106782 struct snd_enc_flac flac; 106783 struct snd_enc_generic generic; 106784 struct snd_dec_flac flac_d; 106785 struct snd_dec_wma wma_d; 106786 struct snd_dec_alac alac_d; 106787 struct snd_dec_ape ape_d; 106788 }; 106789 106790 struct snd_codec_desc { 106791 __u32 max_ch; 106792 __u32 sample_rates[32]; 106793 __u32 num_sample_rates; 106794 __u32 bit_rate[32]; 106795 __u32 num_bitrates; 106796 __u32 rate_control; 106797 __u32 profiles; 106798 __u32 modes; 106799 __u32 formats; 106800 __u32 min_buffer; 106801 __u32 reserved[15]; 106802 }; 106803 106804 struct snd_codec { 106805 __u32 id; 106806 __u32 ch_in; 106807 __u32 ch_out; 106808 __u32 sample_rate; 106809 __u32 bit_rate; 106810 __u32 rate_control; 106811 __u32 profile; 106812 __u32 level; 106813 __u32 ch_mode; 106814 __u32 format; 106815 __u32 align; 106816 union snd_codec_options options; 106817 __u32 reserved[3]; 106818 }; 106819 106820 struct snd_compressed_buffer { 106821 __u32 fragment_size; 106822 __u32 fragments; 106823 }; 106824 106825 struct snd_compr_params { 106826 struct snd_compressed_buffer buffer; 106827 struct snd_codec codec; 106828 __u8 no_wake_mode; 106829 }; 106830 106831 struct snd_compr_tstamp { 106832 __u32 byte_offset; 106833 __u32 copied_total; 106834 __u32 pcm_frames; 106835 __u32 pcm_io_frames; 106836 __u32 sampling_rate; 106837 }; 106838 106839 enum snd_compr_direction { 106840 SND_COMPRESS_PLAYBACK = 0, 106841 SND_COMPRESS_CAPTURE = 1, 106842 }; 106843 106844 struct snd_compr_caps { 106845 __u32 num_codecs; 106846 __u32 direction; 106847 __u32 min_fragment_size; 106848 __u32 max_fragment_size; 106849 __u32 min_fragments; 106850 __u32 max_fragments; 106851 __u32 codecs[32]; 106852 __u32 reserved[11]; 106853 }; 106854 106855 struct snd_compr_codec_caps { 106856 __u32 codec; 106857 __u32 num_descriptors; 106858 struct snd_codec_desc descriptor[32]; 106859 }; 106860 106861 struct snd_compr_metadata { 106862 __u32 key; 106863 __u32 value[8]; 106864 }; 106865 106866 struct snd_compr_ops; 106867 106868 struct snd_compr_runtime { 106869 snd_pcm_state_t state; 106870 struct snd_compr_ops *ops; 106871 void *buffer; 106872 u64 buffer_size; 106873 u32 fragment_size; 106874 u32 fragments; 106875 u64 total_bytes_available; 106876 u64 total_bytes_transferred; 106877 wait_queue_head_t sleep; 106878 void *private_data; 106879 unsigned char *dma_area; 106880 dma_addr_t dma_addr; 106881 size_t dma_bytes; 106882 struct snd_dma_buffer *dma_buffer_p; 106883 }; 106884 106885 struct snd_compr_stream; 106886 106887 struct snd_compr_ops { 106888 int (*open)(struct snd_compr_stream *); 106889 int (*free)(struct snd_compr_stream *); 106890 int (*set_params)(struct snd_compr_stream *, struct snd_compr_params *); 106891 int (*get_params)(struct snd_compr_stream *, struct snd_codec *); 106892 int (*set_metadata)(struct snd_compr_stream *, struct snd_compr_metadata *); 106893 int (*get_metadata)(struct snd_compr_stream *, struct snd_compr_metadata *); 106894 int (*trigger)(struct snd_compr_stream *, int); 106895 int (*pointer)(struct snd_compr_stream *, struct snd_compr_tstamp *); 106896 int (*copy)(struct snd_compr_stream *, char *, size_t); 106897 int (*mmap)(struct snd_compr_stream *, struct vm_area_struct *); 106898 int (*ack)(struct snd_compr_stream *, size_t); 106899 int (*get_caps)(struct snd_compr_stream *, struct snd_compr_caps *); 106900 int (*get_codec_caps)(struct snd_compr_stream *, struct snd_compr_codec_caps *); 106901 }; 106902 106903 struct snd_compr; 106904 106905 struct snd_compr_stream { 106906 const char *name; 106907 struct snd_compr_ops *ops; 106908 struct snd_compr_runtime *runtime; 106909 struct snd_compr *device; 106910 struct delayed_work error_work; 106911 enum snd_compr_direction direction; 106912 bool metadata_set; 106913 bool next_track; 106914 bool partial_drain; 106915 bool pause_in_draining; 106916 void *private_data; 106917 struct snd_dma_buffer dma_buffer; 106918 }; 106919 106920 struct snd_compr { 106921 const char *name; 106922 struct device dev; 106923 struct snd_compr_ops *ops; 106924 void *private_data; 106925 struct snd_card *card; 106926 unsigned int direction; 106927 struct mutex lock; 106928 int device; 106929 bool use_pause_in_draining; 106930 char id[64]; 106931 struct snd_info_entry *proc_root; 106932 struct snd_info_entry *proc_info_entry; 106933 }; 106934 106935 struct snd_kcontrol_new { 106936 snd_ctl_elem_iface_t iface; 106937 unsigned int device; 106938 unsigned int subdevice; 106939 const char *name; 106940 unsigned int index; 106941 unsigned int access; 106942 unsigned int count; 106943 snd_kcontrol_info_t *info; 106944 snd_kcontrol_get_t *get; 106945 snd_kcontrol_put_t *put; 106946 union { 106947 snd_kcontrol_tlv_rw_t *c; 106948 const unsigned int *p; 106949 } tlv; 106950 long unsigned int private_value; 106951 }; 106952 106953 struct snd_ctl_file { 106954 struct list_head list; 106955 struct snd_card *card; 106956 struct pid *pid; 106957 int preferred_subdevice[2]; 106958 wait_queue_head_t change_sleep; 106959 spinlock_t read_lock; 106960 struct fasync_struct *fasync; 106961 int subscribed; 106962 struct list_head events; 106963 }; 106964 106965 enum { 106966 SND_CTL_SUBDEV_PCM = 0, 106967 SND_CTL_SUBDEV_RAWMIDI = 1, 106968 SND_CTL_SUBDEV_ITEMS = 2, 106969 }; 106970 106971 struct snd_info_buffer { 106972 char *buffer; 106973 unsigned int curr; 106974 unsigned int size; 106975 unsigned int len; 106976 int stop; 106977 int error; 106978 }; 106979 106980 struct snd_info_entry_ops { 106981 int (*open)(struct snd_info_entry *, short unsigned int, void **); 106982 int (*release)(struct snd_info_entry *, short unsigned int, void *); 106983 ssize_t (*read)(struct snd_info_entry *, void *, struct file *, char *, size_t, loff_t); 106984 ssize_t (*write)(struct snd_info_entry *, void *, struct file *, const char *, size_t, loff_t); 106985 loff_t (*llseek)(struct snd_info_entry *, void *, struct file *, loff_t, int); 106986 __poll_t (*poll)(struct snd_info_entry *, void *, struct file *, poll_table *); 106987 int (*ioctl)(struct snd_info_entry *, void *, struct file *, unsigned int, long unsigned int); 106988 int (*mmap)(struct snd_info_entry *, void *, struct inode *, struct file *, struct vm_area_struct *); 106989 }; 106990 106991 struct snd_soc_tplg_hdr { 106992 __le32 magic; 106993 __le32 abi; 106994 __le32 version; 106995 __le32 type; 106996 __le32 size; 106997 __le32 vendor_type; 106998 __le32 payload_size; 106999 __le32 index; 107000 __le32 count; 107001 }; 107002 107003 struct snd_soc_tplg_vendor_uuid_elem { 107004 __le32 token; 107005 char uuid[16]; 107006 }; 107007 107008 struct snd_soc_tplg_vendor_value_elem { 107009 __le32 token; 107010 __le32 value; 107011 }; 107012 107013 struct snd_soc_tplg_vendor_string_elem { 107014 __le32 token; 107015 char string[44]; 107016 }; 107017 107018 struct snd_soc_tplg_vendor_array { 107019 __le32 size; 107020 __le32 type; 107021 __le32 num_elems; 107022 union { 107023 struct snd_soc_tplg_vendor_uuid_elem uuid[0]; 107024 struct snd_soc_tplg_vendor_value_elem value[0]; 107025 struct snd_soc_tplg_vendor_string_elem string[0]; 107026 }; 107027 }; 107028 107029 struct snd_soc_tplg_private { 107030 __le32 size; 107031 union { 107032 char data[0]; 107033 struct snd_soc_tplg_vendor_array array[0]; 107034 }; 107035 }; 107036 107037 struct snd_soc_tplg_tlv_dbscale { 107038 __le32 min; 107039 __le32 step; 107040 __le32 mute; 107041 }; 107042 107043 struct snd_soc_tplg_ctl_tlv { 107044 __le32 size; 107045 __le32 type; 107046 union { 107047 __le32 data[32]; 107048 struct snd_soc_tplg_tlv_dbscale scale; 107049 }; 107050 }; 107051 107052 struct snd_soc_tplg_io_ops { 107053 __le32 get; 107054 __le32 put; 107055 __le32 info; 107056 }; 107057 107058 struct snd_soc_tplg_ctl_hdr { 107059 __le32 size; 107060 __le32 type; 107061 char name[44]; 107062 __le32 access; 107063 struct snd_soc_tplg_io_ops ops; 107064 struct snd_soc_tplg_ctl_tlv tlv; 107065 }; 107066 107067 struct snd_soc_tplg_stream_caps { 107068 __le32 size; 107069 char name[44]; 107070 __le64 formats; 107071 __le32 rates; 107072 __le32 rate_min; 107073 __le32 rate_max; 107074 __le32 channels_min; 107075 __le32 channels_max; 107076 __le32 periods_min; 107077 __le32 periods_max; 107078 __le32 period_size_min; 107079 __le32 period_size_max; 107080 __le32 buffer_size_min; 107081 __le32 buffer_size_max; 107082 __le32 sig_bits; 107083 }; 107084 107085 struct snd_soc_tplg_stream { 107086 __le32 size; 107087 char name[44]; 107088 __le64 format; 107089 __le32 rate; 107090 __le32 period_bytes; 107091 __le32 buffer_bytes; 107092 __le32 channels; 107093 }; 107094 107095 struct snd_soc_tplg_hw_config { 107096 __le32 size; 107097 __le32 id; 107098 __le32 fmt; 107099 __u8 clock_gated; 107100 __u8 invert_bclk; 107101 __u8 invert_fsync; 107102 __u8 bclk_provider; 107103 __u8 fsync_provider; 107104 __u8 mclk_direction; 107105 __le16 reserved; 107106 __le32 mclk_rate; 107107 __le32 bclk_rate; 107108 __le32 fsync_rate; 107109 __le32 tdm_slots; 107110 __le32 tdm_slot_width; 107111 __le32 tx_slots; 107112 __le32 rx_slots; 107113 __le32 tx_channels; 107114 __le32 tx_chanmap[8]; 107115 __le32 rx_channels; 107116 __le32 rx_chanmap[8]; 107117 }; 107118 107119 struct snd_soc_tplg_manifest { 107120 __le32 size; 107121 __le32 control_elems; 107122 __le32 widget_elems; 107123 __le32 graph_elems; 107124 __le32 pcm_elems; 107125 __le32 dai_link_elems; 107126 __le32 dai_elems; 107127 __le32 reserved[20]; 107128 struct snd_soc_tplg_private priv; 107129 }; 107130 107131 struct snd_soc_tplg_dapm_widget { 107132 __le32 size; 107133 __le32 id; 107134 char name[44]; 107135 char sname[44]; 107136 __le32 reg; 107137 __le32 shift; 107138 __le32 mask; 107139 __le32 subseq; 107140 __le32 invert; 107141 __le32 ignore_suspend; 107142 __le16 event_flags; 107143 __le16 event_type; 107144 __le32 num_kcontrols; 107145 struct snd_soc_tplg_private priv; 107146 }; 107147 107148 struct snd_soc_tplg_pcm { 107149 __le32 size; 107150 char pcm_name[44]; 107151 char dai_name[44]; 107152 __le32 pcm_id; 107153 __le32 dai_id; 107154 __le32 playback; 107155 __le32 capture; 107156 __le32 compress; 107157 struct snd_soc_tplg_stream stream[8]; 107158 __le32 num_streams; 107159 struct snd_soc_tplg_stream_caps caps[2]; 107160 __le32 flag_mask; 107161 __le32 flags; 107162 struct snd_soc_tplg_private priv; 107163 } __attribute__((packed)); 107164 107165 struct snd_soc_tplg_link_config { 107166 __le32 size; 107167 __le32 id; 107168 char name[44]; 107169 char stream_name[44]; 107170 struct snd_soc_tplg_stream stream[8]; 107171 __le32 num_streams; 107172 struct snd_soc_tplg_hw_config hw_config[8]; 107173 __le32 num_hw_configs; 107174 __le32 default_hw_config_id; 107175 __le32 flag_mask; 107176 __le32 flags; 107177 struct snd_soc_tplg_private priv; 107178 }; 107179 107180 enum snd_soc_dobj_type { 107181 SND_SOC_DOBJ_NONE = 0, 107182 SND_SOC_DOBJ_MIXER = 1, 107183 SND_SOC_DOBJ_BYTES = 2, 107184 SND_SOC_DOBJ_ENUM = 3, 107185 SND_SOC_DOBJ_GRAPH = 4, 107186 SND_SOC_DOBJ_WIDGET = 5, 107187 SND_SOC_DOBJ_DAI_LINK = 6, 107188 SND_SOC_DOBJ_PCM = 7, 107189 SND_SOC_DOBJ_CODEC_LINK = 8, 107190 SND_SOC_DOBJ_BACKEND_LINK = 9, 107191 }; 107192 107193 struct snd_soc_dobj_control { 107194 struct snd_kcontrol *kcontrol; 107195 char **dtexts; 107196 long unsigned int *dvalues; 107197 }; 107198 107199 struct snd_soc_dobj_widget { 107200 unsigned int kcontrol_type; 107201 }; 107202 107203 struct snd_soc_tplg_ops; 107204 107205 struct snd_soc_dobj { 107206 enum snd_soc_dobj_type type; 107207 unsigned int index; 107208 struct list_head list; 107209 struct snd_soc_tplg_ops *ops; 107210 union { 107211 struct snd_soc_dobj_control control; 107212 struct snd_soc_dobj_widget widget; 107213 }; 107214 void *private; 107215 }; 107216 107217 struct snd_soc_component; 107218 107219 struct snd_soc_dapm_route; 107220 107221 struct snd_soc_dapm_widget; 107222 107223 struct snd_soc_dai_driver; 107224 107225 struct snd_soc_dai; 107226 107227 struct snd_soc_dai_link; 107228 107229 struct snd_soc_tplg_kcontrol_ops; 107230 107231 struct snd_soc_tplg_bytes_ext_ops; 107232 107233 struct snd_soc_tplg_ops { 107234 int (*control_load)(struct snd_soc_component *, int, struct snd_kcontrol_new *, struct snd_soc_tplg_ctl_hdr *); 107235 int (*control_unload)(struct snd_soc_component *, struct snd_soc_dobj *); 107236 int (*dapm_route_load)(struct snd_soc_component *, int, struct snd_soc_dapm_route *); 107237 int (*dapm_route_unload)(struct snd_soc_component *, struct snd_soc_dobj *); 107238 int (*widget_load)(struct snd_soc_component *, int, struct snd_soc_dapm_widget *, struct snd_soc_tplg_dapm_widget *); 107239 int (*widget_ready)(struct snd_soc_component *, int, struct snd_soc_dapm_widget *, struct snd_soc_tplg_dapm_widget *); 107240 int (*widget_unload)(struct snd_soc_component *, struct snd_soc_dobj *); 107241 int (*dai_load)(struct snd_soc_component *, int, struct snd_soc_dai_driver *, struct snd_soc_tplg_pcm *, struct snd_soc_dai *); 107242 int (*dai_unload)(struct snd_soc_component *, struct snd_soc_dobj *); 107243 int (*link_load)(struct snd_soc_component *, int, struct snd_soc_dai_link *, struct snd_soc_tplg_link_config *); 107244 int (*link_unload)(struct snd_soc_component *, struct snd_soc_dobj *); 107245 int (*vendor_load)(struct snd_soc_component *, int, struct snd_soc_tplg_hdr *); 107246 int (*vendor_unload)(struct snd_soc_component *, struct snd_soc_tplg_hdr *); 107247 void (*complete)(struct snd_soc_component *); 107248 int (*manifest)(struct snd_soc_component *, int, struct snd_soc_tplg_manifest *); 107249 const struct snd_soc_tplg_kcontrol_ops *io_ops; 107250 int io_ops_count; 107251 const struct snd_soc_tplg_bytes_ext_ops *bytes_ext_ops; 107252 int bytes_ext_ops_count; 107253 }; 107254 107255 struct snd_soc_tplg_kcontrol_ops { 107256 u32 id; 107257 int (*get)(struct snd_kcontrol *, struct snd_ctl_elem_value *); 107258 int (*put)(struct snd_kcontrol *, struct snd_ctl_elem_value *); 107259 int (*info)(struct snd_kcontrol *, struct snd_ctl_elem_info *); 107260 }; 107261 107262 struct snd_soc_tplg_bytes_ext_ops { 107263 u32 id; 107264 int (*get)(struct snd_kcontrol *, unsigned int *, unsigned int); 107265 int (*put)(struct snd_kcontrol *, const unsigned int *, unsigned int); 107266 }; 107267 107268 enum snd_soc_dapm_type { 107269 snd_soc_dapm_input = 0, 107270 snd_soc_dapm_output = 1, 107271 snd_soc_dapm_mux = 2, 107272 snd_soc_dapm_demux = 3, 107273 snd_soc_dapm_mixer = 4, 107274 snd_soc_dapm_mixer_named_ctl = 5, 107275 snd_soc_dapm_pga = 6, 107276 snd_soc_dapm_out_drv = 7, 107277 snd_soc_dapm_adc = 8, 107278 snd_soc_dapm_dac = 9, 107279 snd_soc_dapm_micbias = 10, 107280 snd_soc_dapm_mic = 11, 107281 snd_soc_dapm_hp = 12, 107282 snd_soc_dapm_spk = 13, 107283 snd_soc_dapm_line = 14, 107284 snd_soc_dapm_switch = 15, 107285 snd_soc_dapm_vmid = 16, 107286 snd_soc_dapm_pre = 17, 107287 snd_soc_dapm_post = 18, 107288 snd_soc_dapm_supply = 19, 107289 snd_soc_dapm_pinctrl = 20, 107290 snd_soc_dapm_regulator_supply = 21, 107291 snd_soc_dapm_clock_supply = 22, 107292 snd_soc_dapm_aif_in = 23, 107293 snd_soc_dapm_aif_out = 24, 107294 snd_soc_dapm_siggen = 25, 107295 snd_soc_dapm_sink = 26, 107296 snd_soc_dapm_dai_in = 27, 107297 snd_soc_dapm_dai_out = 28, 107298 snd_soc_dapm_dai_link = 29, 107299 snd_soc_dapm_kcontrol = 30, 107300 snd_soc_dapm_buffer = 31, 107301 snd_soc_dapm_scheduler = 32, 107302 snd_soc_dapm_effect = 33, 107303 snd_soc_dapm_src = 34, 107304 snd_soc_dapm_asrc = 35, 107305 snd_soc_dapm_encoder = 36, 107306 snd_soc_dapm_decoder = 37, 107307 SND_SOC_DAPM_TYPE_COUNT = 38, 107308 }; 107309 107310 struct snd_soc_dapm_context; 107311 107312 struct snd_soc_dapm_widget { 107313 enum snd_soc_dapm_type id; 107314 const char *name; 107315 const char *sname; 107316 struct list_head list; 107317 struct snd_soc_dapm_context *dapm; 107318 void *priv; 107319 struct regulator *regulator; 107320 struct pinctrl *pinctrl; 107321 int reg; 107322 unsigned char shift; 107323 unsigned int mask; 107324 unsigned int on_val; 107325 unsigned int off_val; 107326 unsigned char power: 1; 107327 unsigned char active: 1; 107328 unsigned char connected: 1; 107329 unsigned char new: 1; 107330 unsigned char force: 1; 107331 unsigned char ignore_suspend: 1; 107332 unsigned char new_power: 1; 107333 unsigned char power_checked: 1; 107334 unsigned char is_supply: 1; 107335 unsigned char is_ep: 2; 107336 int subseq; 107337 int (*power_check)(struct snd_soc_dapm_widget *); 107338 short unsigned int event_flags; 107339 int (*event)(struct snd_soc_dapm_widget *, struct snd_kcontrol *, int); 107340 int num_kcontrols; 107341 const struct snd_kcontrol_new *kcontrol_news; 107342 struct snd_kcontrol **kcontrols; 107343 struct snd_soc_dobj dobj; 107344 struct list_head edges[2]; 107345 struct list_head work_list; 107346 struct list_head power_list; 107347 struct list_head dirty; 107348 int endpoints[2]; 107349 struct clk *clk; 107350 int channel; 107351 }; 107352 107353 enum snd_soc_bias_level { 107354 SND_SOC_BIAS_OFF = 0, 107355 SND_SOC_BIAS_STANDBY = 1, 107356 SND_SOC_BIAS_PREPARE = 2, 107357 SND_SOC_BIAS_ON = 3, 107358 }; 107359 107360 struct snd_soc_dapm_wcache { 107361 struct snd_soc_dapm_widget *widget; 107362 }; 107363 107364 struct snd_soc_card; 107365 107366 struct snd_soc_dapm_context { 107367 enum snd_soc_bias_level bias_level; 107368 unsigned int idle_bias_off: 1; 107369 unsigned int suspend_bias_off: 1; 107370 struct device *dev; 107371 struct snd_soc_component *component; 107372 struct snd_soc_card *card; 107373 enum snd_soc_bias_level target_bias_level; 107374 struct list_head list; 107375 struct snd_soc_dapm_wcache path_sink_cache; 107376 struct snd_soc_dapm_wcache path_source_cache; 107377 struct dentry *debugfs_dapm; 107378 }; 107379 107380 struct snd_soc_component_driver; 107381 107382 struct snd_soc_component { 107383 const char *name; 107384 int id; 107385 const char *name_prefix; 107386 struct device *dev; 107387 struct snd_soc_card *card; 107388 unsigned int active; 107389 unsigned int suspended: 1; 107390 struct list_head list; 107391 struct list_head card_aux_list; 107392 struct list_head card_list; 107393 const struct snd_soc_component_driver *driver; 107394 struct list_head dai_list; 107395 int num_dai; 107396 struct regmap *regmap; 107397 int val_bytes; 107398 struct mutex io_mutex; 107399 struct list_head dobj_list; 107400 struct snd_soc_dapm_context dapm; 107401 int (*init)(struct snd_soc_component *); 107402 struct snd_pcm_substream *mark_module; 107403 struct snd_pcm_substream *mark_open; 107404 struct snd_pcm_substream *mark_hw_params; 107405 struct snd_pcm_substream *mark_trigger; 107406 struct snd_compr_stream *mark_compr_open; 107407 void *mark_pm; 107408 struct dentry *debugfs_root; 107409 const char *debugfs_prefix; 107410 }; 107411 107412 struct snd_soc_dapm_route { 107413 const char *sink; 107414 const char *control; 107415 const char *source; 107416 int (*connected)(struct snd_soc_dapm_widget *, struct snd_soc_dapm_widget *); 107417 struct snd_soc_dobj dobj; 107418 }; 107419 107420 struct snd_soc_pcm_stream { 107421 const char *stream_name; 107422 u64 formats; 107423 unsigned int rates; 107424 unsigned int rate_min; 107425 unsigned int rate_max; 107426 unsigned int channels_min; 107427 unsigned int channels_max; 107428 unsigned int sig_bits; 107429 }; 107430 107431 struct snd_soc_pcm_runtime; 107432 107433 struct snd_soc_dai_ops; 107434 107435 struct snd_soc_cdai_ops; 107436 107437 struct snd_soc_dai_driver { 107438 const char *name; 107439 unsigned int id; 107440 unsigned int base; 107441 struct snd_soc_dobj dobj; 107442 int (*probe)(struct snd_soc_dai *); 107443 int (*remove)(struct snd_soc_dai *); 107444 int (*compress_new)(struct snd_soc_pcm_runtime *, int); 107445 int (*pcm_new)(struct snd_soc_pcm_runtime *, struct snd_soc_dai *); 107446 const struct snd_soc_dai_ops *ops; 107447 const struct snd_soc_cdai_ops *cops; 107448 struct snd_soc_pcm_stream capture; 107449 struct snd_soc_pcm_stream playback; 107450 unsigned int symmetric_rates: 1; 107451 unsigned int symmetric_channels: 1; 107452 unsigned int symmetric_samplebits: 1; 107453 int probe_order; 107454 int remove_order; 107455 }; 107456 107457 struct snd_soc_dai { 107458 const char *name; 107459 int id; 107460 struct device *dev; 107461 struct snd_soc_dai_driver *driver; 107462 unsigned int stream_active[2]; 107463 struct snd_soc_dapm_widget *playback_widget; 107464 struct snd_soc_dapm_widget *capture_widget; 107465 void *playback_dma_data; 107466 void *capture_dma_data; 107467 unsigned int rate; 107468 unsigned int channels; 107469 unsigned int sample_bits; 107470 struct snd_soc_component *component; 107471 unsigned int tx_mask; 107472 unsigned int rx_mask; 107473 struct list_head list; 107474 struct snd_pcm_substream *mark_startup; 107475 struct snd_pcm_substream *mark_hw_params; 107476 struct snd_pcm_substream *mark_trigger; 107477 struct snd_compr_stream *mark_compr_startup; 107478 unsigned int probed: 1; 107479 }; 107480 107481 enum snd_soc_dpcm_trigger { 107482 SND_SOC_DPCM_TRIGGER_PRE = 0, 107483 SND_SOC_DPCM_TRIGGER_POST = 1, 107484 SND_SOC_DPCM_TRIGGER_BESPOKE = 2, 107485 }; 107486 107487 struct snd_soc_dai_link_component; 107488 107489 struct snd_soc_ops; 107490 107491 struct snd_soc_compr_ops; 107492 107493 struct snd_soc_dai_link { 107494 const char *name; 107495 const char *stream_name; 107496 struct snd_soc_dai_link_component *cpus; 107497 unsigned int num_cpus; 107498 struct snd_soc_dai_link_component *codecs; 107499 unsigned int num_codecs; 107500 struct snd_soc_dai_link_component *platforms; 107501 unsigned int num_platforms; 107502 int id; 107503 const struct snd_soc_pcm_stream *params; 107504 unsigned int num_params; 107505 unsigned int dai_fmt; 107506 enum snd_soc_dpcm_trigger trigger[2]; 107507 int (*init)(struct snd_soc_pcm_runtime *); 107508 void (*exit)(struct snd_soc_pcm_runtime *); 107509 int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *, struct snd_pcm_hw_params *); 107510 const struct snd_soc_ops *ops; 107511 const struct snd_soc_compr_ops *compr_ops; 107512 unsigned int nonatomic: 1; 107513 unsigned int playback_only: 1; 107514 unsigned int capture_only: 1; 107515 unsigned int ignore_suspend: 1; 107516 unsigned int symmetric_rates: 1; 107517 unsigned int symmetric_channels: 1; 107518 unsigned int symmetric_samplebits: 1; 107519 unsigned int no_pcm: 1; 107520 unsigned int dynamic: 1; 107521 unsigned int dpcm_capture: 1; 107522 unsigned int dpcm_playback: 1; 107523 unsigned int dpcm_merged_format: 1; 107524 unsigned int dpcm_merged_chan: 1; 107525 unsigned int dpcm_merged_rate: 1; 107526 unsigned int ignore_pmdown_time: 1; 107527 unsigned int ignore: 1; 107528 struct snd_soc_dobj dobj; 107529 }; 107530 107531 struct snd_soc_dapm_update { 107532 struct snd_kcontrol *kcontrol; 107533 int reg; 107534 int mask; 107535 int val; 107536 int reg2; 107537 int mask2; 107538 int val2; 107539 bool has_second_set; 107540 }; 107541 107542 enum snd_soc_pcm_subclass { 107543 SND_SOC_PCM_CLASS_PCM = 0, 107544 SND_SOC_PCM_CLASS_BE = 1, 107545 }; 107546 107547 struct snd_soc_dapm_stats { 107548 int power_checks; 107549 int path_checks; 107550 int neighbour_checks; 107551 }; 107552 107553 struct snd_soc_codec_conf; 107554 107555 struct snd_soc_aux_dev; 107556 107557 struct snd_soc_card { 107558 const char *name; 107559 const char *long_name; 107560 const char *driver_name; 107561 const char *components; 107562 char dmi_longname[80]; 107563 char topology_shortname[32]; 107564 struct device *dev; 107565 struct snd_card *snd_card; 107566 struct module *owner; 107567 struct mutex mutex; 107568 struct mutex dapm_mutex; 107569 struct mutex pcm_mutex; 107570 enum snd_soc_pcm_subclass pcm_subclass; 107571 spinlock_t dpcm_lock; 107572 int (*probe)(struct snd_soc_card *); 107573 int (*late_probe)(struct snd_soc_card *); 107574 int (*remove)(struct snd_soc_card *); 107575 int (*suspend_pre)(struct snd_soc_card *); 107576 int (*suspend_post)(struct snd_soc_card *); 107577 int (*resume_pre)(struct snd_soc_card *); 107578 int (*resume_post)(struct snd_soc_card *); 107579 int (*set_bias_level)(struct snd_soc_card *, struct snd_soc_dapm_context *, enum snd_soc_bias_level); 107580 int (*set_bias_level_post)(struct snd_soc_card *, struct snd_soc_dapm_context *, enum snd_soc_bias_level); 107581 int (*add_dai_link)(struct snd_soc_card *, struct snd_soc_dai_link *); 107582 void (*remove_dai_link)(struct snd_soc_card *, struct snd_soc_dai_link *); 107583 long int pmdown_time; 107584 struct snd_soc_dai_link *dai_link; 107585 int num_links; 107586 struct list_head rtd_list; 107587 int num_rtd; 107588 struct snd_soc_codec_conf *codec_conf; 107589 int num_configs; 107590 struct snd_soc_aux_dev *aux_dev; 107591 int num_aux_devs; 107592 struct list_head aux_comp_list; 107593 const struct snd_kcontrol_new *controls; 107594 int num_controls; 107595 const struct snd_soc_dapm_widget *dapm_widgets; 107596 int num_dapm_widgets; 107597 const struct snd_soc_dapm_route *dapm_routes; 107598 int num_dapm_routes; 107599 const struct snd_soc_dapm_widget *of_dapm_widgets; 107600 int num_of_dapm_widgets; 107601 const struct snd_soc_dapm_route *of_dapm_routes; 107602 int num_of_dapm_routes; 107603 struct list_head component_dev_list; 107604 struct list_head list; 107605 struct list_head widgets; 107606 struct list_head paths; 107607 struct list_head dapm_list; 107608 struct list_head dapm_dirty; 107609 struct list_head dobj_list; 107610 struct snd_soc_dapm_context dapm; 107611 struct snd_soc_dapm_stats dapm_stats; 107612 struct snd_soc_dapm_update *update; 107613 struct dentry *debugfs_card_root; 107614 struct work_struct deferred_resume_work; 107615 u32 pop_time; 107616 unsigned int instantiated: 1; 107617 unsigned int topology_shortname_created: 1; 107618 unsigned int fully_routed: 1; 107619 unsigned int disable_route_checks: 1; 107620 unsigned int probed: 1; 107621 unsigned int component_chaining: 1; 107622 void *drvdata; 107623 }; 107624 107625 enum snd_soc_dpcm_update { 107626 SND_SOC_DPCM_UPDATE_NO = 0, 107627 SND_SOC_DPCM_UPDATE_BE = 1, 107628 SND_SOC_DPCM_UPDATE_FE = 2, 107629 }; 107630 107631 enum snd_soc_dpcm_state { 107632 SND_SOC_DPCM_STATE_NEW = 0, 107633 SND_SOC_DPCM_STATE_OPEN = 1, 107634 SND_SOC_DPCM_STATE_HW_PARAMS = 2, 107635 SND_SOC_DPCM_STATE_PREPARE = 3, 107636 SND_SOC_DPCM_STATE_START = 4, 107637 SND_SOC_DPCM_STATE_STOP = 5, 107638 SND_SOC_DPCM_STATE_PAUSED = 6, 107639 SND_SOC_DPCM_STATE_SUSPEND = 7, 107640 SND_SOC_DPCM_STATE_HW_FREE = 8, 107641 SND_SOC_DPCM_STATE_CLOSE = 9, 107642 }; 107643 107644 struct snd_soc_dpcm_runtime { 107645 struct list_head be_clients; 107646 struct list_head fe_clients; 107647 int users; 107648 struct snd_pcm_runtime *runtime; 107649 struct snd_pcm_hw_params hw_params; 107650 enum snd_soc_dpcm_update runtime_update; 107651 enum snd_soc_dpcm_state state; 107652 int trigger_pending; 107653 }; 107654 107655 struct snd_soc_pcm_runtime { 107656 struct device *dev; 107657 struct snd_soc_card *card; 107658 struct snd_soc_dai_link *dai_link; 107659 struct snd_pcm_ops ops; 107660 unsigned int params_select; 107661 struct snd_soc_dpcm_runtime dpcm[2]; 107662 long int pmdown_time; 107663 struct snd_pcm *pcm; 107664 struct snd_compr *compr; 107665 struct snd_soc_dai **dais; 107666 unsigned int num_codecs; 107667 unsigned int num_cpus; 107668 struct snd_soc_dapm_widget *playback_widget; 107669 struct snd_soc_dapm_widget *capture_widget; 107670 struct delayed_work delayed_work; 107671 void (*close_delayed_work_func)(struct snd_soc_pcm_runtime *); 107672 struct dentry *debugfs_dpcm_root; 107673 unsigned int num; 107674 struct list_head list; 107675 struct snd_pcm_substream *mark_startup; 107676 struct snd_pcm_substream *mark_hw_params; 107677 struct snd_pcm_substream *mark_trigger; 107678 struct snd_compr_stream *mark_compr_startup; 107679 unsigned int pop_wait: 1; 107680 unsigned int fe_compr: 1; 107681 int num_components; 107682 struct snd_soc_component *components[0]; 107683 }; 107684 107685 struct snd_soc_ops { 107686 int (*startup)(struct snd_pcm_substream *); 107687 void (*shutdown)(struct snd_pcm_substream *); 107688 int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *); 107689 int (*hw_free)(struct snd_pcm_substream *); 107690 int (*prepare)(struct snd_pcm_substream *); 107691 int (*trigger)(struct snd_pcm_substream *, int); 107692 }; 107693 107694 struct snd_soc_compr_ops { 107695 int (*startup)(struct snd_compr_stream *); 107696 void (*shutdown)(struct snd_compr_stream *); 107697 int (*set_params)(struct snd_compr_stream *); 107698 int (*trigger)(struct snd_compr_stream *); 107699 }; 107700 107701 struct snd_soc_dai_link_component { 107702 const char *name; 107703 struct device_node *of_node; 107704 const char *dai_name; 107705 }; 107706 107707 struct snd_soc_codec_conf { 107708 struct snd_soc_dai_link_component dlc; 107709 const char *name_prefix; 107710 }; 107711 107712 struct snd_soc_aux_dev { 107713 struct snd_soc_dai_link_component dlc; 107714 int (*init)(struct snd_soc_component *); 107715 }; 107716 107717 struct snd_soc_dai_ops { 107718 int (*set_sysclk)(struct snd_soc_dai *, int, unsigned int, int); 107719 int (*set_pll)(struct snd_soc_dai *, int, int, unsigned int, unsigned int); 107720 int (*set_clkdiv)(struct snd_soc_dai *, int, int); 107721 int (*set_bclk_ratio)(struct snd_soc_dai *, unsigned int); 107722 int (*set_fmt)(struct snd_soc_dai *, unsigned int); 107723 int (*xlate_tdm_slot_mask)(unsigned int, unsigned int *, unsigned int *); 107724 int (*set_tdm_slot)(struct snd_soc_dai *, unsigned int, unsigned int, int, int); 107725 int (*set_channel_map)(struct snd_soc_dai *, unsigned int, unsigned int *, unsigned int, unsigned int *); 107726 int (*get_channel_map)(struct snd_soc_dai *, unsigned int *, unsigned int *, unsigned int *, unsigned int *); 107727 int (*set_tristate)(struct snd_soc_dai *, int); 107728 int (*set_sdw_stream)(struct snd_soc_dai *, void *, int); 107729 void * (*get_sdw_stream)(struct snd_soc_dai *, int); 107730 int (*mute_stream)(struct snd_soc_dai *, int, int); 107731 int (*startup)(struct snd_pcm_substream *, struct snd_soc_dai *); 107732 void (*shutdown)(struct snd_pcm_substream *, struct snd_soc_dai *); 107733 int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *, struct snd_soc_dai *); 107734 int (*hw_free)(struct snd_pcm_substream *, struct snd_soc_dai *); 107735 int (*prepare)(struct snd_pcm_substream *, struct snd_soc_dai *); 107736 int (*trigger)(struct snd_pcm_substream *, int, struct snd_soc_dai *); 107737 int (*bespoke_trigger)(struct snd_pcm_substream *, int, struct snd_soc_dai *); 107738 snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, struct snd_soc_dai *); 107739 unsigned int no_capture_mute: 1; 107740 }; 107741 107742 struct snd_soc_cdai_ops { 107743 int (*startup)(struct snd_compr_stream *, struct snd_soc_dai *); 107744 int (*shutdown)(struct snd_compr_stream *, struct snd_soc_dai *); 107745 int (*set_params)(struct snd_compr_stream *, struct snd_compr_params *, struct snd_soc_dai *); 107746 int (*get_params)(struct snd_compr_stream *, struct snd_codec *, struct snd_soc_dai *); 107747 int (*set_metadata)(struct snd_compr_stream *, struct snd_compr_metadata *, struct snd_soc_dai *); 107748 int (*get_metadata)(struct snd_compr_stream *, struct snd_compr_metadata *, struct snd_soc_dai *); 107749 int (*trigger)(struct snd_compr_stream *, int, struct snd_soc_dai *); 107750 int (*pointer)(struct snd_compr_stream *, struct snd_compr_tstamp *, struct snd_soc_dai *); 107751 int (*ack)(struct snd_compr_stream *, size_t, struct snd_soc_dai *); 107752 }; 107753 107754 struct snd_compress_ops { 107755 int (*open)(struct snd_soc_component *, struct snd_compr_stream *); 107756 int (*free)(struct snd_soc_component *, struct snd_compr_stream *); 107757 int (*set_params)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_compr_params *); 107758 int (*get_params)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_codec *); 107759 int (*set_metadata)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_compr_metadata *); 107760 int (*get_metadata)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_compr_metadata *); 107761 int (*trigger)(struct snd_soc_component *, struct snd_compr_stream *, int); 107762 int (*pointer)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_compr_tstamp *); 107763 int (*copy)(struct snd_soc_component *, struct snd_compr_stream *, char *, size_t); 107764 int (*mmap)(struct snd_soc_component *, struct snd_compr_stream *, struct vm_area_struct *); 107765 int (*ack)(struct snd_soc_component *, struct snd_compr_stream *, size_t); 107766 int (*get_caps)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_compr_caps *); 107767 int (*get_codec_caps)(struct snd_soc_component *, struct snd_compr_stream *, struct snd_compr_codec_caps *); 107768 }; 107769 107770 struct snd_soc_jack; 107771 107772 struct snd_soc_component_driver { 107773 const char *name; 107774 const struct snd_kcontrol_new *controls; 107775 unsigned int num_controls; 107776 const struct snd_soc_dapm_widget *dapm_widgets; 107777 unsigned int num_dapm_widgets; 107778 const struct snd_soc_dapm_route *dapm_routes; 107779 unsigned int num_dapm_routes; 107780 int (*probe)(struct snd_soc_component *); 107781 void (*remove)(struct snd_soc_component *); 107782 int (*suspend)(struct snd_soc_component *); 107783 int (*resume)(struct snd_soc_component *); 107784 unsigned int (*read)(struct snd_soc_component *, unsigned int); 107785 int (*write)(struct snd_soc_component *, unsigned int, unsigned int); 107786 int (*pcm_construct)(struct snd_soc_component *, struct snd_soc_pcm_runtime *); 107787 void (*pcm_destruct)(struct snd_soc_component *, struct snd_pcm *); 107788 int (*set_sysclk)(struct snd_soc_component *, int, int, unsigned int, int); 107789 int (*set_pll)(struct snd_soc_component *, int, int, unsigned int, unsigned int); 107790 int (*set_jack)(struct snd_soc_component *, struct snd_soc_jack *, void *); 107791 int (*of_xlate_dai_name)(struct snd_soc_component *, struct of_phandle_args *, const char **); 107792 int (*of_xlate_dai_id)(struct snd_soc_component *, struct device_node *); 107793 void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type, int); 107794 int (*stream_event)(struct snd_soc_component *, int); 107795 int (*set_bias_level)(struct snd_soc_component *, enum snd_soc_bias_level); 107796 int (*open)(struct snd_soc_component *, struct snd_pcm_substream *); 107797 int (*close)(struct snd_soc_component *, struct snd_pcm_substream *); 107798 int (*ioctl)(struct snd_soc_component *, struct snd_pcm_substream *, unsigned int, void *); 107799 int (*hw_params)(struct snd_soc_component *, struct snd_pcm_substream *, struct snd_pcm_hw_params *); 107800 int (*hw_free)(struct snd_soc_component *, struct snd_pcm_substream *); 107801 int (*prepare)(struct snd_soc_component *, struct snd_pcm_substream *); 107802 int (*trigger)(struct snd_soc_component *, struct snd_pcm_substream *, int); 107803 int (*sync_stop)(struct snd_soc_component *, struct snd_pcm_substream *); 107804 snd_pcm_uframes_t (*pointer)(struct snd_soc_component *, struct snd_pcm_substream *); 107805 int (*get_time_info)(struct snd_soc_component *, struct snd_pcm_substream *, struct timespec64 *, struct timespec64 *, struct snd_pcm_audio_tstamp_config *, struct snd_pcm_audio_tstamp_report *); 107806 int (*copy_user)(struct snd_soc_component *, struct snd_pcm_substream *, int, long unsigned int, void *, long unsigned int); 107807 struct page * (*page)(struct snd_soc_component *, struct snd_pcm_substream *, long unsigned int); 107808 int (*mmap)(struct snd_soc_component *, struct snd_pcm_substream *, struct vm_area_struct *); 107809 const struct snd_compress_ops *compress_ops; 107810 int probe_order; 107811 int remove_order; 107812 unsigned int module_get_upon_open: 1; 107813 unsigned int idle_bias_on: 1; 107814 unsigned int suspend_bias_off: 1; 107815 unsigned int use_pmdown_time: 1; 107816 unsigned int endianness: 1; 107817 unsigned int non_legacy_dai_naming: 1; 107818 const char *ignore_machine; 107819 const char *topology_name_prefix; 107820 int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *, struct snd_pcm_hw_params *); 107821 bool use_dai_pcm_id; 107822 int be_pcm_base; 107823 }; 107824 107825 struct snd_jack; 107826 107827 struct snd_soc_jack { 107828 struct mutex mutex; 107829 struct snd_jack *jack; 107830 struct snd_soc_card *card; 107831 struct list_head pins; 107832 int status; 107833 struct blocking_notifier_head notifier; 107834 struct list_head jack_zones; 107835 }; 107836 107837 struct sdw_port_runtime { 107838 int num; 107839 int ch_mask; 107840 struct sdw_transport_params transport_params; 107841 struct sdw_port_params port_params; 107842 struct list_head port_node; 107843 }; 107844 107845 struct sdw_slave_runtime { 107846 struct sdw_slave *slave; 107847 enum sdw_data_direction direction; 107848 unsigned int ch_count; 107849 struct list_head m_rt_node; 107850 struct list_head port_list; 107851 }; 107852 107853 struct sdw_master_runtime { 107854 struct sdw_bus *bus; 107855 struct sdw_stream_runtime *stream; 107856 enum sdw_data_direction direction; 107857 unsigned int ch_count; 107858 struct list_head slave_rt_list; 107859 struct list_head port_list; 107860 struct list_head stream_node; 107861 struct list_head bus_node; 107862 }; 107863 107864 struct dpn_attribute { 107865 struct device_attribute dev_attr; 107866 int N; 107867 int dir; 107868 const char *format_string; 107869 }; 107870 107871 union extcon_property_value { 107872 int intval; 107873 }; 107874 107875 struct extcon_cable; 107876 107877 struct extcon_dev___2 { 107878 const char *name; 107879 const unsigned int *supported_cable; 107880 const u32 *mutually_exclusive; 107881 struct device dev; 107882 struct raw_notifier_head nh_all; 107883 struct raw_notifier_head *nh; 107884 struct list_head entry; 107885 int max_supported; 107886 spinlock_t lock; 107887 u32 state; 107888 struct device_type extcon_dev_type; 107889 struct extcon_cable *cables; 107890 struct attribute_group attr_g_muex; 107891 struct attribute **attrs_muex; 107892 struct device_attribute *d_attrs_muex; 107893 }; 107894 107895 struct extcon_cable { 107896 struct extcon_dev___2 *edev; 107897 int cable_index; 107898 struct attribute_group attr_g; 107899 struct device_attribute attr_name; 107900 struct device_attribute attr_state; 107901 struct attribute *attrs[3]; 107902 union extcon_property_value usb_propval[3]; 107903 union extcon_property_value chg_propval[1]; 107904 union extcon_property_value jack_propval[1]; 107905 union extcon_property_value disp_propval[2]; 107906 long unsigned int usb_bits[1]; 107907 long unsigned int chg_bits[1]; 107908 long unsigned int jack_bits[1]; 107909 long unsigned int disp_bits[1]; 107910 }; 107911 107912 struct __extcon_info { 107913 unsigned int type; 107914 unsigned int id; 107915 const char *name; 107916 }; 107917 107918 struct extcon_dev_notifier_devres { 107919 struct extcon_dev___2 *edev; 107920 unsigned int id; 107921 struct notifier_block *nb; 107922 }; 107923 107924 struct powercap_control_type; 107925 107926 struct powercap_control_type_ops { 107927 int (*set_enable)(struct powercap_control_type *, bool); 107928 int (*get_enable)(struct powercap_control_type *, bool *); 107929 int (*release)(struct powercap_control_type *); 107930 }; 107931 107932 struct powercap_control_type { 107933 struct device dev; 107934 struct idr idr; 107935 int nr_zones; 107936 const struct powercap_control_type_ops *ops; 107937 struct mutex lock; 107938 bool allocated; 107939 struct list_head node; 107940 }; 107941 107942 struct powercap_zone; 107943 107944 struct powercap_zone_ops { 107945 int (*get_max_energy_range_uj)(struct powercap_zone *, u64 *); 107946 int (*get_energy_uj)(struct powercap_zone *, u64 *); 107947 int (*reset_energy_uj)(struct powercap_zone *); 107948 int (*get_max_power_range_uw)(struct powercap_zone *, u64 *); 107949 int (*get_power_uw)(struct powercap_zone *, u64 *); 107950 int (*set_enable)(struct powercap_zone *, bool); 107951 int (*get_enable)(struct powercap_zone *, bool *); 107952 int (*release)(struct powercap_zone *); 107953 }; 107954 107955 struct powercap_zone_constraint; 107956 107957 struct powercap_zone { 107958 int id; 107959 char *name; 107960 void *control_type_inst; 107961 const struct powercap_zone_ops *ops; 107962 struct device dev; 107963 int const_id_cnt; 107964 struct idr idr; 107965 struct idr *parent_idr; 107966 void *private_data; 107967 struct attribute **zone_dev_attrs; 107968 int zone_attr_count; 107969 struct attribute_group dev_zone_attr_group; 107970 const struct attribute_group *dev_attr_groups[2]; 107971 bool allocated; 107972 struct powercap_zone_constraint *constraints; 107973 }; 107974 107975 struct powercap_zone_constraint_ops; 107976 107977 struct powercap_zone_constraint { 107978 int id; 107979 struct powercap_zone *power_zone; 107980 const struct powercap_zone_constraint_ops *ops; 107981 }; 107982 107983 struct powercap_zone_constraint_ops { 107984 int (*set_power_limit_uw)(struct powercap_zone *, int, u64); 107985 int (*get_power_limit_uw)(struct powercap_zone *, int, u64 *); 107986 int (*set_time_window_us)(struct powercap_zone *, int, u64); 107987 int (*get_time_window_us)(struct powercap_zone *, int, u64 *); 107988 int (*get_max_power_uw)(struct powercap_zone *, int, u64 *); 107989 int (*get_min_power_uw)(struct powercap_zone *, int, u64 *); 107990 int (*get_max_time_window_us)(struct powercap_zone *, int, u64 *); 107991 int (*get_min_time_window_us)(struct powercap_zone *, int, u64 *); 107992 const char * (*get_name)(struct powercap_zone *, int); 107993 }; 107994 107995 struct powercap_constraint_attr { 107996 struct device_attribute power_limit_attr; 107997 struct device_attribute time_window_attr; 107998 struct device_attribute max_power_attr; 107999 struct device_attribute min_power_attr; 108000 struct device_attribute max_time_window_attr; 108001 struct device_attribute min_time_window_attr; 108002 struct device_attribute name_attr; 108003 }; 108004 108005 struct trace_event_raw_mc_event { 108006 struct trace_entry ent; 108007 unsigned int error_type; 108008 u32 __data_loc_msg; 108009 u32 __data_loc_label; 108010 u16 error_count; 108011 u8 mc_index; 108012 s8 top_layer; 108013 s8 middle_layer; 108014 s8 lower_layer; 108015 long int address; 108016 u8 grain_bits; 108017 long int syndrome; 108018 u32 __data_loc_driver_detail; 108019 char __data[0]; 108020 }; 108021 108022 struct trace_event_raw_arm_event { 108023 struct trace_entry ent; 108024 u64 mpidr; 108025 u64 midr; 108026 u32 running_state; 108027 u32 psci_state; 108028 u8 affinity; 108029 char __data[0]; 108030 }; 108031 108032 struct trace_event_raw_non_standard_event { 108033 struct trace_entry ent; 108034 char sec_type[16]; 108035 char fru_id[16]; 108036 u32 __data_loc_fru_text; 108037 u8 sev; 108038 u32 len; 108039 u32 __data_loc_buf; 108040 char __data[0]; 108041 }; 108042 108043 struct trace_event_raw_aer_event { 108044 struct trace_entry ent; 108045 u32 __data_loc_dev_name; 108046 u32 status; 108047 u8 severity; 108048 u8 tlp_header_valid; 108049 u32 tlp_header[4]; 108050 char __data[0]; 108051 }; 108052 108053 struct trace_event_raw_memory_failure_event { 108054 struct trace_entry ent; 108055 long unsigned int pfn; 108056 int type; 108057 int result; 108058 char __data[0]; 108059 }; 108060 108061 struct trace_event_data_offsets_mc_event { 108062 u32 msg; 108063 u32 label; 108064 u32 driver_detail; 108065 }; 108066 108067 struct trace_event_data_offsets_arm_event {}; 108068 108069 struct trace_event_data_offsets_non_standard_event { 108070 u32 fru_text; 108071 u32 buf; 108072 }; 108073 108074 struct trace_event_data_offsets_aer_event { 108075 u32 dev_name; 108076 }; 108077 108078 struct trace_event_data_offsets_memory_failure_event {}; 108079 108080 typedef void (*btf_trace_mc_event)(void *, const unsigned int, const char *, const char *, const int, const u8, const s8, const s8, const s8, long unsigned int, const u8, long unsigned int, const char *); 108081 108082 typedef void (*btf_trace_arm_event)(void *, const struct cper_sec_proc_arm *); 108083 108084 typedef void (*btf_trace_non_standard_event)(void *, const guid_t *, const guid_t *, const char *, const u8, const u8 *, const u32); 108085 108086 typedef void (*btf_trace_aer_event)(void *, const char *, const u32, const u8, const u8, struct aer_header_log_regs *); 108087 108088 typedef void (*btf_trace_memory_failure_event)(void *, long unsigned int, int, int); 108089 108090 struct ce_array { 108091 u64 *array; 108092 unsigned int n; 108093 unsigned int decay_count; 108094 u64 pfns_poisoned; 108095 u64 ces_entered; 108096 u64 decays_done; 108097 union { 108098 struct { 108099 __u32 disabled: 1; 108100 __u32 __resv: 31; 108101 }; 108102 __u32 flags; 108103 }; 108104 }; 108105 108106 struct nvmem_cell_lookup { 108107 const char *nvmem_name; 108108 const char *cell_name; 108109 const char *dev_id; 108110 const char *con_id; 108111 struct list_head node; 108112 }; 108113 108114 enum { 108115 NVMEM_ADD = 1, 108116 NVMEM_REMOVE = 2, 108117 NVMEM_CELL_ADD = 3, 108118 NVMEM_CELL_REMOVE = 4, 108119 }; 108120 108121 struct nvmem_cell_table { 108122 const char *nvmem_name; 108123 const struct nvmem_cell_info *cells; 108124 size_t ncells; 108125 struct list_head node; 108126 }; 108127 108128 struct nvmem_device___2 { 108129 struct module *owner; 108130 struct device dev; 108131 int stride; 108132 int word_size; 108133 int id; 108134 struct kref refcnt; 108135 size_t size; 108136 bool read_only; 108137 bool root_only; 108138 int flags; 108139 enum nvmem_type type; 108140 struct bin_attribute eeprom; 108141 struct device *base_dev; 108142 struct list_head cells; 108143 const struct nvmem_keepout *keepout; 108144 unsigned int nkeepout; 108145 nvmem_reg_read_t reg_read; 108146 nvmem_reg_write_t reg_write; 108147 struct gpio_desc___2 *wp_gpio; 108148 void *priv; 108149 }; 108150 108151 struct nvmem_cell { 108152 const char *name; 108153 int offset; 108154 int bytes; 108155 int bit_offset; 108156 int nbits; 108157 struct device_node *np; 108158 struct nvmem_device___2 *nvmem; 108159 struct list_head node; 108160 }; 108161 108162 struct icc_node; 108163 108164 struct icc_req { 108165 struct hlist_node req_node; 108166 struct icc_node *node; 108167 struct device *dev; 108168 bool enabled; 108169 u32 tag; 108170 u32 avg_bw; 108171 u32 peak_bw; 108172 }; 108173 108174 struct icc_path { 108175 const char *name; 108176 size_t num_nodes; 108177 struct icc_req reqs[0]; 108178 }; 108179 108180 struct icc_node_data { 108181 struct icc_node *node; 108182 u32 tag; 108183 }; 108184 108185 struct icc_provider; 108186 108187 struct icc_node { 108188 int id; 108189 const char *name; 108190 struct icc_node **links; 108191 size_t num_links; 108192 struct icc_provider *provider; 108193 struct list_head node_list; 108194 struct list_head search_list; 108195 struct icc_node *reverse; 108196 u8 is_traversed: 1; 108197 struct hlist_head req_list; 108198 u32 avg_bw; 108199 u32 peak_bw; 108200 u32 init_avg; 108201 u32 init_peak; 108202 void *data; 108203 }; 108204 108205 struct icc_onecell_data { 108206 unsigned int num_nodes; 108207 struct icc_node *nodes[0]; 108208 }; 108209 108210 struct icc_provider { 108211 struct list_head provider_list; 108212 struct list_head nodes; 108213 int (*set)(struct icc_node *, struct icc_node *); 108214 int (*aggregate)(struct icc_node *, u32, u32, u32, u32 *, u32 *); 108215 void (*pre_aggregate)(struct icc_node *); 108216 int (*get_bw)(struct icc_node *, u32 *, u32 *); 108217 struct icc_node * (*xlate)(struct of_phandle_args *, void *); 108218 struct icc_node_data * (*xlate_extended)(struct of_phandle_args *, void *); 108219 struct device *dev; 108220 int users; 108221 bool inter_set; 108222 void *data; 108223 }; 108224 108225 struct trace_event_raw_icc_set_bw { 108226 struct trace_entry ent; 108227 u32 __data_loc_path_name; 108228 u32 __data_loc_dev; 108229 u32 __data_loc_node_name; 108230 u32 avg_bw; 108231 u32 peak_bw; 108232 u32 node_avg_bw; 108233 u32 node_peak_bw; 108234 char __data[0]; 108235 }; 108236 108237 struct trace_event_raw_icc_set_bw_end { 108238 struct trace_entry ent; 108239 u32 __data_loc_path_name; 108240 u32 __data_loc_dev; 108241 int ret; 108242 char __data[0]; 108243 }; 108244 108245 struct trace_event_data_offsets_icc_set_bw { 108246 u32 path_name; 108247 u32 dev; 108248 u32 node_name; 108249 }; 108250 108251 struct trace_event_data_offsets_icc_set_bw_end { 108252 u32 path_name; 108253 u32 dev; 108254 }; 108255 108256 typedef void (*btf_trace_icc_set_bw)(void *, struct icc_path *, struct icc_node *, int, u32, u32); 108257 108258 typedef void (*btf_trace_icc_set_bw_end)(void *, struct icc_path *, int); 108259 108260 struct icc_path___2; 108261 108262 struct icc_bulk_data { 108263 struct icc_path___2 *path; 108264 const char *name; 108265 u32 avg_bw; 108266 u32 peak_bw; 108267 }; 108268 108269 struct net_device_devres { 108270 struct net_device *ndev; 108271 }; 108272 108273 struct __kernel_old_timespec { 108274 __kernel_old_time_t tv_sec; 108275 long int tv_nsec; 108276 }; 108277 108278 struct __kernel_sock_timeval { 108279 __s64 tv_sec; 108280 __s64 tv_usec; 108281 }; 108282 108283 struct mmsghdr { 108284 struct user_msghdr msg_hdr; 108285 unsigned int msg_len; 108286 }; 108287 108288 struct scm_timestamping_internal { 108289 struct timespec64 ts[3]; 108290 }; 108291 108292 struct ifconf { 108293 int ifc_len; 108294 union { 108295 char *ifcu_buf; 108296 struct ifreq *ifcu_req; 108297 } ifc_ifcu; 108298 }; 108299 108300 struct compat_ifmap { 108301 compat_ulong_t mem_start; 108302 compat_ulong_t mem_end; 108303 short unsigned int base_addr; 108304 unsigned char irq; 108305 unsigned char dma; 108306 unsigned char port; 108307 }; 108308 108309 struct compat_if_settings { 108310 unsigned int type; 108311 unsigned int size; 108312 compat_uptr_t ifs_ifsu; 108313 }; 108314 108315 struct compat_ifreq { 108316 union { 108317 char ifrn_name[16]; 108318 } ifr_ifrn; 108319 union { 108320 struct sockaddr ifru_addr; 108321 struct sockaddr ifru_dstaddr; 108322 struct sockaddr ifru_broadaddr; 108323 struct sockaddr ifru_netmask; 108324 struct sockaddr ifru_hwaddr; 108325 short int ifru_flags; 108326 compat_int_t ifru_ivalue; 108327 compat_int_t ifru_mtu; 108328 struct compat_ifmap ifru_map; 108329 char ifru_slave[16]; 108330 char ifru_newname[16]; 108331 compat_caddr_t ifru_data; 108332 struct compat_if_settings ifru_settings; 108333 } ifr_ifru; 108334 }; 108335 108336 struct compat_ifconf { 108337 compat_int_t ifc_len; 108338 compat_caddr_t ifcbuf; 108339 }; 108340 108341 enum sock_shutdown_cmd { 108342 SHUT_RD = 0, 108343 SHUT_WR = 1, 108344 SHUT_RDWR = 2, 108345 }; 108346 108347 struct compat_ethtool_rx_flow_spec { 108348 u32 flow_type; 108349 union ethtool_flow_union h_u; 108350 struct ethtool_flow_ext h_ext; 108351 union ethtool_flow_union m_u; 108352 struct ethtool_flow_ext m_ext; 108353 compat_u64 ring_cookie; 108354 u32 location; 108355 } __attribute__((packed)); 108356 108357 struct compat_ethtool_rxnfc { 108358 u32 cmd; 108359 u32 flow_type; 108360 compat_u64 data; 108361 struct compat_ethtool_rx_flow_spec fs; 108362 u32 rule_cnt; 108363 u32 rule_locs[0]; 108364 } __attribute__((packed)); 108365 108366 struct libipw_device; 108367 108368 struct iw_spy_data; 108369 108370 struct iw_public_data { 108371 struct iw_spy_data *spy_data; 108372 struct libipw_device *libipw; 108373 }; 108374 108375 struct iw_param { 108376 __s32 value; 108377 __u8 fixed; 108378 __u8 disabled; 108379 __u16 flags; 108380 }; 108381 108382 struct iw_point { 108383 void *pointer; 108384 __u16 length; 108385 __u16 flags; 108386 }; 108387 108388 struct iw_freq { 108389 __s32 m; 108390 __s16 e; 108391 __u8 i; 108392 __u8 flags; 108393 }; 108394 108395 struct iw_quality { 108396 __u8 qual; 108397 __u8 level; 108398 __u8 noise; 108399 __u8 updated; 108400 }; 108401 108402 struct iw_discarded { 108403 __u32 nwid; 108404 __u32 code; 108405 __u32 fragment; 108406 __u32 retries; 108407 __u32 misc; 108408 }; 108409 108410 struct iw_missed { 108411 __u32 beacon; 108412 }; 108413 108414 struct iw_statistics { 108415 __u16 status; 108416 struct iw_quality qual; 108417 struct iw_discarded discard; 108418 struct iw_missed miss; 108419 }; 108420 108421 union iwreq_data { 108422 char name[16]; 108423 struct iw_point essid; 108424 struct iw_param nwid; 108425 struct iw_freq freq; 108426 struct iw_param sens; 108427 struct iw_param bitrate; 108428 struct iw_param txpower; 108429 struct iw_param rts; 108430 struct iw_param frag; 108431 __u32 mode; 108432 struct iw_param retry; 108433 struct iw_point encoding; 108434 struct iw_param power; 108435 struct iw_quality qual; 108436 struct sockaddr ap_addr; 108437 struct sockaddr addr; 108438 struct iw_param param; 108439 struct iw_point data; 108440 }; 108441 108442 struct iw_priv_args { 108443 __u32 cmd; 108444 __u16 set_args; 108445 __u16 get_args; 108446 char name[16]; 108447 }; 108448 108449 struct compat_mmsghdr { 108450 struct compat_msghdr msg_hdr; 108451 compat_uint_t msg_len; 108452 }; 108453 108454 struct iw_request_info { 108455 __u16 cmd; 108456 __u16 flags; 108457 }; 108458 108459 struct iw_spy_data { 108460 int spy_number; 108461 u_char spy_address[48]; 108462 struct iw_quality spy_stat[8]; 108463 struct iw_quality spy_thr_low; 108464 struct iw_quality spy_thr_high; 108465 u_char spy_thr_under[8]; 108466 }; 108467 108468 enum { 108469 SOF_TIMESTAMPING_TX_HARDWARE = 1, 108470 SOF_TIMESTAMPING_TX_SOFTWARE = 2, 108471 SOF_TIMESTAMPING_RX_HARDWARE = 4, 108472 SOF_TIMESTAMPING_RX_SOFTWARE = 8, 108473 SOF_TIMESTAMPING_SOFTWARE = 16, 108474 SOF_TIMESTAMPING_SYS_HARDWARE = 32, 108475 SOF_TIMESTAMPING_RAW_HARDWARE = 64, 108476 SOF_TIMESTAMPING_OPT_ID = 128, 108477 SOF_TIMESTAMPING_TX_SCHED = 256, 108478 SOF_TIMESTAMPING_TX_ACK = 512, 108479 SOF_TIMESTAMPING_OPT_CMSG = 1024, 108480 SOF_TIMESTAMPING_OPT_TSONLY = 2048, 108481 SOF_TIMESTAMPING_OPT_STATS = 4096, 108482 SOF_TIMESTAMPING_OPT_PKTINFO = 8192, 108483 SOF_TIMESTAMPING_OPT_TX_SWHW = 16384, 108484 SOF_TIMESTAMPING_LAST = 16384, 108485 SOF_TIMESTAMPING_MASK = 32767, 108486 }; 108487 108488 struct scm_ts_pktinfo { 108489 __u32 if_index; 108490 __u32 pkt_length; 108491 __u32 reserved[2]; 108492 }; 108493 108494 struct sock_skb_cb { 108495 u32 dropcount; 108496 }; 108497 108498 struct sock_ee_data_rfc4884 { 108499 __u16 len; 108500 __u8 flags; 108501 __u8 reserved; 108502 }; 108503 108504 struct sock_extended_err { 108505 __u32 ee_errno; 108506 __u8 ee_origin; 108507 __u8 ee_type; 108508 __u8 ee_code; 108509 __u8 ee_pad; 108510 __u32 ee_info; 108511 union { 108512 __u32 ee_data; 108513 struct sock_ee_data_rfc4884 ee_rfc4884; 108514 }; 108515 }; 108516 108517 struct sock_exterr_skb { 108518 union { 108519 struct inet_skb_parm h4; 108520 struct inet6_skb_parm h6; 108521 } header; 108522 struct sock_extended_err ee; 108523 u16 addr_offset; 108524 __be16 port; 108525 u8 opt_stats: 1; 108526 u8 unused: 7; 108527 }; 108528 108529 struct used_address { 108530 struct __kernel_sockaddr_storage name; 108531 unsigned int name_len; 108532 }; 108533 108534 struct linger { 108535 int l_onoff; 108536 int l_linger; 108537 }; 108538 108539 struct ucred { 108540 __u32 pid; 108541 __u32 uid; 108542 __u32 gid; 108543 }; 108544 108545 struct mmpin { 108546 struct user_struct *user; 108547 unsigned int num_pg; 108548 }; 108549 108550 struct ubuf_info { 108551 void (*callback)(struct ubuf_info *, bool); 108552 union { 108553 struct { 108554 long unsigned int desc; 108555 void *ctx; 108556 }; 108557 struct { 108558 u32 id; 108559 u16 len; 108560 u16 zerocopy: 1; 108561 u32 bytelen; 108562 }; 108563 }; 108564 refcount_t refcnt; 108565 struct mmpin mmp; 108566 }; 108567 108568 enum { 108569 SKB_GSO_TCPV4 = 1, 108570 SKB_GSO_DODGY = 2, 108571 SKB_GSO_TCP_ECN = 4, 108572 SKB_GSO_TCP_FIXEDID = 8, 108573 SKB_GSO_TCPV6 = 16, 108574 SKB_GSO_FCOE = 32, 108575 SKB_GSO_GRE = 64, 108576 SKB_GSO_GRE_CSUM = 128, 108577 SKB_GSO_IPXIP4 = 256, 108578 SKB_GSO_IPXIP6 = 512, 108579 SKB_GSO_UDP_TUNNEL = 1024, 108580 SKB_GSO_UDP_TUNNEL_CSUM = 2048, 108581 SKB_GSO_PARTIAL = 4096, 108582 SKB_GSO_TUNNEL_REMCSUM = 8192, 108583 SKB_GSO_SCTP = 16384, 108584 SKB_GSO_ESP = 32768, 108585 SKB_GSO_UDP = 65536, 108586 SKB_GSO_UDP_L4 = 131072, 108587 SKB_GSO_FRAGLIST = 262144, 108588 }; 108589 108590 struct prot_inuse { 108591 int val[64]; 108592 }; 108593 108594 struct gro_list { 108595 struct list_head list; 108596 int count; 108597 }; 108598 108599 struct napi_struct { 108600 struct list_head poll_list; 108601 long unsigned int state; 108602 int weight; 108603 int defer_hard_irqs_count; 108604 long unsigned int gro_bitmask; 108605 int (*poll)(struct napi_struct *, int); 108606 int poll_owner; 108607 struct net_device *dev; 108608 struct gro_list gro_hash[8]; 108609 struct sk_buff *skb; 108610 struct list_head rx_list; 108611 int rx_count; 108612 struct hrtimer timer; 108613 struct list_head dev_list; 108614 struct hlist_node napi_hash_node; 108615 unsigned int napi_id; 108616 }; 108617 108618 struct sd_flow_limit { 108619 u64 count; 108620 unsigned int num_buckets; 108621 unsigned int history_head; 108622 u16 history[128]; 108623 u8 buckets[0]; 108624 }; 108625 108626 struct softnet_data { 108627 struct list_head poll_list; 108628 struct sk_buff_head process_queue; 108629 unsigned int processed; 108630 unsigned int time_squeeze; 108631 unsigned int received_rps; 108632 struct softnet_data *rps_ipi_list; 108633 struct sd_flow_limit *flow_limit; 108634 struct Qdisc *output_queue; 108635 struct Qdisc **output_queue_tailp; 108636 struct sk_buff *completion_queue; 108637 struct sk_buff_head xfrm_backlog; 108638 struct { 108639 u16 recursion; 108640 u8 more; 108641 } xmit; 108642 int: 32; 108643 unsigned int input_queue_head; 108644 long: 32; 108645 long: 64; 108646 long: 64; 108647 long: 64; 108648 long: 64; 108649 long: 64; 108650 long: 64; 108651 long: 64; 108652 call_single_data_t csd; 108653 struct softnet_data *rps_ipi_next; 108654 unsigned int cpu; 108655 unsigned int input_queue_tail; 108656 unsigned int dropped; 108657 struct sk_buff_head input_pkt_queue; 108658 struct napi_struct backlog; 108659 long: 64; 108660 long: 64; 108661 long: 64; 108662 long: 64; 108663 long: 64; 108664 }; 108665 108666 enum txtime_flags { 108667 SOF_TXTIME_DEADLINE_MODE = 1, 108668 SOF_TXTIME_REPORT_ERRORS = 2, 108669 SOF_TXTIME_FLAGS_LAST = 2, 108670 SOF_TXTIME_FLAGS_MASK = 3, 108671 }; 108672 108673 struct sock_txtime { 108674 __kernel_clockid_t clockid; 108675 __u32 flags; 108676 }; 108677 108678 enum sk_pacing { 108679 SK_PACING_NONE = 0, 108680 SK_PACING_NEEDED = 1, 108681 SK_PACING_FQ = 2, 108682 }; 108683 108684 struct sockcm_cookie { 108685 u64 transmit_time; 108686 u32 mark; 108687 u16 tsflags; 108688 }; 108689 108690 struct fastopen_queue { 108691 struct request_sock *rskq_rst_head; 108692 struct request_sock *rskq_rst_tail; 108693 spinlock_t lock; 108694 int qlen; 108695 int max_qlen; 108696 struct tcp_fastopen_context *ctx; 108697 }; 108698 108699 struct request_sock_queue { 108700 spinlock_t rskq_lock; 108701 u8 rskq_defer_accept; 108702 u32 synflood_warned; 108703 atomic_t qlen; 108704 atomic_t young; 108705 struct request_sock *rskq_accept_head; 108706 struct request_sock *rskq_accept_tail; 108707 struct fastopen_queue fastopenq; 108708 }; 108709 108710 struct inet_connection_sock_af_ops { 108711 int (*queue_xmit)(struct sock *, struct sk_buff *, struct flowi *); 108712 void (*send_check)(struct sock *, struct sk_buff *); 108713 int (*rebuild_header)(struct sock *); 108714 void (*sk_rx_dst_set)(struct sock *, const struct sk_buff *); 108715 int (*conn_request)(struct sock *, struct sk_buff *); 108716 struct sock * (*syn_recv_sock)(const struct sock *, struct sk_buff *, struct request_sock *, struct dst_entry *, struct request_sock *, bool *); 108717 u16 net_header_len; 108718 u16 net_frag_header_len; 108719 u16 sockaddr_len; 108720 int (*setsockopt)(struct sock *, int, int, sockptr_t, unsigned int); 108721 int (*getsockopt)(struct sock *, int, int, char *, int *); 108722 void (*addr2sockaddr)(struct sock *, struct sockaddr *); 108723 void (*mtu_reduced)(struct sock *); 108724 }; 108725 108726 struct inet_bind_bucket; 108727 108728 struct tcp_ulp_ops; 108729 108730 struct inet_connection_sock { 108731 struct inet_sock icsk_inet; 108732 struct request_sock_queue icsk_accept_queue; 108733 struct inet_bind_bucket *icsk_bind_hash; 108734 long unsigned int icsk_timeout; 108735 struct timer_list icsk_retransmit_timer; 108736 struct timer_list icsk_delack_timer; 108737 __u32 icsk_rto; 108738 __u32 icsk_rto_min; 108739 __u32 icsk_delack_max; 108740 __u32 icsk_pmtu_cookie; 108741 const struct tcp_congestion_ops *icsk_ca_ops; 108742 const struct inet_connection_sock_af_ops *icsk_af_ops; 108743 const struct tcp_ulp_ops *icsk_ulp_ops; 108744 void *icsk_ulp_data; 108745 void (*icsk_clean_acked)(struct sock *, u32); 108746 struct hlist_node icsk_listen_portaddr_node; 108747 unsigned int (*icsk_sync_mss)(struct sock *, u32); 108748 __u8 icsk_ca_state: 5; 108749 __u8 icsk_ca_initialized: 1; 108750 __u8 icsk_ca_setsockopt: 1; 108751 __u8 icsk_ca_dst_locked: 1; 108752 __u8 icsk_retransmits; 108753 __u8 icsk_pending; 108754 __u8 icsk_backoff; 108755 __u8 icsk_syn_retries; 108756 __u8 icsk_probes_out; 108757 __u16 icsk_ext_hdr_len; 108758 struct { 108759 __u8 pending; 108760 __u8 quick; 108761 __u8 pingpong; 108762 __u8 retry; 108763 __u32 ato; 108764 long unsigned int timeout; 108765 __u32 lrcvtime; 108766 __u16 last_seg_size; 108767 __u16 rcv_mss; 108768 } icsk_ack; 108769 struct { 108770 int enabled; 108771 int search_high; 108772 int search_low; 108773 int probe_size; 108774 u32 probe_timestamp; 108775 } icsk_mtup; 108776 u32 icsk_probes_tstamp; 108777 u32 icsk_user_timeout; 108778 u64 icsk_ca_priv[13]; 108779 }; 108780 108781 struct inet_bind_bucket { 108782 possible_net_t ib_net; 108783 int l3mdev; 108784 short unsigned int port; 108785 signed char fastreuse; 108786 signed char fastreuseport; 108787 kuid_t fastuid; 108788 struct in6_addr fast_v6_rcv_saddr; 108789 __be32 fast_rcv_saddr; 108790 short unsigned int fast_sk_family; 108791 bool fast_ipv6_only; 108792 struct hlist_node node; 108793 struct hlist_head owners; 108794 }; 108795 108796 struct tcp_ulp_ops { 108797 struct list_head list; 108798 int (*init)(struct sock *); 108799 void (*update)(struct sock *, struct proto *, void (*)(struct sock *)); 108800 void (*release)(struct sock *); 108801 int (*get_info)(const struct sock *, struct sk_buff *); 108802 size_t (*get_info_size)(const struct sock *); 108803 void (*clone)(const struct request_sock *, struct sock *, const gfp_t); 108804 char name[16]; 108805 struct module *owner; 108806 }; 108807 108808 struct tcp_fastopen_cookie { 108809 __le64 val[2]; 108810 s8 len; 108811 bool exp; 108812 }; 108813 108814 struct tcp_sack_block { 108815 u32 start_seq; 108816 u32 end_seq; 108817 }; 108818 108819 struct tcp_options_received { 108820 int ts_recent_stamp; 108821 u32 ts_recent; 108822 u32 rcv_tsval; 108823 u32 rcv_tsecr; 108824 u16 saw_tstamp: 1; 108825 u16 tstamp_ok: 1; 108826 u16 dsack: 1; 108827 u16 wscale_ok: 1; 108828 u16 sack_ok: 3; 108829 u16 smc_ok: 1; 108830 u16 snd_wscale: 4; 108831 u16 rcv_wscale: 4; 108832 u8 saw_unknown: 1; 108833 u8 unused: 7; 108834 u8 num_sacks; 108835 u16 user_mss; 108836 u16 mss_clamp; 108837 }; 108838 108839 struct tcp_rack { 108840 u64 mstamp; 108841 u32 rtt_us; 108842 u32 end_seq; 108843 u32 last_delivered; 108844 u8 reo_wnd_steps; 108845 u8 reo_wnd_persist: 5; 108846 u8 dsack_seen: 1; 108847 u8 advanced: 1; 108848 }; 108849 108850 struct tcp_sock_af_ops; 108851 108852 struct tcp_md5sig_info; 108853 108854 struct tcp_fastopen_request; 108855 108856 struct tcp_sock { 108857 struct inet_connection_sock inet_conn; 108858 u16 tcp_header_len; 108859 u16 gso_segs; 108860 __be32 pred_flags; 108861 u64 bytes_received; 108862 u32 segs_in; 108863 u32 data_segs_in; 108864 u32 rcv_nxt; 108865 u32 copied_seq; 108866 u32 rcv_wup; 108867 u32 snd_nxt; 108868 u32 segs_out; 108869 u32 data_segs_out; 108870 u64 bytes_sent; 108871 u64 bytes_acked; 108872 u32 dsack_dups; 108873 u32 snd_una; 108874 u32 snd_sml; 108875 u32 rcv_tstamp; 108876 u32 lsndtime; 108877 u32 last_oow_ack_time; 108878 u32 compressed_ack_rcv_nxt; 108879 u32 tsoffset; 108880 struct list_head tsq_node; 108881 struct list_head tsorted_sent_queue; 108882 u32 snd_wl1; 108883 u32 snd_wnd; 108884 u32 max_window; 108885 u32 mss_cache; 108886 u32 window_clamp; 108887 u32 rcv_ssthresh; 108888 struct tcp_rack rack; 108889 u16 advmss; 108890 u8 compressed_ack; 108891 u8 dup_ack_counter: 2; 108892 u8 tlp_retrans: 1; 108893 u8 unused: 5; 108894 u32 chrono_start; 108895 u32 chrono_stat[3]; 108896 u8 chrono_type: 2; 108897 u8 rate_app_limited: 1; 108898 u8 fastopen_connect: 1; 108899 u8 fastopen_no_cookie: 1; 108900 u8 is_sack_reneg: 1; 108901 u8 fastopen_client_fail: 2; 108902 u8 nonagle: 4; 108903 u8 thin_lto: 1; 108904 u8 recvmsg_inq: 1; 108905 u8 repair: 1; 108906 u8 frto: 1; 108907 u8 repair_queue; 108908 u8 save_syn: 2; 108909 u8 syn_data: 1; 108910 u8 syn_fastopen: 1; 108911 u8 syn_fastopen_exp: 1; 108912 u8 syn_fastopen_ch: 1; 108913 u8 syn_data_acked: 1; 108914 u8 is_cwnd_limited: 1; 108915 u32 tlp_high_seq; 108916 u32 tcp_tx_delay; 108917 u64 tcp_wstamp_ns; 108918 u64 tcp_clock_cache; 108919 u64 tcp_mstamp; 108920 u32 srtt_us; 108921 u32 mdev_us; 108922 u32 mdev_max_us; 108923 u32 rttvar_us; 108924 u32 rtt_seq; 108925 struct minmax rtt_min; 108926 u32 packets_out; 108927 u32 retrans_out; 108928 u32 max_packets_out; 108929 u32 max_packets_seq; 108930 u16 urg_data; 108931 u8 ecn_flags; 108932 u8 keepalive_probes; 108933 u32 reordering; 108934 u32 reord_seen; 108935 u32 snd_up; 108936 struct tcp_options_received rx_opt; 108937 u32 snd_ssthresh; 108938 u32 snd_cwnd; 108939 u32 snd_cwnd_cnt; 108940 u32 snd_cwnd_clamp; 108941 u32 snd_cwnd_used; 108942 u32 snd_cwnd_stamp; 108943 u32 prior_cwnd; 108944 u32 prr_delivered; 108945 u32 prr_out; 108946 u32 delivered; 108947 u32 delivered_ce; 108948 u32 lost; 108949 u32 app_limited; 108950 u64 first_tx_mstamp; 108951 u64 delivered_mstamp; 108952 u32 rate_delivered; 108953 u32 rate_interval_us; 108954 u32 rcv_wnd; 108955 u32 write_seq; 108956 u32 notsent_lowat; 108957 u32 pushed_seq; 108958 u32 lost_out; 108959 u32 sacked_out; 108960 struct hrtimer pacing_timer; 108961 struct hrtimer compressed_ack_timer; 108962 struct sk_buff *lost_skb_hint; 108963 struct sk_buff *retransmit_skb_hint; 108964 struct rb_root out_of_order_queue; 108965 struct sk_buff *ooo_last_skb; 108966 struct tcp_sack_block duplicate_sack[1]; 108967 struct tcp_sack_block selective_acks[4]; 108968 struct tcp_sack_block recv_sack_cache[4]; 108969 struct sk_buff *highest_sack; 108970 int lost_cnt_hint; 108971 u32 prior_ssthresh; 108972 u32 high_seq; 108973 u32 retrans_stamp; 108974 u32 undo_marker; 108975 int undo_retrans; 108976 u64 bytes_retrans; 108977 u32 total_retrans; 108978 u32 urg_seq; 108979 unsigned int keepalive_time; 108980 unsigned int keepalive_intvl; 108981 int linger2; 108982 u8 bpf_sock_ops_cb_flags; 108983 u16 timeout_rehash; 108984 u32 rcv_ooopack; 108985 u32 rcv_rtt_last_tsecr; 108986 struct { 108987 u32 rtt_us; 108988 u32 seq; 108989 u64 time; 108990 } rcv_rtt_est; 108991 struct { 108992 u32 space; 108993 u32 seq; 108994 u64 time; 108995 } rcvq_space; 108996 struct { 108997 u32 probe_seq_start; 108998 u32 probe_seq_end; 108999 } mtu_probe; 109000 u32 mtu_info; 109001 bool is_mptcp; 109002 bool syn_smc; 109003 const struct tcp_sock_af_ops *af_specific; 109004 struct tcp_md5sig_info *md5sig_info; 109005 struct tcp_fastopen_request *fastopen_req; 109006 struct request_sock *fastopen_rsk; 109007 struct saved_syn *saved_syn; 109008 }; 109009 109010 struct tcp_md5sig_key; 109011 109012 struct tcp_sock_af_ops { 109013 struct tcp_md5sig_key * (*md5_lookup)(const struct sock *, const struct sock *); 109014 int (*calc_md5_hash)(char *, const struct tcp_md5sig_key *, const struct sock *, const struct sk_buff *); 109015 int (*md5_parse)(struct sock *, int, sockptr_t, int); 109016 }; 109017 109018 struct tcp_md5sig_info { 109019 struct hlist_head head; 109020 struct callback_head rcu; 109021 }; 109022 109023 struct tcp_fastopen_request { 109024 struct tcp_fastopen_cookie cookie; 109025 struct msghdr *data; 109026 size_t size; 109027 int copied; 109028 struct ubuf_info *uarg; 109029 }; 109030 109031 union tcp_md5_addr { 109032 struct in_addr a4; 109033 struct in6_addr a6; 109034 }; 109035 109036 struct tcp_md5sig_key { 109037 struct hlist_node node; 109038 u8 keylen; 109039 u8 family; 109040 u8 prefixlen; 109041 union tcp_md5_addr addr; 109042 int l3index; 109043 u8 key[80]; 109044 struct callback_head rcu; 109045 }; 109046 109047 struct net_protocol { 109048 int (*early_demux)(struct sk_buff *); 109049 int (*early_demux_handler)(struct sk_buff *); 109050 int (*handler)(struct sk_buff *); 109051 int (*err_handler)(struct sk_buff *, u32); 109052 unsigned int no_policy: 1; 109053 unsigned int netns_ok: 1; 109054 unsigned int icmp_strict_tag_validation: 1; 109055 }; 109056 109057 struct cgroup_cls_state { 109058 struct cgroup_subsys_state css; 109059 u32 classid; 109060 }; 109061 109062 enum { 109063 SK_MEMINFO_RMEM_ALLOC = 0, 109064 SK_MEMINFO_RCVBUF = 1, 109065 SK_MEMINFO_WMEM_ALLOC = 2, 109066 SK_MEMINFO_SNDBUF = 3, 109067 SK_MEMINFO_FWD_ALLOC = 4, 109068 SK_MEMINFO_WMEM_QUEUED = 5, 109069 SK_MEMINFO_OPTMEM = 6, 109070 SK_MEMINFO_BACKLOG = 7, 109071 SK_MEMINFO_DROPS = 8, 109072 SK_MEMINFO_VARS = 9, 109073 }; 109074 109075 enum sknetlink_groups { 109076 SKNLGRP_NONE = 0, 109077 SKNLGRP_INET_TCP_DESTROY = 1, 109078 SKNLGRP_INET_UDP_DESTROY = 2, 109079 SKNLGRP_INET6_TCP_DESTROY = 3, 109080 SKNLGRP_INET6_UDP_DESTROY = 4, 109081 __SKNLGRP_MAX = 5, 109082 }; 109083 109084 struct inet_request_sock { 109085 struct request_sock req; 109086 u16 snd_wscale: 4; 109087 u16 rcv_wscale: 4; 109088 u16 tstamp_ok: 1; 109089 u16 sack_ok: 1; 109090 u16 wscale_ok: 1; 109091 u16 ecn_ok: 1; 109092 u16 acked: 1; 109093 u16 no_srccheck: 1; 109094 u16 smc_ok: 1; 109095 u32 ir_mark; 109096 union { 109097 struct ip_options_rcu *ireq_opt; 109098 struct { 109099 struct ipv6_txoptions *ipv6_opt; 109100 struct sk_buff *pktopts; 109101 }; 109102 }; 109103 }; 109104 109105 struct tcp_request_sock_ops; 109106 109107 struct tcp_request_sock { 109108 struct inet_request_sock req; 109109 const struct tcp_request_sock_ops *af_specific; 109110 u64 snt_synack; 109111 bool tfo_listener; 109112 bool is_mptcp; 109113 bool drop_req; 109114 u32 txhash; 109115 u32 rcv_isn; 109116 u32 snt_isn; 109117 u32 ts_off; 109118 u32 last_oow_ack_time; 109119 u32 rcv_nxt; 109120 u8 syn_tos; 109121 }; 109122 109123 enum tcp_synack_type { 109124 TCP_SYNACK_NORMAL = 0, 109125 TCP_SYNACK_FASTOPEN = 1, 109126 TCP_SYNACK_COOKIE = 2, 109127 }; 109128 109129 struct tcp_request_sock_ops { 109130 u16 mss_clamp; 109131 struct tcp_md5sig_key * (*req_md5_lookup)(const struct sock *, const struct sock *); 109132 int (*calc_md5_hash)(char *, const struct tcp_md5sig_key *, const struct sock *, const struct sk_buff *); 109133 __u32 (*cookie_init_seq)(const struct sk_buff *, __u16 *); 109134 struct dst_entry * (*route_req)(const struct sock *, struct sk_buff *, struct flowi *, struct request_sock *); 109135 u32 (*init_seq)(const struct sk_buff *); 109136 u32 (*init_ts_off)(const struct net *, const struct sk_buff *); 109137 int (*send_synack)(const struct sock *, struct dst_entry *, struct flowi *, struct request_sock *, struct tcp_fastopen_cookie *, enum tcp_synack_type, struct sk_buff *); 109138 }; 109139 109140 struct nf_conntrack { 109141 atomic_t use; 109142 }; 109143 109144 enum { 109145 SKB_FCLONE_UNAVAILABLE = 0, 109146 SKB_FCLONE_ORIG = 1, 109147 SKB_FCLONE_CLONE = 2, 109148 }; 109149 109150 struct sk_buff_fclones { 109151 struct sk_buff skb1; 109152 struct sk_buff skb2; 109153 refcount_t fclone_ref; 109154 }; 109155 109156 struct skb_seq_state { 109157 __u32 lower_offset; 109158 __u32 upper_offset; 109159 __u32 frag_idx; 109160 __u32 stepped_offset; 109161 struct sk_buff *root_skb; 109162 struct sk_buff *cur_skb; 109163 __u8 *frag_data; 109164 __u32 frag_off; 109165 }; 109166 109167 struct skb_checksum_ops { 109168 __wsum (*update)(const void *, int, __wsum); 109169 __wsum (*combine)(__wsum, __wsum, int, int); 109170 }; 109171 109172 struct skb_gso_cb { 109173 union { 109174 int mac_offset; 109175 int data_offset; 109176 }; 109177 int encap_level; 109178 __wsum csum; 109179 __u16 csum_start; 109180 }; 109181 109182 struct napi_gro_cb { 109183 void *frag0; 109184 unsigned int frag0_len; 109185 int data_offset; 109186 u16 flush; 109187 u16 flush_id; 109188 u16 count; 109189 u16 gro_remcsum_start; 109190 long unsigned int age; 109191 u16 proto; 109192 u8 same_flow: 1; 109193 u8 encap_mark: 1; 109194 u8 csum_valid: 1; 109195 u8 csum_cnt: 3; 109196 u8 free: 2; 109197 u8 is_ipv6: 1; 109198 u8 is_fou: 1; 109199 u8 is_atomic: 1; 109200 u8 recursion_counter: 4; 109201 u8 is_flist: 1; 109202 __wsum csum; 109203 struct sk_buff *last; 109204 }; 109205 109206 enum skb_free_reason { 109207 SKB_REASON_CONSUMED = 0, 109208 SKB_REASON_DROPPED = 1, 109209 }; 109210 109211 struct vlan_hdr { 109212 __be16 h_vlan_TCI; 109213 __be16 h_vlan_encapsulated_proto; 109214 }; 109215 109216 struct vlan_ethhdr { 109217 unsigned char h_dest[6]; 109218 unsigned char h_source[6]; 109219 __be16 h_vlan_proto; 109220 __be16 h_vlan_TCI; 109221 __be16 h_vlan_encapsulated_proto; 109222 }; 109223 109224 struct qdisc_walker { 109225 int stop; 109226 int skip; 109227 int count; 109228 int (*fn)(struct Qdisc *, long unsigned int, struct qdisc_walker *); 109229 }; 109230 109231 struct ip_auth_hdr { 109232 __u8 nexthdr; 109233 __u8 hdrlen; 109234 __be16 reserved; 109235 __be32 spi; 109236 __be32 seq_no; 109237 __u8 auth_data[0]; 109238 }; 109239 109240 struct frag_hdr { 109241 __u8 nexthdr; 109242 __u8 reserved; 109243 __be16 frag_off; 109244 __be32 identification; 109245 }; 109246 109247 enum { 109248 SCM_TSTAMP_SND = 0, 109249 SCM_TSTAMP_SCHED = 1, 109250 SCM_TSTAMP_ACK = 2, 109251 }; 109252 109253 struct mpls_shim_hdr { 109254 __be32 label_stack_entry; 109255 }; 109256 109257 struct napi_alloc_cache { 109258 struct page_frag_cache page; 109259 unsigned int skb_count; 109260 void *skb_cache[64]; 109261 }; 109262 109263 struct ahash_request___2; 109264 109265 struct scm_cookie { 109266 struct pid *pid; 109267 struct scm_fp_list *fp; 109268 struct scm_creds creds; 109269 u32 secid; 109270 }; 109271 109272 struct scm_timestamping { 109273 struct __kernel_old_timespec ts[3]; 109274 }; 109275 109276 struct scm_timestamping64 { 109277 struct __kernel_timespec ts[3]; 109278 }; 109279 109280 enum { 109281 TCA_STATS_UNSPEC = 0, 109282 TCA_STATS_BASIC = 1, 109283 TCA_STATS_RATE_EST = 2, 109284 TCA_STATS_QUEUE = 3, 109285 TCA_STATS_APP = 4, 109286 TCA_STATS_RATE_EST64 = 5, 109287 TCA_STATS_PAD = 6, 109288 TCA_STATS_BASIC_HW = 7, 109289 TCA_STATS_PKT64 = 8, 109290 __TCA_STATS_MAX = 9, 109291 }; 109292 109293 struct gnet_stats_basic { 109294 __u64 bytes; 109295 __u32 packets; 109296 }; 109297 109298 struct gnet_stats_rate_est { 109299 __u32 bps; 109300 __u32 pps; 109301 }; 109302 109303 struct gnet_stats_rate_est64 { 109304 __u64 bps; 109305 __u64 pps; 109306 }; 109307 109308 struct gnet_estimator { 109309 signed char interval; 109310 unsigned char ewma_log; 109311 }; 109312 109313 struct net_rate_estimator { 109314 struct gnet_stats_basic_packed *bstats; 109315 spinlock_t *stats_lock; 109316 seqcount_t *running; 109317 struct gnet_stats_basic_cpu *cpu_bstats; 109318 u8 ewma_log; 109319 u8 intvl_log; 109320 seqcount_t seq; 109321 u64 last_packets; 109322 u64 last_bytes; 109323 u64 avpps; 109324 u64 avbps; 109325 long unsigned int next_jiffies; 109326 struct timer_list timer; 109327 struct callback_head rcu; 109328 }; 109329 109330 struct rtgenmsg { 109331 unsigned char rtgen_family; 109332 }; 109333 109334 enum rtnetlink_groups { 109335 RTNLGRP_NONE = 0, 109336 RTNLGRP_LINK = 1, 109337 RTNLGRP_NOTIFY = 2, 109338 RTNLGRP_NEIGH = 3, 109339 RTNLGRP_TC = 4, 109340 RTNLGRP_IPV4_IFADDR = 5, 109341 RTNLGRP_IPV4_MROUTE = 6, 109342 RTNLGRP_IPV4_ROUTE = 7, 109343 RTNLGRP_IPV4_RULE = 8, 109344 RTNLGRP_IPV6_IFADDR = 9, 109345 RTNLGRP_IPV6_MROUTE = 10, 109346 RTNLGRP_IPV6_ROUTE = 11, 109347 RTNLGRP_IPV6_IFINFO = 12, 109348 RTNLGRP_DECnet_IFADDR = 13, 109349 RTNLGRP_NOP2 = 14, 109350 RTNLGRP_DECnet_ROUTE = 15, 109351 RTNLGRP_DECnet_RULE = 16, 109352 RTNLGRP_NOP4 = 17, 109353 RTNLGRP_IPV6_PREFIX = 18, 109354 RTNLGRP_IPV6_RULE = 19, 109355 RTNLGRP_ND_USEROPT = 20, 109356 RTNLGRP_PHONET_IFADDR = 21, 109357 RTNLGRP_PHONET_ROUTE = 22, 109358 RTNLGRP_DCB = 23, 109359 RTNLGRP_IPV4_NETCONF = 24, 109360 RTNLGRP_IPV6_NETCONF = 25, 109361 RTNLGRP_MDB = 26, 109362 RTNLGRP_MPLS_ROUTE = 27, 109363 RTNLGRP_NSID = 28, 109364 RTNLGRP_MPLS_NETCONF = 29, 109365 RTNLGRP_IPV4_MROUTE_R = 30, 109366 RTNLGRP_IPV6_MROUTE_R = 31, 109367 RTNLGRP_NEXTHOP = 32, 109368 RTNLGRP_BRVLAN = 33, 109369 __RTNLGRP_MAX = 34, 109370 }; 109371 109372 enum { 109373 NETNSA_NONE = 0, 109374 NETNSA_NSID = 1, 109375 NETNSA_PID = 2, 109376 NETNSA_FD = 3, 109377 NETNSA_TARGET_NSID = 4, 109378 NETNSA_CURRENT_NSID = 5, 109379 __NETNSA_MAX = 6, 109380 }; 109381 109382 struct pcpu_gen_cookie { 109383 local_t nesting; 109384 u64 last; 109385 }; 109386 109387 struct gen_cookie { 109388 struct pcpu_gen_cookie *local; 109389 long: 64; 109390 long: 64; 109391 long: 64; 109392 long: 64; 109393 long: 64; 109394 long: 64; 109395 long: 64; 109396 atomic64_t forward_last; 109397 atomic64_t reverse_last; 109398 long: 64; 109399 long: 64; 109400 long: 64; 109401 long: 64; 109402 long: 64; 109403 long: 64; 109404 }; 109405 109406 typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, struct netlink_ext_ack *); 109407 109408 typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *); 109409 109410 enum rtnl_link_flags { 109411 RTNL_FLAG_DOIT_UNLOCKED = 1, 109412 }; 109413 109414 struct net_fill_args { 109415 u32 portid; 109416 u32 seq; 109417 int flags; 109418 int cmd; 109419 int nsid; 109420 bool add_ref; 109421 int ref_nsid; 109422 }; 109423 109424 struct rtnl_net_dump_cb { 109425 struct net *tgt_net; 109426 struct net *ref_net; 109427 struct sk_buff *skb; 109428 struct net_fill_args fillargs; 109429 int idx; 109430 int s_idx; 109431 }; 109432 109433 typedef u16 u_int16_t; 109434 109435 typedef u32 u_int32_t; 109436 109437 typedef u64 u_int64_t; 109438 109439 struct flow_dissector_key_control { 109440 u16 thoff; 109441 u16 addr_type; 109442 u32 flags; 109443 }; 109444 109445 enum flow_dissect_ret { 109446 FLOW_DISSECT_RET_OUT_GOOD = 0, 109447 FLOW_DISSECT_RET_OUT_BAD = 1, 109448 FLOW_DISSECT_RET_PROTO_AGAIN = 2, 109449 FLOW_DISSECT_RET_IPPROTO_AGAIN = 3, 109450 FLOW_DISSECT_RET_CONTINUE = 4, 109451 }; 109452 109453 struct flow_dissector_key_basic { 109454 __be16 n_proto; 109455 u8 ip_proto; 109456 u8 padding; 109457 }; 109458 109459 struct flow_dissector_key_tags { 109460 u32 flow_label; 109461 }; 109462 109463 struct flow_dissector_key_vlan { 109464 union { 109465 struct { 109466 u16 vlan_id: 12; 109467 u16 vlan_dei: 1; 109468 u16 vlan_priority: 3; 109469 }; 109470 __be16 vlan_tci; 109471 }; 109472 __be16 vlan_tpid; 109473 }; 109474 109475 struct flow_dissector_mpls_lse { 109476 u32 mpls_ttl: 8; 109477 u32 mpls_bos: 1; 109478 u32 mpls_tc: 3; 109479 u32 mpls_label: 20; 109480 }; 109481 109482 struct flow_dissector_key_mpls { 109483 struct flow_dissector_mpls_lse ls[7]; 109484 u8 used_lses; 109485 }; 109486 109487 struct flow_dissector_key_enc_opts { 109488 u8 data[255]; 109489 u8 len; 109490 __be16 dst_opt_type; 109491 }; 109492 109493 struct flow_dissector_key_keyid { 109494 __be32 keyid; 109495 }; 109496 109497 struct flow_dissector_key_ipv4_addrs { 109498 __be32 src; 109499 __be32 dst; 109500 }; 109501 109502 struct flow_dissector_key_ipv6_addrs { 109503 struct in6_addr src; 109504 struct in6_addr dst; 109505 }; 109506 109507 struct flow_dissector_key_tipc { 109508 __be32 key; 109509 }; 109510 109511 struct flow_dissector_key_addrs { 109512 union { 109513 struct flow_dissector_key_ipv4_addrs v4addrs; 109514 struct flow_dissector_key_ipv6_addrs v6addrs; 109515 struct flow_dissector_key_tipc tipckey; 109516 }; 109517 }; 109518 109519 struct flow_dissector_key_arp { 109520 __u32 sip; 109521 __u32 tip; 109522 __u8 op; 109523 unsigned char sha[6]; 109524 unsigned char tha[6]; 109525 }; 109526 109527 struct flow_dissector_key_ports { 109528 union { 109529 __be32 ports; 109530 struct { 109531 __be16 src; 109532 __be16 dst; 109533 }; 109534 }; 109535 }; 109536 109537 struct flow_dissector_key_icmp { 109538 struct { 109539 u8 type; 109540 u8 code; 109541 }; 109542 u16 id; 109543 }; 109544 109545 struct flow_dissector_key_eth_addrs { 109546 unsigned char dst[6]; 109547 unsigned char src[6]; 109548 }; 109549 109550 struct flow_dissector_key_tcp { 109551 __be16 flags; 109552 }; 109553 109554 struct flow_dissector_key_ip { 109555 __u8 tos; 109556 __u8 ttl; 109557 }; 109558 109559 struct flow_dissector_key_meta { 109560 int ingress_ifindex; 109561 u16 ingress_iftype; 109562 }; 109563 109564 struct flow_dissector_key_ct { 109565 u16 ct_state; 109566 u16 ct_zone; 109567 u32 ct_mark; 109568 u32 ct_labels[4]; 109569 }; 109570 109571 struct flow_dissector_key_hash { 109572 u32 hash; 109573 }; 109574 109575 struct flow_dissector_key { 109576 enum flow_dissector_key_id key_id; 109577 size_t offset; 109578 }; 109579 109580 struct flow_keys_basic { 109581 struct flow_dissector_key_control control; 109582 struct flow_dissector_key_basic basic; 109583 }; 109584 109585 struct flow_keys { 109586 struct flow_dissector_key_control control; 109587 struct flow_dissector_key_basic basic; 109588 struct flow_dissector_key_tags tags; 109589 struct flow_dissector_key_vlan vlan; 109590 struct flow_dissector_key_vlan cvlan; 109591 struct flow_dissector_key_keyid keyid; 109592 struct flow_dissector_key_ports ports; 109593 struct flow_dissector_key_icmp icmp; 109594 struct flow_dissector_key_addrs addrs; 109595 int: 32; 109596 }; 109597 109598 struct flow_keys_digest { 109599 u8 data[16]; 109600 }; 109601 109602 enum ip_conntrack_info { 109603 IP_CT_ESTABLISHED = 0, 109604 IP_CT_RELATED = 1, 109605 IP_CT_NEW = 2, 109606 IP_CT_IS_REPLY = 3, 109607 IP_CT_ESTABLISHED_REPLY = 3, 109608 IP_CT_RELATED_REPLY = 4, 109609 IP_CT_NUMBER = 5, 109610 IP_CT_UNTRACKED = 7, 109611 }; 109612 109613 struct xt_table_info; 109614 109615 struct xt_table { 109616 struct list_head list; 109617 unsigned int valid_hooks; 109618 struct xt_table_info *private; 109619 struct module *me; 109620 u_int8_t af; 109621 int priority; 109622 int (*table_init)(struct net *); 109623 const char name[32]; 109624 }; 109625 109626 union nf_inet_addr { 109627 __u32 all[4]; 109628 __be32 ip; 109629 __be32 ip6[4]; 109630 struct in_addr in; 109631 struct in6_addr in6; 109632 }; 109633 109634 struct ip_ct_tcp_state { 109635 u_int32_t td_end; 109636 u_int32_t td_maxend; 109637 u_int32_t td_maxwin; 109638 u_int32_t td_maxack; 109639 u_int8_t td_scale; 109640 u_int8_t flags; 109641 }; 109642 109643 struct ip_ct_tcp { 109644 struct ip_ct_tcp_state seen[2]; 109645 u_int8_t state; 109646 u_int8_t last_dir; 109647 u_int8_t retrans; 109648 u_int8_t last_index; 109649 u_int32_t last_seq; 109650 u_int32_t last_ack; 109651 u_int32_t last_end; 109652 u_int16_t last_win; 109653 u_int8_t last_wscale; 109654 u_int8_t last_flags; 109655 }; 109656 109657 union nf_conntrack_man_proto { 109658 __be16 all; 109659 struct { 109660 __be16 port; 109661 } tcp; 109662 struct { 109663 __be16 port; 109664 } udp; 109665 struct { 109666 __be16 id; 109667 } icmp; 109668 struct { 109669 __be16 port; 109670 } dccp; 109671 struct { 109672 __be16 port; 109673 } sctp; 109674 struct { 109675 __be16 key; 109676 } gre; 109677 }; 109678 109679 struct nf_ct_dccp { 109680 u_int8_t role[2]; 109681 u_int8_t state; 109682 u_int8_t last_pkt; 109683 u_int8_t last_dir; 109684 u_int64_t handshake_seq; 109685 }; 109686 109687 struct ip_ct_sctp { 109688 enum sctp_conntrack state; 109689 __be32 vtag[2]; 109690 u8 last_dir; 109691 u8 flags; 109692 }; 109693 109694 struct nf_ct_event; 109695 109696 struct nf_ct_event_notifier { 109697 int (*fcn)(unsigned int, struct nf_ct_event *); 109698 }; 109699 109700 struct nf_exp_event; 109701 109702 struct nf_exp_event_notifier { 109703 int (*fcn)(unsigned int, struct nf_exp_event *); 109704 }; 109705 109706 enum bpf_ret_code { 109707 BPF_OK = 0, 109708 BPF_DROP = 2, 109709 BPF_REDIRECT = 7, 109710 BPF_LWT_REROUTE = 128, 109711 }; 109712 109713 enum { 109714 BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 1, 109715 BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 2, 109716 BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 4, 109717 }; 109718 109719 struct ip_tunnel_parm { 109720 char name[16]; 109721 int link; 109722 __be16 i_flags; 109723 __be16 o_flags; 109724 __be32 i_key; 109725 __be32 o_key; 109726 struct iphdr iph; 109727 }; 109728 109729 struct ip_tunnel_key { 109730 __be64 tun_id; 109731 union { 109732 struct { 109733 __be32 src; 109734 __be32 dst; 109735 } ipv4; 109736 struct { 109737 struct in6_addr src; 109738 struct in6_addr dst; 109739 } ipv6; 109740 } u; 109741 __be16 tun_flags; 109742 u8 tos; 109743 u8 ttl; 109744 __be32 label; 109745 __be16 tp_src; 109746 __be16 tp_dst; 109747 }; 109748 109749 struct dst_cache_pcpu; 109750 109751 struct dst_cache { 109752 struct dst_cache_pcpu *cache; 109753 long unsigned int reset_ts; 109754 }; 109755 109756 struct ip_tunnel_info { 109757 struct ip_tunnel_key key; 109758 struct dst_cache dst_cache; 109759 u8 options_len; 109760 u8 mode; 109761 }; 109762 109763 struct lwtunnel_state { 109764 __u16 type; 109765 __u16 flags; 109766 __u16 headroom; 109767 atomic_t refcnt; 109768 int (*orig_output)(struct net *, struct sock *, struct sk_buff *); 109769 int (*orig_input)(struct sk_buff *); 109770 struct callback_head rcu; 109771 __u8 data[0]; 109772 }; 109773 109774 union tcp_word_hdr { 109775 struct tcphdr hdr; 109776 __be32 words[5]; 109777 }; 109778 109779 struct arphdr { 109780 __be16 ar_hrd; 109781 __be16 ar_pro; 109782 unsigned char ar_hln; 109783 unsigned char ar_pln; 109784 __be16 ar_op; 109785 }; 109786 109787 struct fib_info; 109788 109789 struct fib_nh { 109790 struct fib_nh_common nh_common; 109791 struct hlist_node nh_hash; 109792 struct fib_info *nh_parent; 109793 __u32 nh_tclassid; 109794 __be32 nh_saddr; 109795 int nh_saddr_genid; 109796 }; 109797 109798 struct fib_info { 109799 struct hlist_node fib_hash; 109800 struct hlist_node fib_lhash; 109801 struct list_head nh_list; 109802 struct net *fib_net; 109803 int fib_treeref; 109804 refcount_t fib_clntref; 109805 unsigned int fib_flags; 109806 unsigned char fib_dead; 109807 unsigned char fib_protocol; 109808 unsigned char fib_scope; 109809 unsigned char fib_type; 109810 __be32 fib_prefsrc; 109811 u32 fib_tb_id; 109812 u32 fib_priority; 109813 struct dst_metrics *fib_metrics; 109814 int fib_nhs; 109815 bool fib_nh_is_v6; 109816 bool nh_updated; 109817 struct nexthop *nh; 109818 struct callback_head rcu; 109819 struct fib_nh fib_nh[0]; 109820 }; 109821 109822 struct nh_info; 109823 109824 struct nh_group; 109825 109826 struct nexthop { 109827 struct rb_node rb_node; 109828 struct list_head fi_list; 109829 struct list_head f6i_list; 109830 struct list_head fdb_list; 109831 struct list_head grp_list; 109832 struct net *net; 109833 u32 id; 109834 u8 protocol; 109835 u8 nh_flags; 109836 bool is_group; 109837 refcount_t refcnt; 109838 struct callback_head rcu; 109839 union { 109840 struct nh_info *nh_info; 109841 struct nh_group *nh_grp; 109842 }; 109843 }; 109844 109845 struct nh_info { 109846 struct hlist_node dev_hash; 109847 struct nexthop *nh_parent; 109848 u8 family; 109849 bool reject_nh; 109850 bool fdb_nh; 109851 union { 109852 struct fib_nh_common fib_nhc; 109853 struct fib_nh fib_nh; 109854 struct fib6_nh fib6_nh; 109855 }; 109856 }; 109857 109858 struct nh_grp_entry { 109859 struct nexthop *nh; 109860 u8 weight; 109861 atomic_t upper_bound; 109862 struct list_head nh_list; 109863 struct nexthop *nh_parent; 109864 }; 109865 109866 struct nh_group { 109867 struct nh_group *spare; 109868 u16 num_nh; 109869 bool mpath; 109870 bool fdb_nh; 109871 bool has_v4; 109872 struct nh_grp_entry nh_entries[0]; 109873 }; 109874 109875 enum metadata_type { 109876 METADATA_IP_TUNNEL = 0, 109877 METADATA_HW_PORT_MUX = 1, 109878 }; 109879 109880 struct hw_port_info { 109881 struct net_device *lower_dev; 109882 u32 port_id; 109883 }; 109884 109885 struct metadata_dst { 109886 struct dst_entry dst; 109887 enum metadata_type type; 109888 union { 109889 struct ip_tunnel_info tun_info; 109890 struct hw_port_info port_info; 109891 } u; 109892 }; 109893 109894 struct gre_base_hdr { 109895 __be16 flags; 109896 __be16 protocol; 109897 }; 109898 109899 struct gre_full_hdr { 109900 struct gre_base_hdr fixed_header; 109901 __be16 csum; 109902 __be16 reserved1; 109903 __be32 key; 109904 __be32 seq; 109905 }; 109906 109907 struct pptp_gre_header { 109908 struct gre_base_hdr gre_hd; 109909 __be16 payload_len; 109910 __be16 call_id; 109911 __be32 seq; 109912 __be32 ack; 109913 }; 109914 109915 struct tipc_basic_hdr { 109916 __be32 w[4]; 109917 }; 109918 109919 struct icmphdr { 109920 __u8 type; 109921 __u8 code; 109922 __sum16 checksum; 109923 union { 109924 struct { 109925 __be16 id; 109926 __be16 sequence; 109927 } echo; 109928 __be32 gateway; 109929 struct { 109930 __be16 __unused; 109931 __be16 mtu; 109932 } frag; 109933 __u8 reserved[4]; 109934 } un; 109935 }; 109936 109937 enum l2tp_debug_flags { 109938 L2TP_MSG_DEBUG = 1, 109939 L2TP_MSG_CONTROL = 2, 109940 L2TP_MSG_SEQ = 4, 109941 L2TP_MSG_DATA = 8, 109942 }; 109943 109944 struct pppoe_tag { 109945 __be16 tag_type; 109946 __be16 tag_len; 109947 char tag_data[0]; 109948 }; 109949 109950 struct pppoe_hdr { 109951 __u8 type: 4; 109952 __u8 ver: 4; 109953 __u8 code; 109954 __be16 sid; 109955 __be16 length; 109956 struct pppoe_tag tag[0]; 109957 }; 109958 109959 struct mpls_label { 109960 __be32 entry; 109961 }; 109962 109963 enum batadv_packettype { 109964 BATADV_IV_OGM = 0, 109965 BATADV_BCAST = 1, 109966 BATADV_CODED = 2, 109967 BATADV_ELP = 3, 109968 BATADV_OGM2 = 4, 109969 BATADV_UNICAST = 64, 109970 BATADV_UNICAST_FRAG = 65, 109971 BATADV_UNICAST_4ADDR = 66, 109972 BATADV_ICMP = 67, 109973 BATADV_UNICAST_TVLV = 68, 109974 }; 109975 109976 struct batadv_unicast_packet { 109977 __u8 packet_type; 109978 __u8 version; 109979 __u8 ttl; 109980 __u8 ttvn; 109981 __u8 dest[6]; 109982 }; 109983 109984 struct nf_conntrack_zone { 109985 u16 id; 109986 u8 flags; 109987 u8 dir; 109988 }; 109989 109990 struct nf_conntrack_man { 109991 union nf_inet_addr u3; 109992 union nf_conntrack_man_proto u; 109993 u_int16_t l3num; 109994 }; 109995 109996 struct nf_conntrack_tuple { 109997 struct nf_conntrack_man src; 109998 struct { 109999 union nf_inet_addr u3; 110000 union { 110001 __be16 all; 110002 struct { 110003 __be16 port; 110004 } tcp; 110005 struct { 110006 __be16 port; 110007 } udp; 110008 struct { 110009 u_int8_t type; 110010 u_int8_t code; 110011 } icmp; 110012 struct { 110013 __be16 port; 110014 } dccp; 110015 struct { 110016 __be16 port; 110017 } sctp; 110018 struct { 110019 __be16 key; 110020 } gre; 110021 } u; 110022 u_int8_t protonum; 110023 u_int8_t dir; 110024 } dst; 110025 }; 110026 110027 struct nf_conntrack_tuple_hash { 110028 struct hlist_nulls_node hnnode; 110029 struct nf_conntrack_tuple tuple; 110030 }; 110031 110032 struct nf_ct_udp { 110033 long unsigned int stream_ts; 110034 }; 110035 110036 struct nf_ct_gre { 110037 unsigned int stream_timeout; 110038 unsigned int timeout; 110039 }; 110040 110041 union nf_conntrack_proto { 110042 struct nf_ct_dccp dccp; 110043 struct ip_ct_sctp sctp; 110044 struct ip_ct_tcp tcp; 110045 struct nf_ct_udp udp; 110046 struct nf_ct_gre gre; 110047 unsigned int tmpl_padto; 110048 }; 110049 110050 struct nf_ct_ext; 110051 110052 struct nf_conn { 110053 struct nf_conntrack ct_general; 110054 spinlock_t lock; 110055 u32 timeout; 110056 struct nf_conntrack_zone zone; 110057 struct nf_conntrack_tuple_hash tuplehash[2]; 110058 long unsigned int status; 110059 u16 cpu; 110060 possible_net_t ct_net; 110061 struct hlist_node nat_bysource; 110062 struct { } __nfct_init_offset; 110063 struct nf_conn *master; 110064 u_int32_t mark; 110065 u_int32_t secmark; 110066 struct nf_ct_ext *ext; 110067 union nf_conntrack_proto proto; 110068 }; 110069 110070 struct xt_table_info { 110071 unsigned int size; 110072 unsigned int number; 110073 unsigned int initial_entries; 110074 unsigned int hook_entry[5]; 110075 unsigned int underflow[5]; 110076 unsigned int stacksize; 110077 void ***jumpstack; 110078 unsigned char entries[0]; 110079 }; 110080 110081 struct nf_conntrack_tuple_mask { 110082 struct { 110083 union nf_inet_addr u3; 110084 union nf_conntrack_man_proto u; 110085 } src; 110086 }; 110087 110088 struct nf_ct_ext { 110089 u8 offset[8]; 110090 u8 len; 110091 char data[0]; 110092 }; 110093 110094 struct nf_conntrack_helper; 110095 110096 struct nf_conntrack_expect { 110097 struct hlist_node lnode; 110098 struct hlist_node hnode; 110099 struct nf_conntrack_tuple tuple; 110100 struct nf_conntrack_tuple_mask mask; 110101 void (*expectfn)(struct nf_conn *, struct nf_conntrack_expect *); 110102 struct nf_conntrack_helper *helper; 110103 struct nf_conn *master; 110104 struct timer_list timeout; 110105 refcount_t use; 110106 unsigned int flags; 110107 unsigned int class; 110108 union nf_inet_addr saved_addr; 110109 union nf_conntrack_man_proto saved_proto; 110110 enum ip_conntrack_dir dir; 110111 struct callback_head rcu; 110112 }; 110113 110114 enum nf_ct_ext_id { 110115 NF_CT_EXT_HELPER = 0, 110116 NF_CT_EXT_NAT = 1, 110117 NF_CT_EXT_SEQADJ = 2, 110118 NF_CT_EXT_ACCT = 3, 110119 NF_CT_EXT_ECACHE = 4, 110120 NF_CT_EXT_TSTAMP = 5, 110121 NF_CT_EXT_LABELS = 6, 110122 NF_CT_EXT_SYNPROXY = 7, 110123 NF_CT_EXT_NUM = 8, 110124 }; 110125 110126 struct nf_ct_event { 110127 struct nf_conn *ct; 110128 u32 portid; 110129 int report; 110130 }; 110131 110132 struct nf_exp_event { 110133 struct nf_conntrack_expect *exp; 110134 u32 portid; 110135 int report; 110136 }; 110137 110138 struct nf_conn_labels { 110139 long unsigned int bits[2]; 110140 }; 110141 110142 struct _flow_keys_digest_data { 110143 __be16 n_proto; 110144 u8 ip_proto; 110145 u8 padding; 110146 __be32 ports; 110147 __be32 src; 110148 __be32 dst; 110149 }; 110150 110151 struct rps_sock_flow_table { 110152 u32 mask; 110153 long: 32; 110154 long: 64; 110155 long: 64; 110156 long: 64; 110157 long: 64; 110158 long: 64; 110159 long: 64; 110160 long: 64; 110161 u32 ents[0]; 110162 }; 110163 110164 struct ipv4_devconf { 110165 void *sysctl; 110166 int data[32]; 110167 long unsigned int state[1]; 110168 }; 110169 110170 enum nf_dev_hooks { 110171 NF_NETDEV_INGRESS = 0, 110172 NF_NETDEV_NUMHOOKS = 1, 110173 }; 110174 110175 enum { 110176 IF_OPER_UNKNOWN = 0, 110177 IF_OPER_NOTPRESENT = 1, 110178 IF_OPER_DOWN = 2, 110179 IF_OPER_LOWERLAYERDOWN = 3, 110180 IF_OPER_TESTING = 4, 110181 IF_OPER_DORMANT = 5, 110182 IF_OPER_UP = 6, 110183 }; 110184 110185 struct ifbond { 110186 __s32 bond_mode; 110187 __s32 num_slaves; 110188 __s32 miimon; 110189 }; 110190 110191 typedef struct ifbond ifbond; 110192 110193 struct ifslave { 110194 __s32 slave_id; 110195 char slave_name[16]; 110196 __s8 link; 110197 __s8 state; 110198 __u32 link_failure_count; 110199 }; 110200 110201 typedef struct ifslave ifslave; 110202 110203 struct netdev_boot_setup { 110204 char name[16]; 110205 struct ifmap map; 110206 }; 110207 110208 enum { 110209 NAPIF_STATE_SCHED = 1, 110210 NAPIF_STATE_MISSED = 2, 110211 NAPIF_STATE_DISABLE = 4, 110212 NAPIF_STATE_NPSVC = 8, 110213 NAPIF_STATE_LISTED = 16, 110214 NAPIF_STATE_NO_BUSY_POLL = 32, 110215 NAPIF_STATE_IN_BUSY_POLL = 64, 110216 NAPIF_STATE_PREFER_BUSY_POLL = 128, 110217 }; 110218 110219 enum gro_result { 110220 GRO_MERGED = 0, 110221 GRO_MERGED_FREE = 1, 110222 GRO_HELD = 2, 110223 GRO_NORMAL = 3, 110224 GRO_DROP = 4, 110225 GRO_CONSUMED = 5, 110226 }; 110227 110228 typedef enum gro_result gro_result_t; 110229 110230 enum netdev_queue_state_t { 110231 __QUEUE_STATE_DRV_XOFF = 0, 110232 __QUEUE_STATE_STACK_XOFF = 1, 110233 __QUEUE_STATE_FROZEN = 2, 110234 }; 110235 110236 struct bpf_xdp_link { 110237 struct bpf_link link; 110238 struct net_device *dev; 110239 int flags; 110240 }; 110241 110242 struct netdev_net_notifier { 110243 struct list_head list; 110244 struct notifier_block *nb; 110245 }; 110246 110247 struct netpoll; 110248 110249 struct netpoll_info { 110250 refcount_t refcnt; 110251 struct semaphore dev_lock; 110252 struct sk_buff_head txq; 110253 struct delayed_work tx_work; 110254 struct netpoll *netpoll; 110255 struct callback_head rcu; 110256 }; 110257 110258 struct udp_tunnel_info { 110259 short unsigned int type; 110260 sa_family_t sa_family; 110261 __be16 port; 110262 u8 hw_priv; 110263 }; 110264 110265 struct in_ifaddr; 110266 110267 struct ip_mc_list; 110268 110269 struct in_device { 110270 struct net_device *dev; 110271 refcount_t refcnt; 110272 int dead; 110273 struct in_ifaddr *ifa_list; 110274 struct ip_mc_list *mc_list; 110275 struct ip_mc_list **mc_hash; 110276 int mc_count; 110277 spinlock_t mc_tomb_lock; 110278 struct ip_mc_list *mc_tomb; 110279 long unsigned int mr_v1_seen; 110280 long unsigned int mr_v2_seen; 110281 long unsigned int mr_maxdelay; 110282 long unsigned int mr_qi; 110283 long unsigned int mr_qri; 110284 unsigned char mr_qrv; 110285 unsigned char mr_gq_running; 110286 unsigned char mr_ifc_count; 110287 struct timer_list mr_gq_timer; 110288 struct timer_list mr_ifc_timer; 110289 struct neigh_parms *arp_parms; 110290 struct ipv4_devconf cnf; 110291 struct callback_head callback_head; 110292 }; 110293 110294 struct offload_callbacks { 110295 struct sk_buff * (*gso_segment)(struct sk_buff *, netdev_features_t); 110296 struct sk_buff * (*gro_receive)(struct list_head *, struct sk_buff *); 110297 int (*gro_complete)(struct sk_buff *, int); 110298 }; 110299 110300 struct packet_offload { 110301 __be16 type; 110302 u16 priority; 110303 struct offload_callbacks callbacks; 110304 struct list_head list; 110305 }; 110306 110307 struct netdev_notifier_info_ext { 110308 struct netdev_notifier_info info; 110309 union { 110310 u32 mtu; 110311 } ext; 110312 }; 110313 110314 struct netdev_notifier_change_info { 110315 struct netdev_notifier_info info; 110316 unsigned int flags_changed; 110317 }; 110318 110319 struct netdev_notifier_changelowerstate_info { 110320 struct netdev_notifier_info info; 110321 void *lower_state_info; 110322 }; 110323 110324 struct netdev_notifier_pre_changeaddr_info { 110325 struct netdev_notifier_info info; 110326 const unsigned char *dev_addr; 110327 }; 110328 110329 typedef int (*bpf_op_t)(struct net_device *, struct netdev_bpf *); 110330 110331 enum { 110332 NESTED_SYNC_IMM_BIT = 0, 110333 NESTED_SYNC_TODO_BIT = 1, 110334 }; 110335 110336 struct netdev_nested_priv { 110337 unsigned char flags; 110338 void *data; 110339 }; 110340 110341 struct netdev_bonding_info { 110342 ifslave slave; 110343 ifbond master; 110344 }; 110345 110346 struct netdev_notifier_bonding_info { 110347 struct netdev_notifier_info info; 110348 struct netdev_bonding_info bonding_info; 110349 }; 110350 110351 union inet_addr { 110352 __u32 all[4]; 110353 __be32 ip; 110354 __be32 ip6[4]; 110355 struct in_addr in; 110356 struct in6_addr in6; 110357 }; 110358 110359 struct netpoll { 110360 struct net_device *dev; 110361 char dev_name[16]; 110362 const char *name; 110363 union inet_addr local_ip; 110364 union inet_addr remote_ip; 110365 bool ipv6; 110366 u16 local_port; 110367 u16 remote_port; 110368 u8 remote_mac[6]; 110369 }; 110370 110371 enum qdisc_state_t { 110372 __QDISC_STATE_SCHED = 0, 110373 __QDISC_STATE_DEACTIVATED = 1, 110374 }; 110375 110376 struct tcf_walker { 110377 int stop; 110378 int skip; 110379 int count; 110380 bool nonempty; 110381 long unsigned int cookie; 110382 int (*fn)(struct tcf_proto *, void *, struct tcf_walker *); 110383 }; 110384 110385 enum { 110386 IPV4_DEVCONF_FORWARDING = 1, 110387 IPV4_DEVCONF_MC_FORWARDING = 2, 110388 IPV4_DEVCONF_PROXY_ARP = 3, 110389 IPV4_DEVCONF_ACCEPT_REDIRECTS = 4, 110390 IPV4_DEVCONF_SECURE_REDIRECTS = 5, 110391 IPV4_DEVCONF_SEND_REDIRECTS = 6, 110392 IPV4_DEVCONF_SHARED_MEDIA = 7, 110393 IPV4_DEVCONF_RP_FILTER = 8, 110394 IPV4_DEVCONF_ACCEPT_SOURCE_ROUTE = 9, 110395 IPV4_DEVCONF_BOOTP_RELAY = 10, 110396 IPV4_DEVCONF_LOG_MARTIANS = 11, 110397 IPV4_DEVCONF_TAG = 12, 110398 IPV4_DEVCONF_ARPFILTER = 13, 110399 IPV4_DEVCONF_MEDIUM_ID = 14, 110400 IPV4_DEVCONF_NOXFRM = 15, 110401 IPV4_DEVCONF_NOPOLICY = 16, 110402 IPV4_DEVCONF_FORCE_IGMP_VERSION = 17, 110403 IPV4_DEVCONF_ARP_ANNOUNCE = 18, 110404 IPV4_DEVCONF_ARP_IGNORE = 19, 110405 IPV4_DEVCONF_PROMOTE_SECONDARIES = 20, 110406 IPV4_DEVCONF_ARP_ACCEPT = 21, 110407 IPV4_DEVCONF_ARP_NOTIFY = 22, 110408 IPV4_DEVCONF_ACCEPT_LOCAL = 23, 110409 IPV4_DEVCONF_SRC_VMARK = 24, 110410 IPV4_DEVCONF_PROXY_ARP_PVLAN = 25, 110411 IPV4_DEVCONF_ROUTE_LOCALNET = 26, 110412 IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL = 27, 110413 IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL = 28, 110414 IPV4_DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN = 29, 110415 IPV4_DEVCONF_DROP_UNICAST_IN_L2_MULTICAST = 30, 110416 IPV4_DEVCONF_DROP_GRATUITOUS_ARP = 31, 110417 IPV4_DEVCONF_BC_FORWARDING = 32, 110418 __IPV4_DEVCONF_MAX = 33, 110419 }; 110420 110421 struct in_ifaddr { 110422 struct hlist_node hash; 110423 struct in_ifaddr *ifa_next; 110424 struct in_device *ifa_dev; 110425 struct callback_head callback_head; 110426 __be32 ifa_local; 110427 __be32 ifa_address; 110428 __be32 ifa_mask; 110429 __u32 ifa_rt_priority; 110430 __be32 ifa_broadcast; 110431 unsigned char ifa_scope; 110432 unsigned char ifa_prefixlen; 110433 __u32 ifa_flags; 110434 char ifa_label[16]; 110435 __u32 ifa_valid_lft; 110436 __u32 ifa_preferred_lft; 110437 long unsigned int ifa_cstamp; 110438 long unsigned int ifa_tstamp; 110439 }; 110440 110441 struct udp_tunnel_nic_shared { 110442 struct udp_tunnel_nic *udp_tunnel_nic_info; 110443 struct list_head devices; 110444 }; 110445 110446 struct dev_kfree_skb_cb { 110447 enum skb_free_reason reason; 110448 }; 110449 110450 struct netdev_adjacent { 110451 struct net_device *dev; 110452 bool master; 110453 bool ignore; 110454 u16 ref_nr; 110455 void *private; 110456 struct list_head list; 110457 struct callback_head rcu; 110458 }; 110459 110460 struct netdev_hw_addr { 110461 struct list_head list; 110462 unsigned char addr[32]; 110463 unsigned char type; 110464 bool global_use; 110465 int sync_cnt; 110466 int refcount; 110467 int synced; 110468 struct callback_head callback_head; 110469 }; 110470 110471 enum { 110472 NDA_UNSPEC = 0, 110473 NDA_DST = 1, 110474 NDA_LLADDR = 2, 110475 NDA_CACHEINFO = 3, 110476 NDA_PROBES = 4, 110477 NDA_VLAN = 5, 110478 NDA_PORT = 6, 110479 NDA_VNI = 7, 110480 NDA_IFINDEX = 8, 110481 NDA_MASTER = 9, 110482 NDA_LINK_NETNSID = 10, 110483 NDA_SRC_VNI = 11, 110484 NDA_PROTOCOL = 12, 110485 NDA_NH_ID = 13, 110486 NDA_FDB_EXT_ATTRS = 14, 110487 __NDA_MAX = 15, 110488 }; 110489 110490 struct nda_cacheinfo { 110491 __u32 ndm_confirmed; 110492 __u32 ndm_used; 110493 __u32 ndm_updated; 110494 __u32 ndm_refcnt; 110495 }; 110496 110497 struct ndt_stats { 110498 __u64 ndts_allocs; 110499 __u64 ndts_destroys; 110500 __u64 ndts_hash_grows; 110501 __u64 ndts_res_failed; 110502 __u64 ndts_lookups; 110503 __u64 ndts_hits; 110504 __u64 ndts_rcv_probes_mcast; 110505 __u64 ndts_rcv_probes_ucast; 110506 __u64 ndts_periodic_gc_runs; 110507 __u64 ndts_forced_gc_runs; 110508 __u64 ndts_table_fulls; 110509 }; 110510 110511 enum { 110512 NDTPA_UNSPEC = 0, 110513 NDTPA_IFINDEX = 1, 110514 NDTPA_REFCNT = 2, 110515 NDTPA_REACHABLE_TIME = 3, 110516 NDTPA_BASE_REACHABLE_TIME = 4, 110517 NDTPA_RETRANS_TIME = 5, 110518 NDTPA_GC_STALETIME = 6, 110519 NDTPA_DELAY_PROBE_TIME = 7, 110520 NDTPA_QUEUE_LEN = 8, 110521 NDTPA_APP_PROBES = 9, 110522 NDTPA_UCAST_PROBES = 10, 110523 NDTPA_MCAST_PROBES = 11, 110524 NDTPA_ANYCAST_DELAY = 12, 110525 NDTPA_PROXY_DELAY = 13, 110526 NDTPA_PROXY_QLEN = 14, 110527 NDTPA_LOCKTIME = 15, 110528 NDTPA_QUEUE_LENBYTES = 16, 110529 NDTPA_MCAST_REPROBES = 17, 110530 NDTPA_PAD = 18, 110531 __NDTPA_MAX = 19, 110532 }; 110533 110534 struct ndtmsg { 110535 __u8 ndtm_family; 110536 __u8 ndtm_pad1; 110537 __u16 ndtm_pad2; 110538 }; 110539 110540 struct ndt_config { 110541 __u16 ndtc_key_len; 110542 __u16 ndtc_entry_size; 110543 __u32 ndtc_entries; 110544 __u32 ndtc_last_flush; 110545 __u32 ndtc_last_rand; 110546 __u32 ndtc_hash_rnd; 110547 __u32 ndtc_hash_mask; 110548 __u32 ndtc_hash_chain_gc; 110549 __u32 ndtc_proxy_qlen; 110550 }; 110551 110552 enum { 110553 NDTA_UNSPEC = 0, 110554 NDTA_NAME = 1, 110555 NDTA_THRESH1 = 2, 110556 NDTA_THRESH2 = 3, 110557 NDTA_THRESH3 = 4, 110558 NDTA_CONFIG = 5, 110559 NDTA_PARMS = 6, 110560 NDTA_STATS = 7, 110561 NDTA_GC_INTERVAL = 8, 110562 NDTA_PAD = 9, 110563 __NDTA_MAX = 10, 110564 }; 110565 110566 enum { 110567 RTN_UNSPEC = 0, 110568 RTN_UNICAST = 1, 110569 RTN_LOCAL = 2, 110570 RTN_BROADCAST = 3, 110571 RTN_ANYCAST = 4, 110572 RTN_MULTICAST = 5, 110573 RTN_BLACKHOLE = 6, 110574 RTN_UNREACHABLE = 7, 110575 RTN_PROHIBIT = 8, 110576 RTN_THROW = 9, 110577 RTN_NAT = 10, 110578 RTN_XRESOLVE = 11, 110579 __RTN_MAX = 12, 110580 }; 110581 110582 enum { 110583 NEIGH_ARP_TABLE = 0, 110584 NEIGH_ND_TABLE = 1, 110585 NEIGH_DN_TABLE = 2, 110586 NEIGH_NR_TABLES = 3, 110587 NEIGH_LINK_TABLE = 3, 110588 }; 110589 110590 struct neigh_seq_state { 110591 struct seq_net_private p; 110592 struct neigh_table *tbl; 110593 struct neigh_hash_table *nht; 110594 void * (*neigh_sub_iter)(struct neigh_seq_state *, struct neighbour *, loff_t *); 110595 unsigned int bucket; 110596 unsigned int flags; 110597 }; 110598 110599 struct neighbour_cb { 110600 long unsigned int sched_next; 110601 unsigned int flags; 110602 }; 110603 110604 enum netevent_notif_type { 110605 NETEVENT_NEIGH_UPDATE = 1, 110606 NETEVENT_REDIRECT = 2, 110607 NETEVENT_DELAY_PROBE_TIME_UPDATE = 3, 110608 NETEVENT_IPV4_MPATH_HASH_UPDATE = 4, 110609 NETEVENT_IPV6_MPATH_HASH_UPDATE = 5, 110610 NETEVENT_IPV4_FWD_UPDATE_PRIORITY_UPDATE = 6, 110611 }; 110612 110613 struct neigh_dump_filter { 110614 int master_idx; 110615 int dev_idx; 110616 }; 110617 110618 struct neigh_sysctl_table { 110619 struct ctl_table_header *sysctl_header; 110620 struct ctl_table neigh_vars[21]; 110621 }; 110622 110623 struct netlink_dump_control { 110624 int (*start)(struct netlink_callback *); 110625 int (*dump)(struct sk_buff *, struct netlink_callback *); 110626 int (*done)(struct netlink_callback *); 110627 void *data; 110628 struct module *module; 110629 u32 min_dump_alloc; 110630 }; 110631 110632 struct rtnl_link_stats { 110633 __u32 rx_packets; 110634 __u32 tx_packets; 110635 __u32 rx_bytes; 110636 __u32 tx_bytes; 110637 __u32 rx_errors; 110638 __u32 tx_errors; 110639 __u32 rx_dropped; 110640 __u32 tx_dropped; 110641 __u32 multicast; 110642 __u32 collisions; 110643 __u32 rx_length_errors; 110644 __u32 rx_over_errors; 110645 __u32 rx_crc_errors; 110646 __u32 rx_frame_errors; 110647 __u32 rx_fifo_errors; 110648 __u32 rx_missed_errors; 110649 __u32 tx_aborted_errors; 110650 __u32 tx_carrier_errors; 110651 __u32 tx_fifo_errors; 110652 __u32 tx_heartbeat_errors; 110653 __u32 tx_window_errors; 110654 __u32 rx_compressed; 110655 __u32 tx_compressed; 110656 __u32 rx_nohandler; 110657 }; 110658 110659 struct rtnl_link_ifmap { 110660 __u64 mem_start; 110661 __u64 mem_end; 110662 __u64 base_addr; 110663 __u16 irq; 110664 __u8 dma; 110665 __u8 port; 110666 }; 110667 110668 enum { 110669 IFLA_UNSPEC = 0, 110670 IFLA_ADDRESS = 1, 110671 IFLA_BROADCAST = 2, 110672 IFLA_IFNAME = 3, 110673 IFLA_MTU = 4, 110674 IFLA_LINK = 5, 110675 IFLA_QDISC = 6, 110676 IFLA_STATS = 7, 110677 IFLA_COST = 8, 110678 IFLA_PRIORITY = 9, 110679 IFLA_MASTER = 10, 110680 IFLA_WIRELESS = 11, 110681 IFLA_PROTINFO = 12, 110682 IFLA_TXQLEN = 13, 110683 IFLA_MAP = 14, 110684 IFLA_WEIGHT = 15, 110685 IFLA_OPERSTATE = 16, 110686 IFLA_LINKMODE = 17, 110687 IFLA_LINKINFO = 18, 110688 IFLA_NET_NS_PID = 19, 110689 IFLA_IFALIAS = 20, 110690 IFLA_NUM_VF = 21, 110691 IFLA_VFINFO_LIST = 22, 110692 IFLA_STATS64 = 23, 110693 IFLA_VF_PORTS = 24, 110694 IFLA_PORT_SELF = 25, 110695 IFLA_AF_SPEC = 26, 110696 IFLA_GROUP = 27, 110697 IFLA_NET_NS_FD = 28, 110698 IFLA_EXT_MASK = 29, 110699 IFLA_PROMISCUITY = 30, 110700 IFLA_NUM_TX_QUEUES = 31, 110701 IFLA_NUM_RX_QUEUES = 32, 110702 IFLA_CARRIER = 33, 110703 IFLA_PHYS_PORT_ID = 34, 110704 IFLA_CARRIER_CHANGES = 35, 110705 IFLA_PHYS_SWITCH_ID = 36, 110706 IFLA_LINK_NETNSID = 37, 110707 IFLA_PHYS_PORT_NAME = 38, 110708 IFLA_PROTO_DOWN = 39, 110709 IFLA_GSO_MAX_SEGS = 40, 110710 IFLA_GSO_MAX_SIZE = 41, 110711 IFLA_PAD = 42, 110712 IFLA_XDP = 43, 110713 IFLA_EVENT = 44, 110714 IFLA_NEW_NETNSID = 45, 110715 IFLA_IF_NETNSID = 46, 110716 IFLA_TARGET_NETNSID = 46, 110717 IFLA_CARRIER_UP_COUNT = 47, 110718 IFLA_CARRIER_DOWN_COUNT = 48, 110719 IFLA_NEW_IFINDEX = 49, 110720 IFLA_MIN_MTU = 50, 110721 IFLA_MAX_MTU = 51, 110722 IFLA_PROP_LIST = 52, 110723 IFLA_ALT_IFNAME = 53, 110724 IFLA_PERM_ADDRESS = 54, 110725 IFLA_PROTO_DOWN_REASON = 55, 110726 __IFLA_MAX = 56, 110727 }; 110728 110729 enum { 110730 IFLA_PROTO_DOWN_REASON_UNSPEC = 0, 110731 IFLA_PROTO_DOWN_REASON_MASK = 1, 110732 IFLA_PROTO_DOWN_REASON_VALUE = 2, 110733 __IFLA_PROTO_DOWN_REASON_CNT = 3, 110734 IFLA_PROTO_DOWN_REASON_MAX = 2, 110735 }; 110736 110737 enum { 110738 IFLA_BRPORT_UNSPEC = 0, 110739 IFLA_BRPORT_STATE = 1, 110740 IFLA_BRPORT_PRIORITY = 2, 110741 IFLA_BRPORT_COST = 3, 110742 IFLA_BRPORT_MODE = 4, 110743 IFLA_BRPORT_GUARD = 5, 110744 IFLA_BRPORT_PROTECT = 6, 110745 IFLA_BRPORT_FAST_LEAVE = 7, 110746 IFLA_BRPORT_LEARNING = 8, 110747 IFLA_BRPORT_UNICAST_FLOOD = 9, 110748 IFLA_BRPORT_PROXYARP = 10, 110749 IFLA_BRPORT_LEARNING_SYNC = 11, 110750 IFLA_BRPORT_PROXYARP_WIFI = 12, 110751 IFLA_BRPORT_ROOT_ID = 13, 110752 IFLA_BRPORT_BRIDGE_ID = 14, 110753 IFLA_BRPORT_DESIGNATED_PORT = 15, 110754 IFLA_BRPORT_DESIGNATED_COST = 16, 110755 IFLA_BRPORT_ID = 17, 110756 IFLA_BRPORT_NO = 18, 110757 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK = 19, 110758 IFLA_BRPORT_CONFIG_PENDING = 20, 110759 IFLA_BRPORT_MESSAGE_AGE_TIMER = 21, 110760 IFLA_BRPORT_FORWARD_DELAY_TIMER = 22, 110761 IFLA_BRPORT_HOLD_TIMER = 23, 110762 IFLA_BRPORT_FLUSH = 24, 110763 IFLA_BRPORT_MULTICAST_ROUTER = 25, 110764 IFLA_BRPORT_PAD = 26, 110765 IFLA_BRPORT_MCAST_FLOOD = 27, 110766 IFLA_BRPORT_MCAST_TO_UCAST = 28, 110767 IFLA_BRPORT_VLAN_TUNNEL = 29, 110768 IFLA_BRPORT_BCAST_FLOOD = 30, 110769 IFLA_BRPORT_GROUP_FWD_MASK = 31, 110770 IFLA_BRPORT_NEIGH_SUPPRESS = 32, 110771 IFLA_BRPORT_ISOLATED = 33, 110772 IFLA_BRPORT_BACKUP_PORT = 34, 110773 IFLA_BRPORT_MRP_RING_OPEN = 35, 110774 IFLA_BRPORT_MRP_IN_OPEN = 36, 110775 __IFLA_BRPORT_MAX = 37, 110776 }; 110777 110778 enum { 110779 IFLA_INFO_UNSPEC = 0, 110780 IFLA_INFO_KIND = 1, 110781 IFLA_INFO_DATA = 2, 110782 IFLA_INFO_XSTATS = 3, 110783 IFLA_INFO_SLAVE_KIND = 4, 110784 IFLA_INFO_SLAVE_DATA = 5, 110785 __IFLA_INFO_MAX = 6, 110786 }; 110787 110788 enum { 110789 IFLA_VF_INFO_UNSPEC = 0, 110790 IFLA_VF_INFO = 1, 110791 __IFLA_VF_INFO_MAX = 2, 110792 }; 110793 110794 enum { 110795 IFLA_VF_UNSPEC = 0, 110796 IFLA_VF_MAC = 1, 110797 IFLA_VF_VLAN = 2, 110798 IFLA_VF_TX_RATE = 3, 110799 IFLA_VF_SPOOFCHK = 4, 110800 IFLA_VF_LINK_STATE = 5, 110801 IFLA_VF_RATE = 6, 110802 IFLA_VF_RSS_QUERY_EN = 7, 110803 IFLA_VF_STATS = 8, 110804 IFLA_VF_TRUST = 9, 110805 IFLA_VF_IB_NODE_GUID = 10, 110806 IFLA_VF_IB_PORT_GUID = 11, 110807 IFLA_VF_VLAN_LIST = 12, 110808 IFLA_VF_BROADCAST = 13, 110809 __IFLA_VF_MAX = 14, 110810 }; 110811 110812 struct ifla_vf_mac { 110813 __u32 vf; 110814 __u8 mac[32]; 110815 }; 110816 110817 struct ifla_vf_broadcast { 110818 __u8 broadcast[32]; 110819 }; 110820 110821 struct ifla_vf_vlan { 110822 __u32 vf; 110823 __u32 vlan; 110824 __u32 qos; 110825 }; 110826 110827 enum { 110828 IFLA_VF_VLAN_INFO_UNSPEC = 0, 110829 IFLA_VF_VLAN_INFO = 1, 110830 __IFLA_VF_VLAN_INFO_MAX = 2, 110831 }; 110832 110833 struct ifla_vf_vlan_info { 110834 __u32 vf; 110835 __u32 vlan; 110836 __u32 qos; 110837 __be16 vlan_proto; 110838 }; 110839 110840 struct ifla_vf_tx_rate { 110841 __u32 vf; 110842 __u32 rate; 110843 }; 110844 110845 struct ifla_vf_rate { 110846 __u32 vf; 110847 __u32 min_tx_rate; 110848 __u32 max_tx_rate; 110849 }; 110850 110851 struct ifla_vf_spoofchk { 110852 __u32 vf; 110853 __u32 setting; 110854 }; 110855 110856 struct ifla_vf_link_state { 110857 __u32 vf; 110858 __u32 link_state; 110859 }; 110860 110861 struct ifla_vf_rss_query_en { 110862 __u32 vf; 110863 __u32 setting; 110864 }; 110865 110866 enum { 110867 IFLA_VF_STATS_RX_PACKETS = 0, 110868 IFLA_VF_STATS_TX_PACKETS = 1, 110869 IFLA_VF_STATS_RX_BYTES = 2, 110870 IFLA_VF_STATS_TX_BYTES = 3, 110871 IFLA_VF_STATS_BROADCAST = 4, 110872 IFLA_VF_STATS_MULTICAST = 5, 110873 IFLA_VF_STATS_PAD = 6, 110874 IFLA_VF_STATS_RX_DROPPED = 7, 110875 IFLA_VF_STATS_TX_DROPPED = 8, 110876 __IFLA_VF_STATS_MAX = 9, 110877 }; 110878 110879 struct ifla_vf_trust { 110880 __u32 vf; 110881 __u32 setting; 110882 }; 110883 110884 enum { 110885 IFLA_VF_PORT_UNSPEC = 0, 110886 IFLA_VF_PORT = 1, 110887 __IFLA_VF_PORT_MAX = 2, 110888 }; 110889 110890 enum { 110891 IFLA_PORT_UNSPEC = 0, 110892 IFLA_PORT_VF = 1, 110893 IFLA_PORT_PROFILE = 2, 110894 IFLA_PORT_VSI_TYPE = 3, 110895 IFLA_PORT_INSTANCE_UUID = 4, 110896 IFLA_PORT_HOST_UUID = 5, 110897 IFLA_PORT_REQUEST = 6, 110898 IFLA_PORT_RESPONSE = 7, 110899 __IFLA_PORT_MAX = 8, 110900 }; 110901 110902 struct if_stats_msg { 110903 __u8 family; 110904 __u8 pad1; 110905 __u16 pad2; 110906 __u32 ifindex; 110907 __u32 filter_mask; 110908 }; 110909 110910 enum { 110911 IFLA_STATS_UNSPEC = 0, 110912 IFLA_STATS_LINK_64 = 1, 110913 IFLA_STATS_LINK_XSTATS = 2, 110914 IFLA_STATS_LINK_XSTATS_SLAVE = 3, 110915 IFLA_STATS_LINK_OFFLOAD_XSTATS = 4, 110916 IFLA_STATS_AF_SPEC = 5, 110917 __IFLA_STATS_MAX = 6, 110918 }; 110919 110920 enum { 110921 IFLA_OFFLOAD_XSTATS_UNSPEC = 0, 110922 IFLA_OFFLOAD_XSTATS_CPU_HIT = 1, 110923 __IFLA_OFFLOAD_XSTATS_MAX = 2, 110924 }; 110925 110926 enum { 110927 XDP_ATTACHED_NONE = 0, 110928 XDP_ATTACHED_DRV = 1, 110929 XDP_ATTACHED_SKB = 2, 110930 XDP_ATTACHED_HW = 3, 110931 XDP_ATTACHED_MULTI = 4, 110932 }; 110933 110934 enum { 110935 IFLA_XDP_UNSPEC = 0, 110936 IFLA_XDP_FD = 1, 110937 IFLA_XDP_ATTACHED = 2, 110938 IFLA_XDP_FLAGS = 3, 110939 IFLA_XDP_PROG_ID = 4, 110940 IFLA_XDP_DRV_PROG_ID = 5, 110941 IFLA_XDP_SKB_PROG_ID = 6, 110942 IFLA_XDP_HW_PROG_ID = 7, 110943 IFLA_XDP_EXPECTED_FD = 8, 110944 __IFLA_XDP_MAX = 9, 110945 }; 110946 110947 enum { 110948 IFLA_EVENT_NONE = 0, 110949 IFLA_EVENT_REBOOT = 1, 110950 IFLA_EVENT_FEATURES = 2, 110951 IFLA_EVENT_BONDING_FAILOVER = 3, 110952 IFLA_EVENT_NOTIFY_PEERS = 4, 110953 IFLA_EVENT_IGMP_RESEND = 5, 110954 IFLA_EVENT_BONDING_OPTIONS = 6, 110955 }; 110956 110957 enum { 110958 IFLA_BRIDGE_FLAGS = 0, 110959 IFLA_BRIDGE_MODE = 1, 110960 IFLA_BRIDGE_VLAN_INFO = 2, 110961 IFLA_BRIDGE_VLAN_TUNNEL_INFO = 3, 110962 IFLA_BRIDGE_MRP = 4, 110963 IFLA_BRIDGE_CFM = 5, 110964 __IFLA_BRIDGE_MAX = 6, 110965 }; 110966 110967 enum { 110968 BR_MCAST_DIR_RX = 0, 110969 BR_MCAST_DIR_TX = 1, 110970 BR_MCAST_DIR_SIZE = 2, 110971 }; 110972 110973 enum rtattr_type_t { 110974 RTA_UNSPEC = 0, 110975 RTA_DST = 1, 110976 RTA_SRC = 2, 110977 RTA_IIF = 3, 110978 RTA_OIF = 4, 110979 RTA_GATEWAY = 5, 110980 RTA_PRIORITY = 6, 110981 RTA_PREFSRC = 7, 110982 RTA_METRICS = 8, 110983 RTA_MULTIPATH = 9, 110984 RTA_PROTOINFO = 10, 110985 RTA_FLOW = 11, 110986 RTA_CACHEINFO = 12, 110987 RTA_SESSION = 13, 110988 RTA_MP_ALGO = 14, 110989 RTA_TABLE = 15, 110990 RTA_MARK = 16, 110991 RTA_MFC_STATS = 17, 110992 RTA_VIA = 18, 110993 RTA_NEWDST = 19, 110994 RTA_PREF = 20, 110995 RTA_ENCAP_TYPE = 21, 110996 RTA_ENCAP = 22, 110997 RTA_EXPIRES = 23, 110998 RTA_PAD = 24, 110999 RTA_UID = 25, 111000 RTA_TTL_PROPAGATE = 26, 111001 RTA_IP_PROTO = 27, 111002 RTA_SPORT = 28, 111003 RTA_DPORT = 29, 111004 RTA_NH_ID = 30, 111005 __RTA_MAX = 31, 111006 }; 111007 111008 struct rta_cacheinfo { 111009 __u32 rta_clntref; 111010 __u32 rta_lastuse; 111011 __s32 rta_expires; 111012 __u32 rta_error; 111013 __u32 rta_used; 111014 __u32 rta_id; 111015 __u32 rta_ts; 111016 __u32 rta_tsage; 111017 }; 111018 111019 struct ifinfomsg { 111020 unsigned char ifi_family; 111021 unsigned char __ifi_pad; 111022 short unsigned int ifi_type; 111023 int ifi_index; 111024 unsigned int ifi_flags; 111025 unsigned int ifi_change; 111026 }; 111027 111028 struct rtnl_af_ops { 111029 struct list_head list; 111030 int family; 111031 int (*fill_link_af)(struct sk_buff *, const struct net_device *, u32); 111032 size_t (*get_link_af_size)(const struct net_device *, u32); 111033 int (*validate_link_af)(const struct net_device *, const struct nlattr *); 111034 int (*set_link_af)(struct net_device *, const struct nlattr *); 111035 int (*fill_stats_af)(struct sk_buff *, const struct net_device *); 111036 size_t (*get_stats_af_size)(const struct net_device *); 111037 }; 111038 111039 struct rtnl_link { 111040 rtnl_doit_func doit; 111041 rtnl_dumpit_func dumpit; 111042 struct module *owner; 111043 unsigned int flags; 111044 struct callback_head rcu; 111045 }; 111046 111047 enum { 111048 IF_LINK_MODE_DEFAULT = 0, 111049 IF_LINK_MODE_DORMANT = 1, 111050 IF_LINK_MODE_TESTING = 2, 111051 }; 111052 111053 enum lw_bits { 111054 LW_URGENT = 0, 111055 }; 111056 111057 struct seg6_pernet_data { 111058 struct mutex lock; 111059 struct in6_addr *tun_src; 111060 struct rhashtable hmac_infos; 111061 }; 111062 111063 enum { 111064 BPF_F_RECOMPUTE_CSUM = 1, 111065 BPF_F_INVALIDATE_HASH = 2, 111066 }; 111067 111068 enum { 111069 BPF_F_HDR_FIELD_MASK = 15, 111070 }; 111071 111072 enum { 111073 BPF_F_PSEUDO_HDR = 16, 111074 BPF_F_MARK_MANGLED_0 = 32, 111075 BPF_F_MARK_ENFORCE = 64, 111076 }; 111077 111078 enum { 111079 BPF_F_INGRESS = 1, 111080 }; 111081 111082 enum { 111083 BPF_F_TUNINFO_IPV6 = 1, 111084 }; 111085 111086 enum { 111087 BPF_F_ZERO_CSUM_TX = 2, 111088 BPF_F_DONT_FRAGMENT = 4, 111089 BPF_F_SEQ_NUMBER = 8, 111090 }; 111091 111092 enum { 111093 BPF_CSUM_LEVEL_QUERY = 0, 111094 BPF_CSUM_LEVEL_INC = 1, 111095 BPF_CSUM_LEVEL_DEC = 2, 111096 BPF_CSUM_LEVEL_RESET = 3, 111097 }; 111098 111099 enum { 111100 BPF_F_ADJ_ROOM_FIXED_GSO = 1, 111101 BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 2, 111102 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 4, 111103 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 8, 111104 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 16, 111105 BPF_F_ADJ_ROOM_NO_CSUM_RESET = 32, 111106 }; 111107 111108 enum { 111109 BPF_ADJ_ROOM_ENCAP_L2_MASK = 255, 111110 BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, 111111 }; 111112 111113 enum { 111114 BPF_SK_LOOKUP_F_REPLACE = 1, 111115 BPF_SK_LOOKUP_F_NO_REUSEPORT = 2, 111116 }; 111117 111118 enum bpf_adj_room_mode { 111119 BPF_ADJ_ROOM_NET = 0, 111120 BPF_ADJ_ROOM_MAC = 1, 111121 }; 111122 111123 enum bpf_hdr_start_off { 111124 BPF_HDR_START_MAC = 0, 111125 BPF_HDR_START_NET = 1, 111126 }; 111127 111128 enum bpf_lwt_encap_mode { 111129 BPF_LWT_ENCAP_SEG6 = 0, 111130 BPF_LWT_ENCAP_SEG6_INLINE = 1, 111131 BPF_LWT_ENCAP_IP = 2, 111132 }; 111133 111134 struct bpf_tunnel_key { 111135 __u32 tunnel_id; 111136 union { 111137 __u32 remote_ipv4; 111138 __u32 remote_ipv6[4]; 111139 }; 111140 __u8 tunnel_tos; 111141 __u8 tunnel_ttl; 111142 __u16 tunnel_ext; 111143 __u32 tunnel_label; 111144 }; 111145 111146 struct bpf_xfrm_state { 111147 __u32 reqid; 111148 __u32 spi; 111149 __u16 family; 111150 __u16 ext; 111151 union { 111152 __u32 remote_ipv4; 111153 __u32 remote_ipv6[4]; 111154 }; 111155 }; 111156 111157 struct bpf_tcp_sock { 111158 __u32 snd_cwnd; 111159 __u32 srtt_us; 111160 __u32 rtt_min; 111161 __u32 snd_ssthresh; 111162 __u32 rcv_nxt; 111163 __u32 snd_nxt; 111164 __u32 snd_una; 111165 __u32 mss_cache; 111166 __u32 ecn_flags; 111167 __u32 rate_delivered; 111168 __u32 rate_interval_us; 111169 __u32 packets_out; 111170 __u32 retrans_out; 111171 __u32 total_retrans; 111172 __u32 segs_in; 111173 __u32 data_segs_in; 111174 __u32 segs_out; 111175 __u32 data_segs_out; 111176 __u32 lost_out; 111177 __u32 sacked_out; 111178 __u64 bytes_received; 111179 __u64 bytes_acked; 111180 __u32 dsack_dups; 111181 __u32 delivered; 111182 __u32 delivered_ce; 111183 __u32 icsk_retransmits; 111184 }; 111185 111186 struct bpf_sock_tuple { 111187 union { 111188 struct { 111189 __be32 saddr; 111190 __be32 daddr; 111191 __be16 sport; 111192 __be16 dport; 111193 } ipv4; 111194 struct { 111195 __be32 saddr[4]; 111196 __be32 daddr[4]; 111197 __be16 sport; 111198 __be16 dport; 111199 } ipv6; 111200 }; 111201 }; 111202 111203 struct bpf_xdp_sock { 111204 __u32 queue_id; 111205 }; 111206 111207 enum { 111208 BPF_SOCK_OPS_RTO_CB_FLAG = 1, 111209 BPF_SOCK_OPS_RETRANS_CB_FLAG = 2, 111210 BPF_SOCK_OPS_STATE_CB_FLAG = 4, 111211 BPF_SOCK_OPS_RTT_CB_FLAG = 8, 111212 BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 16, 111213 BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 32, 111214 BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 64, 111215 BPF_SOCK_OPS_ALL_CB_FLAGS = 127, 111216 }; 111217 111218 enum { 111219 BPF_SOCK_OPS_VOID = 0, 111220 BPF_SOCK_OPS_TIMEOUT_INIT = 1, 111221 BPF_SOCK_OPS_RWND_INIT = 2, 111222 BPF_SOCK_OPS_TCP_CONNECT_CB = 3, 111223 BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 4, 111224 BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 5, 111225 BPF_SOCK_OPS_NEEDS_ECN = 6, 111226 BPF_SOCK_OPS_BASE_RTT = 7, 111227 BPF_SOCK_OPS_RTO_CB = 8, 111228 BPF_SOCK_OPS_RETRANS_CB = 9, 111229 BPF_SOCK_OPS_STATE_CB = 10, 111230 BPF_SOCK_OPS_TCP_LISTEN_CB = 11, 111231 BPF_SOCK_OPS_RTT_CB = 12, 111232 BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 13, 111233 BPF_SOCK_OPS_HDR_OPT_LEN_CB = 14, 111234 BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 15, 111235 }; 111236 111237 enum { 111238 TCP_BPF_IW = 1001, 111239 TCP_BPF_SNDCWND_CLAMP = 1002, 111240 TCP_BPF_DELACK_MAX = 1003, 111241 TCP_BPF_RTO_MIN = 1004, 111242 TCP_BPF_SYN = 1005, 111243 TCP_BPF_SYN_IP = 1006, 111244 TCP_BPF_SYN_MAC = 1007, 111245 }; 111246 111247 enum { 111248 BPF_LOAD_HDR_OPT_TCP_SYN = 1, 111249 }; 111250 111251 enum { 111252 BPF_FIB_LOOKUP_DIRECT = 1, 111253 BPF_FIB_LOOKUP_OUTPUT = 2, 111254 }; 111255 111256 enum { 111257 BPF_FIB_LKUP_RET_SUCCESS = 0, 111258 BPF_FIB_LKUP_RET_BLACKHOLE = 1, 111259 BPF_FIB_LKUP_RET_UNREACHABLE = 2, 111260 BPF_FIB_LKUP_RET_PROHIBIT = 3, 111261 BPF_FIB_LKUP_RET_NOT_FWDED = 4, 111262 BPF_FIB_LKUP_RET_FWD_DISABLED = 5, 111263 BPF_FIB_LKUP_RET_UNSUPP_LWT = 6, 111264 BPF_FIB_LKUP_RET_NO_NEIGH = 7, 111265 BPF_FIB_LKUP_RET_FRAG_NEEDED = 8, 111266 }; 111267 111268 struct bpf_fib_lookup { 111269 __u8 family; 111270 __u8 l4_protocol; 111271 __be16 sport; 111272 __be16 dport; 111273 __u16 tot_len; 111274 __u32 ifindex; 111275 union { 111276 __u8 tos; 111277 __be32 flowinfo; 111278 __u32 rt_metric; 111279 }; 111280 union { 111281 __be32 ipv4_src; 111282 __u32 ipv6_src[4]; 111283 }; 111284 union { 111285 __be32 ipv4_dst; 111286 __u32 ipv6_dst[4]; 111287 }; 111288 __be16 h_vlan_proto; 111289 __be16 h_vlan_TCI; 111290 __u8 smac[6]; 111291 __u8 dmac[6]; 111292 }; 111293 111294 struct bpf_redir_neigh { 111295 __u32 nh_family; 111296 union { 111297 __be32 ipv4_nh; 111298 __u32 ipv6_nh[4]; 111299 }; 111300 }; 111301 111302 enum rt_scope_t { 111303 RT_SCOPE_UNIVERSE = 0, 111304 RT_SCOPE_SITE = 200, 111305 RT_SCOPE_LINK = 253, 111306 RT_SCOPE_HOST = 254, 111307 RT_SCOPE_NOWHERE = 255, 111308 }; 111309 111310 enum rt_class_t { 111311 RT_TABLE_UNSPEC = 0, 111312 RT_TABLE_COMPAT = 252, 111313 RT_TABLE_DEFAULT = 253, 111314 RT_TABLE_MAIN = 254, 111315 RT_TABLE_LOCAL = 255, 111316 RT_TABLE_MAX = 4294967295, 111317 }; 111318 111319 struct nl_info { 111320 struct nlmsghdr *nlh; 111321 struct net *nl_net; 111322 u32 portid; 111323 u8 skip_notify: 1; 111324 u8 skip_notify_kernel: 1; 111325 }; 111326 111327 struct inet_timewait_sock { 111328 struct sock_common __tw_common; 111329 __u32 tw_mark; 111330 volatile unsigned char tw_substate; 111331 unsigned char tw_rcv_wscale; 111332 __be16 tw_sport; 111333 unsigned int tw_kill: 1; 111334 unsigned int tw_transparent: 1; 111335 unsigned int tw_flowlabel: 20; 111336 unsigned int tw_pad: 2; 111337 unsigned int tw_tos: 8; 111338 u32 tw_txhash; 111339 u32 tw_priority; 111340 struct timer_list tw_timer; 111341 struct inet_bind_bucket *tw_tb; 111342 }; 111343 111344 struct tcp_timewait_sock { 111345 struct inet_timewait_sock tw_sk; 111346 u32 tw_rcv_wnd; 111347 u32 tw_ts_offset; 111348 u32 tw_ts_recent; 111349 u32 tw_last_oow_ack_time; 111350 int tw_ts_recent_stamp; 111351 u32 tw_tx_delay; 111352 struct tcp_md5sig_key *tw_md5_key; 111353 }; 111354 111355 struct udp_sock { 111356 struct inet_sock inet; 111357 int pending; 111358 unsigned int corkflag; 111359 __u8 encap_type; 111360 unsigned char no_check6_tx: 1; 111361 unsigned char no_check6_rx: 1; 111362 unsigned char encap_enabled: 1; 111363 unsigned char gro_enabled: 1; 111364 __u16 len; 111365 __u16 gso_size; 111366 __u16 pcslen; 111367 __u16 pcrlen; 111368 __u8 pcflag; 111369 __u8 unused[3]; 111370 int (*encap_rcv)(struct sock *, struct sk_buff *); 111371 int (*encap_err_lookup)(struct sock *, struct sk_buff *); 111372 void (*encap_destroy)(struct sock *); 111373 struct sk_buff * (*gro_receive)(struct sock *, struct list_head *, struct sk_buff *); 111374 int (*gro_complete)(struct sock *, struct sk_buff *, int); 111375 long: 64; 111376 long: 64; 111377 long: 64; 111378 long: 64; 111379 long: 64; 111380 long: 64; 111381 long: 64; 111382 struct sk_buff_head reader_queue; 111383 int forward_deficit; 111384 long: 32; 111385 long: 64; 111386 long: 64; 111387 long: 64; 111388 long: 64; 111389 }; 111390 111391 struct udp6_sock { 111392 struct udp_sock udp; 111393 struct ipv6_pinfo inet6; 111394 long: 64; 111395 long: 64; 111396 long: 64; 111397 long: 64; 111398 }; 111399 111400 struct tcp6_sock { 111401 struct tcp_sock tcp; 111402 struct ipv6_pinfo inet6; 111403 }; 111404 111405 struct fib6_result; 111406 111407 struct fib6_config; 111408 111409 struct ipv6_stub { 111410 int (*ipv6_sock_mc_join)(struct sock *, int, const struct in6_addr *); 111411 int (*ipv6_sock_mc_drop)(struct sock *, int, const struct in6_addr *); 111412 struct dst_entry * (*ipv6_dst_lookup_flow)(struct net *, const struct sock *, struct flowi6 *, const struct in6_addr *); 111413 int (*ipv6_route_input)(struct sk_buff *); 111414 struct fib6_table * (*fib6_get_table)(struct net *, u32); 111415 int (*fib6_lookup)(struct net *, int, struct flowi6 *, struct fib6_result *, int); 111416 int (*fib6_table_lookup)(struct net *, struct fib6_table *, int, struct flowi6 *, struct fib6_result *, int); 111417 void (*fib6_select_path)(const struct net *, struct fib6_result *, struct flowi6 *, int, bool, const struct sk_buff *, int); 111418 u32 (*ip6_mtu_from_fib6)(const struct fib6_result *, const struct in6_addr *, const struct in6_addr *); 111419 int (*fib6_nh_init)(struct net *, struct fib6_nh *, struct fib6_config *, gfp_t, struct netlink_ext_ack *); 111420 void (*fib6_nh_release)(struct fib6_nh *); 111421 void (*fib6_update_sernum)(struct net *, struct fib6_info *); 111422 int (*ip6_del_rt)(struct net *, struct fib6_info *, bool); 111423 void (*fib6_rt_update)(struct net *, struct fib6_info *, struct nl_info *); 111424 void (*udpv6_encap_enable)(); 111425 void (*ndisc_send_na)(struct net_device *, const struct in6_addr *, const struct in6_addr *, bool, bool, bool, bool); 111426 void (*xfrm6_local_rxpmtu)(struct sk_buff *, u32); 111427 int (*xfrm6_udp_encap_rcv)(struct sock *, struct sk_buff *); 111428 int (*xfrm6_rcv_encap)(struct sk_buff *, int, __be32, int); 111429 struct neigh_table *nd_tbl; 111430 int (*ipv6_fragment)(struct net *, struct sock *, struct sk_buff *, int (*)(struct net *, struct sock *, struct sk_buff *)); 111431 }; 111432 111433 struct fib6_result { 111434 struct fib6_nh *nh; 111435 struct fib6_info *f6i; 111436 u32 fib6_flags; 111437 u8 fib6_type; 111438 struct rt6_info *rt6; 111439 }; 111440 111441 struct fib6_config { 111442 u32 fc_table; 111443 u32 fc_metric; 111444 int fc_dst_len; 111445 int fc_src_len; 111446 int fc_ifindex; 111447 u32 fc_flags; 111448 u32 fc_protocol; 111449 u16 fc_type; 111450 u16 fc_delete_all_nh: 1; 111451 u16 fc_ignore_dev_down: 1; 111452 u16 __unused: 14; 111453 u32 fc_nh_id; 111454 struct in6_addr fc_dst; 111455 struct in6_addr fc_src; 111456 struct in6_addr fc_prefsrc; 111457 struct in6_addr fc_gateway; 111458 long unsigned int fc_expires; 111459 struct nlattr *fc_mx; 111460 int fc_mx_len; 111461 int fc_mp_len; 111462 struct nlattr *fc_mp; 111463 struct nl_info fc_nlinfo; 111464 struct nlattr *fc_encap; 111465 u16 fc_encap_type; 111466 bool fc_is_fdb; 111467 }; 111468 111469 struct ipv6_bpf_stub { 111470 int (*inet6_bind)(struct sock *, struct sockaddr *, int, u32); 111471 struct sock * (*udp6_lib_lookup)(struct net *, const struct in6_addr *, __be16, const struct in6_addr *, __be16, int, int, struct udp_table *, struct sk_buff *); 111472 }; 111473 111474 struct fib_result { 111475 __be32 prefix; 111476 unsigned char prefixlen; 111477 unsigned char nh_sel; 111478 unsigned char type; 111479 unsigned char scope; 111480 u32 tclassid; 111481 struct fib_nh_common *nhc; 111482 struct fib_info *fi; 111483 struct fib_table *table; 111484 struct hlist_head *fa_head; 111485 }; 111486 111487 enum { 111488 INET_ECN_NOT_ECT = 0, 111489 INET_ECN_ECT_1 = 1, 111490 INET_ECN_ECT_0 = 2, 111491 INET_ECN_CE = 3, 111492 INET_ECN_MASK = 3, 111493 }; 111494 111495 struct tcp_skb_cb { 111496 __u32 seq; 111497 __u32 end_seq; 111498 union { 111499 __u32 tcp_tw_isn; 111500 struct { 111501 u16 tcp_gso_segs; 111502 u16 tcp_gso_size; 111503 }; 111504 }; 111505 __u8 tcp_flags; 111506 __u8 sacked; 111507 __u8 ip_dsfield; 111508 __u8 txstamp_ack: 1; 111509 __u8 eor: 1; 111510 __u8 has_rxtstamp: 1; 111511 __u8 unused: 5; 111512 __u32 ack_seq; 111513 union { 111514 struct { 111515 __u32 in_flight: 30; 111516 __u32 is_app_limited: 1; 111517 __u32 unused: 1; 111518 __u32 delivered; 111519 u64 first_tx_mstamp; 111520 u64 delivered_mstamp; 111521 } tx; 111522 union { 111523 struct inet_skb_parm h4; 111524 struct inet6_skb_parm h6; 111525 } header; 111526 struct { 111527 __u32 flags; 111528 struct sock *sk_redir; 111529 void *data_end; 111530 } bpf; 111531 }; 111532 }; 111533 111534 struct strp_stats { 111535 long long unsigned int msgs; 111536 long long unsigned int bytes; 111537 unsigned int mem_fail; 111538 unsigned int need_more_hdr; 111539 unsigned int msg_too_big; 111540 unsigned int msg_timeouts; 111541 unsigned int bad_hdr_len; 111542 }; 111543 111544 struct strparser; 111545 111546 struct strp_callbacks { 111547 int (*parse_msg)(struct strparser *, struct sk_buff *); 111548 void (*rcv_msg)(struct strparser *, struct sk_buff *); 111549 int (*read_sock_done)(struct strparser *, int); 111550 void (*abort_parser)(struct strparser *, int); 111551 void (*lock)(struct strparser *); 111552 void (*unlock)(struct strparser *); 111553 }; 111554 111555 struct strparser { 111556 struct sock *sk; 111557 u32 stopped: 1; 111558 u32 paused: 1; 111559 u32 aborted: 1; 111560 u32 interrupted: 1; 111561 u32 unrecov_intr: 1; 111562 struct sk_buff **skb_nextp; 111563 struct sk_buff *skb_head; 111564 unsigned int need_bytes; 111565 struct delayed_work msg_timer_work; 111566 struct work_struct work; 111567 struct strp_stats stats; 111568 struct strp_callbacks cb; 111569 }; 111570 111571 struct strp_msg { 111572 int full_len; 111573 int offset; 111574 }; 111575 111576 struct xdp_umem { 111577 void *addrs; 111578 u64 size; 111579 u32 headroom; 111580 u32 chunk_size; 111581 u32 chunks; 111582 u32 npgs; 111583 struct user_struct *user; 111584 refcount_t users; 111585 u8 flags; 111586 bool zc; 111587 struct page **pgs; 111588 int id; 111589 struct list_head xsk_dma_list; 111590 struct work_struct work; 111591 }; 111592 111593 struct xdp_sock; 111594 111595 struct xsk_map { 111596 struct bpf_map map; 111597 spinlock_t lock; 111598 struct xdp_sock *xsk_map[0]; 111599 long: 64; 111600 long: 64; 111601 long: 64; 111602 long: 64; 111603 long: 64; 111604 long: 64; 111605 long: 64; 111606 }; 111607 111608 struct xsk_queue; 111609 111610 struct xdp_sock { 111611 struct sock sk; 111612 long: 64; 111613 struct xsk_queue *rx; 111614 struct net_device *dev; 111615 struct xdp_umem *umem; 111616 struct list_head flush_node; 111617 struct xsk_buff_pool *pool; 111618 u16 queue_id; 111619 bool zc; 111620 enum { 111621 XSK_READY = 0, 111622 XSK_BOUND = 1, 111623 XSK_UNBOUND = 2, 111624 } state; 111625 long: 64; 111626 struct xsk_queue *tx; 111627 struct list_head tx_list; 111628 spinlock_t rx_lock; 111629 u64 rx_dropped; 111630 u64 rx_queue_full; 111631 struct list_head map_list; 111632 spinlock_t map_list_lock; 111633 struct mutex mutex; 111634 struct xsk_queue *fq_tmp; 111635 struct xsk_queue *cq_tmp; 111636 long: 64; 111637 }; 111638 111639 struct ipv6_sr_hdr { 111640 __u8 nexthdr; 111641 __u8 hdrlen; 111642 __u8 type; 111643 __u8 segments_left; 111644 __u8 first_segment; 111645 __u8 flags; 111646 __u16 tag; 111647 struct in6_addr segments[0]; 111648 }; 111649 111650 enum { 111651 SEG6_LOCAL_ACTION_UNSPEC = 0, 111652 SEG6_LOCAL_ACTION_END = 1, 111653 SEG6_LOCAL_ACTION_END_X = 2, 111654 SEG6_LOCAL_ACTION_END_T = 3, 111655 SEG6_LOCAL_ACTION_END_DX2 = 4, 111656 SEG6_LOCAL_ACTION_END_DX6 = 5, 111657 SEG6_LOCAL_ACTION_END_DX4 = 6, 111658 SEG6_LOCAL_ACTION_END_DT6 = 7, 111659 SEG6_LOCAL_ACTION_END_DT4 = 8, 111660 SEG6_LOCAL_ACTION_END_B6 = 9, 111661 SEG6_LOCAL_ACTION_END_B6_ENCAP = 10, 111662 SEG6_LOCAL_ACTION_END_BM = 11, 111663 SEG6_LOCAL_ACTION_END_S = 12, 111664 SEG6_LOCAL_ACTION_END_AS = 13, 111665 SEG6_LOCAL_ACTION_END_AM = 14, 111666 SEG6_LOCAL_ACTION_END_BPF = 15, 111667 __SEG6_LOCAL_ACTION_MAX = 16, 111668 }; 111669 111670 struct seg6_bpf_srh_state { 111671 struct ipv6_sr_hdr *srh; 111672 u16 hdrlen; 111673 bool valid; 111674 }; 111675 111676 struct tls_crypto_info { 111677 __u16 version; 111678 __u16 cipher_type; 111679 }; 111680 111681 struct tls12_crypto_info_aes_gcm_128 { 111682 struct tls_crypto_info info; 111683 unsigned char iv[8]; 111684 unsigned char key[16]; 111685 unsigned char salt[4]; 111686 unsigned char rec_seq[8]; 111687 }; 111688 111689 struct tls12_crypto_info_aes_gcm_256 { 111690 struct tls_crypto_info info; 111691 unsigned char iv[8]; 111692 unsigned char key[32]; 111693 unsigned char salt[4]; 111694 unsigned char rec_seq[8]; 111695 }; 111696 111697 struct tls12_crypto_info_chacha20_poly1305 { 111698 struct tls_crypto_info info; 111699 unsigned char iv[12]; 111700 unsigned char key[32]; 111701 unsigned char salt[0]; 111702 unsigned char rec_seq[8]; 111703 }; 111704 111705 struct tls_sw_context_rx { 111706 struct crypto_aead *aead_recv; 111707 struct crypto_wait async_wait; 111708 struct strparser strp; 111709 struct sk_buff_head rx_list; 111710 void (*saved_data_ready)(struct sock *); 111711 struct sk_buff *recv_pkt; 111712 u8 control; 111713 u8 async_capable: 1; 111714 u8 decrypted: 1; 111715 atomic_t decrypt_pending; 111716 spinlock_t decrypt_compl_lock; 111717 bool async_notify; 111718 }; 111719 111720 struct cipher_context { 111721 char *iv; 111722 char *rec_seq; 111723 }; 111724 111725 union tls_crypto_context { 111726 struct tls_crypto_info info; 111727 union { 111728 struct tls12_crypto_info_aes_gcm_128 aes_gcm_128; 111729 struct tls12_crypto_info_aes_gcm_256 aes_gcm_256; 111730 struct tls12_crypto_info_chacha20_poly1305 chacha20_poly1305; 111731 }; 111732 }; 111733 111734 struct tls_prot_info { 111735 u16 version; 111736 u16 cipher_type; 111737 u16 prepend_size; 111738 u16 tag_size; 111739 u16 overhead_size; 111740 u16 iv_size; 111741 u16 salt_size; 111742 u16 rec_seq_size; 111743 u16 aad_size; 111744 u16 tail_size; 111745 }; 111746 111747 struct tls_context { 111748 struct tls_prot_info prot_info; 111749 u8 tx_conf: 3; 111750 u8 rx_conf: 3; 111751 int (*push_pending_record)(struct sock *, int); 111752 void (*sk_write_space)(struct sock *); 111753 void *priv_ctx_tx; 111754 void *priv_ctx_rx; 111755 struct net_device *netdev; 111756 struct cipher_context tx; 111757 struct cipher_context rx; 111758 struct scatterlist *partially_sent_record; 111759 u16 partially_sent_offset; 111760 bool in_tcp_sendpages; 111761 bool pending_open_record_frags; 111762 struct mutex tx_lock; 111763 long unsigned int flags; 111764 struct proto *sk_proto; 111765 void (*sk_destruct)(struct sock *); 111766 union tls_crypto_context crypto_send; 111767 union tls_crypto_context crypto_recv; 111768 struct list_head list; 111769 refcount_t refcount; 111770 struct callback_head rcu; 111771 }; 111772 111773 typedef u64 (*btf_bpf_skb_get_pay_offset)(struct sk_buff *); 111774 111775 typedef u64 (*btf_bpf_skb_get_nlattr)(struct sk_buff *, u32, u32); 111776 111777 typedef u64 (*btf_bpf_skb_get_nlattr_nest)(struct sk_buff *, u32, u32); 111778 111779 typedef u64 (*btf_bpf_skb_load_helper_8)(const struct sk_buff *, const void *, int, int); 111780 111781 typedef u64 (*btf_bpf_skb_load_helper_8_no_cache)(const struct sk_buff *, int); 111782 111783 typedef u64 (*btf_bpf_skb_load_helper_16)(const struct sk_buff *, const void *, int, int); 111784 111785 typedef u64 (*btf_bpf_skb_load_helper_16_no_cache)(const struct sk_buff *, int); 111786 111787 typedef u64 (*btf_bpf_skb_load_helper_32)(const struct sk_buff *, const void *, int, int); 111788 111789 typedef u64 (*btf_bpf_skb_load_helper_32_no_cache)(const struct sk_buff *, int); 111790 111791 struct bpf_scratchpad { 111792 union { 111793 __be32 diff[128]; 111794 u8 buff[512]; 111795 }; 111796 }; 111797 111798 typedef u64 (*btf_bpf_skb_store_bytes)(struct sk_buff *, u32, const void *, u32, u64); 111799 111800 typedef u64 (*btf_bpf_skb_load_bytes)(const struct sk_buff *, u32, void *, u32); 111801 111802 typedef u64 (*btf_bpf_flow_dissector_load_bytes)(const struct bpf_flow_dissector *, u32, void *, u32); 111803 111804 typedef u64 (*btf_bpf_skb_load_bytes_relative)(const struct sk_buff *, u32, void *, u32, u32); 111805 111806 typedef u64 (*btf_bpf_skb_pull_data)(struct sk_buff *, u32); 111807 111808 typedef u64 (*btf_bpf_sk_fullsock)(struct sock *); 111809 111810 typedef u64 (*btf_sk_skb_pull_data)(struct sk_buff *, u32); 111811 111812 typedef u64 (*btf_bpf_l3_csum_replace)(struct sk_buff *, u32, u64, u64, u64); 111813 111814 typedef u64 (*btf_bpf_l4_csum_replace)(struct sk_buff *, u32, u64, u64, u64); 111815 111816 typedef u64 (*btf_bpf_csum_diff)(__be32 *, u32, __be32 *, u32, __wsum); 111817 111818 typedef u64 (*btf_bpf_csum_update)(struct sk_buff *, __wsum); 111819 111820 typedef u64 (*btf_bpf_csum_level)(struct sk_buff *, u64); 111821 111822 enum { 111823 BPF_F_NEIGH = 2, 111824 BPF_F_PEER = 4, 111825 BPF_F_NEXTHOP = 8, 111826 }; 111827 111828 typedef u64 (*btf_bpf_clone_redirect)(struct sk_buff *, u32, u64); 111829 111830 typedef u64 (*btf_bpf_redirect)(u32, u64); 111831 111832 typedef u64 (*btf_bpf_redirect_peer)(u32, u64); 111833 111834 typedef u64 (*btf_bpf_redirect_neigh)(u32, struct bpf_redir_neigh *, int, u64); 111835 111836 typedef u64 (*btf_bpf_msg_apply_bytes)(struct sk_msg *, u32); 111837 111838 typedef u64 (*btf_bpf_msg_cork_bytes)(struct sk_msg *, u32); 111839 111840 typedef u64 (*btf_bpf_msg_pull_data)(struct sk_msg *, u32, u32, u64); 111841 111842 typedef u64 (*btf_bpf_msg_push_data)(struct sk_msg *, u32, u32, u64); 111843 111844 typedef u64 (*btf_bpf_msg_pop_data)(struct sk_msg *, u32, u32, u64); 111845 111846 typedef u64 (*btf_bpf_get_cgroup_classid_curr)(); 111847 111848 typedef u64 (*btf_bpf_skb_cgroup_classid)(const struct sk_buff *); 111849 111850 typedef u64 (*btf_bpf_get_cgroup_classid)(const struct sk_buff *); 111851 111852 typedef u64 (*btf_bpf_get_route_realm)(const struct sk_buff *); 111853 111854 typedef u64 (*btf_bpf_get_hash_recalc)(struct sk_buff *); 111855 111856 typedef u64 (*btf_bpf_set_hash_invalid)(struct sk_buff *); 111857 111858 typedef u64 (*btf_bpf_set_hash)(struct sk_buff *, u32); 111859 111860 typedef u64 (*btf_bpf_skb_vlan_push)(struct sk_buff *, __be16, u16); 111861 111862 typedef u64 (*btf_bpf_skb_vlan_pop)(struct sk_buff *); 111863 111864 typedef u64 (*btf_bpf_skb_change_proto)(struct sk_buff *, __be16, u64); 111865 111866 typedef u64 (*btf_bpf_skb_change_type)(struct sk_buff *, u32); 111867 111868 typedef u64 (*btf_sk_skb_adjust_room)(struct sk_buff *, s32, u32, u64); 111869 111870 typedef u64 (*btf_bpf_skb_adjust_room)(struct sk_buff *, s32, u32, u64); 111871 111872 typedef u64 (*btf_bpf_skb_change_tail)(struct sk_buff *, u32, u64); 111873 111874 typedef u64 (*btf_sk_skb_change_tail)(struct sk_buff *, u32, u64); 111875 111876 typedef u64 (*btf_bpf_skb_change_head)(struct sk_buff *, u32, u64); 111877 111878 typedef u64 (*btf_sk_skb_change_head)(struct sk_buff *, u32, u64); 111879 111880 typedef u64 (*btf_bpf_xdp_adjust_head)(struct xdp_buff *, int); 111881 111882 typedef u64 (*btf_bpf_xdp_adjust_tail)(struct xdp_buff *, int); 111883 111884 typedef u64 (*btf_bpf_xdp_adjust_meta)(struct xdp_buff *, int); 111885 111886 typedef u64 (*btf_bpf_xdp_redirect)(u32, u64); 111887 111888 typedef u64 (*btf_bpf_xdp_redirect_map)(struct bpf_map *, u32, u64); 111889 111890 typedef u64 (*btf_bpf_skb_event_output)(struct sk_buff *, struct bpf_map *, u64, void *, u64); 111891 111892 typedef u64 (*btf_bpf_skb_get_tunnel_key)(struct sk_buff *, struct bpf_tunnel_key *, u32, u64); 111893 111894 typedef u64 (*btf_bpf_skb_get_tunnel_opt)(struct sk_buff *, u8 *, u32); 111895 111896 typedef u64 (*btf_bpf_skb_set_tunnel_key)(struct sk_buff *, const struct bpf_tunnel_key *, u32, u64); 111897 111898 typedef u64 (*btf_bpf_skb_set_tunnel_opt)(struct sk_buff *, const u8 *, u32); 111899 111900 typedef u64 (*btf_bpf_skb_under_cgroup)(struct sk_buff *, struct bpf_map *, u32); 111901 111902 typedef u64 (*btf_bpf_skb_cgroup_id)(const struct sk_buff *); 111903 111904 typedef u64 (*btf_bpf_skb_ancestor_cgroup_id)(const struct sk_buff *, int); 111905 111906 typedef u64 (*btf_bpf_sk_cgroup_id)(struct sock *); 111907 111908 typedef u64 (*btf_bpf_sk_ancestor_cgroup_id)(struct sock *, int); 111909 111910 typedef u64 (*btf_bpf_xdp_event_output)(struct xdp_buff *, struct bpf_map *, u64, void *, u64); 111911 111912 typedef u64 (*btf_bpf_get_socket_cookie)(struct sk_buff *); 111913 111914 typedef u64 (*btf_bpf_get_socket_cookie_sock_addr)(struct bpf_sock_addr_kern *); 111915 111916 typedef u64 (*btf_bpf_get_socket_cookie_sock)(struct sock *); 111917 111918 typedef u64 (*btf_bpf_get_socket_cookie_sock_ops)(struct bpf_sock_ops_kern *); 111919 111920 typedef u64 (*btf_bpf_get_netns_cookie_sock)(struct sock *); 111921 111922 typedef u64 (*btf_bpf_get_netns_cookie_sock_addr)(struct bpf_sock_addr_kern *); 111923 111924 typedef u64 (*btf_bpf_get_socket_uid)(struct sk_buff *); 111925 111926 typedef u64 (*btf_bpf_sock_addr_setsockopt)(struct bpf_sock_addr_kern *, int, int, char *, int); 111927 111928 typedef u64 (*btf_bpf_sock_addr_getsockopt)(struct bpf_sock_addr_kern *, int, int, char *, int); 111929 111930 typedef u64 (*btf_bpf_sock_ops_setsockopt)(struct bpf_sock_ops_kern *, int, int, char *, int); 111931 111932 typedef u64 (*btf_bpf_sock_ops_getsockopt)(struct bpf_sock_ops_kern *, int, int, char *, int); 111933 111934 typedef u64 (*btf_bpf_sock_ops_cb_flags_set)(struct bpf_sock_ops_kern *, int); 111935 111936 typedef u64 (*btf_bpf_bind)(struct bpf_sock_addr_kern *, struct sockaddr *, int); 111937 111938 typedef u64 (*btf_bpf_skb_get_xfrm_state)(struct sk_buff *, u32, struct bpf_xfrm_state *, u32, u64); 111939 111940 typedef u64 (*btf_bpf_xdp_fib_lookup)(struct xdp_buff *, struct bpf_fib_lookup *, int, u32); 111941 111942 typedef u64 (*btf_bpf_skb_fib_lookup)(struct sk_buff *, struct bpf_fib_lookup *, int, u32); 111943 111944 typedef u64 (*btf_bpf_lwt_in_push_encap)(struct sk_buff *, u32, void *, u32); 111945 111946 typedef u64 (*btf_bpf_lwt_xmit_push_encap)(struct sk_buff *, u32, void *, u32); 111947 111948 typedef u64 (*btf_bpf_lwt_seg6_store_bytes)(struct sk_buff *, u32, const void *, u32); 111949 111950 typedef u64 (*btf_bpf_lwt_seg6_action)(struct sk_buff *, u32, void *, u32); 111951 111952 typedef u64 (*btf_bpf_lwt_seg6_adjust_srh)(struct sk_buff *, u32, s32); 111953 111954 typedef u64 (*btf_bpf_skc_lookup_tcp)(struct sk_buff *, struct bpf_sock_tuple *, u32, u64, u64); 111955 111956 typedef u64 (*btf_bpf_sk_lookup_tcp)(struct sk_buff *, struct bpf_sock_tuple *, u32, u64, u64); 111957 111958 typedef u64 (*btf_bpf_sk_lookup_udp)(struct sk_buff *, struct bpf_sock_tuple *, u32, u64, u64); 111959 111960 typedef u64 (*btf_bpf_sk_release)(struct sock *); 111961 111962 typedef u64 (*btf_bpf_xdp_sk_lookup_udp)(struct xdp_buff *, struct bpf_sock_tuple *, u32, u32, u64); 111963 111964 typedef u64 (*btf_bpf_xdp_skc_lookup_tcp)(struct xdp_buff *, struct bpf_sock_tuple *, u32, u32, u64); 111965 111966 typedef u64 (*btf_bpf_xdp_sk_lookup_tcp)(struct xdp_buff *, struct bpf_sock_tuple *, u32, u32, u64); 111967 111968 typedef u64 (*btf_bpf_sock_addr_skc_lookup_tcp)(struct bpf_sock_addr_kern *, struct bpf_sock_tuple *, u32, u64, u64); 111969 111970 typedef u64 (*btf_bpf_sock_addr_sk_lookup_tcp)(struct bpf_sock_addr_kern *, struct bpf_sock_tuple *, u32, u64, u64); 111971 111972 typedef u64 (*btf_bpf_sock_addr_sk_lookup_udp)(struct bpf_sock_addr_kern *, struct bpf_sock_tuple *, u32, u64, u64); 111973 111974 typedef u64 (*btf_bpf_tcp_sock)(struct sock *); 111975 111976 typedef u64 (*btf_bpf_get_listener_sock)(struct sock *); 111977 111978 typedef u64 (*btf_bpf_skb_ecn_set_ce)(struct sk_buff *); 111979 111980 typedef u64 (*btf_bpf_tcp_check_syncookie)(struct sock *, void *, u32, struct tcphdr *, u32); 111981 111982 typedef u64 (*btf_bpf_tcp_gen_syncookie)(struct sock *, void *, u32, struct tcphdr *, u32); 111983 111984 typedef u64 (*btf_bpf_sk_assign)(struct sk_buff *, struct sock *, u64); 111985 111986 typedef u64 (*btf_bpf_sock_ops_load_hdr_opt)(struct bpf_sock_ops_kern *, void *, u32, u64); 111987 111988 typedef u64 (*btf_bpf_sock_ops_store_hdr_opt)(struct bpf_sock_ops_kern *, const void *, u32, u64); 111989 111990 typedef u64 (*btf_bpf_sock_ops_reserve_hdr_opt)(struct bpf_sock_ops_kern *, u32, u64); 111991 111992 typedef u64 (*btf_sk_select_reuseport)(struct sk_reuseport_kern *, struct bpf_map *, void *, u32); 111993 111994 typedef u64 (*btf_sk_reuseport_load_bytes)(const struct sk_reuseport_kern *, u32, void *, u32); 111995 111996 typedef u64 (*btf_sk_reuseport_load_bytes_relative)(const struct sk_reuseport_kern *, u32, void *, u32, u32); 111997 111998 typedef u64 (*btf_bpf_sk_lookup_assign)(struct bpf_sk_lookup_kern *, struct sock *, u64); 111999 112000 typedef u64 (*btf_bpf_skc_to_tcp6_sock)(struct sock *); 112001 112002 typedef u64 (*btf_bpf_skc_to_tcp_sock)(struct sock *); 112003 112004 typedef u64 (*btf_bpf_skc_to_tcp_timewait_sock)(struct sock *); 112005 112006 typedef u64 (*btf_bpf_skc_to_tcp_request_sock)(struct sock *); 112007 112008 typedef u64 (*btf_bpf_skc_to_udp6_sock)(struct sock *); 112009 112010 typedef u64 (*btf_bpf_sock_from_file)(struct file *); 112011 112012 struct bpf_cpu_map_entry___2; 112013 112014 struct bpf_dtab_netdev___2; 112015 112016 enum { 112017 INET_DIAG_REQ_NONE = 0, 112018 INET_DIAG_REQ_BYTECODE = 1, 112019 INET_DIAG_REQ_SK_BPF_STORAGES = 2, 112020 INET_DIAG_REQ_PROTOCOL = 3, 112021 __INET_DIAG_REQ_MAX = 4, 112022 }; 112023 112024 struct sock_diag_req { 112025 __u8 sdiag_family; 112026 __u8 sdiag_protocol; 112027 }; 112028 112029 struct sock_diag_handler { 112030 __u8 family; 112031 int (*dump)(struct sk_buff *, struct nlmsghdr *); 112032 int (*get_info)(struct sk_buff *, struct sock *); 112033 int (*destroy)(struct sk_buff *, struct nlmsghdr *); 112034 }; 112035 112036 struct broadcast_sk { 112037 struct sock *sk; 112038 struct work_struct work; 112039 }; 112040 112041 typedef int gifconf_func_t(struct net_device *, char *, int, int); 112042 112043 struct hwtstamp_config { 112044 int flags; 112045 int tx_type; 112046 int rx_filter; 112047 }; 112048 112049 enum hwtstamp_tx_types { 112050 HWTSTAMP_TX_OFF = 0, 112051 HWTSTAMP_TX_ON = 1, 112052 HWTSTAMP_TX_ONESTEP_SYNC = 2, 112053 HWTSTAMP_TX_ONESTEP_P2P = 3, 112054 __HWTSTAMP_TX_CNT = 4, 112055 }; 112056 112057 enum hwtstamp_rx_filters { 112058 HWTSTAMP_FILTER_NONE = 0, 112059 HWTSTAMP_FILTER_ALL = 1, 112060 HWTSTAMP_FILTER_SOME = 2, 112061 HWTSTAMP_FILTER_PTP_V1_L4_EVENT = 3, 112062 HWTSTAMP_FILTER_PTP_V1_L4_SYNC = 4, 112063 HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ = 5, 112064 HWTSTAMP_FILTER_PTP_V2_L4_EVENT = 6, 112065 HWTSTAMP_FILTER_PTP_V2_L4_SYNC = 7, 112066 HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ = 8, 112067 HWTSTAMP_FILTER_PTP_V2_L2_EVENT = 9, 112068 HWTSTAMP_FILTER_PTP_V2_L2_SYNC = 10, 112069 HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ = 11, 112070 HWTSTAMP_FILTER_PTP_V2_EVENT = 12, 112071 HWTSTAMP_FILTER_PTP_V2_SYNC = 13, 112072 HWTSTAMP_FILTER_PTP_V2_DELAY_REQ = 14, 112073 HWTSTAMP_FILTER_NTP_ALL = 15, 112074 __HWTSTAMP_FILTER_CNT = 16, 112075 }; 112076 112077 struct tso_t { 112078 int next_frag_idx; 112079 int size; 112080 void *data; 112081 u16 ip_id; 112082 u8 tlen; 112083 bool ipv6; 112084 u32 tcp_seq; 112085 }; 112086 112087 struct fib_notifier_info { 112088 int family; 112089 struct netlink_ext_ack *extack; 112090 }; 112091 112092 enum fib_event_type { 112093 FIB_EVENT_ENTRY_REPLACE = 0, 112094 FIB_EVENT_ENTRY_APPEND = 1, 112095 FIB_EVENT_ENTRY_ADD = 2, 112096 FIB_EVENT_ENTRY_DEL = 3, 112097 FIB_EVENT_RULE_ADD = 4, 112098 FIB_EVENT_RULE_DEL = 5, 112099 FIB_EVENT_NH_ADD = 6, 112100 FIB_EVENT_NH_DEL = 7, 112101 FIB_EVENT_VIF_ADD = 8, 112102 FIB_EVENT_VIF_DEL = 9, 112103 }; 112104 112105 struct fib_notifier_net { 112106 struct list_head fib_notifier_ops; 112107 struct atomic_notifier_head fib_chain; 112108 }; 112109 112110 struct xdp_frame_bulk { 112111 int count; 112112 void *xa; 112113 void *q[16]; 112114 }; 112115 112116 struct xdp_attachment_info { 112117 struct bpf_prog *prog; 112118 u32 flags; 112119 }; 112120 112121 struct xdp_buff_xsk; 112122 112123 struct xsk_buff_pool { 112124 struct device *dev; 112125 struct net_device *netdev; 112126 struct list_head xsk_tx_list; 112127 spinlock_t xsk_tx_list_lock; 112128 refcount_t users; 112129 struct xdp_umem *umem; 112130 struct work_struct work; 112131 struct list_head free_list; 112132 u32 heads_cnt; 112133 u16 queue_id; 112134 long: 16; 112135 long: 64; 112136 long: 64; 112137 long: 64; 112138 struct xsk_queue *fq; 112139 struct xsk_queue *cq; 112140 dma_addr_t *dma_pages; 112141 struct xdp_buff_xsk *heads; 112142 u64 chunk_mask; 112143 u64 addrs_cnt; 112144 u32 free_list_cnt; 112145 u32 dma_pages_cnt; 112146 u32 free_heads_cnt; 112147 u32 headroom; 112148 u32 chunk_size; 112149 u32 frame_len; 112150 u8 cached_need_wakeup; 112151 bool uses_need_wakeup; 112152 bool dma_need_sync; 112153 bool unaligned; 112154 void *addrs; 112155 spinlock_t cq_lock; 112156 struct xdp_buff_xsk *free_heads[0]; 112157 long: 64; 112158 long: 64; 112159 long: 64; 112160 long: 64; 112161 }; 112162 112163 struct pp_alloc_cache { 112164 u32 count; 112165 void *cache[128]; 112166 }; 112167 112168 struct page_pool_params { 112169 unsigned int flags; 112170 unsigned int order; 112171 unsigned int pool_size; 112172 int nid; 112173 struct device *dev; 112174 enum dma_data_direction dma_dir; 112175 unsigned int max_len; 112176 unsigned int offset; 112177 }; 112178 112179 struct page_pool { 112180 struct page_pool_params p; 112181 struct delayed_work release_dw; 112182 void (*disconnect)(void *); 112183 long unsigned int defer_start; 112184 long unsigned int defer_warn; 112185 u32 pages_state_hold_cnt; 112186 long: 32; 112187 long: 64; 112188 long: 64; 112189 long: 64; 112190 long: 64; 112191 struct pp_alloc_cache alloc; 112192 long: 64; 112193 long: 64; 112194 long: 64; 112195 long: 64; 112196 long: 64; 112197 long: 64; 112198 long: 64; 112199 struct ptr_ring ring; 112200 atomic_t pages_state_release_cnt; 112201 refcount_t user_cnt; 112202 u64 destroy_cnt; 112203 long: 64; 112204 long: 64; 112205 long: 64; 112206 long: 64; 112207 long: 64; 112208 long: 64; 112209 }; 112210 112211 struct xdp_buff_xsk { 112212 struct xdp_buff xdp; 112213 dma_addr_t dma; 112214 dma_addr_t frame_dma; 112215 struct xsk_buff_pool *pool; 112216 bool unaligned; 112217 u64 orig_addr; 112218 struct list_head free_list_node; 112219 }; 112220 112221 struct flow_match_meta { 112222 struct flow_dissector_key_meta *key; 112223 struct flow_dissector_key_meta *mask; 112224 }; 112225 112226 struct flow_match_basic { 112227 struct flow_dissector_key_basic *key; 112228 struct flow_dissector_key_basic *mask; 112229 }; 112230 112231 struct flow_match_control { 112232 struct flow_dissector_key_control *key; 112233 struct flow_dissector_key_control *mask; 112234 }; 112235 112236 struct flow_match_eth_addrs { 112237 struct flow_dissector_key_eth_addrs *key; 112238 struct flow_dissector_key_eth_addrs *mask; 112239 }; 112240 112241 struct flow_match_vlan { 112242 struct flow_dissector_key_vlan *key; 112243 struct flow_dissector_key_vlan *mask; 112244 }; 112245 112246 struct flow_match_ipv4_addrs { 112247 struct flow_dissector_key_ipv4_addrs *key; 112248 struct flow_dissector_key_ipv4_addrs *mask; 112249 }; 112250 112251 struct flow_match_ipv6_addrs { 112252 struct flow_dissector_key_ipv6_addrs *key; 112253 struct flow_dissector_key_ipv6_addrs *mask; 112254 }; 112255 112256 struct flow_match_ip { 112257 struct flow_dissector_key_ip *key; 112258 struct flow_dissector_key_ip *mask; 112259 }; 112260 112261 struct flow_match_ports { 112262 struct flow_dissector_key_ports *key; 112263 struct flow_dissector_key_ports *mask; 112264 }; 112265 112266 struct flow_match_icmp { 112267 struct flow_dissector_key_icmp *key; 112268 struct flow_dissector_key_icmp *mask; 112269 }; 112270 112271 struct flow_match_tcp { 112272 struct flow_dissector_key_tcp *key; 112273 struct flow_dissector_key_tcp *mask; 112274 }; 112275 112276 struct flow_match_mpls { 112277 struct flow_dissector_key_mpls *key; 112278 struct flow_dissector_key_mpls *mask; 112279 }; 112280 112281 struct flow_match_enc_keyid { 112282 struct flow_dissector_key_keyid *key; 112283 struct flow_dissector_key_keyid *mask; 112284 }; 112285 112286 struct flow_match_enc_opts { 112287 struct flow_dissector_key_enc_opts *key; 112288 struct flow_dissector_key_enc_opts *mask; 112289 }; 112290 112291 struct flow_match_ct { 112292 struct flow_dissector_key_ct *key; 112293 struct flow_dissector_key_ct *mask; 112294 }; 112295 112296 enum flow_block_command { 112297 FLOW_BLOCK_BIND = 0, 112298 FLOW_BLOCK_UNBIND = 1, 112299 }; 112300 112301 enum flow_block_binder_type { 112302 FLOW_BLOCK_BINDER_TYPE_UNSPEC = 0, 112303 FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS = 1, 112304 FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS = 2, 112305 FLOW_BLOCK_BINDER_TYPE_RED_EARLY_DROP = 3, 112306 FLOW_BLOCK_BINDER_TYPE_RED_MARK = 4, 112307 }; 112308 112309 struct flow_block_offload { 112310 enum flow_block_command command; 112311 enum flow_block_binder_type binder_type; 112312 bool block_shared; 112313 bool unlocked_driver_cb; 112314 struct net *net; 112315 struct flow_block *block; 112316 struct list_head cb_list; 112317 struct list_head *driver_block_list; 112318 struct netlink_ext_ack *extack; 112319 struct Qdisc *sch; 112320 }; 112321 112322 struct flow_block_cb; 112323 112324 struct flow_block_indr { 112325 struct list_head list; 112326 struct net_device *dev; 112327 struct Qdisc *sch; 112328 enum flow_block_binder_type binder_type; 112329 void *data; 112330 void *cb_priv; 112331 void (*cleanup)(struct flow_block_cb *); 112332 }; 112333 112334 struct flow_block_cb { 112335 struct list_head driver_list; 112336 struct list_head list; 112337 flow_setup_cb_t *cb; 112338 void *cb_ident; 112339 void *cb_priv; 112340 void (*release)(void *); 112341 struct flow_block_indr indr; 112342 unsigned int refcnt; 112343 }; 112344 112345 typedef int flow_indr_block_bind_cb_t(struct net_device *, struct Qdisc *, void *, enum tc_setup_type, void *, void *, void (*)(struct flow_block_cb *)); 112346 112347 struct flow_indr_dev { 112348 struct list_head list; 112349 flow_indr_block_bind_cb_t *cb; 112350 void *cb_priv; 112351 refcount_t refcnt; 112352 struct callback_head rcu; 112353 }; 112354 112355 struct rx_queue_attribute { 112356 struct attribute attr; 112357 ssize_t (*show)(struct netdev_rx_queue *, char *); 112358 ssize_t (*store)(struct netdev_rx_queue *, const char *, size_t); 112359 }; 112360 112361 struct netdev_queue_attribute { 112362 struct attribute attr; 112363 ssize_t (*show)(struct netdev_queue *, char *); 112364 ssize_t (*store)(struct netdev_queue *, const char *, size_t); 112365 }; 112366 112367 enum __sk_action { 112368 __SK_DROP = 0, 112369 __SK_PASS = 1, 112370 __SK_REDIRECT = 2, 112371 __SK_NONE = 3, 112372 }; 112373 112374 struct sk_psock_progs { 112375 struct bpf_prog *msg_parser; 112376 struct bpf_prog *skb_parser; 112377 struct bpf_prog *skb_verdict; 112378 }; 112379 112380 enum sk_psock_state_bits { 112381 SK_PSOCK_TX_ENABLED = 0, 112382 }; 112383 112384 struct sk_psock_link { 112385 struct list_head list; 112386 struct bpf_map *map; 112387 void *link_raw; 112388 }; 112389 112390 struct sk_psock_parser { 112391 struct strparser strp; 112392 bool enabled; 112393 void (*saved_data_ready)(struct sock *); 112394 }; 112395 112396 struct sk_psock_work_state { 112397 struct sk_buff *skb; 112398 u32 len; 112399 u32 off; 112400 }; 112401 112402 struct sk_psock { 112403 struct sock *sk; 112404 struct sock *sk_redir; 112405 u32 apply_bytes; 112406 u32 cork_bytes; 112407 u32 eval; 112408 struct sk_msg *cork; 112409 struct sk_psock_progs progs; 112410 struct sk_psock_parser parser; 112411 struct sk_buff_head ingress_skb; 112412 struct list_head ingress_msg; 112413 long unsigned int state; 112414 struct list_head link; 112415 spinlock_t link_lock; 112416 refcount_t refcnt; 112417 void (*saved_unhash)(struct sock *); 112418 void (*saved_close)(struct sock *, long int); 112419 void (*saved_write_space)(struct sock *); 112420 struct proto *sk_proto; 112421 struct sk_psock_work_state work_state; 112422 struct work_struct work; 112423 union { 112424 struct callback_head rcu; 112425 struct work_struct gc; 112426 }; 112427 }; 112428 112429 struct inet6_ifaddr { 112430 struct in6_addr addr; 112431 __u32 prefix_len; 112432 __u32 rt_priority; 112433 __u32 valid_lft; 112434 __u32 prefered_lft; 112435 refcount_t refcnt; 112436 spinlock_t lock; 112437 int state; 112438 __u32 flags; 112439 __u8 dad_probes; 112440 __u8 stable_privacy_retry; 112441 __u16 scope; 112442 __u64 dad_nonce; 112443 long unsigned int cstamp; 112444 long unsigned int tstamp; 112445 struct delayed_work dad_work; 112446 struct inet6_dev *idev; 112447 struct fib6_info *rt; 112448 struct hlist_node addr_lst; 112449 struct list_head if_list; 112450 struct list_head tmp_list; 112451 struct inet6_ifaddr *ifpub; 112452 int regen_count; 112453 bool tokenized; 112454 struct callback_head rcu; 112455 struct in6_addr peer_addr; 112456 }; 112457 112458 struct fib_rule_uid_range { 112459 __u32 start; 112460 __u32 end; 112461 }; 112462 112463 enum { 112464 FRA_UNSPEC = 0, 112465 FRA_DST = 1, 112466 FRA_SRC = 2, 112467 FRA_IIFNAME = 3, 112468 FRA_GOTO = 4, 112469 FRA_UNUSED2 = 5, 112470 FRA_PRIORITY = 6, 112471 FRA_UNUSED3 = 7, 112472 FRA_UNUSED4 = 8, 112473 FRA_UNUSED5 = 9, 112474 FRA_FWMARK = 10, 112475 FRA_FLOW = 11, 112476 FRA_TUN_ID = 12, 112477 FRA_SUPPRESS_IFGROUP = 13, 112478 FRA_SUPPRESS_PREFIXLEN = 14, 112479 FRA_TABLE = 15, 112480 FRA_FWMASK = 16, 112481 FRA_OIFNAME = 17, 112482 FRA_PAD = 18, 112483 FRA_L3MDEV = 19, 112484 FRA_UID_RANGE = 20, 112485 FRA_PROTOCOL = 21, 112486 FRA_IP_PROTO = 22, 112487 FRA_SPORT_RANGE = 23, 112488 FRA_DPORT_RANGE = 24, 112489 __FRA_MAX = 25, 112490 }; 112491 112492 enum { 112493 FR_ACT_UNSPEC = 0, 112494 FR_ACT_TO_TBL = 1, 112495 FR_ACT_GOTO = 2, 112496 FR_ACT_NOP = 3, 112497 FR_ACT_RES3 = 4, 112498 FR_ACT_RES4 = 5, 112499 FR_ACT_BLACKHOLE = 6, 112500 FR_ACT_UNREACHABLE = 7, 112501 FR_ACT_PROHIBIT = 8, 112502 __FR_ACT_MAX = 9, 112503 }; 112504 112505 struct fib_rule_notifier_info { 112506 struct fib_notifier_info info; 112507 struct fib_rule *rule; 112508 }; 112509 112510 struct trace_event_raw_kfree_skb { 112511 struct trace_entry ent; 112512 void *skbaddr; 112513 void *location; 112514 short unsigned int protocol; 112515 char __data[0]; 112516 }; 112517 112518 struct trace_event_raw_consume_skb { 112519 struct trace_entry ent; 112520 void *skbaddr; 112521 char __data[0]; 112522 }; 112523 112524 struct trace_event_raw_skb_copy_datagram_iovec { 112525 struct trace_entry ent; 112526 const void *skbaddr; 112527 int len; 112528 char __data[0]; 112529 }; 112530 112531 struct trace_event_data_offsets_kfree_skb {}; 112532 112533 struct trace_event_data_offsets_consume_skb {}; 112534 112535 struct trace_event_data_offsets_skb_copy_datagram_iovec {}; 112536 112537 typedef void (*btf_trace_kfree_skb)(void *, struct sk_buff *, void *); 112538 112539 typedef void (*btf_trace_consume_skb)(void *, struct sk_buff *); 112540 112541 typedef void (*btf_trace_skb_copy_datagram_iovec)(void *, const struct sk_buff *, int); 112542 112543 struct trace_event_raw_net_dev_start_xmit { 112544 struct trace_entry ent; 112545 u32 __data_loc_name; 112546 u16 queue_mapping; 112547 const void *skbaddr; 112548 bool vlan_tagged; 112549 u16 vlan_proto; 112550 u16 vlan_tci; 112551 u16 protocol; 112552 u8 ip_summed; 112553 unsigned int len; 112554 unsigned int data_len; 112555 int network_offset; 112556 bool transport_offset_valid; 112557 int transport_offset; 112558 u8 tx_flags; 112559 u16 gso_size; 112560 u16 gso_segs; 112561 u16 gso_type; 112562 char __data[0]; 112563 }; 112564 112565 struct trace_event_raw_net_dev_xmit { 112566 struct trace_entry ent; 112567 void *skbaddr; 112568 unsigned int len; 112569 int rc; 112570 u32 __data_loc_name; 112571 char __data[0]; 112572 }; 112573 112574 struct trace_event_raw_net_dev_xmit_timeout { 112575 struct trace_entry ent; 112576 u32 __data_loc_name; 112577 u32 __data_loc_driver; 112578 int queue_index; 112579 char __data[0]; 112580 }; 112581 112582 struct trace_event_raw_net_dev_template { 112583 struct trace_entry ent; 112584 void *skbaddr; 112585 unsigned int len; 112586 u32 __data_loc_name; 112587 char __data[0]; 112588 }; 112589 112590 struct trace_event_raw_net_dev_rx_verbose_template { 112591 struct trace_entry ent; 112592 u32 __data_loc_name; 112593 unsigned int napi_id; 112594 u16 queue_mapping; 112595 const void *skbaddr; 112596 bool vlan_tagged; 112597 u16 vlan_proto; 112598 u16 vlan_tci; 112599 u16 protocol; 112600 u8 ip_summed; 112601 u32 hash; 112602 bool l4_hash; 112603 unsigned int len; 112604 unsigned int data_len; 112605 unsigned int truesize; 112606 bool mac_header_valid; 112607 int mac_header; 112608 unsigned char nr_frags; 112609 u16 gso_size; 112610 u16 gso_type; 112611 char __data[0]; 112612 }; 112613 112614 struct trace_event_raw_net_dev_rx_exit_template { 112615 struct trace_entry ent; 112616 int ret; 112617 char __data[0]; 112618 }; 112619 112620 struct trace_event_data_offsets_net_dev_start_xmit { 112621 u32 name; 112622 }; 112623 112624 struct trace_event_data_offsets_net_dev_xmit { 112625 u32 name; 112626 }; 112627 112628 struct trace_event_data_offsets_net_dev_xmit_timeout { 112629 u32 name; 112630 u32 driver; 112631 }; 112632 112633 struct trace_event_data_offsets_net_dev_template { 112634 u32 name; 112635 }; 112636 112637 struct trace_event_data_offsets_net_dev_rx_verbose_template { 112638 u32 name; 112639 }; 112640 112641 struct trace_event_data_offsets_net_dev_rx_exit_template {}; 112642 112643 typedef void (*btf_trace_net_dev_start_xmit)(void *, const struct sk_buff *, const struct net_device *); 112644 112645 typedef void (*btf_trace_net_dev_xmit)(void *, struct sk_buff *, int, struct net_device *, unsigned int); 112646 112647 typedef void (*btf_trace_net_dev_xmit_timeout)(void *, struct net_device *, int); 112648 112649 typedef void (*btf_trace_net_dev_queue)(void *, struct sk_buff *); 112650 112651 typedef void (*btf_trace_netif_receive_skb)(void *, struct sk_buff *); 112652 112653 typedef void (*btf_trace_netif_rx)(void *, struct sk_buff *); 112654 112655 typedef void (*btf_trace_napi_gro_frags_entry)(void *, const struct sk_buff *); 112656 112657 typedef void (*btf_trace_napi_gro_receive_entry)(void *, const struct sk_buff *); 112658 112659 typedef void (*btf_trace_netif_receive_skb_entry)(void *, const struct sk_buff *); 112660 112661 typedef void (*btf_trace_netif_receive_skb_list_entry)(void *, const struct sk_buff *); 112662 112663 typedef void (*btf_trace_netif_rx_entry)(void *, const struct sk_buff *); 112664 112665 typedef void (*btf_trace_netif_rx_ni_entry)(void *, const struct sk_buff *); 112666 112667 typedef void (*btf_trace_napi_gro_frags_exit)(void *, int); 112668 112669 typedef void (*btf_trace_napi_gro_receive_exit)(void *, int); 112670 112671 typedef void (*btf_trace_netif_receive_skb_exit)(void *, int); 112672 112673 typedef void (*btf_trace_netif_rx_exit)(void *, int); 112674 112675 typedef void (*btf_trace_netif_rx_ni_exit)(void *, int); 112676 112677 typedef void (*btf_trace_netif_receive_skb_list_exit)(void *, int); 112678 112679 struct trace_event_raw_napi_poll { 112680 struct trace_entry ent; 112681 struct napi_struct *napi; 112682 u32 __data_loc_dev_name; 112683 int work; 112684 int budget; 112685 char __data[0]; 112686 }; 112687 112688 struct trace_event_data_offsets_napi_poll { 112689 u32 dev_name; 112690 }; 112691 112692 typedef void (*btf_trace_napi_poll)(void *, struct napi_struct *, int, int); 112693 112694 enum tcp_ca_state { 112695 TCP_CA_Open = 0, 112696 TCP_CA_Disorder = 1, 112697 TCP_CA_CWR = 2, 112698 TCP_CA_Recovery = 3, 112699 TCP_CA_Loss = 4, 112700 }; 112701 112702 struct trace_event_raw_sock_rcvqueue_full { 112703 struct trace_entry ent; 112704 int rmem_alloc; 112705 unsigned int truesize; 112706 int sk_rcvbuf; 112707 char __data[0]; 112708 }; 112709 112710 struct trace_event_raw_sock_exceed_buf_limit { 112711 struct trace_entry ent; 112712 char name[32]; 112713 long int *sysctl_mem; 112714 long int allocated; 112715 int sysctl_rmem; 112716 int rmem_alloc; 112717 int sysctl_wmem; 112718 int wmem_alloc; 112719 int wmem_queued; 112720 int kind; 112721 char __data[0]; 112722 }; 112723 112724 struct trace_event_raw_inet_sock_set_state { 112725 struct trace_entry ent; 112726 const void *skaddr; 112727 int oldstate; 112728 int newstate; 112729 __u16 sport; 112730 __u16 dport; 112731 __u16 family; 112732 __u16 protocol; 112733 __u8 saddr[4]; 112734 __u8 daddr[4]; 112735 __u8 saddr_v6[16]; 112736 __u8 daddr_v6[16]; 112737 char __data[0]; 112738 }; 112739 112740 struct trace_event_data_offsets_sock_rcvqueue_full {}; 112741 112742 struct trace_event_data_offsets_sock_exceed_buf_limit {}; 112743 112744 struct trace_event_data_offsets_inet_sock_set_state {}; 112745 112746 typedef void (*btf_trace_sock_rcvqueue_full)(void *, struct sock *, struct sk_buff *); 112747 112748 typedef void (*btf_trace_sock_exceed_buf_limit)(void *, struct sock *, struct proto *, long int, int); 112749 112750 typedef void (*btf_trace_inet_sock_set_state)(void *, const struct sock *, const int, const int); 112751 112752 struct trace_event_raw_udp_fail_queue_rcv_skb { 112753 struct trace_entry ent; 112754 int rc; 112755 __u16 lport; 112756 char __data[0]; 112757 }; 112758 112759 struct trace_event_data_offsets_udp_fail_queue_rcv_skb {}; 112760 112761 typedef void (*btf_trace_udp_fail_queue_rcv_skb)(void *, int, struct sock *); 112762 112763 struct trace_event_raw_tcp_event_sk_skb { 112764 struct trace_entry ent; 112765 const void *skbaddr; 112766 const void *skaddr; 112767 int state; 112768 __u16 sport; 112769 __u16 dport; 112770 __u8 saddr[4]; 112771 __u8 daddr[4]; 112772 __u8 saddr_v6[16]; 112773 __u8 daddr_v6[16]; 112774 char __data[0]; 112775 }; 112776 112777 struct trace_event_raw_tcp_event_sk { 112778 struct trace_entry ent; 112779 const void *skaddr; 112780 __u16 sport; 112781 __u16 dport; 112782 __u8 saddr[4]; 112783 __u8 daddr[4]; 112784 __u8 saddr_v6[16]; 112785 __u8 daddr_v6[16]; 112786 __u64 sock_cookie; 112787 char __data[0]; 112788 }; 112789 112790 struct trace_event_raw_tcp_retransmit_synack { 112791 struct trace_entry ent; 112792 const void *skaddr; 112793 const void *req; 112794 __u16 sport; 112795 __u16 dport; 112796 __u8 saddr[4]; 112797 __u8 daddr[4]; 112798 __u8 saddr_v6[16]; 112799 __u8 daddr_v6[16]; 112800 char __data[0]; 112801 }; 112802 112803 struct trace_event_raw_tcp_probe { 112804 struct trace_entry ent; 112805 __u8 saddr[28]; 112806 __u8 daddr[28]; 112807 __u16 sport; 112808 __u16 dport; 112809 __u32 mark; 112810 __u16 data_len; 112811 __u32 snd_nxt; 112812 __u32 snd_una; 112813 __u32 snd_cwnd; 112814 __u32 ssthresh; 112815 __u32 snd_wnd; 112816 __u32 srtt; 112817 __u32 rcv_wnd; 112818 __u64 sock_cookie; 112819 char __data[0]; 112820 }; 112821 112822 struct trace_event_data_offsets_tcp_event_sk_skb {}; 112823 112824 struct trace_event_data_offsets_tcp_event_sk {}; 112825 112826 struct trace_event_data_offsets_tcp_retransmit_synack {}; 112827 112828 struct trace_event_data_offsets_tcp_probe {}; 112829 112830 typedef void (*btf_trace_tcp_retransmit_skb)(void *, const struct sock *, const struct sk_buff *); 112831 112832 typedef void (*btf_trace_tcp_send_reset)(void *, const struct sock *, const struct sk_buff *); 112833 112834 typedef void (*btf_trace_tcp_receive_reset)(void *, struct sock *); 112835 112836 typedef void (*btf_trace_tcp_destroy_sock)(void *, struct sock *); 112837 112838 typedef void (*btf_trace_tcp_rcv_space_adjust)(void *, struct sock *); 112839 112840 typedef void (*btf_trace_tcp_retransmit_synack)(void *, const struct sock *, const struct request_sock *); 112841 112842 typedef void (*btf_trace_tcp_probe)(void *, struct sock *, struct sk_buff *); 112843 112844 struct trace_event_raw_fib_table_lookup { 112845 struct trace_entry ent; 112846 u32 tb_id; 112847 int err; 112848 int oif; 112849 int iif; 112850 u8 proto; 112851 __u8 tos; 112852 __u8 scope; 112853 __u8 flags; 112854 __u8 src[4]; 112855 __u8 dst[4]; 112856 __u8 gw4[4]; 112857 __u8 gw6[16]; 112858 u16 sport; 112859 u16 dport; 112860 u32 __data_loc_name; 112861 char __data[0]; 112862 }; 112863 112864 struct trace_event_data_offsets_fib_table_lookup { 112865 u32 name; 112866 }; 112867 112868 typedef void (*btf_trace_fib_table_lookup)(void *, u32, const struct flowi4 *, const struct fib_nh_common *, int); 112869 112870 struct trace_event_raw_qdisc_dequeue { 112871 struct trace_entry ent; 112872 struct Qdisc *qdisc; 112873 const struct netdev_queue *txq; 112874 int packets; 112875 void *skbaddr; 112876 int ifindex; 112877 u32 handle; 112878 u32 parent; 112879 long unsigned int txq_state; 112880 char __data[0]; 112881 }; 112882 112883 struct trace_event_raw_qdisc_reset { 112884 struct trace_entry ent; 112885 u32 __data_loc_dev; 112886 u32 __data_loc_kind; 112887 u32 parent; 112888 u32 handle; 112889 char __data[0]; 112890 }; 112891 112892 struct trace_event_raw_qdisc_destroy { 112893 struct trace_entry ent; 112894 u32 __data_loc_dev; 112895 u32 __data_loc_kind; 112896 u32 parent; 112897 u32 handle; 112898 char __data[0]; 112899 }; 112900 112901 struct trace_event_raw_qdisc_create { 112902 struct trace_entry ent; 112903 u32 __data_loc_dev; 112904 u32 __data_loc_kind; 112905 u32 parent; 112906 char __data[0]; 112907 }; 112908 112909 struct trace_event_data_offsets_qdisc_dequeue {}; 112910 112911 struct trace_event_data_offsets_qdisc_reset { 112912 u32 dev; 112913 u32 kind; 112914 }; 112915 112916 struct trace_event_data_offsets_qdisc_destroy { 112917 u32 dev; 112918 u32 kind; 112919 }; 112920 112921 struct trace_event_data_offsets_qdisc_create { 112922 u32 dev; 112923 u32 kind; 112924 }; 112925 112926 typedef void (*btf_trace_qdisc_dequeue)(void *, struct Qdisc *, const struct netdev_queue *, int, struct sk_buff *); 112927 112928 typedef void (*btf_trace_qdisc_reset)(void *, struct Qdisc *); 112929 112930 typedef void (*btf_trace_qdisc_destroy)(void *, struct Qdisc *); 112931 112932 typedef void (*btf_trace_qdisc_create)(void *, const struct Qdisc_ops *, struct net_device *, u32); 112933 112934 struct bridge_stp_xstats { 112935 __u64 transition_blk; 112936 __u64 transition_fwd; 112937 __u64 rx_bpdu; 112938 __u64 tx_bpdu; 112939 __u64 rx_tcn; 112940 __u64 tx_tcn; 112941 }; 112942 112943 struct br_mcast_stats { 112944 __u64 igmp_v1queries[2]; 112945 __u64 igmp_v2queries[2]; 112946 __u64 igmp_v3queries[2]; 112947 __u64 igmp_leaves[2]; 112948 __u64 igmp_v1reports[2]; 112949 __u64 igmp_v2reports[2]; 112950 __u64 igmp_v3reports[2]; 112951 __u64 igmp_parse_errors; 112952 __u64 mld_v1queries[2]; 112953 __u64 mld_v2queries[2]; 112954 __u64 mld_leaves[2]; 112955 __u64 mld_v1reports[2]; 112956 __u64 mld_v2reports[2]; 112957 __u64 mld_parse_errors; 112958 __u64 mcast_bytes[2]; 112959 __u64 mcast_packets[2]; 112960 }; 112961 112962 struct br_ip { 112963 union { 112964 __be32 ip4; 112965 struct in6_addr ip6; 112966 } src; 112967 union { 112968 __be32 ip4; 112969 struct in6_addr ip6; 112970 unsigned char mac_addr[6]; 112971 } dst; 112972 __be16 proto; 112973 __u16 vid; 112974 }; 112975 112976 struct bridge_id { 112977 unsigned char prio[2]; 112978 unsigned char addr[6]; 112979 }; 112980 112981 typedef struct bridge_id bridge_id; 112982 112983 struct mac_addr { 112984 unsigned char addr[6]; 112985 }; 112986 112987 typedef struct mac_addr mac_addr; 112988 112989 typedef __u16 port_id; 112990 112991 struct bridge_mcast_own_query { 112992 struct timer_list timer; 112993 u32 startup_sent; 112994 }; 112995 112996 struct bridge_mcast_other_query { 112997 struct timer_list timer; 112998 long unsigned int delay_time; 112999 }; 113000 113001 struct net_bridge_port; 113002 113003 struct bridge_mcast_querier { 113004 struct br_ip addr; 113005 struct net_bridge_port *port; 113006 }; 113007 113008 struct net_bridge; 113009 113010 struct net_bridge_vlan_group; 113011 113012 struct bridge_mcast_stats; 113013 113014 struct net_bridge_port { 113015 struct net_bridge *br; 113016 struct net_device *dev; 113017 struct list_head list; 113018 long unsigned int flags; 113019 struct net_bridge_vlan_group *vlgrp; 113020 struct net_bridge_port *backup_port; 113021 u8 priority; 113022 u8 state; 113023 u16 port_no; 113024 unsigned char topology_change_ack; 113025 unsigned char config_pending; 113026 port_id port_id; 113027 port_id designated_port; 113028 bridge_id designated_root; 113029 bridge_id designated_bridge; 113030 u32 path_cost; 113031 u32 designated_cost; 113032 long unsigned int designated_age; 113033 struct timer_list forward_delay_timer; 113034 struct timer_list hold_timer; 113035 struct timer_list message_age_timer; 113036 struct kobject kobj; 113037 struct callback_head rcu; 113038 struct bridge_mcast_own_query ip4_own_query; 113039 struct bridge_mcast_own_query ip6_own_query; 113040 unsigned char multicast_router; 113041 struct bridge_mcast_stats *mcast_stats; 113042 struct timer_list multicast_router_timer; 113043 struct hlist_head mglist; 113044 struct hlist_node rlist; 113045 char sysfs_name[16]; 113046 struct netpoll *np; 113047 int offload_fwd_mark; 113048 u16 group_fwd_mask; 113049 u16 backup_redirected_cnt; 113050 struct bridge_stp_xstats stp_xstats; 113051 }; 113052 113053 struct bridge_mcast_stats { 113054 struct br_mcast_stats mstats; 113055 struct u64_stats_sync syncp; 113056 }; 113057 113058 struct net_bridge { 113059 spinlock_t lock; 113060 spinlock_t hash_lock; 113061 struct hlist_head frame_type_list; 113062 struct net_device *dev; 113063 long unsigned int options; 113064 __be16 vlan_proto; 113065 u16 default_pvid; 113066 struct net_bridge_vlan_group *vlgrp; 113067 struct rhashtable fdb_hash_tbl; 113068 struct list_head port_list; 113069 union { 113070 struct rtable fake_rtable; 113071 struct rt6_info fake_rt6_info; 113072 }; 113073 u16 group_fwd_mask; 113074 u16 group_fwd_mask_required; 113075 bridge_id designated_root; 113076 bridge_id bridge_id; 113077 unsigned char topology_change; 113078 unsigned char topology_change_detected; 113079 u16 root_port; 113080 long unsigned int max_age; 113081 long unsigned int hello_time; 113082 long unsigned int forward_delay; 113083 long unsigned int ageing_time; 113084 long unsigned int bridge_max_age; 113085 long unsigned int bridge_hello_time; 113086 long unsigned int bridge_forward_delay; 113087 long unsigned int bridge_ageing_time; 113088 u32 root_path_cost; 113089 u8 group_addr[6]; 113090 enum { 113091 BR_NO_STP = 0, 113092 BR_KERNEL_STP = 1, 113093 BR_USER_STP = 2, 113094 } stp_enabled; 113095 u32 hash_max; 113096 u32 multicast_last_member_count; 113097 u32 multicast_startup_query_count; 113098 u8 multicast_igmp_version; 113099 u8 multicast_router; 113100 u8 multicast_mld_version; 113101 spinlock_t multicast_lock; 113102 long unsigned int multicast_last_member_interval; 113103 long unsigned int multicast_membership_interval; 113104 long unsigned int multicast_querier_interval; 113105 long unsigned int multicast_query_interval; 113106 long unsigned int multicast_query_response_interval; 113107 long unsigned int multicast_startup_query_interval; 113108 struct rhashtable mdb_hash_tbl; 113109 struct rhashtable sg_port_tbl; 113110 struct hlist_head mcast_gc_list; 113111 struct hlist_head mdb_list; 113112 struct hlist_head router_list; 113113 struct timer_list multicast_router_timer; 113114 struct bridge_mcast_other_query ip4_other_query; 113115 struct bridge_mcast_own_query ip4_own_query; 113116 struct bridge_mcast_querier ip4_querier; 113117 struct bridge_mcast_stats *mcast_stats; 113118 struct bridge_mcast_other_query ip6_other_query; 113119 struct bridge_mcast_own_query ip6_own_query; 113120 struct bridge_mcast_querier ip6_querier; 113121 struct work_struct mcast_gc_work; 113122 struct timer_list hello_timer; 113123 struct timer_list tcn_timer; 113124 struct timer_list topology_change_timer; 113125 struct delayed_work gc_work; 113126 struct kobject *ifobj; 113127 u32 auto_cnt; 113128 int offload_fwd_mark; 113129 struct hlist_head fdb_list; 113130 struct hlist_head mrp_list; 113131 struct hlist_head mep_list; 113132 }; 113133 113134 struct net_bridge_vlan_group { 113135 struct rhashtable vlan_hash; 113136 struct rhashtable tunnel_hash; 113137 struct list_head vlan_list; 113138 u16 num_vlans; 113139 u16 pvid; 113140 u8 pvid_state; 113141 }; 113142 113143 struct net_bridge_fdb_key { 113144 mac_addr addr; 113145 u16 vlan_id; 113146 }; 113147 113148 struct net_bridge_fdb_entry { 113149 struct rhash_head rhnode; 113150 struct net_bridge_port *dst; 113151 struct net_bridge_fdb_key key; 113152 struct hlist_node fdb_node; 113153 long unsigned int flags; 113154 long: 64; 113155 long: 64; 113156 long unsigned int updated; 113157 long unsigned int used; 113158 struct callback_head rcu; 113159 long: 64; 113160 long: 64; 113161 long: 64; 113162 long: 64; 113163 }; 113164 113165 struct trace_event_raw_br_fdb_add { 113166 struct trace_entry ent; 113167 u8 ndm_flags; 113168 u32 __data_loc_dev; 113169 unsigned char addr[6]; 113170 u16 vid; 113171 u16 nlh_flags; 113172 char __data[0]; 113173 }; 113174 113175 struct trace_event_raw_br_fdb_external_learn_add { 113176 struct trace_entry ent; 113177 u32 __data_loc_br_dev; 113178 u32 __data_loc_dev; 113179 unsigned char addr[6]; 113180 u16 vid; 113181 char __data[0]; 113182 }; 113183 113184 struct trace_event_raw_fdb_delete { 113185 struct trace_entry ent; 113186 u32 __data_loc_br_dev; 113187 u32 __data_loc_dev; 113188 unsigned char addr[6]; 113189 u16 vid; 113190 char __data[0]; 113191 }; 113192 113193 struct trace_event_raw_br_fdb_update { 113194 struct trace_entry ent; 113195 u32 __data_loc_br_dev; 113196 u32 __data_loc_dev; 113197 unsigned char addr[6]; 113198 u16 vid; 113199 long unsigned int flags; 113200 char __data[0]; 113201 }; 113202 113203 struct trace_event_data_offsets_br_fdb_add { 113204 u32 dev; 113205 }; 113206 113207 struct trace_event_data_offsets_br_fdb_external_learn_add { 113208 u32 br_dev; 113209 u32 dev; 113210 }; 113211 113212 struct trace_event_data_offsets_fdb_delete { 113213 u32 br_dev; 113214 u32 dev; 113215 }; 113216 113217 struct trace_event_data_offsets_br_fdb_update { 113218 u32 br_dev; 113219 u32 dev; 113220 }; 113221 113222 typedef void (*btf_trace_br_fdb_add)(void *, struct ndmsg *, struct net_device *, const unsigned char *, u16, u16); 113223 113224 typedef void (*btf_trace_br_fdb_external_learn_add)(void *, struct net_bridge *, struct net_bridge_port *, const unsigned char *, u16); 113225 113226 typedef void (*btf_trace_fdb_delete)(void *, struct net_bridge *, struct net_bridge_fdb_entry *); 113227 113228 typedef void (*btf_trace_br_fdb_update)(void *, struct net_bridge *, struct net_bridge_port *, const unsigned char *, u16, long unsigned int); 113229 113230 struct trace_event_raw_page_pool_release { 113231 struct trace_entry ent; 113232 const struct page_pool *pool; 113233 s32 inflight; 113234 u32 hold; 113235 u32 release; 113236 u64 cnt; 113237 char __data[0]; 113238 }; 113239 113240 struct trace_event_raw_page_pool_state_release { 113241 struct trace_entry ent; 113242 const struct page_pool *pool; 113243 const struct page *page; 113244 u32 release; 113245 long unsigned int pfn; 113246 char __data[0]; 113247 }; 113248 113249 struct trace_event_raw_page_pool_state_hold { 113250 struct trace_entry ent; 113251 const struct page_pool *pool; 113252 const struct page *page; 113253 u32 hold; 113254 long unsigned int pfn; 113255 char __data[0]; 113256 }; 113257 113258 struct trace_event_raw_page_pool_update_nid { 113259 struct trace_entry ent; 113260 const struct page_pool *pool; 113261 int pool_nid; 113262 int new_nid; 113263 char __data[0]; 113264 }; 113265 113266 struct trace_event_data_offsets_page_pool_release {}; 113267 113268 struct trace_event_data_offsets_page_pool_state_release {}; 113269 113270 struct trace_event_data_offsets_page_pool_state_hold {}; 113271 113272 struct trace_event_data_offsets_page_pool_update_nid {}; 113273 113274 typedef void (*btf_trace_page_pool_release)(void *, const struct page_pool *, s32, u32, u32); 113275 113276 typedef void (*btf_trace_page_pool_state_release)(void *, const struct page_pool *, const struct page *, u32); 113277 113278 typedef void (*btf_trace_page_pool_state_hold)(void *, const struct page_pool *, const struct page *, u32); 113279 113280 typedef void (*btf_trace_page_pool_update_nid)(void *, const struct page_pool *, int); 113281 113282 struct trace_event_raw_neigh_create { 113283 struct trace_entry ent; 113284 u32 family; 113285 u32 __data_loc_dev; 113286 int entries; 113287 u8 created; 113288 u8 gc_exempt; 113289 u8 primary_key4[4]; 113290 u8 primary_key6[16]; 113291 char __data[0]; 113292 }; 113293 113294 struct trace_event_raw_neigh_update { 113295 struct trace_entry ent; 113296 u32 family; 113297 u32 __data_loc_dev; 113298 u8 lladdr[32]; 113299 u8 lladdr_len; 113300 u8 flags; 113301 u8 nud_state; 113302 u8 type; 113303 u8 dead; 113304 int refcnt; 113305 __u8 primary_key4[4]; 113306 __u8 primary_key6[16]; 113307 long unsigned int confirmed; 113308 long unsigned int updated; 113309 long unsigned int used; 113310 u8 new_lladdr[32]; 113311 u8 new_state; 113312 u32 update_flags; 113313 u32 pid; 113314 char __data[0]; 113315 }; 113316 113317 struct trace_event_raw_neigh__update { 113318 struct trace_entry ent; 113319 u32 family; 113320 u32 __data_loc_dev; 113321 u8 lladdr[32]; 113322 u8 lladdr_len; 113323 u8 flags; 113324 u8 nud_state; 113325 u8 type; 113326 u8 dead; 113327 int refcnt; 113328 __u8 primary_key4[4]; 113329 __u8 primary_key6[16]; 113330 long unsigned int confirmed; 113331 long unsigned int updated; 113332 long unsigned int used; 113333 u32 err; 113334 char __data[0]; 113335 }; 113336 113337 struct trace_event_data_offsets_neigh_create { 113338 u32 dev; 113339 }; 113340 113341 struct trace_event_data_offsets_neigh_update { 113342 u32 dev; 113343 }; 113344 113345 struct trace_event_data_offsets_neigh__update { 113346 u32 dev; 113347 }; 113348 113349 typedef void (*btf_trace_neigh_create)(void *, struct neigh_table *, struct net_device *, const void *, const struct neighbour *, bool); 113350 113351 typedef void (*btf_trace_neigh_update)(void *, struct neighbour *, const u8 *, u8, u32, u32); 113352 113353 typedef void (*btf_trace_neigh_update_done)(void *, struct neighbour *, int); 113354 113355 typedef void (*btf_trace_neigh_timer_handler)(void *, struct neighbour *, int); 113356 113357 typedef void (*btf_trace_neigh_event_send_done)(void *, struct neighbour *, int); 113358 113359 typedef void (*btf_trace_neigh_event_send_dead)(void *, struct neighbour *, int); 113360 113361 typedef void (*btf_trace_neigh_cleanup_and_release)(void *, struct neighbour *, int); 113362 113363 struct net_dm_drop_point { 113364 __u8 pc[8]; 113365 __u32 count; 113366 }; 113367 113368 struct net_dm_alert_msg { 113369 __u32 entries; 113370 struct net_dm_drop_point points[0]; 113371 }; 113372 113373 enum { 113374 NET_DM_CMD_UNSPEC = 0, 113375 NET_DM_CMD_ALERT = 1, 113376 NET_DM_CMD_CONFIG = 2, 113377 NET_DM_CMD_START = 3, 113378 NET_DM_CMD_STOP = 4, 113379 NET_DM_CMD_PACKET_ALERT = 5, 113380 NET_DM_CMD_CONFIG_GET = 6, 113381 NET_DM_CMD_CONFIG_NEW = 7, 113382 NET_DM_CMD_STATS_GET = 8, 113383 NET_DM_CMD_STATS_NEW = 9, 113384 _NET_DM_CMD_MAX = 10, 113385 }; 113386 113387 enum net_dm_attr { 113388 NET_DM_ATTR_UNSPEC = 0, 113389 NET_DM_ATTR_ALERT_MODE = 1, 113390 NET_DM_ATTR_PC = 2, 113391 NET_DM_ATTR_SYMBOL = 3, 113392 NET_DM_ATTR_IN_PORT = 4, 113393 NET_DM_ATTR_TIMESTAMP = 5, 113394 NET_DM_ATTR_PROTO = 6, 113395 NET_DM_ATTR_PAYLOAD = 7, 113396 NET_DM_ATTR_PAD = 8, 113397 NET_DM_ATTR_TRUNC_LEN = 9, 113398 NET_DM_ATTR_ORIG_LEN = 10, 113399 NET_DM_ATTR_QUEUE_LEN = 11, 113400 NET_DM_ATTR_STATS = 12, 113401 NET_DM_ATTR_HW_STATS = 13, 113402 NET_DM_ATTR_ORIGIN = 14, 113403 NET_DM_ATTR_HW_TRAP_GROUP_NAME = 15, 113404 NET_DM_ATTR_HW_TRAP_NAME = 16, 113405 NET_DM_ATTR_HW_ENTRIES = 17, 113406 NET_DM_ATTR_HW_ENTRY = 18, 113407 NET_DM_ATTR_HW_TRAP_COUNT = 19, 113408 NET_DM_ATTR_SW_DROPS = 20, 113409 NET_DM_ATTR_HW_DROPS = 21, 113410 NET_DM_ATTR_FLOW_ACTION_COOKIE = 22, 113411 __NET_DM_ATTR_MAX = 23, 113412 NET_DM_ATTR_MAX = 22, 113413 }; 113414 113415 enum net_dm_alert_mode { 113416 NET_DM_ALERT_MODE_SUMMARY = 0, 113417 NET_DM_ALERT_MODE_PACKET = 1, 113418 }; 113419 113420 enum { 113421 NET_DM_ATTR_PORT_NETDEV_IFINDEX = 0, 113422 NET_DM_ATTR_PORT_NETDEV_NAME = 1, 113423 __NET_DM_ATTR_PORT_MAX = 2, 113424 NET_DM_ATTR_PORT_MAX = 1, 113425 }; 113426 113427 enum { 113428 NET_DM_ATTR_STATS_DROPPED = 0, 113429 __NET_DM_ATTR_STATS_MAX = 1, 113430 NET_DM_ATTR_STATS_MAX = 0, 113431 }; 113432 113433 enum net_dm_origin { 113434 NET_DM_ORIGIN_SW = 0, 113435 NET_DM_ORIGIN_HW = 1, 113436 }; 113437 113438 struct devlink_trap_metadata { 113439 const char *trap_name; 113440 const char *trap_group_name; 113441 struct net_device *input_dev; 113442 const struct flow_action_cookie *fa_cookie; 113443 enum devlink_trap_type trap_type; 113444 }; 113445 113446 struct net_dm_stats { 113447 u64 dropped; 113448 struct u64_stats_sync syncp; 113449 }; 113450 113451 struct net_dm_hw_entry { 113452 char trap_name[40]; 113453 u32 count; 113454 }; 113455 113456 struct net_dm_hw_entries { 113457 u32 num_entries; 113458 struct net_dm_hw_entry entries[0]; 113459 }; 113460 113461 struct per_cpu_dm_data { 113462 spinlock_t lock; 113463 union { 113464 struct sk_buff *skb; 113465 struct net_dm_hw_entries *hw_entries; 113466 }; 113467 struct sk_buff_head drop_queue; 113468 struct work_struct dm_alert_work; 113469 struct timer_list send_timer; 113470 struct net_dm_stats stats; 113471 }; 113472 113473 struct dm_hw_stat_delta { 113474 struct net_device *dev; 113475 long unsigned int last_rx; 113476 struct list_head list; 113477 struct callback_head rcu; 113478 long unsigned int last_drop_val; 113479 }; 113480 113481 struct net_dm_alert_ops { 113482 void (*kfree_skb_probe)(void *, struct sk_buff *, void *); 113483 void (*napi_poll_probe)(void *, struct napi_struct *, int, int); 113484 void (*work_item_func)(struct work_struct *); 113485 void (*hw_work_item_func)(struct work_struct *); 113486 void (*hw_trap_probe)(void *, const struct devlink *, struct sk_buff *, const struct devlink_trap_metadata *); 113487 }; 113488 113489 struct net_dm_skb_cb { 113490 union { 113491 struct devlink_trap_metadata *hw_metadata; 113492 void *pc; 113493 }; 113494 }; 113495 113496 struct clock_identity { 113497 u8 id[8]; 113498 }; 113499 113500 struct port_identity { 113501 struct clock_identity clock_identity; 113502 __be16 port_number; 113503 }; 113504 113505 struct ptp_header { 113506 u8 tsmt; 113507 u8 ver; 113508 __be16 message_length; 113509 u8 domain_number; 113510 u8 reserved1; 113511 u8 flag_field[2]; 113512 __be64 correction; 113513 __be32 reserved2; 113514 struct port_identity source_port_identity; 113515 __be16 sequence_id; 113516 u8 control; 113517 u8 log_message_interval; 113518 } __attribute__((packed)); 113519 113520 struct update_classid_context { 113521 u32 classid; 113522 unsigned int batch; 113523 }; 113524 113525 enum lwtunnel_encap_types { 113526 LWTUNNEL_ENCAP_NONE = 0, 113527 LWTUNNEL_ENCAP_MPLS = 1, 113528 LWTUNNEL_ENCAP_IP = 2, 113529 LWTUNNEL_ENCAP_ILA = 3, 113530 LWTUNNEL_ENCAP_IP6 = 4, 113531 LWTUNNEL_ENCAP_SEG6 = 5, 113532 LWTUNNEL_ENCAP_BPF = 6, 113533 LWTUNNEL_ENCAP_SEG6_LOCAL = 7, 113534 LWTUNNEL_ENCAP_RPL = 8, 113535 __LWTUNNEL_ENCAP_MAX = 9, 113536 }; 113537 113538 struct rtnexthop { 113539 short unsigned int rtnh_len; 113540 unsigned char rtnh_flags; 113541 unsigned char rtnh_hops; 113542 int rtnh_ifindex; 113543 }; 113544 113545 struct lwtunnel_encap_ops { 113546 int (*build_state)(struct net *, struct nlattr *, unsigned int, const void *, struct lwtunnel_state **, struct netlink_ext_ack *); 113547 void (*destroy_state)(struct lwtunnel_state *); 113548 int (*output)(struct net *, struct sock *, struct sk_buff *); 113549 int (*input)(struct sk_buff *); 113550 int (*fill_encap)(struct sk_buff *, struct lwtunnel_state *); 113551 int (*get_encap_size)(struct lwtunnel_state *); 113552 int (*cmp_encap)(struct lwtunnel_state *, struct lwtunnel_state *); 113553 int (*xmit)(struct sk_buff *); 113554 struct module *owner; 113555 }; 113556 113557 enum { 113558 LWT_BPF_PROG_UNSPEC = 0, 113559 LWT_BPF_PROG_FD = 1, 113560 LWT_BPF_PROG_NAME = 2, 113561 __LWT_BPF_PROG_MAX = 3, 113562 }; 113563 113564 enum { 113565 LWT_BPF_UNSPEC = 0, 113566 LWT_BPF_IN = 1, 113567 LWT_BPF_OUT = 2, 113568 LWT_BPF_XMIT = 3, 113569 LWT_BPF_XMIT_HEADROOM = 4, 113570 __LWT_BPF_MAX = 5, 113571 }; 113572 113573 enum { 113574 LWTUNNEL_XMIT_DONE = 0, 113575 LWTUNNEL_XMIT_CONTINUE = 1, 113576 }; 113577 113578 struct bpf_lwt_prog { 113579 struct bpf_prog *prog; 113580 char *name; 113581 }; 113582 113583 struct bpf_lwt { 113584 struct bpf_lwt_prog in; 113585 struct bpf_lwt_prog out; 113586 struct bpf_lwt_prog xmit; 113587 int family; 113588 }; 113589 113590 struct bpf_stab { 113591 struct bpf_map map; 113592 struct sock **sks; 113593 struct sk_psock_progs progs; 113594 raw_spinlock_t lock; 113595 long: 32; 113596 long: 64; 113597 long: 64; 113598 long: 64; 113599 }; 113600 113601 typedef u64 (*btf_bpf_sock_map_update)(struct bpf_sock_ops_kern *, struct bpf_map *, void *, u64); 113602 113603 typedef u64 (*btf_bpf_sk_redirect_map)(struct sk_buff *, struct bpf_map *, u32, u64); 113604 113605 typedef u64 (*btf_bpf_msg_redirect_map)(struct sk_msg *, struct bpf_map *, u32, u64); 113606 113607 struct sock_map_seq_info { 113608 struct bpf_map *map; 113609 struct sock *sk; 113610 u32 index; 113611 }; 113612 113613 struct bpf_iter__sockmap { 113614 union { 113615 struct bpf_iter_meta *meta; 113616 }; 113617 union { 113618 struct bpf_map *map; 113619 }; 113620 union { 113621 void *key; 113622 }; 113623 union { 113624 struct sock *sk; 113625 }; 113626 }; 113627 113628 struct bpf_shtab_elem { 113629 struct callback_head rcu; 113630 u32 hash; 113631 struct sock *sk; 113632 struct hlist_node node; 113633 u8 key[0]; 113634 }; 113635 113636 struct bpf_shtab_bucket { 113637 struct hlist_head head; 113638 raw_spinlock_t lock; 113639 }; 113640 113641 struct bpf_shtab { 113642 struct bpf_map map; 113643 struct bpf_shtab_bucket *buckets; 113644 u32 buckets_num; 113645 u32 elem_size; 113646 struct sk_psock_progs progs; 113647 atomic_t count; 113648 long: 32; 113649 long: 64; 113650 long: 64; 113651 }; 113652 113653 typedef u64 (*btf_bpf_sock_hash_update)(struct bpf_sock_ops_kern *, struct bpf_map *, void *, u64); 113654 113655 typedef u64 (*btf_bpf_sk_redirect_hash)(struct sk_buff *, struct bpf_map *, void *, u64); 113656 113657 typedef u64 (*btf_bpf_msg_redirect_hash)(struct sk_msg *, struct bpf_map *, void *, u64); 113658 113659 struct sock_hash_seq_info { 113660 struct bpf_map *map; 113661 struct bpf_shtab *htab; 113662 u32 bucket_id; 113663 }; 113664 113665 struct dst_cache_pcpu { 113666 long unsigned int refresh_ts; 113667 struct dst_entry *dst; 113668 u32 cookie; 113669 union { 113670 struct in_addr in_saddr; 113671 struct in6_addr in6_saddr; 113672 }; 113673 }; 113674 113675 enum devlink_command { 113676 DEVLINK_CMD_UNSPEC = 0, 113677 DEVLINK_CMD_GET = 1, 113678 DEVLINK_CMD_SET = 2, 113679 DEVLINK_CMD_NEW = 3, 113680 DEVLINK_CMD_DEL = 4, 113681 DEVLINK_CMD_PORT_GET = 5, 113682 DEVLINK_CMD_PORT_SET = 6, 113683 DEVLINK_CMD_PORT_NEW = 7, 113684 DEVLINK_CMD_PORT_DEL = 8, 113685 DEVLINK_CMD_PORT_SPLIT = 9, 113686 DEVLINK_CMD_PORT_UNSPLIT = 10, 113687 DEVLINK_CMD_SB_GET = 11, 113688 DEVLINK_CMD_SB_SET = 12, 113689 DEVLINK_CMD_SB_NEW = 13, 113690 DEVLINK_CMD_SB_DEL = 14, 113691 DEVLINK_CMD_SB_POOL_GET = 15, 113692 DEVLINK_CMD_SB_POOL_SET = 16, 113693 DEVLINK_CMD_SB_POOL_NEW = 17, 113694 DEVLINK_CMD_SB_POOL_DEL = 18, 113695 DEVLINK_CMD_SB_PORT_POOL_GET = 19, 113696 DEVLINK_CMD_SB_PORT_POOL_SET = 20, 113697 DEVLINK_CMD_SB_PORT_POOL_NEW = 21, 113698 DEVLINK_CMD_SB_PORT_POOL_DEL = 22, 113699 DEVLINK_CMD_SB_TC_POOL_BIND_GET = 23, 113700 DEVLINK_CMD_SB_TC_POOL_BIND_SET = 24, 113701 DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 25, 113702 DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 26, 113703 DEVLINK_CMD_SB_OCC_SNAPSHOT = 27, 113704 DEVLINK_CMD_SB_OCC_MAX_CLEAR = 28, 113705 DEVLINK_CMD_ESWITCH_GET = 29, 113706 DEVLINK_CMD_ESWITCH_SET = 30, 113707 DEVLINK_CMD_DPIPE_TABLE_GET = 31, 113708 DEVLINK_CMD_DPIPE_ENTRIES_GET = 32, 113709 DEVLINK_CMD_DPIPE_HEADERS_GET = 33, 113710 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 34, 113711 DEVLINK_CMD_RESOURCE_SET = 35, 113712 DEVLINK_CMD_RESOURCE_DUMP = 36, 113713 DEVLINK_CMD_RELOAD = 37, 113714 DEVLINK_CMD_PARAM_GET = 38, 113715 DEVLINK_CMD_PARAM_SET = 39, 113716 DEVLINK_CMD_PARAM_NEW = 40, 113717 DEVLINK_CMD_PARAM_DEL = 41, 113718 DEVLINK_CMD_REGION_GET = 42, 113719 DEVLINK_CMD_REGION_SET = 43, 113720 DEVLINK_CMD_REGION_NEW = 44, 113721 DEVLINK_CMD_REGION_DEL = 45, 113722 DEVLINK_CMD_REGION_READ = 46, 113723 DEVLINK_CMD_PORT_PARAM_GET = 47, 113724 DEVLINK_CMD_PORT_PARAM_SET = 48, 113725 DEVLINK_CMD_PORT_PARAM_NEW = 49, 113726 DEVLINK_CMD_PORT_PARAM_DEL = 50, 113727 DEVLINK_CMD_INFO_GET = 51, 113728 DEVLINK_CMD_HEALTH_REPORTER_GET = 52, 113729 DEVLINK_CMD_HEALTH_REPORTER_SET = 53, 113730 DEVLINK_CMD_HEALTH_REPORTER_RECOVER = 54, 113731 DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE = 55, 113732 DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET = 56, 113733 DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR = 57, 113734 DEVLINK_CMD_FLASH_UPDATE = 58, 113735 DEVLINK_CMD_FLASH_UPDATE_END = 59, 113736 DEVLINK_CMD_FLASH_UPDATE_STATUS = 60, 113737 DEVLINK_CMD_TRAP_GET = 61, 113738 DEVLINK_CMD_TRAP_SET = 62, 113739 DEVLINK_CMD_TRAP_NEW = 63, 113740 DEVLINK_CMD_TRAP_DEL = 64, 113741 DEVLINK_CMD_TRAP_GROUP_GET = 65, 113742 DEVLINK_CMD_TRAP_GROUP_SET = 66, 113743 DEVLINK_CMD_TRAP_GROUP_NEW = 67, 113744 DEVLINK_CMD_TRAP_GROUP_DEL = 68, 113745 DEVLINK_CMD_TRAP_POLICER_GET = 69, 113746 DEVLINK_CMD_TRAP_POLICER_SET = 70, 113747 DEVLINK_CMD_TRAP_POLICER_NEW = 71, 113748 DEVLINK_CMD_TRAP_POLICER_DEL = 72, 113749 DEVLINK_CMD_HEALTH_REPORTER_TEST = 73, 113750 __DEVLINK_CMD_MAX = 74, 113751 DEVLINK_CMD_MAX = 73, 113752 }; 113753 113754 enum devlink_eswitch_mode { 113755 DEVLINK_ESWITCH_MODE_LEGACY = 0, 113756 DEVLINK_ESWITCH_MODE_SWITCHDEV = 1, 113757 }; 113758 113759 enum { 113760 DEVLINK_ATTR_STATS_RX_PACKETS = 0, 113761 DEVLINK_ATTR_STATS_RX_BYTES = 1, 113762 DEVLINK_ATTR_STATS_RX_DROPPED = 2, 113763 __DEVLINK_ATTR_STATS_MAX = 3, 113764 DEVLINK_ATTR_STATS_MAX = 2, 113765 }; 113766 113767 enum { 113768 DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT = 0, 113769 DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT = 1, 113770 __DEVLINK_FLASH_OVERWRITE_MAX_BIT = 2, 113771 DEVLINK_FLASH_OVERWRITE_MAX_BIT = 1, 113772 }; 113773 113774 enum { 113775 DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT = 0, 113776 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE = 1, 113777 }; 113778 113779 enum devlink_attr { 113780 DEVLINK_ATTR_UNSPEC = 0, 113781 DEVLINK_ATTR_BUS_NAME = 1, 113782 DEVLINK_ATTR_DEV_NAME = 2, 113783 DEVLINK_ATTR_PORT_INDEX = 3, 113784 DEVLINK_ATTR_PORT_TYPE = 4, 113785 DEVLINK_ATTR_PORT_DESIRED_TYPE = 5, 113786 DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 6, 113787 DEVLINK_ATTR_PORT_NETDEV_NAME = 7, 113788 DEVLINK_ATTR_PORT_IBDEV_NAME = 8, 113789 DEVLINK_ATTR_PORT_SPLIT_COUNT = 9, 113790 DEVLINK_ATTR_PORT_SPLIT_GROUP = 10, 113791 DEVLINK_ATTR_SB_INDEX = 11, 113792 DEVLINK_ATTR_SB_SIZE = 12, 113793 DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 13, 113794 DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 14, 113795 DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 15, 113796 DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 16, 113797 DEVLINK_ATTR_SB_POOL_INDEX = 17, 113798 DEVLINK_ATTR_SB_POOL_TYPE = 18, 113799 DEVLINK_ATTR_SB_POOL_SIZE = 19, 113800 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 20, 113801 DEVLINK_ATTR_SB_THRESHOLD = 21, 113802 DEVLINK_ATTR_SB_TC_INDEX = 22, 113803 DEVLINK_ATTR_SB_OCC_CUR = 23, 113804 DEVLINK_ATTR_SB_OCC_MAX = 24, 113805 DEVLINK_ATTR_ESWITCH_MODE = 25, 113806 DEVLINK_ATTR_ESWITCH_INLINE_MODE = 26, 113807 DEVLINK_ATTR_DPIPE_TABLES = 27, 113808 DEVLINK_ATTR_DPIPE_TABLE = 28, 113809 DEVLINK_ATTR_DPIPE_TABLE_NAME = 29, 113810 DEVLINK_ATTR_DPIPE_TABLE_SIZE = 30, 113811 DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 31, 113812 DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 32, 113813 DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 33, 113814 DEVLINK_ATTR_DPIPE_ENTRIES = 34, 113815 DEVLINK_ATTR_DPIPE_ENTRY = 35, 113816 DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 36, 113817 DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 37, 113818 DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 38, 113819 DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 39, 113820 DEVLINK_ATTR_DPIPE_MATCH = 40, 113821 DEVLINK_ATTR_DPIPE_MATCH_VALUE = 41, 113822 DEVLINK_ATTR_DPIPE_MATCH_TYPE = 42, 113823 DEVLINK_ATTR_DPIPE_ACTION = 43, 113824 DEVLINK_ATTR_DPIPE_ACTION_VALUE = 44, 113825 DEVLINK_ATTR_DPIPE_ACTION_TYPE = 45, 113826 DEVLINK_ATTR_DPIPE_VALUE = 46, 113827 DEVLINK_ATTR_DPIPE_VALUE_MASK = 47, 113828 DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 48, 113829 DEVLINK_ATTR_DPIPE_HEADERS = 49, 113830 DEVLINK_ATTR_DPIPE_HEADER = 50, 113831 DEVLINK_ATTR_DPIPE_HEADER_NAME = 51, 113832 DEVLINK_ATTR_DPIPE_HEADER_ID = 52, 113833 DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 53, 113834 DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 54, 113835 DEVLINK_ATTR_DPIPE_HEADER_INDEX = 55, 113836 DEVLINK_ATTR_DPIPE_FIELD = 56, 113837 DEVLINK_ATTR_DPIPE_FIELD_NAME = 57, 113838 DEVLINK_ATTR_DPIPE_FIELD_ID = 58, 113839 DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 59, 113840 DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 60, 113841 DEVLINK_ATTR_PAD = 61, 113842 DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 62, 113843 DEVLINK_ATTR_RESOURCE_LIST = 63, 113844 DEVLINK_ATTR_RESOURCE = 64, 113845 DEVLINK_ATTR_RESOURCE_NAME = 65, 113846 DEVLINK_ATTR_RESOURCE_ID = 66, 113847 DEVLINK_ATTR_RESOURCE_SIZE = 67, 113848 DEVLINK_ATTR_RESOURCE_SIZE_NEW = 68, 113849 DEVLINK_ATTR_RESOURCE_SIZE_VALID = 69, 113850 DEVLINK_ATTR_RESOURCE_SIZE_MIN = 70, 113851 DEVLINK_ATTR_RESOURCE_SIZE_MAX = 71, 113852 DEVLINK_ATTR_RESOURCE_SIZE_GRAN = 72, 113853 DEVLINK_ATTR_RESOURCE_UNIT = 73, 113854 DEVLINK_ATTR_RESOURCE_OCC = 74, 113855 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID = 75, 113856 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS = 76, 113857 DEVLINK_ATTR_PORT_FLAVOUR = 77, 113858 DEVLINK_ATTR_PORT_NUMBER = 78, 113859 DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER = 79, 113860 DEVLINK_ATTR_PARAM = 80, 113861 DEVLINK_ATTR_PARAM_NAME = 81, 113862 DEVLINK_ATTR_PARAM_GENERIC = 82, 113863 DEVLINK_ATTR_PARAM_TYPE = 83, 113864 DEVLINK_ATTR_PARAM_VALUES_LIST = 84, 113865 DEVLINK_ATTR_PARAM_VALUE = 85, 113866 DEVLINK_ATTR_PARAM_VALUE_DATA = 86, 113867 DEVLINK_ATTR_PARAM_VALUE_CMODE = 87, 113868 DEVLINK_ATTR_REGION_NAME = 88, 113869 DEVLINK_ATTR_REGION_SIZE = 89, 113870 DEVLINK_ATTR_REGION_SNAPSHOTS = 90, 113871 DEVLINK_ATTR_REGION_SNAPSHOT = 91, 113872 DEVLINK_ATTR_REGION_SNAPSHOT_ID = 92, 113873 DEVLINK_ATTR_REGION_CHUNKS = 93, 113874 DEVLINK_ATTR_REGION_CHUNK = 94, 113875 DEVLINK_ATTR_REGION_CHUNK_DATA = 95, 113876 DEVLINK_ATTR_REGION_CHUNK_ADDR = 96, 113877 DEVLINK_ATTR_REGION_CHUNK_LEN = 97, 113878 DEVLINK_ATTR_INFO_DRIVER_NAME = 98, 113879 DEVLINK_ATTR_INFO_SERIAL_NUMBER = 99, 113880 DEVLINK_ATTR_INFO_VERSION_FIXED = 100, 113881 DEVLINK_ATTR_INFO_VERSION_RUNNING = 101, 113882 DEVLINK_ATTR_INFO_VERSION_STORED = 102, 113883 DEVLINK_ATTR_INFO_VERSION_NAME = 103, 113884 DEVLINK_ATTR_INFO_VERSION_VALUE = 104, 113885 DEVLINK_ATTR_SB_POOL_CELL_SIZE = 105, 113886 DEVLINK_ATTR_FMSG = 106, 113887 DEVLINK_ATTR_FMSG_OBJ_NEST_START = 107, 113888 DEVLINK_ATTR_FMSG_PAIR_NEST_START = 108, 113889 DEVLINK_ATTR_FMSG_ARR_NEST_START = 109, 113890 DEVLINK_ATTR_FMSG_NEST_END = 110, 113891 DEVLINK_ATTR_FMSG_OBJ_NAME = 111, 113892 DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE = 112, 113893 DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA = 113, 113894 DEVLINK_ATTR_HEALTH_REPORTER = 114, 113895 DEVLINK_ATTR_HEALTH_REPORTER_NAME = 115, 113896 DEVLINK_ATTR_HEALTH_REPORTER_STATE = 116, 113897 DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT = 117, 113898 DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT = 118, 113899 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS = 119, 113900 DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD = 120, 113901 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER = 121, 113902 DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME = 122, 113903 DEVLINK_ATTR_FLASH_UPDATE_COMPONENT = 123, 113904 DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG = 124, 113905 DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE = 125, 113906 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL = 126, 113907 DEVLINK_ATTR_PORT_PCI_PF_NUMBER = 127, 113908 DEVLINK_ATTR_PORT_PCI_VF_NUMBER = 128, 113909 DEVLINK_ATTR_STATS = 129, 113910 DEVLINK_ATTR_TRAP_NAME = 130, 113911 DEVLINK_ATTR_TRAP_ACTION = 131, 113912 DEVLINK_ATTR_TRAP_TYPE = 132, 113913 DEVLINK_ATTR_TRAP_GENERIC = 133, 113914 DEVLINK_ATTR_TRAP_METADATA = 134, 113915 DEVLINK_ATTR_TRAP_GROUP_NAME = 135, 113916 DEVLINK_ATTR_RELOAD_FAILED = 136, 113917 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS = 137, 113918 DEVLINK_ATTR_NETNS_FD = 138, 113919 DEVLINK_ATTR_NETNS_PID = 139, 113920 DEVLINK_ATTR_NETNS_ID = 140, 113921 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP = 141, 113922 DEVLINK_ATTR_TRAP_POLICER_ID = 142, 113923 DEVLINK_ATTR_TRAP_POLICER_RATE = 143, 113924 DEVLINK_ATTR_TRAP_POLICER_BURST = 144, 113925 DEVLINK_ATTR_PORT_FUNCTION = 145, 113926 DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER = 146, 113927 DEVLINK_ATTR_PORT_LANES = 147, 113928 DEVLINK_ATTR_PORT_SPLITTABLE = 148, 113929 DEVLINK_ATTR_PORT_EXTERNAL = 149, 113930 DEVLINK_ATTR_PORT_CONTROLLER_NUMBER = 150, 113931 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT = 151, 113932 DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK = 152, 113933 DEVLINK_ATTR_RELOAD_ACTION = 153, 113934 DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED = 154, 113935 DEVLINK_ATTR_RELOAD_LIMITS = 155, 113936 DEVLINK_ATTR_DEV_STATS = 156, 113937 DEVLINK_ATTR_RELOAD_STATS = 157, 113938 DEVLINK_ATTR_RELOAD_STATS_ENTRY = 158, 113939 DEVLINK_ATTR_RELOAD_STATS_LIMIT = 159, 113940 DEVLINK_ATTR_RELOAD_STATS_VALUE = 160, 113941 DEVLINK_ATTR_REMOTE_RELOAD_STATS = 161, 113942 DEVLINK_ATTR_RELOAD_ACTION_INFO = 162, 113943 DEVLINK_ATTR_RELOAD_ACTION_STATS = 163, 113944 __DEVLINK_ATTR_MAX = 164, 113945 DEVLINK_ATTR_MAX = 163, 113946 }; 113947 113948 enum devlink_dpipe_match_type { 113949 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0, 113950 }; 113951 113952 enum devlink_dpipe_action_type { 113953 DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0, 113954 }; 113955 113956 enum devlink_dpipe_field_ethernet_id { 113957 DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0, 113958 }; 113959 113960 enum devlink_dpipe_field_ipv4_id { 113961 DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0, 113962 }; 113963 113964 enum devlink_dpipe_field_ipv6_id { 113965 DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0, 113966 }; 113967 113968 enum devlink_dpipe_header_id { 113969 DEVLINK_DPIPE_HEADER_ETHERNET = 0, 113970 DEVLINK_DPIPE_HEADER_IPV4 = 1, 113971 DEVLINK_DPIPE_HEADER_IPV6 = 2, 113972 }; 113973 113974 enum devlink_resource_unit { 113975 DEVLINK_RESOURCE_UNIT_ENTRY = 0, 113976 }; 113977 113978 enum devlink_port_function_attr { 113979 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC = 0, 113980 DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR = 1, 113981 __DEVLINK_PORT_FUNCTION_ATTR_MAX = 2, 113982 DEVLINK_PORT_FUNCTION_ATTR_MAX = 1, 113983 }; 113984 113985 struct devlink_dpipe_match { 113986 enum devlink_dpipe_match_type type; 113987 unsigned int header_index; 113988 struct devlink_dpipe_header *header; 113989 unsigned int field_id; 113990 }; 113991 113992 struct devlink_dpipe_action { 113993 enum devlink_dpipe_action_type type; 113994 unsigned int header_index; 113995 struct devlink_dpipe_header *header; 113996 unsigned int field_id; 113997 }; 113998 113999 struct devlink_dpipe_value { 114000 union { 114001 struct devlink_dpipe_action *action; 114002 struct devlink_dpipe_match *match; 114003 }; 114004 unsigned int mapping_value; 114005 bool mapping_valid; 114006 unsigned int value_size; 114007 void *value; 114008 void *mask; 114009 }; 114010 114011 struct devlink_dpipe_entry { 114012 u64 index; 114013 struct devlink_dpipe_value *match_values; 114014 unsigned int match_values_count; 114015 struct devlink_dpipe_value *action_values; 114016 unsigned int action_values_count; 114017 u64 counter; 114018 bool counter_valid; 114019 }; 114020 114021 struct devlink_dpipe_dump_ctx { 114022 struct genl_info *info; 114023 enum devlink_command cmd; 114024 struct sk_buff *skb; 114025 struct nlattr *nest; 114026 void *hdr; 114027 }; 114028 114029 struct devlink_dpipe_table_ops; 114030 114031 struct devlink_dpipe_table { 114032 void *priv; 114033 struct list_head list; 114034 const char *name; 114035 bool counters_enabled; 114036 bool counter_control_extern; 114037 bool resource_valid; 114038 u64 resource_id; 114039 u64 resource_units; 114040 struct devlink_dpipe_table_ops *table_ops; 114041 struct callback_head rcu; 114042 }; 114043 114044 struct devlink_dpipe_table_ops { 114045 int (*actions_dump)(void *, struct sk_buff *); 114046 int (*matches_dump)(void *, struct sk_buff *); 114047 int (*entries_dump)(void *, bool, struct devlink_dpipe_dump_ctx *); 114048 int (*counters_set_update)(void *, bool); 114049 u64 (*size_get)(void *); 114050 }; 114051 114052 struct devlink_resource_size_params { 114053 u64 size_min; 114054 u64 size_max; 114055 u64 size_granularity; 114056 enum devlink_resource_unit unit; 114057 }; 114058 114059 typedef u64 devlink_resource_occ_get_t(void *); 114060 114061 struct devlink_resource { 114062 const char *name; 114063 u64 id; 114064 u64 size; 114065 u64 size_new; 114066 bool size_valid; 114067 struct devlink_resource *parent; 114068 struct devlink_resource_size_params size_params; 114069 struct list_head list; 114070 struct list_head resource_list; 114071 devlink_resource_occ_get_t *occ_get; 114072 void *occ_get_priv; 114073 }; 114074 114075 enum devlink_param_type { 114076 DEVLINK_PARAM_TYPE_U8 = 0, 114077 DEVLINK_PARAM_TYPE_U16 = 1, 114078 DEVLINK_PARAM_TYPE_U32 = 2, 114079 DEVLINK_PARAM_TYPE_STRING = 3, 114080 DEVLINK_PARAM_TYPE_BOOL = 4, 114081 }; 114082 114083 struct devlink_flash_notify { 114084 const char *status_msg; 114085 const char *component; 114086 long unsigned int done; 114087 long unsigned int total; 114088 long unsigned int timeout; 114089 }; 114090 114091 struct devlink_param { 114092 u32 id; 114093 const char *name; 114094 bool generic; 114095 enum devlink_param_type type; 114096 long unsigned int supported_cmodes; 114097 int (*get)(struct devlink *, u32, struct devlink_param_gset_ctx *); 114098 int (*set)(struct devlink *, u32, struct devlink_param_gset_ctx *); 114099 int (*validate)(struct devlink *, u32, union devlink_param_value, struct netlink_ext_ack *); 114100 }; 114101 114102 struct devlink_param_item { 114103 struct list_head list; 114104 const struct devlink_param *param; 114105 union devlink_param_value driverinit_value; 114106 bool driverinit_value_valid; 114107 bool published; 114108 }; 114109 114110 enum devlink_param_generic_id { 114111 DEVLINK_PARAM_GENERIC_ID_INT_ERR_RESET = 0, 114112 DEVLINK_PARAM_GENERIC_ID_MAX_MACS = 1, 114113 DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV = 2, 114114 DEVLINK_PARAM_GENERIC_ID_REGION_SNAPSHOT = 3, 114115 DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI = 4, 114116 DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX = 5, 114117 DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN = 6, 114118 DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY = 7, 114119 DEVLINK_PARAM_GENERIC_ID_RESET_DEV_ON_DRV_PROBE = 8, 114120 DEVLINK_PARAM_GENERIC_ID_ENABLE_ROCE = 9, 114121 DEVLINK_PARAM_GENERIC_ID_ENABLE_REMOTE_DEV_RESET = 10, 114122 __DEVLINK_PARAM_GENERIC_ID_MAX = 11, 114123 DEVLINK_PARAM_GENERIC_ID_MAX = 10, 114124 }; 114125 114126 struct devlink_region_ops { 114127 const char *name; 114128 void (*destructor)(const void *); 114129 int (*snapshot)(struct devlink *, const struct devlink_region_ops *, struct netlink_ext_ack *, u8 **); 114130 void *priv; 114131 }; 114132 114133 struct devlink_port_region_ops { 114134 const char *name; 114135 void (*destructor)(const void *); 114136 int (*snapshot)(struct devlink_port *, const struct devlink_port_region_ops *, struct netlink_ext_ack *, u8 **); 114137 void *priv; 114138 }; 114139 114140 enum devlink_health_reporter_state { 114141 DEVLINK_HEALTH_REPORTER_STATE_HEALTHY = 0, 114142 DEVLINK_HEALTH_REPORTER_STATE_ERROR = 1, 114143 }; 114144 114145 struct devlink_health_reporter; 114146 114147 struct devlink_fmsg; 114148 114149 struct devlink_health_reporter_ops { 114150 char *name; 114151 int (*recover)(struct devlink_health_reporter *, void *, struct netlink_ext_ack *); 114152 int (*dump)(struct devlink_health_reporter *, struct devlink_fmsg *, void *, struct netlink_ext_ack *); 114153 int (*diagnose)(struct devlink_health_reporter *, struct devlink_fmsg *, struct netlink_ext_ack *); 114154 int (*test)(struct devlink_health_reporter *, struct netlink_ext_ack *); 114155 }; 114156 114157 struct devlink_health_reporter { 114158 struct list_head list; 114159 void *priv; 114160 const struct devlink_health_reporter_ops *ops; 114161 struct devlink *devlink; 114162 struct devlink_port *devlink_port; 114163 struct devlink_fmsg *dump_fmsg; 114164 struct mutex dump_lock; 114165 u64 graceful_period; 114166 bool auto_recover; 114167 bool auto_dump; 114168 u8 health_state; 114169 u64 dump_ts; 114170 u64 dump_real_ts; 114171 u64 error_count; 114172 u64 recovery_count; 114173 u64 last_recovery_ts; 114174 refcount_t refcount; 114175 }; 114176 114177 struct devlink_fmsg { 114178 struct list_head item_list; 114179 bool putting_binary; 114180 }; 114181 114182 enum devlink_trap_generic_id { 114183 DEVLINK_TRAP_GENERIC_ID_SMAC_MC = 0, 114184 DEVLINK_TRAP_GENERIC_ID_VLAN_TAG_MISMATCH = 1, 114185 DEVLINK_TRAP_GENERIC_ID_INGRESS_VLAN_FILTER = 2, 114186 DEVLINK_TRAP_GENERIC_ID_INGRESS_STP_FILTER = 3, 114187 DEVLINK_TRAP_GENERIC_ID_EMPTY_TX_LIST = 4, 114188 DEVLINK_TRAP_GENERIC_ID_PORT_LOOPBACK_FILTER = 5, 114189 DEVLINK_TRAP_GENERIC_ID_BLACKHOLE_ROUTE = 6, 114190 DEVLINK_TRAP_GENERIC_ID_TTL_ERROR = 7, 114191 DEVLINK_TRAP_GENERIC_ID_TAIL_DROP = 8, 114192 DEVLINK_TRAP_GENERIC_ID_NON_IP_PACKET = 9, 114193 DEVLINK_TRAP_GENERIC_ID_UC_DIP_MC_DMAC = 10, 114194 DEVLINK_TRAP_GENERIC_ID_DIP_LB = 11, 114195 DEVLINK_TRAP_GENERIC_ID_SIP_MC = 12, 114196 DEVLINK_TRAP_GENERIC_ID_SIP_LB = 13, 114197 DEVLINK_TRAP_GENERIC_ID_CORRUPTED_IP_HDR = 14, 114198 DEVLINK_TRAP_GENERIC_ID_IPV4_SIP_BC = 15, 114199 DEVLINK_TRAP_GENERIC_ID_IPV6_MC_DIP_RESERVED_SCOPE = 16, 114200 DEVLINK_TRAP_GENERIC_ID_IPV6_MC_DIP_INTERFACE_LOCAL_SCOPE = 17, 114201 DEVLINK_TRAP_GENERIC_ID_MTU_ERROR = 18, 114202 DEVLINK_TRAP_GENERIC_ID_UNRESOLVED_NEIGH = 19, 114203 DEVLINK_TRAP_GENERIC_ID_RPF = 20, 114204 DEVLINK_TRAP_GENERIC_ID_REJECT_ROUTE = 21, 114205 DEVLINK_TRAP_GENERIC_ID_IPV4_LPM_UNICAST_MISS = 22, 114206 DEVLINK_TRAP_GENERIC_ID_IPV6_LPM_UNICAST_MISS = 23, 114207 DEVLINK_TRAP_GENERIC_ID_NON_ROUTABLE = 24, 114208 DEVLINK_TRAP_GENERIC_ID_DECAP_ERROR = 25, 114209 DEVLINK_TRAP_GENERIC_ID_OVERLAY_SMAC_MC = 26, 114210 DEVLINK_TRAP_GENERIC_ID_INGRESS_FLOW_ACTION_DROP = 27, 114211 DEVLINK_TRAP_GENERIC_ID_EGRESS_FLOW_ACTION_DROP = 28, 114212 DEVLINK_TRAP_GENERIC_ID_STP = 29, 114213 DEVLINK_TRAP_GENERIC_ID_LACP = 30, 114214 DEVLINK_TRAP_GENERIC_ID_LLDP = 31, 114215 DEVLINK_TRAP_GENERIC_ID_IGMP_QUERY = 32, 114216 DEVLINK_TRAP_GENERIC_ID_IGMP_V1_REPORT = 33, 114217 DEVLINK_TRAP_GENERIC_ID_IGMP_V2_REPORT = 34, 114218 DEVLINK_TRAP_GENERIC_ID_IGMP_V3_REPORT = 35, 114219 DEVLINK_TRAP_GENERIC_ID_IGMP_V2_LEAVE = 36, 114220 DEVLINK_TRAP_GENERIC_ID_MLD_QUERY = 37, 114221 DEVLINK_TRAP_GENERIC_ID_MLD_V1_REPORT = 38, 114222 DEVLINK_TRAP_GENERIC_ID_MLD_V2_REPORT = 39, 114223 DEVLINK_TRAP_GENERIC_ID_MLD_V1_DONE = 40, 114224 DEVLINK_TRAP_GENERIC_ID_IPV4_DHCP = 41, 114225 DEVLINK_TRAP_GENERIC_ID_IPV6_DHCP = 42, 114226 DEVLINK_TRAP_GENERIC_ID_ARP_REQUEST = 43, 114227 DEVLINK_TRAP_GENERIC_ID_ARP_RESPONSE = 44, 114228 DEVLINK_TRAP_GENERIC_ID_ARP_OVERLAY = 45, 114229 DEVLINK_TRAP_GENERIC_ID_IPV6_NEIGH_SOLICIT = 46, 114230 DEVLINK_TRAP_GENERIC_ID_IPV6_NEIGH_ADVERT = 47, 114231 DEVLINK_TRAP_GENERIC_ID_IPV4_BFD = 48, 114232 DEVLINK_TRAP_GENERIC_ID_IPV6_BFD = 49, 114233 DEVLINK_TRAP_GENERIC_ID_IPV4_OSPF = 50, 114234 DEVLINK_TRAP_GENERIC_ID_IPV6_OSPF = 51, 114235 DEVLINK_TRAP_GENERIC_ID_IPV4_BGP = 52, 114236 DEVLINK_TRAP_GENERIC_ID_IPV6_BGP = 53, 114237 DEVLINK_TRAP_GENERIC_ID_IPV4_VRRP = 54, 114238 DEVLINK_TRAP_GENERIC_ID_IPV6_VRRP = 55, 114239 DEVLINK_TRAP_GENERIC_ID_IPV4_PIM = 56, 114240 DEVLINK_TRAP_GENERIC_ID_IPV6_PIM = 57, 114241 DEVLINK_TRAP_GENERIC_ID_UC_LB = 58, 114242 DEVLINK_TRAP_GENERIC_ID_LOCAL_ROUTE = 59, 114243 DEVLINK_TRAP_GENERIC_ID_EXTERNAL_ROUTE = 60, 114244 DEVLINK_TRAP_GENERIC_ID_IPV6_UC_DIP_LINK_LOCAL_SCOPE = 61, 114245 DEVLINK_TRAP_GENERIC_ID_IPV6_DIP_ALL_NODES = 62, 114246 DEVLINK_TRAP_GENERIC_ID_IPV6_DIP_ALL_ROUTERS = 63, 114247 DEVLINK_TRAP_GENERIC_ID_IPV6_ROUTER_SOLICIT = 64, 114248 DEVLINK_TRAP_GENERIC_ID_IPV6_ROUTER_ADVERT = 65, 114249 DEVLINK_TRAP_GENERIC_ID_IPV6_REDIRECT = 66, 114250 DEVLINK_TRAP_GENERIC_ID_IPV4_ROUTER_ALERT = 67, 114251 DEVLINK_TRAP_GENERIC_ID_IPV6_ROUTER_ALERT = 68, 114252 DEVLINK_TRAP_GENERIC_ID_PTP_EVENT = 69, 114253 DEVLINK_TRAP_GENERIC_ID_PTP_GENERAL = 70, 114254 DEVLINK_TRAP_GENERIC_ID_FLOW_ACTION_SAMPLE = 71, 114255 DEVLINK_TRAP_GENERIC_ID_FLOW_ACTION_TRAP = 72, 114256 DEVLINK_TRAP_GENERIC_ID_EARLY_DROP = 73, 114257 DEVLINK_TRAP_GENERIC_ID_VXLAN_PARSING = 74, 114258 DEVLINK_TRAP_GENERIC_ID_LLC_SNAP_PARSING = 75, 114259 DEVLINK_TRAP_GENERIC_ID_VLAN_PARSING = 76, 114260 DEVLINK_TRAP_GENERIC_ID_PPPOE_PPP_PARSING = 77, 114261 DEVLINK_TRAP_GENERIC_ID_MPLS_PARSING = 78, 114262 DEVLINK_TRAP_GENERIC_ID_ARP_PARSING = 79, 114263 DEVLINK_TRAP_GENERIC_ID_IP_1_PARSING = 80, 114264 DEVLINK_TRAP_GENERIC_ID_IP_N_PARSING = 81, 114265 DEVLINK_TRAP_GENERIC_ID_GRE_PARSING = 82, 114266 DEVLINK_TRAP_GENERIC_ID_UDP_PARSING = 83, 114267 DEVLINK_TRAP_GENERIC_ID_TCP_PARSING = 84, 114268 DEVLINK_TRAP_GENERIC_ID_IPSEC_PARSING = 85, 114269 DEVLINK_TRAP_GENERIC_ID_SCTP_PARSING = 86, 114270 DEVLINK_TRAP_GENERIC_ID_DCCP_PARSING = 87, 114271 DEVLINK_TRAP_GENERIC_ID_GTP_PARSING = 88, 114272 DEVLINK_TRAP_GENERIC_ID_ESP_PARSING = 89, 114273 DEVLINK_TRAP_GENERIC_ID_BLACKHOLE_NEXTHOP = 90, 114274 __DEVLINK_TRAP_GENERIC_ID_MAX = 91, 114275 DEVLINK_TRAP_GENERIC_ID_MAX = 90, 114276 }; 114277 114278 enum devlink_trap_group_generic_id { 114279 DEVLINK_TRAP_GROUP_GENERIC_ID_L2_DROPS = 0, 114280 DEVLINK_TRAP_GROUP_GENERIC_ID_L3_DROPS = 1, 114281 DEVLINK_TRAP_GROUP_GENERIC_ID_L3_EXCEPTIONS = 2, 114282 DEVLINK_TRAP_GROUP_GENERIC_ID_BUFFER_DROPS = 3, 114283 DEVLINK_TRAP_GROUP_GENERIC_ID_TUNNEL_DROPS = 4, 114284 DEVLINK_TRAP_GROUP_GENERIC_ID_ACL_DROPS = 5, 114285 DEVLINK_TRAP_GROUP_GENERIC_ID_STP = 6, 114286 DEVLINK_TRAP_GROUP_GENERIC_ID_LACP = 7, 114287 DEVLINK_TRAP_GROUP_GENERIC_ID_LLDP = 8, 114288 DEVLINK_TRAP_GROUP_GENERIC_ID_MC_SNOOPING = 9, 114289 DEVLINK_TRAP_GROUP_GENERIC_ID_DHCP = 10, 114290 DEVLINK_TRAP_GROUP_GENERIC_ID_NEIGH_DISCOVERY = 11, 114291 DEVLINK_TRAP_GROUP_GENERIC_ID_BFD = 12, 114292 DEVLINK_TRAP_GROUP_GENERIC_ID_OSPF = 13, 114293 DEVLINK_TRAP_GROUP_GENERIC_ID_BGP = 14, 114294 DEVLINK_TRAP_GROUP_GENERIC_ID_VRRP = 15, 114295 DEVLINK_TRAP_GROUP_GENERIC_ID_PIM = 16, 114296 DEVLINK_TRAP_GROUP_GENERIC_ID_UC_LB = 17, 114297 DEVLINK_TRAP_GROUP_GENERIC_ID_LOCAL_DELIVERY = 18, 114298 DEVLINK_TRAP_GROUP_GENERIC_ID_EXTERNAL_DELIVERY = 19, 114299 DEVLINK_TRAP_GROUP_GENERIC_ID_IPV6 = 20, 114300 DEVLINK_TRAP_GROUP_GENERIC_ID_PTP_EVENT = 21, 114301 DEVLINK_TRAP_GROUP_GENERIC_ID_PTP_GENERAL = 22, 114302 DEVLINK_TRAP_GROUP_GENERIC_ID_ACL_SAMPLE = 23, 114303 DEVLINK_TRAP_GROUP_GENERIC_ID_ACL_TRAP = 24, 114304 DEVLINK_TRAP_GROUP_GENERIC_ID_PARSER_ERROR_DROPS = 25, 114305 __DEVLINK_TRAP_GROUP_GENERIC_ID_MAX = 26, 114306 DEVLINK_TRAP_GROUP_GENERIC_ID_MAX = 25, 114307 }; 114308 114309 struct devlink_info_req { 114310 struct sk_buff *msg; 114311 }; 114312 114313 struct trace_event_raw_devlink_hwmsg { 114314 struct trace_entry ent; 114315 u32 __data_loc_bus_name; 114316 u32 __data_loc_dev_name; 114317 u32 __data_loc_driver_name; 114318 bool incoming; 114319 long unsigned int type; 114320 u32 __data_loc_buf; 114321 size_t len; 114322 char __data[0]; 114323 }; 114324 114325 struct trace_event_raw_devlink_hwerr { 114326 struct trace_entry ent; 114327 u32 __data_loc_bus_name; 114328 u32 __data_loc_dev_name; 114329 u32 __data_loc_driver_name; 114330 int err; 114331 u32 __data_loc_msg; 114332 char __data[0]; 114333 }; 114334 114335 struct trace_event_raw_devlink_health_report { 114336 struct trace_entry ent; 114337 u32 __data_loc_bus_name; 114338 u32 __data_loc_dev_name; 114339 u32 __data_loc_driver_name; 114340 u32 __data_loc_reporter_name; 114341 u32 __data_loc_msg; 114342 char __data[0]; 114343 }; 114344 114345 struct trace_event_raw_devlink_health_recover_aborted { 114346 struct trace_entry ent; 114347 u32 __data_loc_bus_name; 114348 u32 __data_loc_dev_name; 114349 u32 __data_loc_driver_name; 114350 u32 __data_loc_reporter_name; 114351 bool health_state; 114352 u64 time_since_last_recover; 114353 char __data[0]; 114354 }; 114355 114356 struct trace_event_raw_devlink_health_reporter_state_update { 114357 struct trace_entry ent; 114358 u32 __data_loc_bus_name; 114359 u32 __data_loc_dev_name; 114360 u32 __data_loc_driver_name; 114361 u32 __data_loc_reporter_name; 114362 u8 new_state; 114363 char __data[0]; 114364 }; 114365 114366 struct trace_event_raw_devlink_trap_report { 114367 struct trace_entry ent; 114368 u32 __data_loc_bus_name; 114369 u32 __data_loc_dev_name; 114370 u32 __data_loc_driver_name; 114371 u32 __data_loc_trap_name; 114372 u32 __data_loc_trap_group_name; 114373 u32 __data_loc_input_dev_name; 114374 char __data[0]; 114375 }; 114376 114377 struct trace_event_data_offsets_devlink_hwmsg { 114378 u32 bus_name; 114379 u32 dev_name; 114380 u32 driver_name; 114381 u32 buf; 114382 }; 114383 114384 struct trace_event_data_offsets_devlink_hwerr { 114385 u32 bus_name; 114386 u32 dev_name; 114387 u32 driver_name; 114388 u32 msg; 114389 }; 114390 114391 struct trace_event_data_offsets_devlink_health_report { 114392 u32 bus_name; 114393 u32 dev_name; 114394 u32 driver_name; 114395 u32 reporter_name; 114396 u32 msg; 114397 }; 114398 114399 struct trace_event_data_offsets_devlink_health_recover_aborted { 114400 u32 bus_name; 114401 u32 dev_name; 114402 u32 driver_name; 114403 u32 reporter_name; 114404 }; 114405 114406 struct trace_event_data_offsets_devlink_health_reporter_state_update { 114407 u32 bus_name; 114408 u32 dev_name; 114409 u32 driver_name; 114410 u32 reporter_name; 114411 }; 114412 114413 struct trace_event_data_offsets_devlink_trap_report { 114414 u32 bus_name; 114415 u32 dev_name; 114416 u32 driver_name; 114417 u32 trap_name; 114418 u32 trap_group_name; 114419 u32 input_dev_name; 114420 }; 114421 114422 typedef void (*btf_trace_devlink_hwmsg)(void *, const struct devlink *, bool, long unsigned int, const u8 *, size_t); 114423 114424 typedef void (*btf_trace_devlink_hwerr)(void *, const struct devlink *, int, const char *); 114425 114426 typedef void (*btf_trace_devlink_health_report)(void *, const struct devlink *, const char *, const char *); 114427 114428 typedef void (*btf_trace_devlink_health_recover_aborted)(void *, const struct devlink *, const char *, bool, u64); 114429 114430 typedef void (*btf_trace_devlink_health_reporter_state_update)(void *, const struct devlink *, const char *, bool); 114431 114432 typedef void (*btf_trace_devlink_trap_report)(void *, const struct devlink *, struct sk_buff *, const struct devlink_trap_metadata *); 114433 114434 struct devlink_sb { 114435 struct list_head list; 114436 unsigned int index; 114437 u32 size; 114438 u16 ingress_pools_count; 114439 u16 egress_pools_count; 114440 u16 ingress_tc_count; 114441 u16 egress_tc_count; 114442 }; 114443 114444 struct devlink_region { 114445 struct devlink *devlink; 114446 struct devlink_port *port; 114447 struct list_head list; 114448 union { 114449 const struct devlink_region_ops *ops; 114450 const struct devlink_port_region_ops *port_ops; 114451 }; 114452 struct list_head snapshot_list; 114453 u32 max_snapshots; 114454 u32 cur_snapshots; 114455 u64 size; 114456 }; 114457 114458 struct devlink_snapshot { 114459 struct list_head list; 114460 struct devlink_region *region; 114461 u8 *data; 114462 u32 id; 114463 }; 114464 114465 enum devlink_multicast_groups { 114466 DEVLINK_MCGRP_CONFIG = 0, 114467 }; 114468 114469 struct devlink_reload_combination { 114470 enum devlink_reload_action action; 114471 enum devlink_reload_limit limit; 114472 }; 114473 114474 struct devlink_fmsg_item { 114475 struct list_head list; 114476 int attrtype; 114477 u8 nla_type; 114478 u16 len; 114479 int value[0]; 114480 }; 114481 114482 struct devlink_stats { 114483 u64 rx_bytes; 114484 u64 rx_packets; 114485 struct u64_stats_sync syncp; 114486 }; 114487 114488 struct devlink_trap_policer_item { 114489 const struct devlink_trap_policer *policer; 114490 u64 rate; 114491 u64 burst; 114492 struct list_head list; 114493 }; 114494 114495 struct devlink_trap_group_item { 114496 const struct devlink_trap_group *group; 114497 struct devlink_trap_policer_item *policer_item; 114498 struct list_head list; 114499 struct devlink_stats *stats; 114500 }; 114501 114502 struct devlink_trap_item { 114503 const struct devlink_trap *trap; 114504 struct devlink_trap_group_item *group_item; 114505 struct list_head list; 114506 enum devlink_trap_action action; 114507 struct devlink_stats *stats; 114508 void *priv; 114509 }; 114510 114511 struct gro_cell; 114512 114513 struct gro_cells { 114514 struct gro_cell *cells; 114515 }; 114516 114517 struct gro_cell { 114518 struct sk_buff_head napi_skbs; 114519 struct napi_struct napi; 114520 }; 114521 114522 enum { 114523 SK_DIAG_BPF_STORAGE_REQ_NONE = 0, 114524 SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 1, 114525 __SK_DIAG_BPF_STORAGE_REQ_MAX = 2, 114526 }; 114527 114528 enum { 114529 SK_DIAG_BPF_STORAGE_REP_NONE = 0, 114530 SK_DIAG_BPF_STORAGE = 1, 114531 __SK_DIAG_BPF_STORAGE_REP_MAX = 2, 114532 }; 114533 114534 enum { 114535 SK_DIAG_BPF_STORAGE_NONE = 0, 114536 SK_DIAG_BPF_STORAGE_PAD = 1, 114537 SK_DIAG_BPF_STORAGE_MAP_ID = 2, 114538 SK_DIAG_BPF_STORAGE_MAP_VALUE = 3, 114539 __SK_DIAG_BPF_STORAGE_MAX = 4, 114540 }; 114541 114542 typedef u64 (*btf_bpf_sk_storage_get)(struct bpf_map *, struct sock *, void *, u64); 114543 114544 typedef u64 (*btf_bpf_sk_storage_delete)(struct bpf_map *, struct sock *); 114545 114546 typedef u64 (*btf_bpf_sk_storage_get_tracing)(struct bpf_map *, struct sock *, void *, u64); 114547 114548 typedef u64 (*btf_bpf_sk_storage_delete_tracing)(struct bpf_map *, struct sock *); 114549 114550 struct bpf_sk_storage_diag { 114551 u32 nr_maps; 114552 struct bpf_map *maps[0]; 114553 }; 114554 114555 struct bpf_iter_seq_sk_storage_map_info { 114556 struct bpf_map *map; 114557 unsigned int bucket_id; 114558 unsigned int skip_elems; 114559 }; 114560 114561 struct bpf_iter__bpf_sk_storage_map { 114562 union { 114563 struct bpf_iter_meta *meta; 114564 }; 114565 union { 114566 struct bpf_map *map; 114567 }; 114568 union { 114569 struct sock *sk; 114570 }; 114571 union { 114572 void *value; 114573 }; 114574 }; 114575 114576 struct compat_cmsghdr { 114577 compat_size_t cmsg_len; 114578 compat_int_t cmsg_level; 114579 compat_int_t cmsg_type; 114580 }; 114581 114582 typedef struct sk_buff * (*gro_receive_t)(struct list_head *, struct sk_buff *); 114583 114584 struct nvmem_cell___2; 114585 114586 struct fch_hdr { 114587 __u8 daddr[6]; 114588 __u8 saddr[6]; 114589 }; 114590 114591 struct fcllc { 114592 __u8 dsap; 114593 __u8 ssap; 114594 __u8 llc; 114595 __u8 protid[3]; 114596 __be16 ethertype; 114597 }; 114598 114599 enum macvlan_mode { 114600 MACVLAN_MODE_PRIVATE = 1, 114601 MACVLAN_MODE_VEPA = 2, 114602 MACVLAN_MODE_BRIDGE = 4, 114603 MACVLAN_MODE_PASSTHRU = 8, 114604 MACVLAN_MODE_SOURCE = 16, 114605 }; 114606 114607 struct tc_ratespec { 114608 unsigned char cell_log; 114609 __u8 linklayer; 114610 short unsigned int overhead; 114611 short int cell_align; 114612 short unsigned int mpu; 114613 __u32 rate; 114614 }; 114615 114616 struct tc_prio_qopt { 114617 int bands; 114618 __u8 priomap[16]; 114619 }; 114620 114621 enum { 114622 TCA_UNSPEC = 0, 114623 TCA_KIND = 1, 114624 TCA_OPTIONS = 2, 114625 TCA_STATS = 3, 114626 TCA_XSTATS = 4, 114627 TCA_RATE = 5, 114628 TCA_FCNT = 6, 114629 TCA_STATS2 = 7, 114630 TCA_STAB = 8, 114631 TCA_PAD = 9, 114632 TCA_DUMP_INVISIBLE = 10, 114633 TCA_CHAIN = 11, 114634 TCA_HW_OFFLOAD = 12, 114635 TCA_INGRESS_BLOCK = 13, 114636 TCA_EGRESS_BLOCK = 14, 114637 TCA_DUMP_FLAGS = 15, 114638 __TCA_MAX = 16, 114639 }; 114640 114641 struct vlan_pcpu_stats { 114642 u64 rx_packets; 114643 u64 rx_bytes; 114644 u64 rx_multicast; 114645 u64 tx_packets; 114646 u64 tx_bytes; 114647 struct u64_stats_sync syncp; 114648 u32 rx_errors; 114649 u32 tx_dropped; 114650 }; 114651 114652 struct netpoll___2; 114653 114654 struct skb_array { 114655 struct ptr_ring ring; 114656 }; 114657 114658 struct macvlan_port; 114659 114660 struct macvlan_dev { 114661 struct net_device *dev; 114662 struct list_head list; 114663 struct hlist_node hlist; 114664 struct macvlan_port *port; 114665 struct net_device *lowerdev; 114666 void *accel_priv; 114667 struct vlan_pcpu_stats *pcpu_stats; 114668 long unsigned int mc_filter[4]; 114669 netdev_features_t set_features; 114670 enum macvlan_mode mode; 114671 u16 flags; 114672 unsigned int macaddr_count; 114673 u32 bc_queue_len_req; 114674 struct netpoll___2 *netpoll; 114675 }; 114676 114677 struct psched_ratecfg { 114678 u64 rate_bytes_ps; 114679 u32 mult; 114680 u16 overhead; 114681 u8 linklayer; 114682 u8 shift; 114683 }; 114684 114685 struct mini_Qdisc_pair { 114686 struct mini_Qdisc miniq1; 114687 struct mini_Qdisc miniq2; 114688 struct mini_Qdisc **p_miniq; 114689 }; 114690 114691 struct pfifo_fast_priv { 114692 struct skb_array q[3]; 114693 }; 114694 114695 struct tc_qopt_offload_stats { 114696 struct gnet_stats_basic_packed *bstats; 114697 struct gnet_stats_queue *qstats; 114698 }; 114699 114700 enum tc_mq_command { 114701 TC_MQ_CREATE = 0, 114702 TC_MQ_DESTROY = 1, 114703 TC_MQ_STATS = 2, 114704 TC_MQ_GRAFT = 3, 114705 }; 114706 114707 struct tc_mq_opt_offload_graft_params { 114708 long unsigned int queue; 114709 u32 child_handle; 114710 }; 114711 114712 struct tc_mq_qopt_offload { 114713 enum tc_mq_command command; 114714 u32 handle; 114715 union { 114716 struct tc_qopt_offload_stats stats; 114717 struct tc_mq_opt_offload_graft_params graft_params; 114718 }; 114719 }; 114720 114721 struct mq_sched { 114722 struct Qdisc **qdiscs; 114723 }; 114724 114725 struct sch_frag_data { 114726 long unsigned int dst; 114727 struct qdisc_skb_cb cb; 114728 __be16 inner_protocol; 114729 u16 vlan_tci; 114730 __be16 vlan_proto; 114731 unsigned int l2_len; 114732 u8 l2_data[18]; 114733 int (*xmit)(struct sk_buff *); 114734 }; 114735 114736 enum tc_link_layer { 114737 TC_LINKLAYER_UNAWARE = 0, 114738 TC_LINKLAYER_ETHERNET = 1, 114739 TC_LINKLAYER_ATM = 2, 114740 }; 114741 114742 enum { 114743 TCA_STAB_UNSPEC = 0, 114744 TCA_STAB_BASE = 1, 114745 TCA_STAB_DATA = 2, 114746 __TCA_STAB_MAX = 3, 114747 }; 114748 114749 struct qdisc_rate_table { 114750 struct tc_ratespec rate; 114751 u32 data[256]; 114752 struct qdisc_rate_table *next; 114753 int refcnt; 114754 }; 114755 114756 struct Qdisc_class_common { 114757 u32 classid; 114758 struct hlist_node hnode; 114759 }; 114760 114761 struct Qdisc_class_hash { 114762 struct hlist_head *hash; 114763 unsigned int hashsize; 114764 unsigned int hashmask; 114765 unsigned int hashelems; 114766 }; 114767 114768 struct qdisc_watchdog { 114769 u64 last_expires; 114770 struct hrtimer timer; 114771 struct Qdisc *qdisc; 114772 }; 114773 114774 enum tc_root_command { 114775 TC_ROOT_GRAFT = 0, 114776 }; 114777 114778 struct tc_root_qopt_offload { 114779 enum tc_root_command command; 114780 u32 handle; 114781 bool ingress; 114782 }; 114783 114784 struct check_loop_arg { 114785 struct qdisc_walker w; 114786 struct Qdisc *p; 114787 int depth; 114788 }; 114789 114790 struct tcf_bind_args { 114791 struct tcf_walker w; 114792 long unsigned int base; 114793 long unsigned int cl; 114794 u32 classid; 114795 }; 114796 114797 struct tc_bind_class_args { 114798 struct qdisc_walker w; 114799 long unsigned int new_cl; 114800 u32 portid; 114801 u32 clid; 114802 }; 114803 114804 struct qdisc_dump_args { 114805 struct qdisc_walker w; 114806 struct sk_buff *skb; 114807 struct netlink_callback *cb; 114808 }; 114809 114810 enum net_xmit_qdisc_t { 114811 __NET_XMIT_STOLEN = 65536, 114812 __NET_XMIT_BYPASS = 131072, 114813 }; 114814 114815 struct tc_skb_ext { 114816 __u32 chain; 114817 __u16 mru; 114818 }; 114819 114820 enum { 114821 TCA_ACT_UNSPEC = 0, 114822 TCA_ACT_KIND = 1, 114823 TCA_ACT_OPTIONS = 2, 114824 TCA_ACT_INDEX = 3, 114825 TCA_ACT_STATS = 4, 114826 TCA_ACT_PAD = 5, 114827 TCA_ACT_COOKIE = 6, 114828 TCA_ACT_FLAGS = 7, 114829 TCA_ACT_HW_STATS = 8, 114830 TCA_ACT_USED_HW_STATS = 9, 114831 __TCA_ACT_MAX = 10, 114832 }; 114833 114834 enum tca_id { 114835 TCA_ID_UNSPEC = 0, 114836 TCA_ID_POLICE = 1, 114837 TCA_ID_GACT = 5, 114838 TCA_ID_IPT = 6, 114839 TCA_ID_PEDIT = 7, 114840 TCA_ID_MIRRED = 8, 114841 TCA_ID_NAT = 9, 114842 TCA_ID_XT = 10, 114843 TCA_ID_SKBEDIT = 11, 114844 TCA_ID_VLAN = 12, 114845 TCA_ID_BPF = 13, 114846 TCA_ID_CONNMARK = 14, 114847 TCA_ID_SKBMOD = 15, 114848 TCA_ID_CSUM = 16, 114849 TCA_ID_TUNNEL_KEY = 17, 114850 TCA_ID_SIMP = 22, 114851 TCA_ID_IFE = 25, 114852 TCA_ID_SAMPLE = 26, 114853 TCA_ID_CTINFO = 27, 114854 TCA_ID_MPLS = 28, 114855 TCA_ID_CT = 29, 114856 TCA_ID_GATE = 30, 114857 __TCA_ID_MAX = 255, 114858 }; 114859 114860 struct tcf_t { 114861 __u64 install; 114862 __u64 lastuse; 114863 __u64 expires; 114864 __u64 firstuse; 114865 }; 114866 114867 struct psample_group { 114868 struct list_head list; 114869 struct net *net; 114870 u32 group_num; 114871 u32 refcount; 114872 u32 seq; 114873 struct callback_head rcu; 114874 }; 114875 114876 struct action_gate_entry { 114877 u8 gate_state; 114878 u32 interval; 114879 s32 ipv; 114880 s32 maxoctets; 114881 }; 114882 114883 enum qdisc_class_ops_flags { 114884 QDISC_CLASS_OPS_DOIT_UNLOCKED = 1, 114885 }; 114886 114887 enum tcf_proto_ops_flags { 114888 TCF_PROTO_OPS_DOIT_UNLOCKED = 1, 114889 }; 114890 114891 typedef void tcf_chain_head_change_t(struct tcf_proto *, void *); 114892 114893 struct tcf_idrinfo { 114894 struct mutex lock; 114895 struct idr action_idr; 114896 struct net *net; 114897 }; 114898 114899 struct tc_action_ops; 114900 114901 struct tc_cookie; 114902 114903 struct tc_action { 114904 const struct tc_action_ops *ops; 114905 __u32 type; 114906 struct tcf_idrinfo *idrinfo; 114907 u32 tcfa_index; 114908 refcount_t tcfa_refcnt; 114909 atomic_t tcfa_bindcnt; 114910 int tcfa_action; 114911 struct tcf_t tcfa_tm; 114912 struct gnet_stats_basic_packed tcfa_bstats; 114913 struct gnet_stats_basic_packed tcfa_bstats_hw; 114914 struct gnet_stats_queue tcfa_qstats; 114915 struct net_rate_estimator *tcfa_rate_est; 114916 spinlock_t tcfa_lock; 114917 struct gnet_stats_basic_cpu *cpu_bstats; 114918 struct gnet_stats_basic_cpu *cpu_bstats_hw; 114919 struct gnet_stats_queue *cpu_qstats; 114920 struct tc_cookie *act_cookie; 114921 struct tcf_chain *goto_chain; 114922 u32 tcfa_flags; 114923 u8 hw_stats; 114924 u8 used_hw_stats; 114925 bool used_hw_stats_valid; 114926 }; 114927 114928 typedef void (*tc_action_priv_destructor)(void *); 114929 114930 struct tc_action_ops { 114931 struct list_head head; 114932 char kind[16]; 114933 enum tca_id id; 114934 size_t size; 114935 struct module *owner; 114936 int (*act)(struct sk_buff *, const struct tc_action *, struct tcf_result *); 114937 int (*dump)(struct sk_buff *, struct tc_action *, int, int); 114938 void (*cleanup)(struct tc_action *); 114939 int (*lookup)(struct net *, struct tc_action **, u32); 114940 int (*init)(struct net *, struct nlattr *, struct nlattr *, struct tc_action **, int, int, bool, struct tcf_proto *, u32, struct netlink_ext_ack *); 114941 int (*walk)(struct net *, struct sk_buff *, struct netlink_callback *, int, const struct tc_action_ops *, struct netlink_ext_ack *); 114942 void (*stats_update)(struct tc_action *, u64, u64, u64, u64, bool); 114943 size_t (*get_fill_size)(const struct tc_action *); 114944 struct net_device * (*get_dev)(const struct tc_action *, tc_action_priv_destructor *); 114945 struct psample_group * (*get_psample_group)(const struct tc_action *, tc_action_priv_destructor *); 114946 }; 114947 114948 struct tc_cookie { 114949 u8 *data; 114950 u32 len; 114951 struct callback_head rcu; 114952 }; 114953 114954 struct tcf_block_ext_info { 114955 enum flow_block_binder_type binder_type; 114956 tcf_chain_head_change_t *chain_head_change; 114957 void *chain_head_change_priv; 114958 u32 block_index; 114959 }; 114960 114961 struct tcf_qevent { 114962 struct tcf_block *block; 114963 struct tcf_block_ext_info info; 114964 struct tcf_proto *filter_chain; 114965 }; 114966 114967 struct tcf_exts { 114968 __u32 type; 114969 int nr_actions; 114970 struct tc_action **actions; 114971 struct net *net; 114972 int action; 114973 int police; 114974 }; 114975 114976 enum pedit_header_type { 114977 TCA_PEDIT_KEY_EX_HDR_TYPE_NETWORK = 0, 114978 TCA_PEDIT_KEY_EX_HDR_TYPE_ETH = 1, 114979 TCA_PEDIT_KEY_EX_HDR_TYPE_IP4 = 2, 114980 TCA_PEDIT_KEY_EX_HDR_TYPE_IP6 = 3, 114981 TCA_PEDIT_KEY_EX_HDR_TYPE_TCP = 4, 114982 TCA_PEDIT_KEY_EX_HDR_TYPE_UDP = 5, 114983 __PEDIT_HDR_TYPE_MAX = 6, 114984 }; 114985 114986 enum pedit_cmd { 114987 TCA_PEDIT_KEY_EX_CMD_SET = 0, 114988 TCA_PEDIT_KEY_EX_CMD_ADD = 1, 114989 __PEDIT_CMD_MAX = 2, 114990 }; 114991 114992 struct tc_pedit_key { 114993 __u32 mask; 114994 __u32 val; 114995 __u32 off; 114996 __u32 at; 114997 __u32 offmask; 114998 __u32 shift; 114999 }; 115000 115001 struct tcf_pedit_key_ex { 115002 enum pedit_header_type htype; 115003 enum pedit_cmd cmd; 115004 }; 115005 115006 struct tcf_pedit { 115007 struct tc_action common; 115008 unsigned char tcfp_nkeys; 115009 unsigned char tcfp_flags; 115010 struct tc_pedit_key *tcfp_keys; 115011 struct tcf_pedit_key_ex *tcfp_keys_ex; 115012 }; 115013 115014 struct tcf_mirred { 115015 struct tc_action common; 115016 int tcfm_eaction; 115017 bool tcfm_mac_header_xmit; 115018 struct net_device *tcfm_dev; 115019 struct list_head tcfm_list; 115020 }; 115021 115022 struct tcf_vlan_params { 115023 int tcfv_action; 115024 unsigned char tcfv_push_dst[6]; 115025 unsigned char tcfv_push_src[6]; 115026 u16 tcfv_push_vid; 115027 __be16 tcfv_push_proto; 115028 u8 tcfv_push_prio; 115029 struct callback_head rcu; 115030 }; 115031 115032 struct tcf_vlan { 115033 struct tc_action common; 115034 struct tcf_vlan_params *vlan_p; 115035 }; 115036 115037 struct tcf_tunnel_key_params { 115038 struct callback_head rcu; 115039 int tcft_action; 115040 struct metadata_dst *tcft_enc_metadata; 115041 }; 115042 115043 struct tcf_tunnel_key { 115044 struct tc_action common; 115045 struct tcf_tunnel_key_params *params; 115046 }; 115047 115048 struct tcf_csum_params { 115049 u32 update_flags; 115050 struct callback_head rcu; 115051 }; 115052 115053 struct tcf_csum { 115054 struct tc_action common; 115055 struct tcf_csum_params *params; 115056 }; 115057 115058 struct tcf_gact { 115059 struct tc_action common; 115060 u16 tcfg_ptype; 115061 u16 tcfg_pval; 115062 int tcfg_paction; 115063 atomic_t packets; 115064 }; 115065 115066 struct tcf_police_params { 115067 int tcfp_result; 115068 u32 tcfp_ewma_rate; 115069 s64 tcfp_burst; 115070 u32 tcfp_mtu; 115071 s64 tcfp_mtu_ptoks; 115072 struct psched_ratecfg rate; 115073 bool rate_present; 115074 struct psched_ratecfg peak; 115075 bool peak_present; 115076 struct callback_head rcu; 115077 }; 115078 115079 struct tcf_police { 115080 struct tc_action common; 115081 struct tcf_police_params *params; 115082 long: 64; 115083 long: 64; 115084 long: 64; 115085 long: 64; 115086 long: 64; 115087 long: 64; 115088 long: 64; 115089 spinlock_t tcfp_lock; 115090 s64 tcfp_toks; 115091 s64 tcfp_ptoks; 115092 s64 tcfp_t_c; 115093 long: 64; 115094 long: 64; 115095 long: 64; 115096 long: 64; 115097 }; 115098 115099 struct tcf_sample { 115100 struct tc_action common; 115101 u32 rate; 115102 bool truncate; 115103 u32 trunc_size; 115104 struct psample_group *psample_group; 115105 u32 psample_group_num; 115106 struct list_head tcfm_list; 115107 }; 115108 115109 struct tcf_skbedit_params { 115110 u32 flags; 115111 u32 priority; 115112 u32 mark; 115113 u32 mask; 115114 u16 queue_mapping; 115115 u16 ptype; 115116 struct callback_head rcu; 115117 }; 115118 115119 struct tcf_skbedit { 115120 struct tc_action common; 115121 struct tcf_skbedit_params *params; 115122 }; 115123 115124 struct nf_nat_range2 { 115125 unsigned int flags; 115126 union nf_inet_addr min_addr; 115127 union nf_inet_addr max_addr; 115128 union nf_conntrack_man_proto min_proto; 115129 union nf_conntrack_man_proto max_proto; 115130 union nf_conntrack_man_proto base_proto; 115131 }; 115132 115133 struct tcf_ct_flow_table; 115134 115135 struct tcf_ct_params { 115136 struct nf_conn *tmpl; 115137 u16 zone; 115138 u32 mark; 115139 u32 mark_mask; 115140 u32 labels[4]; 115141 u32 labels_mask[4]; 115142 struct nf_nat_range2 range; 115143 bool ipv4_range; 115144 u16 ct_action; 115145 struct callback_head rcu; 115146 struct tcf_ct_flow_table *ct_ft; 115147 struct nf_flowtable *nf_ft; 115148 }; 115149 115150 struct tcf_ct { 115151 struct tc_action common; 115152 struct tcf_ct_params *params; 115153 }; 115154 115155 struct tcf_mpls_params { 115156 int tcfm_action; 115157 u32 tcfm_label; 115158 u8 tcfm_tc; 115159 u8 tcfm_ttl; 115160 u8 tcfm_bos; 115161 __be16 tcfm_proto; 115162 struct callback_head rcu; 115163 }; 115164 115165 struct tcf_mpls { 115166 struct tc_action common; 115167 struct tcf_mpls_params *mpls_p; 115168 }; 115169 115170 struct tcfg_gate_entry { 115171 int index; 115172 u8 gate_state; 115173 u32 interval; 115174 s32 ipv; 115175 s32 maxoctets; 115176 struct list_head list; 115177 }; 115178 115179 struct tcf_gate_params { 115180 s32 tcfg_priority; 115181 u64 tcfg_basetime; 115182 u64 tcfg_cycletime; 115183 u64 tcfg_cycletime_ext; 115184 u32 tcfg_flags; 115185 s32 tcfg_clockid; 115186 size_t num_entries; 115187 struct list_head entries; 115188 }; 115189 115190 struct tcf_gate { 115191 struct tc_action common; 115192 struct tcf_gate_params param; 115193 u8 current_gate_status; 115194 ktime_t current_close_time; 115195 u32 current_entry_octets; 115196 s32 current_max_octets; 115197 struct tcfg_gate_entry *next_entry; 115198 struct hrtimer hitimer; 115199 enum tk_offsets tk_offset; 115200 }; 115201 115202 struct tcf_filter_chain_list_item { 115203 struct list_head list; 115204 tcf_chain_head_change_t *chain_head_change; 115205 void *chain_head_change_priv; 115206 }; 115207 115208 struct tcf_net { 115209 spinlock_t idr_lock; 115210 struct idr idr; 115211 }; 115212 115213 struct tcf_block_owner_item { 115214 struct list_head list; 115215 struct Qdisc *q; 115216 enum flow_block_binder_type binder_type; 115217 }; 115218 115219 struct tcf_chain_info { 115220 struct tcf_proto **pprev; 115221 struct tcf_proto *next; 115222 }; 115223 115224 struct tcf_dump_args { 115225 struct tcf_walker w; 115226 struct sk_buff *skb; 115227 struct netlink_callback *cb; 115228 struct tcf_block *block; 115229 struct Qdisc *q; 115230 u32 parent; 115231 bool terse_dump; 115232 }; 115233 115234 struct tcamsg { 115235 unsigned char tca_family; 115236 unsigned char tca__pad1; 115237 short unsigned int tca__pad2; 115238 }; 115239 115240 enum { 115241 TCA_ROOT_UNSPEC = 0, 115242 TCA_ROOT_TAB = 1, 115243 TCA_ROOT_FLAGS = 2, 115244 TCA_ROOT_COUNT = 3, 115245 TCA_ROOT_TIME_DELTA = 4, 115246 __TCA_ROOT_MAX = 5, 115247 }; 115248 115249 struct tc_action_net { 115250 struct tcf_idrinfo *idrinfo; 115251 const struct tc_action_ops *ops; 115252 }; 115253 115254 struct tc_fifo_qopt { 115255 __u32 limit; 115256 }; 115257 115258 enum tc_fifo_command { 115259 TC_FIFO_REPLACE = 0, 115260 TC_FIFO_DESTROY = 1, 115261 TC_FIFO_STATS = 2, 115262 }; 115263 115264 struct tc_fifo_qopt_offload { 115265 enum tc_fifo_command command; 115266 u32 handle; 115267 u32 parent; 115268 union { 115269 struct tc_qopt_offload_stats stats; 115270 }; 115271 }; 115272 115273 enum { 115274 TCA_FQ_CODEL_UNSPEC = 0, 115275 TCA_FQ_CODEL_TARGET = 1, 115276 TCA_FQ_CODEL_LIMIT = 2, 115277 TCA_FQ_CODEL_INTERVAL = 3, 115278 TCA_FQ_CODEL_ECN = 4, 115279 TCA_FQ_CODEL_FLOWS = 5, 115280 TCA_FQ_CODEL_QUANTUM = 6, 115281 TCA_FQ_CODEL_CE_THRESHOLD = 7, 115282 TCA_FQ_CODEL_DROP_BATCH_SIZE = 8, 115283 TCA_FQ_CODEL_MEMORY_LIMIT = 9, 115284 __TCA_FQ_CODEL_MAX = 10, 115285 }; 115286 115287 enum { 115288 TCA_FQ_CODEL_XSTATS_QDISC = 0, 115289 TCA_FQ_CODEL_XSTATS_CLASS = 1, 115290 }; 115291 115292 struct tc_fq_codel_qd_stats { 115293 __u32 maxpacket; 115294 __u32 drop_overlimit; 115295 __u32 ecn_mark; 115296 __u32 new_flow_count; 115297 __u32 new_flows_len; 115298 __u32 old_flows_len; 115299 __u32 ce_mark; 115300 __u32 memory_usage; 115301 __u32 drop_overmemory; 115302 }; 115303 115304 struct tc_fq_codel_cl_stats { 115305 __s32 deficit; 115306 __u32 ldelay; 115307 __u32 count; 115308 __u32 lastcount; 115309 __u32 dropping; 115310 __s32 drop_next; 115311 }; 115312 115313 struct tc_fq_codel_xstats { 115314 __u32 type; 115315 union { 115316 struct tc_fq_codel_qd_stats qdisc_stats; 115317 struct tc_fq_codel_cl_stats class_stats; 115318 }; 115319 }; 115320 115321 typedef u32 codel_time_t; 115322 115323 typedef s32 codel_tdiff_t; 115324 115325 struct codel_params { 115326 codel_time_t target; 115327 codel_time_t ce_threshold; 115328 codel_time_t interval; 115329 u32 mtu; 115330 bool ecn; 115331 }; 115332 115333 struct codel_vars { 115334 u32 count; 115335 u32 lastcount; 115336 bool dropping; 115337 u16 rec_inv_sqrt; 115338 codel_time_t first_above_time; 115339 codel_time_t drop_next; 115340 codel_time_t ldelay; 115341 }; 115342 115343 struct codel_stats { 115344 u32 maxpacket; 115345 u32 drop_count; 115346 u32 drop_len; 115347 u32 ecn_mark; 115348 u32 ce_mark; 115349 }; 115350 115351 typedef u32 (*codel_skb_len_t)(const struct sk_buff *); 115352 115353 typedef codel_time_t (*codel_skb_time_t)(const struct sk_buff *); 115354 115355 typedef void (*codel_skb_drop_t)(struct sk_buff *, void *); 115356 115357 typedef struct sk_buff * (*codel_skb_dequeue_t)(struct codel_vars *, void *); 115358 115359 struct codel_skb_cb { 115360 codel_time_t enqueue_time; 115361 unsigned int mem_usage; 115362 }; 115363 115364 struct fq_codel_flow { 115365 struct sk_buff *head; 115366 struct sk_buff *tail; 115367 struct list_head flowchain; 115368 int deficit; 115369 struct codel_vars cvars; 115370 }; 115371 115372 struct fq_codel_sched_data { 115373 struct tcf_proto *filter_list; 115374 struct tcf_block *block; 115375 struct fq_codel_flow *flows; 115376 u32 *backlogs; 115377 u32 flows_cnt; 115378 u32 quantum; 115379 u32 drop_batch_size; 115380 u32 memory_limit; 115381 struct codel_params cparams; 115382 struct codel_stats cstats; 115383 u32 memory_usage; 115384 u32 drop_overmemory; 115385 u32 drop_overlimit; 115386 u32 new_flow_count; 115387 struct list_head new_flows; 115388 struct list_head old_flows; 115389 }; 115390 115391 enum { 115392 TCA_CGROUP_UNSPEC = 0, 115393 TCA_CGROUP_ACT = 1, 115394 TCA_CGROUP_POLICE = 2, 115395 TCA_CGROUP_EMATCHES = 3, 115396 __TCA_CGROUP_MAX = 4, 115397 }; 115398 115399 struct tcf_ematch_tree_hdr { 115400 __u16 nmatches; 115401 __u16 progid; 115402 }; 115403 115404 struct tcf_pkt_info { 115405 unsigned char *ptr; 115406 int nexthdr; 115407 }; 115408 115409 struct tcf_ematch_ops; 115410 115411 struct tcf_ematch { 115412 struct tcf_ematch_ops *ops; 115413 long unsigned int data; 115414 unsigned int datalen; 115415 u16 matchid; 115416 u16 flags; 115417 struct net *net; 115418 }; 115419 115420 struct tcf_ematch_ops { 115421 int kind; 115422 int datalen; 115423 int (*change)(struct net *, void *, int, struct tcf_ematch *); 115424 int (*match)(struct sk_buff *, struct tcf_ematch *, struct tcf_pkt_info *); 115425 void (*destroy)(struct tcf_ematch *); 115426 int (*dump)(struct sk_buff *, struct tcf_ematch *); 115427 struct module *owner; 115428 struct list_head link; 115429 }; 115430 115431 struct tcf_ematch_tree { 115432 struct tcf_ematch_tree_hdr hdr; 115433 struct tcf_ematch *matches; 115434 }; 115435 115436 struct cls_cgroup_head { 115437 u32 handle; 115438 struct tcf_exts exts; 115439 struct tcf_ematch_tree ematches; 115440 struct tcf_proto *tp; 115441 struct rcu_work rwork; 115442 }; 115443 115444 enum { 115445 TCA_EMATCH_TREE_UNSPEC = 0, 115446 TCA_EMATCH_TREE_HDR = 1, 115447 TCA_EMATCH_TREE_LIST = 2, 115448 __TCA_EMATCH_TREE_MAX = 3, 115449 }; 115450 115451 struct tcf_ematch_hdr { 115452 __u16 matchid; 115453 __u16 kind; 115454 __u16 flags; 115455 __u16 pad; 115456 }; 115457 115458 struct sockaddr_nl { 115459 __kernel_sa_family_t nl_family; 115460 short unsigned int nl_pad; 115461 __u32 nl_pid; 115462 __u32 nl_groups; 115463 }; 115464 115465 struct nlmsgerr { 115466 int error; 115467 struct nlmsghdr msg; 115468 }; 115469 115470 enum nlmsgerr_attrs { 115471 NLMSGERR_ATTR_UNUSED = 0, 115472 NLMSGERR_ATTR_MSG = 1, 115473 NLMSGERR_ATTR_OFFS = 2, 115474 NLMSGERR_ATTR_COOKIE = 3, 115475 NLMSGERR_ATTR_POLICY = 4, 115476 __NLMSGERR_ATTR_MAX = 5, 115477 NLMSGERR_ATTR_MAX = 4, 115478 }; 115479 115480 struct nl_pktinfo { 115481 __u32 group; 115482 }; 115483 115484 enum { 115485 NETLINK_UNCONNECTED = 0, 115486 NETLINK_CONNECTED = 1, 115487 }; 115488 115489 enum netlink_skb_flags { 115490 NETLINK_SKB_DST = 8, 115491 }; 115492 115493 struct netlink_notify { 115494 struct net *net; 115495 u32 portid; 115496 int protocol; 115497 }; 115498 115499 struct netlink_tap { 115500 struct net_device *dev; 115501 struct module *module; 115502 struct list_head list; 115503 }; 115504 115505 struct netlink_sock { 115506 struct sock sk; 115507 u32 portid; 115508 u32 dst_portid; 115509 u32 dst_group; 115510 u32 flags; 115511 u32 subscriptions; 115512 u32 ngroups; 115513 long unsigned int *groups; 115514 long unsigned int state; 115515 size_t max_recvmsg_len; 115516 wait_queue_head_t wait; 115517 bool bound; 115518 bool cb_running; 115519 int dump_done_errno; 115520 struct netlink_callback cb; 115521 struct mutex *cb_mutex; 115522 struct mutex cb_def_mutex; 115523 void (*netlink_rcv)(struct sk_buff *); 115524 int (*netlink_bind)(struct net *, int); 115525 void (*netlink_unbind)(struct net *, int); 115526 struct module *module; 115527 struct rhash_head node; 115528 struct callback_head rcu; 115529 struct work_struct work; 115530 }; 115531 115532 struct listeners; 115533 115534 struct netlink_table { 115535 struct rhashtable hash; 115536 struct hlist_head mc_list; 115537 struct listeners *listeners; 115538 unsigned int flags; 115539 unsigned int groups; 115540 struct mutex *cb_mutex; 115541 struct module *module; 115542 int (*bind)(struct net *, int); 115543 void (*unbind)(struct net *, int); 115544 bool (*compare)(struct net *, struct sock *); 115545 int registered; 115546 }; 115547 115548 struct listeners { 115549 struct callback_head rcu; 115550 long unsigned int masks[0]; 115551 }; 115552 115553 struct netlink_tap_net { 115554 struct list_head netlink_tap_all; 115555 struct mutex netlink_tap_lock; 115556 }; 115557 115558 struct netlink_compare_arg { 115559 possible_net_t pnet; 115560 u32 portid; 115561 }; 115562 115563 struct netlink_broadcast_data { 115564 struct sock *exclude_sk; 115565 struct net *net; 115566 u32 portid; 115567 u32 group; 115568 int failure; 115569 int delivery_failure; 115570 int congested; 115571 int delivered; 115572 gfp_t allocation; 115573 struct sk_buff *skb; 115574 struct sk_buff *skb2; 115575 int (*tx_filter)(struct sock *, struct sk_buff *, void *); 115576 void *tx_data; 115577 }; 115578 115579 struct netlink_set_err_data { 115580 struct sock *exclude_sk; 115581 u32 portid; 115582 u32 group; 115583 int code; 115584 }; 115585 115586 struct nl_seq_iter { 115587 struct seq_net_private p; 115588 struct rhashtable_iter hti; 115589 int link; 115590 }; 115591 115592 struct bpf_iter__netlink { 115593 union { 115594 struct bpf_iter_meta *meta; 115595 }; 115596 union { 115597 struct netlink_sock *sk; 115598 }; 115599 }; 115600 115601 enum { 115602 CTRL_CMD_UNSPEC = 0, 115603 CTRL_CMD_NEWFAMILY = 1, 115604 CTRL_CMD_DELFAMILY = 2, 115605 CTRL_CMD_GETFAMILY = 3, 115606 CTRL_CMD_NEWOPS = 4, 115607 CTRL_CMD_DELOPS = 5, 115608 CTRL_CMD_GETOPS = 6, 115609 CTRL_CMD_NEWMCAST_GRP = 7, 115610 CTRL_CMD_DELMCAST_GRP = 8, 115611 CTRL_CMD_GETMCAST_GRP = 9, 115612 CTRL_CMD_GETPOLICY = 10, 115613 __CTRL_CMD_MAX = 11, 115614 }; 115615 115616 enum { 115617 CTRL_ATTR_UNSPEC = 0, 115618 CTRL_ATTR_FAMILY_ID = 1, 115619 CTRL_ATTR_FAMILY_NAME = 2, 115620 CTRL_ATTR_VERSION = 3, 115621 CTRL_ATTR_HDRSIZE = 4, 115622 CTRL_ATTR_MAXATTR = 5, 115623 CTRL_ATTR_OPS = 6, 115624 CTRL_ATTR_MCAST_GROUPS = 7, 115625 CTRL_ATTR_POLICY = 8, 115626 CTRL_ATTR_OP_POLICY = 9, 115627 CTRL_ATTR_OP = 10, 115628 __CTRL_ATTR_MAX = 11, 115629 }; 115630 115631 enum { 115632 CTRL_ATTR_OP_UNSPEC = 0, 115633 CTRL_ATTR_OP_ID = 1, 115634 CTRL_ATTR_OP_FLAGS = 2, 115635 __CTRL_ATTR_OP_MAX = 3, 115636 }; 115637 115638 enum { 115639 CTRL_ATTR_MCAST_GRP_UNSPEC = 0, 115640 CTRL_ATTR_MCAST_GRP_NAME = 1, 115641 CTRL_ATTR_MCAST_GRP_ID = 2, 115642 __CTRL_ATTR_MCAST_GRP_MAX = 3, 115643 }; 115644 115645 enum { 115646 CTRL_ATTR_POLICY_UNSPEC = 0, 115647 CTRL_ATTR_POLICY_DO = 1, 115648 CTRL_ATTR_POLICY_DUMP = 2, 115649 __CTRL_ATTR_POLICY_DUMP_MAX = 3, 115650 CTRL_ATTR_POLICY_DUMP_MAX = 2, 115651 }; 115652 115653 struct genl_start_context { 115654 const struct genl_family *family; 115655 struct nlmsghdr *nlh; 115656 struct netlink_ext_ack *extack; 115657 const struct genl_ops *ops; 115658 int hdrlen; 115659 }; 115660 115661 struct netlink_policy_dump_state; 115662 115663 struct ctrl_dump_policy_ctx { 115664 struct netlink_policy_dump_state *state; 115665 const struct genl_family *rt; 115666 unsigned int opidx; 115667 u32 op; 115668 u16 fam_id; 115669 u8 policies: 1; 115670 u8 single_op: 1; 115671 }; 115672 115673 enum netlink_attribute_type { 115674 NL_ATTR_TYPE_INVALID = 0, 115675 NL_ATTR_TYPE_FLAG = 1, 115676 NL_ATTR_TYPE_U8 = 2, 115677 NL_ATTR_TYPE_U16 = 3, 115678 NL_ATTR_TYPE_U32 = 4, 115679 NL_ATTR_TYPE_U64 = 5, 115680 NL_ATTR_TYPE_S8 = 6, 115681 NL_ATTR_TYPE_S16 = 7, 115682 NL_ATTR_TYPE_S32 = 8, 115683 NL_ATTR_TYPE_S64 = 9, 115684 NL_ATTR_TYPE_BINARY = 10, 115685 NL_ATTR_TYPE_STRING = 11, 115686 NL_ATTR_TYPE_NUL_STRING = 12, 115687 NL_ATTR_TYPE_NESTED = 13, 115688 NL_ATTR_TYPE_NESTED_ARRAY = 14, 115689 NL_ATTR_TYPE_BITFIELD32 = 15, 115690 }; 115691 115692 enum netlink_policy_type_attr { 115693 NL_POLICY_TYPE_ATTR_UNSPEC = 0, 115694 NL_POLICY_TYPE_ATTR_TYPE = 1, 115695 NL_POLICY_TYPE_ATTR_MIN_VALUE_S = 2, 115696 NL_POLICY_TYPE_ATTR_MAX_VALUE_S = 3, 115697 NL_POLICY_TYPE_ATTR_MIN_VALUE_U = 4, 115698 NL_POLICY_TYPE_ATTR_MAX_VALUE_U = 5, 115699 NL_POLICY_TYPE_ATTR_MIN_LENGTH = 6, 115700 NL_POLICY_TYPE_ATTR_MAX_LENGTH = 7, 115701 NL_POLICY_TYPE_ATTR_POLICY_IDX = 8, 115702 NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE = 9, 115703 NL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 10, 115704 NL_POLICY_TYPE_ATTR_PAD = 11, 115705 NL_POLICY_TYPE_ATTR_MASK = 12, 115706 __NL_POLICY_TYPE_ATTR_MAX = 13, 115707 NL_POLICY_TYPE_ATTR_MAX = 12, 115708 }; 115709 115710 struct netlink_policy_dump_state___2 { 115711 unsigned int policy_idx; 115712 unsigned int attr_idx; 115713 unsigned int n_alloc; 115714 struct { 115715 const struct nla_policy *policy; 115716 unsigned int maxtype; 115717 } policies[0]; 115718 }; 115719 115720 struct trace_event_raw_bpf_test_finish { 115721 struct trace_entry ent; 115722 int err; 115723 char __data[0]; 115724 }; 115725 115726 struct trace_event_data_offsets_bpf_test_finish {}; 115727 115728 typedef void (*btf_trace_bpf_test_finish)(void *, int *); 115729 115730 struct bpf_fentry_test_t { 115731 struct bpf_fentry_test_t *a; 115732 }; 115733 115734 struct bpf_raw_tp_test_run_info { 115735 struct bpf_prog *prog; 115736 void *ctx; 115737 u32 retval; 115738 }; 115739 115740 struct ethtool_cmd { 115741 __u32 cmd; 115742 __u32 supported; 115743 __u32 advertising; 115744 __u16 speed; 115745 __u8 duplex; 115746 __u8 port; 115747 __u8 phy_address; 115748 __u8 transceiver; 115749 __u8 autoneg; 115750 __u8 mdio_support; 115751 __u32 maxtxpkt; 115752 __u32 maxrxpkt; 115753 __u16 speed_hi; 115754 __u8 eth_tp_mdix; 115755 __u8 eth_tp_mdix_ctrl; 115756 __u32 lp_advertising; 115757 __u32 reserved[2]; 115758 }; 115759 115760 struct ethtool_value { 115761 __u32 cmd; 115762 __u32 data; 115763 }; 115764 115765 enum tunable_id { 115766 ETHTOOL_ID_UNSPEC = 0, 115767 ETHTOOL_RX_COPYBREAK = 1, 115768 ETHTOOL_TX_COPYBREAK = 2, 115769 ETHTOOL_PFC_PREVENTION_TOUT = 3, 115770 __ETHTOOL_TUNABLE_COUNT = 4, 115771 }; 115772 115773 enum tunable_type_id { 115774 ETHTOOL_TUNABLE_UNSPEC = 0, 115775 ETHTOOL_TUNABLE_U8 = 1, 115776 ETHTOOL_TUNABLE_U16 = 2, 115777 ETHTOOL_TUNABLE_U32 = 3, 115778 ETHTOOL_TUNABLE_U64 = 4, 115779 ETHTOOL_TUNABLE_STRING = 5, 115780 ETHTOOL_TUNABLE_S8 = 6, 115781 ETHTOOL_TUNABLE_S16 = 7, 115782 ETHTOOL_TUNABLE_S32 = 8, 115783 ETHTOOL_TUNABLE_S64 = 9, 115784 }; 115785 115786 enum phy_tunable_id { 115787 ETHTOOL_PHY_ID_UNSPEC = 0, 115788 ETHTOOL_PHY_DOWNSHIFT = 1, 115789 ETHTOOL_PHY_FAST_LINK_DOWN = 2, 115790 ETHTOOL_PHY_EDPD = 3, 115791 __ETHTOOL_PHY_TUNABLE_COUNT = 4, 115792 }; 115793 115794 enum ethtool_stringset { 115795 ETH_SS_TEST = 0, 115796 ETH_SS_STATS = 1, 115797 ETH_SS_PRIV_FLAGS = 2, 115798 ETH_SS_NTUPLE_FILTERS = 3, 115799 ETH_SS_FEATURES = 4, 115800 ETH_SS_RSS_HASH_FUNCS = 5, 115801 ETH_SS_TUNABLES = 6, 115802 ETH_SS_PHY_STATS = 7, 115803 ETH_SS_PHY_TUNABLES = 8, 115804 ETH_SS_LINK_MODES = 9, 115805 ETH_SS_MSG_CLASSES = 10, 115806 ETH_SS_WOL_MODES = 11, 115807 ETH_SS_SOF_TIMESTAMPING = 12, 115808 ETH_SS_TS_TX_TYPES = 13, 115809 ETH_SS_TS_RX_FILTERS = 14, 115810 ETH_SS_UDP_TUNNEL_TYPES = 15, 115811 ETH_SS_COUNT = 16, 115812 }; 115813 115814 struct ethtool_gstrings { 115815 __u32 cmd; 115816 __u32 string_set; 115817 __u32 len; 115818 __u8 data[0]; 115819 }; 115820 115821 struct ethtool_sset_info { 115822 __u32 cmd; 115823 __u32 reserved; 115824 __u64 sset_mask; 115825 __u32 data[0]; 115826 }; 115827 115828 struct ethtool_perm_addr { 115829 __u32 cmd; 115830 __u32 size; 115831 __u8 data[0]; 115832 }; 115833 115834 enum ethtool_flags { 115835 ETH_FLAG_TXVLAN = 128, 115836 ETH_FLAG_RXVLAN = 256, 115837 ETH_FLAG_LRO = 32768, 115838 ETH_FLAG_NTUPLE = 134217728, 115839 ETH_FLAG_RXHASH = 268435456, 115840 }; 115841 115842 struct ethtool_rxfh { 115843 __u32 cmd; 115844 __u32 rss_context; 115845 __u32 indir_size; 115846 __u32 key_size; 115847 __u8 hfunc; 115848 __u8 rsvd8[3]; 115849 __u32 rsvd32; 115850 __u32 rss_config[0]; 115851 }; 115852 115853 struct ethtool_get_features_block { 115854 __u32 available; 115855 __u32 requested; 115856 __u32 active; 115857 __u32 never_changed; 115858 }; 115859 115860 struct ethtool_gfeatures { 115861 __u32 cmd; 115862 __u32 size; 115863 struct ethtool_get_features_block features[0]; 115864 }; 115865 115866 struct ethtool_set_features_block { 115867 __u32 valid; 115868 __u32 requested; 115869 }; 115870 115871 struct ethtool_sfeatures { 115872 __u32 cmd; 115873 __u32 size; 115874 struct ethtool_set_features_block features[0]; 115875 }; 115876 115877 enum ethtool_sfeatures_retval_bits { 115878 ETHTOOL_F_UNSUPPORTED__BIT = 0, 115879 ETHTOOL_F_WISH__BIT = 1, 115880 ETHTOOL_F_COMPAT__BIT = 2, 115881 }; 115882 115883 struct ethtool_per_queue_op { 115884 __u32 cmd; 115885 __u32 sub_command; 115886 __u32 queue_mask[128]; 115887 char data[0]; 115888 }; 115889 115890 enum { 115891 ETH_RSS_HASH_TOP_BIT = 0, 115892 ETH_RSS_HASH_XOR_BIT = 1, 115893 ETH_RSS_HASH_CRC32_BIT = 2, 115894 ETH_RSS_HASH_FUNCS_COUNT = 3, 115895 }; 115896 115897 struct ethtool_rx_flow_rule { 115898 struct flow_rule *rule; 115899 long unsigned int priv[0]; 115900 }; 115901 115902 struct ethtool_rx_flow_spec_input { 115903 const struct ethtool_rx_flow_spec *fs; 115904 u32 rss_ctx; 115905 }; 115906 115907 struct ethtool_link_usettings { 115908 struct ethtool_link_settings base; 115909 struct { 115910 __u32 supported[3]; 115911 __u32 advertising[3]; 115912 __u32 lp_advertising[3]; 115913 } link_modes; 115914 }; 115915 115916 struct ethtool_rx_flow_key { 115917 struct flow_dissector_key_basic basic; 115918 union { 115919 struct flow_dissector_key_ipv4_addrs ipv4; 115920 struct flow_dissector_key_ipv6_addrs ipv6; 115921 }; 115922 struct flow_dissector_key_ports tp; 115923 struct flow_dissector_key_ip ip; 115924 struct flow_dissector_key_vlan vlan; 115925 struct flow_dissector_key_eth_addrs eth_addrs; 115926 long: 48; 115927 }; 115928 115929 struct ethtool_rx_flow_match { 115930 struct flow_dissector dissector; 115931 int: 32; 115932 struct ethtool_rx_flow_key key; 115933 struct ethtool_rx_flow_key mask; 115934 }; 115935 115936 enum { 115937 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN = 0, 115938 ETHTOOL_UDP_TUNNEL_TYPE_GENEVE = 1, 115939 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE = 2, 115940 __ETHTOOL_UDP_TUNNEL_TYPE_CNT = 3, 115941 }; 115942 115943 enum { 115944 ETHTOOL_MSG_USER_NONE = 0, 115945 ETHTOOL_MSG_STRSET_GET = 1, 115946 ETHTOOL_MSG_LINKINFO_GET = 2, 115947 ETHTOOL_MSG_LINKINFO_SET = 3, 115948 ETHTOOL_MSG_LINKMODES_GET = 4, 115949 ETHTOOL_MSG_LINKMODES_SET = 5, 115950 ETHTOOL_MSG_LINKSTATE_GET = 6, 115951 ETHTOOL_MSG_DEBUG_GET = 7, 115952 ETHTOOL_MSG_DEBUG_SET = 8, 115953 ETHTOOL_MSG_WOL_GET = 9, 115954 ETHTOOL_MSG_WOL_SET = 10, 115955 ETHTOOL_MSG_FEATURES_GET = 11, 115956 ETHTOOL_MSG_FEATURES_SET = 12, 115957 ETHTOOL_MSG_PRIVFLAGS_GET = 13, 115958 ETHTOOL_MSG_PRIVFLAGS_SET = 14, 115959 ETHTOOL_MSG_RINGS_GET = 15, 115960 ETHTOOL_MSG_RINGS_SET = 16, 115961 ETHTOOL_MSG_CHANNELS_GET = 17, 115962 ETHTOOL_MSG_CHANNELS_SET = 18, 115963 ETHTOOL_MSG_COALESCE_GET = 19, 115964 ETHTOOL_MSG_COALESCE_SET = 20, 115965 ETHTOOL_MSG_PAUSE_GET = 21, 115966 ETHTOOL_MSG_PAUSE_SET = 22, 115967 ETHTOOL_MSG_EEE_GET = 23, 115968 ETHTOOL_MSG_EEE_SET = 24, 115969 ETHTOOL_MSG_TSINFO_GET = 25, 115970 ETHTOOL_MSG_CABLE_TEST_ACT = 26, 115971 ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 27, 115972 ETHTOOL_MSG_TUNNEL_INFO_GET = 28, 115973 __ETHTOOL_MSG_USER_CNT = 29, 115974 ETHTOOL_MSG_USER_MAX = 28, 115975 }; 115976 115977 enum { 115978 ETHTOOL_A_HEADER_UNSPEC = 0, 115979 ETHTOOL_A_HEADER_DEV_INDEX = 1, 115980 ETHTOOL_A_HEADER_DEV_NAME = 2, 115981 ETHTOOL_A_HEADER_FLAGS = 3, 115982 __ETHTOOL_A_HEADER_CNT = 4, 115983 ETHTOOL_A_HEADER_MAX = 3, 115984 }; 115985 115986 enum { 115987 ETHTOOL_A_STRSET_UNSPEC = 0, 115988 ETHTOOL_A_STRSET_HEADER = 1, 115989 ETHTOOL_A_STRSET_STRINGSETS = 2, 115990 ETHTOOL_A_STRSET_COUNTS_ONLY = 3, 115991 __ETHTOOL_A_STRSET_CNT = 4, 115992 ETHTOOL_A_STRSET_MAX = 3, 115993 }; 115994 115995 enum { 115996 ETHTOOL_A_LINKINFO_UNSPEC = 0, 115997 ETHTOOL_A_LINKINFO_HEADER = 1, 115998 ETHTOOL_A_LINKINFO_PORT = 2, 115999 ETHTOOL_A_LINKINFO_PHYADDR = 3, 116000 ETHTOOL_A_LINKINFO_TP_MDIX = 4, 116001 ETHTOOL_A_LINKINFO_TP_MDIX_CTRL = 5, 116002 ETHTOOL_A_LINKINFO_TRANSCEIVER = 6, 116003 __ETHTOOL_A_LINKINFO_CNT = 7, 116004 ETHTOOL_A_LINKINFO_MAX = 6, 116005 }; 116006 116007 enum { 116008 ETHTOOL_A_LINKMODES_UNSPEC = 0, 116009 ETHTOOL_A_LINKMODES_HEADER = 1, 116010 ETHTOOL_A_LINKMODES_AUTONEG = 2, 116011 ETHTOOL_A_LINKMODES_OURS = 3, 116012 ETHTOOL_A_LINKMODES_PEER = 4, 116013 ETHTOOL_A_LINKMODES_SPEED = 5, 116014 ETHTOOL_A_LINKMODES_DUPLEX = 6, 116015 ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG = 7, 116016 ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE = 8, 116017 __ETHTOOL_A_LINKMODES_CNT = 9, 116018 ETHTOOL_A_LINKMODES_MAX = 8, 116019 }; 116020 116021 enum { 116022 ETHTOOL_A_LINKSTATE_UNSPEC = 0, 116023 ETHTOOL_A_LINKSTATE_HEADER = 1, 116024 ETHTOOL_A_LINKSTATE_LINK = 2, 116025 ETHTOOL_A_LINKSTATE_SQI = 3, 116026 ETHTOOL_A_LINKSTATE_SQI_MAX = 4, 116027 ETHTOOL_A_LINKSTATE_EXT_STATE = 5, 116028 ETHTOOL_A_LINKSTATE_EXT_SUBSTATE = 6, 116029 __ETHTOOL_A_LINKSTATE_CNT = 7, 116030 ETHTOOL_A_LINKSTATE_MAX = 6, 116031 }; 116032 116033 enum { 116034 ETHTOOL_A_DEBUG_UNSPEC = 0, 116035 ETHTOOL_A_DEBUG_HEADER = 1, 116036 ETHTOOL_A_DEBUG_MSGMASK = 2, 116037 __ETHTOOL_A_DEBUG_CNT = 3, 116038 ETHTOOL_A_DEBUG_MAX = 2, 116039 }; 116040 116041 enum { 116042 ETHTOOL_A_WOL_UNSPEC = 0, 116043 ETHTOOL_A_WOL_HEADER = 1, 116044 ETHTOOL_A_WOL_MODES = 2, 116045 ETHTOOL_A_WOL_SOPASS = 3, 116046 __ETHTOOL_A_WOL_CNT = 4, 116047 ETHTOOL_A_WOL_MAX = 3, 116048 }; 116049 116050 enum { 116051 ETHTOOL_A_FEATURES_UNSPEC = 0, 116052 ETHTOOL_A_FEATURES_HEADER = 1, 116053 ETHTOOL_A_FEATURES_HW = 2, 116054 ETHTOOL_A_FEATURES_WANTED = 3, 116055 ETHTOOL_A_FEATURES_ACTIVE = 4, 116056 ETHTOOL_A_FEATURES_NOCHANGE = 5, 116057 __ETHTOOL_A_FEATURES_CNT = 6, 116058 ETHTOOL_A_FEATURES_MAX = 5, 116059 }; 116060 116061 enum { 116062 ETHTOOL_A_PRIVFLAGS_UNSPEC = 0, 116063 ETHTOOL_A_PRIVFLAGS_HEADER = 1, 116064 ETHTOOL_A_PRIVFLAGS_FLAGS = 2, 116065 __ETHTOOL_A_PRIVFLAGS_CNT = 3, 116066 ETHTOOL_A_PRIVFLAGS_MAX = 2, 116067 }; 116068 116069 enum { 116070 ETHTOOL_A_RINGS_UNSPEC = 0, 116071 ETHTOOL_A_RINGS_HEADER = 1, 116072 ETHTOOL_A_RINGS_RX_MAX = 2, 116073 ETHTOOL_A_RINGS_RX_MINI_MAX = 3, 116074 ETHTOOL_A_RINGS_RX_JUMBO_MAX = 4, 116075 ETHTOOL_A_RINGS_TX_MAX = 5, 116076 ETHTOOL_A_RINGS_RX = 6, 116077 ETHTOOL_A_RINGS_RX_MINI = 7, 116078 ETHTOOL_A_RINGS_RX_JUMBO = 8, 116079 ETHTOOL_A_RINGS_TX = 9, 116080 __ETHTOOL_A_RINGS_CNT = 10, 116081 ETHTOOL_A_RINGS_MAX = 9, 116082 }; 116083 116084 enum { 116085 ETHTOOL_A_CHANNELS_UNSPEC = 0, 116086 ETHTOOL_A_CHANNELS_HEADER = 1, 116087 ETHTOOL_A_CHANNELS_RX_MAX = 2, 116088 ETHTOOL_A_CHANNELS_TX_MAX = 3, 116089 ETHTOOL_A_CHANNELS_OTHER_MAX = 4, 116090 ETHTOOL_A_CHANNELS_COMBINED_MAX = 5, 116091 ETHTOOL_A_CHANNELS_RX_COUNT = 6, 116092 ETHTOOL_A_CHANNELS_TX_COUNT = 7, 116093 ETHTOOL_A_CHANNELS_OTHER_COUNT = 8, 116094 ETHTOOL_A_CHANNELS_COMBINED_COUNT = 9, 116095 __ETHTOOL_A_CHANNELS_CNT = 10, 116096 ETHTOOL_A_CHANNELS_MAX = 9, 116097 }; 116098 116099 enum { 116100 ETHTOOL_A_COALESCE_UNSPEC = 0, 116101 ETHTOOL_A_COALESCE_HEADER = 1, 116102 ETHTOOL_A_COALESCE_RX_USECS = 2, 116103 ETHTOOL_A_COALESCE_RX_MAX_FRAMES = 3, 116104 ETHTOOL_A_COALESCE_RX_USECS_IRQ = 4, 116105 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ = 5, 116106 ETHTOOL_A_COALESCE_TX_USECS = 6, 116107 ETHTOOL_A_COALESCE_TX_MAX_FRAMES = 7, 116108 ETHTOOL_A_COALESCE_TX_USECS_IRQ = 8, 116109 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ = 9, 116110 ETHTOOL_A_COALESCE_STATS_BLOCK_USECS = 10, 116111 ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX = 11, 116112 ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX = 12, 116113 ETHTOOL_A_COALESCE_PKT_RATE_LOW = 13, 116114 ETHTOOL_A_COALESCE_RX_USECS_LOW = 14, 116115 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW = 15, 116116 ETHTOOL_A_COALESCE_TX_USECS_LOW = 16, 116117 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW = 17, 116118 ETHTOOL_A_COALESCE_PKT_RATE_HIGH = 18, 116119 ETHTOOL_A_COALESCE_RX_USECS_HIGH = 19, 116120 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH = 20, 116121 ETHTOOL_A_COALESCE_TX_USECS_HIGH = 21, 116122 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = 22, 116123 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 23, 116124 __ETHTOOL_A_COALESCE_CNT = 24, 116125 ETHTOOL_A_COALESCE_MAX = 23, 116126 }; 116127 116128 enum { 116129 ETHTOOL_A_PAUSE_UNSPEC = 0, 116130 ETHTOOL_A_PAUSE_HEADER = 1, 116131 ETHTOOL_A_PAUSE_AUTONEG = 2, 116132 ETHTOOL_A_PAUSE_RX = 3, 116133 ETHTOOL_A_PAUSE_TX = 4, 116134 ETHTOOL_A_PAUSE_STATS = 5, 116135 __ETHTOOL_A_PAUSE_CNT = 6, 116136 ETHTOOL_A_PAUSE_MAX = 5, 116137 }; 116138 116139 enum { 116140 ETHTOOL_A_EEE_UNSPEC = 0, 116141 ETHTOOL_A_EEE_HEADER = 1, 116142 ETHTOOL_A_EEE_MODES_OURS = 2, 116143 ETHTOOL_A_EEE_MODES_PEER = 3, 116144 ETHTOOL_A_EEE_ACTIVE = 4, 116145 ETHTOOL_A_EEE_ENABLED = 5, 116146 ETHTOOL_A_EEE_TX_LPI_ENABLED = 6, 116147 ETHTOOL_A_EEE_TX_LPI_TIMER = 7, 116148 __ETHTOOL_A_EEE_CNT = 8, 116149 ETHTOOL_A_EEE_MAX = 7, 116150 }; 116151 116152 enum { 116153 ETHTOOL_A_TSINFO_UNSPEC = 0, 116154 ETHTOOL_A_TSINFO_HEADER = 1, 116155 ETHTOOL_A_TSINFO_TIMESTAMPING = 2, 116156 ETHTOOL_A_TSINFO_TX_TYPES = 3, 116157 ETHTOOL_A_TSINFO_RX_FILTERS = 4, 116158 ETHTOOL_A_TSINFO_PHC_INDEX = 5, 116159 __ETHTOOL_A_TSINFO_CNT = 6, 116160 ETHTOOL_A_TSINFO_MAX = 5, 116161 }; 116162 116163 enum { 116164 ETHTOOL_A_CABLE_TEST_UNSPEC = 0, 116165 ETHTOOL_A_CABLE_TEST_HEADER = 1, 116166 __ETHTOOL_A_CABLE_TEST_CNT = 2, 116167 ETHTOOL_A_CABLE_TEST_MAX = 1, 116168 }; 116169 116170 enum { 116171 ETHTOOL_A_CABLE_TEST_TDR_UNSPEC = 0, 116172 ETHTOOL_A_CABLE_TEST_TDR_HEADER = 1, 116173 ETHTOOL_A_CABLE_TEST_TDR_CFG = 2, 116174 __ETHTOOL_A_CABLE_TEST_TDR_CNT = 3, 116175 ETHTOOL_A_CABLE_TEST_TDR_MAX = 2, 116176 }; 116177 116178 enum { 116179 ETHTOOL_A_TUNNEL_INFO_UNSPEC = 0, 116180 ETHTOOL_A_TUNNEL_INFO_HEADER = 1, 116181 ETHTOOL_A_TUNNEL_INFO_UDP_PORTS = 2, 116182 __ETHTOOL_A_TUNNEL_INFO_CNT = 3, 116183 ETHTOOL_A_TUNNEL_INFO_MAX = 2, 116184 }; 116185 116186 enum ethtool_multicast_groups { 116187 ETHNL_MCGRP_MONITOR = 0, 116188 }; 116189 116190 struct ethnl_req_info { 116191 struct net_device *dev; 116192 u32 flags; 116193 }; 116194 116195 struct ethnl_reply_data { 116196 struct net_device *dev; 116197 }; 116198 116199 struct ethnl_request_ops { 116200 u8 request_cmd; 116201 u8 reply_cmd; 116202 u16 hdr_attr; 116203 unsigned int req_info_size; 116204 unsigned int reply_data_size; 116205 bool allow_nodev_do; 116206 int (*parse_request)(struct ethnl_req_info *, struct nlattr **, struct netlink_ext_ack *); 116207 int (*prepare_data)(const struct ethnl_req_info *, struct ethnl_reply_data *, struct genl_info *); 116208 int (*reply_size)(const struct ethnl_req_info *, const struct ethnl_reply_data *); 116209 int (*fill_reply)(struct sk_buff *, const struct ethnl_req_info *, const struct ethnl_reply_data *); 116210 void (*cleanup_data)(struct ethnl_reply_data *); 116211 }; 116212 116213 struct ethnl_dump_ctx { 116214 const struct ethnl_request_ops *ops; 116215 struct ethnl_req_info *req_info; 116216 struct ethnl_reply_data *reply_data; 116217 int pos_hash; 116218 int pos_idx; 116219 }; 116220 116221 typedef void (*ethnl_notify_handler_t)(struct net_device *, unsigned int, const void *); 116222 116223 enum { 116224 ETHTOOL_A_BITSET_BIT_UNSPEC = 0, 116225 ETHTOOL_A_BITSET_BIT_INDEX = 1, 116226 ETHTOOL_A_BITSET_BIT_NAME = 2, 116227 ETHTOOL_A_BITSET_BIT_VALUE = 3, 116228 __ETHTOOL_A_BITSET_BIT_CNT = 4, 116229 ETHTOOL_A_BITSET_BIT_MAX = 3, 116230 }; 116231 116232 enum { 116233 ETHTOOL_A_BITSET_BITS_UNSPEC = 0, 116234 ETHTOOL_A_BITSET_BITS_BIT = 1, 116235 __ETHTOOL_A_BITSET_BITS_CNT = 2, 116236 ETHTOOL_A_BITSET_BITS_MAX = 1, 116237 }; 116238 116239 enum { 116240 ETHTOOL_A_BITSET_UNSPEC = 0, 116241 ETHTOOL_A_BITSET_NOMASK = 1, 116242 ETHTOOL_A_BITSET_SIZE = 2, 116243 ETHTOOL_A_BITSET_BITS = 3, 116244 ETHTOOL_A_BITSET_VALUE = 4, 116245 ETHTOOL_A_BITSET_MASK = 5, 116246 __ETHTOOL_A_BITSET_CNT = 6, 116247 ETHTOOL_A_BITSET_MAX = 5, 116248 }; 116249 116250 typedef const char (* const ethnl_string_array_t)[32]; 116251 116252 enum { 116253 ETHTOOL_A_STRING_UNSPEC = 0, 116254 ETHTOOL_A_STRING_INDEX = 1, 116255 ETHTOOL_A_STRING_VALUE = 2, 116256 __ETHTOOL_A_STRING_CNT = 3, 116257 ETHTOOL_A_STRING_MAX = 2, 116258 }; 116259 116260 enum { 116261 ETHTOOL_A_STRINGS_UNSPEC = 0, 116262 ETHTOOL_A_STRINGS_STRING = 1, 116263 __ETHTOOL_A_STRINGS_CNT = 2, 116264 ETHTOOL_A_STRINGS_MAX = 1, 116265 }; 116266 116267 enum { 116268 ETHTOOL_A_STRINGSET_UNSPEC = 0, 116269 ETHTOOL_A_STRINGSET_ID = 1, 116270 ETHTOOL_A_STRINGSET_COUNT = 2, 116271 ETHTOOL_A_STRINGSET_STRINGS = 3, 116272 __ETHTOOL_A_STRINGSET_CNT = 4, 116273 ETHTOOL_A_STRINGSET_MAX = 3, 116274 }; 116275 116276 enum { 116277 ETHTOOL_A_STRINGSETS_UNSPEC = 0, 116278 ETHTOOL_A_STRINGSETS_STRINGSET = 1, 116279 __ETHTOOL_A_STRINGSETS_CNT = 2, 116280 ETHTOOL_A_STRINGSETS_MAX = 1, 116281 }; 116282 116283 struct strset_info { 116284 bool per_dev; 116285 bool free_strings; 116286 unsigned int count; 116287 const char (*strings)[32]; 116288 }; 116289 116290 struct strset_req_info { 116291 struct ethnl_req_info base; 116292 u32 req_ids; 116293 bool counts_only; 116294 }; 116295 116296 struct strset_reply_data { 116297 struct ethnl_reply_data base; 116298 struct strset_info sets[16]; 116299 }; 116300 116301 struct linkinfo_reply_data { 116302 struct ethnl_reply_data base; 116303 struct ethtool_link_ksettings ksettings; 116304 struct ethtool_link_settings *lsettings; 116305 }; 116306 116307 struct linkmodes_reply_data { 116308 struct ethnl_reply_data base; 116309 struct ethtool_link_ksettings ksettings; 116310 struct ethtool_link_settings *lsettings; 116311 bool peer_empty; 116312 }; 116313 116314 struct link_mode_info { 116315 int speed; 116316 u8 duplex; 116317 }; 116318 116319 struct linkstate_reply_data { 116320 struct ethnl_reply_data base; 116321 int link; 116322 int sqi; 116323 int sqi_max; 116324 bool link_ext_state_provided; 116325 struct ethtool_link_ext_state_info ethtool_link_ext_state_info; 116326 }; 116327 116328 struct debug_reply_data { 116329 struct ethnl_reply_data base; 116330 u32 msg_mask; 116331 }; 116332 116333 struct wol_reply_data { 116334 struct ethnl_reply_data base; 116335 struct ethtool_wolinfo wol; 116336 bool show_sopass; 116337 }; 116338 116339 struct features_reply_data { 116340 struct ethnl_reply_data base; 116341 u32 hw[2]; 116342 u32 wanted[2]; 116343 u32 active[2]; 116344 u32 nochange[2]; 116345 u32 all[2]; 116346 }; 116347 116348 struct privflags_reply_data { 116349 struct ethnl_reply_data base; 116350 const char (*priv_flag_names)[32]; 116351 unsigned int n_priv_flags; 116352 u32 priv_flags; 116353 }; 116354 116355 struct rings_reply_data { 116356 struct ethnl_reply_data base; 116357 struct ethtool_ringparam ringparam; 116358 }; 116359 116360 struct channels_reply_data { 116361 struct ethnl_reply_data base; 116362 struct ethtool_channels channels; 116363 }; 116364 116365 struct coalesce_reply_data { 116366 struct ethnl_reply_data base; 116367 struct ethtool_coalesce coalesce; 116368 u32 supported_params; 116369 }; 116370 116371 enum { 116372 ETHTOOL_A_PAUSE_STAT_UNSPEC = 0, 116373 ETHTOOL_A_PAUSE_STAT_PAD = 1, 116374 ETHTOOL_A_PAUSE_STAT_TX_FRAMES = 2, 116375 ETHTOOL_A_PAUSE_STAT_RX_FRAMES = 3, 116376 __ETHTOOL_A_PAUSE_STAT_CNT = 4, 116377 ETHTOOL_A_PAUSE_STAT_MAX = 3, 116378 }; 116379 116380 struct pause_reply_data { 116381 struct ethnl_reply_data base; 116382 struct ethtool_pauseparam pauseparam; 116383 struct ethtool_pause_stats pausestat; 116384 }; 116385 116386 struct eee_reply_data { 116387 struct ethnl_reply_data base; 116388 struct ethtool_eee eee; 116389 }; 116390 116391 struct tsinfo_reply_data { 116392 struct ethnl_reply_data base; 116393 struct ethtool_ts_info ts_info; 116394 }; 116395 116396 enum { 116397 ETHTOOL_A_CABLE_PAIR_A = 0, 116398 ETHTOOL_A_CABLE_PAIR_B = 1, 116399 ETHTOOL_A_CABLE_PAIR_C = 2, 116400 ETHTOOL_A_CABLE_PAIR_D = 3, 116401 }; 116402 116403 enum { 116404 ETHTOOL_A_CABLE_RESULT_UNSPEC = 0, 116405 ETHTOOL_A_CABLE_RESULT_PAIR = 1, 116406 ETHTOOL_A_CABLE_RESULT_CODE = 2, 116407 __ETHTOOL_A_CABLE_RESULT_CNT = 3, 116408 ETHTOOL_A_CABLE_RESULT_MAX = 2, 116409 }; 116410 116411 enum { 116412 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0, 116413 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 1, 116414 ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 2, 116415 __ETHTOOL_A_CABLE_FAULT_LENGTH_CNT = 3, 116416 ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 2, 116417 }; 116418 116419 enum { 116420 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0, 116421 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 1, 116422 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 2, 116423 }; 116424 116425 enum { 116426 ETHTOOL_A_CABLE_NEST_UNSPEC = 0, 116427 ETHTOOL_A_CABLE_NEST_RESULT = 1, 116428 ETHTOOL_A_CABLE_NEST_FAULT_LENGTH = 2, 116429 __ETHTOOL_A_CABLE_NEST_CNT = 3, 116430 ETHTOOL_A_CABLE_NEST_MAX = 2, 116431 }; 116432 116433 enum { 116434 ETHTOOL_A_CABLE_TEST_NTF_UNSPEC = 0, 116435 ETHTOOL_A_CABLE_TEST_NTF_HEADER = 1, 116436 ETHTOOL_A_CABLE_TEST_NTF_STATUS = 2, 116437 ETHTOOL_A_CABLE_TEST_NTF_NEST = 3, 116438 __ETHTOOL_A_CABLE_TEST_NTF_CNT = 4, 116439 ETHTOOL_A_CABLE_TEST_NTF_MAX = 3, 116440 }; 116441 116442 enum { 116443 ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC = 0, 116444 ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST = 1, 116445 ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST = 2, 116446 ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP = 3, 116447 ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR = 4, 116448 __ETHTOOL_A_CABLE_TEST_TDR_CFG_CNT = 5, 116449 ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = 4, 116450 }; 116451 116452 enum { 116453 ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC = 0, 116454 ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 1, 116455 ETHTOOL_A_CABLE_AMPLITUDE_mV = 2, 116456 __ETHTOOL_A_CABLE_AMPLITUDE_CNT = 3, 116457 ETHTOOL_A_CABLE_AMPLITUDE_MAX = 2, 116458 }; 116459 116460 enum { 116461 ETHTOOL_A_CABLE_PULSE_UNSPEC = 0, 116462 ETHTOOL_A_CABLE_PULSE_mV = 1, 116463 __ETHTOOL_A_CABLE_PULSE_CNT = 2, 116464 ETHTOOL_A_CABLE_PULSE_MAX = 1, 116465 }; 116466 116467 enum { 116468 ETHTOOL_A_CABLE_STEP_UNSPEC = 0, 116469 ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE = 1, 116470 ETHTOOL_A_CABLE_STEP_LAST_DISTANCE = 2, 116471 ETHTOOL_A_CABLE_STEP_STEP_DISTANCE = 3, 116472 __ETHTOOL_A_CABLE_STEP_CNT = 4, 116473 ETHTOOL_A_CABLE_STEP_MAX = 3, 116474 }; 116475 116476 enum { 116477 ETHTOOL_A_CABLE_TDR_NEST_UNSPEC = 0, 116478 ETHTOOL_A_CABLE_TDR_NEST_STEP = 1, 116479 ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE = 2, 116480 ETHTOOL_A_CABLE_TDR_NEST_PULSE = 3, 116481 __ETHTOOL_A_CABLE_TDR_NEST_CNT = 4, 116482 ETHTOOL_A_CABLE_TDR_NEST_MAX = 3, 116483 }; 116484 116485 enum { 116486 ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC = 0, 116487 ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT = 1, 116488 ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE = 2, 116489 __ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT = 3, 116490 ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = 2, 116491 }; 116492 116493 enum { 116494 ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC = 0, 116495 ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE = 1, 116496 ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES = 2, 116497 ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY = 3, 116498 __ETHTOOL_A_TUNNEL_UDP_TABLE_CNT = 4, 116499 ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = 3, 116500 }; 116501 116502 enum { 116503 ETHTOOL_A_TUNNEL_UDP_UNSPEC = 0, 116504 ETHTOOL_A_TUNNEL_UDP_TABLE = 1, 116505 __ETHTOOL_A_TUNNEL_UDP_CNT = 2, 116506 ETHTOOL_A_TUNNEL_UDP_MAX = 1, 116507 }; 116508 116509 enum udp_parsable_tunnel_type { 116510 UDP_TUNNEL_TYPE_VXLAN = 1, 116511 UDP_TUNNEL_TYPE_GENEVE = 2, 116512 UDP_TUNNEL_TYPE_VXLAN_GPE = 4, 116513 }; 116514 116515 enum udp_tunnel_nic_info_flags { 116516 UDP_TUNNEL_NIC_INFO_MAY_SLEEP = 1, 116517 UDP_TUNNEL_NIC_INFO_OPEN_ONLY = 2, 116518 UDP_TUNNEL_NIC_INFO_IPV4_ONLY = 4, 116519 UDP_TUNNEL_NIC_INFO_STATIC_IANA_VXLAN = 8, 116520 }; 116521 116522 struct udp_tunnel_nic_ops { 116523 void (*get_port)(struct net_device *, unsigned int, unsigned int, struct udp_tunnel_info *); 116524 void (*set_port_priv)(struct net_device *, unsigned int, unsigned int, u8); 116525 void (*add_port)(struct net_device *, struct udp_tunnel_info *); 116526 void (*del_port)(struct net_device *, struct udp_tunnel_info *); 116527 void (*reset_ntf)(struct net_device *); 116528 size_t (*dump_size)(struct net_device *, unsigned int); 116529 int (*dump_write)(struct net_device *, unsigned int, struct sk_buff *); 116530 }; 116531 116532 struct ethnl_tunnel_info_dump_ctx { 116533 struct ethnl_req_info req_info; 116534 int pos_hash; 116535 int pos_idx; 116536 }; 116537 116538 struct nf_hook_entries_rcu_head { 116539 struct callback_head head; 116540 void *allocation; 116541 }; 116542 116543 struct nf_conn___2; 116544 116545 enum nf_nat_manip_type; 116546 116547 struct nf_nat_hook { 116548 int (*parse_nat_setup)(struct nf_conn___2 *, enum nf_nat_manip_type, const struct nlattr *); 116549 void (*decode_session)(struct sk_buff *, struct flowi *); 116550 unsigned int (*manip_pkt)(struct sk_buff *, struct nf_conn___2 *, enum nf_nat_manip_type, enum ip_conntrack_dir); 116551 }; 116552 116553 struct nf_conntrack_tuple___2; 116554 116555 struct nf_ct_hook { 116556 int (*update)(struct net *, struct sk_buff *); 116557 void (*destroy)(struct nf_conntrack *); 116558 bool (*get_tuple_skb)(struct nf_conntrack_tuple___2 *, const struct sk_buff *); 116559 }; 116560 116561 struct nfnl_ct_hook { 116562 struct nf_conn___2 * (*get_ct)(const struct sk_buff *, enum ip_conntrack_info *); 116563 size_t (*build_size)(const struct nf_conn___2 *); 116564 int (*build)(struct sk_buff *, struct nf_conn___2 *, enum ip_conntrack_info, u_int16_t, u_int16_t); 116565 int (*parse)(const struct nlattr *, struct nf_conn___2 *); 116566 int (*attach_expect)(const struct nlattr *, struct nf_conn___2 *, u32, u32); 116567 void (*seq_adjust)(struct sk_buff *, struct nf_conn___2 *, enum ip_conntrack_info, s32); 116568 }; 116569 116570 struct nf_ipv6_ops { 116571 void (*route_input)(struct sk_buff *); 116572 int (*fragment)(struct net *, struct sock *, struct sk_buff *, int (*)(struct net *, struct sock *, struct sk_buff *)); 116573 int (*reroute)(struct sk_buff *, const struct nf_queue_entry *); 116574 }; 116575 116576 struct nf_queue_entry { 116577 struct list_head list; 116578 struct sk_buff *skb; 116579 unsigned int id; 116580 unsigned int hook_index; 116581 struct net_device *physin; 116582 struct net_device *physout; 116583 struct nf_hook_state state; 116584 u16 size; 116585 }; 116586 116587 struct nf_loginfo { 116588 u_int8_t type; 116589 union { 116590 struct { 116591 u_int32_t copy_len; 116592 u_int16_t group; 116593 u_int16_t qthreshold; 116594 u_int16_t flags; 116595 } ulog; 116596 struct { 116597 u_int8_t level; 116598 u_int8_t logflags; 116599 } log; 116600 } u; 116601 }; 116602 116603 struct nf_log_buf { 116604 unsigned int count; 116605 char buf[1020]; 116606 }; 116607 116608 struct nf_bridge_info { 116609 enum { 116610 BRNF_PROTO_UNCHANGED = 0, 116611 BRNF_PROTO_8021Q = 1, 116612 BRNF_PROTO_PPPOE = 2, 116613 } orig_proto: 8; 116614 u8 pkt_otherhost: 1; 116615 u8 in_prerouting: 1; 116616 u8 bridged_dnat: 1; 116617 __u16 frag_max_size; 116618 struct net_device *physindev; 116619 struct net_device *physoutdev; 116620 union { 116621 __be32 ipv4_daddr; 116622 struct in6_addr ipv6_daddr; 116623 char neigh_header[8]; 116624 }; 116625 }; 116626 116627 struct ip_rt_info { 116628 __be32 daddr; 116629 __be32 saddr; 116630 u_int8_t tos; 116631 u_int32_t mark; 116632 }; 116633 116634 struct ip6_rt_info { 116635 struct in6_addr daddr; 116636 struct in6_addr saddr; 116637 u_int32_t mark; 116638 }; 116639 116640 struct nf_sockopt_ops { 116641 struct list_head list; 116642 u_int8_t pf; 116643 int set_optmin; 116644 int set_optmax; 116645 int (*set)(struct sock *, int, sockptr_t, unsigned int); 116646 int get_optmin; 116647 int get_optmax; 116648 int (*get)(struct sock *, int, void *, int *); 116649 struct module *owner; 116650 }; 116651 116652 struct xt_action_param; 116653 116654 struct xt_mtchk_param; 116655 116656 struct xt_mtdtor_param; 116657 116658 struct xt_match { 116659 struct list_head list; 116660 const char name[29]; 116661 u_int8_t revision; 116662 bool (*match)(const struct sk_buff *, struct xt_action_param *); 116663 int (*checkentry)(const struct xt_mtchk_param *); 116664 void (*destroy)(const struct xt_mtdtor_param *); 116665 void (*compat_from_user)(void *, const void *); 116666 int (*compat_to_user)(void *, const void *); 116667 struct module *me; 116668 const char *table; 116669 unsigned int matchsize; 116670 unsigned int usersize; 116671 unsigned int compatsize; 116672 unsigned int hooks; 116673 short unsigned int proto; 116674 short unsigned int family; 116675 }; 116676 116677 struct xt_entry_match { 116678 union { 116679 struct { 116680 __u16 match_size; 116681 char name[29]; 116682 __u8 revision; 116683 } user; 116684 struct { 116685 __u16 match_size; 116686 struct xt_match *match; 116687 } kernel; 116688 __u16 match_size; 116689 } u; 116690 unsigned char data[0]; 116691 }; 116692 116693 struct xt_tgchk_param; 116694 116695 struct xt_tgdtor_param; 116696 116697 struct xt_target { 116698 struct list_head list; 116699 const char name[29]; 116700 u_int8_t revision; 116701 unsigned int (*target)(struct sk_buff *, const struct xt_action_param *); 116702 int (*checkentry)(const struct xt_tgchk_param *); 116703 void (*destroy)(const struct xt_tgdtor_param *); 116704 void (*compat_from_user)(void *, const void *); 116705 int (*compat_to_user)(void *, const void *); 116706 struct module *me; 116707 const char *table; 116708 unsigned int targetsize; 116709 unsigned int usersize; 116710 unsigned int compatsize; 116711 unsigned int hooks; 116712 short unsigned int proto; 116713 short unsigned int family; 116714 }; 116715 116716 struct xt_entry_target { 116717 union { 116718 struct { 116719 __u16 target_size; 116720 char name[29]; 116721 __u8 revision; 116722 } user; 116723 struct { 116724 __u16 target_size; 116725 struct xt_target *target; 116726 } kernel; 116727 __u16 target_size; 116728 } u; 116729 unsigned char data[0]; 116730 }; 116731 116732 struct xt_standard_target { 116733 struct xt_entry_target target; 116734 int verdict; 116735 }; 116736 116737 struct xt_error_target { 116738 struct xt_entry_target target; 116739 char errorname[30]; 116740 }; 116741 116742 struct xt_counters { 116743 __u64 pcnt; 116744 __u64 bcnt; 116745 }; 116746 116747 struct xt_counters_info { 116748 char name[32]; 116749 unsigned int num_counters; 116750 struct xt_counters counters[0]; 116751 }; 116752 116753 struct xt_action_param { 116754 union { 116755 const struct xt_match *match; 116756 const struct xt_target *target; 116757 }; 116758 union { 116759 const void *matchinfo; 116760 const void *targinfo; 116761 }; 116762 const struct nf_hook_state *state; 116763 int fragoff; 116764 unsigned int thoff; 116765 bool hotdrop; 116766 }; 116767 116768 struct xt_mtchk_param { 116769 struct net *net; 116770 const char *table; 116771 const void *entryinfo; 116772 const struct xt_match *match; 116773 void *matchinfo; 116774 unsigned int hook_mask; 116775 u_int8_t family; 116776 bool nft_compat; 116777 }; 116778 116779 struct xt_mtdtor_param { 116780 struct net *net; 116781 const struct xt_match *match; 116782 void *matchinfo; 116783 u_int8_t family; 116784 }; 116785 116786 struct xt_tgchk_param { 116787 struct net *net; 116788 const char *table; 116789 const void *entryinfo; 116790 const struct xt_target *target; 116791 void *targinfo; 116792 unsigned int hook_mask; 116793 u_int8_t family; 116794 bool nft_compat; 116795 }; 116796 116797 struct xt_tgdtor_param { 116798 struct net *net; 116799 const struct xt_target *target; 116800 void *targinfo; 116801 u_int8_t family; 116802 }; 116803 116804 struct xt_percpu_counter_alloc_state { 116805 unsigned int off; 116806 const char *mem; 116807 }; 116808 116809 struct compat_xt_entry_match { 116810 union { 116811 struct { 116812 u_int16_t match_size; 116813 char name[29]; 116814 u_int8_t revision; 116815 } user; 116816 struct { 116817 u_int16_t match_size; 116818 compat_uptr_t match; 116819 } kernel; 116820 u_int16_t match_size; 116821 } u; 116822 unsigned char data[0]; 116823 }; 116824 116825 struct compat_xt_entry_target { 116826 union { 116827 struct { 116828 u_int16_t target_size; 116829 char name[29]; 116830 u_int8_t revision; 116831 } user; 116832 struct { 116833 u_int16_t target_size; 116834 compat_uptr_t target; 116835 } kernel; 116836 u_int16_t target_size; 116837 } u; 116838 unsigned char data[0]; 116839 }; 116840 116841 struct compat_xt_counters { 116842 compat_u64 pcnt; 116843 compat_u64 bcnt; 116844 }; 116845 116846 struct compat_xt_counters_info { 116847 char name[32]; 116848 compat_uint_t num_counters; 116849 struct compat_xt_counters counters[0]; 116850 } __attribute__((packed)); 116851 116852 struct compat_delta { 116853 unsigned int offset; 116854 int delta; 116855 }; 116856 116857 struct xt_af { 116858 struct mutex mutex; 116859 struct list_head match; 116860 struct list_head target; 116861 struct mutex compat_mutex; 116862 struct compat_delta *compat_tab; 116863 unsigned int number; 116864 unsigned int cur; 116865 }; 116866 116867 struct compat_xt_standard_target { 116868 struct compat_xt_entry_target t; 116869 compat_uint_t verdict; 116870 }; 116871 116872 struct compat_xt_error_target { 116873 struct compat_xt_entry_target t; 116874 char errorname[30]; 116875 }; 116876 116877 struct nf_mttg_trav { 116878 struct list_head *head; 116879 struct list_head *curr; 116880 uint8_t class; 116881 }; 116882 116883 enum { 116884 MTTG_TRAV_INIT = 0, 116885 MTTG_TRAV_NFP_UNSPEC = 1, 116886 MTTG_TRAV_NFP_SPEC = 2, 116887 MTTG_TRAV_DONE = 3, 116888 }; 116889 116890 struct xt_tcp { 116891 __u16 spts[2]; 116892 __u16 dpts[2]; 116893 __u8 option; 116894 __u8 flg_mask; 116895 __u8 flg_cmp; 116896 __u8 invflags; 116897 }; 116898 116899 struct xt_udp { 116900 __u16 spts[2]; 116901 __u16 dpts[2]; 116902 __u8 invflags; 116903 }; 116904 116905 struct ip_mreqn { 116906 struct in_addr imr_multiaddr; 116907 struct in_addr imr_address; 116908 int imr_ifindex; 116909 }; 116910 116911 struct rtmsg { 116912 unsigned char rtm_family; 116913 unsigned char rtm_dst_len; 116914 unsigned char rtm_src_len; 116915 unsigned char rtm_tos; 116916 unsigned char rtm_table; 116917 unsigned char rtm_protocol; 116918 unsigned char rtm_scope; 116919 unsigned char rtm_type; 116920 unsigned int rtm_flags; 116921 }; 116922 116923 struct rtvia { 116924 __kernel_sa_family_t rtvia_family; 116925 __u8 rtvia_addr[0]; 116926 }; 116927 116928 struct ip_sf_list; 116929 116930 struct ip_mc_list { 116931 struct in_device *interface; 116932 __be32 multiaddr; 116933 unsigned int sfmode; 116934 struct ip_sf_list *sources; 116935 struct ip_sf_list *tomb; 116936 long unsigned int sfcount[2]; 116937 union { 116938 struct ip_mc_list *next; 116939 struct ip_mc_list *next_rcu; 116940 }; 116941 struct ip_mc_list *next_hash; 116942 struct timer_list timer; 116943 int users; 116944 refcount_t refcnt; 116945 spinlock_t lock; 116946 char tm_running; 116947 char reporter; 116948 char unsolicit_count; 116949 char loaded; 116950 unsigned char gsquery; 116951 unsigned char crcount; 116952 struct callback_head rcu; 116953 }; 116954 116955 struct ip_sf_socklist { 116956 unsigned int sl_max; 116957 unsigned int sl_count; 116958 struct callback_head rcu; 116959 __be32 sl_addr[0]; 116960 }; 116961 116962 struct ip_mc_socklist { 116963 struct ip_mc_socklist *next_rcu; 116964 struct ip_mreqn multi; 116965 unsigned int sfmode; 116966 struct ip_sf_socklist *sflist; 116967 struct callback_head rcu; 116968 }; 116969 116970 struct ip_sf_list { 116971 struct ip_sf_list *sf_next; 116972 long unsigned int sf_count[2]; 116973 __be32 sf_inaddr; 116974 unsigned char sf_gsresp; 116975 unsigned char sf_oldin; 116976 unsigned char sf_crcount; 116977 }; 116978 116979 struct ipv4_addr_key { 116980 __be32 addr; 116981 int vif; 116982 }; 116983 116984 struct inetpeer_addr { 116985 union { 116986 struct ipv4_addr_key a4; 116987 struct in6_addr a6; 116988 u32 key[4]; 116989 }; 116990 __u16 family; 116991 }; 116992 116993 struct inet_peer { 116994 struct rb_node rb_node; 116995 struct inetpeer_addr daddr; 116996 u32 metrics[17]; 116997 u32 rate_tokens; 116998 u32 n_redirects; 116999 long unsigned int rate_last; 117000 union { 117001 struct { 117002 atomic_t rid; 117003 }; 117004 struct callback_head rcu; 117005 }; 117006 __u32 dtime; 117007 refcount_t refcnt; 117008 }; 117009 117010 struct fib_rt_info { 117011 struct fib_info *fi; 117012 u32 tb_id; 117013 __be32 dst; 117014 int dst_len; 117015 u8 tos; 117016 u8 type; 117017 u8 offload: 1; 117018 u8 trap: 1; 117019 u8 unused: 6; 117020 }; 117021 117022 struct uncached_list { 117023 spinlock_t lock; 117024 struct list_head head; 117025 }; 117026 117027 struct ip_rt_acct { 117028 __u32 o_bytes; 117029 __u32 o_packets; 117030 __u32 i_bytes; 117031 __u32 i_packets; 117032 }; 117033 117034 struct rt_cache_stat { 117035 unsigned int in_slow_tot; 117036 unsigned int in_slow_mc; 117037 unsigned int in_no_route; 117038 unsigned int in_brd; 117039 unsigned int in_martian_dst; 117040 unsigned int in_martian_src; 117041 unsigned int out_slow_tot; 117042 unsigned int out_slow_mc; 117043 }; 117044 117045 struct fib_alias { 117046 struct hlist_node fa_list; 117047 struct fib_info *fa_info; 117048 u8 fa_tos; 117049 u8 fa_type; 117050 u8 fa_state; 117051 u8 fa_slen; 117052 u32 tb_id; 117053 s16 fa_default; 117054 u8 offload: 1; 117055 u8 trap: 1; 117056 u8 unused: 6; 117057 struct callback_head rcu; 117058 }; 117059 117060 struct fib_prop { 117061 int error; 117062 u8 scope; 117063 }; 117064 117065 struct net_offload { 117066 struct offload_callbacks callbacks; 117067 unsigned int flags; 117068 }; 117069 117070 struct raw_hashinfo { 117071 rwlock_t lock; 117072 struct hlist_head ht[256]; 117073 }; 117074 117075 enum ip_defrag_users { 117076 IP_DEFRAG_LOCAL_DELIVER = 0, 117077 IP_DEFRAG_CALL_RA_CHAIN = 1, 117078 IP_DEFRAG_CONNTRACK_IN = 2, 117079 __IP_DEFRAG_CONNTRACK_IN_END = 65537, 117080 IP_DEFRAG_CONNTRACK_OUT = 65538, 117081 __IP_DEFRAG_CONNTRACK_OUT_END = 131073, 117082 IP_DEFRAG_CONNTRACK_BRIDGE_IN = 131074, 117083 __IP_DEFRAG_CONNTRACK_BRIDGE_IN = 196609, 117084 IP_DEFRAG_VS_IN = 196610, 117085 IP_DEFRAG_VS_OUT = 196611, 117086 IP_DEFRAG_VS_FWD = 196612, 117087 IP_DEFRAG_AF_PACKET = 196613, 117088 IP_DEFRAG_MACVLAN = 196614, 117089 }; 117090 117091 enum { 117092 INET_FRAG_FIRST_IN = 1, 117093 INET_FRAG_LAST_IN = 2, 117094 INET_FRAG_COMPLETE = 4, 117095 INET_FRAG_HASH_DEAD = 8, 117096 }; 117097 117098 struct ipq { 117099 struct inet_frag_queue q; 117100 u8 ecn; 117101 u16 max_df_size; 117102 int iif; 117103 unsigned int rid; 117104 struct inet_peer *peer; 117105 }; 117106 117107 struct ip_options_data { 117108 struct ip_options_rcu opt; 117109 char data[40]; 117110 }; 117111 117112 struct ipcm_cookie { 117113 struct sockcm_cookie sockc; 117114 __be32 addr; 117115 int oif; 117116 struct ip_options_rcu *opt; 117117 __u8 ttl; 117118 __s16 tos; 117119 char priority; 117120 __u16 gso_size; 117121 }; 117122 117123 struct ip_fraglist_iter { 117124 struct sk_buff *frag; 117125 struct iphdr *iph; 117126 int offset; 117127 unsigned int hlen; 117128 }; 117129 117130 struct ip_frag_state { 117131 bool DF; 117132 unsigned int hlen; 117133 unsigned int ll_rs; 117134 unsigned int mtu; 117135 unsigned int left; 117136 int offset; 117137 int ptr; 117138 __be16 not_last_frag; 117139 }; 117140 117141 struct ip_reply_arg { 117142 struct kvec iov[1]; 117143 int flags; 117144 __wsum csum; 117145 int csumoffset; 117146 int bound_dev_if; 117147 u8 tos; 117148 kuid_t uid; 117149 }; 117150 117151 struct ip_mreq_source { 117152 __be32 imr_multiaddr; 117153 __be32 imr_interface; 117154 __be32 imr_sourceaddr; 117155 }; 117156 117157 struct ip_msfilter { 117158 __be32 imsf_multiaddr; 117159 __be32 imsf_interface; 117160 __u32 imsf_fmode; 117161 __u32 imsf_numsrc; 117162 __be32 imsf_slist[1]; 117163 }; 117164 117165 struct group_req { 117166 __u32 gr_interface; 117167 struct __kernel_sockaddr_storage gr_group; 117168 }; 117169 117170 struct group_source_req { 117171 __u32 gsr_interface; 117172 struct __kernel_sockaddr_storage gsr_group; 117173 struct __kernel_sockaddr_storage gsr_source; 117174 }; 117175 117176 struct group_filter { 117177 __u32 gf_interface; 117178 struct __kernel_sockaddr_storage gf_group; 117179 __u32 gf_fmode; 117180 __u32 gf_numsrc; 117181 struct __kernel_sockaddr_storage gf_slist[1]; 117182 }; 117183 117184 struct in_pktinfo { 117185 int ipi_ifindex; 117186 struct in_addr ipi_spec_dst; 117187 struct in_addr ipi_addr; 117188 }; 117189 117190 struct compat_group_req { 117191 __u32 gr_interface; 117192 struct __kernel_sockaddr_storage gr_group; 117193 } __attribute__((packed)); 117194 117195 struct compat_group_source_req { 117196 __u32 gsr_interface; 117197 struct __kernel_sockaddr_storage gsr_group; 117198 struct __kernel_sockaddr_storage gsr_source; 117199 } __attribute__((packed)); 117200 117201 struct compat_group_filter { 117202 __u32 gf_interface; 117203 struct __kernel_sockaddr_storage gf_group; 117204 __u32 gf_fmode; 117205 __u32 gf_numsrc; 117206 struct __kernel_sockaddr_storage gf_slist[1]; 117207 } __attribute__((packed)); 117208 117209 struct tcpvegas_info { 117210 __u32 tcpv_enabled; 117211 __u32 tcpv_rttcnt; 117212 __u32 tcpv_rtt; 117213 __u32 tcpv_minrtt; 117214 }; 117215 117216 struct tcp_dctcp_info { 117217 __u16 dctcp_enabled; 117218 __u16 dctcp_ce_state; 117219 __u32 dctcp_alpha; 117220 __u32 dctcp_ab_ecn; 117221 __u32 dctcp_ab_tot; 117222 }; 117223 117224 struct tcp_bbr_info { 117225 __u32 bbr_bw_lo; 117226 __u32 bbr_bw_hi; 117227 __u32 bbr_min_rtt; 117228 __u32 bbr_pacing_gain; 117229 __u32 bbr_cwnd_gain; 117230 }; 117231 117232 union tcp_cc_info { 117233 struct tcpvegas_info vegas; 117234 struct tcp_dctcp_info dctcp; 117235 struct tcp_bbr_info bbr; 117236 }; 117237 117238 enum { 117239 BPF_TCP_ESTABLISHED = 1, 117240 BPF_TCP_SYN_SENT = 2, 117241 BPF_TCP_SYN_RECV = 3, 117242 BPF_TCP_FIN_WAIT1 = 4, 117243 BPF_TCP_FIN_WAIT2 = 5, 117244 BPF_TCP_TIME_WAIT = 6, 117245 BPF_TCP_CLOSE = 7, 117246 BPF_TCP_CLOSE_WAIT = 8, 117247 BPF_TCP_LAST_ACK = 9, 117248 BPF_TCP_LISTEN = 10, 117249 BPF_TCP_CLOSING = 11, 117250 BPF_TCP_NEW_SYN_RECV = 12, 117251 BPF_TCP_MAX_STATES = 13, 117252 }; 117253 117254 enum inet_csk_ack_state_t { 117255 ICSK_ACK_SCHED = 1, 117256 ICSK_ACK_TIMER = 2, 117257 ICSK_ACK_PUSHED = 4, 117258 ICSK_ACK_PUSHED2 = 8, 117259 ICSK_ACK_NOW = 16, 117260 }; 117261 117262 enum { 117263 TCP_FLAG_CWR = 32768, 117264 TCP_FLAG_ECE = 16384, 117265 TCP_FLAG_URG = 8192, 117266 TCP_FLAG_ACK = 4096, 117267 TCP_FLAG_PSH = 2048, 117268 TCP_FLAG_RST = 1024, 117269 TCP_FLAG_SYN = 512, 117270 TCP_FLAG_FIN = 256, 117271 TCP_RESERVED_BITS = 15, 117272 TCP_DATA_OFFSET = 240, 117273 }; 117274 117275 struct tcp_repair_opt { 117276 __u32 opt_code; 117277 __u32 opt_val; 117278 }; 117279 117280 struct tcp_repair_window { 117281 __u32 snd_wl1; 117282 __u32 snd_wnd; 117283 __u32 max_window; 117284 __u32 rcv_wnd; 117285 __u32 rcv_wup; 117286 }; 117287 117288 enum { 117289 TCP_NO_QUEUE = 0, 117290 TCP_RECV_QUEUE = 1, 117291 TCP_SEND_QUEUE = 2, 117292 TCP_QUEUES_NR = 3, 117293 }; 117294 117295 struct tcp_info { 117296 __u8 tcpi_state; 117297 __u8 tcpi_ca_state; 117298 __u8 tcpi_retransmits; 117299 __u8 tcpi_probes; 117300 __u8 tcpi_backoff; 117301 __u8 tcpi_options; 117302 __u8 tcpi_snd_wscale: 4; 117303 __u8 tcpi_rcv_wscale: 4; 117304 __u8 tcpi_delivery_rate_app_limited: 1; 117305 __u8 tcpi_fastopen_client_fail: 2; 117306 __u32 tcpi_rto; 117307 __u32 tcpi_ato; 117308 __u32 tcpi_snd_mss; 117309 __u32 tcpi_rcv_mss; 117310 __u32 tcpi_unacked; 117311 __u32 tcpi_sacked; 117312 __u32 tcpi_lost; 117313 __u32 tcpi_retrans; 117314 __u32 tcpi_fackets; 117315 __u32 tcpi_last_data_sent; 117316 __u32 tcpi_last_ack_sent; 117317 __u32 tcpi_last_data_recv; 117318 __u32 tcpi_last_ack_recv; 117319 __u32 tcpi_pmtu; 117320 __u32 tcpi_rcv_ssthresh; 117321 __u32 tcpi_rtt; 117322 __u32 tcpi_rttvar; 117323 __u32 tcpi_snd_ssthresh; 117324 __u32 tcpi_snd_cwnd; 117325 __u32 tcpi_advmss; 117326 __u32 tcpi_reordering; 117327 __u32 tcpi_rcv_rtt; 117328 __u32 tcpi_rcv_space; 117329 __u32 tcpi_total_retrans; 117330 __u64 tcpi_pacing_rate; 117331 __u64 tcpi_max_pacing_rate; 117332 __u64 tcpi_bytes_acked; 117333 __u64 tcpi_bytes_received; 117334 __u32 tcpi_segs_out; 117335 __u32 tcpi_segs_in; 117336 __u32 tcpi_notsent_bytes; 117337 __u32 tcpi_min_rtt; 117338 __u32 tcpi_data_segs_in; 117339 __u32 tcpi_data_segs_out; 117340 __u64 tcpi_delivery_rate; 117341 __u64 tcpi_busy_time; 117342 __u64 tcpi_rwnd_limited; 117343 __u64 tcpi_sndbuf_limited; 117344 __u32 tcpi_delivered; 117345 __u32 tcpi_delivered_ce; 117346 __u64 tcpi_bytes_sent; 117347 __u64 tcpi_bytes_retrans; 117348 __u32 tcpi_dsack_dups; 117349 __u32 tcpi_reord_seen; 117350 __u32 tcpi_rcv_ooopack; 117351 __u32 tcpi_snd_wnd; 117352 }; 117353 117354 enum { 117355 TCP_NLA_PAD = 0, 117356 TCP_NLA_BUSY = 1, 117357 TCP_NLA_RWND_LIMITED = 2, 117358 TCP_NLA_SNDBUF_LIMITED = 3, 117359 TCP_NLA_DATA_SEGS_OUT = 4, 117360 TCP_NLA_TOTAL_RETRANS = 5, 117361 TCP_NLA_PACING_RATE = 6, 117362 TCP_NLA_DELIVERY_RATE = 7, 117363 TCP_NLA_SND_CWND = 8, 117364 TCP_NLA_REORDERING = 9, 117365 TCP_NLA_MIN_RTT = 10, 117366 TCP_NLA_RECUR_RETRANS = 11, 117367 TCP_NLA_DELIVERY_RATE_APP_LMT = 12, 117368 TCP_NLA_SNDQ_SIZE = 13, 117369 TCP_NLA_CA_STATE = 14, 117370 TCP_NLA_SND_SSTHRESH = 15, 117371 TCP_NLA_DELIVERED = 16, 117372 TCP_NLA_DELIVERED_CE = 17, 117373 TCP_NLA_BYTES_SENT = 18, 117374 TCP_NLA_BYTES_RETRANS = 19, 117375 TCP_NLA_DSACK_DUPS = 20, 117376 TCP_NLA_REORD_SEEN = 21, 117377 TCP_NLA_SRTT = 22, 117378 TCP_NLA_TIMEOUT_REHASH = 23, 117379 TCP_NLA_BYTES_NOTSENT = 24, 117380 TCP_NLA_EDT = 25, 117381 }; 117382 117383 struct tcp_zerocopy_receive { 117384 __u64 address; 117385 __u32 length; 117386 __u32 recv_skip_hint; 117387 __u32 inq; 117388 __s32 err; 117389 __u64 copybuf_address; 117390 __s32 copybuf_len; 117391 __u32 flags; 117392 }; 117393 117394 struct tcp_md5sig_pool { 117395 struct ahash_request *md5_req; 117396 void *scratch; 117397 }; 117398 117399 enum tcp_chrono { 117400 TCP_CHRONO_UNSPEC = 0, 117401 TCP_CHRONO_BUSY = 1, 117402 TCP_CHRONO_RWND_LIMITED = 2, 117403 TCP_CHRONO_SNDBUF_LIMITED = 3, 117404 __TCP_CHRONO_MAX = 4, 117405 }; 117406 117407 struct tcp_splice_state { 117408 struct pipe_inode_info *pipe; 117409 size_t len; 117410 unsigned int flags; 117411 }; 117412 117413 enum tcp_fastopen_client_fail { 117414 TFO_STATUS_UNSPEC = 0, 117415 TFO_COOKIE_UNAVAILABLE = 1, 117416 TFO_DATA_NOT_ACKED = 2, 117417 TFO_SYN_RETRANSMITTED = 3, 117418 }; 117419 117420 struct tcp_sack_block_wire { 117421 __be32 start_seq; 117422 __be32 end_seq; 117423 }; 117424 117425 struct static_key_false_deferred { 117426 struct static_key_false key; 117427 long unsigned int timeout; 117428 struct delayed_work work; 117429 }; 117430 117431 struct mptcp_ext { 117432 union { 117433 u64 data_ack; 117434 u32 data_ack32; 117435 }; 117436 u64 data_seq; 117437 u32 subflow_seq; 117438 u16 data_len; 117439 u8 use_map: 1; 117440 u8 dsn64: 1; 117441 u8 data_fin: 1; 117442 u8 use_ack: 1; 117443 u8 ack64: 1; 117444 u8 mpc_map: 1; 117445 u8 frozen: 1; 117446 u8 __unused: 1; 117447 }; 117448 117449 enum tcp_queue { 117450 TCP_FRAG_IN_WRITE_QUEUE = 0, 117451 TCP_FRAG_IN_RTX_QUEUE = 1, 117452 }; 117453 117454 enum tcp_ca_ack_event_flags { 117455 CA_ACK_SLOWPATH = 1, 117456 CA_ACK_WIN_UPDATE = 2, 117457 CA_ACK_ECE = 4, 117458 }; 117459 117460 struct tcp_sacktag_state { 117461 u64 first_sackt; 117462 u64 last_sackt; 117463 u32 reord; 117464 u32 sack_delivered; 117465 int flag; 117466 unsigned int mss_now; 117467 struct rate_sample *rate; 117468 }; 117469 117470 enum pkt_hash_types { 117471 PKT_HASH_TYPE_NONE = 0, 117472 PKT_HASH_TYPE_L2 = 1, 117473 PKT_HASH_TYPE_L3 = 2, 117474 PKT_HASH_TYPE_L4 = 3, 117475 }; 117476 117477 enum { 117478 BPF_WRITE_HDR_TCP_CURRENT_MSS = 1, 117479 BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2, 117480 }; 117481 117482 enum tsq_flags { 117483 TSQF_THROTTLED = 1, 117484 TSQF_QUEUED = 2, 117485 TCPF_TSQ_DEFERRED = 4, 117486 TCPF_WRITE_TIMER_DEFERRED = 8, 117487 TCPF_DELACK_TIMER_DEFERRED = 16, 117488 TCPF_MTU_REDUCED_DEFERRED = 32, 117489 }; 117490 117491 struct mptcp_out_options { 117492 u16 suboptions; 117493 u64 sndr_key; 117494 u64 rcvr_key; 117495 union { 117496 struct in_addr addr; 117497 struct in6_addr addr6; 117498 }; 117499 u8 addr_id; 117500 u16 port; 117501 u64 ahmac; 117502 u8 rm_id; 117503 u8 join_id; 117504 u8 backup; 117505 u32 nonce; 117506 u64 thmac; 117507 u32 token; 117508 u8 hmac[20]; 117509 struct mptcp_ext ext_copy; 117510 }; 117511 117512 struct tcp_out_options { 117513 u16 options; 117514 u16 mss; 117515 u8 ws; 117516 u8 num_sack_blocks; 117517 u8 hash_size; 117518 u8 bpf_opt_len; 117519 __u8 *hash_location; 117520 __u32 tsval; 117521 __u32 tsecr; 117522 struct tcp_fastopen_cookie *fastopen_cookie; 117523 struct mptcp_out_options mptcp; 117524 }; 117525 117526 struct tsq_tasklet { 117527 struct tasklet_struct tasklet; 117528 struct list_head head; 117529 }; 117530 117531 struct tcp_md5sig { 117532 struct __kernel_sockaddr_storage tcpm_addr; 117533 __u8 tcpm_flags; 117534 __u8 tcpm_prefixlen; 117535 __u16 tcpm_keylen; 117536 int tcpm_ifindex; 117537 __u8 tcpm_key[80]; 117538 }; 117539 117540 struct icmp_err { 117541 int errno; 117542 unsigned int fatal: 1; 117543 }; 117544 117545 enum tcp_tw_status { 117546 TCP_TW_SUCCESS = 0, 117547 TCP_TW_RST = 1, 117548 TCP_TW_ACK = 2, 117549 TCP_TW_SYN = 3, 117550 }; 117551 117552 struct tcp4_pseudohdr { 117553 __be32 saddr; 117554 __be32 daddr; 117555 __u8 pad; 117556 __u8 protocol; 117557 __be16 len; 117558 }; 117559 117560 enum tcp_seq_states { 117561 TCP_SEQ_STATE_LISTENING = 0, 117562 TCP_SEQ_STATE_ESTABLISHED = 1, 117563 }; 117564 117565 struct tcp_seq_afinfo { 117566 sa_family_t family; 117567 }; 117568 117569 struct tcp_iter_state { 117570 struct seq_net_private p; 117571 enum tcp_seq_states state; 117572 struct sock *syn_wait_sk; 117573 struct tcp_seq_afinfo *bpf_seq_afinfo; 117574 int bucket; 117575 int offset; 117576 int sbucket; 117577 int num; 117578 loff_t last_pos; 117579 }; 117580 117581 struct bpf_iter__tcp { 117582 union { 117583 struct bpf_iter_meta *meta; 117584 }; 117585 union { 117586 struct sock_common *sk_common; 117587 }; 117588 uid_t uid; 117589 }; 117590 117591 enum tcp_metric_index { 117592 TCP_METRIC_RTT = 0, 117593 TCP_METRIC_RTTVAR = 1, 117594 TCP_METRIC_SSTHRESH = 2, 117595 TCP_METRIC_CWND = 3, 117596 TCP_METRIC_REORDERING = 4, 117597 TCP_METRIC_RTT_US = 5, 117598 TCP_METRIC_RTTVAR_US = 6, 117599 __TCP_METRIC_MAX = 7, 117600 }; 117601 117602 enum { 117603 TCP_METRICS_ATTR_UNSPEC = 0, 117604 TCP_METRICS_ATTR_ADDR_IPV4 = 1, 117605 TCP_METRICS_ATTR_ADDR_IPV6 = 2, 117606 TCP_METRICS_ATTR_AGE = 3, 117607 TCP_METRICS_ATTR_TW_TSVAL = 4, 117608 TCP_METRICS_ATTR_TW_TS_STAMP = 5, 117609 TCP_METRICS_ATTR_VALS = 6, 117610 TCP_METRICS_ATTR_FOPEN_MSS = 7, 117611 TCP_METRICS_ATTR_FOPEN_SYN_DROPS = 8, 117612 TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS = 9, 117613 TCP_METRICS_ATTR_FOPEN_COOKIE = 10, 117614 TCP_METRICS_ATTR_SADDR_IPV4 = 11, 117615 TCP_METRICS_ATTR_SADDR_IPV6 = 12, 117616 TCP_METRICS_ATTR_PAD = 13, 117617 __TCP_METRICS_ATTR_MAX = 14, 117618 }; 117619 117620 enum { 117621 TCP_METRICS_CMD_UNSPEC = 0, 117622 TCP_METRICS_CMD_GET = 1, 117623 TCP_METRICS_CMD_DEL = 2, 117624 __TCP_METRICS_CMD_MAX = 3, 117625 }; 117626 117627 struct tcp_fastopen_metrics { 117628 u16 mss; 117629 u16 syn_loss: 10; 117630 u16 try_exp: 2; 117631 long unsigned int last_syn_loss; 117632 struct tcp_fastopen_cookie cookie; 117633 }; 117634 117635 struct tcp_metrics_block { 117636 struct tcp_metrics_block *tcpm_next; 117637 possible_net_t tcpm_net; 117638 struct inetpeer_addr tcpm_saddr; 117639 struct inetpeer_addr tcpm_daddr; 117640 long unsigned int tcpm_stamp; 117641 u32 tcpm_lock; 117642 u32 tcpm_vals[5]; 117643 struct tcp_fastopen_metrics tcpm_fastopen; 117644 struct callback_head callback_head; 117645 }; 117646 117647 struct tcpm_hash_bucket { 117648 struct tcp_metrics_block *chain; 117649 }; 117650 117651 struct icmp_filter { 117652 __u32 data; 117653 }; 117654 117655 struct raw_iter_state { 117656 struct seq_net_private p; 117657 int bucket; 117658 }; 117659 117660 struct raw_sock { 117661 struct inet_sock inet; 117662 struct icmp_filter filter; 117663 u32 ipmr_table; 117664 }; 117665 117666 struct raw_frag_vec { 117667 struct msghdr *msg; 117668 union { 117669 struct icmphdr icmph; 117670 char c[1]; 117671 } hdr; 117672 int hlen; 117673 }; 117674 117675 struct ip_tunnel_encap { 117676 u16 type; 117677 u16 flags; 117678 __be16 sport; 117679 __be16 dport; 117680 }; 117681 117682 struct ip_tunnel_encap_ops { 117683 size_t (*encap_hlen)(struct ip_tunnel_encap *); 117684 int (*build_header)(struct sk_buff *, struct ip_tunnel_encap *, u8 *, struct flowi4 *); 117685 int (*err_handler)(struct sk_buff *, u32); 117686 }; 117687 117688 struct udp_skb_cb { 117689 union { 117690 struct inet_skb_parm h4; 117691 struct inet6_skb_parm h6; 117692 } header; 117693 __u16 cscov; 117694 __u8 partial_cov; 117695 }; 117696 117697 struct udp_dev_scratch { 117698 u32 _tsize_state; 117699 u16 len; 117700 bool is_linear; 117701 bool csum_unnecessary; 117702 }; 117703 117704 struct udp_seq_afinfo { 117705 sa_family_t family; 117706 struct udp_table *udp_table; 117707 }; 117708 117709 struct udp_iter_state { 117710 struct seq_net_private p; 117711 int bucket; 117712 struct udp_seq_afinfo *bpf_seq_afinfo; 117713 }; 117714 117715 struct bpf_iter__udp { 117716 union { 117717 struct bpf_iter_meta *meta; 117718 }; 117719 union { 117720 struct udp_sock *udp_sk; 117721 }; 117722 uid_t uid; 117723 int: 32; 117724 int bucket; 117725 }; 117726 117727 struct inet_protosw { 117728 struct list_head list; 117729 short unsigned int type; 117730 short unsigned int protocol; 117731 struct proto *prot; 117732 const struct proto_ops *ops; 117733 unsigned char flags; 117734 }; 117735 117736 typedef struct sk_buff * (*gro_receive_sk_t)(struct sock *, struct list_head *, struct sk_buff *); 117737 117738 typedef struct sock * (*udp_lookup_t)(const struct sk_buff *, __be16, __be16); 117739 117740 struct arpreq { 117741 struct sockaddr arp_pa; 117742 struct sockaddr arp_ha; 117743 int arp_flags; 117744 struct sockaddr arp_netmask; 117745 char arp_dev[16]; 117746 }; 117747 117748 typedef struct { 117749 char ax25_call[7]; 117750 } ax25_address; 117751 117752 enum { 117753 AX25_VALUES_IPDEFMODE = 0, 117754 AX25_VALUES_AXDEFMODE = 1, 117755 AX25_VALUES_BACKOFF = 2, 117756 AX25_VALUES_CONMODE = 3, 117757 AX25_VALUES_WINDOW = 4, 117758 AX25_VALUES_EWINDOW = 5, 117759 AX25_VALUES_T1 = 6, 117760 AX25_VALUES_T2 = 7, 117761 AX25_VALUES_T3 = 8, 117762 AX25_VALUES_IDLE = 9, 117763 AX25_VALUES_N2 = 10, 117764 AX25_VALUES_PACLEN = 11, 117765 AX25_VALUES_PROTOCOL = 12, 117766 AX25_VALUES_DS_TIMEOUT = 13, 117767 AX25_MAX_VALUES = 14, 117768 }; 117769 117770 enum ip_conntrack_status { 117771 IPS_EXPECTED_BIT = 0, 117772 IPS_EXPECTED = 1, 117773 IPS_SEEN_REPLY_BIT = 1, 117774 IPS_SEEN_REPLY = 2, 117775 IPS_ASSURED_BIT = 2, 117776 IPS_ASSURED = 4, 117777 IPS_CONFIRMED_BIT = 3, 117778 IPS_CONFIRMED = 8, 117779 IPS_SRC_NAT_BIT = 4, 117780 IPS_SRC_NAT = 16, 117781 IPS_DST_NAT_BIT = 5, 117782 IPS_DST_NAT = 32, 117783 IPS_NAT_MASK = 48, 117784 IPS_SEQ_ADJUST_BIT = 6, 117785 IPS_SEQ_ADJUST = 64, 117786 IPS_SRC_NAT_DONE_BIT = 7, 117787 IPS_SRC_NAT_DONE = 128, 117788 IPS_DST_NAT_DONE_BIT = 8, 117789 IPS_DST_NAT_DONE = 256, 117790 IPS_NAT_DONE_MASK = 384, 117791 IPS_DYING_BIT = 9, 117792 IPS_DYING = 512, 117793 IPS_FIXED_TIMEOUT_BIT = 10, 117794 IPS_FIXED_TIMEOUT = 1024, 117795 IPS_TEMPLATE_BIT = 11, 117796 IPS_TEMPLATE = 2048, 117797 IPS_UNTRACKED_BIT = 12, 117798 IPS_UNTRACKED = 4096, 117799 IPS_NAT_CLASH_BIT = 12, 117800 IPS_NAT_CLASH = 4096, 117801 IPS_HELPER_BIT = 13, 117802 IPS_HELPER = 8192, 117803 IPS_OFFLOAD_BIT = 14, 117804 IPS_OFFLOAD = 16384, 117805 IPS_HW_OFFLOAD_BIT = 15, 117806 IPS_HW_OFFLOAD = 32768, 117807 IPS_UNCHANGEABLE_MASK = 56313, 117808 __IPS_MAX_BIT = 16, 117809 }; 117810 117811 enum { 117812 XFRM_LOOKUP_ICMP = 1, 117813 XFRM_LOOKUP_QUEUE = 2, 117814 XFRM_LOOKUP_KEEP_DST_REF = 4, 117815 }; 117816 117817 struct icmp_ext_hdr { 117818 __u8 reserved1: 4; 117819 __u8 version: 4; 117820 __u8 reserved2; 117821 __sum16 checksum; 117822 }; 117823 117824 struct icmp_extobj_hdr { 117825 __be16 length; 117826 __u8 class_num; 117827 __u8 class_type; 117828 }; 117829 117830 struct icmp_bxm { 117831 struct sk_buff *skb; 117832 int offset; 117833 int data_len; 117834 struct { 117835 struct icmphdr icmph; 117836 __be32 times[3]; 117837 } data; 117838 int head_len; 117839 struct ip_options_data replyopts; 117840 }; 117841 117842 struct icmp_control { 117843 bool (*handler)(struct sk_buff *); 117844 short int error; 117845 }; 117846 117847 struct ifaddrmsg { 117848 __u8 ifa_family; 117849 __u8 ifa_prefixlen; 117850 __u8 ifa_flags; 117851 __u8 ifa_scope; 117852 __u32 ifa_index; 117853 }; 117854 117855 enum { 117856 IFA_UNSPEC = 0, 117857 IFA_ADDRESS = 1, 117858 IFA_LOCAL = 2, 117859 IFA_LABEL = 3, 117860 IFA_BROADCAST = 4, 117861 IFA_ANYCAST = 5, 117862 IFA_CACHEINFO = 6, 117863 IFA_MULTICAST = 7, 117864 IFA_FLAGS = 8, 117865 IFA_RT_PRIORITY = 9, 117866 IFA_TARGET_NETNSID = 10, 117867 __IFA_MAX = 11, 117868 }; 117869 117870 struct ifa_cacheinfo { 117871 __u32 ifa_prefered; 117872 __u32 ifa_valid; 117873 __u32 cstamp; 117874 __u32 tstamp; 117875 }; 117876 117877 enum { 117878 IFLA_INET_UNSPEC = 0, 117879 IFLA_INET_CONF = 1, 117880 __IFLA_INET_MAX = 2, 117881 }; 117882 117883 struct in_validator_info { 117884 __be32 ivi_addr; 117885 struct in_device *ivi_dev; 117886 struct netlink_ext_ack *extack; 117887 }; 117888 117889 struct netconfmsg { 117890 __u8 ncm_family; 117891 }; 117892 117893 enum { 117894 NETCONFA_UNSPEC = 0, 117895 NETCONFA_IFINDEX = 1, 117896 NETCONFA_FORWARDING = 2, 117897 NETCONFA_RP_FILTER = 3, 117898 NETCONFA_MC_FORWARDING = 4, 117899 NETCONFA_PROXY_NEIGH = 5, 117900 NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN = 6, 117901 NETCONFA_INPUT = 7, 117902 NETCONFA_BC_FORWARDING = 8, 117903 __NETCONFA_MAX = 9, 117904 }; 117905 117906 struct inet_fill_args { 117907 u32 portid; 117908 u32 seq; 117909 int event; 117910 unsigned int flags; 117911 int netnsid; 117912 int ifindex; 117913 }; 117914 117915 struct devinet_sysctl_table { 117916 struct ctl_table_header *sysctl_header; 117917 struct ctl_table devinet_vars[33]; 117918 }; 117919 117920 struct rtentry { 117921 long unsigned int rt_pad1; 117922 struct sockaddr rt_dst; 117923 struct sockaddr rt_gateway; 117924 struct sockaddr rt_genmask; 117925 short unsigned int rt_flags; 117926 short int rt_pad2; 117927 long unsigned int rt_pad3; 117928 void *rt_pad4; 117929 short int rt_metric; 117930 char *rt_dev; 117931 long unsigned int rt_mtu; 117932 long unsigned int rt_window; 117933 short unsigned int rt_irtt; 117934 }; 117935 117936 struct pingv6_ops { 117937 int (*ipv6_recv_error)(struct sock *, struct msghdr *, int, int *); 117938 void (*ip6_datagram_recv_common_ctl)(struct sock *, struct msghdr *, struct sk_buff *); 117939 void (*ip6_datagram_recv_specific_ctl)(struct sock *, struct msghdr *, struct sk_buff *); 117940 int (*icmpv6_err_convert)(u8, u8, int *); 117941 void (*ipv6_icmp_error)(struct sock *, struct sk_buff *, int, __be16, u32, u8 *); 117942 int (*ipv6_chk_addr)(struct net *, const struct in6_addr *, const struct net_device *, int); 117943 }; 117944 117945 struct compat_rtentry { 117946 u32 rt_pad1; 117947 struct sockaddr rt_dst; 117948 struct sockaddr rt_gateway; 117949 struct sockaddr rt_genmask; 117950 short unsigned int rt_flags; 117951 short int rt_pad2; 117952 u32 rt_pad3; 117953 unsigned char rt_tos; 117954 unsigned char rt_class; 117955 short int rt_pad4; 117956 short int rt_metric; 117957 compat_uptr_t rt_dev; 117958 u32 rt_mtu; 117959 u32 rt_window; 117960 short unsigned int rt_irtt; 117961 }; 117962 117963 struct igmphdr { 117964 __u8 type; 117965 __u8 code; 117966 __sum16 csum; 117967 __be32 group; 117968 }; 117969 117970 struct igmpv3_grec { 117971 __u8 grec_type; 117972 __u8 grec_auxwords; 117973 __be16 grec_nsrcs; 117974 __be32 grec_mca; 117975 __be32 grec_src[0]; 117976 }; 117977 117978 struct igmpv3_report { 117979 __u8 type; 117980 __u8 resv1; 117981 __sum16 csum; 117982 __be16 resv2; 117983 __be16 ngrec; 117984 struct igmpv3_grec grec[0]; 117985 }; 117986 117987 struct igmpv3_query { 117988 __u8 type; 117989 __u8 code; 117990 __sum16 csum; 117991 __be32 group; 117992 __u8 qrv: 3; 117993 __u8 suppress: 1; 117994 __u8 resv: 4; 117995 __u8 qqic; 117996 __be16 nsrcs; 117997 __be32 srcs[0]; 117998 }; 117999 118000 struct igmp_mc_iter_state { 118001 struct seq_net_private p; 118002 struct net_device *dev; 118003 struct in_device *in_dev; 118004 }; 118005 118006 struct igmp_mcf_iter_state { 118007 struct seq_net_private p; 118008 struct net_device *dev; 118009 struct in_device *idev; 118010 struct ip_mc_list *im; 118011 }; 118012 118013 struct fib_config { 118014 u8 fc_dst_len; 118015 u8 fc_tos; 118016 u8 fc_protocol; 118017 u8 fc_scope; 118018 u8 fc_type; 118019 u8 fc_gw_family; 118020 u32 fc_table; 118021 __be32 fc_dst; 118022 union { 118023 __be32 fc_gw4; 118024 struct in6_addr fc_gw6; 118025 }; 118026 int fc_oif; 118027 u32 fc_flags; 118028 u32 fc_priority; 118029 __be32 fc_prefsrc; 118030 u32 fc_nh_id; 118031 struct nlattr *fc_mx; 118032 struct rtnexthop *fc_mp; 118033 int fc_mx_len; 118034 int fc_mp_len; 118035 u32 fc_flow; 118036 u32 fc_nlflags; 118037 struct nl_info fc_nlinfo; 118038 struct nlattr *fc_encap; 118039 u16 fc_encap_type; 118040 }; 118041 118042 struct fib_result_nl { 118043 __be32 fl_addr; 118044 u32 fl_mark; 118045 unsigned char fl_tos; 118046 unsigned char fl_scope; 118047 unsigned char tb_id_in; 118048 unsigned char tb_id; 118049 unsigned char prefixlen; 118050 unsigned char nh_sel; 118051 unsigned char type; 118052 unsigned char scope; 118053 int err; 118054 }; 118055 118056 struct fib_dump_filter { 118057 u32 table_id; 118058 bool filter_set; 118059 bool dump_routes; 118060 bool dump_exceptions; 118061 unsigned char protocol; 118062 unsigned char rt_type; 118063 unsigned int flags; 118064 struct net_device *dev; 118065 }; 118066 118067 struct fib_nh_notifier_info { 118068 struct fib_notifier_info info; 118069 struct fib_nh *fib_nh; 118070 }; 118071 118072 struct fib_entry_notifier_info { 118073 struct fib_notifier_info info; 118074 u32 dst; 118075 int dst_len; 118076 struct fib_info *fi; 118077 u8 tos; 118078 u8 type; 118079 u32 tb_id; 118080 }; 118081 118082 typedef unsigned int t_key; 118083 118084 struct key_vector { 118085 t_key key; 118086 unsigned char pos; 118087 unsigned char bits; 118088 unsigned char slen; 118089 union { 118090 struct hlist_head leaf; 118091 struct key_vector *tnode[0]; 118092 }; 118093 }; 118094 118095 struct tnode { 118096 struct callback_head rcu; 118097 t_key empty_children; 118098 t_key full_children; 118099 struct key_vector *parent; 118100 struct key_vector kv[1]; 118101 }; 118102 118103 struct trie_use_stats { 118104 unsigned int gets; 118105 unsigned int backtrack; 118106 unsigned int semantic_match_passed; 118107 unsigned int semantic_match_miss; 118108 unsigned int null_node_hit; 118109 unsigned int resize_node_skipped; 118110 }; 118111 118112 struct trie_stat { 118113 unsigned int totdepth; 118114 unsigned int maxdepth; 118115 unsigned int tnodes; 118116 unsigned int leaves; 118117 unsigned int nullpointers; 118118 unsigned int prefixes; 118119 unsigned int nodesizes[32]; 118120 }; 118121 118122 struct trie { 118123 struct key_vector kv[1]; 118124 struct trie_use_stats *stats; 118125 }; 118126 118127 struct fib_trie_iter { 118128 struct seq_net_private p; 118129 struct fib_table *tb; 118130 struct key_vector *tnode; 118131 unsigned int index; 118132 unsigned int depth; 118133 }; 118134 118135 struct fib_route_iter { 118136 struct seq_net_private p; 118137 struct fib_table *main_tb; 118138 struct key_vector *tnode; 118139 loff_t pos; 118140 t_key key; 118141 }; 118142 118143 struct ipfrag_skb_cb { 118144 union { 118145 struct inet_skb_parm h4; 118146 struct inet6_skb_parm h6; 118147 }; 118148 struct sk_buff *next_frag; 118149 int frag_run_len; 118150 }; 118151 118152 struct icmpv6_echo { 118153 __be16 identifier; 118154 __be16 sequence; 118155 }; 118156 118157 struct icmpv6_nd_advt { 118158 __u32 reserved: 5; 118159 __u32 override: 1; 118160 __u32 solicited: 1; 118161 __u32 router: 1; 118162 __u32 reserved2: 24; 118163 }; 118164 118165 struct icmpv6_nd_ra { 118166 __u8 hop_limit; 118167 __u8 reserved: 3; 118168 __u8 router_pref: 2; 118169 __u8 home_agent: 1; 118170 __u8 other: 1; 118171 __u8 managed: 1; 118172 __be16 rt_lifetime; 118173 }; 118174 118175 struct icmp6hdr { 118176 __u8 icmp6_type; 118177 __u8 icmp6_code; 118178 __sum16 icmp6_cksum; 118179 union { 118180 __be32 un_data32[1]; 118181 __be16 un_data16[2]; 118182 __u8 un_data8[4]; 118183 struct icmpv6_echo u_echo; 118184 struct icmpv6_nd_advt u_nd_advt; 118185 struct icmpv6_nd_ra u_nd_ra; 118186 } icmp6_dataun; 118187 }; 118188 118189 struct ping_iter_state { 118190 struct seq_net_private p; 118191 int bucket; 118192 sa_family_t family; 118193 }; 118194 118195 struct pingfakehdr { 118196 struct icmphdr icmph; 118197 struct msghdr *msg; 118198 sa_family_t family; 118199 __wsum wcheck; 118200 }; 118201 118202 struct ping_table { 118203 struct hlist_nulls_head hash[64]; 118204 rwlock_t lock; 118205 }; 118206 118207 enum lwtunnel_ip_t { 118208 LWTUNNEL_IP_UNSPEC = 0, 118209 LWTUNNEL_IP_ID = 1, 118210 LWTUNNEL_IP_DST = 2, 118211 LWTUNNEL_IP_SRC = 3, 118212 LWTUNNEL_IP_TTL = 4, 118213 LWTUNNEL_IP_TOS = 5, 118214 LWTUNNEL_IP_FLAGS = 6, 118215 LWTUNNEL_IP_PAD = 7, 118216 LWTUNNEL_IP_OPTS = 8, 118217 __LWTUNNEL_IP_MAX = 9, 118218 }; 118219 118220 enum lwtunnel_ip6_t { 118221 LWTUNNEL_IP6_UNSPEC = 0, 118222 LWTUNNEL_IP6_ID = 1, 118223 LWTUNNEL_IP6_DST = 2, 118224 LWTUNNEL_IP6_SRC = 3, 118225 LWTUNNEL_IP6_HOPLIMIT = 4, 118226 LWTUNNEL_IP6_TC = 5, 118227 LWTUNNEL_IP6_FLAGS = 6, 118228 LWTUNNEL_IP6_PAD = 7, 118229 LWTUNNEL_IP6_OPTS = 8, 118230 __LWTUNNEL_IP6_MAX = 9, 118231 }; 118232 118233 enum { 118234 LWTUNNEL_IP_OPTS_UNSPEC = 0, 118235 LWTUNNEL_IP_OPTS_GENEVE = 1, 118236 LWTUNNEL_IP_OPTS_VXLAN = 2, 118237 LWTUNNEL_IP_OPTS_ERSPAN = 3, 118238 __LWTUNNEL_IP_OPTS_MAX = 4, 118239 }; 118240 118241 enum { 118242 LWTUNNEL_IP_OPT_GENEVE_UNSPEC = 0, 118243 LWTUNNEL_IP_OPT_GENEVE_CLASS = 1, 118244 LWTUNNEL_IP_OPT_GENEVE_TYPE = 2, 118245 LWTUNNEL_IP_OPT_GENEVE_DATA = 3, 118246 __LWTUNNEL_IP_OPT_GENEVE_MAX = 4, 118247 }; 118248 118249 enum { 118250 LWTUNNEL_IP_OPT_VXLAN_UNSPEC = 0, 118251 LWTUNNEL_IP_OPT_VXLAN_GBP = 1, 118252 __LWTUNNEL_IP_OPT_VXLAN_MAX = 2, 118253 }; 118254 118255 enum { 118256 LWTUNNEL_IP_OPT_ERSPAN_UNSPEC = 0, 118257 LWTUNNEL_IP_OPT_ERSPAN_VER = 1, 118258 LWTUNNEL_IP_OPT_ERSPAN_INDEX = 2, 118259 LWTUNNEL_IP_OPT_ERSPAN_DIR = 3, 118260 LWTUNNEL_IP_OPT_ERSPAN_HWID = 4, 118261 __LWTUNNEL_IP_OPT_ERSPAN_MAX = 5, 118262 }; 118263 118264 struct ip6_tnl_encap_ops { 118265 size_t (*encap_hlen)(struct ip_tunnel_encap *); 118266 int (*build_header)(struct sk_buff *, struct ip_tunnel_encap *, u8 *, struct flowi6 *); 118267 int (*err_handler)(struct sk_buff *, struct inet6_skb_parm *, u8, u8, int, __be32); 118268 }; 118269 118270 struct geneve_opt { 118271 __be16 opt_class; 118272 u8 type; 118273 u8 length: 5; 118274 u8 r3: 1; 118275 u8 r2: 1; 118276 u8 r1: 1; 118277 u8 opt_data[0]; 118278 }; 118279 118280 struct vxlan_metadata { 118281 u32 gbp; 118282 }; 118283 118284 struct erspan_md2 { 118285 __be32 timestamp; 118286 __be16 sgt; 118287 __u8 hwid_upper: 2; 118288 __u8 ft: 5; 118289 __u8 p: 1; 118290 __u8 o: 1; 118291 __u8 gra: 2; 118292 __u8 dir: 1; 118293 __u8 hwid: 4; 118294 }; 118295 118296 struct erspan_metadata { 118297 int version; 118298 union { 118299 __be32 index; 118300 struct erspan_md2 md2; 118301 } u; 118302 }; 118303 118304 struct nhmsg { 118305 unsigned char nh_family; 118306 unsigned char nh_scope; 118307 unsigned char nh_protocol; 118308 unsigned char resvd; 118309 unsigned int nh_flags; 118310 }; 118311 118312 struct nexthop_grp { 118313 __u32 id; 118314 __u8 weight; 118315 __u8 resvd1; 118316 __u16 resvd2; 118317 }; 118318 118319 enum { 118320 NEXTHOP_GRP_TYPE_MPATH = 0, 118321 __NEXTHOP_GRP_TYPE_MAX = 1, 118322 }; 118323 118324 enum { 118325 NHA_UNSPEC = 0, 118326 NHA_ID = 1, 118327 NHA_GROUP = 2, 118328 NHA_GROUP_TYPE = 3, 118329 NHA_BLACKHOLE = 4, 118330 NHA_OIF = 5, 118331 NHA_GATEWAY = 6, 118332 NHA_ENCAP_TYPE = 7, 118333 NHA_ENCAP = 8, 118334 NHA_GROUPS = 9, 118335 NHA_MASTER = 10, 118336 NHA_FDB = 11, 118337 __NHA_MAX = 12, 118338 }; 118339 118340 struct nh_config { 118341 u32 nh_id; 118342 u8 nh_family; 118343 u8 nh_protocol; 118344 u8 nh_blackhole; 118345 u8 nh_fdb; 118346 u32 nh_flags; 118347 int nh_ifindex; 118348 struct net_device *dev; 118349 union { 118350 __be32 ipv4; 118351 struct in6_addr ipv6; 118352 } gw; 118353 struct nlattr *nh_grp; 118354 u16 nh_grp_type; 118355 struct nlattr *nh_encap; 118356 u16 nh_encap_type; 118357 u32 nlflags; 118358 struct nl_info nlinfo; 118359 }; 118360 118361 enum nexthop_event_type { 118362 NEXTHOP_EVENT_DEL = 0, 118363 NEXTHOP_EVENT_REPLACE = 1, 118364 }; 118365 118366 struct nh_notifier_single_info { 118367 struct net_device *dev; 118368 u8 gw_family; 118369 union { 118370 __be32 ipv4; 118371 struct in6_addr ipv6; 118372 }; 118373 u8 is_reject: 1; 118374 u8 is_fdb: 1; 118375 u8 has_encap: 1; 118376 }; 118377 118378 struct nh_notifier_grp_entry_info { 118379 u8 weight; 118380 u32 id; 118381 struct nh_notifier_single_info nh; 118382 }; 118383 118384 struct nh_notifier_grp_info { 118385 u16 num_nh; 118386 bool is_fdb; 118387 struct nh_notifier_grp_entry_info nh_entries[0]; 118388 }; 118389 118390 struct nh_notifier_info { 118391 struct net *net; 118392 struct netlink_ext_ack *extack; 118393 u32 id; 118394 bool is_grp; 118395 union { 118396 struct nh_notifier_single_info *nh; 118397 struct nh_notifier_grp_info *nh_grp; 118398 }; 118399 }; 118400 118401 struct inet6_protocol { 118402 void (*early_demux)(struct sk_buff *); 118403 void (*early_demux_handler)(struct sk_buff *); 118404 int (*handler)(struct sk_buff *); 118405 int (*err_handler)(struct sk_buff *, struct inet6_skb_parm *, u8, u8, int, __be32); 118406 unsigned int flags; 118407 }; 118408 118409 struct snmp_mib { 118410 const char *name; 118411 int entry; 118412 }; 118413 118414 struct fib4_rule { 118415 struct fib_rule common; 118416 u8 dst_len; 118417 u8 src_len; 118418 u8 tos; 118419 __be32 src; 118420 __be32 srcmask; 118421 __be32 dst; 118422 __be32 dstmask; 118423 u32 tclassid; 118424 }; 118425 118426 enum { 118427 PIM_TYPE_HELLO = 0, 118428 PIM_TYPE_REGISTER = 1, 118429 PIM_TYPE_REGISTER_STOP = 2, 118430 PIM_TYPE_JOIN_PRUNE = 3, 118431 PIM_TYPE_BOOTSTRAP = 4, 118432 PIM_TYPE_ASSERT = 5, 118433 PIM_TYPE_GRAFT = 6, 118434 PIM_TYPE_GRAFT_ACK = 7, 118435 PIM_TYPE_CANDIDATE_RP_ADV = 8, 118436 }; 118437 118438 struct pimreghdr { 118439 __u8 type; 118440 __u8 reserved; 118441 __be16 csum; 118442 __be32 flags; 118443 }; 118444 118445 typedef short unsigned int vifi_t; 118446 118447 struct vifctl { 118448 vifi_t vifc_vifi; 118449 unsigned char vifc_flags; 118450 unsigned char vifc_threshold; 118451 unsigned int vifc_rate_limit; 118452 union { 118453 struct in_addr vifc_lcl_addr; 118454 int vifc_lcl_ifindex; 118455 }; 118456 struct in_addr vifc_rmt_addr; 118457 }; 118458 118459 struct mfcctl { 118460 struct in_addr mfcc_origin; 118461 struct in_addr mfcc_mcastgrp; 118462 vifi_t mfcc_parent; 118463 unsigned char mfcc_ttls[32]; 118464 unsigned int mfcc_pkt_cnt; 118465 unsigned int mfcc_byte_cnt; 118466 unsigned int mfcc_wrong_if; 118467 int mfcc_expire; 118468 }; 118469 118470 struct sioc_sg_req { 118471 struct in_addr src; 118472 struct in_addr grp; 118473 long unsigned int pktcnt; 118474 long unsigned int bytecnt; 118475 long unsigned int wrong_if; 118476 }; 118477 118478 struct sioc_vif_req { 118479 vifi_t vifi; 118480 long unsigned int icount; 118481 long unsigned int ocount; 118482 long unsigned int ibytes; 118483 long unsigned int obytes; 118484 }; 118485 118486 struct igmpmsg { 118487 __u32 unused1; 118488 __u32 unused2; 118489 unsigned char im_msgtype; 118490 unsigned char im_mbz; 118491 unsigned char im_vif; 118492 unsigned char im_vif_hi; 118493 struct in_addr im_src; 118494 struct in_addr im_dst; 118495 }; 118496 118497 enum { 118498 IPMRA_TABLE_UNSPEC = 0, 118499 IPMRA_TABLE_ID = 1, 118500 IPMRA_TABLE_CACHE_RES_QUEUE_LEN = 2, 118501 IPMRA_TABLE_MROUTE_REG_VIF_NUM = 3, 118502 IPMRA_TABLE_MROUTE_DO_ASSERT = 4, 118503 IPMRA_TABLE_MROUTE_DO_PIM = 5, 118504 IPMRA_TABLE_VIFS = 6, 118505 IPMRA_TABLE_MROUTE_DO_WRVIFWHOLE = 7, 118506 __IPMRA_TABLE_MAX = 8, 118507 }; 118508 118509 enum { 118510 IPMRA_VIF_UNSPEC = 0, 118511 IPMRA_VIF = 1, 118512 __IPMRA_VIF_MAX = 2, 118513 }; 118514 118515 enum { 118516 IPMRA_VIFA_UNSPEC = 0, 118517 IPMRA_VIFA_IFINDEX = 1, 118518 IPMRA_VIFA_VIF_ID = 2, 118519 IPMRA_VIFA_FLAGS = 3, 118520 IPMRA_VIFA_BYTES_IN = 4, 118521 IPMRA_VIFA_BYTES_OUT = 5, 118522 IPMRA_VIFA_PACKETS_IN = 6, 118523 IPMRA_VIFA_PACKETS_OUT = 7, 118524 IPMRA_VIFA_LOCAL_ADDR = 8, 118525 IPMRA_VIFA_REMOTE_ADDR = 9, 118526 IPMRA_VIFA_PAD = 10, 118527 __IPMRA_VIFA_MAX = 11, 118528 }; 118529 118530 enum { 118531 IPMRA_CREPORT_UNSPEC = 0, 118532 IPMRA_CREPORT_MSGTYPE = 1, 118533 IPMRA_CREPORT_VIF_ID = 2, 118534 IPMRA_CREPORT_SRC_ADDR = 3, 118535 IPMRA_CREPORT_DST_ADDR = 4, 118536 IPMRA_CREPORT_PKT = 5, 118537 IPMRA_CREPORT_TABLE = 6, 118538 __IPMRA_CREPORT_MAX = 7, 118539 }; 118540 118541 struct vif_device { 118542 struct net_device *dev; 118543 long unsigned int bytes_in; 118544 long unsigned int bytes_out; 118545 long unsigned int pkt_in; 118546 long unsigned int pkt_out; 118547 long unsigned int rate_limit; 118548 unsigned char threshold; 118549 short unsigned int flags; 118550 int link; 118551 struct netdev_phys_item_id dev_parent_id; 118552 __be32 local; 118553 __be32 remote; 118554 }; 118555 118556 struct vif_entry_notifier_info { 118557 struct fib_notifier_info info; 118558 struct net_device *dev; 118559 short unsigned int vif_index; 118560 short unsigned int vif_flags; 118561 u32 tb_id; 118562 }; 118563 118564 enum { 118565 MFC_STATIC = 1, 118566 MFC_OFFLOAD = 2, 118567 }; 118568 118569 struct mr_mfc { 118570 struct rhlist_head mnode; 118571 short unsigned int mfc_parent; 118572 int mfc_flags; 118573 union { 118574 struct { 118575 long unsigned int expires; 118576 struct sk_buff_head unresolved; 118577 } unres; 118578 struct { 118579 long unsigned int last_assert; 118580 int minvif; 118581 int maxvif; 118582 long unsigned int bytes; 118583 long unsigned int pkt; 118584 long unsigned int wrong_if; 118585 long unsigned int lastuse; 118586 unsigned char ttls[32]; 118587 refcount_t refcount; 118588 } res; 118589 } mfc_un; 118590 struct list_head list; 118591 struct callback_head rcu; 118592 void (*free)(struct callback_head *); 118593 }; 118594 118595 struct mfc_entry_notifier_info { 118596 struct fib_notifier_info info; 118597 struct mr_mfc *mfc; 118598 u32 tb_id; 118599 }; 118600 118601 struct mr_table_ops { 118602 const struct rhashtable_params *rht_params; 118603 void *cmparg_any; 118604 }; 118605 118606 struct mr_table { 118607 struct list_head list; 118608 possible_net_t net; 118609 struct mr_table_ops ops; 118610 u32 id; 118611 struct sock *mroute_sk; 118612 struct timer_list ipmr_expire_timer; 118613 struct list_head mfc_unres_queue; 118614 struct vif_device vif_table[32]; 118615 struct rhltable mfc_hash; 118616 struct list_head mfc_cache_list; 118617 int maxvif; 118618 atomic_t cache_resolve_queue_len; 118619 bool mroute_do_assert; 118620 bool mroute_do_pim; 118621 bool mroute_do_wrvifwhole; 118622 int mroute_reg_vif_num; 118623 }; 118624 118625 struct mr_vif_iter { 118626 struct seq_net_private p; 118627 struct mr_table *mrt; 118628 int ct; 118629 }; 118630 118631 struct mr_mfc_iter { 118632 struct seq_net_private p; 118633 struct mr_table *mrt; 118634 struct list_head *cache; 118635 spinlock_t *lock; 118636 }; 118637 118638 struct mfc_cache_cmp_arg { 118639 __be32 mfc_mcastgrp; 118640 __be32 mfc_origin; 118641 }; 118642 118643 struct mfc_cache { 118644 struct mr_mfc _c; 118645 union { 118646 struct { 118647 __be32 mfc_mcastgrp; 118648 __be32 mfc_origin; 118649 }; 118650 struct mfc_cache_cmp_arg cmparg; 118651 }; 118652 }; 118653 118654 struct ipmr_result { 118655 struct mr_table *mrt; 118656 }; 118657 118658 struct compat_sioc_sg_req { 118659 struct in_addr src; 118660 struct in_addr grp; 118661 compat_ulong_t pktcnt; 118662 compat_ulong_t bytecnt; 118663 compat_ulong_t wrong_if; 118664 }; 118665 118666 struct compat_sioc_vif_req { 118667 vifi_t vifi; 118668 compat_ulong_t icount; 118669 compat_ulong_t ocount; 118670 compat_ulong_t ibytes; 118671 compat_ulong_t obytes; 118672 }; 118673 118674 struct rta_mfc_stats { 118675 __u64 mfcs_packets; 118676 __u64 mfcs_bytes; 118677 __u64 mfcs_wrong_if; 118678 }; 118679 118680 struct bictcp { 118681 u32 cnt; 118682 u32 last_max_cwnd; 118683 u32 last_cwnd; 118684 u32 last_time; 118685 u32 bic_origin_point; 118686 u32 bic_K; 118687 u32 delay_min; 118688 u32 epoch_start; 118689 u32 ack_cnt; 118690 u32 tcp_cwnd; 118691 u16 unused; 118692 u8 sample_cnt; 118693 u8 found; 118694 u32 round_start; 118695 u32 end_seq; 118696 u32 last_ack; 118697 u32 curr_rtt; 118698 }; 118699 118700 struct tls_rec { 118701 struct list_head list; 118702 int tx_ready; 118703 int tx_flags; 118704 struct sk_msg msg_plaintext; 118705 struct sk_msg msg_encrypted; 118706 struct scatterlist sg_aead_in[2]; 118707 struct scatterlist sg_aead_out[2]; 118708 char content_type; 118709 struct scatterlist sg_content_type; 118710 char aad_space[13]; 118711 u8 iv_data[16]; 118712 struct aead_request aead_req; 118713 u8 aead_req_ctx[0]; 118714 }; 118715 118716 struct tx_work { 118717 struct delayed_work work; 118718 struct sock *sk; 118719 }; 118720 118721 struct tls_sw_context_tx { 118722 struct crypto_aead *aead_send; 118723 struct crypto_wait async_wait; 118724 struct tx_work tx_work; 118725 struct tls_rec *open_rec; 118726 struct list_head tx_list; 118727 atomic_t encrypt_pending; 118728 spinlock_t encrypt_compl_lock; 118729 int async_notify; 118730 u8 async_capable: 1; 118731 long unsigned int tx_bitmask; 118732 }; 118733 118734 enum { 118735 TCP_BPF_IPV4 = 0, 118736 TCP_BPF_IPV6 = 1, 118737 TCP_BPF_NUM_PROTS = 2, 118738 }; 118739 118740 enum { 118741 TCP_BPF_BASE = 0, 118742 TCP_BPF_TX = 1, 118743 TCP_BPF_NUM_CFGS = 2, 118744 }; 118745 118746 enum { 118747 UDP_BPF_IPV4 = 0, 118748 UDP_BPF_IPV6 = 1, 118749 UDP_BPF_NUM_PROTS = 2, 118750 }; 118751 118752 struct netlbl_audit { 118753 u32 secid; 118754 kuid_t loginuid; 118755 unsigned int sessionid; 118756 }; 118757 118758 struct cipso_v4_std_map_tbl { 118759 struct { 118760 u32 *cipso; 118761 u32 *local; 118762 u32 cipso_size; 118763 u32 local_size; 118764 } lvl; 118765 struct { 118766 u32 *cipso; 118767 u32 *local; 118768 u32 cipso_size; 118769 u32 local_size; 118770 } cat; 118771 }; 118772 118773 struct cipso_v4_doi { 118774 u32 doi; 118775 u32 type; 118776 union { 118777 struct cipso_v4_std_map_tbl *std; 118778 } map; 118779 u8 tags[5]; 118780 refcount_t refcount; 118781 struct list_head list; 118782 struct callback_head rcu; 118783 }; 118784 118785 struct cipso_v4_map_cache_bkt { 118786 spinlock_t lock; 118787 u32 size; 118788 struct list_head list; 118789 }; 118790 118791 struct cipso_v4_map_cache_entry { 118792 u32 hash; 118793 unsigned char *key; 118794 size_t key_len; 118795 struct netlbl_lsm_cache *lsm_data; 118796 u32 activity; 118797 struct list_head list; 118798 }; 118799 118800 struct xfrm_policy_afinfo { 118801 struct dst_ops *dst_ops; 118802 struct dst_entry * (*dst_lookup)(struct net *, int, int, const xfrm_address_t *, const xfrm_address_t *, u32); 118803 int (*get_saddr)(struct net *, int, xfrm_address_t *, xfrm_address_t *, u32); 118804 int (*fill_dst)(struct xfrm_dst *, struct net_device *, const struct flowi *); 118805 struct dst_entry * (*blackhole_route)(struct net *, struct dst_entry *); 118806 }; 118807 118808 struct xfrm_state_afinfo { 118809 u8 family; 118810 u8 proto; 118811 const struct xfrm_type_offload *type_offload_esp; 118812 const struct xfrm_type *type_esp; 118813 const struct xfrm_type *type_ipip; 118814 const struct xfrm_type *type_ipip6; 118815 const struct xfrm_type *type_comp; 118816 const struct xfrm_type *type_ah; 118817 const struct xfrm_type *type_routing; 118818 const struct xfrm_type *type_dstopts; 118819 int (*output)(struct net *, struct sock *, struct sk_buff *); 118820 int (*transport_finish)(struct sk_buff *, int); 118821 void (*local_error)(struct sk_buff *, u32); 118822 }; 118823 118824 struct ip_tunnel; 118825 118826 struct ip6_tnl; 118827 118828 struct xfrm_tunnel_skb_cb { 118829 union { 118830 struct inet_skb_parm h4; 118831 struct inet6_skb_parm h6; 118832 } header; 118833 union { 118834 struct ip_tunnel *ip4; 118835 struct ip6_tnl *ip6; 118836 } tunnel; 118837 }; 118838 118839 struct xfrm_mode_skb_cb { 118840 struct xfrm_tunnel_skb_cb header; 118841 __be16 id; 118842 __be16 frag_off; 118843 u8 ihl; 118844 u8 tos; 118845 u8 ttl; 118846 u8 protocol; 118847 u8 optlen; 118848 u8 flow_lbl[3]; 118849 }; 118850 118851 struct xfrm_spi_skb_cb { 118852 struct xfrm_tunnel_skb_cb header; 118853 unsigned int daddroff; 118854 unsigned int family; 118855 __be32 seq; 118856 }; 118857 118858 struct xfrm_input_afinfo { 118859 u8 family; 118860 bool is_ipip; 118861 int (*callback)(struct sk_buff *, u8, int); 118862 }; 118863 118864 struct xfrm4_protocol { 118865 int (*handler)(struct sk_buff *); 118866 int (*input_handler)(struct sk_buff *, int, __be32, int); 118867 int (*cb_handler)(struct sk_buff *, int); 118868 int (*err_handler)(struct sk_buff *, u32); 118869 struct xfrm4_protocol *next; 118870 int priority; 118871 }; 118872 118873 typedef u64 (*btf_bpf_tcp_send_ack)(struct tcp_sock *, u32); 118874 118875 struct seqcount_mutex { 118876 seqcount_t seqcount; 118877 }; 118878 118879 typedef struct seqcount_mutex seqcount_mutex_t; 118880 118881 enum { 118882 XFRM_STATE_VOID = 0, 118883 XFRM_STATE_ACQ = 1, 118884 XFRM_STATE_VALID = 2, 118885 XFRM_STATE_ERROR = 3, 118886 XFRM_STATE_EXPIRED = 4, 118887 XFRM_STATE_DEAD = 5, 118888 }; 118889 118890 struct xfrm_if; 118891 118892 struct xfrm_if_cb { 118893 struct xfrm_if * (*decode_session)(struct sk_buff *, short unsigned int); 118894 }; 118895 118896 struct xfrm_if_parms { 118897 int link; 118898 u32 if_id; 118899 }; 118900 118901 struct xfrm_if { 118902 struct xfrm_if *next; 118903 struct net_device *dev; 118904 struct net *net; 118905 struct xfrm_if_parms p; 118906 struct gro_cells gro_cells; 118907 }; 118908 118909 struct xfrm_policy_walk { 118910 struct xfrm_policy_walk_entry walk; 118911 u8 type; 118912 u32 seq; 118913 }; 118914 118915 struct xfrm_kmaddress { 118916 xfrm_address_t local; 118917 xfrm_address_t remote; 118918 u32 reserved; 118919 u16 family; 118920 }; 118921 118922 struct xfrm_migrate { 118923 xfrm_address_t old_daddr; 118924 xfrm_address_t old_saddr; 118925 xfrm_address_t new_daddr; 118926 xfrm_address_t new_saddr; 118927 u8 proto; 118928 u8 mode; 118929 u16 reserved; 118930 u32 reqid; 118931 u16 old_family; 118932 u16 new_family; 118933 }; 118934 118935 struct xfrmk_spdinfo { 118936 u32 incnt; 118937 u32 outcnt; 118938 u32 fwdcnt; 118939 u32 inscnt; 118940 u32 outscnt; 118941 u32 fwdscnt; 118942 u32 spdhcnt; 118943 u32 spdhmcnt; 118944 }; 118945 118946 struct ip6_mh { 118947 __u8 ip6mh_proto; 118948 __u8 ip6mh_hdrlen; 118949 __u8 ip6mh_type; 118950 __u8 ip6mh_reserved; 118951 __u16 ip6mh_cksum; 118952 __u8 data[0]; 118953 }; 118954 118955 struct xfrm_flo { 118956 struct dst_entry *dst_orig; 118957 u8 flags; 118958 }; 118959 118960 struct xfrm_pol_inexact_node { 118961 struct rb_node node; 118962 union { 118963 xfrm_address_t addr; 118964 struct callback_head rcu; 118965 }; 118966 u8 prefixlen; 118967 struct rb_root root; 118968 struct hlist_head hhead; 118969 }; 118970 118971 struct xfrm_pol_inexact_key { 118972 possible_net_t net; 118973 u32 if_id; 118974 u16 family; 118975 u8 dir; 118976 u8 type; 118977 }; 118978 118979 struct xfrm_pol_inexact_bin { 118980 struct xfrm_pol_inexact_key k; 118981 struct rhash_head head; 118982 struct hlist_head hhead; 118983 seqcount_spinlock_t count; 118984 struct rb_root root_d; 118985 struct rb_root root_s; 118986 struct list_head inexact_bins; 118987 struct callback_head rcu; 118988 }; 118989 118990 enum xfrm_pol_inexact_candidate_type { 118991 XFRM_POL_CAND_BOTH = 0, 118992 XFRM_POL_CAND_SADDR = 1, 118993 XFRM_POL_CAND_DADDR = 2, 118994 XFRM_POL_CAND_ANY = 3, 118995 XFRM_POL_CAND_MAX = 4, 118996 }; 118997 118998 struct xfrm_pol_inexact_candidates { 118999 struct hlist_head *res[4]; 119000 }; 119001 119002 enum xfrm_ae_ftype_t { 119003 XFRM_AE_UNSPEC = 0, 119004 XFRM_AE_RTHR = 1, 119005 XFRM_AE_RVAL = 2, 119006 XFRM_AE_LVAL = 4, 119007 XFRM_AE_ETHR = 8, 119008 XFRM_AE_CR = 16, 119009 XFRM_AE_CE = 32, 119010 XFRM_AE_CU = 64, 119011 __XFRM_AE_MAX = 65, 119012 }; 119013 119014 enum xfrm_nlgroups { 119015 XFRMNLGRP_NONE = 0, 119016 XFRMNLGRP_ACQUIRE = 1, 119017 XFRMNLGRP_EXPIRE = 2, 119018 XFRMNLGRP_SA = 3, 119019 XFRMNLGRP_POLICY = 4, 119020 XFRMNLGRP_AEVENTS = 5, 119021 XFRMNLGRP_REPORT = 6, 119022 XFRMNLGRP_MIGRATE = 7, 119023 XFRMNLGRP_MAPPING = 8, 119024 __XFRMNLGRP_MAX = 9, 119025 }; 119026 119027 enum { 119028 XFRM_MODE_FLAG_TUNNEL = 1, 119029 }; 119030 119031 struct km_event { 119032 union { 119033 u32 hard; 119034 u32 proto; 119035 u32 byid; 119036 u32 aevent; 119037 u32 type; 119038 } data; 119039 u32 seq; 119040 u32 portid; 119041 u32 event; 119042 struct net *net; 119043 }; 119044 119045 struct xfrm_mgr { 119046 struct list_head list; 119047 int (*notify)(struct xfrm_state *, const struct km_event *); 119048 int (*acquire)(struct xfrm_state *, struct xfrm_tmpl *, struct xfrm_policy *); 119049 struct xfrm_policy * (*compile_policy)(struct sock *, int, u8 *, int, int *); 119050 int (*new_mapping)(struct xfrm_state *, xfrm_address_t *, __be16); 119051 int (*notify_policy)(struct xfrm_policy *, int, const struct km_event *); 119052 int (*report)(struct net *, u8, struct xfrm_selector *, xfrm_address_t *); 119053 int (*migrate)(const struct xfrm_selector *, u8, u8, const struct xfrm_migrate *, int, const struct xfrm_kmaddress *, const struct xfrm_encap_tmpl *); 119054 bool (*is_alive)(const struct km_event *); 119055 }; 119056 119057 struct xfrmk_sadinfo { 119058 u32 sadhcnt; 119059 u32 sadhmcnt; 119060 u32 sadcnt; 119061 }; 119062 119063 struct xfrm_translator { 119064 int (*alloc_compat)(struct sk_buff *, const struct nlmsghdr *); 119065 struct nlmsghdr * (*rcv_msg_compat)(const struct nlmsghdr *, int, const struct nla_policy *, struct netlink_ext_ack *); 119066 int (*xlate_user_policy_sockptr)(u8 **, int); 119067 struct module *owner; 119068 }; 119069 119070 struct ip_beet_phdr { 119071 __u8 nexthdr; 119072 __u8 hdrlen; 119073 __u8 padlen; 119074 __u8 reserved; 119075 }; 119076 119077 struct ip_tunnel_6rd_parm { 119078 struct in6_addr prefix; 119079 __be32 relay_prefix; 119080 u16 prefixlen; 119081 u16 relay_prefixlen; 119082 }; 119083 119084 struct ip_tunnel_prl_entry; 119085 119086 struct ip_tunnel { 119087 struct ip_tunnel *next; 119088 struct hlist_node hash_node; 119089 struct net_device *dev; 119090 struct net *net; 119091 long unsigned int err_time; 119092 int err_count; 119093 u32 i_seqno; 119094 u32 o_seqno; 119095 int tun_hlen; 119096 u32 index; 119097 u8 erspan_ver; 119098 u8 dir; 119099 u16 hwid; 119100 struct dst_cache dst_cache; 119101 struct ip_tunnel_parm parms; 119102 int mlink; 119103 int encap_hlen; 119104 int hlen; 119105 struct ip_tunnel_encap encap; 119106 struct ip_tunnel_6rd_parm ip6rd; 119107 struct ip_tunnel_prl_entry *prl; 119108 unsigned int prl_count; 119109 unsigned int ip_tnl_net_id; 119110 struct gro_cells gro_cells; 119111 __u32 fwmark; 119112 bool collect_md; 119113 bool ignore_df; 119114 }; 119115 119116 struct __ip6_tnl_parm { 119117 char name[16]; 119118 int link; 119119 __u8 proto; 119120 __u8 encap_limit; 119121 __u8 hop_limit; 119122 bool collect_md; 119123 __be32 flowinfo; 119124 __u32 flags; 119125 struct in6_addr laddr; 119126 struct in6_addr raddr; 119127 __be16 i_flags; 119128 __be16 o_flags; 119129 __be32 i_key; 119130 __be32 o_key; 119131 __u32 fwmark; 119132 __u32 index; 119133 __u8 erspan_ver; 119134 __u8 dir; 119135 __u16 hwid; 119136 }; 119137 119138 struct ip6_tnl { 119139 struct ip6_tnl *next; 119140 struct net_device *dev; 119141 struct net *net; 119142 struct __ip6_tnl_parm parms; 119143 struct flowi fl; 119144 struct dst_cache dst_cache; 119145 struct gro_cells gro_cells; 119146 int err_count; 119147 long unsigned int err_time; 119148 __u32 i_seqno; 119149 __u32 o_seqno; 119150 int hlen; 119151 int tun_hlen; 119152 int encap_hlen; 119153 struct ip_tunnel_encap encap; 119154 int mlink; 119155 }; 119156 119157 struct xfrm_skb_cb { 119158 struct xfrm_tunnel_skb_cb header; 119159 union { 119160 struct { 119161 __u32 low; 119162 __u32 hi; 119163 } output; 119164 struct { 119165 __be32 low; 119166 __be32 hi; 119167 } input; 119168 } seq; 119169 }; 119170 119171 struct ip_tunnel_prl_entry { 119172 struct ip_tunnel_prl_entry *next; 119173 __be32 addr; 119174 u16 flags; 119175 struct callback_head callback_head; 119176 }; 119177 119178 struct xfrm_trans_tasklet { 119179 struct tasklet_struct tasklet; 119180 struct sk_buff_head queue; 119181 }; 119182 119183 struct xfrm_trans_cb { 119184 union { 119185 struct inet_skb_parm h4; 119186 struct inet6_skb_parm h6; 119187 } header; 119188 int (*finish)(struct net *, struct sock *, struct sk_buff *); 119189 struct net *net; 119190 }; 119191 119192 struct xfrm_user_offload { 119193 int ifindex; 119194 __u8 flags; 119195 }; 119196 119197 struct sadb_alg { 119198 __u8 sadb_alg_id; 119199 __u8 sadb_alg_ivlen; 119200 __u16 sadb_alg_minbits; 119201 __u16 sadb_alg_maxbits; 119202 __u16 sadb_alg_reserved; 119203 }; 119204 119205 struct xfrm_algo_aead_info { 119206 char *geniv; 119207 u16 icv_truncbits; 119208 }; 119209 119210 struct xfrm_algo_auth_info { 119211 u16 icv_truncbits; 119212 u16 icv_fullbits; 119213 }; 119214 119215 struct xfrm_algo_encr_info { 119216 char *geniv; 119217 u16 blockbits; 119218 u16 defkeybits; 119219 }; 119220 119221 struct xfrm_algo_comp_info { 119222 u16 threshold; 119223 }; 119224 119225 struct xfrm_algo_desc { 119226 char *name; 119227 char *compat; 119228 u8 available: 1; 119229 u8 pfkey_supported: 1; 119230 union { 119231 struct xfrm_algo_aead_info aead; 119232 struct xfrm_algo_auth_info auth; 119233 struct xfrm_algo_encr_info encr; 119234 struct xfrm_algo_comp_info comp; 119235 } uinfo; 119236 struct sadb_alg desc; 119237 }; 119238 119239 struct xfrm_algo_list { 119240 struct xfrm_algo_desc *algs; 119241 int entries; 119242 u32 type; 119243 u32 mask; 119244 }; 119245 119246 struct xfrm_aead_name { 119247 const char *name; 119248 int icvbits; 119249 }; 119250 119251 enum { 119252 XFRM_SHARE_ANY = 0, 119253 XFRM_SHARE_SESSION = 1, 119254 XFRM_SHARE_USER = 2, 119255 XFRM_SHARE_UNIQUE = 3, 119256 }; 119257 119258 struct xfrm_user_tmpl { 119259 struct xfrm_id id; 119260 __u16 family; 119261 xfrm_address_t saddr; 119262 __u32 reqid; 119263 __u8 mode; 119264 __u8 share; 119265 __u8 optional; 119266 __u32 aalgos; 119267 __u32 ealgos; 119268 __u32 calgos; 119269 }; 119270 119271 struct xfrm_userpolicy_type { 119272 __u8 type; 119273 __u16 reserved1; 119274 __u8 reserved2; 119275 }; 119276 119277 enum xfrm_sadattr_type_t { 119278 XFRMA_SAD_UNSPEC = 0, 119279 XFRMA_SAD_CNT = 1, 119280 XFRMA_SAD_HINFO = 2, 119281 __XFRMA_SAD_MAX = 3, 119282 }; 119283 119284 struct xfrmu_sadhinfo { 119285 __u32 sadhcnt; 119286 __u32 sadhmcnt; 119287 }; 119288 119289 enum xfrm_spdattr_type_t { 119290 XFRMA_SPD_UNSPEC = 0, 119291 XFRMA_SPD_INFO = 1, 119292 XFRMA_SPD_HINFO = 2, 119293 XFRMA_SPD_IPV4_HTHRESH = 3, 119294 XFRMA_SPD_IPV6_HTHRESH = 4, 119295 __XFRMA_SPD_MAX = 5, 119296 }; 119297 119298 struct xfrmu_spdinfo { 119299 __u32 incnt; 119300 __u32 outcnt; 119301 __u32 fwdcnt; 119302 __u32 inscnt; 119303 __u32 outscnt; 119304 __u32 fwdscnt; 119305 }; 119306 119307 struct xfrmu_spdhinfo { 119308 __u32 spdhcnt; 119309 __u32 spdhmcnt; 119310 }; 119311 119312 struct xfrmu_spdhthresh { 119313 __u8 lbits; 119314 __u8 rbits; 119315 }; 119316 119317 struct xfrm_usersa_info { 119318 struct xfrm_selector sel; 119319 struct xfrm_id id; 119320 xfrm_address_t saddr; 119321 struct xfrm_lifetime_cfg lft; 119322 struct xfrm_lifetime_cur curlft; 119323 struct xfrm_stats stats; 119324 __u32 seq; 119325 __u32 reqid; 119326 __u16 family; 119327 __u8 mode; 119328 __u8 replay_window; 119329 __u8 flags; 119330 }; 119331 119332 struct xfrm_usersa_id { 119333 xfrm_address_t daddr; 119334 __be32 spi; 119335 __u16 family; 119336 __u8 proto; 119337 }; 119338 119339 struct xfrm_aevent_id { 119340 struct xfrm_usersa_id sa_id; 119341 xfrm_address_t saddr; 119342 __u32 flags; 119343 __u32 reqid; 119344 }; 119345 119346 struct xfrm_userspi_info { 119347 struct xfrm_usersa_info info; 119348 __u32 min; 119349 __u32 max; 119350 }; 119351 119352 struct xfrm_userpolicy_info { 119353 struct xfrm_selector sel; 119354 struct xfrm_lifetime_cfg lft; 119355 struct xfrm_lifetime_cur curlft; 119356 __u32 priority; 119357 __u32 index; 119358 __u8 dir; 119359 __u8 action; 119360 __u8 flags; 119361 __u8 share; 119362 }; 119363 119364 struct xfrm_userpolicy_id { 119365 struct xfrm_selector sel; 119366 __u32 index; 119367 __u8 dir; 119368 }; 119369 119370 struct xfrm_user_acquire { 119371 struct xfrm_id id; 119372 xfrm_address_t saddr; 119373 struct xfrm_selector sel; 119374 struct xfrm_userpolicy_info policy; 119375 __u32 aalgos; 119376 __u32 ealgos; 119377 __u32 calgos; 119378 __u32 seq; 119379 }; 119380 119381 struct xfrm_user_expire { 119382 struct xfrm_usersa_info state; 119383 __u8 hard; 119384 }; 119385 119386 struct xfrm_user_polexpire { 119387 struct xfrm_userpolicy_info pol; 119388 __u8 hard; 119389 }; 119390 119391 struct xfrm_usersa_flush { 119392 __u8 proto; 119393 }; 119394 119395 struct xfrm_user_report { 119396 __u8 proto; 119397 struct xfrm_selector sel; 119398 }; 119399 119400 struct xfrm_user_kmaddress { 119401 xfrm_address_t local; 119402 xfrm_address_t remote; 119403 __u32 reserved; 119404 __u16 family; 119405 }; 119406 119407 struct xfrm_user_migrate { 119408 xfrm_address_t old_daddr; 119409 xfrm_address_t old_saddr; 119410 xfrm_address_t new_daddr; 119411 xfrm_address_t new_saddr; 119412 __u8 proto; 119413 __u8 mode; 119414 __u16 reserved; 119415 __u32 reqid; 119416 __u16 old_family; 119417 __u16 new_family; 119418 }; 119419 119420 struct xfrm_user_mapping { 119421 struct xfrm_usersa_id id; 119422 __u32 reqid; 119423 xfrm_address_t old_saddr; 119424 xfrm_address_t new_saddr; 119425 __be16 old_sport; 119426 __be16 new_sport; 119427 }; 119428 119429 struct xfrm_dump_info { 119430 struct sk_buff *in_skb; 119431 struct sk_buff *out_skb; 119432 u32 nlmsg_seq; 119433 u16 nlmsg_flags; 119434 }; 119435 119436 struct xfrm_link { 119437 int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); 119438 int (*start)(struct netlink_callback *); 119439 int (*dump)(struct sk_buff *, struct netlink_callback *); 119440 int (*done)(struct netlink_callback *); 119441 const struct nla_policy *nla_pol; 119442 int nla_max; 119443 }; 119444 119445 struct espintcp_msg { 119446 struct sk_buff *skb; 119447 struct sk_msg skmsg; 119448 int offset; 119449 int len; 119450 }; 119451 119452 struct espintcp_ctx { 119453 struct strparser strp; 119454 struct sk_buff_head ike_queue; 119455 struct sk_buff_head out_queue; 119456 struct espintcp_msg partial; 119457 void (*saved_data_ready)(struct sock *); 119458 void (*saved_write_space)(struct sock *); 119459 void (*saved_destruct)(struct sock *); 119460 struct work_struct work; 119461 bool tx_running; 119462 }; 119463 119464 struct unix_stream_read_state { 119465 int (*recv_actor)(struct sk_buff *, int, int, struct unix_stream_read_state *); 119466 struct socket *socket; 119467 struct msghdr *msg; 119468 struct pipe_inode_info *pipe; 119469 size_t size; 119470 int flags; 119471 unsigned int splice_flags; 119472 }; 119473 119474 struct ipv6_params { 119475 __s32 disable_ipv6; 119476 __s32 autoconf; 119477 }; 119478 119479 enum flowlabel_reflect { 119480 FLOWLABEL_REFLECT_ESTABLISHED = 1, 119481 FLOWLABEL_REFLECT_TCP_RESET = 2, 119482 FLOWLABEL_REFLECT_ICMPV6_ECHO_REPLIES = 4, 119483 }; 119484 119485 struct in6_rtmsg { 119486 struct in6_addr rtmsg_dst; 119487 struct in6_addr rtmsg_src; 119488 struct in6_addr rtmsg_gateway; 119489 __u32 rtmsg_type; 119490 __u16 rtmsg_dst_len; 119491 __u16 rtmsg_src_len; 119492 __u32 rtmsg_metric; 119493 long unsigned int rtmsg_info; 119494 __u32 rtmsg_flags; 119495 int rtmsg_ifindex; 119496 }; 119497 119498 struct compat_in6_rtmsg { 119499 struct in6_addr rtmsg_dst; 119500 struct in6_addr rtmsg_src; 119501 struct in6_addr rtmsg_gateway; 119502 u32 rtmsg_type; 119503 u16 rtmsg_dst_len; 119504 u16 rtmsg_src_len; 119505 u32 rtmsg_metric; 119506 u32 rtmsg_info; 119507 u32 rtmsg_flags; 119508 s32 rtmsg_ifindex; 119509 }; 119510 119511 struct ac6_iter_state { 119512 struct seq_net_private p; 119513 struct net_device *dev; 119514 struct inet6_dev *idev; 119515 }; 119516 119517 struct ip6_fraglist_iter { 119518 struct ipv6hdr *tmp_hdr; 119519 struct sk_buff *frag; 119520 int offset; 119521 unsigned int hlen; 119522 __be32 frag_id; 119523 u8 nexthdr; 119524 }; 119525 119526 struct ip6_frag_state { 119527 u8 *prevhdr; 119528 unsigned int hlen; 119529 unsigned int mtu; 119530 unsigned int left; 119531 int offset; 119532 int ptr; 119533 int hroom; 119534 int troom; 119535 __be32 frag_id; 119536 u8 nexthdr; 119537 }; 119538 119539 struct ip6_ra_chain { 119540 struct ip6_ra_chain *next; 119541 struct sock *sk; 119542 int sel; 119543 void (*destructor)(struct sock *); 119544 }; 119545 119546 struct ipcm6_cookie { 119547 struct sockcm_cookie sockc; 119548 __s16 hlimit; 119549 __s16 tclass; 119550 __s8 dontfrag; 119551 struct ipv6_txoptions *opt; 119552 __u16 gso_size; 119553 }; 119554 119555 enum { 119556 IFLA_INET6_UNSPEC = 0, 119557 IFLA_INET6_FLAGS = 1, 119558 IFLA_INET6_CONF = 2, 119559 IFLA_INET6_STATS = 3, 119560 IFLA_INET6_MCAST = 4, 119561 IFLA_INET6_CACHEINFO = 5, 119562 IFLA_INET6_ICMP6STATS = 6, 119563 IFLA_INET6_TOKEN = 7, 119564 IFLA_INET6_ADDR_GEN_MODE = 8, 119565 __IFLA_INET6_MAX = 9, 119566 }; 119567 119568 enum in6_addr_gen_mode { 119569 IN6_ADDR_GEN_MODE_EUI64 = 0, 119570 IN6_ADDR_GEN_MODE_NONE = 1, 119571 IN6_ADDR_GEN_MODE_STABLE_PRIVACY = 2, 119572 IN6_ADDR_GEN_MODE_RANDOM = 3, 119573 }; 119574 119575 struct ifla_cacheinfo { 119576 __u32 max_reasm_len; 119577 __u32 tstamp; 119578 __u32 reachable_time; 119579 __u32 retrans_time; 119580 }; 119581 119582 struct wpan_phy; 119583 119584 struct wpan_dev_header_ops; 119585 119586 struct wpan_dev { 119587 struct wpan_phy *wpan_phy; 119588 int iftype; 119589 struct list_head list; 119590 struct net_device *netdev; 119591 const struct wpan_dev_header_ops *header_ops; 119592 struct net_device *lowpan_dev; 119593 u32 identifier; 119594 __le16 pan_id; 119595 __le16 short_addr; 119596 __le64 extended_addr; 119597 atomic_t bsn; 119598 atomic_t dsn; 119599 u8 min_be; 119600 u8 max_be; 119601 u8 csma_retries; 119602 s8 frame_retries; 119603 bool lbt; 119604 bool promiscuous_mode; 119605 bool ackreq; 119606 }; 119607 119608 struct prefixmsg { 119609 unsigned char prefix_family; 119610 unsigned char prefix_pad1; 119611 short unsigned int prefix_pad2; 119612 int prefix_ifindex; 119613 unsigned char prefix_type; 119614 unsigned char prefix_len; 119615 unsigned char prefix_flags; 119616 unsigned char prefix_pad3; 119617 }; 119618 119619 enum { 119620 PREFIX_UNSPEC = 0, 119621 PREFIX_ADDRESS = 1, 119622 PREFIX_CACHEINFO = 2, 119623 __PREFIX_MAX = 3, 119624 }; 119625 119626 struct prefix_cacheinfo { 119627 __u32 preferred_time; 119628 __u32 valid_time; 119629 }; 119630 119631 struct in6_ifreq { 119632 struct in6_addr ifr6_addr; 119633 __u32 ifr6_prefixlen; 119634 int ifr6_ifindex; 119635 }; 119636 119637 enum { 119638 DEVCONF_FORWARDING = 0, 119639 DEVCONF_HOPLIMIT = 1, 119640 DEVCONF_MTU6 = 2, 119641 DEVCONF_ACCEPT_RA = 3, 119642 DEVCONF_ACCEPT_REDIRECTS = 4, 119643 DEVCONF_AUTOCONF = 5, 119644 DEVCONF_DAD_TRANSMITS = 6, 119645 DEVCONF_RTR_SOLICITS = 7, 119646 DEVCONF_RTR_SOLICIT_INTERVAL = 8, 119647 DEVCONF_RTR_SOLICIT_DELAY = 9, 119648 DEVCONF_USE_TEMPADDR = 10, 119649 DEVCONF_TEMP_VALID_LFT = 11, 119650 DEVCONF_TEMP_PREFERED_LFT = 12, 119651 DEVCONF_REGEN_MAX_RETRY = 13, 119652 DEVCONF_MAX_DESYNC_FACTOR = 14, 119653 DEVCONF_MAX_ADDRESSES = 15, 119654 DEVCONF_FORCE_MLD_VERSION = 16, 119655 DEVCONF_ACCEPT_RA_DEFRTR = 17, 119656 DEVCONF_ACCEPT_RA_PINFO = 18, 119657 DEVCONF_ACCEPT_RA_RTR_PREF = 19, 119658 DEVCONF_RTR_PROBE_INTERVAL = 20, 119659 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN = 21, 119660 DEVCONF_PROXY_NDP = 22, 119661 DEVCONF_OPTIMISTIC_DAD = 23, 119662 DEVCONF_ACCEPT_SOURCE_ROUTE = 24, 119663 DEVCONF_MC_FORWARDING = 25, 119664 DEVCONF_DISABLE_IPV6 = 26, 119665 DEVCONF_ACCEPT_DAD = 27, 119666 DEVCONF_FORCE_TLLAO = 28, 119667 DEVCONF_NDISC_NOTIFY = 29, 119668 DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL = 30, 119669 DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL = 31, 119670 DEVCONF_SUPPRESS_FRAG_NDISC = 32, 119671 DEVCONF_ACCEPT_RA_FROM_LOCAL = 33, 119672 DEVCONF_USE_OPTIMISTIC = 34, 119673 DEVCONF_ACCEPT_RA_MTU = 35, 119674 DEVCONF_STABLE_SECRET = 36, 119675 DEVCONF_USE_OIF_ADDRS_ONLY = 37, 119676 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT = 38, 119677 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN = 39, 119678 DEVCONF_DROP_UNICAST_IN_L2_MULTICAST = 40, 119679 DEVCONF_DROP_UNSOLICITED_NA = 41, 119680 DEVCONF_KEEP_ADDR_ON_DOWN = 42, 119681 DEVCONF_RTR_SOLICIT_MAX_INTERVAL = 43, 119682 DEVCONF_SEG6_ENABLED = 44, 119683 DEVCONF_SEG6_REQUIRE_HMAC = 45, 119684 DEVCONF_ENHANCED_DAD = 46, 119685 DEVCONF_ADDR_GEN_MODE = 47, 119686 DEVCONF_DISABLE_POLICY = 48, 119687 DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN = 49, 119688 DEVCONF_NDISC_TCLASS = 50, 119689 DEVCONF_RPL_SEG_ENABLED = 51, 119690 DEVCONF_MAX = 52, 119691 }; 119692 119693 enum { 119694 INET6_IFADDR_STATE_PREDAD = 0, 119695 INET6_IFADDR_STATE_DAD = 1, 119696 INET6_IFADDR_STATE_POSTDAD = 2, 119697 INET6_IFADDR_STATE_ERRDAD = 3, 119698 INET6_IFADDR_STATE_DEAD = 4, 119699 }; 119700 119701 enum nl802154_cca_modes { 119702 __NL802154_CCA_INVALID = 0, 119703 NL802154_CCA_ENERGY = 1, 119704 NL802154_CCA_CARRIER = 2, 119705 NL802154_CCA_ENERGY_CARRIER = 3, 119706 NL802154_CCA_ALOHA = 4, 119707 NL802154_CCA_UWB_SHR = 5, 119708 NL802154_CCA_UWB_MULTIPLEXED = 6, 119709 __NL802154_CCA_ATTR_AFTER_LAST = 7, 119710 NL802154_CCA_ATTR_MAX = 6, 119711 }; 119712 119713 enum nl802154_cca_opts { 119714 NL802154_CCA_OPT_ENERGY_CARRIER_AND = 0, 119715 NL802154_CCA_OPT_ENERGY_CARRIER_OR = 1, 119716 __NL802154_CCA_OPT_ATTR_AFTER_LAST = 2, 119717 NL802154_CCA_OPT_ATTR_MAX = 1, 119718 }; 119719 119720 enum nl802154_supported_bool_states { 119721 NL802154_SUPPORTED_BOOL_FALSE = 0, 119722 NL802154_SUPPORTED_BOOL_TRUE = 1, 119723 __NL802154_SUPPORTED_BOOL_INVALD = 2, 119724 NL802154_SUPPORTED_BOOL_BOTH = 3, 119725 __NL802154_SUPPORTED_BOOL_AFTER_LAST = 4, 119726 NL802154_SUPPORTED_BOOL_MAX = 3, 119727 }; 119728 119729 struct wpan_phy_supported { 119730 u32 channels[32]; 119731 u32 cca_modes; 119732 u32 cca_opts; 119733 u32 iftypes; 119734 enum nl802154_supported_bool_states lbt; 119735 u8 min_minbe; 119736 u8 max_minbe; 119737 u8 min_maxbe; 119738 u8 max_maxbe; 119739 u8 min_csma_backoffs; 119740 u8 max_csma_backoffs; 119741 s8 min_frame_retries; 119742 s8 max_frame_retries; 119743 size_t tx_powers_size; 119744 size_t cca_ed_levels_size; 119745 const s32 *tx_powers; 119746 const s32 *cca_ed_levels; 119747 }; 119748 119749 struct wpan_phy_cca { 119750 enum nl802154_cca_modes mode; 119751 enum nl802154_cca_opts opt; 119752 }; 119753 119754 struct wpan_phy { 119755 const void *privid; 119756 u32 flags; 119757 u8 current_channel; 119758 u8 current_page; 119759 struct wpan_phy_supported supported; 119760 s32 transmit_power; 119761 struct wpan_phy_cca cca; 119762 __le64 perm_extended_addr; 119763 s32 cca_ed_level; 119764 u8 symbol_duration; 119765 u16 lifs_period; 119766 u16 sifs_period; 119767 struct device dev; 119768 possible_net_t _net; 119769 long: 64; 119770 char priv[0]; 119771 }; 119772 119773 struct ieee802154_addr { 119774 u8 mode; 119775 __le16 pan_id; 119776 union { 119777 __le16 short_addr; 119778 __le64 extended_addr; 119779 }; 119780 }; 119781 119782 struct wpan_dev_header_ops { 119783 int (*create)(struct sk_buff *, struct net_device *, const struct ieee802154_addr *, const struct ieee802154_addr *, unsigned int); 119784 }; 119785 119786 union fwnet_hwaddr { 119787 u8 u[16]; 119788 struct { 119789 __be64 uniq_id; 119790 u8 max_rec; 119791 u8 sspd; 119792 __be16 fifo_hi; 119793 __be32 fifo_lo; 119794 } uc; 119795 }; 119796 119797 struct in6_validator_info { 119798 struct in6_addr i6vi_addr; 119799 struct inet6_dev *i6vi_dev; 119800 struct netlink_ext_ack *extack; 119801 }; 119802 119803 struct ifa6_config { 119804 const struct in6_addr *pfx; 119805 unsigned int plen; 119806 const struct in6_addr *peer_pfx; 119807 u32 rt_priority; 119808 u32 ifa_flags; 119809 u32 preferred_lft; 119810 u32 valid_lft; 119811 u16 scope; 119812 }; 119813 119814 enum cleanup_prefix_rt_t { 119815 CLEANUP_PREFIX_RT_NOP = 0, 119816 CLEANUP_PREFIX_RT_DEL = 1, 119817 CLEANUP_PREFIX_RT_EXPIRE = 2, 119818 }; 119819 119820 enum { 119821 IPV6_SADDR_RULE_INIT = 0, 119822 IPV6_SADDR_RULE_LOCAL = 1, 119823 IPV6_SADDR_RULE_SCOPE = 2, 119824 IPV6_SADDR_RULE_PREFERRED = 3, 119825 IPV6_SADDR_RULE_HOA = 4, 119826 IPV6_SADDR_RULE_OIF = 5, 119827 IPV6_SADDR_RULE_LABEL = 6, 119828 IPV6_SADDR_RULE_PRIVACY = 7, 119829 IPV6_SADDR_RULE_ORCHID = 8, 119830 IPV6_SADDR_RULE_PREFIX = 9, 119831 IPV6_SADDR_RULE_NOT_OPTIMISTIC = 10, 119832 IPV6_SADDR_RULE_MAX = 11, 119833 }; 119834 119835 struct ipv6_saddr_score { 119836 int rule; 119837 int addr_type; 119838 struct inet6_ifaddr *ifa; 119839 long unsigned int scorebits[1]; 119840 int scopedist; 119841 int matchlen; 119842 }; 119843 119844 struct ipv6_saddr_dst { 119845 const struct in6_addr *addr; 119846 int ifindex; 119847 int scope; 119848 int label; 119849 unsigned int prefs; 119850 }; 119851 119852 struct if6_iter_state { 119853 struct seq_net_private p; 119854 int bucket; 119855 int offset; 119856 }; 119857 119858 enum addr_type_t { 119859 UNICAST_ADDR = 0, 119860 MULTICAST_ADDR = 1, 119861 ANYCAST_ADDR = 2, 119862 }; 119863 119864 struct inet6_fill_args { 119865 u32 portid; 119866 u32 seq; 119867 int event; 119868 unsigned int flags; 119869 int netnsid; 119870 int ifindex; 119871 enum addr_type_t type; 119872 }; 119873 119874 enum { 119875 DAD_PROCESS = 0, 119876 DAD_BEGIN = 1, 119877 DAD_ABORT = 2, 119878 }; 119879 119880 struct ifaddrlblmsg { 119881 __u8 ifal_family; 119882 __u8 __ifal_reserved; 119883 __u8 ifal_prefixlen; 119884 __u8 ifal_flags; 119885 __u32 ifal_index; 119886 __u32 ifal_seq; 119887 }; 119888 119889 enum { 119890 IFAL_ADDRESS = 1, 119891 IFAL_LABEL = 2, 119892 __IFAL_MAX = 3, 119893 }; 119894 119895 struct ip6addrlbl_entry { 119896 struct in6_addr prefix; 119897 int prefixlen; 119898 int ifindex; 119899 int addrtype; 119900 u32 label; 119901 struct hlist_node list; 119902 struct callback_head rcu; 119903 }; 119904 119905 struct ip6addrlbl_init_table { 119906 const struct in6_addr *prefix; 119907 int prefixlen; 119908 u32 label; 119909 }; 119910 119911 struct rd_msg { 119912 struct icmp6hdr icmph; 119913 struct in6_addr target; 119914 struct in6_addr dest; 119915 __u8 opt[0]; 119916 }; 119917 119918 struct fib6_gc_args { 119919 int timeout; 119920 int more; 119921 }; 119922 119923 struct rt6_exception { 119924 struct hlist_node hlist; 119925 struct rt6_info *rt6i; 119926 long unsigned int stamp; 119927 struct callback_head rcu; 119928 }; 119929 119930 typedef struct rt6_info * (*pol_lookup_t)(struct net *, struct fib6_table *, struct flowi6 *, const struct sk_buff *, int); 119931 119932 struct route_info { 119933 __u8 type; 119934 __u8 length; 119935 __u8 prefix_len; 119936 __u8 reserved_l: 3; 119937 __u8 route_pref: 2; 119938 __u8 reserved_h: 3; 119939 __be32 lifetime; 119940 __u8 prefix[0]; 119941 }; 119942 119943 struct rt6_rtnl_dump_arg { 119944 struct sk_buff *skb; 119945 struct netlink_callback *cb; 119946 struct net *net; 119947 struct fib_dump_filter filter; 119948 }; 119949 119950 struct netevent_redirect { 119951 struct dst_entry *old; 119952 struct dst_entry *new; 119953 struct neighbour *neigh; 119954 const void *daddr; 119955 }; 119956 119957 struct trace_event_raw_fib6_table_lookup { 119958 struct trace_entry ent; 119959 u32 tb_id; 119960 int err; 119961 int oif; 119962 int iif; 119963 __u8 tos; 119964 __u8 scope; 119965 __u8 flags; 119966 __u8 src[16]; 119967 __u8 dst[16]; 119968 u16 sport; 119969 u16 dport; 119970 u8 proto; 119971 u8 rt_type; 119972 u32 __data_loc_name; 119973 __u8 gw[16]; 119974 char __data[0]; 119975 }; 119976 119977 struct trace_event_data_offsets_fib6_table_lookup { 119978 u32 name; 119979 }; 119980 119981 typedef void (*btf_trace_fib6_table_lookup)(void *, const struct net *, const struct fib6_result *, struct fib6_table *, const struct flowi6 *); 119982 119983 enum rt6_nud_state { 119984 RT6_NUD_FAIL_HARD = 4294967293, 119985 RT6_NUD_FAIL_PROBE = 4294967294, 119986 RT6_NUD_FAIL_DO_RR = 4294967295, 119987 RT6_NUD_SUCCEED = 1, 119988 }; 119989 119990 struct fib6_nh_dm_arg { 119991 struct net *net; 119992 const struct in6_addr *saddr; 119993 int oif; 119994 int flags; 119995 struct fib6_nh *nh; 119996 }; 119997 119998 struct __rt6_probe_work { 119999 struct work_struct work; 120000 struct in6_addr target; 120001 struct net_device *dev; 120002 }; 120003 120004 struct fib6_nh_frl_arg { 120005 u32 flags; 120006 int oif; 120007 int strict; 120008 int *mpri; 120009 bool *do_rr; 120010 struct fib6_nh *nh; 120011 }; 120012 120013 struct fib6_nh_excptn_arg { 120014 struct rt6_info *rt; 120015 int plen; 120016 }; 120017 120018 struct fib6_nh_match_arg { 120019 const struct net_device *dev; 120020 const struct in6_addr *gw; 120021 struct fib6_nh *match; 120022 }; 120023 120024 struct fib6_nh_age_excptn_arg { 120025 struct fib6_gc_args *gc_args; 120026 long unsigned int now; 120027 }; 120028 120029 struct fib6_nh_rd_arg { 120030 struct fib6_result *res; 120031 struct flowi6 *fl6; 120032 const struct in6_addr *gw; 120033 struct rt6_info **ret; 120034 }; 120035 120036 struct ip6rd_flowi { 120037 struct flowi6 fl6; 120038 struct in6_addr gateway; 120039 }; 120040 120041 struct fib6_nh_del_cached_rt_arg { 120042 struct fib6_config *cfg; 120043 struct fib6_info *f6i; 120044 }; 120045 120046 struct arg_dev_net_ip { 120047 struct net_device *dev; 120048 struct net *net; 120049 struct in6_addr *addr; 120050 }; 120051 120052 struct arg_netdev_event { 120053 const struct net_device *dev; 120054 union { 120055 unsigned char nh_flags; 120056 long unsigned int event; 120057 }; 120058 }; 120059 120060 struct rt6_mtu_change_arg { 120061 struct net_device *dev; 120062 unsigned int mtu; 120063 struct fib6_info *f6i; 120064 }; 120065 120066 struct rt6_nh { 120067 struct fib6_info *fib6_info; 120068 struct fib6_config r_cfg; 120069 struct list_head next; 120070 }; 120071 120072 struct fib6_nh_exception_dump_walker { 120073 struct rt6_rtnl_dump_arg *dump; 120074 struct fib6_info *rt; 120075 unsigned int flags; 120076 unsigned int skip; 120077 unsigned int count; 120078 }; 120079 120080 enum fib6_walk_state { 120081 FWS_S = 0, 120082 FWS_L = 1, 120083 FWS_R = 2, 120084 FWS_C = 3, 120085 FWS_U = 4, 120086 }; 120087 120088 struct fib6_walker { 120089 struct list_head lh; 120090 struct fib6_node *root; 120091 struct fib6_node *node; 120092 struct fib6_info *leaf; 120093 enum fib6_walk_state state; 120094 unsigned int skip; 120095 unsigned int count; 120096 unsigned int skip_in_node; 120097 int (*func)(struct fib6_walker *); 120098 void *args; 120099 }; 120100 120101 struct fib6_entry_notifier_info { 120102 struct fib_notifier_info info; 120103 struct fib6_info *rt; 120104 unsigned int nsiblings; 120105 }; 120106 120107 struct ipv6_route_iter { 120108 struct seq_net_private p; 120109 struct fib6_walker w; 120110 loff_t skip; 120111 struct fib6_table *tbl; 120112 int sernum; 120113 }; 120114 120115 struct bpf_iter__ipv6_route { 120116 union { 120117 struct bpf_iter_meta *meta; 120118 }; 120119 union { 120120 struct fib6_info *rt; 120121 }; 120122 }; 120123 120124 struct fib6_cleaner { 120125 struct fib6_walker w; 120126 struct net *net; 120127 int (*func)(struct fib6_info *, void *); 120128 int sernum; 120129 void *arg; 120130 bool skip_notify; 120131 }; 120132 120133 enum { 120134 FIB6_NO_SERNUM_CHANGE = 0, 120135 }; 120136 120137 struct fib6_dump_arg { 120138 struct net *net; 120139 struct notifier_block *nb; 120140 struct netlink_ext_ack *extack; 120141 }; 120142 120143 struct fib6_nh_pcpu_arg { 120144 struct fib6_info *from; 120145 const struct fib6_table *table; 120146 }; 120147 120148 struct lookup_args { 120149 int offset; 120150 const struct in6_addr *addr; 120151 }; 120152 120153 struct ipv6_mreq { 120154 struct in6_addr ipv6mr_multiaddr; 120155 int ipv6mr_ifindex; 120156 }; 120157 120158 struct in6_flowlabel_req { 120159 struct in6_addr flr_dst; 120160 __be32 flr_label; 120161 __u8 flr_action; 120162 __u8 flr_share; 120163 __u16 flr_flags; 120164 __u16 flr_expires; 120165 __u16 flr_linger; 120166 __u32 __flr_pad; 120167 }; 120168 120169 struct ip6_mtuinfo { 120170 struct sockaddr_in6 ip6m_addr; 120171 __u32 ip6m_mtu; 120172 }; 120173 120174 struct nduseroptmsg { 120175 unsigned char nduseropt_family; 120176 unsigned char nduseropt_pad1; 120177 short unsigned int nduseropt_opts_len; 120178 int nduseropt_ifindex; 120179 __u8 nduseropt_icmp_type; 120180 __u8 nduseropt_icmp_code; 120181 short unsigned int nduseropt_pad2; 120182 unsigned int nduseropt_pad3; 120183 }; 120184 120185 enum { 120186 NDUSEROPT_UNSPEC = 0, 120187 NDUSEROPT_SRCADDR = 1, 120188 __NDUSEROPT_MAX = 2, 120189 }; 120190 120191 struct nd_msg { 120192 struct icmp6hdr icmph; 120193 struct in6_addr target; 120194 __u8 opt[0]; 120195 }; 120196 120197 struct rs_msg { 120198 struct icmp6hdr icmph; 120199 __u8 opt[0]; 120200 }; 120201 120202 struct ra_msg { 120203 struct icmp6hdr icmph; 120204 __be32 reachable_time; 120205 __be32 retrans_timer; 120206 }; 120207 120208 struct icmp6_filter { 120209 __u32 data[8]; 120210 }; 120211 120212 struct raw6_sock { 120213 struct inet_sock inet; 120214 __u32 checksum; 120215 __u32 offset; 120216 struct icmp6_filter filter; 120217 __u32 ip6mr_table; 120218 struct ipv6_pinfo inet6; 120219 }; 120220 120221 typedef int mh_filter_t(struct sock *, struct sk_buff *); 120222 120223 struct raw6_frag_vec { 120224 struct msghdr *msg; 120225 int hlen; 120226 char c[4]; 120227 }; 120228 120229 struct ipv6_destopt_hao { 120230 __u8 type; 120231 __u8 length; 120232 struct in6_addr addr; 120233 } __attribute__((packed)); 120234 120235 typedef void ip6_icmp_send_t(struct sk_buff *, u8, u8, __u32, const struct in6_addr *, const struct inet6_skb_parm *); 120236 120237 struct icmpv6_msg { 120238 struct sk_buff *skb; 120239 int offset; 120240 uint8_t type; 120241 }; 120242 120243 struct icmp6_err { 120244 int err; 120245 int fatal; 120246 }; 120247 120248 struct mld_msg { 120249 struct icmp6hdr mld_hdr; 120250 struct in6_addr mld_mca; 120251 }; 120252 120253 struct mld2_grec { 120254 __u8 grec_type; 120255 __u8 grec_auxwords; 120256 __be16 grec_nsrcs; 120257 struct in6_addr grec_mca; 120258 struct in6_addr grec_src[0]; 120259 }; 120260 120261 struct mld2_report { 120262 struct icmp6hdr mld2r_hdr; 120263 struct mld2_grec mld2r_grec[0]; 120264 }; 120265 120266 struct mld2_query { 120267 struct icmp6hdr mld2q_hdr; 120268 struct in6_addr mld2q_mca; 120269 __u8 mld2q_qrv: 3; 120270 __u8 mld2q_suppress: 1; 120271 __u8 mld2q_resv2: 4; 120272 __u8 mld2q_qqic; 120273 __be16 mld2q_nsrcs; 120274 struct in6_addr mld2q_srcs[0]; 120275 }; 120276 120277 struct igmp6_mc_iter_state { 120278 struct seq_net_private p; 120279 struct net_device *dev; 120280 struct inet6_dev *idev; 120281 }; 120282 120283 struct igmp6_mcf_iter_state { 120284 struct seq_net_private p; 120285 struct net_device *dev; 120286 struct inet6_dev *idev; 120287 struct ifmcaddr6 *im; 120288 }; 120289 120290 enum ip6_defrag_users { 120291 IP6_DEFRAG_LOCAL_DELIVER = 0, 120292 IP6_DEFRAG_CONNTRACK_IN = 1, 120293 __IP6_DEFRAG_CONNTRACK_IN = 65536, 120294 IP6_DEFRAG_CONNTRACK_OUT = 65537, 120295 __IP6_DEFRAG_CONNTRACK_OUT = 131072, 120296 IP6_DEFRAG_CONNTRACK_BRIDGE_IN = 131073, 120297 __IP6_DEFRAG_CONNTRACK_BRIDGE_IN = 196608, 120298 }; 120299 120300 struct frag_queue { 120301 struct inet_frag_queue q; 120302 int iif; 120303 __u16 nhoffset; 120304 u8 ecn; 120305 }; 120306 120307 struct tcp6_pseudohdr { 120308 struct in6_addr saddr; 120309 struct in6_addr daddr; 120310 __be32 len; 120311 __be32 protocol; 120312 }; 120313 120314 struct rt0_hdr { 120315 struct ipv6_rt_hdr rt_hdr; 120316 __u32 reserved; 120317 struct in6_addr addr[0]; 120318 }; 120319 120320 struct ipv6_rpl_sr_hdr { 120321 __u8 nexthdr; 120322 __u8 hdrlen; 120323 __u8 type; 120324 __u8 segments_left; 120325 __u32 cmpre: 4; 120326 __u32 cmpri: 4; 120327 __u32 reserved: 4; 120328 __u32 pad: 4; 120329 __u32 reserved1: 16; 120330 union { 120331 struct in6_addr addr[0]; 120332 __u8 data[0]; 120333 } segments; 120334 }; 120335 120336 struct tlvtype_proc { 120337 int type; 120338 bool (*func)(struct sk_buff *, int); 120339 }; 120340 120341 struct ip6fl_iter_state { 120342 struct seq_net_private p; 120343 struct pid_namespace *pid_ns; 120344 int bucket; 120345 }; 120346 120347 struct sr6_tlv { 120348 __u8 type; 120349 __u8 len; 120350 __u8 data[0]; 120351 }; 120352 120353 enum { 120354 SEG6_ATTR_UNSPEC = 0, 120355 SEG6_ATTR_DST = 1, 120356 SEG6_ATTR_DSTLEN = 2, 120357 SEG6_ATTR_HMACKEYID = 3, 120358 SEG6_ATTR_SECRET = 4, 120359 SEG6_ATTR_SECRETLEN = 5, 120360 SEG6_ATTR_ALGID = 6, 120361 SEG6_ATTR_HMACINFO = 7, 120362 __SEG6_ATTR_MAX = 8, 120363 }; 120364 120365 enum { 120366 SEG6_CMD_UNSPEC = 0, 120367 SEG6_CMD_SETHMAC = 1, 120368 SEG6_CMD_DUMPHMAC = 2, 120369 SEG6_CMD_SET_TUNSRC = 3, 120370 SEG6_CMD_GET_TUNSRC = 4, 120371 __SEG6_CMD_MAX = 5, 120372 }; 120373 120374 struct seg6_hmac_info { 120375 struct rhash_head node; 120376 struct callback_head rcu; 120377 u32 hmackeyid; 120378 char secret[64]; 120379 u8 slen; 120380 u8 alg_id; 120381 }; 120382 120383 typedef short unsigned int mifi_t; 120384 120385 typedef __u32 if_mask; 120386 120387 struct if_set { 120388 if_mask ifs_bits[8]; 120389 }; 120390 120391 struct mif6ctl { 120392 mifi_t mif6c_mifi; 120393 unsigned char mif6c_flags; 120394 unsigned char vifc_threshold; 120395 __u16 mif6c_pifi; 120396 unsigned int vifc_rate_limit; 120397 }; 120398 120399 struct mf6cctl { 120400 struct sockaddr_in6 mf6cc_origin; 120401 struct sockaddr_in6 mf6cc_mcastgrp; 120402 mifi_t mf6cc_parent; 120403 struct if_set mf6cc_ifset; 120404 }; 120405 120406 struct sioc_sg_req6 { 120407 struct sockaddr_in6 src; 120408 struct sockaddr_in6 grp; 120409 long unsigned int pktcnt; 120410 long unsigned int bytecnt; 120411 long unsigned int wrong_if; 120412 }; 120413 120414 struct sioc_mif_req6 { 120415 mifi_t mifi; 120416 long unsigned int icount; 120417 long unsigned int ocount; 120418 long unsigned int ibytes; 120419 long unsigned int obytes; 120420 }; 120421 120422 struct mrt6msg { 120423 __u8 im6_mbz; 120424 __u8 im6_msgtype; 120425 __u16 im6_mif; 120426 __u32 im6_pad; 120427 struct in6_addr im6_src; 120428 struct in6_addr im6_dst; 120429 }; 120430 120431 enum { 120432 IP6MRA_CREPORT_UNSPEC = 0, 120433 IP6MRA_CREPORT_MSGTYPE = 1, 120434 IP6MRA_CREPORT_MIF_ID = 2, 120435 IP6MRA_CREPORT_SRC_ADDR = 3, 120436 IP6MRA_CREPORT_DST_ADDR = 4, 120437 IP6MRA_CREPORT_PKT = 5, 120438 __IP6MRA_CREPORT_MAX = 6, 120439 }; 120440 120441 struct mfc6_cache_cmp_arg { 120442 struct in6_addr mf6c_mcastgrp; 120443 struct in6_addr mf6c_origin; 120444 }; 120445 120446 struct mfc6_cache { 120447 struct mr_mfc _c; 120448 union { 120449 struct { 120450 struct in6_addr mf6c_mcastgrp; 120451 struct in6_addr mf6c_origin; 120452 }; 120453 struct mfc6_cache_cmp_arg cmparg; 120454 }; 120455 }; 120456 120457 struct ip6mr_result { 120458 struct mr_table *mrt; 120459 }; 120460 120461 struct compat_sioc_sg_req6 { 120462 struct sockaddr_in6 src; 120463 struct sockaddr_in6 grp; 120464 compat_ulong_t pktcnt; 120465 compat_ulong_t bytecnt; 120466 compat_ulong_t wrong_if; 120467 }; 120468 120469 struct compat_sioc_mif_req6 { 120470 mifi_t mifi; 120471 compat_ulong_t icount; 120472 compat_ulong_t ocount; 120473 compat_ulong_t ibytes; 120474 compat_ulong_t obytes; 120475 }; 120476 120477 struct xfrm6_protocol { 120478 int (*handler)(struct sk_buff *); 120479 int (*input_handler)(struct sk_buff *, int, __be32, int); 120480 int (*cb_handler)(struct sk_buff *, int); 120481 int (*err_handler)(struct sk_buff *, struct inet6_skb_parm *, u8, u8, int, __be32); 120482 struct xfrm6_protocol *next; 120483 int priority; 120484 }; 120485 120486 struct br_input_skb_cb { 120487 struct net_device *brdev; 120488 u16 frag_max_size; 120489 u8 igmp; 120490 u8 mrouters_only: 1; 120491 u8 proxyarp_replied: 1; 120492 u8 src_port_isolated: 1; 120493 u8 vlan_filtered: 1; 120494 u8 br_netfilter_broute: 1; 120495 int offload_fwd_mark; 120496 }; 120497 120498 struct nf_bridge_frag_data; 120499 120500 struct fib6_rule { 120501 struct fib_rule common; 120502 struct rt6key src; 120503 struct rt6key dst; 120504 u8 tclass; 120505 }; 120506 120507 struct calipso_doi; 120508 120509 struct netlbl_calipso_ops { 120510 int (*doi_add)(struct calipso_doi *, struct netlbl_audit *); 120511 void (*doi_free)(struct calipso_doi *); 120512 int (*doi_remove)(u32, struct netlbl_audit *); 120513 struct calipso_doi * (*doi_getdef)(u32); 120514 void (*doi_putdef)(struct calipso_doi *); 120515 int (*doi_walk)(u32 *, int (*)(struct calipso_doi *, void *), void *); 120516 int (*sock_getattr)(struct sock *, struct netlbl_lsm_secattr *); 120517 int (*sock_setattr)(struct sock *, const struct calipso_doi *, const struct netlbl_lsm_secattr *); 120518 void (*sock_delattr)(struct sock *); 120519 int (*req_setattr)(struct request_sock *, const struct calipso_doi *, const struct netlbl_lsm_secattr *); 120520 void (*req_delattr)(struct request_sock *); 120521 int (*opt_getattr)(const unsigned char *, struct netlbl_lsm_secattr *); 120522 unsigned char * (*skbuff_optptr)(const struct sk_buff *); 120523 int (*skbuff_setattr)(struct sk_buff *, const struct calipso_doi *, const struct netlbl_lsm_secattr *); 120524 int (*skbuff_delattr)(struct sk_buff *); 120525 void (*cache_invalidate)(); 120526 int (*cache_add)(const unsigned char *, const struct netlbl_lsm_secattr *); 120527 }; 120528 120529 struct calipso_doi { 120530 u32 doi; 120531 u32 type; 120532 refcount_t refcount; 120533 struct list_head list; 120534 struct callback_head rcu; 120535 }; 120536 120537 struct calipso_map_cache_bkt { 120538 spinlock_t lock; 120539 u32 size; 120540 struct list_head list; 120541 }; 120542 120543 struct calipso_map_cache_entry { 120544 u32 hash; 120545 unsigned char *key; 120546 size_t key_len; 120547 struct netlbl_lsm_cache *lsm_data; 120548 u32 activity; 120549 struct list_head list; 120550 }; 120551 120552 enum { 120553 SEG6_IPTUNNEL_UNSPEC = 0, 120554 SEG6_IPTUNNEL_SRH = 1, 120555 __SEG6_IPTUNNEL_MAX = 2, 120556 }; 120557 120558 struct seg6_iptunnel_encap { 120559 int mode; 120560 struct ipv6_sr_hdr srh[0]; 120561 }; 120562 120563 enum { 120564 SEG6_IPTUN_MODE_INLINE = 0, 120565 SEG6_IPTUN_MODE_ENCAP = 1, 120566 SEG6_IPTUN_MODE_L2ENCAP = 2, 120567 }; 120568 120569 struct seg6_lwt { 120570 struct dst_cache cache; 120571 struct seg6_iptunnel_encap tuninfo[0]; 120572 }; 120573 120574 enum l3mdev_type { 120575 L3MDEV_TYPE_UNSPEC = 0, 120576 L3MDEV_TYPE_VRF = 1, 120577 __L3MDEV_TYPE_MAX = 2, 120578 }; 120579 120580 enum { 120581 SEG6_LOCAL_UNSPEC = 0, 120582 SEG6_LOCAL_ACTION = 1, 120583 SEG6_LOCAL_SRH = 2, 120584 SEG6_LOCAL_TABLE = 3, 120585 SEG6_LOCAL_NH4 = 4, 120586 SEG6_LOCAL_NH6 = 5, 120587 SEG6_LOCAL_IIF = 6, 120588 SEG6_LOCAL_OIF = 7, 120589 SEG6_LOCAL_BPF = 8, 120590 SEG6_LOCAL_VRFTABLE = 9, 120591 __SEG6_LOCAL_MAX = 10, 120592 }; 120593 120594 enum { 120595 SEG6_LOCAL_BPF_PROG_UNSPEC = 0, 120596 SEG6_LOCAL_BPF_PROG = 1, 120597 SEG6_LOCAL_BPF_PROG_NAME = 2, 120598 __SEG6_LOCAL_BPF_PROG_MAX = 3, 120599 }; 120600 120601 struct seg6_local_lwt; 120602 120603 struct seg6_local_lwtunnel_ops { 120604 int (*build_state)(struct seg6_local_lwt *, const void *, struct netlink_ext_ack *); 120605 void (*destroy_state)(struct seg6_local_lwt *); 120606 }; 120607 120608 enum seg6_end_dt_mode { 120609 DT_INVALID_MODE = 4294967274, 120610 DT_LEGACY_MODE = 0, 120611 DT_VRF_MODE = 1, 120612 }; 120613 120614 struct seg6_end_dt_info { 120615 enum seg6_end_dt_mode mode; 120616 struct net *net; 120617 int vrf_ifindex; 120618 int vrf_table; 120619 __be16 proto; 120620 u16 family; 120621 int hdrlen; 120622 }; 120623 120624 struct seg6_action_desc; 120625 120626 struct seg6_local_lwt { 120627 int action; 120628 struct ipv6_sr_hdr *srh; 120629 int table; 120630 struct in_addr nh4; 120631 struct in6_addr nh6; 120632 int iif; 120633 int oif; 120634 struct bpf_lwt_prog bpf; 120635 struct seg6_end_dt_info dt_info; 120636 int headroom; 120637 struct seg6_action_desc *desc; 120638 long unsigned int parsed_optattrs; 120639 }; 120640 120641 struct seg6_action_desc { 120642 int action; 120643 long unsigned int attrs; 120644 long unsigned int optattrs; 120645 int (*input)(struct sk_buff *, struct seg6_local_lwt *); 120646 int static_headroom; 120647 struct seg6_local_lwtunnel_ops slwt_ops; 120648 }; 120649 120650 struct seg6_action_param { 120651 int (*parse)(struct nlattr **, struct seg6_local_lwt *); 120652 int (*put)(struct sk_buff *, struct seg6_local_lwt *); 120653 int (*cmp)(struct seg6_local_lwt *, struct seg6_local_lwt *); 120654 void (*destroy)(struct seg6_local_lwt *); 120655 }; 120656 120657 struct sr6_tlv_hmac { 120658 struct sr6_tlv tlvhdr; 120659 __u16 reserved; 120660 __be32 hmackeyid; 120661 __u8 hmac[32]; 120662 }; 120663 120664 enum { 120665 SEG6_HMAC_ALGO_SHA1 = 1, 120666 SEG6_HMAC_ALGO_SHA256 = 2, 120667 }; 120668 120669 struct seg6_hmac_algo { 120670 u8 alg_id; 120671 char name[64]; 120672 struct crypto_shash **tfms; 120673 struct shash_desc **shashs; 120674 }; 120675 120676 enum { 120677 RPL_IPTUNNEL_UNSPEC = 0, 120678 RPL_IPTUNNEL_SRH = 1, 120679 __RPL_IPTUNNEL_MAX = 2, 120680 }; 120681 120682 struct rpl_iptunnel_encap { 120683 struct ipv6_rpl_sr_hdr srh[0]; 120684 }; 120685 120686 struct rpl_lwt { 120687 struct dst_cache cache; 120688 struct rpl_iptunnel_encap tuninfo; 120689 }; 120690 120691 struct rt2_hdr { 120692 struct ipv6_rt_hdr rt_hdr; 120693 __u32 reserved; 120694 struct in6_addr addr; 120695 }; 120696 120697 struct mip6_report_rate_limiter { 120698 spinlock_t lock; 120699 ktime_t stamp; 120700 int iif; 120701 struct in6_addr src; 120702 struct in6_addr dst; 120703 }; 120704 120705 enum { 120706 IP6_FH_F_FRAG = 1, 120707 IP6_FH_F_AUTH = 2, 120708 IP6_FH_F_SKIP_RH = 4, 120709 }; 120710 120711 struct sockaddr_pkt { 120712 short unsigned int spkt_family; 120713 unsigned char spkt_device[14]; 120714 __be16 spkt_protocol; 120715 }; 120716 120717 struct sockaddr_ll { 120718 short unsigned int sll_family; 120719 __be16 sll_protocol; 120720 int sll_ifindex; 120721 short unsigned int sll_hatype; 120722 unsigned char sll_pkttype; 120723 unsigned char sll_halen; 120724 unsigned char sll_addr[8]; 120725 }; 120726 120727 struct tpacket_stats { 120728 unsigned int tp_packets; 120729 unsigned int tp_drops; 120730 }; 120731 120732 struct tpacket_stats_v3 { 120733 unsigned int tp_packets; 120734 unsigned int tp_drops; 120735 unsigned int tp_freeze_q_cnt; 120736 }; 120737 120738 struct tpacket_rollover_stats { 120739 __u64 tp_all; 120740 __u64 tp_huge; 120741 __u64 tp_failed; 120742 }; 120743 120744 union tpacket_stats_u { 120745 struct tpacket_stats stats1; 120746 struct tpacket_stats_v3 stats3; 120747 }; 120748 120749 struct tpacket_auxdata { 120750 __u32 tp_status; 120751 __u32 tp_len; 120752 __u32 tp_snaplen; 120753 __u16 tp_mac; 120754 __u16 tp_net; 120755 __u16 tp_vlan_tci; 120756 __u16 tp_vlan_tpid; 120757 }; 120758 120759 struct tpacket_hdr { 120760 long unsigned int tp_status; 120761 unsigned int tp_len; 120762 unsigned int tp_snaplen; 120763 short unsigned int tp_mac; 120764 short unsigned int tp_net; 120765 unsigned int tp_sec; 120766 unsigned int tp_usec; 120767 }; 120768 120769 struct tpacket2_hdr { 120770 __u32 tp_status; 120771 __u32 tp_len; 120772 __u32 tp_snaplen; 120773 __u16 tp_mac; 120774 __u16 tp_net; 120775 __u32 tp_sec; 120776 __u32 tp_nsec; 120777 __u16 tp_vlan_tci; 120778 __u16 tp_vlan_tpid; 120779 __u8 tp_padding[4]; 120780 }; 120781 120782 struct tpacket_hdr_variant1 { 120783 __u32 tp_rxhash; 120784 __u32 tp_vlan_tci; 120785 __u16 tp_vlan_tpid; 120786 __u16 tp_padding; 120787 }; 120788 120789 struct tpacket3_hdr { 120790 __u32 tp_next_offset; 120791 __u32 tp_sec; 120792 __u32 tp_nsec; 120793 __u32 tp_snaplen; 120794 __u32 tp_len; 120795 __u32 tp_status; 120796 __u16 tp_mac; 120797 __u16 tp_net; 120798 union { 120799 struct tpacket_hdr_variant1 hv1; 120800 }; 120801 __u8 tp_padding[8]; 120802 }; 120803 120804 struct tpacket_bd_ts { 120805 unsigned int ts_sec; 120806 union { 120807 unsigned int ts_usec; 120808 unsigned int ts_nsec; 120809 }; 120810 }; 120811 120812 struct tpacket_hdr_v1 { 120813 __u32 block_status; 120814 __u32 num_pkts; 120815 __u32 offset_to_first_pkt; 120816 __u32 blk_len; 120817 __u64 seq_num; 120818 struct tpacket_bd_ts ts_first_pkt; 120819 struct tpacket_bd_ts ts_last_pkt; 120820 }; 120821 120822 union tpacket_bd_header_u { 120823 struct tpacket_hdr_v1 bh1; 120824 }; 120825 120826 struct tpacket_block_desc { 120827 __u32 version; 120828 __u32 offset_to_priv; 120829 union tpacket_bd_header_u hdr; 120830 }; 120831 120832 enum tpacket_versions { 120833 TPACKET_V1 = 0, 120834 TPACKET_V2 = 1, 120835 TPACKET_V3 = 2, 120836 }; 120837 120838 struct tpacket_req { 120839 unsigned int tp_block_size; 120840 unsigned int tp_block_nr; 120841 unsigned int tp_frame_size; 120842 unsigned int tp_frame_nr; 120843 }; 120844 120845 struct tpacket_req3 { 120846 unsigned int tp_block_size; 120847 unsigned int tp_block_nr; 120848 unsigned int tp_frame_size; 120849 unsigned int tp_frame_nr; 120850 unsigned int tp_retire_blk_tov; 120851 unsigned int tp_sizeof_priv; 120852 unsigned int tp_feature_req_word; 120853 }; 120854 120855 union tpacket_req_u { 120856 struct tpacket_req req; 120857 struct tpacket_req3 req3; 120858 }; 120859 120860 struct fanout_args { 120861 __u16 id; 120862 __u16 type_flags; 120863 __u32 max_num_members; 120864 }; 120865 120866 struct virtio_net_hdr { 120867 __u8 flags; 120868 __u8 gso_type; 120869 __virtio16 hdr_len; 120870 __virtio16 gso_size; 120871 __virtio16 csum_start; 120872 __virtio16 csum_offset; 120873 }; 120874 120875 struct packet_mclist { 120876 struct packet_mclist *next; 120877 int ifindex; 120878 int count; 120879 short unsigned int type; 120880 short unsigned int alen; 120881 unsigned char addr[32]; 120882 }; 120883 120884 struct pgv; 120885 120886 struct tpacket_kbdq_core { 120887 struct pgv *pkbdq; 120888 unsigned int feature_req_word; 120889 unsigned int hdrlen; 120890 unsigned char reset_pending_on_curr_blk; 120891 unsigned char delete_blk_timer; 120892 short unsigned int kactive_blk_num; 120893 short unsigned int blk_sizeof_priv; 120894 short unsigned int last_kactive_blk_num; 120895 char *pkblk_start; 120896 char *pkblk_end; 120897 int kblk_size; 120898 unsigned int max_frame_len; 120899 unsigned int knum_blocks; 120900 uint64_t knxt_seq_num; 120901 char *prev; 120902 char *nxt_offset; 120903 struct sk_buff *skb; 120904 rwlock_t blk_fill_in_prog_lock; 120905 short unsigned int retire_blk_tov; 120906 short unsigned int version; 120907 long unsigned int tov_in_jiffies; 120908 struct timer_list retire_blk_timer; 120909 }; 120910 120911 struct pgv { 120912 char *buffer; 120913 }; 120914 120915 struct packet_ring_buffer { 120916 struct pgv *pg_vec; 120917 unsigned int head; 120918 unsigned int frames_per_block; 120919 unsigned int frame_size; 120920 unsigned int frame_max; 120921 unsigned int pg_vec_order; 120922 unsigned int pg_vec_pages; 120923 unsigned int pg_vec_len; 120924 unsigned int *pending_refcnt; 120925 union { 120926 long unsigned int *rx_owner_map; 120927 struct tpacket_kbdq_core prb_bdqc; 120928 }; 120929 }; 120930 120931 struct packet_fanout { 120932 possible_net_t net; 120933 unsigned int num_members; 120934 u32 max_num_members; 120935 u16 id; 120936 u8 type; 120937 u8 flags; 120938 union { 120939 atomic_t rr_cur; 120940 struct bpf_prog *bpf_prog; 120941 }; 120942 struct list_head list; 120943 spinlock_t lock; 120944 refcount_t sk_ref; 120945 long: 64; 120946 struct packet_type prot_hook; 120947 struct sock *arr[0]; 120948 }; 120949 120950 struct packet_rollover { 120951 int sock; 120952 atomic_long_t num; 120953 atomic_long_t num_huge; 120954 atomic_long_t num_failed; 120955 long: 64; 120956 long: 64; 120957 long: 64; 120958 long: 64; 120959 u32 history[16]; 120960 }; 120961 120962 struct packet_sock { 120963 struct sock sk; 120964 struct packet_fanout *fanout; 120965 union tpacket_stats_u stats; 120966 struct packet_ring_buffer rx_ring; 120967 struct packet_ring_buffer tx_ring; 120968 int copy_thresh; 120969 spinlock_t bind_lock; 120970 struct mutex pg_vec_lock; 120971 unsigned int running; 120972 unsigned int auxdata: 1; 120973 unsigned int origdev: 1; 120974 unsigned int has_vnet_hdr: 1; 120975 unsigned int tp_loss: 1; 120976 unsigned int tp_tx_has_off: 1; 120977 int pressure; 120978 int ifindex; 120979 __be16 num; 120980 struct packet_rollover *rollover; 120981 struct packet_mclist *mclist; 120982 atomic_t mapped; 120983 enum tpacket_versions tp_version; 120984 unsigned int tp_hdrlen; 120985 unsigned int tp_reserve; 120986 unsigned int tp_tstamp; 120987 struct completion skb_completion; 120988 struct net_device *cached_dev; 120989 int (*xmit)(struct sk_buff *); 120990 long: 64; 120991 struct packet_type prot_hook; 120992 atomic_t tp_drops; 120993 long: 32; 120994 long: 64; 120995 long: 64; 120996 long: 64; 120997 long: 64; 120998 long: 64; 120999 long: 64; 121000 long: 64; 121001 }; 121002 121003 struct packet_mreq_max { 121004 int mr_ifindex; 121005 short unsigned int mr_type; 121006 short unsigned int mr_alen; 121007 unsigned char mr_address[32]; 121008 }; 121009 121010 union tpacket_uhdr { 121011 struct tpacket_hdr *h1; 121012 struct tpacket2_hdr *h2; 121013 struct tpacket3_hdr *h3; 121014 void *raw; 121015 }; 121016 121017 struct packet_skb_cb { 121018 union { 121019 struct sockaddr_pkt pkt; 121020 union { 121021 unsigned int origlen; 121022 struct sockaddr_ll ll; 121023 }; 121024 } sa; 121025 }; 121026 121027 struct _strp_msg { 121028 struct strp_msg strp; 121029 int accum_len; 121030 }; 121031 121032 struct vlan_group { 121033 unsigned int nr_vlan_devs; 121034 struct hlist_node hlist; 121035 struct net_device **vlan_devices_arrays[16]; 121036 }; 121037 121038 struct vlan_info { 121039 struct net_device *real_dev; 121040 struct vlan_group grp; 121041 struct list_head vid_list; 121042 unsigned int nr_vids; 121043 struct callback_head rcu; 121044 }; 121045 121046 enum vlan_flags { 121047 VLAN_FLAG_REORDER_HDR = 1, 121048 VLAN_FLAG_GVRP = 2, 121049 VLAN_FLAG_LOOSE_BINDING = 4, 121050 VLAN_FLAG_MVRP = 8, 121051 VLAN_FLAG_BRIDGE_BINDING = 16, 121052 }; 121053 121054 struct vlan_priority_tci_mapping { 121055 u32 priority; 121056 u16 vlan_qos; 121057 struct vlan_priority_tci_mapping *next; 121058 }; 121059 121060 struct vlan_dev_priv { 121061 unsigned int nr_ingress_mappings; 121062 u32 ingress_priority_map[8]; 121063 unsigned int nr_egress_mappings; 121064 struct vlan_priority_tci_mapping *egress_priority_map[16]; 121065 __be16 vlan_proto; 121066 u16 vlan_id; 121067 u16 flags; 121068 struct net_device *real_dev; 121069 unsigned char real_dev_addr[6]; 121070 struct proc_dir_entry *dent; 121071 struct vlan_pcpu_stats *vlan_pcpu_stats; 121072 struct netpoll *netpoll; 121073 }; 121074 121075 enum vlan_protos { 121076 VLAN_PROTO_8021Q = 0, 121077 VLAN_PROTO_8021AD = 1, 121078 VLAN_PROTO_NUM = 2, 121079 }; 121080 121081 struct vlan_vid_info { 121082 struct list_head list; 121083 __be16 proto; 121084 u16 vid; 121085 int refcount; 121086 }; 121087 121088 enum nl80211_iftype { 121089 NL80211_IFTYPE_UNSPECIFIED = 0, 121090 NL80211_IFTYPE_ADHOC = 1, 121091 NL80211_IFTYPE_STATION = 2, 121092 NL80211_IFTYPE_AP = 3, 121093 NL80211_IFTYPE_AP_VLAN = 4, 121094 NL80211_IFTYPE_WDS = 5, 121095 NL80211_IFTYPE_MONITOR = 6, 121096 NL80211_IFTYPE_MESH_POINT = 7, 121097 NL80211_IFTYPE_P2P_CLIENT = 8, 121098 NL80211_IFTYPE_P2P_GO = 9, 121099 NL80211_IFTYPE_P2P_DEVICE = 10, 121100 NL80211_IFTYPE_OCB = 11, 121101 NL80211_IFTYPE_NAN = 12, 121102 NUM_NL80211_IFTYPES = 13, 121103 NL80211_IFTYPE_MAX = 12, 121104 }; 121105 121106 struct cfg80211_conn; 121107 121108 struct cfg80211_cached_keys; 121109 121110 enum ieee80211_bss_type { 121111 IEEE80211_BSS_TYPE_ESS = 0, 121112 IEEE80211_BSS_TYPE_PBSS = 1, 121113 IEEE80211_BSS_TYPE_IBSS = 2, 121114 IEEE80211_BSS_TYPE_MBSS = 3, 121115 IEEE80211_BSS_TYPE_ANY = 4, 121116 }; 121117 121118 struct cfg80211_internal_bss; 121119 121120 enum nl80211_chan_width { 121121 NL80211_CHAN_WIDTH_20_NOHT = 0, 121122 NL80211_CHAN_WIDTH_20 = 1, 121123 NL80211_CHAN_WIDTH_40 = 2, 121124 NL80211_CHAN_WIDTH_80 = 3, 121125 NL80211_CHAN_WIDTH_80P80 = 4, 121126 NL80211_CHAN_WIDTH_160 = 5, 121127 NL80211_CHAN_WIDTH_5 = 6, 121128 NL80211_CHAN_WIDTH_10 = 7, 121129 NL80211_CHAN_WIDTH_1 = 8, 121130 NL80211_CHAN_WIDTH_2 = 9, 121131 NL80211_CHAN_WIDTH_4 = 10, 121132 NL80211_CHAN_WIDTH_8 = 11, 121133 NL80211_CHAN_WIDTH_16 = 12, 121134 }; 121135 121136 enum ieee80211_edmg_bw_config { 121137 IEEE80211_EDMG_BW_CONFIG_4 = 4, 121138 IEEE80211_EDMG_BW_CONFIG_5 = 5, 121139 IEEE80211_EDMG_BW_CONFIG_6 = 6, 121140 IEEE80211_EDMG_BW_CONFIG_7 = 7, 121141 IEEE80211_EDMG_BW_CONFIG_8 = 8, 121142 IEEE80211_EDMG_BW_CONFIG_9 = 9, 121143 IEEE80211_EDMG_BW_CONFIG_10 = 10, 121144 IEEE80211_EDMG_BW_CONFIG_11 = 11, 121145 IEEE80211_EDMG_BW_CONFIG_12 = 12, 121146 IEEE80211_EDMG_BW_CONFIG_13 = 13, 121147 IEEE80211_EDMG_BW_CONFIG_14 = 14, 121148 IEEE80211_EDMG_BW_CONFIG_15 = 15, 121149 }; 121150 121151 struct ieee80211_edmg { 121152 u8 channels; 121153 enum ieee80211_edmg_bw_config bw_config; 121154 }; 121155 121156 struct ieee80211_channel; 121157 121158 struct cfg80211_chan_def { 121159 struct ieee80211_channel *chan; 121160 enum nl80211_chan_width width; 121161 u32 center_freq1; 121162 u32 center_freq2; 121163 struct ieee80211_edmg edmg; 121164 u16 freq1_offset; 121165 }; 121166 121167 struct ieee80211_mcs_info { 121168 u8 rx_mask[10]; 121169 __le16 rx_highest; 121170 u8 tx_params; 121171 u8 reserved[3]; 121172 }; 121173 121174 struct ieee80211_ht_cap { 121175 __le16 cap_info; 121176 u8 ampdu_params_info; 121177 struct ieee80211_mcs_info mcs; 121178 __le16 extended_ht_cap_info; 121179 __le32 tx_BF_cap_info; 121180 u8 antenna_selection_info; 121181 } __attribute__((packed)); 121182 121183 struct key_params; 121184 121185 struct cfg80211_ibss_params { 121186 const u8 *ssid; 121187 const u8 *bssid; 121188 struct cfg80211_chan_def chandef; 121189 const u8 *ie; 121190 u8 ssid_len; 121191 u8 ie_len; 121192 u16 beacon_interval; 121193 u32 basic_rates; 121194 bool channel_fixed; 121195 bool privacy; 121196 bool control_port; 121197 bool control_port_over_nl80211; 121198 bool userspace_handles_dfs; 121199 int: 24; 121200 int mcast_rate[5]; 121201 struct ieee80211_ht_cap ht_capa; 121202 struct ieee80211_ht_cap ht_capa_mask; 121203 struct key_params *wep_keys; 121204 int wep_tx_key; 121205 int: 32; 121206 } __attribute__((packed)); 121207 121208 enum nl80211_auth_type { 121209 NL80211_AUTHTYPE_OPEN_SYSTEM = 0, 121210 NL80211_AUTHTYPE_SHARED_KEY = 1, 121211 NL80211_AUTHTYPE_FT = 2, 121212 NL80211_AUTHTYPE_NETWORK_EAP = 3, 121213 NL80211_AUTHTYPE_SAE = 4, 121214 NL80211_AUTHTYPE_FILS_SK = 5, 121215 NL80211_AUTHTYPE_FILS_SK_PFS = 6, 121216 NL80211_AUTHTYPE_FILS_PK = 7, 121217 __NL80211_AUTHTYPE_NUM = 8, 121218 NL80211_AUTHTYPE_MAX = 7, 121219 NL80211_AUTHTYPE_AUTOMATIC = 8, 121220 }; 121221 121222 enum nl80211_mfp { 121223 NL80211_MFP_NO = 0, 121224 NL80211_MFP_REQUIRED = 1, 121225 NL80211_MFP_OPTIONAL = 2, 121226 }; 121227 121228 enum nl80211_sae_pwe_mechanism { 121229 NL80211_SAE_PWE_UNSPECIFIED = 0, 121230 NL80211_SAE_PWE_HUNT_AND_PECK = 1, 121231 NL80211_SAE_PWE_HASH_TO_ELEMENT = 2, 121232 NL80211_SAE_PWE_BOTH = 3, 121233 }; 121234 121235 struct cfg80211_crypto_settings { 121236 u32 wpa_versions; 121237 u32 cipher_group; 121238 int n_ciphers_pairwise; 121239 u32 ciphers_pairwise[5]; 121240 int n_akm_suites; 121241 u32 akm_suites[2]; 121242 bool control_port; 121243 __be16 control_port_ethertype; 121244 bool control_port_no_encrypt; 121245 bool control_port_over_nl80211; 121246 bool control_port_no_preauth; 121247 struct key_params *wep_keys; 121248 int wep_tx_key; 121249 const u8 *psk; 121250 const u8 *sae_pwd; 121251 u8 sae_pwd_len; 121252 enum nl80211_sae_pwe_mechanism sae_pwe; 121253 }; 121254 121255 struct ieee80211_vht_mcs_info { 121256 __le16 rx_mcs_map; 121257 __le16 rx_highest; 121258 __le16 tx_mcs_map; 121259 __le16 tx_highest; 121260 }; 121261 121262 struct ieee80211_vht_cap { 121263 __le32 vht_cap_info; 121264 struct ieee80211_vht_mcs_info supp_mcs; 121265 }; 121266 121267 enum nl80211_bss_select_attr { 121268 __NL80211_BSS_SELECT_ATTR_INVALID = 0, 121269 NL80211_BSS_SELECT_ATTR_RSSI = 1, 121270 NL80211_BSS_SELECT_ATTR_BAND_PREF = 2, 121271 NL80211_BSS_SELECT_ATTR_RSSI_ADJUST = 3, 121272 __NL80211_BSS_SELECT_ATTR_AFTER_LAST = 4, 121273 NL80211_BSS_SELECT_ATTR_MAX = 3, 121274 }; 121275 121276 enum nl80211_band { 121277 NL80211_BAND_2GHZ = 0, 121278 NL80211_BAND_5GHZ = 1, 121279 NL80211_BAND_60GHZ = 2, 121280 NL80211_BAND_6GHZ = 3, 121281 NL80211_BAND_S1GHZ = 4, 121282 NUM_NL80211_BANDS = 5, 121283 }; 121284 121285 struct cfg80211_bss_select_adjust { 121286 enum nl80211_band band; 121287 s8 delta; 121288 }; 121289 121290 struct cfg80211_bss_selection { 121291 enum nl80211_bss_select_attr behaviour; 121292 union { 121293 enum nl80211_band band_pref; 121294 struct cfg80211_bss_select_adjust adjust; 121295 } param; 121296 }; 121297 121298 struct cfg80211_connect_params { 121299 struct ieee80211_channel *channel; 121300 struct ieee80211_channel *channel_hint; 121301 const u8 *bssid; 121302 const u8 *bssid_hint; 121303 const u8 *ssid; 121304 size_t ssid_len; 121305 enum nl80211_auth_type auth_type; 121306 int: 32; 121307 const u8 *ie; 121308 size_t ie_len; 121309 bool privacy; 121310 int: 24; 121311 enum nl80211_mfp mfp; 121312 struct cfg80211_crypto_settings crypto; 121313 const u8 *key; 121314 u8 key_len; 121315 u8 key_idx; 121316 short: 16; 121317 u32 flags; 121318 int bg_scan_period; 121319 struct ieee80211_ht_cap ht_capa; 121320 struct ieee80211_ht_cap ht_capa_mask; 121321 struct ieee80211_vht_cap vht_capa; 121322 struct ieee80211_vht_cap vht_capa_mask; 121323 bool pbss; 121324 int: 24; 121325 struct cfg80211_bss_selection bss_select; 121326 const u8 *prev_bssid; 121327 const u8 *fils_erp_username; 121328 size_t fils_erp_username_len; 121329 const u8 *fils_erp_realm; 121330 size_t fils_erp_realm_len; 121331 u16 fils_erp_next_seq_num; 121332 long: 48; 121333 const u8 *fils_erp_rrk; 121334 size_t fils_erp_rrk_len; 121335 bool want_1x; 121336 int: 24; 121337 struct ieee80211_edmg edmg; 121338 int: 32; 121339 } __attribute__((packed)); 121340 121341 struct cfg80211_cqm_config; 121342 121343 struct wiphy; 121344 121345 struct wireless_dev { 121346 struct wiphy *wiphy; 121347 enum nl80211_iftype iftype; 121348 struct list_head list; 121349 struct net_device *netdev; 121350 u32 identifier; 121351 struct list_head mgmt_registrations; 121352 spinlock_t mgmt_registrations_lock; 121353 u8 mgmt_registrations_need_update: 1; 121354 struct mutex mtx; 121355 bool use_4addr; 121356 bool is_running; 121357 u8 address[6]; 121358 u8 ssid[32]; 121359 u8 ssid_len; 121360 u8 mesh_id_len; 121361 u8 mesh_id_up_len; 121362 struct cfg80211_conn *conn; 121363 struct cfg80211_cached_keys *connect_keys; 121364 enum ieee80211_bss_type conn_bss_type; 121365 u32 conn_owner_nlportid; 121366 struct work_struct disconnect_wk; 121367 u8 disconnect_bssid[6]; 121368 struct list_head event_list; 121369 spinlock_t event_lock; 121370 struct cfg80211_internal_bss *current_bss; 121371 struct cfg80211_chan_def preset_chandef; 121372 struct cfg80211_chan_def chandef; 121373 bool ibss_fixed; 121374 bool ibss_dfs_possible; 121375 bool ps; 121376 int ps_timeout; 121377 int beacon_interval; 121378 u32 ap_unexpected_nlportid; 121379 u32 owner_nlportid; 121380 bool nl_owner_dead; 121381 bool cac_started; 121382 long unsigned int cac_start_time; 121383 unsigned int cac_time_ms; 121384 struct { 121385 struct cfg80211_ibss_params ibss; 121386 struct cfg80211_connect_params connect; 121387 struct cfg80211_cached_keys *keys; 121388 const u8 *ie; 121389 size_t ie_len; 121390 u8 bssid[6]; 121391 u8 prev_bssid[6]; 121392 u8 ssid[32]; 121393 s8 default_key; 121394 s8 default_mgmt_key; 121395 bool prev_bssid_valid; 121396 } wext; 121397 struct cfg80211_cqm_config *cqm_config; 121398 struct list_head pmsr_list; 121399 spinlock_t pmsr_lock; 121400 struct work_struct pmsr_free_wk; 121401 long unsigned int unprot_beacon_reported; 121402 }; 121403 121404 struct iw_encode_ext { 121405 __u32 ext_flags; 121406 __u8 tx_seq[8]; 121407 __u8 rx_seq[8]; 121408 struct sockaddr addr; 121409 __u16 alg; 121410 __u16 key_len; 121411 __u8 key[0]; 121412 }; 121413 121414 struct iwreq { 121415 union { 121416 char ifrn_name[16]; 121417 } ifr_ifrn; 121418 union iwreq_data u; 121419 }; 121420 121421 struct iw_event { 121422 __u16 len; 121423 __u16 cmd; 121424 union iwreq_data u; 121425 }; 121426 121427 struct compat_iw_point { 121428 compat_caddr_t pointer; 121429 __u16 length; 121430 __u16 flags; 121431 }; 121432 121433 struct __compat_iw_event { 121434 __u16 len; 121435 __u16 cmd; 121436 compat_caddr_t pointer; 121437 }; 121438 121439 enum nl80211_reg_initiator { 121440 NL80211_REGDOM_SET_BY_CORE = 0, 121441 NL80211_REGDOM_SET_BY_USER = 1, 121442 NL80211_REGDOM_SET_BY_DRIVER = 2, 121443 NL80211_REGDOM_SET_BY_COUNTRY_IE = 3, 121444 }; 121445 121446 enum nl80211_dfs_regions { 121447 NL80211_DFS_UNSET = 0, 121448 NL80211_DFS_FCC = 1, 121449 NL80211_DFS_ETSI = 2, 121450 NL80211_DFS_JP = 3, 121451 }; 121452 121453 enum nl80211_user_reg_hint_type { 121454 NL80211_USER_REG_HINT_USER = 0, 121455 NL80211_USER_REG_HINT_CELL_BASE = 1, 121456 NL80211_USER_REG_HINT_INDOOR = 2, 121457 }; 121458 121459 enum nl80211_mntr_flags { 121460 __NL80211_MNTR_FLAG_INVALID = 0, 121461 NL80211_MNTR_FLAG_FCSFAIL = 1, 121462 NL80211_MNTR_FLAG_PLCPFAIL = 2, 121463 NL80211_MNTR_FLAG_CONTROL = 3, 121464 NL80211_MNTR_FLAG_OTHER_BSS = 4, 121465 NL80211_MNTR_FLAG_COOK_FRAMES = 5, 121466 NL80211_MNTR_FLAG_ACTIVE = 6, 121467 __NL80211_MNTR_FLAG_AFTER_LAST = 7, 121468 NL80211_MNTR_FLAG_MAX = 6, 121469 }; 121470 121471 enum nl80211_key_mode { 121472 NL80211_KEY_RX_TX = 0, 121473 NL80211_KEY_NO_TX = 1, 121474 NL80211_KEY_SET_TX = 2, 121475 }; 121476 121477 enum nl80211_bss_scan_width { 121478 NL80211_BSS_CHAN_WIDTH_20 = 0, 121479 NL80211_BSS_CHAN_WIDTH_10 = 1, 121480 NL80211_BSS_CHAN_WIDTH_5 = 2, 121481 NL80211_BSS_CHAN_WIDTH_1 = 3, 121482 NL80211_BSS_CHAN_WIDTH_2 = 4, 121483 }; 121484 121485 struct nl80211_wowlan_tcp_data_seq { 121486 __u32 start; 121487 __u32 offset; 121488 __u32 len; 121489 }; 121490 121491 struct nl80211_wowlan_tcp_data_token { 121492 __u32 offset; 121493 __u32 len; 121494 __u8 token_stream[0]; 121495 }; 121496 121497 struct nl80211_wowlan_tcp_data_token_feature { 121498 __u32 min_len; 121499 __u32 max_len; 121500 __u32 bufsize; 121501 }; 121502 121503 enum nl80211_ext_feature_index { 121504 NL80211_EXT_FEATURE_VHT_IBSS = 0, 121505 NL80211_EXT_FEATURE_RRM = 1, 121506 NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER = 2, 121507 NL80211_EXT_FEATURE_SCAN_START_TIME = 3, 121508 NL80211_EXT_FEATURE_BSS_PARENT_TSF = 4, 121509 NL80211_EXT_FEATURE_SET_SCAN_DWELL = 5, 121510 NL80211_EXT_FEATURE_BEACON_RATE_LEGACY = 6, 121511 NL80211_EXT_FEATURE_BEACON_RATE_HT = 7, 121512 NL80211_EXT_FEATURE_BEACON_RATE_VHT = 8, 121513 NL80211_EXT_FEATURE_FILS_STA = 9, 121514 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA = 10, 121515 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED = 11, 121516 NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 12, 121517 NL80211_EXT_FEATURE_CQM_RSSI_LIST = 13, 121518 NL80211_EXT_FEATURE_FILS_SK_OFFLOAD = 14, 121519 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK = 15, 121520 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X = 16, 121521 NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME = 17, 121522 NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP = 18, 121523 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 19, 121524 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 20, 121525 NL80211_EXT_FEATURE_MFP_OPTIONAL = 21, 121526 NL80211_EXT_FEATURE_LOW_SPAN_SCAN = 22, 121527 NL80211_EXT_FEATURE_LOW_POWER_SCAN = 23, 121528 NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN = 24, 121529 NL80211_EXT_FEATURE_DFS_OFFLOAD = 25, 121530 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211 = 26, 121531 NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT = 27, 121532 NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 27, 121533 NL80211_EXT_FEATURE_TXQS = 28, 121534 NL80211_EXT_FEATURE_SCAN_RANDOM_SN = 29, 121535 NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT = 30, 121536 NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 = 31, 121537 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 32, 121538 NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 33, 121539 NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 34, 121540 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 35, 121541 NL80211_EXT_FEATURE_EXT_KEY_ID = 36, 121542 NL80211_EXT_FEATURE_STA_TX_PWR = 37, 121543 NL80211_EXT_FEATURE_SAE_OFFLOAD = 38, 121544 NL80211_EXT_FEATURE_VLAN_OFFLOAD = 39, 121545 NL80211_EXT_FEATURE_AQL = 40, 121546 NL80211_EXT_FEATURE_BEACON_PROTECTION = 41, 121547 NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH = 42, 121548 NL80211_EXT_FEATURE_PROTECTED_TWT = 43, 121549 NL80211_EXT_FEATURE_DEL_IBSS_STA = 44, 121550 NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS = 45, 121551 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 46, 121552 NL80211_EXT_FEATURE_SCAN_FREQ_KHZ = 47, 121553 NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS = 48, 121554 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 49, 121555 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK = 50, 121556 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 51, 121557 NL80211_EXT_FEATURE_FILS_DISCOVERY = 52, 121558 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 53, 121559 NL80211_EXT_FEATURE_BEACON_RATE_HE = 54, 121560 NUM_NL80211_EXT_FEATURES = 55, 121561 MAX_NL80211_EXT_FEATURES = 54, 121562 }; 121563 121564 enum nl80211_dfs_state { 121565 NL80211_DFS_USABLE = 0, 121566 NL80211_DFS_UNAVAILABLE = 1, 121567 NL80211_DFS_AVAILABLE = 2, 121568 }; 121569 121570 struct nl80211_vendor_cmd_info { 121571 __u32 vendor_id; 121572 __u32 subcmd; 121573 }; 121574 121575 enum nl80211_sar_type { 121576 NL80211_SAR_TYPE_POWER = 0, 121577 NUM_NL80211_SAR_TYPE = 1, 121578 }; 121579 121580 struct ieee80211_he_cap_elem { 121581 u8 mac_cap_info[6]; 121582 u8 phy_cap_info[11]; 121583 }; 121584 121585 struct ieee80211_he_mcs_nss_supp { 121586 __le16 rx_mcs_80; 121587 __le16 tx_mcs_80; 121588 __le16 rx_mcs_160; 121589 __le16 tx_mcs_160; 121590 __le16 rx_mcs_80p80; 121591 __le16 tx_mcs_80p80; 121592 }; 121593 121594 struct ieee80211_he_6ghz_capa { 121595 __le16 capa; 121596 }; 121597 121598 enum environment_cap { 121599 ENVIRON_ANY = 0, 121600 ENVIRON_INDOOR = 1, 121601 ENVIRON_OUTDOOR = 2, 121602 }; 121603 121604 struct regulatory_request { 121605 struct callback_head callback_head; 121606 int wiphy_idx; 121607 enum nl80211_reg_initiator initiator; 121608 enum nl80211_user_reg_hint_type user_reg_hint_type; 121609 char alpha2[3]; 121610 enum nl80211_dfs_regions dfs_region; 121611 bool intersect; 121612 bool processed; 121613 enum environment_cap country_ie_env; 121614 struct list_head list; 121615 }; 121616 121617 struct ieee80211_freq_range { 121618 u32 start_freq_khz; 121619 u32 end_freq_khz; 121620 u32 max_bandwidth_khz; 121621 }; 121622 121623 struct ieee80211_power_rule { 121624 u32 max_antenna_gain; 121625 u32 max_eirp; 121626 }; 121627 121628 struct ieee80211_wmm_ac { 121629 u16 cw_min; 121630 u16 cw_max; 121631 u16 cot; 121632 u8 aifsn; 121633 }; 121634 121635 struct ieee80211_wmm_rule { 121636 struct ieee80211_wmm_ac client[4]; 121637 struct ieee80211_wmm_ac ap[4]; 121638 }; 121639 121640 struct ieee80211_reg_rule { 121641 struct ieee80211_freq_range freq_range; 121642 struct ieee80211_power_rule power_rule; 121643 struct ieee80211_wmm_rule wmm_rule; 121644 u32 flags; 121645 u32 dfs_cac_ms; 121646 bool has_wmm; 121647 }; 121648 121649 struct ieee80211_regdomain { 121650 struct callback_head callback_head; 121651 u32 n_reg_rules; 121652 char alpha2[3]; 121653 enum nl80211_dfs_regions dfs_region; 121654 struct ieee80211_reg_rule reg_rules[0]; 121655 }; 121656 121657 struct ieee80211_channel { 121658 enum nl80211_band band; 121659 u32 center_freq; 121660 u16 freq_offset; 121661 u16 hw_value; 121662 u32 flags; 121663 int max_antenna_gain; 121664 int max_power; 121665 int max_reg_power; 121666 bool beacon_found; 121667 u32 orig_flags; 121668 int orig_mag; 121669 int orig_mpwr; 121670 enum nl80211_dfs_state dfs_state; 121671 long unsigned int dfs_state_entered; 121672 unsigned int dfs_cac_ms; 121673 }; 121674 121675 struct ieee80211_rate { 121676 u32 flags; 121677 u16 bitrate; 121678 u16 hw_value; 121679 u16 hw_value_short; 121680 }; 121681 121682 struct ieee80211_sta_ht_cap { 121683 u16 cap; 121684 bool ht_supported; 121685 u8 ampdu_factor; 121686 u8 ampdu_density; 121687 struct ieee80211_mcs_info mcs; 121688 char: 8; 121689 } __attribute__((packed)); 121690 121691 struct ieee80211_sta_vht_cap { 121692 bool vht_supported; 121693 u32 cap; 121694 struct ieee80211_vht_mcs_info vht_mcs; 121695 }; 121696 121697 struct ieee80211_sta_he_cap { 121698 bool has_he; 121699 struct ieee80211_he_cap_elem he_cap_elem; 121700 struct ieee80211_he_mcs_nss_supp he_mcs_nss_supp; 121701 u8 ppe_thres[25]; 121702 } __attribute__((packed)); 121703 121704 struct ieee80211_sband_iftype_data { 121705 u16 types_mask; 121706 struct ieee80211_sta_he_cap he_cap; 121707 struct ieee80211_he_6ghz_capa he_6ghz_capa; 121708 char: 8; 121709 } __attribute__((packed)); 121710 121711 struct ieee80211_sta_s1g_cap { 121712 bool s1g; 121713 u8 cap[10]; 121714 u8 nss_mcs[5]; 121715 }; 121716 121717 struct ieee80211_supported_band { 121718 struct ieee80211_channel *channels; 121719 struct ieee80211_rate *bitrates; 121720 enum nl80211_band band; 121721 int n_channels; 121722 int n_bitrates; 121723 struct ieee80211_sta_ht_cap ht_cap; 121724 struct ieee80211_sta_vht_cap vht_cap; 121725 struct ieee80211_sta_s1g_cap s1g_cap; 121726 struct ieee80211_edmg edmg_cap; 121727 u16 n_iftype_data; 121728 const struct ieee80211_sband_iftype_data *iftype_data; 121729 }; 121730 121731 struct key_params { 121732 const u8 *key; 121733 const u8 *seq; 121734 int key_len; 121735 int seq_len; 121736 u16 vlan_id; 121737 u32 cipher; 121738 enum nl80211_key_mode mode; 121739 }; 121740 121741 struct mac_address { 121742 u8 addr[6]; 121743 }; 121744 121745 struct cfg80211_sar_freq_ranges { 121746 u32 start_freq; 121747 u32 end_freq; 121748 }; 121749 121750 struct cfg80211_sar_capa { 121751 enum nl80211_sar_type type; 121752 u32 num_freq_ranges; 121753 const struct cfg80211_sar_freq_ranges *freq_ranges; 121754 }; 121755 121756 struct cfg80211_ssid { 121757 u8 ssid[32]; 121758 u8 ssid_len; 121759 }; 121760 121761 enum cfg80211_signal_type { 121762 CFG80211_SIGNAL_TYPE_NONE = 0, 121763 CFG80211_SIGNAL_TYPE_MBM = 1, 121764 CFG80211_SIGNAL_TYPE_UNSPEC = 2, 121765 }; 121766 121767 struct ieee80211_txrx_stypes; 121768 121769 struct ieee80211_iface_combination; 121770 121771 struct wiphy_iftype_akm_suites; 121772 121773 struct wiphy_wowlan_support; 121774 121775 struct cfg80211_wowlan; 121776 121777 struct wiphy_iftype_ext_capab; 121778 121779 struct wiphy_coalesce_support; 121780 121781 struct wiphy_vendor_command; 121782 121783 struct cfg80211_pmsr_capabilities; 121784 121785 struct wiphy { 121786 u8 perm_addr[6]; 121787 u8 addr_mask[6]; 121788 struct mac_address *addresses; 121789 const struct ieee80211_txrx_stypes *mgmt_stypes; 121790 const struct ieee80211_iface_combination *iface_combinations; 121791 int n_iface_combinations; 121792 u16 software_iftypes; 121793 u16 n_addresses; 121794 u16 interface_modes; 121795 u16 max_acl_mac_addrs; 121796 u32 flags; 121797 u32 regulatory_flags; 121798 u32 features; 121799 u8 ext_features[7]; 121800 u32 ap_sme_capa; 121801 enum cfg80211_signal_type signal_type; 121802 int bss_priv_size; 121803 u8 max_scan_ssids; 121804 u8 max_sched_scan_reqs; 121805 u8 max_sched_scan_ssids; 121806 u8 max_match_sets; 121807 u16 max_scan_ie_len; 121808 u16 max_sched_scan_ie_len; 121809 u32 max_sched_scan_plans; 121810 u32 max_sched_scan_plan_interval; 121811 u32 max_sched_scan_plan_iterations; 121812 int n_cipher_suites; 121813 const u32 *cipher_suites; 121814 int n_akm_suites; 121815 const u32 *akm_suites; 121816 const struct wiphy_iftype_akm_suites *iftype_akm_suites; 121817 unsigned int num_iftype_akm_suites; 121818 u8 retry_short; 121819 u8 retry_long; 121820 u32 frag_threshold; 121821 u32 rts_threshold; 121822 u8 coverage_class; 121823 char fw_version[32]; 121824 u32 hw_version; 121825 const struct wiphy_wowlan_support *wowlan; 121826 struct cfg80211_wowlan *wowlan_config; 121827 u16 max_remain_on_channel_duration; 121828 u8 max_num_pmkids; 121829 u32 available_antennas_tx; 121830 u32 available_antennas_rx; 121831 u32 probe_resp_offload; 121832 const u8 *extended_capabilities; 121833 const u8 *extended_capabilities_mask; 121834 u8 extended_capabilities_len; 121835 const struct wiphy_iftype_ext_capab *iftype_ext_capab; 121836 unsigned int num_iftype_ext_capab; 121837 const void *privid; 121838 struct ieee80211_supported_band *bands[5]; 121839 void (*reg_notifier)(struct wiphy *, struct regulatory_request *); 121840 const struct ieee80211_regdomain *regd; 121841 struct device dev; 121842 bool registered; 121843 struct dentry *debugfsdir; 121844 const struct ieee80211_ht_cap *ht_capa_mod_mask; 121845 const struct ieee80211_vht_cap *vht_capa_mod_mask; 121846 struct list_head wdev_list; 121847 possible_net_t _net; 121848 const struct iw_handler_def *wext; 121849 const struct wiphy_coalesce_support *coalesce; 121850 const struct wiphy_vendor_command *vendor_commands; 121851 const struct nl80211_vendor_cmd_info *vendor_events; 121852 int n_vendor_commands; 121853 int n_vendor_events; 121854 u16 max_ap_assoc_sta; 121855 u8 max_num_csa_counters; 121856 u32 bss_select_support; 121857 u8 nan_supported_bands; 121858 u32 txq_limit; 121859 u32 txq_memory_limit; 121860 u32 txq_quantum; 121861 long unsigned int tx_queue_len; 121862 u8 support_mbssid: 1; 121863 u8 support_only_he_mbssid: 1; 121864 const struct cfg80211_pmsr_capabilities *pmsr_capa; 121865 struct { 121866 u64 peer; 121867 u64 vif; 121868 u8 max_retry; 121869 } tid_config_support; 121870 u8 max_data_retry_count; 121871 const struct cfg80211_sar_capa *sar_capa; 121872 long: 64; 121873 long: 64; 121874 long: 64; 121875 char priv[0]; 121876 }; 121877 121878 struct cfg80211_match_set { 121879 struct cfg80211_ssid ssid; 121880 u8 bssid[6]; 121881 s32 rssi_thold; 121882 s32 per_band_rssi_thold[5]; 121883 }; 121884 121885 struct cfg80211_sched_scan_plan { 121886 u32 interval; 121887 u32 iterations; 121888 }; 121889 121890 struct cfg80211_sched_scan_request { 121891 u64 reqid; 121892 struct cfg80211_ssid *ssids; 121893 int n_ssids; 121894 u32 n_channels; 121895 enum nl80211_bss_scan_width scan_width; 121896 const u8 *ie; 121897 size_t ie_len; 121898 u32 flags; 121899 struct cfg80211_match_set *match_sets; 121900 int n_match_sets; 121901 s32 min_rssi_thold; 121902 u32 delay; 121903 struct cfg80211_sched_scan_plan *scan_plans; 121904 int n_scan_plans; 121905 u8 mac_addr[6]; 121906 u8 mac_addr_mask[6]; 121907 bool relative_rssi_set; 121908 s8 relative_rssi; 121909 struct cfg80211_bss_select_adjust rssi_adjust; 121910 struct wiphy *wiphy; 121911 struct net_device *dev; 121912 long unsigned int scan_start; 121913 bool report_results; 121914 struct callback_head callback_head; 121915 u32 owner_nlportid; 121916 bool nl_owner_dead; 121917 struct list_head list; 121918 struct ieee80211_channel *channels[0]; 121919 }; 121920 121921 struct cfg80211_pkt_pattern { 121922 const u8 *mask; 121923 const u8 *pattern; 121924 int pattern_len; 121925 int pkt_offset; 121926 }; 121927 121928 struct cfg80211_wowlan_tcp { 121929 struct socket *sock; 121930 __be32 src; 121931 __be32 dst; 121932 u16 src_port; 121933 u16 dst_port; 121934 u8 dst_mac[6]; 121935 int payload_len; 121936 const u8 *payload; 121937 struct nl80211_wowlan_tcp_data_seq payload_seq; 121938 u32 data_interval; 121939 u32 wake_len; 121940 const u8 *wake_data; 121941 const u8 *wake_mask; 121942 u32 tokens_size; 121943 struct nl80211_wowlan_tcp_data_token payload_tok; 121944 }; 121945 121946 struct cfg80211_wowlan { 121947 bool any; 121948 bool disconnect; 121949 bool magic_pkt; 121950 bool gtk_rekey_failure; 121951 bool eap_identity_req; 121952 bool four_way_handshake; 121953 bool rfkill_release; 121954 struct cfg80211_pkt_pattern *patterns; 121955 struct cfg80211_wowlan_tcp *tcp; 121956 int n_patterns; 121957 struct cfg80211_sched_scan_request *nd_config; 121958 }; 121959 121960 struct ieee80211_iface_limit { 121961 u16 max; 121962 u16 types; 121963 }; 121964 121965 struct ieee80211_iface_combination { 121966 const struct ieee80211_iface_limit *limits; 121967 u32 num_different_channels; 121968 u16 max_interfaces; 121969 u8 n_limits; 121970 bool beacon_int_infra_match; 121971 u8 radar_detect_widths; 121972 u8 radar_detect_regions; 121973 u32 beacon_int_min_gcd; 121974 }; 121975 121976 struct ieee80211_txrx_stypes { 121977 u16 tx; 121978 u16 rx; 121979 }; 121980 121981 struct wiphy_wowlan_tcp_support { 121982 const struct nl80211_wowlan_tcp_data_token_feature *tok; 121983 u32 data_payload_max; 121984 u32 data_interval_max; 121985 u32 wake_payload_max; 121986 bool seq; 121987 }; 121988 121989 struct wiphy_wowlan_support { 121990 u32 flags; 121991 int n_patterns; 121992 int pattern_max_len; 121993 int pattern_min_len; 121994 int max_pkt_offset; 121995 int max_nd_match_sets; 121996 const struct wiphy_wowlan_tcp_support *tcp; 121997 }; 121998 121999 struct wiphy_coalesce_support { 122000 int n_rules; 122001 int max_delay; 122002 int n_patterns; 122003 int pattern_max_len; 122004 int pattern_min_len; 122005 int max_pkt_offset; 122006 }; 122007 122008 struct wiphy_vendor_command { 122009 struct nl80211_vendor_cmd_info info; 122010 u32 flags; 122011 int (*doit)(struct wiphy *, struct wireless_dev *, const void *, int); 122012 int (*dumpit)(struct wiphy *, struct wireless_dev *, struct sk_buff *, const void *, int, long unsigned int *); 122013 const struct nla_policy *policy; 122014 unsigned int maxattr; 122015 }; 122016 122017 struct wiphy_iftype_ext_capab { 122018 enum nl80211_iftype iftype; 122019 const u8 *extended_capabilities; 122020 const u8 *extended_capabilities_mask; 122021 u8 extended_capabilities_len; 122022 }; 122023 122024 struct cfg80211_pmsr_capabilities { 122025 unsigned int max_peers; 122026 u8 report_ap_tsf: 1; 122027 u8 randomize_mac_addr: 1; 122028 struct { 122029 u32 preambles; 122030 u32 bandwidths; 122031 s8 max_bursts_exponent; 122032 u8 max_ftms_per_burst; 122033 u8 supported: 1; 122034 u8 asap: 1; 122035 u8 non_asap: 1; 122036 u8 request_lci: 1; 122037 u8 request_civicloc: 1; 122038 u8 trigger_based: 1; 122039 u8 non_trigger_based: 1; 122040 } ftm; 122041 }; 122042 122043 struct wiphy_iftype_akm_suites { 122044 u16 iftypes_mask; 122045 const u32 *akm_suites; 122046 int n_akm_suites; 122047 }; 122048 122049 struct iw_ioctl_description { 122050 __u8 header_type; 122051 __u8 token_type; 122052 __u16 token_size; 122053 __u16 min_tokens; 122054 __u16 max_tokens; 122055 __u32 flags; 122056 }; 122057 122058 typedef int (*wext_ioctl_func)(struct net_device *, struct iwreq *, unsigned int, struct iw_request_info *, iw_handler); 122059 122060 struct iw_thrspy { 122061 struct sockaddr addr; 122062 struct iw_quality qual; 122063 struct iw_quality low; 122064 struct iw_quality high; 122065 }; 122066 122067 struct netlbl_af4list { 122068 __be32 addr; 122069 __be32 mask; 122070 u32 valid; 122071 struct list_head list; 122072 }; 122073 122074 struct netlbl_af6list { 122075 struct in6_addr addr; 122076 struct in6_addr mask; 122077 u32 valid; 122078 struct list_head list; 122079 }; 122080 122081 struct netlbl_domaddr_map { 122082 struct list_head list4; 122083 struct list_head list6; 122084 }; 122085 122086 struct netlbl_dommap_def { 122087 u32 type; 122088 union { 122089 struct netlbl_domaddr_map *addrsel; 122090 struct cipso_v4_doi *cipso; 122091 struct calipso_doi *calipso; 122092 }; 122093 }; 122094 122095 struct netlbl_domaddr4_map { 122096 struct netlbl_dommap_def def; 122097 struct netlbl_af4list list; 122098 }; 122099 122100 struct netlbl_domaddr6_map { 122101 struct netlbl_dommap_def def; 122102 struct netlbl_af6list list; 122103 }; 122104 122105 struct netlbl_dom_map { 122106 char *domain; 122107 u16 family; 122108 struct netlbl_dommap_def def; 122109 u32 valid; 122110 struct list_head list; 122111 struct callback_head rcu; 122112 }; 122113 122114 struct netlbl_domhsh_tbl { 122115 struct list_head *tbl; 122116 u32 size; 122117 }; 122118 122119 enum { 122120 NLBL_MGMT_C_UNSPEC = 0, 122121 NLBL_MGMT_C_ADD = 1, 122122 NLBL_MGMT_C_REMOVE = 2, 122123 NLBL_MGMT_C_LISTALL = 3, 122124 NLBL_MGMT_C_ADDDEF = 4, 122125 NLBL_MGMT_C_REMOVEDEF = 5, 122126 NLBL_MGMT_C_LISTDEF = 6, 122127 NLBL_MGMT_C_PROTOCOLS = 7, 122128 NLBL_MGMT_C_VERSION = 8, 122129 __NLBL_MGMT_C_MAX = 9, 122130 }; 122131 122132 enum { 122133 NLBL_MGMT_A_UNSPEC = 0, 122134 NLBL_MGMT_A_DOMAIN = 1, 122135 NLBL_MGMT_A_PROTOCOL = 2, 122136 NLBL_MGMT_A_VERSION = 3, 122137 NLBL_MGMT_A_CV4DOI = 4, 122138 NLBL_MGMT_A_IPV6ADDR = 5, 122139 NLBL_MGMT_A_IPV6MASK = 6, 122140 NLBL_MGMT_A_IPV4ADDR = 7, 122141 NLBL_MGMT_A_IPV4MASK = 8, 122142 NLBL_MGMT_A_ADDRSELECTOR = 9, 122143 NLBL_MGMT_A_SELECTORLIST = 10, 122144 NLBL_MGMT_A_FAMILY = 11, 122145 NLBL_MGMT_A_CLPDOI = 12, 122146 __NLBL_MGMT_A_MAX = 13, 122147 }; 122148 122149 struct netlbl_domhsh_walk_arg { 122150 struct netlink_callback *nl_cb; 122151 struct sk_buff *skb; 122152 u32 seq; 122153 }; 122154 122155 enum { 122156 NLBL_UNLABEL_C_UNSPEC = 0, 122157 NLBL_UNLABEL_C_ACCEPT = 1, 122158 NLBL_UNLABEL_C_LIST = 2, 122159 NLBL_UNLABEL_C_STATICADD = 3, 122160 NLBL_UNLABEL_C_STATICREMOVE = 4, 122161 NLBL_UNLABEL_C_STATICLIST = 5, 122162 NLBL_UNLABEL_C_STATICADDDEF = 6, 122163 NLBL_UNLABEL_C_STATICREMOVEDEF = 7, 122164 NLBL_UNLABEL_C_STATICLISTDEF = 8, 122165 __NLBL_UNLABEL_C_MAX = 9, 122166 }; 122167 122168 enum { 122169 NLBL_UNLABEL_A_UNSPEC = 0, 122170 NLBL_UNLABEL_A_ACPTFLG = 1, 122171 NLBL_UNLABEL_A_IPV6ADDR = 2, 122172 NLBL_UNLABEL_A_IPV6MASK = 3, 122173 NLBL_UNLABEL_A_IPV4ADDR = 4, 122174 NLBL_UNLABEL_A_IPV4MASK = 5, 122175 NLBL_UNLABEL_A_IFACE = 6, 122176 NLBL_UNLABEL_A_SECCTX = 7, 122177 __NLBL_UNLABEL_A_MAX = 8, 122178 }; 122179 122180 struct netlbl_unlhsh_tbl { 122181 struct list_head *tbl; 122182 u32 size; 122183 }; 122184 122185 struct netlbl_unlhsh_addr4 { 122186 u32 secid; 122187 struct netlbl_af4list list; 122188 struct callback_head rcu; 122189 }; 122190 122191 struct netlbl_unlhsh_addr6 { 122192 u32 secid; 122193 struct netlbl_af6list list; 122194 struct callback_head rcu; 122195 }; 122196 122197 struct netlbl_unlhsh_iface { 122198 int ifindex; 122199 struct list_head addr4_list; 122200 struct list_head addr6_list; 122201 u32 valid; 122202 struct list_head list; 122203 struct callback_head rcu; 122204 }; 122205 122206 struct netlbl_unlhsh_walk_arg { 122207 struct netlink_callback *nl_cb; 122208 struct sk_buff *skb; 122209 u32 seq; 122210 }; 122211 122212 enum { 122213 NLBL_CIPSOV4_C_UNSPEC = 0, 122214 NLBL_CIPSOV4_C_ADD = 1, 122215 NLBL_CIPSOV4_C_REMOVE = 2, 122216 NLBL_CIPSOV4_C_LIST = 3, 122217 NLBL_CIPSOV4_C_LISTALL = 4, 122218 __NLBL_CIPSOV4_C_MAX = 5, 122219 }; 122220 122221 enum { 122222 NLBL_CIPSOV4_A_UNSPEC = 0, 122223 NLBL_CIPSOV4_A_DOI = 1, 122224 NLBL_CIPSOV4_A_MTYPE = 2, 122225 NLBL_CIPSOV4_A_TAG = 3, 122226 NLBL_CIPSOV4_A_TAGLST = 4, 122227 NLBL_CIPSOV4_A_MLSLVLLOC = 5, 122228 NLBL_CIPSOV4_A_MLSLVLREM = 6, 122229 NLBL_CIPSOV4_A_MLSLVL = 7, 122230 NLBL_CIPSOV4_A_MLSLVLLST = 8, 122231 NLBL_CIPSOV4_A_MLSCATLOC = 9, 122232 NLBL_CIPSOV4_A_MLSCATREM = 10, 122233 NLBL_CIPSOV4_A_MLSCAT = 11, 122234 NLBL_CIPSOV4_A_MLSCATLST = 12, 122235 __NLBL_CIPSOV4_A_MAX = 13, 122236 }; 122237 122238 struct netlbl_cipsov4_doiwalk_arg { 122239 struct netlink_callback *nl_cb; 122240 struct sk_buff *skb; 122241 u32 seq; 122242 }; 122243 122244 struct netlbl_domhsh_walk_arg___2 { 122245 struct netlbl_audit *audit_info; 122246 u32 doi; 122247 }; 122248 122249 enum { 122250 NLBL_CALIPSO_C_UNSPEC = 0, 122251 NLBL_CALIPSO_C_ADD = 1, 122252 NLBL_CALIPSO_C_REMOVE = 2, 122253 NLBL_CALIPSO_C_LIST = 3, 122254 NLBL_CALIPSO_C_LISTALL = 4, 122255 __NLBL_CALIPSO_C_MAX = 5, 122256 }; 122257 122258 enum { 122259 NLBL_CALIPSO_A_UNSPEC = 0, 122260 NLBL_CALIPSO_A_DOI = 1, 122261 NLBL_CALIPSO_A_MTYPE = 2, 122262 __NLBL_CALIPSO_A_MAX = 3, 122263 }; 122264 122265 struct netlbl_calipso_doiwalk_arg { 122266 struct netlink_callback *nl_cb; 122267 struct sk_buff *skb; 122268 u32 seq; 122269 }; 122270 122271 struct dcbmsg { 122272 __u8 dcb_family; 122273 __u8 cmd; 122274 __u16 dcb_pad; 122275 }; 122276 122277 enum dcbnl_commands { 122278 DCB_CMD_UNDEFINED = 0, 122279 DCB_CMD_GSTATE = 1, 122280 DCB_CMD_SSTATE = 2, 122281 DCB_CMD_PGTX_GCFG = 3, 122282 DCB_CMD_PGTX_SCFG = 4, 122283 DCB_CMD_PGRX_GCFG = 5, 122284 DCB_CMD_PGRX_SCFG = 6, 122285 DCB_CMD_PFC_GCFG = 7, 122286 DCB_CMD_PFC_SCFG = 8, 122287 DCB_CMD_SET_ALL = 9, 122288 DCB_CMD_GPERM_HWADDR = 10, 122289 DCB_CMD_GCAP = 11, 122290 DCB_CMD_GNUMTCS = 12, 122291 DCB_CMD_SNUMTCS = 13, 122292 DCB_CMD_PFC_GSTATE = 14, 122293 DCB_CMD_PFC_SSTATE = 15, 122294 DCB_CMD_BCN_GCFG = 16, 122295 DCB_CMD_BCN_SCFG = 17, 122296 DCB_CMD_GAPP = 18, 122297 DCB_CMD_SAPP = 19, 122298 DCB_CMD_IEEE_SET = 20, 122299 DCB_CMD_IEEE_GET = 21, 122300 DCB_CMD_GDCBX = 22, 122301 DCB_CMD_SDCBX = 23, 122302 DCB_CMD_GFEATCFG = 24, 122303 DCB_CMD_SFEATCFG = 25, 122304 DCB_CMD_CEE_GET = 26, 122305 DCB_CMD_IEEE_DEL = 27, 122306 __DCB_CMD_ENUM_MAX = 28, 122307 DCB_CMD_MAX = 27, 122308 }; 122309 122310 enum dcbnl_attrs { 122311 DCB_ATTR_UNDEFINED = 0, 122312 DCB_ATTR_IFNAME = 1, 122313 DCB_ATTR_STATE = 2, 122314 DCB_ATTR_PFC_STATE = 3, 122315 DCB_ATTR_PFC_CFG = 4, 122316 DCB_ATTR_NUM_TC = 5, 122317 DCB_ATTR_PG_CFG = 6, 122318 DCB_ATTR_SET_ALL = 7, 122319 DCB_ATTR_PERM_HWADDR = 8, 122320 DCB_ATTR_CAP = 9, 122321 DCB_ATTR_NUMTCS = 10, 122322 DCB_ATTR_BCN = 11, 122323 DCB_ATTR_APP = 12, 122324 DCB_ATTR_IEEE = 13, 122325 DCB_ATTR_DCBX = 14, 122326 DCB_ATTR_FEATCFG = 15, 122327 DCB_ATTR_CEE = 16, 122328 __DCB_ATTR_ENUM_MAX = 17, 122329 DCB_ATTR_MAX = 16, 122330 }; 122331 122332 enum ieee_attrs { 122333 DCB_ATTR_IEEE_UNSPEC = 0, 122334 DCB_ATTR_IEEE_ETS = 1, 122335 DCB_ATTR_IEEE_PFC = 2, 122336 DCB_ATTR_IEEE_APP_TABLE = 3, 122337 DCB_ATTR_IEEE_PEER_ETS = 4, 122338 DCB_ATTR_IEEE_PEER_PFC = 5, 122339 DCB_ATTR_IEEE_PEER_APP = 6, 122340 DCB_ATTR_IEEE_MAXRATE = 7, 122341 DCB_ATTR_IEEE_QCN = 8, 122342 DCB_ATTR_IEEE_QCN_STATS = 9, 122343 DCB_ATTR_DCB_BUFFER = 10, 122344 __DCB_ATTR_IEEE_MAX = 11, 122345 }; 122346 122347 enum ieee_attrs_app { 122348 DCB_ATTR_IEEE_APP_UNSPEC = 0, 122349 DCB_ATTR_IEEE_APP = 1, 122350 __DCB_ATTR_IEEE_APP_MAX = 2, 122351 }; 122352 122353 enum cee_attrs { 122354 DCB_ATTR_CEE_UNSPEC = 0, 122355 DCB_ATTR_CEE_PEER_PG = 1, 122356 DCB_ATTR_CEE_PEER_PFC = 2, 122357 DCB_ATTR_CEE_PEER_APP_TABLE = 3, 122358 DCB_ATTR_CEE_TX_PG = 4, 122359 DCB_ATTR_CEE_RX_PG = 5, 122360 DCB_ATTR_CEE_PFC = 6, 122361 DCB_ATTR_CEE_APP_TABLE = 7, 122362 DCB_ATTR_CEE_FEAT = 8, 122363 __DCB_ATTR_CEE_MAX = 9, 122364 }; 122365 122366 enum peer_app_attr { 122367 DCB_ATTR_CEE_PEER_APP_UNSPEC = 0, 122368 DCB_ATTR_CEE_PEER_APP_INFO = 1, 122369 DCB_ATTR_CEE_PEER_APP = 2, 122370 __DCB_ATTR_CEE_PEER_APP_MAX = 3, 122371 }; 122372 122373 enum dcbnl_pfc_up_attrs { 122374 DCB_PFC_UP_ATTR_UNDEFINED = 0, 122375 DCB_PFC_UP_ATTR_0 = 1, 122376 DCB_PFC_UP_ATTR_1 = 2, 122377 DCB_PFC_UP_ATTR_2 = 3, 122378 DCB_PFC_UP_ATTR_3 = 4, 122379 DCB_PFC_UP_ATTR_4 = 5, 122380 DCB_PFC_UP_ATTR_5 = 6, 122381 DCB_PFC_UP_ATTR_6 = 7, 122382 DCB_PFC_UP_ATTR_7 = 8, 122383 DCB_PFC_UP_ATTR_ALL = 9, 122384 __DCB_PFC_UP_ATTR_ENUM_MAX = 10, 122385 DCB_PFC_UP_ATTR_MAX = 9, 122386 }; 122387 122388 enum dcbnl_pg_attrs { 122389 DCB_PG_ATTR_UNDEFINED = 0, 122390 DCB_PG_ATTR_TC_0 = 1, 122391 DCB_PG_ATTR_TC_1 = 2, 122392 DCB_PG_ATTR_TC_2 = 3, 122393 DCB_PG_ATTR_TC_3 = 4, 122394 DCB_PG_ATTR_TC_4 = 5, 122395 DCB_PG_ATTR_TC_5 = 6, 122396 DCB_PG_ATTR_TC_6 = 7, 122397 DCB_PG_ATTR_TC_7 = 8, 122398 DCB_PG_ATTR_TC_MAX = 9, 122399 DCB_PG_ATTR_TC_ALL = 10, 122400 DCB_PG_ATTR_BW_ID_0 = 11, 122401 DCB_PG_ATTR_BW_ID_1 = 12, 122402 DCB_PG_ATTR_BW_ID_2 = 13, 122403 DCB_PG_ATTR_BW_ID_3 = 14, 122404 DCB_PG_ATTR_BW_ID_4 = 15, 122405 DCB_PG_ATTR_BW_ID_5 = 16, 122406 DCB_PG_ATTR_BW_ID_6 = 17, 122407 DCB_PG_ATTR_BW_ID_7 = 18, 122408 DCB_PG_ATTR_BW_ID_MAX = 19, 122409 DCB_PG_ATTR_BW_ID_ALL = 20, 122410 __DCB_PG_ATTR_ENUM_MAX = 21, 122411 DCB_PG_ATTR_MAX = 20, 122412 }; 122413 122414 enum dcbnl_tc_attrs { 122415 DCB_TC_ATTR_PARAM_UNDEFINED = 0, 122416 DCB_TC_ATTR_PARAM_PGID = 1, 122417 DCB_TC_ATTR_PARAM_UP_MAPPING = 2, 122418 DCB_TC_ATTR_PARAM_STRICT_PRIO = 3, 122419 DCB_TC_ATTR_PARAM_BW_PCT = 4, 122420 DCB_TC_ATTR_PARAM_ALL = 5, 122421 __DCB_TC_ATTR_PARAM_ENUM_MAX = 6, 122422 DCB_TC_ATTR_PARAM_MAX = 5, 122423 }; 122424 122425 enum dcbnl_cap_attrs { 122426 DCB_CAP_ATTR_UNDEFINED = 0, 122427 DCB_CAP_ATTR_ALL = 1, 122428 DCB_CAP_ATTR_PG = 2, 122429 DCB_CAP_ATTR_PFC = 3, 122430 DCB_CAP_ATTR_UP2TC = 4, 122431 DCB_CAP_ATTR_PG_TCS = 5, 122432 DCB_CAP_ATTR_PFC_TCS = 6, 122433 DCB_CAP_ATTR_GSP = 7, 122434 DCB_CAP_ATTR_BCN = 8, 122435 DCB_CAP_ATTR_DCBX = 9, 122436 __DCB_CAP_ATTR_ENUM_MAX = 10, 122437 DCB_CAP_ATTR_MAX = 9, 122438 }; 122439 122440 enum dcbnl_numtcs_attrs { 122441 DCB_NUMTCS_ATTR_UNDEFINED = 0, 122442 DCB_NUMTCS_ATTR_ALL = 1, 122443 DCB_NUMTCS_ATTR_PG = 2, 122444 DCB_NUMTCS_ATTR_PFC = 3, 122445 __DCB_NUMTCS_ATTR_ENUM_MAX = 4, 122446 DCB_NUMTCS_ATTR_MAX = 3, 122447 }; 122448 122449 enum dcbnl_bcn_attrs { 122450 DCB_BCN_ATTR_UNDEFINED = 0, 122451 DCB_BCN_ATTR_RP_0 = 1, 122452 DCB_BCN_ATTR_RP_1 = 2, 122453 DCB_BCN_ATTR_RP_2 = 3, 122454 DCB_BCN_ATTR_RP_3 = 4, 122455 DCB_BCN_ATTR_RP_4 = 5, 122456 DCB_BCN_ATTR_RP_5 = 6, 122457 DCB_BCN_ATTR_RP_6 = 7, 122458 DCB_BCN_ATTR_RP_7 = 8, 122459 DCB_BCN_ATTR_RP_ALL = 9, 122460 DCB_BCN_ATTR_BCNA_0 = 10, 122461 DCB_BCN_ATTR_BCNA_1 = 11, 122462 DCB_BCN_ATTR_ALPHA = 12, 122463 DCB_BCN_ATTR_BETA = 13, 122464 DCB_BCN_ATTR_GD = 14, 122465 DCB_BCN_ATTR_GI = 15, 122466 DCB_BCN_ATTR_TMAX = 16, 122467 DCB_BCN_ATTR_TD = 17, 122468 DCB_BCN_ATTR_RMIN = 18, 122469 DCB_BCN_ATTR_W = 19, 122470 DCB_BCN_ATTR_RD = 20, 122471 DCB_BCN_ATTR_RU = 21, 122472 DCB_BCN_ATTR_WRTT = 22, 122473 DCB_BCN_ATTR_RI = 23, 122474 DCB_BCN_ATTR_C = 24, 122475 DCB_BCN_ATTR_ALL = 25, 122476 __DCB_BCN_ATTR_ENUM_MAX = 26, 122477 DCB_BCN_ATTR_MAX = 25, 122478 }; 122479 122480 enum dcb_general_attr_values { 122481 DCB_ATTR_VALUE_UNDEFINED = 255, 122482 }; 122483 122484 enum dcbnl_app_attrs { 122485 DCB_APP_ATTR_UNDEFINED = 0, 122486 DCB_APP_ATTR_IDTYPE = 1, 122487 DCB_APP_ATTR_ID = 2, 122488 DCB_APP_ATTR_PRIORITY = 3, 122489 __DCB_APP_ATTR_ENUM_MAX = 4, 122490 DCB_APP_ATTR_MAX = 3, 122491 }; 122492 122493 enum dcbnl_featcfg_attrs { 122494 DCB_FEATCFG_ATTR_UNDEFINED = 0, 122495 DCB_FEATCFG_ATTR_ALL = 1, 122496 DCB_FEATCFG_ATTR_PG = 2, 122497 DCB_FEATCFG_ATTR_PFC = 3, 122498 DCB_FEATCFG_ATTR_APP = 4, 122499 __DCB_FEATCFG_ATTR_ENUM_MAX = 5, 122500 DCB_FEATCFG_ATTR_MAX = 4, 122501 }; 122502 122503 struct dcb_app_type { 122504 int ifindex; 122505 struct dcb_app app; 122506 struct list_head list; 122507 u8 dcbx; 122508 }; 122509 122510 struct dcb_ieee_app_prio_map { 122511 u64 map[8]; 122512 }; 122513 122514 struct dcb_ieee_app_dscp_map { 122515 u8 map[64]; 122516 }; 122517 122518 enum dcbevent_notif_type { 122519 DCB_APP_EVENT = 1, 122520 }; 122521 122522 struct reply_func { 122523 int type; 122524 int (*cb)(struct net_device *, struct nlmsghdr *, u32, struct nlattr **, struct sk_buff *); 122525 }; 122526 122527 enum switchdev_attr_id { 122528 SWITCHDEV_ATTR_ID_UNDEFINED = 0, 122529 SWITCHDEV_ATTR_ID_PORT_STP_STATE = 1, 122530 SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS = 2, 122531 SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS = 3, 122532 SWITCHDEV_ATTR_ID_PORT_MROUTER = 4, 122533 SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME = 5, 122534 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING = 6, 122535 SWITCHDEV_ATTR_ID_BRIDGE_VLAN_PROTOCOL = 7, 122536 SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED = 8, 122537 SWITCHDEV_ATTR_ID_BRIDGE_MROUTER = 9, 122538 SWITCHDEV_ATTR_ID_MRP_PORT_ROLE = 10, 122539 }; 122540 122541 struct switchdev_attr { 122542 struct net_device *orig_dev; 122543 enum switchdev_attr_id id; 122544 u32 flags; 122545 void *complete_priv; 122546 void (*complete)(struct net_device *, int, void *); 122547 union { 122548 u8 stp_state; 122549 long unsigned int brport_flags; 122550 bool mrouter; 122551 clock_t ageing_time; 122552 bool vlan_filtering; 122553 u16 vlan_protocol; 122554 bool mc_disabled; 122555 u8 mrp_port_role; 122556 } u; 122557 }; 122558 122559 enum switchdev_notifier_type { 122560 SWITCHDEV_FDB_ADD_TO_BRIDGE = 1, 122561 SWITCHDEV_FDB_DEL_TO_BRIDGE = 2, 122562 SWITCHDEV_FDB_ADD_TO_DEVICE = 3, 122563 SWITCHDEV_FDB_DEL_TO_DEVICE = 4, 122564 SWITCHDEV_FDB_OFFLOADED = 5, 122565 SWITCHDEV_FDB_FLUSH_TO_BRIDGE = 6, 122566 SWITCHDEV_PORT_OBJ_ADD = 7, 122567 SWITCHDEV_PORT_OBJ_DEL = 8, 122568 SWITCHDEV_PORT_ATTR_SET = 9, 122569 SWITCHDEV_VXLAN_FDB_ADD_TO_BRIDGE = 10, 122570 SWITCHDEV_VXLAN_FDB_DEL_TO_BRIDGE = 11, 122571 SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE = 12, 122572 SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE = 13, 122573 SWITCHDEV_VXLAN_FDB_OFFLOADED = 14, 122574 }; 122575 122576 struct switchdev_notifier_info { 122577 struct net_device *dev; 122578 struct netlink_ext_ack *extack; 122579 }; 122580 122581 struct switchdev_notifier_port_obj_info { 122582 struct switchdev_notifier_info info; 122583 const struct switchdev_obj *obj; 122584 struct switchdev_trans *trans; 122585 bool handled; 122586 }; 122587 122588 struct switchdev_notifier_port_attr_info { 122589 struct switchdev_notifier_info info; 122590 const struct switchdev_attr *attr; 122591 struct switchdev_trans *trans; 122592 bool handled; 122593 }; 122594 122595 typedef void switchdev_deferred_func_t(struct net_device *, const void *); 122596 122597 struct switchdev_deferred_item { 122598 struct list_head list; 122599 struct net_device *dev; 122600 switchdev_deferred_func_t *func; 122601 long unsigned int data[0]; 122602 }; 122603 122604 typedef int (*lookup_by_table_id_t)(struct net *, u32); 122605 122606 struct l3mdev_handler { 122607 lookup_by_table_id_t dev_lookup; 122608 }; 122609 122610 struct ncsi_dev { 122611 int state; 122612 int link_up; 122613 struct net_device *dev; 122614 void (*handler)(struct ncsi_dev *); 122615 }; 122616 122617 enum { 122618 NCSI_CAP_BASE = 0, 122619 NCSI_CAP_GENERIC = 0, 122620 NCSI_CAP_BC = 1, 122621 NCSI_CAP_MC = 2, 122622 NCSI_CAP_BUFFER = 3, 122623 NCSI_CAP_AEN = 4, 122624 NCSI_CAP_VLAN = 5, 122625 NCSI_CAP_MAX = 6, 122626 }; 122627 122628 enum { 122629 NCSI_MODE_BASE = 0, 122630 NCSI_MODE_ENABLE = 0, 122631 NCSI_MODE_TX_ENABLE = 1, 122632 NCSI_MODE_LINK = 2, 122633 NCSI_MODE_VLAN = 3, 122634 NCSI_MODE_BC = 4, 122635 NCSI_MODE_MC = 5, 122636 NCSI_MODE_AEN = 6, 122637 NCSI_MODE_FC = 7, 122638 NCSI_MODE_MAX = 8, 122639 }; 122640 122641 struct ncsi_channel_version { 122642 u32 version; 122643 u32 alpha2; 122644 u8 fw_name[12]; 122645 u32 fw_version; 122646 u16 pci_ids[4]; 122647 u32 mf_id; 122648 }; 122649 122650 struct ncsi_channel_cap { 122651 u32 index; 122652 u32 cap; 122653 }; 122654 122655 struct ncsi_channel_mode { 122656 u32 index; 122657 u32 enable; 122658 u32 size; 122659 u32 data[8]; 122660 }; 122661 122662 struct ncsi_channel_mac_filter { 122663 u8 n_uc; 122664 u8 n_mc; 122665 u8 n_mixed; 122666 u64 bitmap; 122667 unsigned char *addrs; 122668 }; 122669 122670 struct ncsi_channel_vlan_filter { 122671 u8 n_vids; 122672 u64 bitmap; 122673 u16 *vids; 122674 }; 122675 122676 struct ncsi_channel_stats { 122677 u32 hnc_cnt_hi; 122678 u32 hnc_cnt_lo; 122679 u32 hnc_rx_bytes; 122680 u32 hnc_tx_bytes; 122681 u32 hnc_rx_uc_pkts; 122682 u32 hnc_rx_mc_pkts; 122683 u32 hnc_rx_bc_pkts; 122684 u32 hnc_tx_uc_pkts; 122685 u32 hnc_tx_mc_pkts; 122686 u32 hnc_tx_bc_pkts; 122687 u32 hnc_fcs_err; 122688 u32 hnc_align_err; 122689 u32 hnc_false_carrier; 122690 u32 hnc_runt_pkts; 122691 u32 hnc_jabber_pkts; 122692 u32 hnc_rx_pause_xon; 122693 u32 hnc_rx_pause_xoff; 122694 u32 hnc_tx_pause_xon; 122695 u32 hnc_tx_pause_xoff; 122696 u32 hnc_tx_s_collision; 122697 u32 hnc_tx_m_collision; 122698 u32 hnc_l_collision; 122699 u32 hnc_e_collision; 122700 u32 hnc_rx_ctl_frames; 122701 u32 hnc_rx_64_frames; 122702 u32 hnc_rx_127_frames; 122703 u32 hnc_rx_255_frames; 122704 u32 hnc_rx_511_frames; 122705 u32 hnc_rx_1023_frames; 122706 u32 hnc_rx_1522_frames; 122707 u32 hnc_rx_9022_frames; 122708 u32 hnc_tx_64_frames; 122709 u32 hnc_tx_127_frames; 122710 u32 hnc_tx_255_frames; 122711 u32 hnc_tx_511_frames; 122712 u32 hnc_tx_1023_frames; 122713 u32 hnc_tx_1522_frames; 122714 u32 hnc_tx_9022_frames; 122715 u32 hnc_rx_valid_bytes; 122716 u32 hnc_rx_runt_pkts; 122717 u32 hnc_rx_jabber_pkts; 122718 u32 ncsi_rx_cmds; 122719 u32 ncsi_dropped_cmds; 122720 u32 ncsi_cmd_type_errs; 122721 u32 ncsi_cmd_csum_errs; 122722 u32 ncsi_rx_pkts; 122723 u32 ncsi_tx_pkts; 122724 u32 ncsi_tx_aen_pkts; 122725 u32 pt_tx_pkts; 122726 u32 pt_tx_dropped; 122727 u32 pt_tx_channel_err; 122728 u32 pt_tx_us_err; 122729 u32 pt_rx_pkts; 122730 u32 pt_rx_dropped; 122731 u32 pt_rx_channel_err; 122732 u32 pt_rx_us_err; 122733 u32 pt_rx_os_err; 122734 }; 122735 122736 struct ncsi_package; 122737 122738 struct ncsi_channel { 122739 unsigned char id; 122740 int state; 122741 bool reconfigure_needed; 122742 spinlock_t lock; 122743 struct ncsi_package *package; 122744 struct ncsi_channel_version version; 122745 struct ncsi_channel_cap caps[6]; 122746 struct ncsi_channel_mode modes[8]; 122747 struct ncsi_channel_mac_filter mac_filter; 122748 struct ncsi_channel_vlan_filter vlan_filter; 122749 struct ncsi_channel_stats stats; 122750 struct { 122751 struct timer_list timer; 122752 bool enabled; 122753 unsigned int state; 122754 } monitor; 122755 struct list_head node; 122756 struct list_head link; 122757 }; 122758 122759 struct ncsi_dev_priv; 122760 122761 struct ncsi_package { 122762 unsigned char id; 122763 unsigned char uuid[16]; 122764 struct ncsi_dev_priv *ndp; 122765 spinlock_t lock; 122766 unsigned int channel_num; 122767 struct list_head channels; 122768 struct list_head node; 122769 bool multi_channel; 122770 u32 channel_whitelist; 122771 struct ncsi_channel *preferred_channel; 122772 }; 122773 122774 struct ncsi_request { 122775 unsigned char id; 122776 bool used; 122777 unsigned int flags; 122778 struct ncsi_dev_priv *ndp; 122779 struct sk_buff *cmd; 122780 struct sk_buff *rsp; 122781 struct timer_list timer; 122782 bool enabled; 122783 u32 snd_seq; 122784 u32 snd_portid; 122785 struct nlmsghdr nlhdr; 122786 }; 122787 122788 struct ncsi_dev_priv { 122789 struct ncsi_dev ndev; 122790 unsigned int flags; 122791 unsigned int gma_flag; 122792 spinlock_t lock; 122793 unsigned int package_probe_id; 122794 unsigned int package_num; 122795 struct list_head packages; 122796 struct ncsi_channel *hot_channel; 122797 struct ncsi_request requests[256]; 122798 unsigned int request_id; 122799 unsigned int pending_req_num; 122800 struct ncsi_package *active_package; 122801 struct ncsi_channel *active_channel; 122802 struct list_head channel_queue; 122803 struct work_struct work; 122804 struct packet_type ptype; 122805 struct list_head node; 122806 struct list_head vlan_vids; 122807 bool multi_package; 122808 bool mlx_multi_host; 122809 u32 package_whitelist; 122810 }; 122811 122812 struct ncsi_cmd_arg { 122813 struct ncsi_dev_priv *ndp; 122814 unsigned char type; 122815 unsigned char id; 122816 unsigned char package; 122817 unsigned char channel; 122818 short unsigned int payload; 122819 unsigned int req_flags; 122820 union { 122821 unsigned char bytes[16]; 122822 short unsigned int words[8]; 122823 unsigned int dwords[4]; 122824 }; 122825 unsigned char *data; 122826 struct genl_info *info; 122827 }; 122828 122829 struct ncsi_pkt_hdr { 122830 unsigned char mc_id; 122831 unsigned char revision; 122832 unsigned char reserved; 122833 unsigned char id; 122834 unsigned char type; 122835 unsigned char channel; 122836 __be16 length; 122837 __be32 reserved1[2]; 122838 }; 122839 122840 struct ncsi_cmd_pkt_hdr { 122841 struct ncsi_pkt_hdr common; 122842 }; 122843 122844 struct ncsi_cmd_pkt { 122845 struct ncsi_cmd_pkt_hdr cmd; 122846 __be32 checksum; 122847 unsigned char pad[26]; 122848 }; 122849 122850 struct ncsi_cmd_sp_pkt { 122851 struct ncsi_cmd_pkt_hdr cmd; 122852 unsigned char reserved[3]; 122853 unsigned char hw_arbitration; 122854 __be32 checksum; 122855 unsigned char pad[22]; 122856 }; 122857 122858 struct ncsi_cmd_dc_pkt { 122859 struct ncsi_cmd_pkt_hdr cmd; 122860 unsigned char reserved[3]; 122861 unsigned char ald; 122862 __be32 checksum; 122863 unsigned char pad[22]; 122864 }; 122865 122866 struct ncsi_cmd_rc_pkt { 122867 struct ncsi_cmd_pkt_hdr cmd; 122868 __be32 reserved; 122869 __be32 checksum; 122870 unsigned char pad[22]; 122871 }; 122872 122873 struct ncsi_cmd_ae_pkt { 122874 struct ncsi_cmd_pkt_hdr cmd; 122875 unsigned char reserved[3]; 122876 unsigned char mc_id; 122877 __be32 mode; 122878 __be32 checksum; 122879 unsigned char pad[18]; 122880 }; 122881 122882 struct ncsi_cmd_sl_pkt { 122883 struct ncsi_cmd_pkt_hdr cmd; 122884 __be32 mode; 122885 __be32 oem_mode; 122886 __be32 checksum; 122887 unsigned char pad[18]; 122888 }; 122889 122890 struct ncsi_cmd_svf_pkt { 122891 struct ncsi_cmd_pkt_hdr cmd; 122892 __be16 reserved; 122893 __be16 vlan; 122894 __be16 reserved1; 122895 unsigned char index; 122896 unsigned char enable; 122897 __be32 checksum; 122898 unsigned char pad[18]; 122899 }; 122900 122901 struct ncsi_cmd_ev_pkt { 122902 struct ncsi_cmd_pkt_hdr cmd; 122903 unsigned char reserved[3]; 122904 unsigned char mode; 122905 __be32 checksum; 122906 unsigned char pad[22]; 122907 }; 122908 122909 struct ncsi_cmd_sma_pkt { 122910 struct ncsi_cmd_pkt_hdr cmd; 122911 unsigned char mac[6]; 122912 unsigned char index; 122913 unsigned char at_e; 122914 __be32 checksum; 122915 unsigned char pad[18]; 122916 }; 122917 122918 struct ncsi_cmd_ebf_pkt { 122919 struct ncsi_cmd_pkt_hdr cmd; 122920 __be32 mode; 122921 __be32 checksum; 122922 unsigned char pad[22]; 122923 }; 122924 122925 struct ncsi_cmd_egmf_pkt { 122926 struct ncsi_cmd_pkt_hdr cmd; 122927 __be32 mode; 122928 __be32 checksum; 122929 unsigned char pad[22]; 122930 }; 122931 122932 struct ncsi_cmd_snfc_pkt { 122933 struct ncsi_cmd_pkt_hdr cmd; 122934 unsigned char reserved[3]; 122935 unsigned char mode; 122936 __be32 checksum; 122937 unsigned char pad[22]; 122938 }; 122939 122940 struct ncsi_cmd_oem_pkt { 122941 struct ncsi_cmd_pkt_hdr cmd; 122942 __be32 mfr_id; 122943 unsigned char data[0]; 122944 }; 122945 122946 struct ncsi_cmd_handler { 122947 unsigned char type; 122948 int payload; 122949 int (*handler)(struct sk_buff *, struct ncsi_cmd_arg *); 122950 }; 122951 122952 enum { 122953 NCSI_CAP_GENERIC_HWA = 1, 122954 NCSI_CAP_GENERIC_HDS = 2, 122955 NCSI_CAP_GENERIC_FC = 4, 122956 NCSI_CAP_GENERIC_FC1 = 8, 122957 NCSI_CAP_GENERIC_MC = 16, 122958 NCSI_CAP_GENERIC_HWA_UNKNOWN = 0, 122959 NCSI_CAP_GENERIC_HWA_SUPPORT = 32, 122960 NCSI_CAP_GENERIC_HWA_NOT_SUPPORT = 64, 122961 NCSI_CAP_GENERIC_HWA_RESERVED = 96, 122962 NCSI_CAP_GENERIC_HWA_MASK = 96, 122963 NCSI_CAP_GENERIC_MASK = 127, 122964 NCSI_CAP_BC_ARP = 1, 122965 NCSI_CAP_BC_DHCPC = 2, 122966 NCSI_CAP_BC_DHCPS = 4, 122967 NCSI_CAP_BC_NETBIOS = 8, 122968 NCSI_CAP_BC_MASK = 15, 122969 NCSI_CAP_MC_IPV6_NEIGHBOR = 1, 122970 NCSI_CAP_MC_IPV6_ROUTER = 2, 122971 NCSI_CAP_MC_DHCPV6_RELAY = 4, 122972 NCSI_CAP_MC_DHCPV6_WELL_KNOWN = 8, 122973 NCSI_CAP_MC_IPV6_MLD = 16, 122974 NCSI_CAP_MC_IPV6_NEIGHBOR_S = 32, 122975 NCSI_CAP_MC_MASK = 63, 122976 NCSI_CAP_AEN_LSC = 1, 122977 NCSI_CAP_AEN_CR = 2, 122978 NCSI_CAP_AEN_HDS = 4, 122979 NCSI_CAP_AEN_MASK = 7, 122980 NCSI_CAP_VLAN_ONLY = 1, 122981 NCSI_CAP_VLAN_NO = 2, 122982 NCSI_CAP_VLAN_ANY = 4, 122983 NCSI_CAP_VLAN_MASK = 7, 122984 }; 122985 122986 struct ncsi_rsp_pkt_hdr { 122987 struct ncsi_pkt_hdr common; 122988 __be16 code; 122989 __be16 reason; 122990 }; 122991 122992 struct ncsi_rsp_pkt { 122993 struct ncsi_rsp_pkt_hdr rsp; 122994 __be32 checksum; 122995 unsigned char pad[22]; 122996 }; 122997 122998 struct ncsi_rsp_oem_pkt { 122999 struct ncsi_rsp_pkt_hdr rsp; 123000 __be32 mfr_id; 123001 unsigned char data[0]; 123002 }; 123003 123004 struct ncsi_rsp_oem_mlx_pkt { 123005 unsigned char cmd_rev; 123006 unsigned char cmd; 123007 unsigned char param; 123008 unsigned char optional; 123009 unsigned char data[0]; 123010 }; 123011 123012 struct ncsi_rsp_oem_bcm_pkt { 123013 unsigned char ver; 123014 unsigned char type; 123015 __be16 len; 123016 unsigned char data[0]; 123017 }; 123018 123019 struct ncsi_rsp_gls_pkt { 123020 struct ncsi_rsp_pkt_hdr rsp; 123021 __be32 status; 123022 __be32 other; 123023 __be32 oem_status; 123024 __be32 checksum; 123025 unsigned char pad[10]; 123026 }; 123027 123028 struct ncsi_rsp_gvi_pkt { 123029 struct ncsi_rsp_pkt_hdr rsp; 123030 __be32 ncsi_version; 123031 unsigned char reserved[3]; 123032 unsigned char alpha2; 123033 unsigned char fw_name[12]; 123034 __be32 fw_version; 123035 __be16 pci_ids[4]; 123036 __be32 mf_id; 123037 __be32 checksum; 123038 }; 123039 123040 struct ncsi_rsp_gc_pkt { 123041 struct ncsi_rsp_pkt_hdr rsp; 123042 __be32 cap; 123043 __be32 bc_cap; 123044 __be32 mc_cap; 123045 __be32 buf_cap; 123046 __be32 aen_cap; 123047 unsigned char vlan_cnt; 123048 unsigned char mixed_cnt; 123049 unsigned char mc_cnt; 123050 unsigned char uc_cnt; 123051 unsigned char reserved[2]; 123052 unsigned char vlan_mode; 123053 unsigned char channel_cnt; 123054 __be32 checksum; 123055 }; 123056 123057 struct ncsi_rsp_gp_pkt { 123058 struct ncsi_rsp_pkt_hdr rsp; 123059 unsigned char mac_cnt; 123060 unsigned char reserved[2]; 123061 unsigned char mac_enable; 123062 unsigned char vlan_cnt; 123063 unsigned char reserved1; 123064 __be16 vlan_enable; 123065 __be32 link_mode; 123066 __be32 bc_mode; 123067 __be32 valid_modes; 123068 unsigned char vlan_mode; 123069 unsigned char fc_mode; 123070 unsigned char reserved2[2]; 123071 __be32 aen_mode; 123072 unsigned char mac[6]; 123073 __be16 vlan; 123074 __be32 checksum; 123075 }; 123076 123077 struct ncsi_rsp_gcps_pkt { 123078 struct ncsi_rsp_pkt_hdr rsp; 123079 __be32 cnt_hi; 123080 __be32 cnt_lo; 123081 __be32 rx_bytes; 123082 __be32 tx_bytes; 123083 __be32 rx_uc_pkts; 123084 __be32 rx_mc_pkts; 123085 __be32 rx_bc_pkts; 123086 __be32 tx_uc_pkts; 123087 __be32 tx_mc_pkts; 123088 __be32 tx_bc_pkts; 123089 __be32 fcs_err; 123090 __be32 align_err; 123091 __be32 false_carrier; 123092 __be32 runt_pkts; 123093 __be32 jabber_pkts; 123094 __be32 rx_pause_xon; 123095 __be32 rx_pause_xoff; 123096 __be32 tx_pause_xon; 123097 __be32 tx_pause_xoff; 123098 __be32 tx_s_collision; 123099 __be32 tx_m_collision; 123100 __be32 l_collision; 123101 __be32 e_collision; 123102 __be32 rx_ctl_frames; 123103 __be32 rx_64_frames; 123104 __be32 rx_127_frames; 123105 __be32 rx_255_frames; 123106 __be32 rx_511_frames; 123107 __be32 rx_1023_frames; 123108 __be32 rx_1522_frames; 123109 __be32 rx_9022_frames; 123110 __be32 tx_64_frames; 123111 __be32 tx_127_frames; 123112 __be32 tx_255_frames; 123113 __be32 tx_511_frames; 123114 __be32 tx_1023_frames; 123115 __be32 tx_1522_frames; 123116 __be32 tx_9022_frames; 123117 __be32 rx_valid_bytes; 123118 __be32 rx_runt_pkts; 123119 __be32 rx_jabber_pkts; 123120 __be32 checksum; 123121 }; 123122 123123 struct ncsi_rsp_gns_pkt { 123124 struct ncsi_rsp_pkt_hdr rsp; 123125 __be32 rx_cmds; 123126 __be32 dropped_cmds; 123127 __be32 cmd_type_errs; 123128 __be32 cmd_csum_errs; 123129 __be32 rx_pkts; 123130 __be32 tx_pkts; 123131 __be32 tx_aen_pkts; 123132 __be32 checksum; 123133 }; 123134 123135 struct ncsi_rsp_gnpts_pkt { 123136 struct ncsi_rsp_pkt_hdr rsp; 123137 __be32 tx_pkts; 123138 __be32 tx_dropped; 123139 __be32 tx_channel_err; 123140 __be32 tx_us_err; 123141 __be32 rx_pkts; 123142 __be32 rx_dropped; 123143 __be32 rx_channel_err; 123144 __be32 rx_us_err; 123145 __be32 rx_os_err; 123146 __be32 checksum; 123147 }; 123148 123149 struct ncsi_rsp_gps_pkt { 123150 struct ncsi_rsp_pkt_hdr rsp; 123151 __be32 status; 123152 __be32 checksum; 123153 }; 123154 123155 struct ncsi_rsp_gpuuid_pkt { 123156 struct ncsi_rsp_pkt_hdr rsp; 123157 unsigned char uuid[16]; 123158 __be32 checksum; 123159 }; 123160 123161 struct ncsi_rsp_oem_handler { 123162 unsigned int mfr_id; 123163 int (*handler)(struct ncsi_request *); 123164 }; 123165 123166 struct ncsi_rsp_handler { 123167 unsigned char type; 123168 int payload; 123169 int (*handler)(struct ncsi_request *); 123170 }; 123171 123172 struct ncsi_aen_pkt_hdr { 123173 struct ncsi_pkt_hdr common; 123174 unsigned char reserved2[3]; 123175 unsigned char type; 123176 }; 123177 123178 struct ncsi_aen_lsc_pkt { 123179 struct ncsi_aen_pkt_hdr aen; 123180 __be32 status; 123181 __be32 oem_status; 123182 __be32 checksum; 123183 unsigned char pad[14]; 123184 }; 123185 123186 struct ncsi_aen_hncdsc_pkt { 123187 struct ncsi_aen_pkt_hdr aen; 123188 __be32 status; 123189 __be32 checksum; 123190 unsigned char pad[18]; 123191 }; 123192 123193 struct ncsi_aen_handler { 123194 unsigned char type; 123195 int payload; 123196 int (*handler)(struct ncsi_dev_priv *, struct ncsi_aen_pkt_hdr *); 123197 }; 123198 123199 enum { 123200 ncsi_dev_state_registered = 0, 123201 ncsi_dev_state_functional = 256, 123202 ncsi_dev_state_probe = 512, 123203 ncsi_dev_state_config = 768, 123204 ncsi_dev_state_suspend = 1024, 123205 }; 123206 123207 enum { 123208 MLX_MC_RBT_SUPPORT = 1, 123209 MLX_MC_RBT_AVL = 8, 123210 }; 123211 123212 enum { 123213 ncsi_dev_state_major = 65280, 123214 ncsi_dev_state_minor = 255, 123215 ncsi_dev_state_probe_deselect = 513, 123216 ncsi_dev_state_probe_package = 514, 123217 ncsi_dev_state_probe_channel = 515, 123218 ncsi_dev_state_probe_mlx_gma = 516, 123219 ncsi_dev_state_probe_mlx_smaf = 517, 123220 ncsi_dev_state_probe_cis = 518, 123221 ncsi_dev_state_probe_gvi = 519, 123222 ncsi_dev_state_probe_gc = 520, 123223 ncsi_dev_state_probe_gls = 521, 123224 ncsi_dev_state_probe_dp = 522, 123225 ncsi_dev_state_config_sp = 769, 123226 ncsi_dev_state_config_cis = 770, 123227 ncsi_dev_state_config_oem_gma = 771, 123228 ncsi_dev_state_config_clear_vids = 772, 123229 ncsi_dev_state_config_svf = 773, 123230 ncsi_dev_state_config_ev = 774, 123231 ncsi_dev_state_config_sma = 775, 123232 ncsi_dev_state_config_ebf = 776, 123233 ncsi_dev_state_config_dgmf = 777, 123234 ncsi_dev_state_config_ecnt = 778, 123235 ncsi_dev_state_config_ec = 779, 123236 ncsi_dev_state_config_ae = 780, 123237 ncsi_dev_state_config_gls = 781, 123238 ncsi_dev_state_config_done = 782, 123239 ncsi_dev_state_suspend_select = 1025, 123240 ncsi_dev_state_suspend_gls = 1026, 123241 ncsi_dev_state_suspend_dcnt = 1027, 123242 ncsi_dev_state_suspend_dc = 1028, 123243 ncsi_dev_state_suspend_deselect = 1029, 123244 ncsi_dev_state_suspend_done = 1030, 123245 }; 123246 123247 struct vlan_vid { 123248 struct list_head list; 123249 __be16 proto; 123250 u16 vid; 123251 }; 123252 123253 struct ncsi_oem_gma_handler { 123254 unsigned int mfr_id; 123255 int (*handler)(struct ncsi_cmd_arg *); 123256 }; 123257 123258 enum ncsi_nl_commands { 123259 NCSI_CMD_UNSPEC = 0, 123260 NCSI_CMD_PKG_INFO = 1, 123261 NCSI_CMD_SET_INTERFACE = 2, 123262 NCSI_CMD_CLEAR_INTERFACE = 3, 123263 NCSI_CMD_SEND_CMD = 4, 123264 NCSI_CMD_SET_PACKAGE_MASK = 5, 123265 NCSI_CMD_SET_CHANNEL_MASK = 6, 123266 __NCSI_CMD_AFTER_LAST = 7, 123267 NCSI_CMD_MAX = 6, 123268 }; 123269 123270 enum ncsi_nl_attrs { 123271 NCSI_ATTR_UNSPEC = 0, 123272 NCSI_ATTR_IFINDEX = 1, 123273 NCSI_ATTR_PACKAGE_LIST = 2, 123274 NCSI_ATTR_PACKAGE_ID = 3, 123275 NCSI_ATTR_CHANNEL_ID = 4, 123276 NCSI_ATTR_DATA = 5, 123277 NCSI_ATTR_MULTI_FLAG = 6, 123278 NCSI_ATTR_PACKAGE_MASK = 7, 123279 NCSI_ATTR_CHANNEL_MASK = 8, 123280 __NCSI_ATTR_AFTER_LAST = 9, 123281 NCSI_ATTR_MAX = 8, 123282 }; 123283 123284 enum ncsi_nl_pkg_attrs { 123285 NCSI_PKG_ATTR_UNSPEC = 0, 123286 NCSI_PKG_ATTR = 1, 123287 NCSI_PKG_ATTR_ID = 2, 123288 NCSI_PKG_ATTR_FORCED = 3, 123289 NCSI_PKG_ATTR_CHANNEL_LIST = 4, 123290 __NCSI_PKG_ATTR_AFTER_LAST = 5, 123291 NCSI_PKG_ATTR_MAX = 4, 123292 }; 123293 123294 enum ncsi_nl_channel_attrs { 123295 NCSI_CHANNEL_ATTR_UNSPEC = 0, 123296 NCSI_CHANNEL_ATTR = 1, 123297 NCSI_CHANNEL_ATTR_ID = 2, 123298 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 3, 123299 NCSI_CHANNEL_ATTR_VERSION_MINOR = 4, 123300 NCSI_CHANNEL_ATTR_VERSION_STR = 5, 123301 NCSI_CHANNEL_ATTR_LINK_STATE = 6, 123302 NCSI_CHANNEL_ATTR_ACTIVE = 7, 123303 NCSI_CHANNEL_ATTR_FORCED = 8, 123304 NCSI_CHANNEL_ATTR_VLAN_LIST = 9, 123305 NCSI_CHANNEL_ATTR_VLAN_ID = 10, 123306 __NCSI_CHANNEL_ATTR_AFTER_LAST = 11, 123307 NCSI_CHANNEL_ATTR_MAX = 10, 123308 }; 123309 123310 struct sockaddr_xdp { 123311 __u16 sxdp_family; 123312 __u16 sxdp_flags; 123313 __u32 sxdp_ifindex; 123314 __u32 sxdp_queue_id; 123315 __u32 sxdp_shared_umem_fd; 123316 }; 123317 123318 struct xdp_ring_offset { 123319 __u64 producer; 123320 __u64 consumer; 123321 __u64 desc; 123322 __u64 flags; 123323 }; 123324 123325 struct xdp_mmap_offsets { 123326 struct xdp_ring_offset rx; 123327 struct xdp_ring_offset tx; 123328 struct xdp_ring_offset fr; 123329 struct xdp_ring_offset cr; 123330 }; 123331 123332 struct xdp_umem_reg { 123333 __u64 addr; 123334 __u64 len; 123335 __u32 chunk_size; 123336 __u32 headroom; 123337 __u32 flags; 123338 }; 123339 123340 struct xdp_statistics { 123341 __u64 rx_dropped; 123342 __u64 rx_invalid_descs; 123343 __u64 tx_invalid_descs; 123344 __u64 rx_ring_full; 123345 __u64 rx_fill_ring_empty_descs; 123346 __u64 tx_ring_empty_descs; 123347 }; 123348 123349 struct xdp_options { 123350 __u32 flags; 123351 }; 123352 123353 struct xdp_desc { 123354 __u64 addr; 123355 __u32 len; 123356 __u32 options; 123357 }; 123358 123359 struct xdp_ring; 123360 123361 struct xsk_queue { 123362 u32 ring_mask; 123363 u32 nentries; 123364 u32 cached_prod; 123365 u32 cached_cons; 123366 struct xdp_ring *ring; 123367 u64 invalid_descs; 123368 u64 queue_empty_descs; 123369 }; 123370 123371 struct xdp_ring_offset_v1 { 123372 __u64 producer; 123373 __u64 consumer; 123374 __u64 desc; 123375 }; 123376 123377 struct xdp_mmap_offsets_v1 { 123378 struct xdp_ring_offset_v1 rx; 123379 struct xdp_ring_offset_v1 tx; 123380 struct xdp_ring_offset_v1 fr; 123381 struct xdp_ring_offset_v1 cr; 123382 }; 123383 123384 struct xsk_map_node { 123385 struct list_head node; 123386 struct xsk_map *map; 123387 struct xdp_sock **map_entry; 123388 }; 123389 123390 struct xdp_ring { 123391 u32 producer; 123392 long: 32; 123393 long: 64; 123394 long: 64; 123395 long: 64; 123396 long: 64; 123397 long: 64; 123398 long: 64; 123399 long: 64; 123400 u32 pad1; 123401 long: 32; 123402 long: 64; 123403 long: 64; 123404 long: 64; 123405 long: 64; 123406 long: 64; 123407 long: 64; 123408 long: 64; 123409 u32 consumer; 123410 long: 32; 123411 long: 64; 123412 long: 64; 123413 long: 64; 123414 long: 64; 123415 long: 64; 123416 long: 64; 123417 long: 64; 123418 u32 pad2; 123419 u32 flags; 123420 long: 64; 123421 long: 64; 123422 long: 64; 123423 long: 64; 123424 long: 64; 123425 long: 64; 123426 long: 64; 123427 u32 pad3; 123428 long: 32; 123429 long: 64; 123430 long: 64; 123431 long: 64; 123432 long: 64; 123433 long: 64; 123434 long: 64; 123435 long: 64; 123436 }; 123437 123438 struct xdp_rxtx_ring { 123439 struct xdp_ring ptrs; 123440 struct xdp_desc desc[0]; 123441 }; 123442 123443 struct xdp_umem_ring { 123444 struct xdp_ring ptrs; 123445 u64 desc[0]; 123446 }; 123447 123448 struct xsk_dma_map { 123449 dma_addr_t *dma_pages; 123450 struct device *dev; 123451 struct net_device *netdev; 123452 refcount_t users; 123453 struct list_head list; 123454 u32 dma_pages_cnt; 123455 bool dma_need_sync; 123456 }; 123457 123458 struct mptcp_mib { 123459 long unsigned int mibs[23]; 123460 }; 123461 123462 struct mptcp_options_received { 123463 u64 sndr_key; 123464 u64 rcvr_key; 123465 u64 data_ack; 123466 u64 data_seq; 123467 u32 subflow_seq; 123468 u16 data_len; 123469 u16 mp_capable: 1; 123470 u16 mp_join: 1; 123471 u16 fastclose: 1; 123472 u16 dss: 1; 123473 u16 add_addr: 1; 123474 u16 rm_addr: 1; 123475 u16 family: 4; 123476 u16 echo: 1; 123477 u16 backup: 1; 123478 u32 token; 123479 u32 nonce; 123480 u64 thmac; 123481 u8 hmac[20]; 123482 u8 join_id; 123483 u8 use_map: 1; 123484 u8 dsn64: 1; 123485 u8 data_fin: 1; 123486 u8 use_ack: 1; 123487 u8 ack64: 1; 123488 u8 mpc_map: 1; 123489 u8 __unused: 2; 123490 u8 addr_id; 123491 u8 rm_id; 123492 union { 123493 struct in_addr addr; 123494 struct in6_addr addr6; 123495 }; 123496 u64 ahmac; 123497 u16 port; 123498 }; 123499 123500 struct mptcp_addr_info { 123501 sa_family_t family; 123502 __be16 port; 123503 u8 id; 123504 u8 flags; 123505 int ifindex; 123506 union { 123507 struct in_addr addr; 123508 struct in6_addr addr6; 123509 }; 123510 }; 123511 123512 enum mptcp_pm_status { 123513 MPTCP_PM_ADD_ADDR_RECEIVED = 0, 123514 MPTCP_PM_ADD_ADDR_SEND_ACK = 1, 123515 MPTCP_PM_RM_ADDR_RECEIVED = 2, 123516 MPTCP_PM_ESTABLISHED = 3, 123517 MPTCP_PM_ALREADY_ESTABLISHED = 4, 123518 MPTCP_PM_SUBFLOW_ESTABLISHED = 5, 123519 }; 123520 123521 struct mptcp_pm_data { 123522 struct mptcp_addr_info local; 123523 struct mptcp_addr_info remote; 123524 struct list_head anno_list; 123525 spinlock_t lock; 123526 u8 addr_signal; 123527 bool server_side; 123528 bool work_pending; 123529 bool accept_addr; 123530 bool accept_subflow; 123531 u8 add_addr_signaled; 123532 u8 add_addr_accepted; 123533 u8 local_addr_used; 123534 u8 subflows; 123535 u8 add_addr_signal_max; 123536 u8 add_addr_accept_max; 123537 u8 local_addr_max; 123538 u8 subflows_max; 123539 u8 status; 123540 u8 rm_id; 123541 }; 123542 123543 struct mptcp_data_frag { 123544 struct list_head list; 123545 u64 data_seq; 123546 u16 data_len; 123547 u16 offset; 123548 u16 overhead; 123549 u16 already_sent; 123550 struct page *page; 123551 }; 123552 123553 struct mptcp_sock { 123554 struct inet_connection_sock sk; 123555 u64 local_key; 123556 u64 remote_key; 123557 u64 write_seq; 123558 u64 snd_nxt; 123559 u64 ack_seq; 123560 u64 rcv_wnd_sent; 123561 u64 rcv_data_fin_seq; 123562 int wmem_reserved; 123563 struct sock *last_snd; 123564 int snd_burst; 123565 int old_wspace; 123566 u64 snd_una; 123567 u64 wnd_end; 123568 long unsigned int timer_ival; 123569 u32 token; 123570 int rmem_pending; 123571 int rmem_released; 123572 long unsigned int flags; 123573 bool can_ack; 123574 bool fully_established; 123575 bool rcv_data_fin; 123576 bool snd_data_fin_enable; 123577 bool rcv_fastclose; 123578 bool use_64bit_ack; 123579 spinlock_t join_list_lock; 123580 struct sock *ack_hint; 123581 struct work_struct work; 123582 struct sk_buff *ooo_last_skb; 123583 struct rb_root out_of_order_queue; 123584 struct sk_buff_head receive_queue; 123585 struct sk_buff_head skb_tx_cache; 123586 int tx_pending_data; 123587 int size_goal_cache; 123588 struct list_head conn_list; 123589 struct list_head rtx_queue; 123590 struct mptcp_data_frag *first_pending; 123591 struct list_head join_list; 123592 struct socket *subflow; 123593 struct sock *first; 123594 struct mptcp_pm_data pm; 123595 struct { 123596 u32 space; 123597 u32 copied; 123598 u64 time; 123599 u64 rtt_us; 123600 } rcvq_space; 123601 }; 123602 123603 struct mptcp_subflow_request_sock { 123604 struct tcp_request_sock sk; 123605 u16 mp_capable: 1; 123606 u16 mp_join: 1; 123607 u16 backup: 1; 123608 u8 local_id; 123609 u8 remote_id; 123610 u64 local_key; 123611 u64 idsn; 123612 u32 token; 123613 u32 ssn_offset; 123614 u64 thmac; 123615 u32 local_nonce; 123616 u32 remote_nonce; 123617 struct mptcp_sock *msk; 123618 struct hlist_nulls_node token_node; 123619 }; 123620 123621 enum mptcp_data_avail { 123622 MPTCP_SUBFLOW_NODATA = 0, 123623 MPTCP_SUBFLOW_DATA_AVAIL = 1, 123624 MPTCP_SUBFLOW_OOO_DATA = 2, 123625 }; 123626 123627 struct mptcp_subflow_context { 123628 struct list_head node; 123629 u64 local_key; 123630 u64 remote_key; 123631 u64 idsn; 123632 u64 map_seq; 123633 u32 snd_isn; 123634 u32 token; 123635 u32 rel_write_seq; 123636 u32 map_subflow_seq; 123637 u32 ssn_offset; 123638 u32 map_data_len; 123639 u32 request_mptcp: 1; 123640 u32 request_join: 1; 123641 u32 request_bkup: 1; 123642 u32 mp_capable: 1; 123643 u32 mp_join: 1; 123644 u32 fully_established: 1; 123645 u32 pm_notified: 1; 123646 u32 conn_finished: 1; 123647 u32 map_valid: 1; 123648 u32 mpc_map: 1; 123649 u32 backup: 1; 123650 u32 rx_eof: 1; 123651 u32 can_ack: 1; 123652 u32 disposable: 1; 123653 enum mptcp_data_avail data_avail; 123654 u32 remote_nonce; 123655 u64 thmac; 123656 u32 local_nonce; 123657 u32 remote_token; 123658 u8 hmac[20]; 123659 u8 local_id; 123660 u8 remote_id; 123661 struct sock *tcp_sock; 123662 struct sock *conn; 123663 const struct inet_connection_sock_af_ops *icsk_af_ops; 123664 void (*tcp_data_ready)(struct sock *); 123665 void (*tcp_state_change)(struct sock *); 123666 void (*tcp_write_space)(struct sock *); 123667 void (*tcp_error_report)(struct sock *); 123668 struct callback_head rcu; 123669 }; 123670 123671 enum linux_mptcp_mib_field { 123672 MPTCP_MIB_NUM = 0, 123673 MPTCP_MIB_MPCAPABLEPASSIVE = 1, 123674 MPTCP_MIB_MPCAPABLEPASSIVEACK = 2, 123675 MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK = 3, 123676 MPTCP_MIB_MPCAPABLEACTIVEFALLBACK = 4, 123677 MPTCP_MIB_RETRANSSEGS = 5, 123678 MPTCP_MIB_JOINNOTOKEN = 6, 123679 MPTCP_MIB_JOINSYNRX = 7, 123680 MPTCP_MIB_JOINSYNACKRX = 8, 123681 MPTCP_MIB_JOINSYNACKMAC = 9, 123682 MPTCP_MIB_JOINACKRX = 10, 123683 MPTCP_MIB_JOINACKMAC = 11, 123684 MPTCP_MIB_DSSNOMATCH = 12, 123685 MPTCP_MIB_INFINITEMAPRX = 13, 123686 MPTCP_MIB_OFOQUEUETAIL = 14, 123687 MPTCP_MIB_OFOQUEUE = 15, 123688 MPTCP_MIB_OFOMERGE = 16, 123689 MPTCP_MIB_NODSSWINDOW = 17, 123690 MPTCP_MIB_DUPDATA = 18, 123691 MPTCP_MIB_ADDADDR = 19, 123692 MPTCP_MIB_ECHOADD = 20, 123693 MPTCP_MIB_RMADDR = 21, 123694 MPTCP_MIB_RMSUBFLOW = 22, 123695 __MPTCP_MIB_MAX = 23, 123696 }; 123697 123698 struct mptcp_skb_cb { 123699 u64 map_seq; 123700 u64 end_seq; 123701 u32 offset; 123702 }; 123703 123704 struct mptcp_sendmsg_info { 123705 int mss_now; 123706 int size_goal; 123707 u16 limit; 123708 u16 sent; 123709 unsigned int flags; 123710 }; 123711 123712 struct subflow_send_info { 123713 struct sock *ssk; 123714 u64 ratio; 123715 }; 123716 123717 enum mapping_status { 123718 MAPPING_OK = 0, 123719 MAPPING_INVALID = 1, 123720 MAPPING_EMPTY = 2, 123721 MAPPING_DATA_FIN = 3, 123722 MAPPING_DUMMY = 4, 123723 }; 123724 123725 enum mptcp_addr_signal_status { 123726 MPTCP_ADD_ADDR_SIGNAL = 0, 123727 MPTCP_ADD_ADDR_ECHO = 1, 123728 MPTCP_ADD_ADDR_IPV6 = 2, 123729 MPTCP_ADD_ADDR_PORT = 3, 123730 MPTCP_RM_ADDR_SIGNAL = 4, 123731 }; 123732 123733 struct mptcp_pm_add_entry; 123734 123735 struct token_bucket { 123736 spinlock_t lock; 123737 int chain_len; 123738 struct hlist_nulls_head req_chain; 123739 struct hlist_nulls_head msk_chain; 123740 }; 123741 123742 struct mptcp_pernet { 123743 struct ctl_table_header *ctl_table_hdr; 123744 int mptcp_enabled; 123745 unsigned int add_addr_timeout; 123746 }; 123747 123748 enum { 123749 INET_ULP_INFO_UNSPEC = 0, 123750 INET_ULP_INFO_NAME = 1, 123751 INET_ULP_INFO_TLS = 2, 123752 INET_ULP_INFO_MPTCP = 3, 123753 __INET_ULP_INFO_MAX = 4, 123754 }; 123755 123756 enum { 123757 MPTCP_SUBFLOW_ATTR_UNSPEC = 0, 123758 MPTCP_SUBFLOW_ATTR_TOKEN_REM = 1, 123759 MPTCP_SUBFLOW_ATTR_TOKEN_LOC = 2, 123760 MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ = 3, 123761 MPTCP_SUBFLOW_ATTR_MAP_SEQ = 4, 123762 MPTCP_SUBFLOW_ATTR_MAP_SFSEQ = 5, 123763 MPTCP_SUBFLOW_ATTR_SSN_OFFSET = 6, 123764 MPTCP_SUBFLOW_ATTR_MAP_DATALEN = 7, 123765 MPTCP_SUBFLOW_ATTR_FLAGS = 8, 123766 MPTCP_SUBFLOW_ATTR_ID_REM = 9, 123767 MPTCP_SUBFLOW_ATTR_ID_LOC = 10, 123768 MPTCP_SUBFLOW_ATTR_PAD = 11, 123769 __MPTCP_SUBFLOW_ATTR_MAX = 12, 123770 }; 123771 123772 enum { 123773 MPTCP_PM_ATTR_UNSPEC = 0, 123774 MPTCP_PM_ATTR_ADDR = 1, 123775 MPTCP_PM_ATTR_RCV_ADD_ADDRS = 2, 123776 MPTCP_PM_ATTR_SUBFLOWS = 3, 123777 __MPTCP_PM_ATTR_MAX = 4, 123778 }; 123779 123780 enum { 123781 MPTCP_PM_ADDR_ATTR_UNSPEC = 0, 123782 MPTCP_PM_ADDR_ATTR_FAMILY = 1, 123783 MPTCP_PM_ADDR_ATTR_ID = 2, 123784 MPTCP_PM_ADDR_ATTR_ADDR4 = 3, 123785 MPTCP_PM_ADDR_ATTR_ADDR6 = 4, 123786 MPTCP_PM_ADDR_ATTR_PORT = 5, 123787 MPTCP_PM_ADDR_ATTR_FLAGS = 6, 123788 MPTCP_PM_ADDR_ATTR_IF_IDX = 7, 123789 __MPTCP_PM_ADDR_ATTR_MAX = 8, 123790 }; 123791 123792 enum { 123793 MPTCP_PM_CMD_UNSPEC = 0, 123794 MPTCP_PM_CMD_ADD_ADDR = 1, 123795 MPTCP_PM_CMD_DEL_ADDR = 2, 123796 MPTCP_PM_CMD_GET_ADDR = 3, 123797 MPTCP_PM_CMD_FLUSH_ADDRS = 4, 123798 MPTCP_PM_CMD_SET_LIMITS = 5, 123799 MPTCP_PM_CMD_GET_LIMITS = 6, 123800 __MPTCP_PM_CMD_AFTER_LAST = 7, 123801 }; 123802 123803 struct mptcp_pm_addr_entry { 123804 struct list_head list; 123805 struct mptcp_addr_info addr; 123806 struct callback_head rcu; 123807 }; 123808 123809 struct mptcp_pm_add_entry___2 { 123810 struct list_head list; 123811 struct mptcp_addr_info addr; 123812 struct timer_list add_timer; 123813 struct mptcp_sock *sock; 123814 u8 retrans_times; 123815 }; 123816 123817 struct pm_nl_pernet { 123818 spinlock_t lock; 123819 struct list_head local_addr_list; 123820 unsigned int addrs; 123821 unsigned int add_addr_signal_max; 123822 unsigned int add_addr_accept_max; 123823 unsigned int local_addr_max; 123824 unsigned int subflows_max; 123825 unsigned int next_id; 123826 }; 123827 123828 struct join_entry { 123829 u32 token; 123830 u32 remote_nonce; 123831 u32 local_nonce; 123832 u8 join_id; 123833 u8 local_id; 123834 u8 backup; 123835 u8 valid; 123836 }; 123837 123838 struct pcibios_fwaddrmap { 123839 struct list_head list; 123840 struct pci_dev *dev; 123841 resource_size_t fw_addr[17]; 123842 }; 123843 123844 struct pci_check_idx_range { 123845 int start; 123846 int end; 123847 }; 123848 123849 struct pci_raw_ops { 123850 int (*read)(unsigned int, unsigned int, unsigned int, int, int, u32 *); 123851 int (*write)(unsigned int, unsigned int, unsigned int, int, int, u32); 123852 }; 123853 123854 struct acpi_table_mcfg { 123855 struct acpi_table_header header; 123856 u8 reserved[8]; 123857 }; 123858 123859 struct acpi_mcfg_allocation { 123860 u64 address; 123861 u16 pci_segment; 123862 u8 start_bus_number; 123863 u8 end_bus_number; 123864 u32 reserved; 123865 }; 123866 123867 struct pci_mmcfg_hostbridge_probe { 123868 u32 bus; 123869 u32 devfn; 123870 u32 vendor; 123871 u32 device; 123872 const char * (*probe)(); 123873 }; 123874 123875 typedef bool (*check_reserved_t)(u64, u64, enum e820_type); 123876 123877 struct physdev_restore_msi { 123878 uint8_t bus; 123879 uint8_t devfn; 123880 }; 123881 123882 struct physdev_setup_gsi { 123883 int gsi; 123884 uint8_t triggering; 123885 uint8_t polarity; 123886 }; 123887 123888 struct xen_pci_frontend_ops { 123889 int (*enable_msi)(struct pci_dev *, int *); 123890 void (*disable_msi)(struct pci_dev *); 123891 int (*enable_msix)(struct pci_dev *, int *, int); 123892 void (*disable_msix)(struct pci_dev *); 123893 }; 123894 123895 struct xen_msi_ops { 123896 int (*setup_msi_irqs)(struct pci_dev *, int, int); 123897 void (*teardown_msi_irqs)(struct pci_dev *); 123898 }; 123899 123900 struct xen_device_domain_owner { 123901 domid_t domain; 123902 struct pci_dev *dev; 123903 struct list_head list; 123904 }; 123905 123906 struct pci_root_info { 123907 struct acpi_pci_root_info common; 123908 struct pci_sysdata sd; 123909 bool mcfg_added; 123910 u8 start_bus; 123911 u8 end_bus; 123912 }; 123913 123914 struct irq_info___3 { 123915 u8 bus; 123916 u8 devfn; 123917 struct { 123918 u8 link; 123919 u16 bitmap; 123920 } __attribute__((packed)) irq[4]; 123921 u8 slot; 123922 u8 rfu; 123923 }; 123924 123925 struct irq_routing_table { 123926 u32 signature; 123927 u16 version; 123928 u16 size; 123929 u8 rtr_bus; 123930 u8 rtr_devfn; 123931 u16 exclusive_irqs; 123932 u16 rtr_vendor; 123933 u16 rtr_device; 123934 u32 miniport_data; 123935 u8 rfu[11]; 123936 u8 checksum; 123937 struct irq_info___3 slots[0]; 123938 }; 123939 123940 struct irq_router { 123941 char *name; 123942 u16 vendor; 123943 u16 device; 123944 int (*get)(struct pci_dev *, struct pci_dev *, int); 123945 int (*set)(struct pci_dev *, struct pci_dev *, int, int); 123946 }; 123947 123948 struct irq_router_handler { 123949 u16 vendor; 123950 int (*probe)(struct irq_router *, struct pci_dev *, u16); 123951 }; 123952 123953 struct pci_setup_rom { 123954 struct setup_data data; 123955 uint16_t vendor; 123956 uint16_t devid; 123957 uint64_t pcilen; 123958 long unsigned int segment; 123959 long unsigned int bus; 123960 long unsigned int device; 123961 long unsigned int function; 123962 uint8_t romdata[0]; 123963 }; 123964 123965 enum pci_bf_sort_state { 123966 pci_bf_sort_default = 0, 123967 pci_force_nobf = 1, 123968 pci_force_bf = 2, 123969 pci_dmi_bf = 3, 123970 }; 123971 123972 struct pci_root_res { 123973 struct list_head list; 123974 struct resource res; 123975 }; 123976 123977 struct pci_root_info___2 { 123978 struct list_head list; 123979 char name[12]; 123980 struct list_head resources; 123981 struct resource busn; 123982 int node; 123983 int link; 123984 }; 123985 123986 struct amd_hostbridge { 123987 u32 bus; 123988 u32 slot; 123989 u32 device; 123990 }; 123991 123992 struct saved_msr { 123993 bool valid; 123994 struct msr_info info; 123995 }; 123996 123997 struct saved_msrs { 123998 unsigned int num; 123999 struct saved_msr *array; 124000 }; 124001 124002 struct saved_context { 124003 struct pt_regs regs; 124004 u16 ds; 124005 u16 es; 124006 u16 fs; 124007 u16 gs; 124008 long unsigned int kernelmode_gs_base; 124009 long unsigned int usermode_gs_base; 124010 long unsigned int fs_base; 124011 long unsigned int cr0; 124012 long unsigned int cr2; 124013 long unsigned int cr3; 124014 long unsigned int cr4; 124015 u64 misc_enable; 124016 bool misc_enable_saved; 124017 struct saved_msrs saved_msrs; 124018 long unsigned int efer; 124019 u16 gdt_pad; 124020 struct desc_ptr gdt_desc; 124021 u16 idt_pad; 124022 struct desc_ptr idt; 124023 u16 ldt; 124024 u16 tss; 124025 long unsigned int tr; 124026 long unsigned int safety; 124027 long unsigned int return_address; 124028 } __attribute__((packed)); 124029 124030 typedef int (*pm_cpu_match_t)(const struct x86_cpu_id *); 124031 124032 struct restore_data_record { 124033 long unsigned int jump_address; 124034 long unsigned int jump_address_phys; 124035 long unsigned int cr3; 124036 long unsigned int magic; 124037 u8 e820_digest[16]; 124038 }; 124039 124040 #ifndef BPF_NO_PRESERVE_ACCESS_INDEX 124041 #pragma clang attribute pop 124042 #endif 124043 124044 #endif /* __VMLINUX_H__ */