/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to driver/umem.h

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-02 18:37:30 UTC
  • Revision ID: csa@suren.me-20160302183730-nlrgi7h3yuizcizc
Restructure driver headers

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _PCIDRIVER_UMEM_H
 
2
#define _PCIDRIVER_UMEM_H
 
3
 
 
4
#include <linux/sysfs.h>
 
5
 
 
6
#include "ioctl.h"
 
7
 
 
8
/* Define an entry in the umem list (this list is per device) */
 
9
/* This list keeps references to the SG lists for each mapped userspace region */
 
10
typedef struct {
 
11
    int id;
 
12
    struct list_head list;
 
13
    unsigned int nr_pages;              /* number of pages for this user memeory area */
 
14
    struct page **pages;                /* list of pointers to the pages */
 
15
    unsigned int nents;                 /* actual entries in the scatter/gatter list (NOT nents for the map function, but the result) */
 
16
    struct scatterlist *sg;             /* list of sg entries */
 
17
    struct device_attribute sysfs_attr; /* initialized when adding the entry */
 
18
} pcidriver_umem_entry_t;
 
19
 
1
20
int pcidriver_umem_sgmap( pcidriver_privdata_t *privdata, umem_handle_t *umem_handle );
2
21
int pcidriver_umem_sgunmap( pcidriver_privdata_t *privdata, pcidriver_umem_entry_t *umem_entry );
3
22
int pcidriver_umem_sgget( pcidriver_privdata_t *privdata, umem_sglist_t *umem_sglist );
4
23
int pcidriver_umem_sync( pcidriver_privdata_t *privdata, umem_handle_t *umem_handle );
5
24
pcidriver_umem_entry_t *pcidriver_umem_find_entry_id( pcidriver_privdata_t *privdata, int id );
 
25
 
 
26
#endif /* _PCIDRIVER_UMEM_H */