Motr  M0
KEM device and ring buffer

Data Structures

struct  kem_rb
 
struct  kem_dev
 

Macros

#define NUM(dev)   (MINOR(dev) & 0xf)
 

Functions

static int kemd_init_module (void)
 
static void kemd_cleanup_module (void)
 
static int kemd_open (struct inode *inode, struct file *filp)
 
static int kemd_release (struct inode *inode, struct file *filp)
 
static ssize_t kemd_read (struct file *filp, char *buf, size_t len, loff_t *offset)
 
static ssize_t kemd_write (struct file *filp, const char *buf, size_t len, loff_t *offset)
 
static void kemd_dev_destroy (int i)
 
static int kemd_dev_create (int i)
 
static int kemd_devs_create (void)
 
static void kemd_devs_destroy (void)
 
void kemd_rbs_free (struct kem_rb *rbs)
 
int kemd_rbs_init (struct kem_rb *rbs)
 
 EXPORT_SYMBOL (kemd_rbs)
 
 module_init (kemd_init_module)
 
 module_exit (kemd_cleanup_module)
 

Variables

static int kemd_major = KEMD_MAJOR
 
static int kemd_minor = KEMD_MINOR
 
static int kemd_nr_cpus
 
struct kem_rbkemd_rbs
 
static struct kem_devkemd_devices
 
static struct file_operations kemd_fops
 

Detailed Description

Macro Definition Documentation

◆ NUM

#define NUM (   dev)    (MINOR(dev) & 0xf)

Definition at line 43 of file kemd.c.

Function Documentation

◆ EXPORT_SYMBOL()

EXPORT_SYMBOL ( kemd_rbs  )

◆ kemd_cleanup_module()

static void kemd_cleanup_module ( void  )
static

Definition at line 215 of file kemd.c.

Here is the call graph for this function:

◆ kemd_dev_create()

static int kemd_dev_create ( int  i)
static

Definition at line 75 of file kemd.c.

Here is the caller graph for this function:

◆ kemd_dev_destroy()

static void kemd_dev_destroy ( int  i)
static

Definition at line 70 of file kemd.c.

Here is the caller graph for this function:

◆ kemd_devs_create()

static int kemd_devs_create ( void  )
static

Definition at line 90 of file kemd.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kemd_devs_destroy()

static void kemd_devs_destroy ( void  )
static

Definition at line 110 of file kemd.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kemd_init_module()

static int kemd_init_module ( void  )
static

Definition at line 150 of file kemd.c.

Here is the call graph for this function:

◆ kemd_open()

static int kemd_open ( struct inode inode,
struct file filp 
)
static

Definition at line 237 of file kemd.c.

◆ kemd_rbs_free()

void kemd_rbs_free ( struct kem_rb rbs)

Definition at line 119 of file kemd.c.

Here is the caller graph for this function:

◆ kemd_rbs_init()

int kemd_rbs_init ( struct kem_rb rbs)

Definition at line 128 of file kemd.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kemd_read()

static ssize_t kemd_read ( struct file filp,
char *  buf,
size_t  len,
loff_t *  offset 
)
static

Definition at line 266 of file kemd.c.

◆ kemd_release()

static int kemd_release ( struct inode inode,
struct file filp 
)
static

Definition at line 254 of file kemd.c.

◆ kemd_write()

static ssize_t kemd_write ( struct file filp,
const char *  buf,
size_t  len,
loff_t *  offset 
)
static

Definition at line 308 of file kemd.c.

◆ module_exit()

module_exit ( kemd_cleanup_module  )

◆ module_init()

module_init ( kemd_init_module  )

Variable Documentation

◆ kemd_devices

struct kem_dev* kemd_devices
static

Definition at line 51 of file kemd.c.

◆ kemd_fops

struct file_operations kemd_fops
static
Initial value:
= {
.owner = THIS_MODULE,
.read = kemd_read,
.write = kemd_write,
.open = kemd_open,
.release = kemd_release
}
static int kemd_release(struct inode *inode, struct file *filp)
Definition: kemd.c:254
static int kemd_open(struct inode *inode, struct file *filp)
Definition: kemd.c:237
static ssize_t kemd_read(struct file *filp, char *buf, size_t len, loff_t *offset)
Definition: kemd.c:266
static ssize_t kemd_write(struct file *filp, const char *buf, size_t len, loff_t *offset)
Definition: kemd.c:308

Definition at line 62 of file kemd.c.

◆ kemd_major

int kemd_major = KEMD_MAJOR
static

Definition at line 45 of file kemd.c.

◆ kemd_minor

int kemd_minor = KEMD_MINOR
static

Definition at line 46 of file kemd.c.

◆ kemd_nr_cpus

int kemd_nr_cpus
static

Definition at line 47 of file kemd.c.

◆ kemd_rbs

struct kem_rb* kemd_rbs

Definition at line 49 of file kemd.c.