sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget(/translations/zh_CN/driver-api/device-iomodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/zh_TW/driver-api/device-iomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/it_IT/driver-api/device-iomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ja_JP/driver-api/device-iomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/ko_KR/driver-api/device-iomodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget(/translations/sp_SP/driver-api/device-iomodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(hCopyright 2001 Matthew Wilcoxh]hCopyright 2001 Matthew Wilcox}(hhhhubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhB/var/lib/git/docbuild/linux/Documentation/driver-api/device-io.rsthKubh)}(hhh]h}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(h9This documentation is free software; you can redistributeh]h9This documentation is free software; you can redistribute}(hhhhubah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(h=it and/or modify it under the terms of the GNU General Publich]h=it and/or modify it under the terms of the GNU General Public}(hhhhubah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubh)}(hhjhhubj9)}(hThe read and write functions are defined to be ordered. That is the compiler is not permitted to reorder the I/O sequence. When the ordering can be compiler optimised, you can use __readb() and friends to indicate the relaxed ordering. Use this with care.h]hThe read and write functions are defined to be ordered. That is the compiler is not permitted to reorder the I/O sequence. When the ordering can be compiler optimised, you can use __readb() and friends to indicate the relaxed ordering. Use this with care.}(hj@hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKDhjhhubj9)}(hXWhile the basic functions are defined to be synchronous with respect to each other and ordered with respect to each other the busses the devices sit on may themselves have asynchronicity. In particular many authors are burned by the fact that PCI bus writes are posted asynchronously. A driver author must issue a read from the same device to ensure that writes have occurred in the specific cases the author cares. This kind of property cannot be hidden from driver writers in the API. In some cases, the read used to flush the device may be expected to fail (if the card is resetting, for example). In that case, the read should be done from config space, which is guaranteed to soft-fail if the card doesn't respond.h]hXWhile the basic functions are defined to be synchronous with respect to each other and ordered with respect to each other the busses the devices sit on may themselves have asynchronicity. In particular many authors are burned by the fact that PCI bus writes are posted asynchronously. A driver author must issue a read from the same device to ensure that writes have occurred in the specific cases the author cares. This kind of property cannot be hidden from driver writers in the API. In some cases, the read used to flush the device may be expected to fail (if the card is resetting, for example). In that case, the read should be done from config space, which is guaranteed to soft-fail if the card doesn’t respond.}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKIhjhhubj9)}(hThe following is an example of flushing a write to a device when the driver would like to ensure the write's effects are visible prior to continuing execution::h]hThe following is an example of flushing a write to a device when the driver would like to ensure the write’s effects are visible prior to continuing execution:}(hThe following is an example of flushing a write to a device when the driver would like to ensure the write's effects are visible prior to continuing execution:hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKUhjhhubh literal_block)}(hXstatic inline void qla1280_disable_intrs(struct scsi_qla_host *ha) { struct device_reg *reg; reg = ha->iobase; /* disable risc and host interrupts */ WRT_REG_WORD(®->ictrl, 0); /* * The following read will ensure that the above write * has been received by the device before we return from this * function. */ RD_REG_WORD(®->ictrl); ha->flags.ints_enabled = 0; }h]hXstatic inline void qla1280_disable_intrs(struct scsi_qla_host *ha) { struct device_reg *reg; reg = ha->iobase; /* disable risc and host interrupts */ WRT_REG_WORD(®->ictrl, 0); /* * The following read will ensure that the above write * has been received by the device before we return from this * function. */ RD_REG_WORD(®->ictrl); ha->flags.ints_enabled = 0; }}(hhhjkubah}(h]h ]h"]h$]h&]hhuh1jihhhKYhjhhubj9)}(hXBPCI ordering rules also guarantee that PIO read responses arrive after any outstanding DMA writes from that bus, since for some devices the result of a readb() call may signal to the driver that a DMA transaction is complete. In many cases, however, the driver may want to indicate that the next readb() call has no relation to any previous DMA writes performed by the device. The driver can use readb_relaxed() for these cases, although only some platforms will honor the relaxed semantics. Using the relaxed read functions will provide significant performance benefits on platforms that support it. The qla2xxx driver provides examples of how to use readX_relaxed(). In many cases, a majority of the driver's readX() calls can safely be converted to readX_relaxed() calls, since only a few will indicate or depend on DMA completion.h]hXDPCI ordering rules also guarantee that PIO read responses arrive after any outstanding DMA writes from that bus, since for some devices the result of a readb() call may signal to the driver that a DMA transaction is complete. In many cases, however, the driver may want to indicate that the next readb() call has no relation to any previous DMA writes performed by the device. The driver can use readb_relaxed() for these cases, although only some platforms will honor the relaxed semantics. Using the relaxed read functions will provide significant performance benefits on platforms that support it. The qla2xxx driver provides examples of how to use readX_relaxed(). In many cases, a majority of the driver’s readX() calls can safely be converted to readX_relaxed() calls, since only a few will indicate or depend on DMA completion.}(hj{hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKjhjhhubeh}(h]accessing-the-deviceah ]h"]accessing the deviceah$]h&]uh1jhjhhhhhK1 referencedKubeh}(h]memory-mapped-ioah ]h"]memory mapped ioah$]h&]uh1jhjhhhhhKubj)}(hhh](j )}(hPort Space Accessesh]hPort Space Accesses}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhKxubj)}(hhh](j )}(hPort Space Explainedh]hPort Space Explained}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhK{ubj9)}(hXAnother form of IO commonly supported is Port Space. This is a range of addresses separate to the normal memory address space. Access to these addresses is generally not as fast as accesses to the memory mapped addresses, and it also has a potentially smaller address space.h]hXAnother form of IO commonly supported is Port Space. This is a range of addresses separate to the normal memory address space. Access to these addresses is generally not as fast as accesses to the memory mapped addresses, and it also has a potentially smaller address space.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhK}hjhhubj9)}(hIUnlike memory mapped IO, no preparation is required to access port space.h]hIUnlike memory mapped IO, no preparation is required to access port space.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubeh}(h]port-space-explainedah ]h"]port space explainedah$]h&]uh1jhjhhhhhK{ubj)}(hhh](j )}(hAccessing Port Spaceh]hAccessing Port Space}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhKubj9)}(hAccesses to this space are provided through a set of functions which allow 8-bit, 16-bit and 32-bit accesses; also known as byte, word and long. These functions are inb(), inw(), inl(), outb(), outw() and outl().h]hAccesses to this space are provided through a set of functions which allow 8-bit, 16-bit and 32-bit accesses; also known as byte, word and long. These functions are inb(), inw(), inl(), outb(), outw() and outl().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj9)}(hX6Some variants are provided for these functions. Some devices require that accesses to their ports are slowed down. This functionality is provided by appending a ``_p`` to the end of the function. There are also equivalents to memcpy. The ins() and outs() functions copy bytes, words or longs to the given port.h](hSome variants are provided for these functions. Some devices require that accesses to their ports are slowed down. This functionality is provided by appending a }(hSome variants are provided for these functions. Some devices require that accesses to their ports are slowed down. This functionality is provided by appending a hjhhhNhNubhliteral)}(h``_p``h]h_p}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to the end of the function. There are also equivalents to memcpy. The ins() and outs() functions copy bytes, words or longs to the given port.}(h to the end of the function. There are also equivalents to memcpy. The ins() and outs() functions copy bytes, words or longs to the given port.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubeh}(h]accessing-port-spaceah ]h"]accessing port spaceah$]h&]uh1jhjhhhhhKubeh}(h]port-space-accessesah ]h"]port space accessesah$]h&]uh1jhjhhhhhKxubj)}(hhh](j )}(h__iomem pointer tokensh]h__iomem pointer tokens}(hj6hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1hhhhhKubj9)}(hXThe data type for an MMIO address is an ``__iomem`` qualified pointer, such as ``void __iomem *reg``. On most architectures it is a regular pointer that points to a virtual memory address and can be offset or dereferenced, but in portable code, it must only be passed from and to functions that explicitly operated on an ``__iomem`` token, in particular the ioremap() and readl()/writel() functions. The 'sparse' semantic code checker can be used to verify that this is done correctly.h](h(The data type for an MMIO address is an }(h(The data type for an MMIO address is an hjBhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh qualified pointer, such as }(h qualified pointer, such as hjBhhhNhNubj)}(h``void __iomem *reg``h]hvoid __iomem *reg}(hhhj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh. On most architectures it is a regular pointer that points to a virtual memory address and can be offset or dereferenced, but in portable code, it must only be passed from and to functions that explicitly operated on an }(h. On most architectures it is a regular pointer that points to a virtual memory address and can be offset or dereferenced, but in portable code, it must only be passed from and to functions that explicitly operated on an hjBhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh token, in particular the ioremap() and readl()/writel() functions. The ‘sparse’ semantic code checker can be used to verify that this is done correctly.}(h token, in particular the ioremap() and readl()/writel() functions. The 'sparse' semantic code checker can be used to verify that this is done correctly.hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhKhj1hhubj9)}(hXBWhile on most architectures, ioremap() creates a page table entry for an uncached virtual address pointing to the physical MMIO address, some architectures require special instructions for MMIO, and the ``__iomem`` pointer just encodes the physical address or an offsettable cookie that is interpreted by readl()/writel().h](hWhile on most architectures, ioremap() creates a page table entry for an uncached virtual address pointing to the physical MMIO address, some architectures require special instructions for MMIO, and the }(hWhile on most architectures, ioremap() creates a page table entry for an uncached virtual address pointing to the physical MMIO address, some architectures require special instructions for MMIO, and the hjhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhl pointer just encodes the physical address or an offsettable cookie that is interpreted by readl()/writel().}(hl pointer just encodes the physical address or an offsettable cookie that is interpreted by readl()/writel().hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhKhj1hhubeh}(h]iomem-pointer-tokensah ]h"]__iomem pointer tokensah$]h&]uh1jhjhhhhhKubj)}(hhh](j )}(h(Differences between I/O access functionsh]h(Differences between I/O access functions}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhKubj9)}(hJreadq(), readl(), readw(), readb(), writeq(), writel(), writew(), writeb()h]hJreadq(), readl(), readw(), readb(), writeq(), writel(), writew(), writeb()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubh block_quote)}(hhh](j9)}(hX"These are the most generic accessors, providing serialization against other MMIO accesses and DMA accesses as well as fixed endianness for accessing little-endian PCI devices and on-chip peripherals. Portable device drivers should generally use these for any access to ``__iomem`` pointers.h](hX These are the most generic accessors, providing serialization against other MMIO accesses and DMA accesses as well as fixed endianness for accessing little-endian PCI devices and on-chip peripherals. Portable device drivers should generally use these for any access to }(hX These are the most generic accessors, providing serialization against other MMIO accesses and DMA accesses as well as fixed endianness for accessing little-endian PCI devices and on-chip peripherals. Portable device drivers should generally use these for any access to hjhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh pointers.}(h pointers.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhKhjubj9)}(hrNote that posted writes are not strictly ordered against a spinlock, see Documentation/driver-api/io_ordering.rst.h]hrNote that posted writes are not strictly ordered against a spinlock, see Documentation/driver-api/io_ordering.rst.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(hreadq_relaxed(), readl_relaxed(), readw_relaxed(), readb_relaxed(), writeq_relaxed(), writel_relaxed(), writew_relaxed(), writeb_relaxed()h]hreadq_relaxed(), readl_relaxed(), readw_relaxed(), readb_relaxed(), writeq_relaxed(), writel_relaxed(), writew_relaxed(), writeb_relaxed()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj)}(hhh](j9)}(hXOn architectures that require an expensive barrier for serializing against DMA, these "relaxed" versions of the MMIO accessors only serialize against each other, but contain a less expensive barrier operation. A device driver might use these in a particularly performance sensitive fast path, with a comment that explains why the usage in a specific location is safe without the extra barriers.h]hXOn architectures that require an expensive barrier for serializing against DMA, these “relaxed” versions of the MMIO accessors only serialize against each other, but contain a less expensive barrier operation. A device driver might use these in a particularly performance sensitive fast path, with a comment that explains why the usage in a specific location is safe without the extra barriers.}(hj!hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubj9)}(hSee memory-barriers.txt for a more detailed discussion on the precise ordering guarantees of the non-relaxed and relaxed versions.h]hSee memory-barriers.txt for a more detailed discussion on the precise ordering guarantees of the non-relaxed and relaxed versions.}(hj/hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(h`ioread64(), ioread32(), ioread16(), ioread8(), iowrite64(), iowrite32(), iowrite16(), iowrite8()h]h`ioread64(), ioread32(), ioread16(), ioread8(), iowrite64(), iowrite32(), iowrite16(), iowrite8()}(hjChjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj)}(hhh]j9)}(hXThese are an alternative to the normal readl()/writel() functions, with almost identical behavior, but they can also operate on ``__iomem`` tokens returned for mapping PCI I/O space with pci_iomap() or ioport_map(). On architectures that require special instructions for I/O port access, this adds a small overhead for an indirect function call implemented in lib/iomap.c, while on other architectures, these are simply aliases.h](hThese are an alternative to the normal readl()/writel() functions, with almost identical behavior, but they can also operate on }(hThese are an alternative to the normal readl()/writel() functions, with almost identical behavior, but they can also operate on hjRhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubhX! tokens returned for mapping PCI I/O space with pci_iomap() or ioport_map(). On architectures that require special instructions for I/O port access, this adds a small overhead for an indirect function call implemented in lib/iomap.c, while on other architectures, these are simply aliases.}(hX! tokens returned for mapping PCI I/O space with pci_iomap() or ioport_map(). On architectures that require special instructions for I/O port access, this adds a small overhead for an indirect function call implemented in lib/iomap.c, while on other architectures, these are simply aliases.hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhKhjOubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(hTioread64be(), ioread32be(), ioread16be() iowrite64be(), iowrite32be(), iowrite16be()h]hTioread64be(), ioread32be(), ioread16be() iowrite64be(), iowrite32be(), iowrite16be()}(hj|hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj)}(hhh](j9)}(hXWThese behave in the same way as the ioread32()/iowrite32() family, but with reversed byte order, for accessing devices with big-endian MMIO registers. Device drivers that can operate on either big-endian or little-endian registers may have to implement a custom wrapper function that picks one or the other depending on which device was found.h]hXWThese behave in the same way as the ioread32()/iowrite32() family, but with reversed byte order, for accessing devices with big-endian MMIO registers. Device drivers that can operate on either big-endian or little-endian registers may have to implement a custom wrapper function that picks one or the other depending on which device was found.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubj9)}(hXPNote: On some architectures, the normal readl()/writel() functions traditionally assume that devices are the same endianness as the CPU, while using a hardware byte-reverse on the PCI bus when running a big-endian kernel. Drivers that use readl()/writel() this way are generally not portable, but tend to be limited to a particular SoC.h]hXPNote: On some architectures, the normal readl()/writel() functions traditionally assume that devices are the same endianness as the CPU, while using a hardware byte-reverse on the PCI bus when running a big-endian kernel. Drivers that use readl()/writel() this way are generally not portable, but tend to be limited to a particular SoC.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(hX6hi_lo_readq(), lo_hi_readq(), hi_lo_readq_relaxed(), lo_hi_readq_relaxed(), ioread64_lo_hi(), ioread64_hi_lo(), ioread64be_lo_hi(), ioread64be_hi_lo(), hi_lo_writeq(), lo_hi_writeq(), hi_lo_writeq_relaxed(), lo_hi_writeq_relaxed(), iowrite64_lo_hi(), iowrite64_hi_lo(), iowrite64be_lo_hi(), iowrite64be_hi_lo()h]hX6hi_lo_readq(), lo_hi_readq(), hi_lo_readq_relaxed(), lo_hi_readq_relaxed(), ioread64_lo_hi(), ioread64_hi_lo(), ioread64be_lo_hi(), ioread64be_hi_lo(), hi_lo_writeq(), lo_hi_writeq(), hi_lo_writeq_relaxed(), lo_hi_writeq_relaxed(), iowrite64_lo_hi(), iowrite64_hi_lo(), iowrite64be_lo_hi(), iowrite64be_hi_lo()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj)}(hhh]j9)}(hXjSome device drivers have 64-bit registers that cannot be accessed atomically on 32-bit architectures but allow two consecutive 32-bit accesses instead. Since it depends on the particular device which of the two halves has to be accessed first, a helper is provided for each combination of 64-bit accessors with either low/high or high/low word ordering. A device driver must include either or to get the function definitions along with helpers that redirect the normal readq()/writeq() to them on architectures that do not provide 64-bit access natively.h]hXjSome device drivers have 64-bit registers that cannot be accessed atomically on 32-bit architectures but allow two consecutive 32-bit accesses instead. Since it depends on the particular device which of the two halves has to be accessed first, a helper is provided for each combination of 64-bit accessors with either low/high or high/low word ordering. A device driver must include either or to get the function definitions along with helpers that redirect the normal readq()/writeq() to them on architectures that do not provide 64-bit access natively.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(hz__raw_readq(), __raw_readl(), __raw_readw(), __raw_readb(), __raw_writeq(), __raw_writel(), __raw_writew(), __raw_writeb()h]hz__raw_readq(), __raw_readl(), __raw_readw(), __raw_readb(), __raw_writeq(), __raw_writel(), __raw_writew(), __raw_writeb()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj)}(hhh]j9)}(hXThese are low-level MMIO accessors without barriers or byteorder changes and architecture specific behavior. Accesses are usually atomic in the sense that a four-byte __raw_readl() does not get split into individual byte loads, but multiple consecutive accesses can be combined on the bus. In portable code, it is only safe to use these to access memory behind a device bus but not MMIO registers, as there are no ordering guarantees with regard to other MMIO accesses or even spinlocks. The byte order is generally the same as for normal memory, so unlike the other functions, these can be used to copy data between kernel memory and device memory.h]hXThese are low-level MMIO accessors without barriers or byteorder changes and architecture specific behavior. Accesses are usually atomic in the sense that a four-byte __raw_readl() does not get split into individual byte loads, but multiple consecutive accesses can be combined on the bus. In portable code, it is only safe to use these to access memory behind a device bus but not MMIO registers, as there are no ordering guarantees with regard to other MMIO accesses or even spinlocks. The byte order is generally the same as for normal memory, so unlike the other functions, these can be used to copy data between kernel memory and device memory.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(h+inl(), inw(), inb(), outl(), outw(), outb()h]h+inl(), inw(), inb(), outl(), outw(), outb()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhKhjhhubj)}(hhh](j9)}(hX=PCI I/O port resources traditionally require separate helpers as they are implemented using special instructions on the x86 architecture. On most other architectures, these are mapped to readl()/writel() style accessors internally, usually pointing to a fixed area in virtual memory. Instead of an ``__iomem`` pointer, the address is a 32-bit integer token to identify a port number. PCI requires I/O port access to be non-posted, meaning that an outb() must complete before the following code executes, while a normal writeb() may still be in progress. On architectures that correctly implement this, I/O port access is therefore ordered against spinlocks. Many non-x86 PCI host bridge implementations and CPU architectures however fail to implement non-posted I/O space on PCI, so they can end up being posted on such hardware.h](hX*PCI I/O port resources traditionally require separate helpers as they are implemented using special instructions on the x86 architecture. On most other architectures, these are mapped to readl()/writel() style accessors internally, usually pointing to a fixed area in virtual memory. Instead of an }(hX*PCI I/O port resources traditionally require separate helpers as they are implemented using special instructions on the x86 architecture. On most other architectures, these are mapped to readl()/writel() style accessors internally, usually pointing to a fixed area in virtual memory. Instead of an hjhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX pointer, the address is a 32-bit integer token to identify a port number. PCI requires I/O port access to be non-posted, meaning that an outb() must complete before the following code executes, while a normal writeb() may still be in progress. On architectures that correctly implement this, I/O port access is therefore ordered against spinlocks. Many non-x86 PCI host bridge implementations and CPU architectures however fail to implement non-posted I/O space on PCI, so they can end up being posted on such hardware.}(hX pointer, the address is a 32-bit integer token to identify a port number. PCI requires I/O port access to be non-posted, meaning that an outb() must complete before the following code executes, while a normal writeb() may still be in progress. On architectures that correctly implement this, I/O port access is therefore ordered against spinlocks. Many non-x86 PCI host bridge implementations and CPU architectures however fail to implement non-posted I/O space on PCI, so they can end up being posted on such hardware.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhKhjubj9)}(hXIn some architectures, the I/O port number space has a 1:1 mapping to ``__iomem`` pointers, but this is not recommended and device drivers should not rely on that for portability. Similarly, an I/O port number as described in a PCI base address register may not correspond to the port number as seen by a device driver. Portable drivers need to read the port number for the resource provided by the kernel.h](hFIn some architectures, the I/O port number space has a 1:1 mapping to }(hFIn some architectures, the I/O port number space has a 1:1 mapping to hj*hhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhXE pointers, but this is not recommended and device drivers should not rely on that for portability. Similarly, an I/O port number as described in a PCI base address register may not correspond to the port number as seen by a device driver. Portable drivers need to read the port number for the resource provided by the kernel.}(hXE pointers, but this is not recommended and device drivers should not rely on that for portability. Similarly, an I/O port number as described in a PCI base address register may not correspond to the port number as seen by a device driver. Portable drivers need to read the port number for the resource provided by the kernel.hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhjubj9)}(hzThere are no direct 64-bit I/O port accessors, but pci_iomap() in combination with ioread64/iowrite64 can be used instead.h]hzThere are no direct 64-bit I/O port accessors, but pci_iomap() in combination with ioread64/iowrite64 can be used instead.}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM hjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(h7inl_p(), inw_p(), inb_p(), outl_p(), outw_p(), outb_p()h]h7inl_p(), inw_p(), inb_p(), outl_p(), outw_p(), outb_p()}(hjbhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM hjhhubj)}(hhh]j9)}(hOn ISA devices that require specific timing, the _p versions of the I/O accessors add a small delay. On architectures that do not have ISA buses, these are aliases to the normal inb/outb helpers.h]hOn ISA devices that require specific timing, the _p versions of the I/O accessors add a small delay. On architectures that do not have ISA buses, these are aliases to the normal inb/outb helpers.}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjnubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj9)}(hreadsq, readsl, readsw, readsb writesq, writesl, writesw, writesb ioread64_rep, ioread32_rep, ioread16_rep, ioread8_rep iowrite64_rep, iowrite32_rep, iowrite16_rep, iowrite8_rep insl, insw, insb, outsl, outsw, outsbh]hreadsq, readsl, readsw, readsb writesq, writesl, writesw, writesb ioread64_rep, ioread32_rep, ioread16_rep, ioread8_rep iowrite64_rep, iowrite32_rep, iowrite16_rep, iowrite8_rep insl, insw, insb, outsl, outsw, outsb}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubj)}(hhh]j9)}(hX[These are helpers that access the same address multiple times, usually to copy data between kernel memory byte stream and a FIFO buffer. Unlike the normal MMIO accessors, these do not perform a byteswap on big-endian kernels, so the first byte in the FIFO register corresponds to the first byte in the memory buffer regardless of the architecture.h]hX[These are helpers that access the same address multiple times, usually to copy data between kernel memory byte stream and a FIFO buffer. Unlike the normal MMIO accessors, these do not perform a byteswap on big-endian kernels, so the first byte in the FIFO register corresponds to the first byte in the memory buffer regardless of the architecture.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h](differences-between-i-o-access-functionsah ]h"](differences between i/o access functionsah$]h&]uh1jhjhhhhhKubj)}(hhh](j )}(hDevice memory mapping modesh]hDevice memory mapping modes}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhM ubj9)}(hSome architectures support multiple modes for mapping device memory. ioremap_*() variants provide a common abstraction around these architecture-specific modes, with a shared set of semantics.h]hSome architectures support multiple modes for mapping device memory. ioremap_*() variants provide a common abstraction around these architecture-specific modes, with a shared set of semantics.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM"hjhhubj9)}(hioremap() is the most common mapping type, and is applicable to typical device memory (e.g. I/O registers). Other modes can offer weaker or stronger guarantees, if supported by the architecture. From most to least common, they are as follows:h]hioremap() is the most common mapping type, and is applicable to typical device memory (e.g. I/O registers). Other modes can offer weaker or stronger guarantees, if supported by the architecture. From most to least common, they are as follows:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM&hjhhubj)}(hhh](j )}(h ioremap()h]h ioremap()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhM,ubj9)}(hThe default mode, suitable for most memory-mapped devices, e.g. control registers. Memory mapped using ioremap() has the following characteristics:h]hThe default mode, suitable for most memory-mapped devices, e.g. control registers. Memory mapped using ioremap() has the following characteristics:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM.hjhhubh bullet_list)}(hhh](h list_item)}(hdUncached - CPU-side caches are bypassed, and all reads and writes are handled directly by the deviceh]j9)}(hdUncached - CPU-side caches are bypassed, and all reads and writes are handled directly by the deviceh]hdUncached - CPU-side caches are bypassed, and all reads and writes are handled directly by the device}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM1hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hNo speculative operations - the CPU may not issue a read or write to this memory, unless the instruction that does so has been reached in committed program flow.h]j9)}(hNo speculative operations - the CPU may not issue a read or write to this memory, unless the instruction that does so has been reached in committed program flow.h]hNo speculative operations - the CPU may not issue a read or write to this memory, unless the instruction that does so has been reached in committed program flow.}(hj#hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM3hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hNo reordering - The CPU may not reorder accesses to this memory mapping with respect to each other. On some architectures, this relies on barriers in readl_relaxed()/writel_relaxed().h]j9)}(hNo reordering - The CPU may not reorder accesses to this memory mapping with respect to each other. On some architectures, this relies on barriers in readl_relaxed()/writel_relaxed().h]hNo reordering - The CPU may not reorder accesses to this memory mapping with respect to each other. On some architectures, this relies on barriers in readl_relaxed()/writel_relaxed().}(hj;hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM6hj5ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h`No repetition - The CPU may not issue multiple reads or writes for a single program instruction.h]j9)}(h`No repetition - The CPU may not issue multiple reads or writes for a single program instruction.h]h`No repetition - The CPU may not issue multiple reads or writes for a single program instruction.}(hjShjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM9hjMubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hNo write-combining - Each I/O operation results in one discrete read or write being issued to the device, and multiple writes are not combined into larger writes. This may or may not be enforced when using __raw I/O accessors or pointer dereferences.h]j9)}(hNo write-combining - Each I/O operation results in one discrete read or write being issued to the device, and multiple writes are not combined into larger writes. This may or may not be enforced when using __raw I/O accessors or pointer dereferences.h]hNo write-combining - Each I/O operation results in one discrete read or write being issued to the device, and multiple writes are not combined into larger writes. This may or may not be enforced when using __raw I/O accessors or pointer dereferences.}(hjkhjihhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM;hjeubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hNon-executable - The CPU is not allowed to speculate instruction execution from this memory (it probably goes without saying, but you're also not allowed to jump into device memory). h]j9)}(hNon-executable - The CPU is not allowed to speculate instruction execution from this memory (it probably goes without saying, but you're also not allowed to jump into device memory).h]hNon-executable - The CPU is not allowed to speculate instruction execution from this memory (it probably goes without saying, but you’re also not allowed to jump into device memory).}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhM?hj}ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhM1hjhhubj9)}(hOn many platforms and buses (e.g. PCI), writes issued through ioremap() mappings are posted, which means that the CPU does not wait for the write to actually reach the target device before retiring the write instruction.h]hOn many platforms and buses (e.g. PCI), writes issued through ioremap() mappings are posted, which means that the CPU does not wait for the write to actually reach the target device before retiring the write instruction.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMChjhhubj9)}(hOn many platforms, I/O accesses must be aligned with respect to the access size; failure to do so will result in an exception or unpredictable results.h]hOn many platforms, I/O accesses must be aligned with respect to the access size; failure to do so will result in an exception or unpredictable results.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMGhjhhubeh}(h]ioremapah ]h"] ioremap()ah$]h&]uh1jhjhhhhhM,ubj)}(hhh](j )}(h ioremap_wc()h]h ioremap_wc()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhMKubj9)}(hHMaps I/O memory as normal memory with write combining. Unlike ioremap(),h]hHMaps I/O memory as normal memory with write combining. Unlike ioremap(),}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMMhjhhubj)}(hhh](j)}(hThe CPU may speculatively issue reads from the device that the program didn't actually execute, and may choose to basically read whatever it wants.h]j9)}(hThe CPU may speculatively issue reads from the device that the program didn't actually execute, and may choose to basically read whatever it wants.h]hThe CPU may speculatively issue reads from the device that the program didn’t actually execute, and may choose to basically read whatever it wants.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMOhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hdThe CPU may reorder operations as long as the result is consistent from the program's point of view.h]j9)}(hdThe CPU may reorder operations as long as the result is consistent from the program's point of view.h]hfThe CPU may reorder operations as long as the result is consistent from the program’s point of view.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMQhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hcThe CPU may write to the same location multiple times, even when the program issued a single write.h]j9)}(hcThe CPU may write to the same location multiple times, even when the program issued a single write.h]hcThe CPU may write to the same location multiple times, even when the program issued a single write.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMShjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h?The CPU may combine several writes into a single larger write. h]j9)}(h>The CPU may combine several writes into a single larger write.h]h>The CPU may combine several writes into a single larger write.}(hj1hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMUhj+ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jhhhMOhjhhubj9)}(hXRThis mode is typically used for video framebuffers, where it can increase performance of writes. It can also be used for other blocks of memory in devices (e.g. buffers or shared memory), but care must be taken as accesses are not guaranteed to be ordered with respect to normal ioremap() MMIO register accesses without explicit barriers.h]hXRThis mode is typically used for video framebuffers, where it can increase performance of writes. It can also be used for other blocks of memory in devices (e.g. buffers or shared memory), but care must be taken as accesses are not guaranteed to be ordered with respect to normal ioremap() MMIO register accesses without explicit barriers.}(hjKhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMWhjhhubj9)}(hXOn a PCI bus, it is usually safe to use ioremap_wc() on MMIO areas marked as ``IORESOURCE_PREFETCH``, but it may not be used on those without the flag. For on-chip devices, there is no corresponding flag, but a driver can use ioremap_wc() on a device that is known to be safe.h](hMOn a PCI bus, it is usually safe to use ioremap_wc() on MMIO areas marked as }(hMOn a PCI bus, it is usually safe to use ioremap_wc() on MMIO areas marked as hjWhhhNhNubj)}(h``IORESOURCE_PREFETCH``h]hIORESOURCE_PREFETCH}(hhhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubh, but it may not be used on those without the flag. For on-chip devices, there is no corresponding flag, but a driver can use ioremap_wc() on a device that is known to be safe.}(h, but it may not be used on those without the flag. For on-chip devices, there is no corresponding flag, but a driver can use ioremap_wc() on a device that is known to be safe.hjWhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhM]hjhhubeh}(h] ioremap-wcah ]h"] ioremap_wc()ah$]h&]uh1jhjhhhhhMKubj)}(hhh](j )}(h ioremap_wt()h]h ioremap_wt()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhMcubj9)}(hYMaps I/O memory as normal memory with write-through caching. Like ioremap_wc(), but also,h]hYMaps I/O memory as normal memory with write-through caching. Like ioremap_wc(), but also,}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMehjhhubj)}(hhh]j)}(h_The CPU may cache writes issued to and reads from the device, and serve reads from that cache. h]j9)}(h^The CPU may cache writes issued to and reads from the device, and serve reads from that cache.h]h^The CPU may cache writes issued to and reads from the device, and serve reads from that cache.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jjuh1jhhhMhhjhhubj9)}(hXThis mode is sometimes used for video framebuffers, where drivers still expect writes to reach the device in a timely manner (and not be stuck in the CPU cache), but reads may be served from the cache for efficiency. However, it is rarely useful these days, as framebuffer drivers usually perform writes only, for which ioremap_wc() is more efficient (as it doesn't needlessly trash the cache). Most drivers should not use this.h]hXThis mode is sometimes used for video framebuffers, where drivers still expect writes to reach the device in a timely manner (and not be stuck in the CPU cache), but reads may be served from the cache for efficiency. However, it is rarely useful these days, as framebuffer drivers usually perform writes only, for which ioremap_wc() is more efficient (as it doesn’t needlessly trash the cache). Most drivers should not use this.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMkhjhhubeh}(h] ioremap-wtah ]h"] ioremap_wt()ah$]h&]uh1jhjhhhhhMcubj)}(hhh](j )}(h ioremap_np()h]h ioremap_np()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhMsubj9)}(hXLike ioremap(), but explicitly requests non-posted write semantics. On some architectures and buses, ioremap() mappings have posted write semantics, which means that writes can appear to "complete" from the point of view of the CPU before the written data actually arrives at the target device. Writes are still ordered with respect to other writes and reads from the same device, but due to the posted write semantics, this is not the case with respect to other devices. ioremap_np() explicitly requests non-posted semantics, which means that the write instruction will not appear to complete until the device has received (and to some platform-specific extent acknowledged) the written data.h]hXLike ioremap(), but explicitly requests non-posted write semantics. On some architectures and buses, ioremap() mappings have posted write semantics, which means that writes can appear to “complete” from the point of view of the CPU before the written data actually arrives at the target device. Writes are still ordered with respect to other writes and reads from the same device, but due to the posted write semantics, this is not the case with respect to other devices. ioremap_np() explicitly requests non-posted semantics, which means that the write instruction will not appear to complete until the device has received (and to some platform-specific extent acknowledged) the written data.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMuhjhhubj9)}(hXThis mapping mode primarily exists to cater for platforms with bus fabrics that require this particular mapping mode to work correctly. These platforms set the ``IORESOURCE_MEM_NONPOSTED`` flag for a resource that requires ioremap_np() semantics and portable drivers should use an abstraction that automatically selects it where appropriate (see the `Higher-level ioremap abstractions`_ section below).h](hThis mapping mode primarily exists to cater for platforms with bus fabrics that require this particular mapping mode to work correctly. These platforms set the }(hThis mapping mode primarily exists to cater for platforms with bus fabrics that require this particular mapping mode to work correctly. These platforms set the hjhhhNhNubj)}(h``IORESOURCE_MEM_NONPOSTED``h]hIORESOURCE_MEM_NONPOSTED}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag for a resource that requires ioremap_np() semantics and portable drivers should use an abstraction that automatically selects it where appropriate (see the }(h flag for a resource that requires ioremap_np() semantics and portable drivers should use an abstraction that automatically selects it where appropriate (see the hjhhhNhNubh reference)}(h$`Higher-level ioremap abstractions`_h]h!Higher-level ioremap abstractions}(h!Higher-level ioremap abstractionshjhhhNhNubah}(h]h ]h"]h$]h&]name!Higher-level ioremap abstractionsrefid!higher-level-ioremap-abstractionsuh1jhjresolvedKubh section below).}(h section below).hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubj9)}(hXThe bare ioremap_np() is only available on some architectures; on others, it always returns NULL. Drivers should not normally use it, unless they are platform-specific or they derive benefit from non-posted writes where supported, and can fall back to ioremap() otherwise. The normal approach to ensure posted write completion is to do a dummy read after a write as explained in `Accessing the device`_, which works with ioremap() on all platforms.h](hX{The bare ioremap_np() is only available on some architectures; on others, it always returns NULL. Drivers should not normally use it, unless they are platform-specific or they derive benefit from non-posted writes where supported, and can fall back to ioremap() otherwise. The normal approach to ensure posted write completion is to do a dummy read after a write as explained in }(hX{The bare ioremap_np() is only available on some architectures; on others, it always returns NULL. Drivers should not normally use it, unless they are platform-specific or they derive benefit from non-posted writes where supported, and can fall back to ioremap() otherwise. The normal approach to ensure posted write completion is to do a dummy read after a write as explained in hj3hhhNhNubj)}(h`Accessing the device`_h]hAccessing the device}(hAccessing the devicehj<hhhNhNubah}(h]h ]h"]h$]h&]nameAccessing the devicej%juh1jhj3j'Kubh., which works with ioremap() on all platforms.}(h., which works with ioremap() on all platforms.hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubj9)}(hXioremap_np() should never be used for PCI drivers. PCI memory space writes are always posted, even on architectures that otherwise implement ioremap_np(). Using ioremap_np() for PCI BARs will at best result in posted write semantics, and at worst result in complete breakage.h]hXioremap_np() should never be used for PCI drivers. PCI memory space writes are always posted, even on architectures that otherwise implement ioremap_np(). Using ioremap_np() for PCI BARs will at best result in posted write semantics, and at worst result in complete breakage.}(hjZhjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubj9)}(hXNote that non-posted write semantics are orthogonal to CPU-side ordering guarantees. A CPU may still choose to issue other reads or writes before a non-posted write instruction retires. See the previous section on MMIO access functions for details on the CPU side of things.h]hXNote that non-posted write semantics are orthogonal to CPU-side ordering guarantees. A CPU may still choose to issue other reads or writes before a non-posted write instruction retires. See the previous section on MMIO access functions for details on the CPU side of things.}(hjhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubeh}(h] ioremap-npah ]h"] ioremap_np()ah$]h&]uh1jhjhhhhhMsubj)}(hhh](j )}(h ioremap_uc()h]h ioremap_uc()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|hhhhhMubj9)}(hioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere elss ioremap_uc() defaults to return NULL.h]hioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere elss ioremap_uc() defaults to return NULL.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj|hhubj9)}(hMPortable drivers should avoid the use of ioremap_uc(), use ioremap() instead.h]hMPortable drivers should avoid the use of ioremap_uc(), use ioremap() instead.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj|hhubeh}(h] ioremap-ucah ]h"] ioremap_uc()ah$]h&]uh1jhjhhhhhMubj)}(hhh](j )}(hioremap_cache()h]hioremap_cache()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhhhhhMubj9)}(hX1ioremap_cache() effectively maps I/O memory as normal RAM. CPU write-back caches can be used, and the CPU is free to treat the device as if it were a block of RAM. This should never be used for device memory which has side effects of any kind, or which does not return the data previously written on read.h]hX1ioremap_cache() effectively maps I/O memory as normal RAM. CPU write-back caches can be used, and the CPU is free to treat the device as if it were a block of RAM. This should never be used for device memory which has side effects of any kind, or which does not return the data previously written on read.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubj9)}(hIt should also not be used for actual RAM, as the returned pointer is an ``__iomem`` token. memremap() can be used for mapping normal RAM that is outside of the linear kernel memory area to a regular pointer.h](hIIt should also not be used for actual RAM, as the returned pointer is an }(hIIt should also not be used for actual RAM, as the returned pointer is an hjhhhNhNubj)}(h ``__iomem``h]h__iomem}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh| token. memremap() can be used for mapping normal RAM that is outside of the linear kernel memory area to a regular pointer.}(h| token. memremap() can be used for mapping normal RAM that is outside of the linear kernel memory area to a regular pointer.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubj9)}(h9Portable drivers should avoid the use of ioremap_cache().h]h9Portable drivers should avoid the use of ioremap_cache().}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjhhubeh}(h] ioremap-cacheah ]h"]ioremap_cache()ah$]h&]uh1jhjhhhhhMubj)}(hhh](j )}(hArchitecture exampleh]hArchitecture example}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj hhhhhMubj9)}(hWHere is how the above modes map to memory attribute settings on the ARM64 architecture:h]hWHere is how the above modes map to memory attribute settings on the ARM64 architecture:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j1 hj. ubj2 )}(hhh]h}(h]h ]h"]h$]h&]colwidthK,uh1j1 hj. ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]j9)}(hAPIh]hAPI}(hjX hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjS ubah}(h]h ]h"]h$]h&]uh1jQ hjN ubjR )}(hhh]j9)}(h#Memory region type and cacheabilityh]h#Memory region type and cacheability}(hjo hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjj ubah}(h]h ]h"]h$]h&]uh1jQ hjN ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubjM )}(hhh](jR )}(hhh]j9)}(h ioremap_np()h]h ioremap_np()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubjR )}(hhh]j9)}(h Device-nGnRnEh]h Device-nGnRnE}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubjM )}(hhh](jR )}(hhh]j9)}(h ioremap()h]h ioremap()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubjR )}(hhh]j9)}(h Device-nGnREh]h Device-nGnRE}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubjM )}(hhh](jR )}(hhh]j9)}(h ioremap_uc()h]h ioremap_uc()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubjR )}(hhh]j9)}(h(not implemented)h]h(not implemented)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubjM )}(hhh](jR )}(hhh]j9)}(h ioremap_wc()h]h ioremap_wc()}(hj4 hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj/ ubah}(h]h ]h"]h$]h&]uh1jQ hj, ubjR )}(hhh]j9)}(hNormal-Non Cacheableh]hNormal-Non Cacheable}(hjK hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjF ubah}(h]h ]h"]h$]h&]uh1jQ hj, ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubjM )}(hhh](jR )}(hhh]j9)}(h ioremap_wt()h]h ioremap_wt()}(hjk hji hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhjf ubah}(h]h ]h"]h$]h&]uh1jQ hjc ubjR )}(hhh]j9)}(h&(not implemented; fallback to ioremap)h]h&(not implemented; fallback to ioremap)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj} ubah}(h]h ]h"]h$]h&]uh1jQ hjc ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubjM )}(hhh](jR )}(hhh]j9)}(hioremap_cache()h]hioremap_cache()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubjR )}(hhh]j9)}(hNormal-Write-Back Cacheableh]hNormal-Write-Back Cacheable}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jQ hj ubeh}(h]h ]h"]h$]h&]uh1jL hjI ubeh}(h]h ]h"]h$]h&]uh1jG hj. ubeh}(h]h ]h"]h$]h&]colsKuh1j, hj) ubah}(h]h ]h"]h$]h&]uh1j' hj hhhhhNubeh}(h]architecture-exampleah ]h"]architecture exampleah$]h&]uh1jhjhhhhhMubeh}(h]device-memory-mapping-modesah ]h"]device memory mapping modesah$]h&]uh1jhjhhhhhM ubj)}(hhh](j )}(h!Higher-level ioremap abstractionsh]h!Higher-level ioremap abstractions}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj hhhhhMubj9)}(hXInstead of using the above raw ioremap() modes, drivers are encouraged to use higher-level APIs. These APIs may implement platform-specific logic to automatically choose an appropriate ioremap mode on any given bus, allowing for a platform-agnostic driver to work on those platforms without any special cases. At the time of this writing, the following ioremap() wrappers have such logic:h]hXInstead of using the above raw ioremap() modes, drivers are encouraged to use higher-level APIs. These APIs may implement platform-specific logic to automatically choose an appropriate ioremap mode on any given bus, allowing for a platform-agnostic driver to work on those platforms without any special cases. At the time of this writing, the following ioremap() wrappers have such logic:}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj9)}(hdevm_ioremap_resource()h]hdevm_ioremap_resource()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj)}(hhh](j9)}(hXCan automatically select ioremap_np() over ioremap() according to platform requirements, if the ``IORESOURCE_MEM_NONPOSTED`` flag is set on the struct resource. Uses devres to automatically unmap the resource when the driver probe() function fails or a device in unbound from its driver.h](h`Can automatically select ioremap_np() over ioremap() according to platform requirements, if the }(h`Can automatically select ioremap_np() over ioremap() according to platform requirements, if the hj$ hhhNhNubj)}(h``IORESOURCE_MEM_NONPOSTED``h]hIORESOURCE_MEM_NONPOSTED}(hhhj- hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ ubh flag is set on the struct resource. Uses devres to automatically unmap the resource when the driver probe() function fails or a device in unbound from its driver.}(h flag is set on the struct resource. Uses devres to automatically unmap the resource when the driver probe() function fails or a device in unbound from its driver.hj$ hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhj! ubj9)}(h?Documented in Documentation/driver-api/driver-model/devres.rst.h]h?Documented in Documentation/driver-api/driver-model/devres.rst.}(hjH hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj! ubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj9)}(hof_address_to_resource()h]hof_address_to_resource()}(hj\ hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj)}(hhh]j9)}(hAutomatically sets the ``IORESOURCE_MEM_NONPOSTED`` flag for platforms that require non-posted writes for certain buses (see the nonposted-mmio and posted-mmio device tree properties).h](hAutomatically sets the }(hAutomatically sets the hjk hhhNhNubj)}(h``IORESOURCE_MEM_NONPOSTED``h]hIORESOURCE_MEM_NONPOSTED}(hhhjt hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk ubh flag for platforms that require non-posted writes for certain buses (see the nonposted-mmio and posted-mmio device tree properties).}(h flag for platforms that require non-posted writes for certain buses (see the nonposted-mmio and posted-mmio device tree properties).hjk hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhjh ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj9)}(h of_iomap()h]h of_iomap()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj)}(hhh]j9)}(hMaps the resource described in a ``reg`` property in the device tree, doing all required translations. Automatically selects ioremap_np() according to platform requirements, as above.h](h!Maps the resource described in a }(h!Maps the resource described in a hj hhhNhNubj)}(h``reg``h]hreg}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh property in the device tree, doing all required translations. Automatically selects ioremap_np() according to platform requirements, as above.}(h property in the device tree, doing all required translations. Automatically selects ioremap_np() according to platform requirements, as above.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj9)}(h'pci_ioremap_bar(), pci_ioremap_wc_bar()h]h'pci_ioremap_bar(), pci_ioremap_wc_bar()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj)}(hhh]j9)}(hgMaps the resource described in a PCI base address without having to extract the physical address first.h]hgMaps the resource described in a PCI base address without having to extract the physical address first.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj9)}(hpci_iomap(), pci_iomap_wc()h]hpci_iomap(), pci_iomap_wc()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj)}(hhh]j9)}(hLike pci_ioremap_bar()/pci_ioremap_bar(), but also works on I/O space when used together with ioread32()/iowrite32() and similar accessorsh]hLike pci_ioremap_bar()/pci_ioremap_bar(), but also works on I/O space when used together with ioread32()/iowrite32() and similar accessors}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj9)}(h pcim_iomap()h]h pcim_iomap()}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubj)}(hhh](j9)}(hLike pci_iomap(), but uses devres to automatically unmap the resource when the driver probe() function fails or a device in unbound from its driverh]hLike pci_iomap(), but uses devres to automatically unmap the resource when the driver probe() function fails or a device in unbound from its driver}(hj) hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj$ ubj9)}(h?Documented in Documentation/driver-api/driver-model/devres.rst.h]h?Documented in Documentation/driver-api/driver-model/devres.rst.}(hj7 hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj$ ubeh}(h]h ]h"]h$]h&]uh1jhj hhhhhNubj9)}(hsNot using these wrappers may make drivers unusable on certain platforms with stricter rules for mapping I/O memory.h]hsNot using these wrappers may make drivers unusable on certain platforms with stricter rules for mapping I/O memory.}(hjK hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hhhMhj hhubeh}(h]j&ah ]h"]!higher-level ioremap abstractionsah$]h&]uh1jhjhhhhhMjKubj)}(hhh](j )}(h,Generalizing Access to System and I/O Memoryh]h,Generalizing Access to System and I/O Memory}(hjc hja hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ hhhhhMubj9)}(hXWhen accessing a memory region, depending on its location, users may have to access it with I/O operations or memory load/store operations. For example, copying to system memory could be done with memcpy(), copying to I/O memory would be done with memcpy_toio().h]hXWhen accessing a memory region, depending on its location, users may have to access it with I/O operations or memory load/store operations. For example, copying to system memory could be done with memcpy(), copying to I/O memory would be done with memcpy_toio().}(hjq hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKhj^ hhubjj)}(hvoid *vaddr = ...; // pointer to system memory memcpy(vaddr, src, len); void *vaddr_iomem = ...; // pointer to I/O memory memcpy_toio(vaddr_iomem, src, len);h]hvoid *vaddr = ...; // pointer to system memory memcpy(vaddr, src, len); void *vaddr_iomem = ...; // pointer to I/O memory memcpy_toio(vaddr_iomem, src, len);}(hhhj~ ubah}(h]h ]h"]h$]h&]hhforcelanguagechighlight_args}uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKhj^ hhubj9)}(hXThe user of such pointer may not have information about the mapping of that region or may want to have a single code path to handle operations on that buffer, regardless if it's located in system or IO memory. The type :c:type:`struct iosys_map ` and its helpers abstract that so the buffer can be passed around to other drivers or have separate duties inside the same driver for allocation, read and write operations.h](hThe user of such pointer may not have information about the mapping of that region or may want to have a single code path to handle operations on that buffer, regardless if it’s located in system or IO memory. The type }(hThe user of such pointer may not have information about the mapping of that region or may want to have a single code path to handle operations on that buffer, regardless if it's located in system or IO memory. The type hj hhhNhNubh)}(h&:c:type:`struct iosys_map `h]j)}(hj h]hstruct iosys_map}(hhhj hhhNhNubah}(h]h ](xrefj c-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocdriver-api/device-io refdomainj reftypetype refexplicitrefwarn reftarget iosys_mapuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKhj ubh and its helpers abstract that so the buffer can be passed around to other drivers or have separate duties inside the same driver for allocation, read and write operations.}(h and its helpers abstract that so the buffer can be passed around to other drivers or have separate duties inside the same driver for allocation, read and write operations.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hj hKhj^ hhubj9)}(hXOpen-coding access to :c:type:`struct iosys_map ` is considered bad style. Rather than accessing its fields directly, use one of the provided helper functions, or implement your own. For example, instances of :c:type:`struct iosys_map ` can be initialized statically with IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These helpers will set an address in system memory.h](hOpen-coding access to }(hOpen-coding access to hj hhhNhNubh)}(h&:c:type:`struct iosys_map `h]j)}(hj h]hstruct iosys_map}(hhhj hhhNhNubah}(h]h ](j j c-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftypetype refexplicitrefwarnj iosys_mapuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK#hj ubh is considered bad style. Rather than accessing its fields directly, use one of the provided helper functions, or implement your own. For example, instances of }(h is considered bad style. Rather than accessing its fields directly, use one of the provided helper functions, or implement your own. For example, instances of hj hhhNhNubh)}(h&:c:type:`struct iosys_map `h]j)}(hj h]hstruct iosys_map}(hhhj hhhNhNubah}(h]h ](j j c-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftypetype refexplicitrefwarnj iosys_mapuh1hhj hK#hj ubh can be initialized statically with IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These helpers will set an address in system memory.}(h can be initialized statically with IOSYS_MAP_INIT_VADDR(), or at runtime with iosys_map_set_vaddr(). These helpers will set an address in system memory.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hj hK#hj^ hhubjj)}(h`struct iosys_map map = IOSYS_MAP_INIT_VADDR(0xdeadbeaf); iosys_map_set_vaddr(&map, 0xdeadbeaf);h]h`struct iosys_map map = IOSYS_MAP_INIT_VADDR(0xdeadbeaf); iosys_map_set_vaddr(&map, 0xdeadbeaf);}(hhhj! ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK*hj^ hhubj9)}(haTo set an address in I/O memory, use IOSYS_MAP_INIT_VADDR_IOMEM() or iosys_map_set_vaddr_iomem().h]haTo set an address in I/O memory, use IOSYS_MAP_INIT_VADDR_IOMEM() or iosys_map_set_vaddr_iomem().}(hj3 hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK0hj^ hhubjj)}(hlstruct iosys_map map = IOSYS_MAP_INIT_VADDR_IOMEM(0xdeadbeaf); iosys_map_set_vaddr_iomem(&map, 0xdeadbeaf);h]hlstruct iosys_map map = IOSYS_MAP_INIT_VADDR_IOMEM(0xdeadbeaf); iosys_map_set_vaddr_iomem(&map, 0xdeadbeaf);}(hhhj@ ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK3hj^ hhubj9)}(hInstances of struct iosys_map do not have to be cleaned up, but can be cleared to NULL with iosys_map_clear(). Cleared mappings always refer to system memory.h]hInstances of struct iosys_map do not have to be cleaned up, but can be cleared to NULL with iosys_map_clear(). Cleared mappings always refer to system memory.}(hjR hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK9hj^ hhubjj)}(hiosys_map_clear(&map);h]hiosys_map_clear(&map);}(hhhj_ ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK=hj^ hhubj9)}(hQTest if a mapping is valid with either iosys_map_is_set() or iosys_map_is_null().h]hQTest if a mapping is valid with either iosys_map_is_set() or iosys_map_is_null().}(hjq hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKAhj^ hhubjj)}(hMif (iosys_map_is_set(&map) != iosys_map_is_null(&map)) // always trueh]hMif (iosys_map_is_set(&map) != iosys_map_is_null(&map)) // always true}(hhhj~ ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKDhj^ hhubj9)}(hXPInstances of :c:type:`struct iosys_map ` can be compared for equality with iosys_map_is_equal(). Mappings that point to different memory spaces, system or I/O, are never equal. That's even true if both spaces are located in the same address space, both mappings contain the same address value, or both mappings refer to NULL.h](h Instances of }(h Instances of hj hhhNhNubh)}(h&:c:type:`struct iosys_map `h]j)}(hj h]hstruct iosys_map}(hhhj hhhNhNubah}(h]h ](j j c-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftypetype refexplicitrefwarnj iosys_mapuh1hh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKIhj ubhX can be compared for equality with iosys_map_is_equal(). Mappings that point to different memory spaces, system or I/O, are never equal. That’s even true if both spaces are located in the same address space, both mappings contain the same address value, or both mappings refer to NULL.}(hX can be compared for equality with iosys_map_is_equal(). Mappings that point to different memory spaces, system or I/O, are never equal. That's even true if both spaces are located in the same address space, both mappings contain the same address value, or both mappings refer to NULL.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8hj hKIhj^ hhubjj)}(hstruct iosys_map sys_map; // refers to system memory struct iosys_map io_map; // refers to I/O memory if (iosys_map_is_equal(&sys_map, &io_map)) // always falseh]hstruct iosys_map sys_map; // refers to system memory struct iosys_map io_map; // refers to I/O memory if (iosys_map_is_equal(&sys_map, &io_map)) // always false}(hhhj ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKOhj^ hhubj9)}(hX1A set up instance of struct iosys_map can be used to access or manipulate the buffer memory. Depending on the location of the memory, the provided helpers will pick the correct operations. Data can be copied into the memory with iosys_map_memcpy_to(). The address can be manipulated with iosys_map_incr().h]hX1A set up instance of struct iosys_map can be used to access or manipulate the buffer memory. Depending on the location of the memory, the provided helpers will pick the correct operations. Data can be copied into the memory with iosys_map_memcpy_to(). The address can be manipulated with iosys_map_incr().}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhKWhj^ hhubjj)}(hconst void *src = ...; // source buffer size_t len = ...; // length of src iosys_map_memcpy_to(&map, src, len); iosys_map_incr(&map, len); // go to first byte after the memcpyh]hconst void *src = ...; // source buffer size_t len = ...; // length of src iosys_map_memcpy_to(&map, src, len); iosys_map_incr(&map, len); // go to first byte after the memcpy}(hhhj ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:509: ./include/linux/iosys-map.hhK\hj^ hhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleiosys_map (C struct) c.iosys_maphNtauh1j hj^ hhhNhNubhdesc)}(hhh](hdesc_signature)}(h iosys_maph]hdesc_signature_line)}(hstruct iosys_maph](hdesc_sig_keyword)}(hstructh]hstruct}(hhhjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhubhdesc_sig_space)}(h h]h }(hhhj'hhhNhNubah}(h]h ]wah"]h$]h&]uh1j%hjhhhj$hKhubh desc_name)}(h iosys_maph]h desc_sig_name)}(hj h]h iosys_map}(hhhj>hhhNhNubah}(h]h ]nah"]h$]h&]uh1j<hj8ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j6hjhhhj$hKhubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j sphinx_line_type declaratorhj hhhj$hKhubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multilineuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubh desc_content)}(hhh]j9)}(hPointer to IO/system memoryh]hPointer to IO/system memory}(hjnhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKghjihhubah}(h]h ]h"]h$]h&]uh1jghjhhhj$hKhubeh}(h]h ](j structeh"]h$]h&]domainj objtypejdesctypejnoindexuh1jhhhj^ hNhNubh container)}(hX**Definition**:: struct iosys_map { union { void __iomem *vaddr_iomem; void *vaddr; }; bool is_iomem; }; **Members** ``{unnamed_union}`` anonymous ``vaddr_iomem`` The buffer's address if in I/O memory ``vaddr`` The buffer's address if in system memory ``is_iomem`` True if the buffer is located in I/O memory, or false otherwise.h](j9)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(h:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKkhjubjj)}(hsstruct iosys_map { union { void __iomem *vaddr_iomem; void *vaddr; }; bool is_iomem; };h]hsstruct iosys_map { union { void __iomem *vaddr_iomem; void *vaddr; }; bool is_iomem; };}(hhhjubah}(h]h ]h"]h$]h&]hhuh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKmhjubj9)}(h **Members**h]j)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKuhjubhdefinition_list)}(hhh](hdefinition_list_item)}(h``{unnamed_union}`` anonymous h](hterm)}(h``{unnamed_union}``h]j)}(hjh]h{unnamed_union}}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKxhjubh definition)}(hhh]j9)}(h anonymoush]h anonymous}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKxhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKxhjubj)}(h6``vaddr_iomem`` The buffer's address if in I/O memory h](j)}(h``vaddr_iomem``h]j)}(hj#h]h vaddr_iomem}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKihjubj)}(hhh]j9)}(h%The buffer's address if in I/O memoryh]h'The buffer’s address if in I/O memory}(hj>hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj8hKihj9ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj8hKihjubj)}(h3``vaddr`` The buffer's address if in system memory h](j)}(h ``vaddr``h]j)}(hj\h]hvaddr}(hhhj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKjhjVubj)}(hhh]j9)}(h(The buffer's address if in system memoryh]h*The buffer’s address if in system memory}(hjwhjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjqhKjhjrubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjqhKjhjubj)}(hM``is_iomem`` True if the buffer is located in I/O memory, or false otherwise.h](j)}(h ``is_iomem``h]j)}(hjh]his_iomem}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKkhjubj)}(hhh]j9)}(h@True if the buffer is located in I/O memory, or false otherwise.h]h@True if the buffer is located in I/O memory, or false otherwise.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKkhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j IOSYS_MAP_INIT_VADDR (C macro)c.IOSYS_MAP_INIT_VADDRhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hIOSYS_MAP_INIT_VADDRh]j)}(hIOSYS_MAP_INIT_VADDRh]j7)}(hIOSYS_MAP_INIT_VADDRh]j=)}(hjh]hIOSYS_MAP_INIT_VADDR}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKzubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjhhhjhKzubah}(h]jah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKyhjhhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghjhhhjhKzubeh}(h]h ](j macroeh"]h$]h&]jj jjjjjuh1jhhhj^ hNhNubj9)}(h!``IOSYS_MAP_INIT_VADDR (vaddr_)``h]j)}(hj%h]hIOSYS_MAP_INIT_VADDR (vaddr_)}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhK{hj^ hhubj)}(hhh]j9)}(h;Initializes struct iosys_map to an address in system memoryh]h;Initializes struct iosys_map to an address in system memory}(hj@hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKvhj;ubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(h4**Parameters** ``vaddr_`` A system-memory addressh](j9)}(h**Parameters**h]j)}(hjYh]h Parameters}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKzhjSubj)}(hhh]j)}(h"``vaddr_`` A system-memory addressh](j)}(h ``vaddr_``h]j)}(hjxh]hvaddr_}(hhhjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhK|hjrubj)}(hhh]j9)}(hA system-memory addressh]hA system-memory address}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKwhjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhjhK|hjoubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $IOSYS_MAP_INIT_VADDR_IOMEM (C macro)c.IOSYS_MAP_INIT_VADDR_IOMEMhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hIOSYS_MAP_INIT_VADDR_IOMEMh]j)}(hIOSYS_MAP_INIT_VADDR_IOMEMh]j7)}(hIOSYS_MAP_INIT_VADDR_IOMEMh]j=)}(hjh]hIOSYS_MAP_INIT_VADDR_IOMEM}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjhhhjhKubah}(h]jah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghjhhhjhKubeh}(h]h ](j macroeh"]h$]h&]jj jjjjjuh1jhhhj^ hNhNubj9)}(h-``IOSYS_MAP_INIT_VADDR_IOMEM (vaddr_iomem_)``h]j)}(hj h]h)IOSYS_MAP_INIT_VADDR_IOMEM (vaddr_iomem_)}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhj^ hhubj)}(hhh]j9)}(h8Initializes struct iosys_map to an address in I/O memoryh]h8Initializes struct iosys_map to an address in I/O memory}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(h8**Parameters** ``vaddr_iomem_`` An I/O-memory addressh](j9)}(h**Parameters**h]j)}(hj=h]h Parameters}(hhhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhj7ubj)}(hhh]j)}(h&``vaddr_iomem_`` An I/O-memory addressh](j)}(h``vaddr_iomem_``h]j)}(hj\h]h vaddr_iomem_}(hhhj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjVubj)}(hhh]j9)}(hAn I/O-memory addressh]hAn I/O-memory address}(hjwhjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjrubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjqhKhjSubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j IOSYS_MAP_INIT_OFFSET (C macro)c.IOSYS_MAP_INIT_OFFSEThNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hIOSYS_MAP_INIT_OFFSETh]j)}(hIOSYS_MAP_INIT_OFFSETh]j7)}(hIOSYS_MAP_INIT_OFFSETh]j=)}(hjh]hIOSYS_MAP_INIT_OFFSET}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjhhhjhKubah}(h]jah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghjhhhjhKubeh}(h]h ](j macroeh"]h$]h&]jj jjjjjuh1jhhhj^ hNhNubj9)}(h)``IOSYS_MAP_INIT_OFFSET (map_, offset_)``h]j)}(hjh]h%IOSYS_MAP_INIT_OFFSET (map_, offset_)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhj^ hhubj)}(hhh]j9)}(h3Initializes struct iosys_map from another iosys_maph]h3Initializes struct iosys_map from another iosys_map}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(hXU**Parameters** ``map_`` The dma-buf mapping structure to copy from ``offset_`` Offset to add to the other mapping **Description** Initializes a new iosys_map struct based on another passed as argument. It does a shallow copy of the struct so it's possible to update the back storage without changing where the original map points to. It is the equivalent of doing: .. code-block:: c iosys_map map = other_map; iosys_map_incr(&map, &offset); Example usage: .. code-block:: c void foo(struct device *dev, struct iosys_map *base_map) { ... struct iosys_map map = IOSYS_MAP_INIT_OFFSET(base_map, FIELD_OFFSET); ... } The advantage of using the initializer over just increasing the offset with iosys_map_incr() like above is that the new map will always point to the right place of the buffer during its scope. It reduces the risk of updating the wrong part of the buffer and having no compiler warning about that. If the assignment to IOSYS_MAP_INIT_OFFSET() is forgotten, the compiler can warn about the use of uninitialized variable.h](j9)}(h**Parameters**h]j)}(hj!h]h Parameters}(hhhj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh](j)}(h4``map_`` The dma-buf mapping structure to copy from h](j)}(h``map_``h]j)}(hj@h]hmap_}(hhhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhj:ubj)}(hhh]j9)}(h*The dma-buf mapping structure to copy fromh]h*The dma-buf mapping structure to copy from}(hj[hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjUhKhjVubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhjUhKhj7ubj)}(h/``offset_`` Offset to add to the other mapping h](j)}(h ``offset_``h]j)}(hjyh]hoffset_}(hhhj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjsubj)}(hhh]j9)}(h"Offset to add to the other mappingh]h"Offset to add to the other mapping}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjhKhj7ubeh}(h]h ]h"]h$]h&]uh1jhjubj9)}(h**Description**h]j)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(hInitializes a new iosys_map struct based on another passed as argument. It does a shallow copy of the struct so it's possible to update the back storage without changing where the original map points to. It is the equivalent of doing:h]hInitializes a new iosys_map struct based on another passed as argument. It does a shallow copy of the struct so it’s possible to update the back storage without changing where the original map points to. It is the equivalent of doing:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubjj)}(h9iosys_map map = other_map; iosys_map_incr(&map, &offset);h]h9iosys_map map = other_map; iosys_map_incr(&map, &offset);}(hhhjubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(hExample usage:h]hExample usage:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubjj)}(hvoid foo(struct device *dev, struct iosys_map *base_map) { ... struct iosys_map map = IOSYS_MAP_INIT_OFFSET(base_map, FIELD_OFFSET); ... }h]hvoid foo(struct device *dev, struct iosys_map *base_map) { ... struct iosys_map map = IOSYS_MAP_INIT_OFFSET(base_map, FIELD_OFFSET); ... }}(hhhjubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(hXThe advantage of using the initializer over just increasing the offset with iosys_map_incr() like above is that the new map will always point to the right place of the buffer during its scope. It reduces the risk of updating the wrong part of the buffer and having no compiler warning about that. If the assignment to IOSYS_MAP_INIT_OFFSET() is forgotten, the compiler can warn about the use of uninitialized variable.h]hXThe advantage of using the initializer over just increasing the offset with iosys_map_incr() like above is that the new map will always point to the right place of the buffer during its scope. It reduces the risk of updating the wrong part of the buffer and having no compiler warning about that. If the assignment to IOSYS_MAP_INIT_OFFSET() is forgotten, the compiler can warn about the use of uninitialized variable.}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_set_vaddr (C function)c.iosys_map_set_vaddrhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h=void iosys_map_set_vaddr (struct iosys_map *map, void *vaddr)h]j)}(hhhhjThKubah}(h]j9ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhj;hhubjh)}(hhh]j9)}(h:Sets a iosys mapping structure to an address in I/O memoryh]h:Sets a iosys mapping structure to an address in I/O memory}(hj]hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjXhhubah}(h]h ]h"]h$]h&]uh1jghj;hhhjThKubeh}(h]h ](j functioneh"]h$]h&]jj jjsjjsjuh1jhhhj^ hNhNubj)}(h**Parameters** ``struct iosys_map *map`` The iosys_map structure ``void __iomem *vaddr_iomem`` An I/O-memory address **Description** Sets the address and the I/O-memory flag.h](j9)}(h**Parameters**h]j)}(hj}h]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjwubj)}(hhh](j)}(h2``struct iosys_map *map`` The iosys_map structure h](j)}(h``struct iosys_map *map``h]j)}(hjh]hstruct iosys_map *map}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h4``void __iomem *vaddr_iomem`` An I/O-memory address h](j)}(h``void __iomem *vaddr_iomem``h]j)}(hjh]hvoid __iomem *vaddr_iomem}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j9)}(hAn I/O-memory addressh]hAn I/O-memory address}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjwubj9)}(h**Description**h]j)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjwubj9)}(h)Sets the address and the I/O-memory flag.h]h)Sets the address and the I/O-memory flag.}(hj(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjwubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_is_equal (C function)c.iosys_map_is_equalhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hRbool iosys_map_is_equal (const struct iosys_map *lhs, const struct iosys_map *rhs)h]j)}(hQbool iosys_map_is_equal(const struct iosys_map *lhs, const struct iosys_map *rhs)h](j8)}(hboolh]hbool}(hhhjUhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjQhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKubj&)}(h h]h }(hhhjdhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjQhhhjchKubj7)}(hiosys_map_is_equalh]j=)}(hiosys_map_is_equalh]hiosys_map_is_equal}(hhhjvhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjrubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjQhhhjchKubjp)}(h:(const struct iosys_map *lhs, const struct iosys_map *rhs)h](jv)}(hconst struct iosys_map *lhsh](j)}(hconsth]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNjj)}j]j)}jjxsbc.iosys_map_is_equalasbuh1hhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hlhsh]hlhs}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubjv)}(hconst struct iosys_map *rhsh](j)}(hjh]hconst}(hhhj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhj-hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]hstruct}(hhhj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjHhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjYhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjVubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj[modnameN classnameNjj)}j]jc.iosys_map_is_equalasbuh1hhjubj&)}(h h]h }(hhhjwhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hrhsh]hrhs}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubeh}(h]h ]h"]h$]h&]hhuh1johjQhhhjchKubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjMhhhjchKubah}(h]jHah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjJhhubjh)}(hhh]j9)}(h2Compares two iosys mapping structures for equalityh]h2Compares two iosys mapping structures for equality}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jghjJhhhjchKubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjuh1jhhhj^ hNhNubj)}(hXk**Parameters** ``const struct iosys_map *lhs`` The iosys_map structure ``const struct iosys_map *rhs`` A iosys_map structure to compare with **Description** Two iosys mapping structures are equal if they both refer to the same type of memory and to the same address within that memory. **Return** True is both structures are equal, or false otherwise.h](j9)}(h**Parameters**h]j)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh](j)}(h8``const struct iosys_map *lhs`` The iosys_map structure h](j)}(h``const struct iosys_map *lhs``h]j)}(hjh]hconst struct iosys_map *lhs}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hF``const struct iosys_map *rhs`` A iosys_map structure to compare with h](j)}(h``const struct iosys_map *rhs``h]j)}(hj7h]hconst struct iosys_map *rhs}(hhhj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhj1ubj)}(hhh]j9)}(h%A iosys_map structure to compare withh]h%A iosys_map structure to compare with}(hjRhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjLhKhjMubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhjLhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubj9)}(h**Description**h]j)}(hjrh]h Description}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(hTwo iosys mapping structures are equal if they both refer to the same type of memory and to the same address within that memory.h]hTwo iosys mapping structures are equal if they both refer to the same type of memory and to the same address within that memory.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(h **Return**h]j)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(h6True is both structures are equal, or false otherwise.h]h6True is both structures are equal, or false otherwise.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_is_null (C function)c.iosys_map_is_nullhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h4bool iosys_map_is_null (const struct iosys_map *map)h]j)}(h3bool iosys_map_is_null(const struct iosys_map *map)h](j8)}(hjWh]hbool}(hhhjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjhhhjhKubj7)}(hiosys_map_is_nullh]j=)}(hiosys_map_is_nullh]hiosys_map_is_null}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjhhhjhKubjp)}(h(const struct iosys_map *map)h]jv)}(hconst struct iosys_map *maph](j)}(hjh]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhj'hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]hstruct}(hhhj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjBhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjShhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjPubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjUmodnameN classnameNjj)}j]j)}jjsbc.iosys_map_is_nullasbuh1hhjubj&)}(h h]h }(hhhjshhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hmaph]hmap}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubah}(h]h ]h"]h$]h&]hhuh1johjhhhjhKubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjhhhjhKubah}(h]jah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubjh)}(hhh]j9)}(h$Tests for a iosys mapping to be NULLh]h$Tests for a iosys mapping to be NULL}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jghjhhhjhKubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjuh1jhhhj^ hNhNubj)}(h**Parameters** ``const struct iosys_map *map`` The iosys_map structure **Description** Depending on the state of struct iosys_map.is_iomem, tests if the mapping is NULL. **Return** True if the mapping is NULL, or false otherwise.h](j9)}(h**Parameters**h]j)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j)}(h8``const struct iosys_map *map`` The iosys_map structure h](j)}(h``const struct iosys_map *map``h]j)}(hjh]hconst struct iosys_map *map}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj9)}(h**Description**h]j)}(hj5h]h Description}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(hRDepending on the state of struct iosys_map.is_iomem, tests if the mapping is NULL.h]hRDepending on the state of struct iosys_map.is_iomem, tests if the mapping is NULL.}(hjMhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(h **Return**h]j)}(hj\h]hReturn}(hhhj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(h0True if the mapping is NULL, or false otherwise.h]h0True if the mapping is NULL, or false otherwise.}(hjthjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_is_set (C function)c.iosys_map_is_sethNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h3bool iosys_map_is_set (const struct iosys_map *map)h]j)}(h2bool iosys_map_is_set(const struct iosys_map *map)h](j8)}(hjWh]hbool}(hhhjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjhhhjhKubj7)}(hiosys_map_is_seth]j=)}(hiosys_map_is_seth]hiosys_map_is_set}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjhhhjhKubjp)}(h(const struct iosys_map *map)h]jv)}(hconst struct iosys_map *maph](j)}(hjh]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.iosys_map_is_setasbuh1hhjubj&)}(h h]h }(hhhj6hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hmaph]hmap}(hhhjQhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubah}(h]h ]h"]h$]h&]hhuh1johjhhhjhKubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjhhhjhKubah}(h]jah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjhhubjh)}(hhh]j9)}(h'Tests if the iosys mapping has been seth]h'Tests if the iosys mapping has been set}(hj~hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjyhhubah}(h]h ]h"]h$]h&]uh1jghjhhhjhKubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjuh1jhhhj^ hNhNubj)}(h**Parameters** ``const struct iosys_map *map`` The iosys_map structure **Description** Depending on the state of struct iosys_map.is_iomem, tests if the mapping has been set. **Return** True if the mapping is been set, or false otherwise.h](j9)}(h**Parameters**h]j)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j)}(h8``const struct iosys_map *map`` The iosys_map structure h](j)}(h``const struct iosys_map *map``h]j)}(hjh]hconst struct iosys_map *map}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj9)}(h**Description**h]j)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(hWDepending on the state of struct iosys_map.is_iomem, tests if the mapping has been set.h]hWDepending on the state of struct iosys_map.is_iomem, tests if the mapping has been set.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(h **Return**h]j)}(hjh]hReturn}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubj9)}(h4True if the mapping is been set, or false otherwise.h]h4True if the mapping is been set, or false otherwise.}(hj7hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_clear (C function)c.iosys_map_clearhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h,void iosys_map_clear (struct iosys_map *map)h]j)}(h+void iosys_map_clear(struct iosys_map *map)h](j8)}(hvoidh]hvoid}(hhhjdhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj`hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMubj&)}(h h]h }(hhhjshhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj`hhhjrhMubj7)}(hiosys_map_clearh]j=)}(hiosys_map_clearh]hiosys_map_clear}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj`hhhjrhMubjp)}(h(struct iosys_map *map)h]jv)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.iosys_map_clearasbuh1hhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hmaph]hmap}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubah}(h]h ]h"]h$]h&]hhuh1johj`hhhjrhMubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj\hhhjrhMubah}(h]jWah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM hjYhhubjh)}(hhh]j9)}(h Clears a iosys mapping structureh]h Clears a iosys mapping structure}(hj'hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj"hhubah}(h]h ]h"]h$]h&]uh1jghjYhhhjrhMubeh}(h]h ](j functioneh"]h$]h&]jj jj=jj=juh1jhhhj^ hNhNubj)}(hX **Parameters** ``struct iosys_map *map`` The iosys_map structure **Description** Clears all fields to zero, including struct iosys_map.is_iomem, so mapping structures that were set to point to I/O memory are reset for system memory. Pointers are cleared to NULL. This is the default.h](j9)}(h**Parameters**h]j)}(hjGh]h Parameters}(hhhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjAubj)}(hhh]j)}(h2``struct iosys_map *map`` The iosys_map structure h](j)}(h``struct iosys_map *map``h]j)}(hjfh]hstruct iosys_map *map}(hhhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj`ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj{hMhj|ubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]uh1jhj{hMhj]ubah}(h]h ]h"]h$]h&]uh1jhjAubj9)}(h**Description**h]j)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjAubj9)}(hClears all fields to zero, including struct iosys_map.is_iomem, so mapping structures that were set to point to I/O memory are reset for system memory. Pointers are cleared to NULL. This is the default.h]hClears all fields to zero, including struct iosys_map.is_iomem, so mapping structures that were set to point to I/O memory are reset for system memory. Pointers are cleared to NULL. This is the default.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjAubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_memcpy_to (C function)c.iosys_map_memcpy_tohNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h`void iosys_map_memcpy_to (struct iosys_map *dst, size_t dst_offset, const void *src, size_t len)h]j)}(h_void iosys_map_memcpy_to(struct iosys_map *dst, size_t dst_offset, const void *src, size_t len)h](j8)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjhhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjhhhjhMubj7)}(hiosys_map_memcpy_toh]j=)}(hiosys_map_memcpy_toh]hiosys_map_memcpy_to}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjhhhjhMubjp)}(hG(struct iosys_map *dst, size_t dst_offset, const void *src, size_t len)h](jv)}(hstruct iosys_map *dsth](j)}(hjh]hstruct}(hhhj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhj0hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjAhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj>ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjCmodnameN classnameNjj)}j]j)}jj sbc.iosys_map_memcpy_toasbuh1hhjubj&)}(h h]h }(hhhjahhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hdsth]hdst}(hhhj|hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubjv)}(hsize_t dst_offseth](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNjj)}j]j]c.iosys_map_memcpy_toasbuh1hhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj=)}(h dst_offseth]h dst_offset}(hhhjhhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubjv)}(hconst void *srch](j)}(hjh]hconst}(hhhjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj&)}(h h]h }(hhhjhhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj8)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjubj&)}(h h]h }(hhhj hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjubj)}(hjh]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj=)}(hsrch]hsrc}(hhhj! hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubjv)}(h size_t lenh](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhj= hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj: ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj? modnameN classnameNjj)}j]j]c.iosys_map_memcpy_toasbuh1hhj6 ubj&)}(h h]h }(hhhj[ hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj6 ubj=)}(hlenh]hlen}(hhhji hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj6 ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjubeh}(h]h ]h"]h$]h&]hhuh1johjhhhjhMubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjhhhjhMubah}(h]jah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjhhubjh)}(hhh]j9)}(hMemcpy into offset of iosys_maph]hMemcpy into offset of iosys_map}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj hhubah}(h]h ]h"]h$]h&]uh1jghjhhhjhMubeh}(h]h ](j functioneh"]h$]h&]jj jj jj juh1jhhhj^ hNhNubj)}(hX**Parameters** ``struct iosys_map *dst`` The iosys_map structure ``size_t dst_offset`` The offset from which to copy ``const void *src`` The source buffer ``size_t len`` The number of byte in src **Description** Copies data into a iosys_map with an offset. The source buffer is in system memory. Depending on the buffer's location, the helper picks the correct method of accessing the memory.h](j9)}(h**Parameters**h]j)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj ubj)}(hhh](j)}(h2``struct iosys_map *dst`` The iosys_map structure h](j)}(h``struct iosys_map *dst``h]j)}(hj h]hstruct iosys_map *dst}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj ubj)}(h4``size_t dst_offset`` The offset from which to copy h](j)}(h``size_t dst_offset``h]j)}(hj!h]hsize_t dst_offset}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj !ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj!ubj)}(hhh]j9)}(hThe offset from which to copyh]hThe offset from which to copy}(hj)!hj'!hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj#!hMhj$!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj#!hMhj ubj)}(h&``const void *src`` The source buffer h](j)}(h``const void *src``h]j)}(hjG!h]hconst void *src}(hhhjI!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjE!ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjA!ubj)}(hhh]j9)}(hThe source bufferh]hThe source buffer}(hjb!hj`!hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj\!hMhj]!ubah}(h]h ]h"]h$]h&]uh1jhjA!ubeh}(h]h ]h"]h$]h&]uh1jhj\!hMhj ubj)}(h)``size_t len`` The number of byte in src h](j)}(h``size_t len``h]j)}(hj!h]h size_t len}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~!ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjz!ubj)}(hhh]j9)}(hThe number of byte in srch]hThe number of byte in src}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj!hMhj!ubah}(h]h ]h"]h$]h&]uh1jhjz!ubeh}(h]h ]h"]h$]h&]uh1jhj!hMhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj9)}(h**Description**h]j)}(hj!h]h Description}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj ubj9)}(hCopies data into a iosys_map with an offset. The source buffer is in system memory. Depending on the buffer's location, the helper picks the correct method of accessing the memory.h]hCopies data into a iosys_map with an offset. The source buffer is in system memory. Depending on the buffer’s location, the helper picks the correct method of accessing the memory.}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "iosys_map_memcpy_from (C function)c.iosys_map_memcpy_fromhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hbvoid iosys_map_memcpy_from (void *dst, const struct iosys_map *src, size_t src_offset, size_t len)h]j)}(havoid iosys_map_memcpy_from(void *dst, const struct iosys_map *src, size_t src_offset, size_t len)h](j8)}(hvoidh]hvoid}(hhhj"hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj!hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM)ubj&)}(h h]h }(hhhj"hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj!hhhj"hM)ubj7)}(hiosys_map_memcpy_fromh]j=)}(hiosys_map_memcpy_fromh]hiosys_map_memcpy_from}(hhhj!"hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj"ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj!hhhj"hM)ubjp)}(hG(void *dst, const struct iosys_map *src, size_t src_offset, size_t len)h](jv)}(h void *dsth](j8)}(hvoidh]hvoid}(hhhj="hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj9"ubj&)}(h h]h }(hhhjK"hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj9"ubj)}(hjh]h*}(hhhjY"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9"ubj=)}(hdsth]hdst}(hhhjf"hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj9"ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj5"ubjv)}(hconst struct iosys_map *srch](j)}(hjh]hconst}(hhhj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{"ubj&)}(h h]h }(hhhj"hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj{"ubj)}(hjh]hstruct}(hhhj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{"ubj&)}(h h]h }(hhhj"hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj{"ubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhj"hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj"ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj"modnameN classnameNjj)}j]j)}jj#"sbc.iosys_map_memcpy_fromasbuh1hhj{"ubj&)}(h h]h }(hhhj"hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj{"ubj)}(hjh]h*}(hhhj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{"ubj=)}(hsrch]hsrc}(hhhj"hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj{"ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj5"ubjv)}(hsize_t src_offseth](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhj#hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj #ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj#modnameN classnameNjj)}j]j"c.iosys_map_memcpy_fromasbuh1hhj#ubj&)}(h h]h }(hhhj-#hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj#ubj=)}(h src_offseth]h src_offset}(hhhj;#hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj5"ubjv)}(h size_t lenh](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhjW#hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjT#ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjY#modnameN classnameNjj)}j]j"c.iosys_map_memcpy_fromasbuh1hhjP#ubj&)}(h h]h }(hhhju#hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjP#ubj=)}(hlenh]hlen}(hhhj#hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjP#ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj5"ubeh}(h]h ]h"]h$]h&]hhuh1johj!hhhj"hM)ubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj!hhhj"hM)ubah}(h]j!ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM2hj!hhubjh)}(hhh]j9)}(h(Memcpy from iosys_map into system memoryh]h(Memcpy from iosys_map into system memory}(hj#hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM(hj#hhubah}(h]h ]h"]h$]h&]uh1jghj!hhhj"hM)ubeh}(h]h ](j functioneh"]h$]h&]jj jj#jj#juh1jhhhj^ hNhNubj)}(hX**Parameters** ``void *dst`` Destination in system memory ``const struct iosys_map *src`` The iosys_map structure ``size_t src_offset`` The offset from which to copy ``size_t len`` The number of byte in src **Description** Copies data from a iosys_map with an offset. The dest buffer is in system memory. Depending on the mapping location, the helper picks the correct method of accessing the memory.h](j9)}(h**Parameters**h]j)}(hj#h]h Parameters}(hhhj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM,hj#ubj)}(hhh](j)}(h+``void *dst`` Destination in system memory h](j)}(h ``void *dst``h]j)}(hj#h]h void *dst}(hhhj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM)hj#ubj)}(hhh]j9)}(hDestination in system memoryh]hDestination in system memory}(hj $hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj$hM)hj$ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj$hM)hj#ubj)}(h8``const struct iosys_map *src`` The iosys_map structure h](j)}(h``const struct iosys_map *src``h]j)}(hj($h]hconst struct iosys_map *src}(hhhj*$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&$ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM*hj"$ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjC$hjA$hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj=$hM*hj>$ubah}(h]h ]h"]h$]h&]uh1jhj"$ubeh}(h]h ]h"]h$]h&]uh1jhj=$hM*hj#ubj)}(h4``size_t src_offset`` The offset from which to copy h](j)}(h``size_t src_offset``h]j)}(hja$h]hsize_t src_offset}(hhhjc$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_$ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM+hj[$ubj)}(hhh]j9)}(hThe offset from which to copyh]hThe offset from which to copy}(hj|$hjz$hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjv$hM+hjw$ubah}(h]h ]h"]h$]h&]uh1jhj[$ubeh}(h]h ]h"]h$]h&]uh1jhjv$hM+hj#ubj)}(h)``size_t len`` The number of byte in src h](j)}(h``size_t len``h]j)}(hj$h]h size_t len}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM,hj$ubj)}(hhh]j9)}(hThe number of byte in srch]hThe number of byte in src}(hj$hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj$hM,hj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hM,hj#ubeh}(h]h ]h"]h$]h&]uh1jhj#ubj9)}(h**Description**h]j)}(hj$h]h Description}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM.hj#ubj9)}(hCopies data from a iosys_map with an offset. The dest buffer is in system memory. Depending on the mapping location, the helper picks the correct method of accessing the memory.h]hCopies data from a iosys_map with an offset. The dest buffer is in system memory. Depending on the mapping location, the helper picks the correct method of accessing the memory.}(hj$hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM.hj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_incr (C function)c.iosys_map_incrhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h8void iosys_map_incr (struct iosys_map *map, size_t incr)h]j)}(h7void iosys_map_incr(struct iosys_map *map, size_t incr)h](j8)}(hvoidh]hvoid}(hhhj%hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj%hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM=ubj&)}(h h]h }(hhhj)%hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj%hhhj(%hM=ubj7)}(hiosys_map_incrh]j=)}(hiosys_map_incrh]hiosys_map_incr}(hhhj;%hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj7%ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj%hhhj(%hM=ubjp)}(h$(struct iosys_map *map, size_t incr)h](jv)}(hstruct iosys_map *maph](j)}(hjh]hstruct}(hhhjW%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjS%ubj&)}(h h]h }(hhhjd%hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjS%ubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhju%hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjr%ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjw%modnameN classnameNjj)}j]j)}jj=%sbc.iosys_map_incrasbuh1hhjS%ubj&)}(h h]h }(hhhj%hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjS%ubj)}(hjh]h*}(hhhj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjS%ubj=)}(hmaph]hmap}(hhhj%hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjS%ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjO%ubjv)}(h size_t incrh](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhj%hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj%ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj%modnameN classnameNjj)}j]j%c.iosys_map_incrasbuh1hhj%ubj&)}(h h]h }(hhhj%hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj%ubj=)}(hincrh]hincr}(hhhj%hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjO%ubeh}(h]h ]h"]h$]h&]hhuh1johj%hhhj(%hM=ubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj%hhhj(%hM=ubah}(h]j %ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMChj%hhubjh)}(hhh]j9)}(h0Increments the address stored in a iosys mappingh]h0Increments the address stored in a iosys mapping}(hj%&hj#&hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM<hj &hhubah}(h]h ]h"]h$]h&]uh1jghj%hhhj(%hM=ubeh}(h]h ](j functioneh"]h$]h&]jj jj;&jj;&juh1jhhhj^ hNhNubj)}(hX**Parameters** ``struct iosys_map *map`` The iosys_map structure ``size_t incr`` The number of bytes to increment **Description** Increments the address stored in a iosys mapping. Depending on the buffer's location, the correct value will be updated.h](j9)}(h**Parameters**h]j)}(hjE&h]h Parameters}(hhhjG&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC&ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM@hj?&ubj)}(hhh](j)}(h2``struct iosys_map *map`` The iosys_map structure h](j)}(h``struct iosys_map *map``h]j)}(hjd&h]hstruct iosys_map *map}(hhhjf&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb&ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM=hj^&ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hj&hj}&hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjy&hM=hjz&ubah}(h]h ]h"]h$]h&]uh1jhj^&ubeh}(h]h ]h"]h$]h&]uh1jhjy&hM=hj[&ubj)}(h1``size_t incr`` The number of bytes to increment h](j)}(h``size_t incr``h]j)}(hj&h]h size_t incr}(hhhj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM>hj&ubj)}(hhh]j9)}(h The number of bytes to incrementh]h The number of bytes to increment}(hj&hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj&hM>hj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&hM>hj[&ubeh}(h]h ]h"]h$]h&]uh1jhj?&ubj9)}(h**Description**h]j)}(hj&h]h Description}(hhhj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM@hj?&ubj9)}(hxIncrements the address stored in a iosys mapping. Depending on the buffer's location, the correct value will be updated.h]hzIncrements the address stored in a iosys mapping. Depending on the buffer’s location, the correct value will be updated.}(hj&hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM@hj?&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_memset (C function)c.iosys_map_memsethNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hSvoid iosys_map_memset (struct iosys_map *dst, size_t offset, int value, size_t len)h]j)}(hRvoid iosys_map_memset(struct iosys_map *dst, size_t offset, int value, size_t len)h](j8)}(hvoidh]hvoid}(hhhj'hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj'hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMMubj&)}(h h]h }(hhhj,'hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj'hhhj+'hMMubj7)}(hiosys_map_memseth]j=)}(hiosys_map_memseth]hiosys_map_memset}(hhhj>'hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj:'ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj'hhhj+'hMMubjp)}(h=(struct iosys_map *dst, size_t offset, int value, size_t len)h](jv)}(hstruct iosys_map *dsth](j)}(hjh]hstruct}(hhhjZ'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjV'ubj&)}(h h]h }(hhhjg'hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjV'ubh)}(hhh]j=)}(h iosys_maph]h iosys_map}(hhhjx'hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hju'ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjz'modnameN classnameNjj)}j]j)}jj@'sbc.iosys_map_memsetasbuh1hhjV'ubj&)}(h h]h }(hhhj'hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjV'ubj)}(hjh]h*}(hhhj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV'ubj=)}(hdsth]hdst}(hhhj'hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjV'ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjR'ubjv)}(h size_t offseth](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhj'hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj'ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj'modnameN classnameNjj)}j]j'c.iosys_map_memsetasbuh1hhj'ubj&)}(h h]h }(hhhj'hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj'ubj=)}(hoffseth]hoffset}(hhhj'hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjR'ubjv)}(h int valueh](j8)}(hinth]hint}(hhhj(hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj(ubj&)}(h h]h }(hhhj"(hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj(ubj=)}(hvalueh]hvalue}(hhhj0(hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj(ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjR'ubjv)}(h size_t lenh](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhjL(hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjI(ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjN(modnameN classnameNjj)}j]j'c.iosys_map_memsetasbuh1hhjE(ubj&)}(h h]h }(hhhjj(hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjE(ubj=)}(hlenh]hlen}(hhhjx(hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjE(ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjR'ubeh}(h]h ]h"]h$]h&]hhuh1johj'hhhj+'hMMubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj'hhhj+'hMMubah}(h]j'ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMUhj'hhubjh)}(hhh]j9)}(hMemset iosys_maph]hMemset iosys_map}(hj(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMLhj(hhubah}(h]h ]h"]h$]h&]uh1jghj'hhhj+'hMMubeh}(h]h ](j functioneh"]h$]h&]jj jj(jj(juh1jhhhj^ hNhNubj)}(hXf**Parameters** ``struct iosys_map *dst`` The iosys_map structure ``size_t offset`` Offset from dst where to start setting value ``int value`` The value to set ``size_t len`` The number of bytes to set in dst **Description** Set value in iosys_map. Depending on the buffer's location, the helper picks the correct method of accessing the memory.h](j9)}(h**Parameters**h]j)}(hj(h]h Parameters}(hhhj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMPhj(ubj)}(hhh](j)}(h2``struct iosys_map *dst`` The iosys_map structure h](j)}(h``struct iosys_map *dst``h]j)}(hj(h]hstruct iosys_map *dst}(hhhj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMMhj(ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hj(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj(hMMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hMMhj(ubj)}(h?``size_t offset`` Offset from dst where to start setting value h](j)}(h``size_t offset``h]j)}(hj)h]h size_t offset}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMNhj)ubj)}(hhh]j9)}(h,Offset from dst where to start setting valueh]h,Offset from dst where to start setting value}(hj8)hj6)hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj2)hMNhj3)ubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhj2)hMNhj(ubj)}(h``int value`` The value to set h](j)}(h ``int value``h]j)}(hjV)h]h int value}(hhhjX)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT)ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMOhjP)ubj)}(hhh]j9)}(hThe value to seth]hThe value to set}(hjq)hjo)hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjk)hMOhjl)ubah}(h]h ]h"]h$]h&]uh1jhjP)ubeh}(h]h ]h"]h$]h&]uh1jhjk)hMOhj(ubj)}(h1``size_t len`` The number of bytes to set in dst h](j)}(h``size_t len``h]j)}(hj)h]h size_t len}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMPhj)ubj)}(hhh]j9)}(h!The number of bytes to set in dsth]h!The number of bytes to set in dst}(hj)hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj)hMPhj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhj)hMPhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(ubj9)}(h**Description**h]j)}(hj)h]h Description}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMRhj(ubj9)}(hxSet value in iosys_map. Depending on the buffer's location, the helper picks the correct method of accessing the memory.h]hzSet value in iosys_map. Depending on the buffer’s location, the helper picks the correct method of accessing the memory.}(hj)hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMRhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_rd (C macro)c.iosys_map_rdhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h iosys_map_rdh]j)}(h iosys_map_rdh]j7)}(h iosys_map_rdh]j=)}(hj *h]h iosys_map_rd}(hhhj*hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj*ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj *hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj*hhhj&*hMubah}(h]j*ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj*hhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghj*hhhj&*hMubeh}(h]h ](j macroeh"]h$]h&]jj jj@*jj@*juh1jhhhj^ hNhNubj9)}(h*``iosys_map_rd (map__, offset__, type__)``h]j)}(hjF*h]h&iosys_map_rd (map__, offset__, type__)}(hhhjH*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD*ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj^ hhubj)}(hhh]j9)}(h&Read a C-type value from the iosys_maph]h&Read a C-type value from the iosys_map}(hja*hj_*hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhM}hj\*ubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(hX**Parameters** ``map__`` The iosys_map structure ``offset__`` The offset from which to read ``type__`` Type of the value being read **Description** Read a C type value (u8, u16, u32 and u64) from iosys_map. For other types or if pointer may be unaligned (and problematic for the architecture supported), use iosys_map_memcpy_from(). **Return** The value read from the mapping.h](j9)}(h**Parameters**h]j)}(hjz*h]h Parameters}(hhhj|*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx*ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjt*ubj)}(hhh](j)}(h"``map__`` The iosys_map structure h](j)}(h ``map__``h]j)}(hj*h]hmap__}(hhhj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj*ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hj*hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj*hMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hMhj*ubj)}(h+``offset__`` The offset from which to read h](j)}(h ``offset__``h]j)}(hj*h]hoffset__}(hhhj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj*ubj)}(hhh]j9)}(hThe offset from which to readh]hThe offset from which to read}(hj*hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj*hMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hMhj*ubj)}(h(``type__`` Type of the value being read h](j)}(h ``type__``h]j)}(hj +h]htype__}(hhhj +hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj +ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj+ubj)}(hhh]j9)}(hType of the value being readh]hType of the value being read}(hj&+hj$+hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj +hMhj!+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj +hMhj*ubeh}(h]h ]h"]h$]h&]uh1jhjt*ubj9)}(h**Description**h]j)}(hjF+h]h Description}(hhhjH+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD+ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjt*ubj9)}(hRead a C type value (u8, u16, u32 and u64) from iosys_map. For other types or if pointer may be unaligned (and problematic for the architecture supported), use iosys_map_memcpy_from().h]hRead a C type value (u8, u16, u32 and u64) from iosys_map. For other types or if pointer may be unaligned (and problematic for the architecture supported), use iosys_map_memcpy_from().}(hj^+hj\+hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjt*ubj9)}(h **Return**h]j)}(hjm+h]hReturn}(hhhjo+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk+ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjt*ubj9)}(h The value read from the mapping.h]h The value read from the mapping.}(hj+hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjt*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_wr (C macro)c.iosys_map_wrhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(h iosys_map_wrh]j)}(h iosys_map_wrh]j7)}(h iosys_map_wrh]j=)}(hj+h]h iosys_map_wr}(hhhj+hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj+ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj+hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj+hhhj+hMubah}(h]j+ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj+hhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghj+hhhj+hMubeh}(h]h ](j macroeh"]h$]h&]jj jj+jj+juh1jhhhj^ hNhNubj9)}(h1``iosys_map_wr (map__, offset__, type__, val__)``h]j)}(hj+h]h-iosys_map_wr (map__, offset__, type__, val__)}(hhhj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj^ hhubj)}(hhh]j9)}(h%Write a C-type value to the iosys_maph]h%Write a C-type value to the iosys_map}(hj,hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(hX**Parameters** ``map__`` The iosys_map structure ``offset__`` The offset from the mapping to write to ``type__`` Type of the value being written ``val__`` Value to write **Description** Write a C type value (u8, u16, u32 and u64) to the iosys_map. For other types or if pointer may be unaligned (and problematic for the architecture supported), use iosys_map_memcpy_to()h](j9)}(h**Parameters**h]j)}(hj,h]h Parameters}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj,ubj)}(hhh](j)}(h"``map__`` The iosys_map structure h](j)}(h ``map__``h]j)}(hj<,h]hmap__}(hhhj>,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:,ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj6,ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hjW,hjU,hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjQ,hMhjR,ubah}(h]h ]h"]h$]h&]uh1jhj6,ubeh}(h]h ]h"]h$]h&]uh1jhjQ,hMhj3,ubj)}(h5``offset__`` The offset from the mapping to write to h](j)}(h ``offset__``h]j)}(hju,h]hoffset__}(hhhjw,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs,ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjo,ubj)}(hhh]j9)}(h'The offset from the mapping to write toh]h'The offset from the mapping to write to}(hj,hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jhjo,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj3,ubj)}(h+``type__`` Type of the value being written h](j)}(h ``type__``h]j)}(hj,h]htype__}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj,ubj)}(hhh]j9)}(hType of the value being writtenh]hType of the value being written}(hj,hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj3,ubj)}(h``val__`` Value to write h](j)}(h ``val__``h]j)}(hj,h]hval__}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj,ubj)}(hhh]j9)}(hValue to writeh]hValue to write}(hj-hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj3,ubeh}(h]h ]h"]h$]h&]uh1jhj,ubj9)}(h**Description**h]j)}(hj"-h]h Description}(hhhj$-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj -ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj,ubj9)}(hWrite a C type value (u8, u16, u32 and u64) to the iosys_map. For other types or if pointer may be unaligned (and problematic for the architecture supported), use iosys_map_memcpy_to()h]hWrite a C type value (u8, u16, u32 and u64) to the iosys_map. For other types or if pointer may be unaligned (and problematic for the architecture supported), use iosys_map_memcpy_to()}(hj:-hj8-hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_rd_field (C macro)c.iosys_map_rd_fieldhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hiosys_map_rd_fieldh]j)}(hiosys_map_rd_fieldh]j7)}(hiosys_map_rd_fieldh]j=)}(hja-h]hiosys_map_rd_field}(hhhjk-hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjg-ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjc-hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj_-hhhj~-hMubah}(h]jZ-ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj\-hhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghj\-hhhj~-hMubeh}(h]h ](j macroeh"]h$]h&]jj jj-jj-juh1jhhhj^ hNhNubj9)}(hG``iosys_map_rd_field (map__, struct_offset__, struct_type__, field__)``h]j)}(hj-h]hCiosys_map_rd_field (map__, struct_offset__, struct_type__, field__)}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj^ hhubj)}(hhh]j9)}(h,Read a member from a struct in the iosys_maph]h,Read a member from a struct in the iosys_map}(hj-hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(hX2 **Parameters** ``map__`` The iosys_map structure ``struct_offset__`` Offset from the beginning of the map, where the struct is located ``struct_type__`` The struct describing the layout of the mapping ``field__`` Member of the struct to read **Description** Read a value from iosys_map considering its layout is described by a C struct starting at **struct_offset__**. The field offset and size is calculated and its value read. If the field access would incur in un-aligned access, then either iosys_map_memcpy_from() needs to be used or the architecture must support it. For example: suppose there is a **struct** foo defined as below and the value ``foo.field2.inner2`` needs to be read from the iosys_map: .. code-block:: c struct foo { int field1; struct { int inner1; int inner2; } field2; int field3; } __packed; This is the expected memory layout of a buffer using iosys_map_rd_field(): +------------------------------+--------------------------+ | Address | Content | +==============================+==========================+ | buffer + 0000 | start of mmapped buffer | | | pointed by iosys_map | +------------------------------+--------------------------+ | ... | ... | +------------------------------+--------------------------+ | buffer + ``struct_offset__`` | start of ``struct foo`` | +------------------------------+--------------------------+ | ... | ... | +------------------------------+--------------------------+ | buffer + wwww | ``foo.field2.inner2`` | +------------------------------+--------------------------+ | ... | ... | +------------------------------+--------------------------+ | buffer + yyyy | end of ``struct foo`` | +------------------------------+--------------------------+ | ... | ... | +------------------------------+--------------------------+ | buffer + zzzz | end of mmaped buffer | +------------------------------+--------------------------+ Values automatically calculated by this macro or not needed are denoted by wwww, yyyy and zzzz. This is the code to read that value: .. code-block:: c x = iosys_map_rd_field(&map, offset, struct foo, field2.inner2); **Return** The value read from the mapping.h](j9)}(h**Parameters**h]j)}(hj-h]h Parameters}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj)}(hhh](j)}(h"``map__`` The iosys_map structure h](j)}(h ``map__``h]j)}(hj-h]hmap__}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hj .hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj.hMhj-ubj)}(hV``struct_offset__`` Offset from the beginning of the map, where the struct is located h](j)}(h``struct_offset__``h]j)}(hj*.h]hstruct_offset__}(hhhj,.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(.ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj$.ubj)}(hhh]j9)}(hAOffset from the beginning of the map, where the struct is locatedh]hAOffset from the beginning of the map, where the struct is located}(hjE.hjC.hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj@.ubah}(h]h ]h"]h$]h&]uh1jhj$.ubeh}(h]h ]h"]h$]h&]uh1jhj?.hMhj-ubj)}(hB``struct_type__`` The struct describing the layout of the mapping h](j)}(h``struct_type__``h]j)}(hjd.h]h struct_type__}(hhhjf.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb.ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj^.ubj)}(hhh]j9)}(h/The struct describing the layout of the mappingh]h/The struct describing the layout of the mapping}(hj.hj}.hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjy.hMhjz.ubah}(h]h ]h"]h$]h&]uh1jhj^.ubeh}(h]h ]h"]h$]h&]uh1jhjy.hMhj-ubj)}(h)``field__`` Member of the struct to read h](j)}(h ``field__``h]j)}(hj.h]hfield__}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj.ubj)}(hhh]j9)}(hMember of the struct to readh]hMember of the struct to read}(hj.hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj.hMhj-ubeh}(h]h ]h"]h$]h&]uh1jhj-ubj9)}(h**Description**h]j)}(hj.h]h Description}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj9)}(hXRead a value from iosys_map considering its layout is described by a C struct starting at **struct_offset__**. The field offset and size is calculated and its value read. If the field access would incur in un-aligned access, then either iosys_map_memcpy_from() needs to be used or the architecture must support it. For example: suppose there is a **struct** foo defined as below and the value ``foo.field2.inner2`` needs to be read from the iosys_map:h](hZRead a value from iosys_map considering its layout is described by a C struct starting at }(hZRead a value from iosys_map considering its layout is described by a C struct starting at hj.hhhNhNubj)}(h**struct_offset__**h]hstruct_offset__}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh. The field offset and size is calculated and its value read. If the field access would incur in un-aligned access, then either iosys_map_memcpy_from() needs to be used or the architecture must support it. For example: suppose there is a }(h. The field offset and size is calculated and its value read. If the field access would incur in un-aligned access, then either iosys_map_memcpy_from() needs to be used or the architecture must support it. For example: suppose there is a hj.hhhNhNubj)}(h **struct**h]hstruct}(hhhj /hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh$ foo defined as below and the value }(h$ foo defined as below and the value hj.hhhNhNubj)}(h``foo.field2.inner2``h]hfoo.field2.inner2}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh% needs to be read from the iosys_map:}(h% needs to be read from the iosys_map:hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubjj)}(hstruct foo { int field1; struct { int inner1; int inner2; } field2; int field3; } __packed;h]hstruct foo { int field1; struct { int inner1; int inner2; } field2; int field3; } __packed;}(hhhj7/ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj9)}(hJThis is the expected memory layout of a buffer using iosys_map_rd_field():h]hJThis is the expected memory layout of a buffer using iosys_map_rd_field():}(hjI/hjG/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj( )}(hhh]j- )}(hhh](j2 )}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j1 hjY/ubj2 )}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j1 hjY/ubhthead)}(hhh]jM )}(hhh](jR )}(hhh]j9)}(hAddressh]hAddress}(hj}/hj{/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjx/ubah}(h]h ]h"]h$]h&]uh1jQ hju/ubjR )}(hhh]j9)}(hContenth]hContent}(hj/hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj/hMhj/ubah}(h]h ]h"]h$]h&]uh1jQ hju/ubeh}(h]h ]h"]h$]h&]uh1jL hjr/ubah}(h]h ]h"]h$]h&]uh1jp/hjY/ubjH )}(hhh](jM )}(hhh](jR )}(hhh]j9)}(h buffer + 0000h]h buffer + 0000}(hj/hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj/ubah}(h]h ]h"]h$]h&]uh1jQ hj/ubjR )}(hhh]j9)}(h,start of mmapped buffer pointed by iosys_maph]h,start of mmapped buffer pointed by iosys_map}(hj/hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj/hMhj/ubah}(h]h ]h"]h$]h&]uh1jQ hj/ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h...h]h...}(hj/hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj/ubah}(h]h ]h"]h$]h&]uh1jQ hj/ubjR )}(hhh]j9)}(h...h]h...}(hj0hj 0hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj0hMhj 0ubah}(h]h ]h"]h$]h&]uh1jQ hj/ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(hbuffer + ``struct_offset__``h](h buffer + }(h buffer + hj,0hhhNhNubj)}(h``struct_offset__``h]hstruct_offset__}(hhhj50hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,0ubeh}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj)0ubah}(h]h ]h"]h$]h&]uh1jQ hj&0ubjR )}(hhh]j9)}(hstart of ``struct foo``h](h start of }(h start of hjS0hhhNhNubj)}(h``struct foo``h]h struct foo}(hhhj\0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjS0ubeh}(h]h ]h"]h$]h&]uh1j8hjI0hMhjP0ubah}(h]h ]h"]h$]h&]uh1jQ hj&0ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h...h]h...}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj0ubah}(h]h ]h"]h$]h&]uh1jQ hj|0ubjR )}(hhh]j9)}(h...h]h...}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jQ hj|0ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h buffer + wwwwh]h buffer + wwww}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj0ubah}(h]h ]h"]h$]h&]uh1jQ hj0ubjR )}(hhh]j9)}(h``foo.field2.inner2``h]j)}(hj0h]hfoo.field2.inner2}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j8hj0hMhj0ubah}(h]h ]h"]h$]h&]uh1jQ hj0ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h...h]h...}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj0ubah}(h]h ]h"]h$]h&]uh1jQ hj0ubjR )}(hhh]j9)}(h...h]h...}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj 1hMhj1ubah}(h]h ]h"]h$]h&]uh1jQ hj0ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h buffer + yyyyh]h buffer + yyyy}(hj51hj31hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj01ubah}(h]h ]h"]h$]h&]uh1jQ hj-1ubjR )}(hhh]j9)}(hend of ``struct foo``h](hend of }(hend of hjK1hhhNhNubj)}(h``struct foo``h]h struct foo}(hhhjT1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK1ubeh}(h]h ]h"]h$]h&]uh1j8hjA1hMhjH1ubah}(h]h ]h"]h$]h&]uh1jQ hj-1ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h...h]h...}(hj|1hjz1hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjw1ubah}(h]h ]h"]h$]h&]uh1jQ hjt1ubjR )}(hhh]j9)}(h...h]h...}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jQ hjt1ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubjM )}(hhh](jR )}(hhh]j9)}(h buffer + zzzzh]h buffer + zzzz}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj1ubah}(h]h ]h"]h$]h&]uh1jQ hj1ubjR )}(hhh]j9)}(hend of mmaped bufferh]hend of mmaped buffer}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jQ hj1ubeh}(h]h ]h"]h$]h&]uh1jL hj/ubeh}(h]h ]h"]h$]h&]uh1jG hjY/ubeh}(h]h ]h"]h$]h&]colsKuh1j, hjV/ubah}(h]h ]h"]h$]h&]uh1j' hj-ubj9)}(hValues automatically calculated by this macro or not needed are denoted by wwww, yyyy and zzzz. This is the code to read that value:h]hValues automatically calculated by this macro or not needed are denoted by wwww, yyyy and zzzz. This is the code to read that value:}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubjj)}(h@x = iosys_map_rd_field(&map, offset, struct foo, field2.inner2);h]h@x = iosys_map_rd_field(&map, offset, struct foo, field2.inner2);}(hhhj2ubah}(h]h ]h"]h$]h&]hhj j j j }uh1jih_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj9)}(h **Return**h]j)}(hj2h]hReturn}(hhhj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubj9)}(h The value read from the mapping.h]h The value read from the mapping.}(hj02hj.2hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosys_map_wr_field (C macro)c.iosys_map_wr_fieldhNtauh1j hj^ hhhNhNubj)}(hhh](j)}(hiosys_map_wr_fieldh]j)}(hiosys_map_wr_fieldh]j7)}(hiosys_map_wr_fieldh]j=)}(hjW2h]hiosys_map_wr_field}(hhhja2hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj]2ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjY2hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMubah}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjU2hhhjt2hMubah}(h]jP2ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjR2hhubjh)}(hhh]h}(h]h ]h"]h$]h&]uh1jghjR2hhhjt2hMubeh}(h]h ](j macroeh"]h$]h&]jj jj2jj2juh1jhhhj^ hNhNubj9)}(hN``iosys_map_wr_field (map__, struct_offset__, struct_type__, field__, val__)``h]j)}(hj2h]hJiosys_map_wr_field (map__, struct_offset__, struct_type__, field__, val__)}(hhhj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj^ hhubj)}(hhh]j9)}(h.Write to a member of a struct in the iosys_maph]h.Write to a member of a struct in the iosys_map}(hj2hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj2ubah}(h]h ]h"]h$]h&]uh1jhj^ hhhNhNubj)}(hX**Parameters** ``map__`` The iosys_map structure ``struct_offset__`` Offset from the beginning of the map, where the struct is located ``struct_type__`` The struct describing the layout of the mapping ``field__`` Member of the struct to read ``val__`` Value to write **Description** Write a value to the iosys_map considering its layout is described by a C struct starting at **struct_offset__**. The field offset and size is calculated and the **val__** is written. If the field access would incur in un-aligned access, then either iosys_map_memcpy_to() needs to be used or the architecture must support it. Refer to iosys_map_rd_field() for expected usage and memory layout.h](j9)}(h**Parameters**h]j)}(hj2h]h Parameters}(hhhj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj2ubj)}(hhh](j)}(h"``map__`` The iosys_map structure h](j)}(h ``map__``h]j)}(hj2h]hmap__}(hhhj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj2ubj)}(hhh]j9)}(hThe iosys_map structureh]hThe iosys_map structure}(hj3hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj2hMhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMhj2ubj)}(hV``struct_offset__`` Offset from the beginning of the map, where the struct is located h](j)}(h``struct_offset__``h]j)}(hj 3h]hstruct_offset__}(hhhj"3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj3ubj)}(hhh]j9)}(hAOffset from the beginning of the map, where the struct is locatedh]hAOffset from the beginning of the map, where the struct is located}(hj;3hj93hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj63ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj53hMhj2ubj)}(hB``struct_type__`` The struct describing the layout of the mapping h](j)}(h``struct_type__``h]j)}(hjZ3h]h struct_type__}(hhhj\3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX3ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhjT3ubj)}(hhh]j9)}(h/The struct describing the layout of the mappingh]h/The struct describing the layout of the mapping}(hju3hjs3hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjo3hMhjp3ubah}(h]h ]h"]h$]h&]uh1jhjT3ubeh}(h]h ]h"]h$]h&]uh1jhjo3hMhj2ubj)}(h)``field__`` Member of the struct to read h](j)}(h ``field__``h]j)}(hj3h]hfield__}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj3ubj)}(hhh]j9)}(hMember of the struct to readh]hMember of the struct to read}(hj3hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj3hMhj3ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMhj2ubj)}(h``val__`` Value to write h](j)}(h ``val__``h]j)}(hj3h]hval__}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj3ubj)}(hhh]j9)}(hValue to writeh]hValue to write}(hj3hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj3hMhj3ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2ubj9)}(h**Description**h]j)}(hj4h]h Description}(hhhj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj2ubj9)}(hXWrite a value to the iosys_map considering its layout is described by a C struct starting at **struct_offset__**. The field offset and size is calculated and the **val__** is written. If the field access would incur in un-aligned access, then either iosys_map_memcpy_to() needs to be used or the architecture must support it. Refer to iosys_map_rd_field() for expected usage and memory layout.h](h]Write a value to the iosys_map considering its layout is described by a C struct starting at }(h]Write a value to the iosys_map considering its layout is described by a C struct starting at hj4hhhNhNubj)}(h**struct_offset__**h]hstruct_offset__}(hhhj&4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh2. The field offset and size is calculated and the }(h2. The field offset and size is calculated and the hj4hhhNhNubj)}(h **val__**h]hval__}(hhhj94hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh is written. If the field access would incur in un-aligned access, then either iosys_map_memcpy_to() needs to be used or the architecture must support it. Refer to iosys_map_rd_field() for expected usage and memory layout.}(h is written. If the field access would incur in un-aligned access, then either iosys_map_memcpy_to() needs to be used or the architecture must support it. Refer to iosys_map_rd_field() for expected usage and memory layout.hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.hhMhj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj^ hhhNhNubeh}(h],generalizing-access-to-system-and-i-o-memoryah ]h"],generalizing access to system and i/o memoryah$]h&]uh1jhjhhhhhMubj)}(hhh](j )}(hPublic Functions Providedh]hPublic Functions Provided}(hjg4hje4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb4hhhhhMubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j virt_to_phys (C function)c.virt_to_physhNtauh1j hjb4hhhNhNubj)}(hhh](j)}(h1phys_addr_t virt_to_phys (volatile void *address)h]j)}(h0phys_addr_t virt_to_phys(volatile void *address)h](h)}(hhh]j=)}(h phys_addr_th]h phys_addr_t}(hhhj4hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj4ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj4modnameN classnameNjj)}j]j)}j virt_to_physsbc.virt_to_physasbuh1hhj4hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKvubj&)}(h h]h }(hhhj4hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj4hhhj4hKvubj7)}(h virt_to_physh]j=)}(hj4h]h virt_to_phys}(hhhj4hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj4ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj4hhhj4hKvubjp)}(h(volatile void *address)h]jv)}(hvolatile void *addressh](j)}(hvolatileh]hvolatile}(hhhj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj4ubj&)}(h h]h }(hhhj4hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj4ubj8)}(hvoidh]hvoid}(hhhj4hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj4ubj&)}(h h]h }(hhhj5hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj4ubj)}(hjh]h*}(hhhj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj=)}(haddressh]haddress}(hhhj#5hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj4ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj4ubah}(h]h ]h"]h$]h&]hhuh1johj4hhhj4hKvubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj4hhhj4hKvubah}(h]j4ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj4hhubjh)}(hhh]j9)}(h!map virtual addresses to physicalh]h!map virtual addresses to physical}(hjP5hjN5hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKuhjK5hhubah}(h]h ]h"]h$]h&]uh1jghj4hhhj4hKvubeh}(h]h ](j functioneh"]h$]h&]jj jjf5jjf5juh1jhhhjb4hNhNubj)}(hX**Parameters** ``volatile void *address`` address to remap The returned physical address is the physical (CPU) mapping for the memory address given. It is only valid to use this function on addresses directly mapped or allocated via kmalloc. This function does not give bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this functionh](j9)}(h**Parameters**h]j)}(hjp5h]h Parameters}(hhhjr5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjn5ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKyhjj5ubj)}(hhh]j)}(hXr``volatile void *address`` address to remap The returned physical address is the physical (CPU) mapping for the memory address given. It is only valid to use this function on addresses directly mapped or allocated via kmalloc. This function does not give bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this functionh](j)}(h``volatile void *address``h]j)}(hj5h]hvolatile void *address}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhK}hj5ubj)}(hhh](j9)}(haddress to remaph]haddress to remap}(hj5hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKvhj5ubj9)}(hThe returned physical address is the physical (CPU) mapping for the memory address given. It is only valid to use this function on addresses directly mapped or allocated via kmalloc.h]hThe returned physical address is the physical (CPU) mapping for the memory address given. It is only valid to use this function on addresses directly mapped or allocated via kmalloc.}(hj5hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKxhj5ubj9)}(hThis function does not give bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this functionh]hThis function does not give bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this function}(hj5hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhK|hj5ubeh}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5hK}hj5ubah}(h]h ]h"]h$]h&]uh1jhjj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjb4hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j phys_to_virt (C function)c.phys_to_virthNtauh1j hjb4hhhNhNubj)}(hhh](j)}(h)void * phys_to_virt (phys_addr_t address)h]j)}(h'void *phys_to_virt(phys_addr_t address)h](j8)}(hvoidh]hvoid}(hhhj6hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj6hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKubj&)}(h h]h }(hhhj6hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj6hhhj6hKubj)}(hjh]h*}(hhhj$6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6hhhj6hKubj7)}(h phys_to_virth]j=)}(h phys_to_virth]h phys_to_virt}(hhhj56hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj16ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hj6hhhj6hKubjp)}(h(phys_addr_t address)h]jv)}(hphys_addr_t addressh](h)}(hhh]j=)}(h phys_addr_th]h phys_addr_t}(hhhjT6hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjQ6ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjV6modnameN classnameNjj)}j]j)}jj76sbc.phys_to_virtasbuh1hhjM6ubj&)}(h h]h }(hhhjt6hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjM6ubj=)}(haddressh]haddress}(hhhj6hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjM6ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhjI6ubah}(h]h ]h"]h$]h&]hhuh1johj6hhhj6hKubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj5hhhj6hKubah}(h]j5ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj5hhubjh)}(hhh]j9)}(hmap physical address to virtualh]hmap physical address to virtual}(hj6hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj6hhubah}(h]h ]h"]h$]h&]uh1jghj5hhhj6hKubeh}(h]h ](j functioneh"]h$]h&]jj jj6jj6juh1jhhhjb4hNhNubj)}(hXz**Parameters** ``phys_addr_t address`` address to remap The returned virtual address is a current CPU mapping for the memory address given. It is only valid to use this function on addresses that have a kernel mapping This function does not handle bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this functionh](j9)}(h**Parameters**h]j)}(hj6h]h Parameters}(hhhj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj6ubj)}(hhh]j)}(hX\``phys_addr_t address`` address to remap The returned virtual address is a current CPU mapping for the memory address given. It is only valid to use this function on addresses that have a kernel mapping This function does not handle bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this functionh](j)}(h``phys_addr_t address``h]j)}(hj6h]hphys_addr_t address}(hhhj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj6ubj)}(hhh](j9)}(haddress to remaph]haddress to remap}(hj 7hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj7ubj9)}(hThe returned virtual address is a current CPU mapping for the memory address given. It is only valid to use this function on addresses that have a kernel mappingh]hThe returned virtual address is a current CPU mapping for the memory address given. It is only valid to use this function on addresses that have a kernel mapping}(hj7hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj7ubj9)}(hThis function does not handle bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this functionh]hThis function does not handle bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this function}(hj'7hj%7hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj7ubeh}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj7hKhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjb4hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j ioremap (C function) c.ioremaphNtauh1j hjb4hhhNhNubj)}(hhh](j)}(hCvoid __iomem * ioremap (resource_size_t offset, unsigned long size)h]j)}(hAvoid __iomem *ioremap(resource_size_t offset, unsigned long size)h](j8)}(hvoidh]hvoid}(hhhjf7hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjb7hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKubj&)}(h h]h }(hhhju7hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjb7hhhjt7hKubh__iomem}(hhhjb7hhhNhNubj&)}(h h]h }(hhhj7hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjb7hhhjt7hKubj)}(hjh]h*}(hhhj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb7hhhjt7hKubj7)}(hioremaph]j=)}(hioremaph]hioremap}(hhhj7hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj7ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjb7hhhjt7hKubjp)}(h,(resource_size_t offset, unsigned long size)h](jv)}(hresource_size_t offseth](h)}(hhh]j=)}(hresource_size_th]hresource_size_t}(hhhj7hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj7ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj7modnameN classnameNjj)}j]j)}jj7sb c.ioremapasbuh1hhj7ubj&)}(h h]h }(hhhj7hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj7ubj=)}(hoffseth]hoffset}(hhhj7hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj7ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj7ubjv)}(hunsigned long sizeh](j8)}(hunsignedh]hunsigned}(hhhj 8hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj8ubj&)}(h h]h }(hhhj8hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj8ubj8)}(hlongh]hlong}(hhhj(8hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj8ubj&)}(h h]h }(hhhj68hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj8ubj=)}(hsizeh]hsize}(hhhjD8hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj7ubeh}(h]h ]h"]h$]h&]hhuh1johjb7hhhjt7hKubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hj^7hhhjt7hKubah}(h]jY7ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj[7hhubjh)}(hhh]j9)}(hmap bus memory into CPU spaceh]hmap bus memory into CPU space}(hjq8hjo8hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhjl8hhubah}(h]h ]h"]h$]h&]uh1jghj[7hhhjt7hKubeh}(h]h ](j functioneh"]h$]h&]jj jj8jj8juh1jhhhjb4hNhNubj)}(hX**Parameters** ``resource_size_t offset`` bus address of the memory ``unsigned long size`` size of the resource to map **Description** ioremap performs a platform specific sequence of operations to make bus memory CPU accessible via the readb/readw/readl/writeb/ writew/writel functions and the other mmio helpers. The returned address is not guaranteed to be usable directly as a virtual address. If the area you are trying to map is a PCI BAR you should have a look at pci_iomap().h](j9)}(h**Parameters**h]j)}(hj8h]h Parameters}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj8ubj)}(hhh](j)}(h5``resource_size_t offset`` bus address of the memory h](j)}(h``resource_size_t offset``h]j)}(hj8h]hresource_size_t offset}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj8ubj)}(hhh]j9)}(hbus address of the memoryh]hbus address of the memory}(hj8hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj8hKhj8ubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhj8hKhj8ubj)}(h3``unsigned long size`` size of the resource to map h](j)}(h``unsigned long size``h]j)}(hj8h]hunsigned long size}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj8ubj)}(hhh]j9)}(hsize of the resource to maph]hsize of the resource to map}(hj9hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj8hKhj8ubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhj8hKhj8ubeh}(h]h ]h"]h$]h&]uh1jhj8ubj9)}(h**Description**h]j)}(hj$9h]h Description}(hhhj&9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"9ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj8ubj9)}(hXioremap performs a platform specific sequence of operations to make bus memory CPU accessible via the readb/readw/readl/writeb/ writew/writel functions and the other mmio helpers. The returned address is not guaranteed to be usable directly as a virtual address.h]hXioremap performs a platform specific sequence of operations to make bus memory CPU accessible via the readb/readw/readl/writeb/ writew/writel functions and the other mmio helpers. The returned address is not guaranteed to be usable directly as a virtual address.}(hj<9hj:9hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj8ubj9)}(hUIf the area you are trying to map is a PCI BAR you should have a look at pci_iomap().h]hUIf the area you are trying to map is a PCI BAR you should have a look at pci_iomap().}(hjK9hjI9hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhKhj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjb4hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j iosubmit_cmds512 (C function)c.iosubmit_cmds512hNtauh1j hjb4hhhNhNubj)}(hhh](j)}(hHvoid iosubmit_cmds512 (void __iomem *dst, const void *src, size_t count)h]j)}(hGvoid iosubmit_cmds512(void __iomem *dst, const void *src, size_t count)h](j8)}(hvoidh]hvoid}(hhhjx9hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hjt9hhh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhM~ubj&)}(h h]h }(hhhj9hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjt9hhhj9hM~ubj7)}(hiosubmit_cmds512h]j=)}(hiosubmit_cmds512h]hiosubmit_cmds512}(hhhj9hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj9ubah}(h]h ](jOjPeh"]h$]h&]hhuh1j6hjt9hhhj9hM~ubjp)}(h2(void __iomem *dst, const void *src, size_t count)h](jv)}(hvoid __iomem *dsth](j8)}(hvoidh]hvoid}(hhhj9hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj9ubj&)}(h h]h }(hhhj9hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj9ubh__iomem}(hhhj9hhhNhNubj&)}(h h]h }(hhhj9hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj9ubj)}(hjh]h*}(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj=)}(hdsth]hdst}(hhhj9hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj9ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj9ubjv)}(hconst void *srch](j)}(hjh]hconst}(hhhj :hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubj&)}(h h]h }(hhhj:hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj:ubj8)}(hvoidh]hvoid}(hhhj$:hhhNhNubah}(h]h ]jDah"]h$]h&]uh1j7hj:ubj&)}(h h]h }(hhhj2:hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hj:ubj)}(hjh]h*}(hhhj@:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj=)}(hsrch]hsrc}(hhhjM:hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hj:ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj9ubjv)}(h size_t counth](h)}(hhh]j=)}(hsize_th]hsize_t}(hhhji:hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjf:ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjk:modnameN classnameNjj)}j]j)}jj9sbc.iosubmit_cmds512asbuh1hhjb:ubj&)}(h h]h }(hhhj:hhhNhNubah}(h]h ]j2ah"]h$]h&]uh1j%hjb:ubj=)}(hcounth]hcount}(hhhj:hhhNhNubah}(h]h ]jHah"]h$]h&]uh1j<hjb:ubeh}(h]h ]h"]h$]h&]noemphhhuh1juhj9ubeh}(h]h ]h"]h$]h&]hhuh1johjt9hhhj9hM~ubeh}(h]h ]h"]h$]h&]hhjZuh1j j[j\hjp9hhhj9hM~ubah}(h]jk9ah ](j`jaeh"]h$]h&]jeuh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhjm9hhubjh)}(hhh]j9)}(h3copy data to single MMIO location, in 512-bit unitsh]h3copy data to single MMIO location, in 512-bit units}(hj:hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhM}hj:hhubah}(h]h ]h"]h$]h&]uh1jghjm9hhhj9hM~ubeh}(h]h ](j functioneh"]h$]h&]jj jj:jj:juh1jhhhjb4hNhNubj)}(hX**Parameters** ``void __iomem *dst`` destination, in MMIO space (must be 512-bit aligned) ``const void *src`` source ``size_t count`` number of 512 bits quantities to submit **Description** Submit data from kernel space to MMIO space, in units of 512 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards. Warning: Do not use this helper unless your driver has checked that the CPU instruction is supported on the platform.h](j9)}(h**Parameters**h]j)}(hj:h]h Parameters}(hhhj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhj:ubj)}(hhh](j)}(hK``void __iomem *dst`` destination, in MMIO space (must be 512-bit aligned) h](j)}(h``void __iomem *dst``h]j)}(hj;h]hvoid __iomem *dst}(hhhj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhM~hj:ubj)}(hhh]j9)}(h4destination, in MMIO space (must be 512-bit aligned)h]h4destination, in MMIO space (must be 512-bit aligned)}(hj;hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj;hM~hj;ubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhj;hM~hj:ubj)}(h``const void *src`` source h](j)}(h``const void *src``h]j)}(hj<;h]hconst void *src}(hhhj>;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:;ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhj6;ubj)}(hhh]j9)}(hsourceh]hsource}(hjW;hjU;hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjQ;hMhjR;ubah}(h]h ]h"]h$]h&]uh1jhj6;ubeh}(h]h ]h"]h$]h&]uh1jhjQ;hMhj:ubj)}(h9``size_t count`` number of 512 bits quantities to submit h](j)}(h``size_t count``h]j)}(hju;h]h size_t count}(hhhjw;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs;ubah}(h]h ]h"]h$]h&]uh1jh_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhjo;ubj)}(hhh]j9)}(h'number of 512 bits quantities to submith]h'number of 512 bits quantities to submit}(hj;hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj;hMhj;ubah}(h]h ]h"]h$]h&]uh1jhjo;ubeh}(h]h ]h"]h$]h&]uh1jhj;hMhj:ubeh}(h]h ]h"]h$]h&]uh1jhj:ubj9)}(h**Description**h]j)}(hj;h]h Description}(hhhj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhj:ubj9)}(hSubmit data from kernel space to MMIO space, in units of 512 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.h]hSubmit data from kernel space to MMIO space, in units of 512 bits at a time. Order of access is not guaranteed, nor is a memory barrier performed afterwards.}(hj;hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhj:ubj9)}(huWarning: Do not use this helper unless your driver has checked that the CPU instruction is supported on the platform.h]huWarning: Do not use this helper unless your driver has checked that the CPU instruction is supported on the platform.}(hj;hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j8h_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:518: ./arch/x86/include/asm/io.hhMhj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjb4hhhNhNubeh}(h]public-functions-providedah ]h"]public functions providedah$]h&]uh1jhjhhhhhMubeh}(h]bus-independent-device-accessesah ]h"]bus-independent device accessesah$]h&]uh1jhhhhhhhK ubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(jN generatorN datestampN source_linkN source_urlN toc_backlinksjQ footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj<error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(!higher-level ioremap abstractions]jaaccessing the device]j<aurefids}nameids}(j;j;jjjjjjjjj.j+jjj&j#jjjjj j jjj~j{jjjyjvjjj j j j j[ j&j_4j\4j;j;u nametypes}(j;NjNjNjNjNj.NjNj&NjNjNj NjNj~NjNjyNjNj Nj Nj[ Nj_4Nj;Nuh}(j;jjjjjjjjjj+jjjj#jjj1jjj jjjj{jjjjvjjj|j jj j j&j j\4j^ jj jjjjjjj*j/j9j>jHjMjjjjjWj\jjj!j!j %j%j'j'j*j*j+j+jZ-j_-jP2jU2j;jb4j4j4j5j5jY7j^7jk9jp9u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](hsystem_message)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj<ubah}(h]h ]h"]h$]h&]levelKtypeINFOlineMsource_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.huh1j<hj/ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj<ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsourcej<uh1j<hj 0ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj<ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsource_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.huh1j<hj0ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj<ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsourcej<uh1j<hj0ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj<ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsource_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.huh1j<hj0ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj=ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsourcej=uh1j<hj1ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhj/=hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hj,=ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsource_/var/lib/git/docbuild/linux/Documentation/driver-api/device-io:512: ./include/linux/iosys-map.huh1j<hjw1ubj<)}(hhh]j9)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hhhjK=hhhNhNubah}(h]h ]h"]h$]h&]uh1j8hjH=ubah}(h]h ]h"]h$]h&]levelKtypej<lineMsourcejG=uh1j<hj1ubetransform_messages] transformerN include_log] decorationNhhub.