gru: delete user request for fetching chiplet status
[deliverable/linux.git] / drivers / misc / sgi-gru / grulib.h
index 87586551d16f87d9d5a3edb69123a585c5c894a4..8ed6acbc47c7b6176a8652463e702d897cdc73a7 100644 (file)
 /* For user unload context */
 #define GRU_USER_UNLOAD_CONTEXT                _IOWR(GRU_IOCTL_NUM, 9, void *)
 
-/* For fetching GRU chiplet status */
-#define GRU_GET_CHIPLET_STATUS         _IOWR(GRU_IOCTL_NUM, 10, void *)
-
 /* For dumpping GRU chiplet state */
 #define GRU_DUMP_CHIPLET_STATE         _IOWR(GRU_IOCTL_NUM, 11, void *)
 
+/* For getting gseg statistics */
+#define GRU_GET_GSEG_STATISTICS                _IOWR(GRU_IOCTL_NUM, 12, void *)
+
 /* For user TLB flushing (primarily for tests) */
 #define GRU_USER_FLUSH_TLB             _IOWR(GRU_IOCTL_NUM, 50, void *)
 
 
 #define CONTEXT_WINDOW_BYTES(th)        (GRU_GSEG_PAGESIZE * (th))
 #define THREAD_POINTER(p, th)          (p + GRU_GSEG_PAGESIZE * (th))
+#define GSEG_START(cb)                 ((void *)((unsigned long)(cb) & ~(GRU_GSEG_PAGESIZE - 1)))
+
+/*
+ * Statictics kept on a per-GTS basis.
+ */
+struct gts_statistics {
+       unsigned long   fmm_tlbdropin;
+       unsigned long   upm_tlbdropin;
+       unsigned long   context_stolen;
+};
+
+struct gru_get_gseg_statistics_req {
+       unsigned long           gseg;
+       struct gts_statistics   stats;
+};
 
 /*
  * Structure used to pass TLB flush parameters to the driver
This page took 0.025364 seconds and 5 git commands to generate.