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

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/eadm.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 #ifndef _ASM_S390_EADM_H
  3 #define _ASM_S390_EADM_H
  4 
  5 #include <linux/types.h>
  6 #include <linux/device.h>
  7 #include <linux/blk_types.h>
  8 #include <asm/dma-types.h>
  9 
 10 struct arqb {
 11         u64 data;
 12         u16 fmt:4;
 13         u16:12;
 14         u16 cmd_code;
 15         u16:16;
 16         u16 msb_count;
 17         u32 reserved[12];
 18 } __packed;
 19 
 20 #define ARQB_CMD_MOVE   1
 21 
 22 struct arsb {
 23         u16 fmt:4;
 24         u32:28;
 25         u8 ef;
 26         u8:8;
 27         u8 ecbi;
 28         u8:8;
 29         u8 fvf;
 30         u16:16;
 31         u8 eqc;
 32         u32:32;
 33         u64 fail_msb;
 34         u64 fail_aidaw;
 35         u64 fail_ms;
 36         u64 fail_scm;
 37         u32 reserved[4];
 38 } __packed;
 39 
 40 #define EQC_WR_PROHIBIT 22
 41 
 42 struct msb {
 43         u8 fmt:4;
 44         u8 oc:4;
 45         u8 flags;
 46         u16:12;
 47         u16 bs:4;
 48         u32 blk_count;
 49         dma64_t data_addr;
 50         u64 scm_addr;
 51         u64:64;
 52 } __packed;
 53 
 54 struct aidaw {
 55         u8 flags;
 56         u32 :24;
 57         u32 :32;
 58         dma64_t data_addr;
 59 } __packed;
 60 
 61 #define MSB_OC_CLEAR    0
 62 #define MSB_OC_READ     1
 63 #define MSB_OC_WRITE    2
 64 #define MSB_OC_RELEASE  3
 65 
 66 #define MSB_FLAG_BNM    0x80
 67 #define MSB_FLAG_IDA    0x40
 68 
 69 #define MSB_BS_4K       0
 70 #define MSB_BS_1M       1
 71 
 72 #define AOB_NR_MSB      124
 73 
 74 struct aob {
 75         struct arqb request;
 76         struct arsb response;
 77         struct msb msb[AOB_NR_MSB];
 78 } __packed __aligned(PAGE_SIZE);
 79 
 80 struct aob_rq_header {
 81         struct scm_device *scmdev;
 82         char data[];
 83 };
 84 
 85 struct scm_device {
 86         u64 address;
 87         u64 size;
 88         unsigned int nr_max_block;
 89         struct device dev;
 90         struct {
 91                 unsigned int persistence:4;
 92                 unsigned int oper_state:4;
 93                 unsigned int data_state:4;
 94                 unsigned int rank:4;
 95                 unsigned int release:1;
 96                 unsigned int res_id:8;
 97         } __packed attrs;
 98 };
 99 
100 #define OP_STATE_GOOD           1
101 #define OP_STATE_TEMP_ERR       2
102 #define OP_STATE_PERM_ERR       3
103 
104 enum scm_event {SCM_CHANGE, SCM_AVAIL};
105 
106 struct scm_driver {
107         struct device_driver drv;
108         int (*probe) (struct scm_device *scmdev);
109         void (*remove) (struct scm_device *scmdev);
110         void (*notify) (struct scm_device *scmdev, enum scm_event event);
111         void (*handler) (struct scm_device *scmdev, void *data,
112                         blk_status_t error);
113 };
114 
115 int scm_driver_register(struct scm_driver *scmdrv);
116 void scm_driver_unregister(struct scm_driver *scmdrv);
117 
118 int eadm_start_aob(struct aob *aob);
119 void scm_irq_handler(struct aob *aob, blk_status_t error);
120 
121 #endif /* _ASM_S390_EADM_H */
122 

~ [ 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