aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grufault.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-04-02 19:59:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:05:07 -0400
commit7b8274e93fbabc7534aa51f95551c30aecdd0066 (patch)
treef1cfc0e87b07a4094ee06d2dc73673635b4b1775 /drivers/misc/sgi-gru/grufault.c
parent27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48 (diff)
sgi-gru: support multiple pagesizes in GRU
Add multiple pagesize support to the GRU driver. 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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index 15507d31e62b..ab118558552e 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -360,6 +360,13 @@ static int gru_try_dropin(struct gru_thread_state *gts,
360 if (ret == -2) 360 if (ret == -2)
361 goto failupm; 361 goto failupm;
362 362
363 if (!(gts->ts_sizeavail & GRU_SIZEAVAIL(pageshift))) {
364 gts->ts_sizeavail |= GRU_SIZEAVAIL(pageshift);
365 if (atomic || !gru_update_cch(gts, 0)) {
366 gts->ts_force_cch_reload = 1;
367 goto failupm;
368 }
369 }
363 gru_cb_set_istatus_active(cb); 370 gru_cb_set_istatus_active(cb);
364 tfh_write_restart(tfh, gpa, GAA_RAM, vaddr, asid, write, 371 tfh_write_restart(tfh, gpa, GAA_RAM, vaddr, asid, write,
365 GRU_PAGESIZE(pageshift)); 372 GRU_PAGESIZE(pageshift));
@@ -535,6 +542,14 @@ int gru_handle_user_call_os(unsigned long cb)
535 gts->ts_force_unload = 1; 542 gts->ts_force_unload = 1;
536 } 543 }
537 544
545 /*
546 * CCH may contain stale data if ts_force_cch_reload is set.
547 */
548 if (gts->ts_gru && gts->ts_force_cch_reload) {
549 gru_update_cch(gts, 0);
550 gts->ts_force_cch_reload = 0;
551 }
552
538 ret = -EAGAIN; 553 ret = -EAGAIN;
539 cbrnum = thread_cbr_number(gts, ucbnum); 554 cbrnum = thread_cbr_number(gts, ucbnum);
540 if (gts->ts_force_unload) { 555 if (gts->ts_force_unload) {