diff options
author | Jack Steiner <steiner@sgi.com> | 2009-06-17 19:28:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 16:03:59 -0400 |
commit | 9cc9b056ea51608788609d7e26c7db55ef81bb2e (patch) | |
tree | e6381d7575babaee9658c5a2bc007a8dd2ec49ae /drivers/misc/sgi-gru/grulib.h | |
parent | cd1334f03f7b799bc6893b511daf2080e8f73863 (diff) |
gru: dump chiplet state
Add support for dumpping the state of an entire GRU chiplet.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grulib.h')
-rw-r--r-- | drivers/misc/sgi-gru/grulib.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grulib.h b/drivers/misc/sgi-gru/grulib.h index e56e196a6998..6ab872665e7f 100644 --- a/drivers/misc/sgi-gru/grulib.h +++ b/drivers/misc/sgi-gru/grulib.h | |||
@@ -47,6 +47,9 @@ | |||
47 | /* For fetching GRU chiplet status */ | 47 | /* For fetching GRU chiplet status */ |
48 | #define GRU_GET_CHIPLET_STATUS _IOWR(GRU_IOCTL_NUM, 10, void *) | 48 | #define GRU_GET_CHIPLET_STATUS _IOWR(GRU_IOCTL_NUM, 10, void *) |
49 | 49 | ||
50 | /* For dumpping GRU chiplet state */ | ||
51 | #define GRU_DUMP_CHIPLET_STATE _IOWR(GRU_IOCTL_NUM, 11, void *) | ||
52 | |||
50 | /* For user TLB flushing (primarily for tests) */ | 53 | /* For user TLB flushing (primarily for tests) */ |
51 | #define GRU_USER_FLUSH_TLB _IOWR(GRU_IOCTL_NUM, 50, void *) | 54 | #define GRU_USER_FLUSH_TLB _IOWR(GRU_IOCTL_NUM, 50, void *) |
52 | 55 | ||
@@ -84,6 +87,36 @@ struct gru_flush_tlb_req { | |||
84 | }; | 87 | }; |
85 | 88 | ||
86 | /* | 89 | /* |
90 | * Structure used to pass TLB flush parameters to the driver | ||
91 | */ | ||
92 | enum {dcs_pid, dcs_gid}; | ||
93 | struct gru_dump_chiplet_state_req { | ||
94 | unsigned int op; | ||
95 | int gid; | ||
96 | int ctxnum; | ||
97 | char data_opt; | ||
98 | char lock_cch; | ||
99 | pid_t pid; | ||
100 | void *buf; | ||
101 | size_t buflen; | ||
102 | /* ---- output --- */ | ||
103 | unsigned int num_contexts; | ||
104 | }; | ||
105 | |||
106 | #define GRU_DUMP_MAGIC 0x3474ab6c | ||
107 | struct gru_dump_context_header { | ||
108 | unsigned int magic; | ||
109 | unsigned char gid; | ||
110 | unsigned char ctxnum; | ||
111 | unsigned char cbrcnt; | ||
112 | unsigned char dsrcnt; | ||
113 | pid_t pid; | ||
114 | unsigned long vaddr; | ||
115 | int cch_locked; | ||
116 | unsigned long data[0]; | ||
117 | }; | ||
118 | |||
119 | /* | ||
87 | * GRU configuration info (temp - for testing) | 120 | * GRU configuration info (temp - for testing) |
88 | */ | 121 | */ |
89 | struct gru_config_info { | 122 | struct gru_config_info { |