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

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

Version: ~ [ linux-5.8-rc3 ] ~ [ linux-5.7.5 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.48 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.129 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.185 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.228 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.228 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ 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.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | 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.

osdn.jp