Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
grukservices.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/proc_fs.h>
#include <linux/interrupt.h>
#include <linux/uaccess.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <asm/io_apic.h>
#include "gru.h"
#include "grulib.h"
#include "grutables.h"
#include "grukservices.h"
#include "gru_instructions.h"
#include <asm/uv/uv_hub.h>

Go to the source code of this file.

Data Structures

struct  message_queue
 
struct  message_header
 

Macros

#define ASYNC_HAN_TO_BID(h)   ((h) - 1)
 
#define ASYNC_BID_TO_HAN(b)   ((b) + 1)
 
#define ASYNC_HAN_TO_BS(h)   gru_base[ASYNC_HAN_TO_BID(h)]
 
#define GRU_NUM_KERNEL_CBR   1
 
#define GRU_NUM_KERNEL_DSR_BYTES   256
 
#define GRU_NUM_KERNEL_DSR_CL
 
#define IMA   IMA_CB_DELAY
 
#define __gru_cacheline_aligned__   __attribute__((__aligned__(GRU_CACHE_LINE_BYTES)))
 
#define MAGIC   0x1234567887654321UL
 
#define EXCEPTION_RETRY_LIMIT   3
 
#define MQS_EMPTY   0
 
#define MQS_FULL   1
 
#define MQS_NOOP   2
 
#define HSTATUS(mq, h)   ((mq) + offsetof(struct message_queue, hstatus[h]))
 
#define MQIE_AGAIN   -1 /* try again */
 
#define ALIGNUP(p, q)   ((void *)(((unsigned long)(p) + (q) - 1) & ~(q - 1)))
 
#define BUFSIZE   200
 

Functions

unsigned long gru_reserve_async_resources (int blade_id, int cbrs, int dsr_bytes, struct completion *cmp)
 
void gru_release_async_resources (unsigned long han)
 
void gru_wait_async_cbr (unsigned long han)
 
void gru_lock_async_resource (unsigned long han, void **cb, void **dsr)
 
void gru_unlock_async_resource (unsigned long han)
 
int gru_get_cb_exception_detail (void *cb, struct control_block_extended_exc_detail *excdet)
 
chargru_get_cb_exception_detail_str (int ret, void *cb, char *buf, int size)
 
int gru_check_status_proc (void *cb)
 
int gru_wait_proc (void *cb)
 
void gru_abort (int ret, void *cb, char *str)
 
void gru_wait_abort_proc (void *cb)
 
int gru_create_message_queue (struct gru_message_queue_desc *mqd, void *p, unsigned int bytes, int nasid, int vector, int apicid)
 
 EXPORT_SYMBOL_GPL (gru_create_message_queue)
 
int gru_send_message_gpa (struct gru_message_queue_desc *mqd, void *mesg, unsigned int bytes)
 
 EXPORT_SYMBOL_GPL (gru_send_message_gpa)
 
void gru_free_message (struct gru_message_queue_desc *mqd, void *mesg)
 
 EXPORT_SYMBOL_GPL (gru_free_message)
 
voidgru_get_next_message (struct gru_message_queue_desc *mqd)
 
 EXPORT_SYMBOL_GPL (gru_get_next_message)
 
int gru_read_gpa (unsigned long *value, unsigned long gpa)
 
 EXPORT_SYMBOL_GPL (gru_read_gpa)
 
int gru_copy_gpa (unsigned long dest_gpa, unsigned long src_gpa, unsigned int bytes)
 
 EXPORT_SYMBOL_GPL (gru_copy_gpa)
 
int gru_ktest (unsigned long arg)
 
int gru_kservices_init (void)
 
void gru_kservices_exit (void)
 

Macro Definition Documentation

#define __gru_cacheline_aligned__   __attribute__((__aligned__(GRU_CACHE_LINE_BYTES)))

Definition at line 112 of file grukservices.c.

#define ALIGNUP (   p,
  q 
)    ((void *)(((unsigned long)(p) + (q) - 1) & ~(q - 1)))

Definition at line 994 of file grukservices.c.

#define ASYNC_BID_TO_HAN (   b)    ((b) + 1)

Definition at line 100 of file grukservices.c.

#define ASYNC_HAN_TO_BID (   h)    ((h) - 1)

Definition at line 99 of file grukservices.c.

#define ASYNC_HAN_TO_BS (   h)    gru_base[ASYNC_HAN_TO_BID(h)]

Definition at line 101 of file grukservices.c.

#define BUFSIZE   200

Definition at line 1107 of file grukservices.c.

#define EXCEPTION_RETRY_LIMIT   3

Definition at line 118 of file grukservices.c.

#define GRU_NUM_KERNEL_CBR   1

Definition at line 103 of file grukservices.c.

#define GRU_NUM_KERNEL_DSR_BYTES   256

Definition at line 104 of file grukservices.c.

#define GRU_NUM_KERNEL_DSR_CL
Value:
GRU_CACHE_LINE_BYTES)

Definition at line 105 of file grukservices.c.

#define HSTATUS (   mq,
  h 
)    ((mq) + offsetof(struct message_queue, hstatus[h]))

Definition at line 146 of file grukservices.c.

#define IMA   IMA_CB_DELAY

Definition at line 109 of file grukservices.c.

#define MAGIC   0x1234567887654321UL

Definition at line 115 of file grukservices.c.

#define MQIE_AGAIN   -1 /* try again */

Definition at line 529 of file grukservices.c.

#define MQS_EMPTY   0

Definition at line 121 of file grukservices.c.

#define MQS_FULL   1

Definition at line 122 of file grukservices.c.

#define MQS_NOOP   2

Definition at line 123 of file grukservices.c.

Function Documentation

EXPORT_SYMBOL_GPL ( gru_create_message_queue  )
EXPORT_SYMBOL_GPL ( gru_send_message_gpa  )
EXPORT_SYMBOL_GPL ( gru_free_message  )
EXPORT_SYMBOL_GPL ( gru_get_next_message  )
EXPORT_SYMBOL_GPL ( gru_read_gpa  )
EXPORT_SYMBOL_GPL ( gru_copy_gpa  )
void gru_abort ( int  ret,
void cb,
char str 
)

Definition at line 508 of file grukservices.c.

int gru_check_status_proc ( void cb)

Definition at line 483 of file grukservices.c.

int gru_copy_gpa ( unsigned long  dest_gpa,
unsigned long  src_gpa,
unsigned int  bytes 
)

Definition at line 929 of file grukservices.c.

int gru_create_message_queue ( struct gru_message_queue_desc mqd,
void p,
unsigned int  bytes,
int  nasid,
int  vector,
int  apicid 
)

Definition at line 552 of file grukservices.c.

void gru_free_message ( struct gru_message_queue_desc mqd,
void mesg 
)

Definition at line 838 of file grukservices.c.

int gru_get_cb_exception_detail ( void cb,
struct control_block_extended_exc_detail excdet 
)

Definition at line 394 of file grukservices.c.

char* gru_get_cb_exception_detail_str ( int  ret,
void cb,
char buf,
int  size 
)

Definition at line 432 of file grukservices.c.

void* gru_get_next_message ( struct gru_message_queue_desc mqd)

Definition at line 870 of file grukservices.c.

void gru_kservices_exit ( void  )

Definition at line 1157 of file grukservices.c.

int gru_kservices_init ( void  )

Definition at line 1152 of file grukservices.c.

int gru_ktest ( unsigned long  arg)

Definition at line 1127 of file grukservices.c.

void gru_lock_async_resource ( unsigned long  han,
void **  cb,
void **  dsr 
)

Definition at line 366 of file grukservices.c.

int gru_read_gpa ( unsigned long value,
unsigned long  gpa 
)

Definition at line 906 of file grukservices.c.

void gru_release_async_resources ( unsigned long  han)

Definition at line 332 of file grukservices.c.

unsigned long gru_reserve_async_resources ( int  blade_id,
int  cbrs,
int  dsr_bytes,
struct completion cmp 
)

Definition at line 297 of file grukservices.c.

int gru_send_message_gpa ( struct gru_message_queue_desc mqd,
void mesg,
unsigned int  bytes 
)

Definition at line 797 of file grukservices.c.

void gru_unlock_async_resource ( unsigned long  han)

Definition at line 386 of file grukservices.c.

void gru_wait_abort_proc ( void cb)

Definition at line 516 of file grukservices.c.

void gru_wait_async_cbr ( unsigned long  han)

Definition at line 349 of file grukservices.c.

int gru_wait_proc ( void cb)

Definition at line 496 of file grukservices.c.