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

TOMOYO Linux Cross Reference
Linux/include/linux/ism.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  *  Internal Shared Memory
  4  *
  5  *  Definitions for the ISM module
  6  *
  7  *  Copyright IBM Corp. 2022
  8  */
  9 #ifndef _ISM_H
 10 #define _ISM_H
 11 
 12 #include <linux/workqueue.h>
 13 
 14 struct ism_dmb {
 15         u64 dmb_tok;
 16         u64 rgid;
 17         u32 dmb_len;
 18         u32 sba_idx;
 19         u32 vlan_valid;
 20         u32 vlan_id;
 21         void *cpu_addr;
 22         dma_addr_t dma_addr;
 23 };
 24 
 25 /* Unless we gain unexpected popularity, this limit should hold for a while */
 26 #define MAX_CLIENTS             8
 27 #define ISM_NR_DMBS             1920
 28 
 29 struct ism_dev {
 30         spinlock_t lock; /* protects the ism device */
 31         struct list_head list;
 32         struct pci_dev *pdev;
 33 
 34         struct ism_sba *sba;
 35         dma_addr_t sba_dma_addr;
 36         DECLARE_BITMAP(sba_bitmap, ISM_NR_DMBS);
 37         u8 *sba_client_arr;     /* entries are indices into 'clients' array */
 38         void *priv[MAX_CLIENTS];
 39 
 40         struct ism_eq *ieq;
 41         dma_addr_t ieq_dma_addr;
 42 
 43         struct device dev;
 44         u64 local_gid;
 45         int ieq_idx;
 46 
 47         struct ism_client *subs[MAX_CLIENTS];
 48 };
 49 
 50 struct ism_event {
 51         u32 type;
 52         u32 code;
 53         u64 tok;
 54         u64 time;
 55         u64 info;
 56 };
 57 
 58 struct ism_client {
 59         const char *name;
 60         void (*add)(struct ism_dev *dev);
 61         void (*remove)(struct ism_dev *dev);
 62         void (*handle_event)(struct ism_dev *dev, struct ism_event *event);
 63         /* Parameter dmbemask contains a bit vector with updated DMBEs, if sent
 64          * via ism_move_data(). Callback function must handle all active bits
 65          * indicated by dmbemask.
 66          */
 67         void (*handle_irq)(struct ism_dev *dev, unsigned int bit, u16 dmbemask);
 68         /* Private area - don't touch! */
 69         u8 id;
 70 };
 71 
 72 int ism_register_client(struct ism_client *client);
 73 int  ism_unregister_client(struct ism_client *client);
 74 static inline void *ism_get_priv(struct ism_dev *dev,
 75                                  struct ism_client *client) {
 76         return dev->priv[client->id];
 77 }
 78 
 79 static inline void ism_set_priv(struct ism_dev *dev, struct ism_client *client,
 80                                 void *priv) {
 81         dev->priv[client->id] = priv;
 82 }
 83 
 84 int  ism_register_dmb(struct ism_dev *dev, struct ism_dmb *dmb,
 85                       struct ism_client *client);
 86 int  ism_unregister_dmb(struct ism_dev *dev, struct ism_dmb *dmb);
 87 int  ism_move(struct ism_dev *dev, u64 dmb_tok, unsigned int idx, bool sf,
 88               unsigned int offset, void *data, unsigned int size);
 89 
 90 const struct smcd_ops *ism_get_smcd_ops(void);
 91 
 92 #endif  /* _ISM_H */
 93 

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