]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/misc/sgi-gru/grukservices.h
X86: uv: implement a gru_read_gpa kernel function
[linux-beck.git] / drivers / misc / sgi-gru / grukservices.h
index 747ed315d56f41998cec48f1a66057b144afe35c..02aa94d8484ad8e7ec01aee963d563e216f30fa4 100644 (file)
@@ -130,6 +130,20 @@ extern void gru_free_message(struct gru_message_queue_desc *mqd,
 extern void *gru_get_next_message(struct gru_message_queue_desc *mqd);
 
 
+/*
+ * Read a GRU global GPA. Source can be located in a remote partition.
+ *
+ *    Input:
+ *     value           memory address where MMR value is returned
+ *     gpa             source numalink physical address of GPA
+ *
+ *    Output:
+ *     0               OK
+ *     >0              error
+ */
+int gru_read_gpa(unsigned long *value, unsigned long gpa);
+
+
 /*
  * Copy data using the GRU. Source or destination can be located in a remote
  * partition.
@@ -146,4 +160,55 @@ extern void *gru_get_next_message(struct gru_message_queue_desc *mqd);
 extern int gru_copy_gpa(unsigned long dest_gpa, unsigned long src_gpa,
                                                        unsigned int bytes);
 
+/*
+ * Reserve GRU resources to be used asynchronously.
+ *
+ *     input:
+ *             blade_id  - blade on which resources should be reserved
+ *             cbrs      - number of CBRs
+ *             dsr_bytes - number of DSR bytes needed
+ *             cmp       - completion structure for waiting for
+ *                         async completions
+ *     output:
+ *             handle to identify resource
+ *             (0 = no resources)
+ */
+extern unsigned long gru_reserve_async_resources(int blade_id, int cbrs, int dsr_bytes,
+                               struct completion *cmp);
+
+/*
+ * Release async resources previously reserved.
+ *
+ *     input:
+ *             han - handle to identify resources
+ */
+extern void gru_release_async_resources(unsigned long han);
+
+/*
+ * Wait for async GRU instructions to complete.
+ *
+ *     input:
+ *             han - handle to identify resources
+ */
+extern void gru_wait_async_cbr(unsigned long han);
+
+/*
+ * Lock previous reserved async GRU resources
+ *
+ *     input:
+ *             han - handle to identify resources
+ *     output:
+ *             cb  - pointer to first CBR
+ *             dsr - pointer to first DSR
+ */
+extern void gru_lock_async_resource(unsigned long han,  void **cb, void **dsr);
+
+/*
+ * Unlock previous reserved async GRU resources
+ *
+ *     input:
+ *             han - handle to identify resources
+ */
+extern void gru_unlock_async_resource(unsigned long han);
+
 #endif                 /* __GRU_KSERVICES_H_ */