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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_S390_PCI_DMA_H
  3 #define _ASM_S390_PCI_DMA_H
  4 
  5 /* I/O Translation Anchor (IOTA) */
  6 enum zpci_ioat_dtype {
  7         ZPCI_IOTA_STO = 0,
  8         ZPCI_IOTA_RTTO = 1,
  9         ZPCI_IOTA_RSTO = 2,
 10         ZPCI_IOTA_RFTO = 3,
 11         ZPCI_IOTA_PFAA = 4,
 12         ZPCI_IOTA_IOPFAA = 5,
 13         ZPCI_IOTA_IOPTO = 7
 14 };
 15 
 16 #define ZPCI_IOTA_IOT_ENABLED           0x800UL
 17 #define ZPCI_IOTA_DT_ST                 (ZPCI_IOTA_STO  << 2)
 18 #define ZPCI_IOTA_DT_RT                 (ZPCI_IOTA_RTTO << 2)
 19 #define ZPCI_IOTA_DT_RS                 (ZPCI_IOTA_RSTO << 2)
 20 #define ZPCI_IOTA_DT_RF                 (ZPCI_IOTA_RFTO << 2)
 21 #define ZPCI_IOTA_DT_PF                 (ZPCI_IOTA_PFAA << 2)
 22 #define ZPCI_IOTA_FS_4K                 0
 23 #define ZPCI_IOTA_FS_1M                 1
 24 #define ZPCI_IOTA_FS_2G                 2
 25 #define ZPCI_KEY                        (PAGE_DEFAULT_KEY << 5)
 26 
 27 #define ZPCI_TABLE_SIZE_RT      (1UL << 42)
 28 
 29 #define ZPCI_IOTA_STO_FLAG      (ZPCI_IOTA_IOT_ENABLED | ZPCI_KEY | ZPCI_IOTA_DT_ST)
 30 #define ZPCI_IOTA_RTTO_FLAG     (ZPCI_IOTA_IOT_ENABLED | ZPCI_KEY | ZPCI_IOTA_DT_RT)
 31 #define ZPCI_IOTA_RSTO_FLAG     (ZPCI_IOTA_IOT_ENABLED | ZPCI_KEY | ZPCI_IOTA_DT_RS)
 32 #define ZPCI_IOTA_RFTO_FLAG     (ZPCI_IOTA_IOT_ENABLED | ZPCI_KEY | ZPCI_IOTA_DT_RF)
 33 #define ZPCI_IOTA_RFAA_FLAG     (ZPCI_IOTA_IOT_ENABLED | ZPCI_KEY | ZPCI_IOTA_DT_PF | ZPCI_IOTA_FS_2G)
 34 
 35 /* I/O Region and segment tables */
 36 #define ZPCI_INDEX_MASK                 0x7ffUL
 37 
 38 #define ZPCI_TABLE_TYPE_MASK            0xc
 39 #define ZPCI_TABLE_TYPE_RFX             0xc
 40 #define ZPCI_TABLE_TYPE_RSX             0x8
 41 #define ZPCI_TABLE_TYPE_RTX             0x4
 42 #define ZPCI_TABLE_TYPE_SX              0x0
 43 
 44 #define ZPCI_TABLE_LEN_RFX              0x3
 45 #define ZPCI_TABLE_LEN_RSX              0x3
 46 #define ZPCI_TABLE_LEN_RTX              0x3
 47 
 48 #define ZPCI_TABLE_OFFSET_MASK          0xc0
 49 #define ZPCI_TABLE_SIZE                 0x4000
 50 #define ZPCI_TABLE_ALIGN                ZPCI_TABLE_SIZE
 51 #define ZPCI_TABLE_ENTRY_SIZE           (sizeof(unsigned long))
 52 #define ZPCI_TABLE_ENTRIES              (ZPCI_TABLE_SIZE / ZPCI_TABLE_ENTRY_SIZE)
 53 
 54 #define ZPCI_TABLE_BITS                 11
 55 #define ZPCI_PT_BITS                    8
 56 #define ZPCI_ST_SHIFT                   (ZPCI_PT_BITS + PAGE_SHIFT)
 57 #define ZPCI_RT_SHIFT                   (ZPCI_ST_SHIFT + ZPCI_TABLE_BITS)
 58 
 59 #define ZPCI_RTE_FLAG_MASK              0x3fffUL
 60 #define ZPCI_RTE_ADDR_MASK              (~ZPCI_RTE_FLAG_MASK)
 61 #define ZPCI_STE_FLAG_MASK              0x7ffUL
 62 #define ZPCI_STE_ADDR_MASK              (~ZPCI_STE_FLAG_MASK)
 63 
 64 /* I/O Page tables */
 65 #define ZPCI_PTE_VALID_MASK             0x400
 66 #define ZPCI_PTE_INVALID                0x400
 67 #define ZPCI_PTE_VALID                  0x000
 68 #define ZPCI_PT_SIZE                    0x800
 69 #define ZPCI_PT_ALIGN                   ZPCI_PT_SIZE
 70 #define ZPCI_PT_ENTRIES                 (ZPCI_PT_SIZE / ZPCI_TABLE_ENTRY_SIZE)
 71 #define ZPCI_PT_MASK                    (ZPCI_PT_ENTRIES - 1)
 72 
 73 #define ZPCI_PTE_FLAG_MASK              0xfffUL
 74 #define ZPCI_PTE_ADDR_MASK              (~ZPCI_PTE_FLAG_MASK)
 75 
 76 /* Shared bits */
 77 #define ZPCI_TABLE_VALID                0x00
 78 #define ZPCI_TABLE_INVALID              0x20
 79 #define ZPCI_TABLE_PROTECTED            0x200
 80 #define ZPCI_TABLE_UNPROTECTED          0x000
 81 
 82 #define ZPCI_TABLE_VALID_MASK           0x20
 83 #define ZPCI_TABLE_PROT_MASK            0x200
 84 
 85 struct zpci_iommu_ctrs {
 86         atomic64_t              mapped_pages;
 87         atomic64_t              unmapped_pages;
 88         atomic64_t              global_rpcits;
 89         atomic64_t              sync_map_rpcits;
 90         atomic64_t              sync_rpcits;
 91 };
 92 
 93 struct zpci_dev;
 94 
 95 struct zpci_iommu_ctrs *zpci_get_iommu_ctrs(struct zpci_dev *zdev);
 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