Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
grumain.c File Reference
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/err.h>
#include <linux/prefetch.h>
#include <asm/uv/uv_hub.h>
#include "gru.h"
#include "grutables.h"
#include "gruhandles.h"

Go to the source code of this file.

Macros

#define next_ctxnum(n)   ((n) < GRU_NUM_CCH - 2 ? (n) + 1 : 0)
 
#define next_gru(b, g)
 

Functions

int gru_cpu_fault_map_id (void)
 
unsigned long gru_reserve_cb_resources (struct gru_state *gru, int cbr_au_count, char *cbmap)
 
unsigned long gru_reserve_ds_resources (struct gru_state *gru, int dsr_au_count, char *dsmap)
 
void gts_drop (struct gru_thread_state *gts)
 
struct gru_thread_stategru_alloc_gts (struct vm_area_struct *vma, int cbr_au_count, int dsr_au_count, unsigned char tlb_preload_count, int options, int tsid)
 
struct gru_vma_datagru_alloc_vma_data (struct vm_area_struct *vma, int tsid)
 
struct gru_thread_stategru_find_thread_state (struct vm_area_struct *vma, int tsid)
 
struct gru_thread_stategru_alloc_thread_state (struct vm_area_struct *vma, int tsid)
 
void gru_unload_context (struct gru_thread_state *gts, int savestate)
 
void gru_load_context (struct gru_thread_state *gts)
 
int gru_update_cch (struct gru_thread_state *gts)
 
void gru_check_context_placement (struct gru_thread_state *gts)
 
void gru_steal_context (struct gru_thread_state *gts)
 
struct gru_stategru_assign_gru_context (struct gru_thread_state *gts)
 
int gru_fault (struct vm_area_struct *vma, struct vm_fault *vmf)
 

Variables

unsigned long gru_options __read_mostly
 
struct devicegrudev = &gru_device
 

Macro Definition Documentation

#define next_ctxnum (   n)    ((n) < GRU_NUM_CCH - 2 ? (n) + 1 : 0)

Definition at line 758 of file grumain.c.

#define next_gru (   b,
  g 
)
Value:
(((g) < &(b)->bs_grus[GRU_CHIPLETS_PER_BLADE - 1]) ? \
((g)+1) : &(b)->bs_grus[0])

Definition at line 759 of file grumain.c.

Function Documentation

struct gru_thread_state* gru_alloc_gts ( struct vm_area_struct vma,
int  cbr_au_count,
int  dsr_au_count,
unsigned char  tlb_preload_count,
int  options,
int  tsid 
)
read

Definition at line 323 of file grumain.c.

struct gru_thread_state* gru_alloc_thread_state ( struct vm_area_struct vma,
int  tsid 
)
read

Definition at line 407 of file grumain.c.

struct gru_vma_data* gru_alloc_vma_data ( struct vm_area_struct vma,
int  tsid 
)
read

Definition at line 372 of file grumain.c.

struct gru_state* gru_assign_gru_context ( struct gru_thread_state gts)
read

Definition at line 869 of file grumain.c.

void gru_check_context_placement ( struct gru_thread_state gts)

Definition at line 732 of file grumain.c.

int gru_cpu_fault_map_id ( void  )

Definition at line 55 of file grumain.c.

int gru_fault ( struct vm_area_struct vma,
struct vm_fault *  vmf 
)

Definition at line 929 of file grumain.c.

struct gru_thread_state* gru_find_thread_state ( struct vm_area_struct vma,
int  tsid 
)
read

Definition at line 390 of file grumain.c.

void gru_load_context ( struct gru_thread_state gts)

Definition at line 591 of file grumain.c.

unsigned long gru_reserve_cb_resources ( struct gru_state gru,
int  cbr_au_count,
char cbmap 
)

Definition at line 185 of file grumain.c.

unsigned long gru_reserve_ds_resources ( struct gru_state gru,
int  dsr_au_count,
char dsmap 
)

Definition at line 192 of file grumain.c.

void gru_steal_context ( struct gru_thread_state gts)

Definition at line 783 of file grumain.c.

void gru_unload_context ( struct gru_thread_state gts,
int  savestate 
)

Definition at line 555 of file grumain.c.

int gru_update_cch ( struct gru_thread_state gts)

Definition at line 658 of file grumain.c.

void gts_drop ( struct gru_thread_state gts)

Definition at line 296 of file grumain.c.

Variable Documentation

unsigned long gru_options __read_mostly

Definition at line 37 of file grumain.c.

struct device* grudev = &gru_device

Definition at line 48 of file grumain.c.