Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
vpe.c File Reference
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <asm/uaccess.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/vmalloc.h>
#include <linux/elf.h>
#include <linux/seq_file.h>
#include <linux/syscalls.h>
#include <linux/moduleloader.h>
#include <linux/interrupt.h>
#include <linux/poll.h>
#include <linux/bootmem.h>
#include <asm/mipsregs.h>
#include <asm/mipsmtregs.h>
#include <asm/cacheflush.h>
#include <linux/atomic.h>
#include <asm/cpu.h>
#include <asm/mips_mt.h>
#include <asm/processor.h>
#include <asm/vpe.h>

Go to the source code of this file.

Data Structures

struct  vpe
 
struct  tc
 
struct  mips_hi16
 

Macros

#define ARCH_SHF_SMALL   0
 
#define INIT_OFFSET_MASK   (1UL << (BITS_PER_LONG-1))
 
#define P_SIZE   (256 * 1024)
 
#define MAX_VPES   16
 
#define VPE_PATH_MAX   256
 

Typedefs

typedef voidvpe_handle
 

Enumerations

enum  vpe_state { VPE_STATE_UNUSED = 0, VPE_STATE_INUSE, VPE_STATE_RUNNING }
 
enum  tc_state { TC_STATE_UNUSED = 0, TC_STATE_INUSE, TC_STATE_RUNNING, TC_STATE_DYNAMIC }
 

Functions

vpe_handle vpe_alloc (void)
 
 EXPORT_SYMBOL (vpe_alloc)
 
int vpe_start (vpe_handle vpe, unsigned long start)
 
 EXPORT_SYMBOL (vpe_start)
 
int vpe_stop (vpe_handle vpe)
 
 EXPORT_SYMBOL (vpe_stop)
 
int vpe_free (vpe_handle vpe)
 
 EXPORT_SYMBOL (vpe_free)
 
voidvpe_get_shared (int index)
 
 EXPORT_SYMBOL (vpe_get_shared)
 
int vpe_getuid (int index)
 
 EXPORT_SYMBOL (vpe_getuid)
 
int vpe_getgid (int index)
 
 EXPORT_SYMBOL (vpe_getgid)
 
int vpe_notify (int index, struct vpe_notifications *notify)
 
 EXPORT_SYMBOL (vpe_notify)
 
charvpe_getcwd (int index)
 
 EXPORT_SYMBOL (vpe_getcwd)
 
 module_init (vpe_module_init)
 
 module_exit (vpe_module_exit)
 
 MODULE_DESCRIPTION ("MIPS VPE Loader")
 
 MODULE_AUTHOR ("Elizabeth Oldham, MIPS Technologies, Inc.")
 
 MODULE_LICENSE ("GPL")
 

Variables

unsigned long physical_memsize
 
struct {
   spinlock_t   vpe_list_lock
 
   struct list_head   vpe_list
 
   spinlock_t   tc_list_lock
 
   struct list_head   tc_list
 
vpecontrol
 
struct class vpe_class
 
struct device vpe_device
 

Macro Definition Documentation

#define ARCH_SHF_SMALL   0

Definition at line 57 of file vpe.c.

#define INIT_OFFSET_MASK   (1UL << (BITS_PER_LONG-1))

Definition at line 61 of file vpe.c.

#define MAX_VPES   16

Definition at line 81 of file vpe.c.

#define P_SIZE   (256 * 1024)

Definition at line 76 of file vpe.c.

#define VPE_PATH_MAX   256

Definition at line 82 of file vpe.c.

Typedef Documentation

typedef void* vpe_handle

Definition at line 54 of file vpe.c.

Enumeration Type Documentation

enum tc_state
Enumerator:
TC_STATE_UNUSED 
TC_STATE_INUSE 
TC_STATE_RUNNING 
TC_STATE_DYNAMIC 

Definition at line 90 of file vpe.c.

enum vpe_state
Enumerator:
VPE_STATE_UNUSED 
VPE_STATE_INUSE 
VPE_STATE_RUNNING 

Definition at line 84 of file vpe.c.

Function Documentation

EXPORT_SYMBOL ( vpe_alloc  )
EXPORT_SYMBOL ( vpe_start  )
EXPORT_SYMBOL ( vpe_stop  )
EXPORT_SYMBOL ( vpe_free  )
EXPORT_SYMBOL ( vpe_get_shared  )
EXPORT_SYMBOL ( vpe_getuid  )
EXPORT_SYMBOL ( vpe_getgid  )
EXPORT_SYMBOL ( vpe_notify  )
EXPORT_SYMBOL ( vpe_getcwd  )
MODULE_AUTHOR ( "Elizabeth  Oldham,
MIPS  Technologies,
Inc."   
)
MODULE_DESCRIPTION ( "MIPS VPE Loader"  )
module_exit ( vpe_module_exit  )
module_init ( vpe_module_init  )
MODULE_LICENSE ( "GPL"  )
vpe_handle vpe_alloc ( void  )

Definition at line 1183 of file vpe.c.

int vpe_free ( vpe_handle  vpe)

Definition at line 1234 of file vpe.c.

void* vpe_get_shared ( int  index)

Definition at line 1269 of file vpe.c.

char* vpe_getcwd ( int  index)

Definition at line 1318 of file vpe.c.

int vpe_getgid ( int  index)

Definition at line 1293 of file vpe.c.

int vpe_getuid ( int  index)

Definition at line 1281 of file vpe.c.

int vpe_notify ( int  index,
struct vpe_notifications notify 
)

Definition at line 1305 of file vpe.c.

int vpe_start ( vpe_handle  vpe,
unsigned long  start 
)

Definition at line 1201 of file vpe.c.

int vpe_stop ( vpe_handle  vpe)

Definition at line 1212 of file vpe.c.

Variable Documentation

unsigned long physical_memsize

Definition at line 51 of file malta-memory.c.

struct list_head tc_list

Definition at line 141 of file vpe.c.

spinlock_t tc_list_lock

Definition at line 140 of file vpe.c.

struct class vpe_class
Initial value:
= {
.name = "vpe",
.owner = THIS_MODULE,
.dev_release = vpe_device_release,
.dev_attrs = vpe_class_attributes,
}

Definition at line 1389 of file vpe.c.

struct device vpe_device

Definition at line 1396 of file vpe.c.

struct list_head vpe_list

Definition at line 139 of file vpe.c.

spinlock_t vpe_list_lock

Definition at line 138 of file vpe.c.

struct { ... } vpecontrol
Initial value:
= {
.vpe_list = LIST_HEAD_INIT(vpecontrol.vpe_list),
.tc_list = LIST_HEAD_INIT(vpecontrol.tc_list)
}