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>
This commit is contained in:
committed by
Linus Torvalds
parent
27ca8a7b2b
commit
7b8274e93f
@@ -360,6 +360,13 @@ static int gru_try_dropin(struct gru_thread_state *gts,
|
||||
if (ret == -2)
|
||||
goto failupm;
|
||||
|
||||
if (!(gts->ts_sizeavail & GRU_SIZEAVAIL(pageshift))) {
|
||||
gts->ts_sizeavail |= GRU_SIZEAVAIL(pageshift);
|
||||
if (atomic || !gru_update_cch(gts, 0)) {
|
||||
gts->ts_force_cch_reload = 1;
|
||||
goto failupm;
|
||||
}
|
||||
}
|
||||
gru_cb_set_istatus_active(cb);
|
||||
tfh_write_restart(tfh, gpa, GAA_RAM, vaddr, asid, write,
|
||||
GRU_PAGESIZE(pageshift));
|
||||
@@ -535,6 +542,14 @@ int gru_handle_user_call_os(unsigned long cb)
|
||||
gts->ts_force_unload = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* CCH may contain stale data if ts_force_cch_reload is set.
|
||||
*/
|
||||
if (gts->ts_gru && gts->ts_force_cch_reload) {
|
||||
gru_update_cch(gts, 0);
|
||||
gts->ts_force_cch_reload = 0;
|
||||
}
|
||||
|
||||
ret = -EAGAIN;
|
||||
cbrnum = thread_cbr_number(gts, ucbnum);
|
||||
if (gts->ts_force_unload) {
|
||||
|
Reference in New Issue
Block a user