| 1 | |
| 2 |
|
| 3 | |
| 4 | |
| 5 | |
| 6 |
|
| 7 | use crate::{
|
| 8 | bindings,
|
| 9 | prelude::*, |
| 10 | };
|
| 11 |
|
| 12 | #[cfg(CONFIG_HAS_IOMEM)]
|
| 13 | pub mod mem;
|
| 14 | pub mod poll;
|
| 15 | pub mod register;
|
| 16 | pub mod resource;
|
| 17 |
|
| 18 | pub use crate::register;
|
| 19 | pub use resource::Resource;
|
| 20 |
|
| 21 | use register::LocatedRegister;
|
| 22 |
|
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | pub type PhysAddr = bindings::phys_addr_t;
|
| 28 |
|
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | pub type ResourceSize = bindings::resource_size_t;
|
| 34 |
|
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | pub struct MmioRaw<const SIZE: usize = 0> {
|
| 44 | addr: usize,
|
| 45 | maxsize: usize,
|
| 46 | }
|
| 47 |
|
| 48 | impl<const SIZE: usize> MmioRaw<SIZE> {
|
| 49 | |
| 50 | pub fn new(addr: usize, maxsize: usize) -> Result<Self> {
|
| 51 | if maxsize < SIZE {
|
| 52 | return Err(EINVAL);
|
| 53 | }
|
| 54 |
|
| 55 | Ok(Self { addr, maxsize })
|
| 56 | }
|
| 57 |
|
| 58 | |
| 59 | #[inline]
|
| 60 | pub fn addr(&self) -> usize {
|
| 61 | self.addr
|
| 62 | }
|
| 63 |
|
| 64 | |
| 65 | #[inline]
|
| 66 | pub fn maxsize(&self) -> usize {
|
| 67 | self.maxsize
|
| 68 | }
|
| 69 | }
|
| 70 |
|
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 | |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | #[repr(transparent)]
|
| 144 | pub struct Mmio<const SIZE: usize = 0>(MmioRaw<SIZE>);
|
| 145 |
|
| 146 | |
| 147 | |
| 148 | #[inline]
|
| 149 | const fn offset_valid<U>(offset: usize, size: usize) -> bool {
|
| 150 | let type_size = core::mem::size_of::<U>();
|
| 151 | if let Some(end) = offset.checked_add(type_size) {
|
| 152 | end <= size && offset % type_size == 0
|
| 153 | } else {
|
| 154 | false
|
| 155 | }
|
| 156 | }
|
| 157 |
|
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | pub trait IoCapable<T> {
|
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | unsafe fn io_read(&self, address: usize) -> T;
|
| 173 |
|
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | unsafe fn io_write(&self, value: T, address: usize);
|
| 180 | }
|
| 181 |
|
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | pub trait IoLoc<T> {
|
| 200 | |
| 201 | type IoType: Into<T> + From<T>;
|
| 202 |
|
| 203 | |
| 204 | fn offset(self) -> usize;
|
| 205 | }
|
| 206 |
|
| 207 | |
| 208 | |
| 209 | macro_rules! impl_usize_ioloc {
|
| 210 | ($($ty:ty),*) => {
|
| 211 | $(
|
| 212 | impl IoLoc<$ty> for usize {
|
| 213 | type IoType = $ty;
|
| 214 |
|
| 215 | #[inline(always)]
|
| 216 | fn offset(self) -> usize {
|
| 217 | self
|
| 218 | }
|
| 219 | }
|
| 220 | )*
|
| 221 | }
|
| 222 | }
|
| 223 |
|
| 224 | |
| 225 | impl_usize_ioloc!(u8, u16, u32, u64);
|
| 226 |
|
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | pub trait Io {
|
| 246 | |
| 247 | fn addr(&self) -> usize;
|
| 248 |
|
| 249 | |
| 250 | fn maxsize(&self) -> usize;
|
| 251 |
|
| 252 | |
| 253 | |
| 254 | #[inline]
|
| 255 | fn io_addr<U>(&self, offset: usize) -> Result<usize> {
|
| 256 | if !offset_valid::<U>(offset, self.maxsize()) {
|
| 257 | return Err(EINVAL);
|
| 258 | }
|
| 259 |
|
| 260 | |
| 261 | |
| 262 | self.addr().checked_add(offset).ok_or(EINVAL)
|
| 263 | }
|
| 264 |
|
| 265 | |
| 266 | #[inline(always)]
|
| 267 | fn try_read8(&self, offset: usize) -> Result<u8>
|
| 268 | where
|
| 269 | Self: IoCapable<u8>,
|
| 270 | {
|
| 271 | self.try_read(offset)
|
| 272 | }
|
| 273 |
|
| 274 | |
| 275 | #[inline(always)]
|
| 276 | fn try_read16(&self, offset: usize) -> Result<u16>
|
| 277 | where
|
| 278 | Self: IoCapable<u16>,
|
| 279 | {
|
| 280 | self.try_read(offset)
|
| 281 | }
|
| 282 |
|
| 283 | |
| 284 | #[inline(always)]
|
| 285 | fn try_read32(&self, offset: usize) -> Result<u32>
|
| 286 | where
|
| 287 | Self: IoCapable<u32>,
|
| 288 | {
|
| 289 | self.try_read(offset)
|
| 290 | }
|
| 291 |
|
| 292 | |
| 293 | #[inline(always)]
|
| 294 | fn try_read64(&self, offset: usize) -> Result<u64>
|
| 295 | where
|
| 296 | Self: IoCapable<u64>,
|
| 297 | {
|
| 298 | self.try_read(offset)
|
| 299 | }
|
| 300 |
|
| 301 | |
| 302 | #[inline(always)]
|
| 303 | fn try_write8(&self, value: u8, offset: usize) -> Result
|
| 304 | where
|
| 305 | Self: IoCapable<u8>,
|
| 306 | {
|
| 307 | self.try_write(offset, value)
|
| 308 | }
|
| 309 |
|
| 310 | |
| 311 | #[inline(always)]
|
| 312 | fn try_write16(&self, value: u16, offset: usize) -> Result
|
| 313 | where
|
| 314 | Self: IoCapable<u16>,
|
| 315 | {
|
| 316 | self.try_write(offset, value)
|
| 317 | }
|
| 318 |
|
| 319 | |
| 320 | #[inline(always)]
|
| 321 | fn try_write32(&self, value: u32, offset: usize) -> Result
|
| 322 | where
|
| 323 | Self: IoCapable<u32>,
|
| 324 | {
|
| 325 | self.try_write(offset, value)
|
| 326 | }
|
| 327 |
|
| 328 | |
| 329 | #[inline(always)]
|
| 330 | fn try_write64(&self, value: u64, offset: usize) -> Result
|
| 331 | where
|
| 332 | Self: IoCapable<u64>,
|
| 333 | {
|
| 334 | self.try_write(offset, value)
|
| 335 | }
|
| 336 |
|
| 337 | |
| 338 | #[inline(always)]
|
| 339 | fn read8(&self, offset: usize) -> u8
|
| 340 | where
|
| 341 | Self: IoKnownSize + IoCapable<u8>,
|
| 342 | {
|
| 343 | self.read(offset)
|
| 344 | }
|
| 345 |
|
| 346 | |
| 347 | #[inline(always)]
|
| 348 | fn read16(&self, offset: usize) -> u16
|
| 349 | where
|
| 350 | Self: IoKnownSize + IoCapable<u16>,
|
| 351 | {
|
| 352 | self.read(offset)
|
| 353 | }
|
| 354 |
|
| 355 | |
| 356 | #[inline(always)]
|
| 357 | fn read32(&self, offset: usize) -> u32
|
| 358 | where
|
| 359 | Self: IoKnownSize + IoCapable<u32>,
|
| 360 | {
|
| 361 | self.read(offset)
|
| 362 | }
|
| 363 |
|
| 364 | |
| 365 | #[inline(always)]
|
| 366 | fn read64(&self, offset: usize) -> u64
|
| 367 | where
|
| 368 | Self: IoKnownSize + IoCapable<u64>,
|
| 369 | {
|
| 370 | self.read(offset)
|
| 371 | }
|
| 372 |
|
| 373 | |
| 374 | #[inline(always)]
|
| 375 | fn write8(&self, value: u8, offset: usize)
|
| 376 | where
|
| 377 | Self: IoKnownSize + IoCapable<u8>,
|
| 378 | {
|
| 379 | self.write(offset, value)
|
| 380 | }
|
| 381 |
|
| 382 | |
| 383 | #[inline(always)]
|
| 384 | fn write16(&self, value: u16, offset: usize)
|
| 385 | where
|
| 386 | Self: IoKnownSize + IoCapable<u16>,
|
| 387 | {
|
| 388 | self.write(offset, value)
|
| 389 | }
|
| 390 |
|
| 391 | |
| 392 | #[inline(always)]
|
| 393 | fn write32(&self, value: u32, offset: usize)
|
| 394 | where
|
| 395 | Self: IoKnownSize + IoCapable<u32>,
|
| 396 | {
|
| 397 | self.write(offset, value)
|
| 398 | }
|
| 399 |
|
| 400 | |
| 401 | #[inline(always)]
|
| 402 | fn write64(&self, value: u64, offset: usize)
|
| 403 | where
|
| 404 | Self: IoKnownSize + IoCapable<u64>,
|
| 405 | {
|
| 406 | self.write(offset, value)
|
| 407 | }
|
| 408 |
|
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | #[inline(always)]
|
| 432 | fn try_read<T, L>(&self, location: L) -> Result<T>
|
| 433 | where
|
| 434 | L: IoLoc<T>,
|
| 435 | Self: IoCapable<L::IoType>,
|
| 436 | {
|
| 437 | let address = self.io_addr::<L::IoType>(location.offset())?;
|
| 438 |
|
| 439 | |
| 440 | Ok(unsafe { self.io_read(address) }.into())
|
| 441 | }
|
| 442 |
|
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | #[inline(always)]
|
| 466 | fn try_write<T, L>(&self, location: L, value: T) -> Result
|
| 467 | where
|
| 468 | L: IoLoc<T>,
|
| 469 | Self: IoCapable<L::IoType>,
|
| 470 | {
|
| 471 | let address = self.io_addr::<L::IoType>(location.offset())?;
|
| 472 | let io_value = value.into();
|
| 473 |
|
| 474 | |
| 475 | unsafe { self.io_write(io_value, address) }
|
| 476 |
|
| 477 | Ok(())
|
| 478 | }
|
| 479 |
|
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 | #[inline(always)]
|
| 512 | fn try_write_reg<T, L, V>(&self, value: V) -> Result
|
| 513 | where
|
| 514 | L: IoLoc<T>,
|
| 515 | V: LocatedRegister<Location = L, Value = T>,
|
| 516 | Self: IoCapable<L::IoType>,
|
| 517 | {
|
| 518 | let (location, value) = value.into_io_op();
|
| 519 |
|
| 520 | self.try_write(location, value)
|
| 521 | }
|
| 522 |
|
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | #[inline(always)]
|
| 545 | fn try_update<T, L, F>(&self, location: L, f: F) -> Result
|
| 546 | where
|
| 547 | L: IoLoc<T>,
|
| 548 | Self: IoCapable<L::IoType>,
|
| 549 | F: FnOnce(T) -> T,
|
| 550 | {
|
| 551 | let address = self.io_addr::<L::IoType>(location.offset())?;
|
| 552 |
|
| 553 | |
| 554 | let value: T = unsafe { self.io_read(address) }.into();
|
| 555 | let io_value = f(value).into();
|
| 556 |
|
| 557 | |
| 558 | unsafe { self.io_write(io_value, address) }
|
| 559 |
|
| 560 | Ok(())
|
| 561 | }
|
| 562 |
|
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | #[inline(always)]
|
| 584 | fn read<T, L>(&self, location: L) -> T
|
| 585 | where
|
| 586 | L: IoLoc<T>,
|
| 587 | Self: IoKnownSize + IoCapable<L::IoType>,
|
| 588 | {
|
| 589 | let address = self.io_addr_assert::<L::IoType>(location.offset());
|
| 590 |
|
| 591 | |
| 592 | unsafe { self.io_read(address) }.into()
|
| 593 | }
|
| 594 |
|
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | #[inline(always)]
|
| 616 | fn write<T, L>(&self, location: L, value: T)
|
| 617 | where
|
| 618 | L: IoLoc<T>,
|
| 619 | Self: IoKnownSize + IoCapable<L::IoType>,
|
| 620 | {
|
| 621 | let address = self.io_addr_assert::<L::IoType>(location.offset());
|
| 622 | let io_value = value.into();
|
| 623 |
|
| 624 | |
| 625 | unsafe { self.io_write(io_value, address) }
|
| 626 | }
|
| 627 |
|
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | |
| 651 | |
| 652 | |
| 653 | |
| 654 | |
| 655 | |
| 656 | |
| 657 | |
| 658 | #[inline(always)]
|
| 659 | fn write_reg<T, L, V>(&self, value: V)
|
| 660 | where
|
| 661 | L: IoLoc<T>,
|
| 662 | V: LocatedRegister<Location = L, Value = T>,
|
| 663 | Self: IoKnownSize + IoCapable<L::IoType>,
|
| 664 | {
|
| 665 | let (location, value) = value.into_io_op();
|
| 666 |
|
| 667 | self.write(location, value)
|
| 668 | }
|
| 669 |
|
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | |
| 684 | |
| 685 | |
| 686 | |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | #[inline(always)]
|
| 692 | fn update<T, L, F>(&self, location: L, f: F)
|
| 693 | where
|
| 694 | L: IoLoc<T>,
|
| 695 | Self: IoKnownSize + IoCapable<L::IoType> + Sized,
|
| 696 | F: FnOnce(T) -> T,
|
| 697 | {
|
| 698 | let address = self.io_addr_assert::<L::IoType>(location.offset());
|
| 699 |
|
| 700 | |
| 701 | let value: T = unsafe { self.io_read(address) }.into();
|
| 702 | let io_value = f(value).into();
|
| 703 |
|
| 704 | |
| 705 | unsafe { self.io_write(io_value, address) }
|
| 706 | }
|
| 707 | }
|
| 708 |
|
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | pub trait IoKnownSize: Io {
|
| 717 | |
| 718 | const MIN_SIZE: usize;
|
| 719 |
|
| 720 | |
| 721 | |
| 722 | |
| 723 | #[inline(always)]
|
| 724 | fn io_addr_assert<U>(&self, offset: usize) -> usize {
|
| 725 | build_assert!(offset_valid::<U>(offset, Self::MIN_SIZE));
|
| 726 |
|
| 727 | self.addr() + offset
|
| 728 | }
|
| 729 | }
|
| 730 |
|
| 731 | |
| 732 | macro_rules! impl_mmio_io_capable {
|
| 733 | ($mmio:ident, $(#[$attr:meta])* $ty:ty, $read_fn:ident, $write_fn:ident) => {
|
| 734 | $(#[$attr])*
|
| 735 | impl<const SIZE: usize> IoCapable<$ty> for $mmio<SIZE> {
|
| 736 | unsafe fn io_read(&self, address: usize) -> $ty {
|
| 737 | |
| 738 | unsafe { bindings::$read_fn(address as *const c_void) }
|
| 739 | }
|
| 740 |
|
| 741 | unsafe fn io_write(&self, value: $ty, address: usize) {
|
| 742 | |
| 743 | unsafe { bindings::$write_fn(value, address as *mut c_void) }
|
| 744 | }
|
| 745 | }
|
| 746 | };
|
| 747 | }
|
| 748 |
|
| 749 | |
| 750 | impl_mmio_io_capable!(Mmio, u8, readb, writeb);
|
| 751 | impl_mmio_io_capable!(Mmio, u16, readw, writew);
|
| 752 | impl_mmio_io_capable!(Mmio, u32, readl, writel);
|
| 753 | |
| 754 | impl_mmio_io_capable!(
|
| 755 | Mmio,
|
| 756 | #[cfg(CONFIG_64BIT)]
|
| 757 | u64,
|
| 758 | readq,
|
| 759 | writeq
|
| 760 | );
|
| 761 |
|
| 762 | impl<const SIZE: usize> Io for Mmio<SIZE> {
|
| 763 | |
| 764 | #[inline]
|
| 765 | fn addr(&self) -> usize {
|
| 766 | self.0.addr()
|
| 767 | }
|
| 768 |
|
| 769 | |
| 770 | #[inline]
|
| 771 | fn maxsize(&self) -> usize {
|
| 772 | self.0.maxsize()
|
| 773 | }
|
| 774 | }
|
| 775 |
|
| 776 | impl<const SIZE: usize> IoKnownSize for Mmio<SIZE> {
|
| 777 | const MIN_SIZE: usize = SIZE;
|
| 778 | }
|
| 779 |
|
| 780 | impl<const SIZE: usize> Mmio<SIZE> {
|
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 | pub unsafe fn from_raw(raw: &MmioRaw<SIZE>) -> &Self {
|
| 788 | |
| 789 | unsafe { &*core::ptr::from_ref(raw).cast() }
|
| 790 | }
|
| 791 | }
|
| 792 |
|
| 793 | |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | #[repr(transparent)]
|
| 800 | pub struct RelaxedMmio<const SIZE: usize = 0>(Mmio<SIZE>);
|
| 801 |
|
| 802 | impl<const SIZE: usize> Io for RelaxedMmio<SIZE> {
|
| 803 | #[inline]
|
| 804 | fn addr(&self) -> usize {
|
| 805 | self.0.addr()
|
| 806 | }
|
| 807 |
|
| 808 | #[inline]
|
| 809 | fn maxsize(&self) -> usize {
|
| 810 | self.0.maxsize()
|
| 811 | }
|
| 812 | }
|
| 813 |
|
| 814 | impl<const SIZE: usize> IoKnownSize for RelaxedMmio<SIZE> {
|
| 815 | const MIN_SIZE: usize = SIZE;
|
| 816 | }
|
| 817 |
|
| 818 | impl<const SIZE: usize> Mmio<SIZE> {
|
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | |
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | pub fn relaxed(&self) -> &RelaxedMmio<SIZE> {
|
| 840 | |
| 841 | |
| 842 | unsafe { core::mem::transmute(self) }
|
| 843 | }
|
| 844 | }
|
| 845 |
|
| 846 | |
| 847 | impl_mmio_io_capable!(RelaxedMmio, u8, readb_relaxed, writeb_relaxed);
|
| 848 | impl_mmio_io_capable!(RelaxedMmio, u16, readw_relaxed, writew_relaxed);
|
| 849 | impl_mmio_io_capable!(RelaxedMmio, u32, readl_relaxed, writel_relaxed);
|
| 850 | |
| 851 | impl_mmio_io_capable!(
|
| 852 | RelaxedMmio,
|
| 853 | #[cfg(CONFIG_64BIT)]
|
| 854 | u64,
|
| 855 | readq_relaxed,
|
| 856 | writeq_relaxed
|
| 857 | );
|