#ifndef __GRU_INSTRUCTIONS_H__
#define __GRU_INSTRUCTIONS_H__
extern int gru_check_status_proc(void *cb);
extern int gru_wait_proc(void *cb);
extern void gru_wait_abort_proc(void *cb);
#if defined(CONFIG_X86_64)
#include <asm/cacheflush.h>
#define __flush_cache(p) …
#define gru_ordered_store_ulong(p, v) …
#else
#error "Unsupported architecture"
#endif
#define CBS_IDLE …
#define CBS_EXCEPTION …
#define CBS_ACTIVE …
#define CBS_CALL_OS …
#define CBSS_MSG_QUEUE_MASK …
#define CBSS_IMPLICIT_ABORT_ACTIVE_MASK …
#define CBSS_NO_ERROR …
#define CBSS_LB_OVERFLOWED …
#define CBSS_QLIMIT_REACHED …
#define CBSS_PAGE_OVERFLOW …
#define CBSS_AMO_NACKED …
#define CBSS_PUT_NACKED …
struct control_block_extended_exc_detail { … };
struct gru_instruction_bits { … };
struct gru_instruction { … };
#define GRU_CB_ICMD_SHFT …
#define GRU_CB_ICMD_MASK …
#define GRU_CB_XTYPE_SHFT …
#define GRU_CB_XTYPE_MASK …
#define GRU_CB_IAA0_SHFT …
#define GRU_CB_IAA0_MASK …
#define GRU_CB_IAA1_SHFT …
#define GRU_CB_IAA1_MASK …
#define GRU_CB_IMA_SHFT …
#define GRU_CB_IMA_MASK …
#define GRU_CB_OPC_SHFT …
#define GRU_CB_OPC_MASK …
#define GRU_CB_EXOPC_SHFT …
#define GRU_CB_EXOPC_MASK …
#define GRU_IDEF2_SHFT …
#define GRU_IDEF2_MASK …
#define GRU_ISTATUS_SHFT …
#define GRU_ISTATUS_MASK …
#define OP_NOP …
#define OP_BCOPY …
#define OP_VLOAD …
#define OP_IVLOAD …
#define OP_VSTORE …
#define OP_IVSTORE …
#define OP_VSET …
#define OP_IVSET …
#define OP_MESQ …
#define OP_GAMXR …
#define OP_GAMIR …
#define OP_GAMIRR …
#define OP_GAMER …
#define OP_GAMERR …
#define OP_BSTORE …
#define OP_VFLUSH …
#define EOP_IR_FETCH …
#define EOP_IR_CLR …
#define EOP_IR_INC …
#define EOP_IR_DEC …
#define EOP_IR_QCHK1 …
#define EOP_IR_QCHK2 …
#define EOP_IRR_FETCH …
#define EOP_IRR_CLR …
#define EOP_IRR_INC …
#define EOP_IRR_DEC …
#define EOP_IRR_DECZ …
#define EOP_ER_SWAP …
#define EOP_ER_OR …
#define EOP_ER_AND …
#define EOP_ER_XOR …
#define EOP_ER_ADD …
#define EOP_ER_CSWAP …
#define EOP_ER_CADD …
#define EOP_ERR_SWAP …
#define EOP_ERR_OR …
#define EOP_ERR_AND …
#define EOP_ERR_XOR …
#define EOP_ERR_ADD …
#define EOP_ERR_CSWAP …
#define EOP_ERR_EPOLL …
#define EOP_ERR_NPOLL …
#define EOP_XR_CSWAP …
#define XTYPE_B …
#define XTYPE_S …
#define XTYPE_W …
#define XTYPE_DW …
#define XTYPE_CL …
#define IAA_RAM …
#define IAA_NCRAM …
#define IAA_MMIO …
#define IAA_REGISTER …
#define IMA_MAPPED …
#define IMA_CB_DELAY …
#define IMA_UNMAPPED …
#define IMA_INTERRUPT …
#define CBE_CAUSE_RI …
#define CBE_CAUSE_INVALID_INSTRUCTION …
#define CBE_CAUSE_UNMAPPED_MODE_FORBIDDEN …
#define CBE_CAUSE_PE_CHECK_DATA_ERROR …
#define CBE_CAUSE_IAA_GAA_MISMATCH …
#define CBE_CAUSE_DATA_SEGMENT_LIMIT_EXCEPTION …
#define CBE_CAUSE_OS_FATAL_TLB_FAULT …
#define CBE_CAUSE_EXECUTION_HW_ERROR …
#define CBE_CAUSE_TLBHW_ERROR …
#define CBE_CAUSE_RA_REQUEST_TIMEOUT …
#define CBE_CAUSE_HA_REQUEST_TIMEOUT …
#define CBE_CAUSE_RA_RESPONSE_FATAL …
#define CBE_CAUSE_RA_RESPONSE_NON_FATAL …
#define CBE_CAUSE_HA_RESPONSE_FATAL …
#define CBE_CAUSE_HA_RESPONSE_NON_FATAL …
#define CBE_CAUSE_ADDRESS_SPACE_DECODE_ERROR …
#define CBE_CAUSE_PROTOCOL_STATE_DATA_ERROR …
#define CBE_CAUSE_RA_RESPONSE_DATA_ERROR …
#define CBE_CAUSE_HA_RESPONSE_DATA_ERROR …
#define CBE_CAUSE_FORCED_ERROR …
#define CBR_EXS_ABORT_OCC_BIT …
#define CBR_EXS_INT_OCC_BIT …
#define CBR_EXS_PENDING_BIT …
#define CBR_EXS_QUEUED_BIT …
#define CBR_EXS_TLB_INVAL_BIT …
#define CBR_EXS_EXCEPTION_BIT …
#define CBR_EXS_CB_INT_PENDING_BIT …
#define CBR_EXS_ABORT_OCC …
#define CBR_EXS_INT_OCC …
#define CBR_EXS_PENDING …
#define CBR_EXS_QUEUED …
#define CBR_EXS_TLB_INVAL …
#define CBR_EXS_EXCEPTION …
#define CBR_EXS_CB_INT_PENDING …
#define EXCEPTION_RETRY_BITS …
gru_mesqhead;
static inline unsigned long
__opdword(unsigned char opcode, unsigned char exopc, unsigned char xtype,
unsigned char iaa0, unsigned char iaa1,
unsigned long idef2, unsigned char ima)
{ … }
static inline void gru_flush_cache(void *p)
{ … }
static inline void gru_start_instruction(struct gru_instruction *ins, unsigned long op64)
{ … }
#define CB_IMA(h) …
#define GRU_DINDEX(i) …
static inline void gru_vload_phys(void *cb, unsigned long gpa,
unsigned int tri0, int iaa, unsigned long hints)
{ … }
static inline void gru_vstore_phys(void *cb, unsigned long gpa,
unsigned int tri0, int iaa, unsigned long hints)
{ … }
static inline void gru_vload(void *cb, unsigned long mem_addr,
unsigned int tri0, unsigned char xtype, unsigned long nelem,
unsigned long stride, unsigned long hints)
{ … }
static inline void gru_vstore(void *cb, unsigned long mem_addr,
unsigned int tri0, unsigned char xtype, unsigned long nelem,
unsigned long stride, unsigned long hints)
{ … }
static inline void gru_ivload(void *cb, unsigned long mem_addr,
unsigned int tri0, unsigned int tri1, unsigned char xtype,
unsigned long nelem, unsigned long hints)
{ … }
static inline void gru_ivstore(void *cb, unsigned long mem_addr,
unsigned int tri0, unsigned int tri1,
unsigned char xtype, unsigned long nelem, unsigned long hints)
{ … }
static inline void gru_vset(void *cb, unsigned long mem_addr,
unsigned long value, unsigned char xtype, unsigned long nelem,
unsigned long stride, unsigned long hints)
{ … }
static inline void gru_ivset(void *cb, unsigned long mem_addr,
unsigned int tri1, unsigned long value, unsigned char xtype,
unsigned long nelem, unsigned long hints)
{ … }
static inline void gru_vflush(void *cb, unsigned long mem_addr,
unsigned long nelem, unsigned char xtype, unsigned long stride,
unsigned long hints)
{ … }
static inline void gru_nop(void *cb, int hints)
{ … }
static inline void gru_bcopy(void *cb, const unsigned long src,
unsigned long dest,
unsigned int tri0, unsigned int xtype, unsigned long nelem,
unsigned int bufsize, unsigned long hints)
{ … }
static inline void gru_bstore(void *cb, const unsigned long src,
unsigned long dest, unsigned int tri0, unsigned int xtype,
unsigned long nelem, unsigned long hints)
{ … }
static inline void gru_gamir(void *cb, int exopc, unsigned long src,
unsigned int xtype, unsigned long hints)
{ … }
static inline void gru_gamirr(void *cb, int exopc, unsigned long src,
unsigned int xtype, unsigned long hints)
{ … }
static inline void gru_gamer(void *cb, int exopc, unsigned long src,
unsigned int xtype,
unsigned long operand1, unsigned long operand2,
unsigned long hints)
{ … }
static inline void gru_gamerr(void *cb, int exopc, unsigned long src,
unsigned int xtype, unsigned long operand1,
unsigned long operand2, unsigned long hints)
{ … }
static inline void gru_gamxr(void *cb, unsigned long src,
unsigned int tri0, unsigned long hints)
{ … }
static inline void gru_mesq(void *cb, unsigned long queue,
unsigned long tri0, unsigned long nelem,
unsigned long hints)
{ … }
static inline unsigned long gru_get_amo_value(void *cb)
{ … }
static inline int gru_get_amo_value_head(void *cb)
{ … }
static inline int gru_get_amo_value_limit(void *cb)
{ … }
static inline union gru_mesqhead gru_mesq_head(int head, int limit)
{ … }
extern int gru_get_cb_exception_detail(void *cb,
struct control_block_extended_exc_detail *excdet);
#define GRU_EXC_STR_SIZE …
struct gru_control_block_status { … };
static inline int gru_get_cb_status(void *cb)
{ … }
static inline int gru_get_cb_message_queue_substatus(void *cb)
{ … }
static inline int gru_get_cb_substatus(void *cb)
{ … }
static inline int gru_check_status(void *cb)
{ … }
static inline int gru_wait(void *cb)
{ … }
static inline void gru_wait_abort(void *cb)
{ … }
static inline void *gru_get_gseg_pointer (void *p)
{ … }
static inline void *gru_get_cb_pointer(void *gseg,
int index)
{ … }
static inline void *gru_get_data_pointer(void *gseg, int index)
{ … }
static inline int gru_get_tri(void *vaddr)
{ … }
#endif