diff options
author | Jack Steiner <steiner@sgi.com> | 2009-12-15 19:48:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:15 -0500 |
commit | 55484c45dbeca2eec7642932ec3f60f8a2d4bdbf (patch) | |
tree | 4927e959a656def901bb105605df4ab6977ab2d1 /drivers/misc/sgi-gru/grukservices.c | |
parent | 518e5cd4aae476042bdee511e0e00c8670c0df42 (diff) |
gru: allow users to specify gru chiplet 2
Add support to the GRU driver to allow users to specify the blade &
chiplet for allocation of GRU contexts. Add new statistics for context
loading/unloading/retargeting. Also deleted a few GRU stats that were no
longer being unused.
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/grukservices.c')
-rw-r--r-- | drivers/misc/sgi-gru/grukservices.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c index 306855cc80fe..e0d4b53d1fc2 100644 --- a/drivers/misc/sgi-gru/grukservices.c +++ b/drivers/misc/sgi-gru/grukservices.c | |||
@@ -160,8 +160,10 @@ static void gru_load_kernel_context(struct gru_blade_state *bs, int blade_id) | |||
160 | up_read(&bs->bs_kgts_sema); | 160 | up_read(&bs->bs_kgts_sema); |
161 | down_write(&bs->bs_kgts_sema); | 161 | down_write(&bs->bs_kgts_sema); |
162 | 162 | ||
163 | if (!bs->bs_kgts) | 163 | if (!bs->bs_kgts) { |
164 | bs->bs_kgts = gru_alloc_gts(NULL, 0, 0, 0, 0); | 164 | bs->bs_kgts = gru_alloc_gts(NULL, 0, 0, 0, 0); |
165 | bs->bs_kgts->ts_user_blade_id = blade_id; | ||
166 | } | ||
165 | kgts = bs->bs_kgts; | 167 | kgts = bs->bs_kgts; |
166 | 168 | ||
167 | if (!kgts->ts_gru) { | 169 | if (!kgts->ts_gru) { |
@@ -172,9 +174,9 @@ static void gru_load_kernel_context(struct gru_blade_state *bs, int blade_id) | |||
172 | kgts->ts_dsr_au_count = GRU_DS_BYTES_TO_AU( | 174 | kgts->ts_dsr_au_count = GRU_DS_BYTES_TO_AU( |
173 | GRU_NUM_KERNEL_DSR_BYTES * ncpus + | 175 | GRU_NUM_KERNEL_DSR_BYTES * ncpus + |
174 | bs->bs_async_dsr_bytes); | 176 | bs->bs_async_dsr_bytes); |
175 | while (!gru_assign_gru_context(kgts, blade_id)) { | 177 | while (!gru_assign_gru_context(kgts)) { |
176 | msleep(1); | 178 | msleep(1); |
177 | gru_steal_context(kgts, blade_id); | 179 | gru_steal_context(kgts); |
178 | } | 180 | } |
179 | gru_load_context(kgts); | 181 | gru_load_context(kgts); |
180 | gru = bs->bs_kgts->ts_gru; | 182 | gru = bs->bs_kgts->ts_gru; |