bindgen_parameters 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # SPDX-License-Identifier: GPL-2.0
  2. # We want to map these types to `isize`/`usize` manually, instead of
  3. # define them as `int`/`long` depending on platform bitwidth.
  4. --blocklist-type __kernel_s?size_t
  5. --blocklist-type __kernel_ptrdiff_t
  6. --opaque-type xregs_state
  7. --opaque-type desc_struct
  8. --opaque-type arch_lbr_state
  9. --opaque-type local_apic
  10. # Packed type cannot transitively contain a `#[repr(align)]` type.
  11. --opaque-type alt_instr
  12. --opaque-type x86_msi_data
  13. --opaque-type x86_msi_addr_lo
  14. # `try` is a reserved keyword since Rust 2018; solved in `bindgen` v0.59.2,
  15. # commit 2aed6b021680 ("context: Escape the try keyword properly").
  16. --opaque-type kunit_try_catch
  17. # If SMP is disabled, `arch_spinlock_t` is defined as a ZST which triggers a Rust
  18. # warning. We don't need to peek into it anyway.
  19. --opaque-type spinlock
  20. # `seccomp`'s comment gets understood as a doctest
  21. --no-doc-comments
  22. # These functions use the `__preserve_most` calling convention, which neither bindgen
  23. # nor Rust currently understand, and which Clang currently declares to be unstable.
  24. --blocklist-function __list_.*_report
  25. # These constants are sometimes not recognized by bindgen depending on config.
  26. # We use const helpers to aid bindgen, to avoid conflicts when constants are
  27. # recognized, block generation of the non-helper constants.
  28. --blocklist-item ARCH_SLAB_MINALIGN
  29. --blocklist-item ARCH_KMALLOC_MINALIGN
  30. --blocklist-item VM_MERGEABLE
  31. --blocklist-item VM_READ
  32. --blocklist-item VM_WRITE
  33. --blocklist-item VM_EXEC
  34. --blocklist-item VM_SHARED
  35. --blocklist-item VM_MAYREAD
  36. --blocklist-item VM_MAYWRITE
  37. --blocklist-item VM_MAYEXEC
  38. --blocklist-item VM_MAYEXEC
  39. --blocklist-item VM_PFNMAP
  40. --blocklist-item VM_IO
  41. --blocklist-item VM_DONTCOPY
  42. --blocklist-item VM_DONTEXPAND
  43. --blocklist-item VM_LOCKONFAULT
  44. --blocklist-item VM_ACCOUNT
  45. --blocklist-item VM_NORESERVE
  46. --blocklist-item VM_HUGETLB
  47. --blocklist-item VM_SYNC
  48. --blocklist-item VM_ARCH_1
  49. --blocklist-item VM_WIPEONFORK
  50. --blocklist-item VM_DONTDUMP
  51. --blocklist-item VM_SOFTDIRTY
  52. --blocklist-item VM_MIXEDMAP
  53. --blocklist-item VM_HUGEPAGE
  54. --blocklist-item VM_NOHUGEPAGE
  55. # Structs should implement `Zeroable` when all of their fields do.
  56. --with-derive-custom-struct .*=MaybeZeroable
  57. --with-derive-custom-union .*=MaybeZeroable