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

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

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

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