diff options
author | Jack Steiner <steiner@sgi.com> | 2009-12-15 19:48:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:15 -0500 |
commit | 99f7c229b32bdf7424fbeb1d0d1b3883e14e97d0 (patch) | |
tree | bc5cbd2cd6c8452faacfb2e27dc1fe9dc3e1000a /drivers/misc/sgi-gru/grufault.c | |
parent | 55484c45dbeca2eec7642932ec3f60f8a2d4bdbf (diff) |
gru: allow users to specify gru chiplet 3
This patch builds on the infrastructure introduced in the patches that
allow user specification of GRU blades & chiplets for context allocation.
This patch simplifies the algorithms for migrating GRU contexts between
blades.
No new functionality is introduced.
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/grufault.c')
-rw-r--r-- | drivers/misc/sgi-gru/grufault.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c index 321ad809f345..9470303a9cb9 100644 --- a/drivers/misc/sgi-gru/grufault.c +++ b/drivers/misc/sgi-gru/grufault.c | |||
@@ -362,7 +362,7 @@ static int gru_try_dropin(struct gru_thread_state *gts, | |||
362 | 362 | ||
363 | if (!(gts->ts_sizeavail & GRU_SIZEAVAIL(pageshift))) { | 363 | if (!(gts->ts_sizeavail & GRU_SIZEAVAIL(pageshift))) { |
364 | gts->ts_sizeavail |= GRU_SIZEAVAIL(pageshift); | 364 | gts->ts_sizeavail |= GRU_SIZEAVAIL(pageshift); |
365 | if (atomic || !gru_update_cch(gts, 0)) { | 365 | if (atomic || !gru_update_cch(gts)) { |
366 | gts->ts_force_cch_reload = 1; | 366 | gts->ts_force_cch_reload = 1; |
367 | goto failupm; | 367 | goto failupm; |
368 | } | 368 | } |
@@ -553,14 +553,12 @@ int gru_handle_user_call_os(unsigned long cb) | |||
553 | */ | 553 | */ |
554 | if (gts->ts_gru && gts->ts_force_cch_reload) { | 554 | if (gts->ts_gru && gts->ts_force_cch_reload) { |
555 | gts->ts_force_cch_reload = 0; | 555 | gts->ts_force_cch_reload = 0; |
556 | gru_update_cch(gts, 0); | 556 | gru_update_cch(gts); |
557 | } | 557 | } |
558 | 558 | ||
559 | ret = -EAGAIN; | 559 | ret = -EAGAIN; |
560 | cbrnum = thread_cbr_number(gts, ucbnum); | 560 | cbrnum = thread_cbr_number(gts, ucbnum); |
561 | if (gts->ts_force_unload) { | 561 | if (gts->ts_gru) { |
562 | gru_unload_context(gts, 1); | ||
563 | } else if (gts->ts_gru) { | ||
564 | tfh = get_tfh_by_index(gts->ts_gru, cbrnum); | 562 | tfh = get_tfh_by_index(gts->ts_gru, cbrnum); |
565 | cbk = get_gseg_base_address_cb(gts->ts_gru->gs_gru_base_vaddr, | 563 | cbk = get_gseg_base_address_cb(gts->ts_gru->gs_gru_base_vaddr, |
566 | gts->ts_ctxnum, ucbnum); | 564 | gts->ts_ctxnum, ucbnum); |