~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/io.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  *  S390 version
  4  *    Copyright IBM Corp. 1999
  5  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
  6  *
  7  *  Derived from "include/asm-i386/io.h"
  8  */
  9 
 10 #ifndef _S390_IO_H
 11 #define _S390_IO_H
 12 
 13 #include <linux/kernel.h>
 14 #include <asm/page.h>
 15 #include <asm/pgtable.h>
 16 #include <asm/pci_io.h>
 17 
 18 #define xlate_dev_mem_ptr xlate_dev_mem_ptr
 19 #define kc_xlate_dev_mem_ptr xlate_dev_mem_ptr
 20 void *xlate_dev_mem_ptr(phys_addr_t phys);
 21 #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
 22 #define kc_unxlate_dev_mem_ptr unxlate_dev_mem_ptr
 23 void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
 24 
 25 #define IO_SPACE_LIMIT 0
 26 
 27 /*
 28  * I/O memory mapping functions.
 29  */
 30 #define ioremap_prot ioremap_prot
 31 #define iounmap iounmap
 32 
 33 #define _PAGE_IOREMAP pgprot_val(PAGE_KERNEL)
 34 
 35 #define ioremap_wc(addr, size)  \
 36         ioremap_prot((addr), (size), pgprot_val(pgprot_writecombine(PAGE_KERNEL)))
 37 #define ioremap_wt(addr, size)  \
 38         ioremap_prot((addr), (size), pgprot_val(pgprot_writethrough(PAGE_KERNEL)))
 39 
 40 static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
 41 {
 42         return NULL;
 43 }
 44 
 45 static inline void ioport_unmap(void __iomem *p)
 46 {
 47 }
 48 
 49 #ifdef CONFIG_PCI
 50 
 51 /*
 52  * s390 needs a private implementation of pci_iomap since ioremap with its
 53  * offset parameter isn't sufficient. That's because BAR spaces are not
 54  * disjunctive on s390 so we need the bar parameter of pci_iomap to find
 55  * the corresponding device and create the mapping cookie.
 56  */
 57 #define pci_iomap pci_iomap
 58 #define pci_iomap_range pci_iomap_range
 59 #define pci_iounmap pci_iounmap
 60 #define pci_iomap_wc pci_iomap_wc
 61 #define pci_iomap_wc_range pci_iomap_wc_range
 62 
 63 #define memcpy_fromio(dst, src, count)  zpci_memcpy_fromio(dst, src, count)
 64 #define memcpy_toio(dst, src, count)    zpci_memcpy_toio(dst, src, count)
 65 #define memset_io(dst, val, count)      zpci_memset_io(dst, val, count)
 66 
 67 #define mmiowb()        zpci_barrier()
 68 
 69 #define __raw_readb     zpci_read_u8
 70 #define __raw_readw     zpci_read_u16
 71 #define __raw_readl     zpci_read_u32
 72 #define __raw_readq     zpci_read_u64
 73 #define __raw_writeb    zpci_write_u8
 74 #define __raw_writew    zpci_write_u16
 75 #define __raw_writel    zpci_write_u32
 76 #define __raw_writeq    zpci_write_u64
 77 
 78 /* combine single writes by using store-block insn */
 79 static inline void __iowrite32_copy(void __iomem *to, const void *from,
 80                                     size_t count)
 81 {
 82         zpci_memcpy_toio(to, from, count * 4);
 83 }
 84 #define __iowrite32_copy __iowrite32_copy
 85 
 86 static inline void __iowrite64_copy(void __iomem *to, const void *from,
 87                                     size_t count)
 88 {
 89         zpci_memcpy_toio(to, from, count * 8);
 90 }
 91 #define __iowrite64_copy __iowrite64_copy
 92 
 93 #endif /* CONFIG_PCI */
 94 
 95 #include <asm-generic/io.h>
 96 
 97 #endif
 98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php