Guest User

Untitled

a guest
Sep 20th, 2023
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.03 KB | None | 0 0
  1. ***
  2. *** Rust compiler '/home/axboe/.cargo/bin/rustc' is too new. This may or may not work.
  3. *** Your version: 1.72.1
  4. *** Expected version: 1.68.2
  5. ***
  6. ***
  7. *** Rust bindings generator '/usr/bin/bindgen' is too new. This may or may not work.
  8. *** Your version: 0.60.1
  9. *** Expected version: 0.56.0
  10. ***
  11. error[E0308]: mismatched types
  12. --> /home/axboe/git/asahi-linux/rust/kernel/allocator.rs:24:25
  13. |
  14. 24 | if layout.align() > bindings::BINDINGS_ARCH_SLAB_MINALIGN {
  15. | -------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u64`
  16. | |
  17. | expected because this is `usize`
  18. |
  19. help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
  20. |
  21. 24 | if layout.align() > bindings::BINDINGS_ARCH_SLAB_MINALIGN.try_into().unwrap() {
  22. | ++++++++++++++++++++
  23.  
  24. error[E0308]: mismatched types
  25. --> /home/axboe/git/asahi-linux/rust/kernel/allocator.rs:39:66
  26. |
  27. 39 | ...fe { bindings::krealloc(ptr as *const core::ffi::c_void, size, flags) a...
  28. | ------------------ ^^^^ expected `u64`, found `usize`
  29. | |
  30. | arguments to this function are incorrect
  31. |
  32. note: function defined here
  33. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
  34. |
  35. 25524 | pub fn krealloc(
  36. | ^^^^^^^^
  37. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  38. |
  39. 39 | unsafe { bindings::krealloc(ptr as *const core::ffi::c_void, size.try_into().unwrap(), flags) as *mut u8 }
  40. | ++++++++++++++++++++
  41.  
  42. error[E0308]: mismatched types
  43. --> /home/axboe/git/asahi-linux/rust/kernel/allocator.rs:46:50
  44. |
  45. 46 | ... unsafe { bindings::krealloc(ptr::null(), layout.size(), bindings::GFP...
  46. | ------------------ ^^^^^^^^^^^^^ expected `u64`, found `usize`
  47. | |
  48. | arguments to this function are incorrect
  49. |
  50. note: function defined here
  51. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
  52. |
  53. 25524 | pub fn krealloc(
  54. | ^^^^^^^^
  55. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  56. |
  57. 46 | unsafe { bindings::krealloc(ptr::null(), layout.size().try_into().unwrap(), bindings::GFP_KERNEL) as *mut u8 }
  58. | ++++++++++++++++++++
  59.  
  60. error[E0308]: mismatched types
  61. --> /home/axboe/git/asahi-linux/rust/kernel/dma_fence.rs:460:17
  62. |
  63. 458 | bindings::krealloc(
  64. | ------------------ arguments to this function are incorrect
  65. 459 | core::ptr::null_mut(),
  66. 460 | FenceObject::<T>::SIZE,
  67. | ^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
  68. |
  69. note: function defined here
  70. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
  71. |
  72. 25524 | pub fn krealloc(
  73. | ^^^^^^^^
  74. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  75. |
  76. 460 | FenceObject::<T>::SIZE.try_into().unwrap(),
  77. | ++++++++++++++++++++
  78.  
  79. error[E0308]: mismatched types
  80. --> /home/axboe/git/asahi-linux/rust/kernel/drm/drv.rs:221:28
  81. |
  82. 221 | gem_create_object: T::Object::ALLOC_OPS.gem_create_object,
  83. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
  84. |
  85. = note: expected enum `Option<unsafe extern "C" fn(_, u64) -> _>`
  86. found enum `Option<unsafe extern "C" fn(_, usize) -> _>`
  87.  
  88. error[E0308]: mismatched types
  89. --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/shmem.rs:87:47
  90. |
  91. 87 | bindings::krealloc(core::ptr::null(), Object::<T>::SIZE, bindings:...
  92. | ------------------ ^^^^^^^^^^^^^^^^^ expected `u64`, found `usize`
  93. | |
  94. | arguments to this function are incorrect
  95. |
  96. note: function defined here
  97. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:25524:12
  98. |
  99. 25524 | pub fn krealloc(
  100. | ^^^^^^^^
  101. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  102. |
  103. 87 | bindings::krealloc(core::ptr::null(), Object::<T>::SIZE.try_into().unwrap(), bindings::GFP_KERNEL)
  104. | ++++++++++++++++++++
  105.  
  106. error[E0308]: mismatched types
  107. --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/shmem.rs:165:72
  108. |
  109. 165 | ...unsafe { bindings::drm_gem_shmem_create(dev.raw_mut(), size) };
  110. | ------------------------------ ^^^^ expected `u64`, found `usize`
  111. | |
  112. | arguments to this function are incorrect
  113. |
  114. note: function defined here
  115. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:43789:12
  116. |
  117. 43789 | pub fn drm_gem_shmem_create(dev: *mut drm_device, size: size_t) -> *mu...
  118. | ^^^^^^^^^^^^^^^^^^^^
  119. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  120. |
  121. 165 | let p = unsafe { bindings::drm_gem_shmem_create(dev.raw_mut(), size.try_into().unwrap()) };
  122. | ++++++++++++++++++++
  123.  
  124. error[E0308]: mismatched types
  125. --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/mod.rs:140:9
  126. |
  127. 139 | fn size(&self) -> usize {
  128. | ----- expected `usize` because of return type
  129. 140 | self.gem_obj().size
  130. | ^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u64`
  131. |
  132. help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
  133. |
  134. 140 | self.gem_obj().size.try_into().unwrap()
  135. | ++++++++++++++++++++
  136.  
  137. error[E0308]: mismatched types
  138. --> /home/axboe/git/asahi-linux/rust/kernel/drm/gem/mod.rs:259:90
  139. |
  140. 259 | ... bindings::drm_gem_object_init(dev.raw_mut(), &obj.obj as *const _ as *mut _, si...
  141. | ----------------------------- arguments to this function are incorrect ^^^^ expected `u64`, found `usize`
  142. |
  143. note: function defined here
  144. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_generated.rs:43499:12
  145. |
  146. 43499 | pub fn drm_gem_object_init(
  147. | ^^^^^^^^^^^^^^^^^^^
  148. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  149. |
  150. 259 | bindings::drm_gem_object_init(dev.raw_mut(), &obj.obj as *const _ as *mut _, size.try_into().unwrap())
  151. | ++++++++++++++++++++
  152.  
  153. error[E0308]: arguments to this function are incorrect
  154. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:158:13
  155. |
  156. 158 | (*self.inner_mut().ops).map_pages.unwrap()(
  157. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  158. ...
  159. 162 | pgsize,
  160. | ------ expected `u64`, found `usize`
  161. 163 | pgcount,
  162. | ------- expected `u64`, found `usize`
  163. |
  164. note: expected `*mut u64`, found `&mut usize`
  165. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:166:17
  166. |
  167. 166 | &mut mapped,
  168. | ^^^^^^^^^^^
  169. = note: expected raw pointer `*mut u64`
  170. found mutable reference `&mut usize`
  171. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  172. |
  173. 162 | pgsize.try_into().unwrap(),
  174. | ++++++++++++++++++++
  175. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  176. |
  177. 163 | pgcount.try_into().unwrap(),
  178. | ++++++++++++++++++++
  179.  
  180. error[E0308]: arguments to this function are incorrect
  181. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:182:13
  182. |
  183. 182 | (*self.inner_mut().ops).unmap_pages.unwrap()(
  184. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  185. ...
  186. 185 | pgsize,
  187. | ------ expected `u64`, found `usize`
  188. 186 | pgcount,
  189. | ------- expected `u64`, found `usize`
  190. |
  191. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  192. |
  193. 185 | pgsize.try_into().unwrap(),
  194. | ++++++++++++++++++++
  195. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  196. |
  197. 186 | pgcount.try_into().unwrap(),
  198. | ++++++++++++++++++++
  199.  
  200. error[E0308]: mismatched types
  201. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:182:13
  202. |
  203. 180 | ) -> usize {
  204. | ----- expected `usize` because of return type
  205. 181 | unsafe {
  206. 182 | / (*self.inner_mut().ops).unmap_pages.unwrap()(
  207. 183 | | self.inner_mut().ops,
  208. 184 | | iova as u64,
  209. 185 | | pgsize,
  210. 186 | | pgcount,
  211. 187 | | core::ptr::null_mut(),
  212. 188 | | )
  213. | |_____________^ expected `usize`, found `u64`
  214. |
  215. help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
  216. |
  217. 188 | ).try_into().unwrap()
  218. | ++++++++++++++++++++
  219.  
  220. error[E0308]: mismatched types
  221. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  222. |
  223. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  224. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  225. | |
  226. | arguments to this enum variant are incorrect
  227. ...
  228. 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
  229. | -------------------------------------------------------------------- in this macro invocation
  230. |
  231. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  232. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  233. = note: when the arguments and return types match, functions can be coerced to function pointers
  234. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  235. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  236. |
  237. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  238. | ^^^^^----------------------------^
  239. | |
  240. | this argument influences the type of `Some`
  241. ...
  242. 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
  243. | -------------------------------------------------------------------- in this macro invocation
  244. note: tuple variant defined here
  245. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  246. |
  247. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  248. | ^^^^
  249. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  250.  
  251. error[E0308]: mismatched types
  252. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  253. |
  254. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  255. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  256. | |
  257. | arguments to this enum variant are incorrect
  258. ...
  259. 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
  260. | -------------------------------------------------------------------- in this macro invocation
  261. |
  262. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  263. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  264. = note: when the arguments and return types match, functions can be coerced to function pointers
  265. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  266. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  267. |
  268. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  269. | ^^^^^--------------------------^
  270. | |
  271. | this argument influences the type of `Some`
  272. ...
  273. 344 | iopt_type!(ARM32LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_32_LPAE_S1);
  274. | -------------------------------------------------------------------- in this macro invocation
  275. note: tuple variant defined here
  276. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  277. |
  278. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  279. | ^^^^
  280. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  281.  
  282. error[E0308]: mismatched types
  283. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  284. |
  285. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  286. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  287. | |
  288. | arguments to this enum variant are incorrect
  289. ...
  290. 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
  291. | -------------------------------------------------------------------- in this macro invocation
  292. |
  293. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  294. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  295. = note: when the arguments and return types match, functions can be coerced to function pointers
  296. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  297. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  298. |
  299. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  300. | ^^^^^----------------------------^
  301. | |
  302. | this argument influences the type of `Some`
  303. ...
  304. 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
  305. | -------------------------------------------------------------------- in this macro invocation
  306. note: tuple variant defined here
  307. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  308. |
  309. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  310. | ^^^^
  311. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  312.  
  313. error[E0308]: mismatched types
  314. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  315. |
  316. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  317. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  318. | |
  319. | arguments to this enum variant are incorrect
  320. ...
  321. 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
  322. | -------------------------------------------------------------------- in this macro invocation
  323. |
  324. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  325. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  326. = note: when the arguments and return types match, functions can be coerced to function pointers
  327. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  328. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  329. |
  330. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  331. | ^^^^^--------------------------^
  332. | |
  333. | this argument influences the type of `Some`
  334. ...
  335. 345 | iopt_type!(ARM32LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_32_LPAE_S2);
  336. | -------------------------------------------------------------------- in this macro invocation
  337. note: tuple variant defined here
  338. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  339. |
  340. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  341. | ^^^^
  342. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  343.  
  344. error[E0308]: mismatched types
  345. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  346. |
  347. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  348. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  349. | |
  350. | arguments to this enum variant are incorrect
  351. ...
  352. 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
  353. | -------------------------------------------------------------------- in this macro invocation
  354. |
  355. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  356. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  357. = note: when the arguments and return types match, functions can be coerced to function pointers
  358. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  359. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  360. |
  361. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  362. | ^^^^^----------------------------^
  363. | |
  364. | this argument influences the type of `Some`
  365. ...
  366. 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
  367. | -------------------------------------------------------------------- in this macro invocation
  368. note: tuple variant defined here
  369. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  370. |
  371. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  372. | ^^^^
  373. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  374.  
  375. error[E0308]: mismatched types
  376. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  377. |
  378. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  379. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  380. | |
  381. | arguments to this enum variant are incorrect
  382. ...
  383. 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
  384. | -------------------------------------------------------------------- in this macro invocation
  385. |
  386. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  387. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  388. = note: when the arguments and return types match, functions can be coerced to function pointers
  389. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  390. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  391. |
  392. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  393. | ^^^^^--------------------------^
  394. | |
  395. | this argument influences the type of `Some`
  396. ...
  397. 346 | iopt_type!(ARM64LPAES1, ARMLPAES1Cfg, io_pgtable_fmt_ARM_64_LPAE_S1);
  398. | -------------------------------------------------------------------- in this macro invocation
  399. note: tuple variant defined here
  400. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  401. |
  402. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  403. | ^^^^
  404. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  405.  
  406. error[E0308]: mismatched types
  407. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  408. |
  409. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  410. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  411. | |
  412. | arguments to this enum variant are incorrect
  413. ...
  414. 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
  415. | -------------------------------------------------------------------- in this macro invocation
  416. |
  417. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  418. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  419. = note: when the arguments and return types match, functions can be coerced to function pointers
  420. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  421. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  422. |
  423. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  424. | ^^^^^----------------------------^
  425. | |
  426. | this argument influences the type of `Some`
  427. ...
  428. 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
  429. | -------------------------------------------------------------------- in this macro invocation
  430. note: tuple variant defined here
  431. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  432. |
  433. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  434. | ^^^^
  435. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  436.  
  437. error[E0308]: mismatched types
  438. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  439. |
  440. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  441. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  442. | |
  443. | arguments to this enum variant are incorrect
  444. ...
  445. 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
  446. | -------------------------------------------------------------------- in this macro invocation
  447. |
  448. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  449. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  450. = note: when the arguments and return types match, functions can be coerced to function pointers
  451. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  452. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  453. |
  454. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  455. | ^^^^^--------------------------^
  456. | |
  457. | this argument influences the type of `Some`
  458. ...
  459. 347 | iopt_type!(ARM64LPAES2, ARMLPAES2Cfg, io_pgtable_fmt_ARM_64_LPAE_S2);
  460. | -------------------------------------------------------------------- in this macro invocation
  461. note: tuple variant defined here
  462. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  463. |
  464. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  465. | ^^^^
  466. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  467.  
  468. error[E0308]: mismatched types
  469. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  470. |
  471. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  472. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  473. | |
  474. | arguments to this enum variant are incorrect
  475. ...
  476. 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
  477. | ----------------------------------------------------- in this macro invocation
  478. |
  479. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  480. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  481. = note: when the arguments and return types match, functions can be coerced to function pointers
  482. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  483. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  484. |
  485. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  486. | ^^^^^----------------------------^
  487. | |
  488. | this argument influences the type of `Some`
  489. ...
  490. 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
  491. | ----------------------------------------------------- in this macro invocation
  492. note: tuple variant defined here
  493. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  494. |
  495. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  496. | ^^^^
  497. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  498.  
  499. error[E0308]: mismatched types
  500. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  501. |
  502. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  503. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  504. | |
  505. | arguments to this enum variant are incorrect
  506. ...
  507. 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
  508. | ----------------------------------------------------- in this macro invocation
  509. |
  510. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  511. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  512. = note: when the arguments and return types match, functions can be coerced to function pointers
  513. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  514. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  515. |
  516. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  517. | ^^^^^--------------------------^
  518. | |
  519. | this argument influences the type of `Some`
  520. ...
  521. 348 | iopt_type!(ARMv7S, ARMv7SCfg, io_pgtable_fmt_ARM_V7S);
  522. | ----------------------------------------------------- in this macro invocation
  523. note: tuple variant defined here
  524. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  525. |
  526. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  527. | ^^^^
  528. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  529.  
  530. error[E0308]: mismatched types
  531. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  532. |
  533. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  534. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  535. | |
  536. | arguments to this enum variant are incorrect
  537. ...
  538. 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
  539. | --------------------------------------------------------------------- in this macro invocation
  540. |
  541. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  542. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  543. = note: when the arguments and return types match, functions can be coerced to function pointers
  544. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  545. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  546. |
  547. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  548. | ^^^^^----------------------------^
  549. | |
  550. | this argument influences the type of `Some`
  551. ...
  552. 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
  553. | --------------------------------------------------------------------- in this macro invocation
  554. note: tuple variant defined here
  555. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  556. |
  557. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  558. | ^^^^
  559. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  560.  
  561. error[E0308]: mismatched types
  562. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  563. |
  564. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  565. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  566. | |
  567. | arguments to this enum variant are incorrect
  568. ...
  569. 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
  570. | --------------------------------------------------------------------- in this macro invocation
  571. |
  572. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  573. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  574. = note: when the arguments and return types match, functions can be coerced to function pointers
  575. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  576. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  577. |
  578. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  579. | ^^^^^--------------------------^
  580. | |
  581. | this argument influences the type of `Some`
  582. ...
  583. 349 | iopt_type!(ARMMaliLPAE, ARMMaliLPAECfg, io_pgtable_fmt_ARM_MALI_LPAE);
  584. | --------------------------------------------------------------------- in this macro invocation
  585. note: tuple variant defined here
  586. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  587. |
  588. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  589. | ^^^^
  590. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  591.  
  592. error[E0308]: mismatched types
  593. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  594. |
  595. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  596. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  597. | |
  598. | arguments to this enum variant are incorrect
  599. ...
  600. 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
  601. | ------------------------------------------------------- in this macro invocation
  602. |
  603. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  604. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  605. = note: when the arguments and return types match, functions can be coerced to function pointers
  606. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  607. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  608. |
  609. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  610. | ^^^^^----------------------------^
  611. | |
  612. | this argument influences the type of `Some`
  613. ...
  614. 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
  615. | ------------------------------------------------------- in this macro invocation
  616. note: tuple variant defined here
  617. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  618. |
  619. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  620. | ^^^^
  621. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  622.  
  623. error[E0308]: mismatched types
  624. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  625. |
  626. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  627. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  628. | |
  629. | arguments to this enum variant are incorrect
  630. ...
  631. 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
  632. | ------------------------------------------------------- in this macro invocation
  633. |
  634. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  635. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  636. = note: when the arguments and return types match, functions can be coerced to function pointers
  637. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  638. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  639. |
  640. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  641. | ^^^^^--------------------------^
  642. | |
  643. | this argument influences the type of `Some`
  644. ...
  645. 350 | iopt_type!(AMDIOMMUV1, (), io_pgtable_fmt_AMD_IOMMU_V1);
  646. | ------------------------------------------------------- in this macro invocation
  647. note: tuple variant defined here
  648. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  649. |
  650. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  651. | ^^^^
  652. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  653.  
  654. error[E0308]: mismatched types
  655. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  656. |
  657. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  658. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  659. | |
  660. | arguments to this enum variant are incorrect
  661. ...
  662. 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
  663. | -------------------------------------------------------------- in this macro invocation
  664. |
  665. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  666. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  667. = note: when the arguments and return types match, functions can be coerced to function pointers
  668. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  669. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  670. |
  671. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  672. | ^^^^^----------------------------^
  673. | |
  674. | this argument influences the type of `Some`
  675. ...
  676. 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
  677. | -------------------------------------------------------------- in this macro invocation
  678. note: tuple variant defined here
  679. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  680. |
  681. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  682. | ^^^^
  683. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  684.  
  685. error[E0308]: mismatched types
  686. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  687. |
  688. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  689. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  690. | |
  691. | arguments to this enum variant are incorrect
  692. ...
  693. 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
  694. | -------------------------------------------------------------- in this macro invocation
  695. |
  696. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  697. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  698. = note: when the arguments and return types match, functions can be coerced to function pointers
  699. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  700. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  701. |
  702. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  703. | ^^^^^--------------------------^
  704. | |
  705. | this argument influences the type of `Some`
  706. ...
  707. 351 | iopt_type!(AppleDART, AppleDARTCfg, io_pgtable_fmt_APPLE_DART);
  708. | -------------------------------------------------------------- in this macro invocation
  709. note: tuple variant defined here
  710. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  711. |
  712. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  713. | ^^^^
  714. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  715.  
  716. error[E0308]: mismatched types
  717. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  718. |
  719. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  720. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  721. | |
  722. | arguments to this enum variant are incorrect
  723. ...
  724. 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
  725. | ---------------------------------------------------------------- in this macro invocation
  726. |
  727. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  728. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  729. = note: when the arguments and return types match, functions can be coerced to function pointers
  730. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  731. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  732. |
  733. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  734. | ^^^^^----------------------------^
  735. | |
  736. | this argument influences the type of `Some`
  737. ...
  738. 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
  739. | ---------------------------------------------------------------- in this macro invocation
  740. note: tuple variant defined here
  741. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  742. |
  743. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  744. | ^^^^
  745. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  746.  
  747. error[E0308]: mismatched types
  748. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  749. |
  750. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  751. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  752. | |
  753. | arguments to this enum variant are incorrect
  754. ...
  755. 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
  756. | ---------------------------------------------------------------- in this macro invocation
  757. |
  758. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  759. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  760. = note: when the arguments and return types match, functions can be coerced to function pointers
  761. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  762. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  763. |
  764. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  765. | ^^^^^--------------------------^
  766. | |
  767. | this argument influences the type of `Some`
  768. ...
  769. 352 | iopt_type!(AppleDART2, AppleDARTCfg, io_pgtable_fmt_APPLE_DART2);
  770. | ---------------------------------------------------------------- in this macro invocation
  771. note: tuple variant defined here
  772. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  773. |
  774. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  775. | ^^^^
  776. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  777.  
  778. error[E0308]: mismatched types
  779. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:38
  780. |
  781. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  782. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  783. | |
  784. | arguments to this enum variant are incorrect
  785. ...
  786. 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
  787. | ----------------------------------------------------------- in this macro invocation
  788. |
  789. = note: expected fn pointer `unsafe extern "C" fn(_, u64, u64, _)`
  790. found fn item `unsafe extern "C" fn(_, usize, usize, _) {tlb_flush_walk_callback::<T>}`
  791. = note: when the arguments and return types match, functions can be coerced to function pointers
  792. help: the type constructed contains `unsafe extern "C" fn(u64, usize, usize, *mut c_void) {tlb_flush_walk_callback::<T>}` due to the type of the argument passed
  793. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:285:33
  794. |
  795. 285 | tlb_flush_walk: Some(tlb_flush_walk_callback::<T>),
  796. | ^^^^^----------------------------^
  797. | |
  798. | this argument influences the type of `Some`
  799. ...
  800. 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
  801. | ----------------------------------------------------------- in this macro invocation
  802. note: tuple variant defined here
  803. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  804. |
  805. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  806. | ^^^^
  807. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  808.  
  809. error[E0308]: mismatched types
  810. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:36
  811. |
  812. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  813. | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found fn item
  814. | |
  815. | arguments to this enum variant are incorrect
  816. ...
  817. 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
  818. | ----------------------------------------------------------- in this macro invocation
  819. |
  820. = note: expected fn pointer `unsafe extern "C" fn(_, _, u64, _)`
  821. found fn item `unsafe extern "C" fn(_, _, usize, _) {tlb_add_page_callback::<T>}`
  822. = note: when the arguments and return types match, functions can be coerced to function pointers
  823. help: the type constructed contains `unsafe extern "C" fn(*mut iommu_iotlb_gather, u64, usize, *mut c_void) {tlb_add_page_callback::<T>}` due to the type of the argument passed
  824. --> /home/axboe/git/asahi-linux/rust/kernel/io_pgtable.rs:286:31
  825. |
  826. 286 | tlb_add_page: Some(tlb_add_page_callback::<T>),
  827. | ^^^^^--------------------------^
  828. | |
  829. | this argument influences the type of `Some`
  830. ...
  831. 353 | iopt_type!(AppleUAT, AppleUATCfg, io_pgtable_fmt_APPLE_UAT);
  832. | ----------------------------------------------------------- in this macro invocation
  833. note: tuple variant defined here
  834. --> /home/axboe/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:571:5
  835. |
  836. 571 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
  837. | ^^^^
  838. = note: this error originates in the macro `iopt_type` (in Nightly builds, run with -Z macro-backtrace for more info)
  839.  
  840. error[E0308]: mismatched types
  841. --> /home/axboe/git/asahi-linux/rust/kernel/siphash.rs:37:77
  842. |
  843. 37 | ...safe { bindings::siphash(bytes.as_ptr() as *const _, bytes.len(), &key) };
  844. | ----------------- ^^^^^^^^^^^ expected `u64`, found `usize`
  845. | |
  846. | arguments to this function are incorrect
  847. |
  848. note: function defined here
  849. --> /home/axboe/git/asahi-linux/rust/bindings/bindings_helpers_generated.rs:77:12
  850. |
  851. 77 | pub fn siphash(
  852. | ^^^^^^^
  853. help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
  854. |
  855. 37 | self.state = unsafe { bindings::siphash(bytes.as_ptr() as *const _, bytes.len().try_into().unwrap(), &key) };
  856. | ++++++++++++++++++++
  857.  
  858. error[E0308]: mismatched types
  859. --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:128:17
  860. |
  861. 124 | T::shmem_map(
  862. | ------------ arguments to this function are incorrect
  863. ...
  864. 128 | bfr_mut.size,
  865. | ^^^^^^^^^^^^ expected `usize`, found `u64`
  866. |
  867. note: associated function defined here
  868. --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:73:8
  869. |
  870. 73 | fn shmem_map(
  871. | ^^^^^^^^^
  872. ...
  873. 76 | _size: usize,
  874. | ------------
  875. help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
  876. |
  877. 128 | bfr_mut.size.try_into().unwrap(),
  878. | ++++++++++++++++++++
  879.  
  880. error[E0308]: mismatched types
  881. --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:133:64
  882. |
  883. 133 | T::shmem_alloc(unsafe { T::Data::borrow(cookie) }, bfr_mut.size)?
  884. | -------------- ^^^^^^^^^^^^ expected `usize`, found `u64`
  885. | |
  886. | arguments to this function are incorrect
  887. |
  888. note: associated function defined here
  889. --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:65:8
  890. |
  891. 65 | fn shmem_alloc(
  892. | ^^^^^^^^^^^
  893. 66 | _data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
  894. 67 | _size: usize,
  895. | ------------
  896. help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
  897. |
  898. 133 | T::shmem_alloc(unsafe { T::Data::borrow(cookie) }, bfr_mut.size.try_into().unwrap())?
  899. | ++++++++++++++++++++
  900.  
  901. error[E0308]: mismatched types
  902. --> /home/axboe/git/asahi-linux/rust/kernel/soc/apple/rtkit.rs:139:26
  903. |
  904. 139 | if slice.len() < bfr_mut.size {
  905. | ----------- ^^^^^^^^^^^^ expected `usize`, found `u64`
  906. | |
  907. | expected because this is `usize`
  908. |
  909. help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
  910. |
  911. 139 | if slice.len() < bfr_mut.size.try_into().unwrap() {
  912. | ++++++++++++++++++++
  913.  
  914. error: aborting due to 36 previous errors
  915.  
  916. For more information about this error, try `rustc --explain E0308`.
  917. make[2]: *** [rust/Makefile:428: rust/kernel.o] Error 1
  918. make[1]: *** [/home/axboe/git/asahi-linux/Makefile:1293: prepare] Error 2
  919. make: *** [Makefile:234: __sub-make] Error 2
Advertisement
Add Comment
Please, Sign In to add comment