diff options
author | Jack Steiner <steiner@sgi.com> | 2009-06-17 19:28:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 16:04:04 -0400 |
commit | b1b19fcfa417cf62447413d6e8b9b6598adf00b9 (patch) | |
tree | 843b78d76879848fa8907ce24662ecc568012219 /drivers/misc | |
parent | 92b39388eeb45326feb0fa8bd69dbbce66c9efbf (diff) |
gru: add user request to specify gru slice
Add a user request to specify the gru instruction slice parameter for user
contexts.
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')
-rw-r--r-- | drivers/misc/sgi-gru/grufault.c | 4 | ||||
-rw-r--r-- | drivers/misc/sgi-gru/grulib.h | 2 | ||||
-rw-r--r-- | drivers/misc/sgi-gru/grumain.c | 7 | ||||
-rw-r--r-- | drivers/misc/sgi-gru/grutables.h | 1 |
4 files changed, 13 insertions, 1 deletions
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c index b894b7ed9c35..1ad360cd3183 100644 --- a/drivers/misc/sgi-gru/grufault.c +++ b/drivers/misc/sgi-gru/grufault.c | |||
@@ -769,6 +769,10 @@ int gru_set_context_option(unsigned long arg) | |||
769 | /* Register the current task as the GSEG owner */ | 769 | /* Register the current task as the GSEG owner */ |
770 | gts->ts_tgid_owner = current->tgid; | 770 | gts->ts_tgid_owner = current->tgid; |
771 | break; | 771 | break; |
772 | case sco_cch_req_slice: | ||
773 | /* Set the CCH slice option */ | ||
774 | gts->ts_cch_req_slice = req.val1 & 3; | ||
775 | break; | ||
772 | default: | 776 | default: |
773 | ret = -EINVAL; | 777 | ret = -EINVAL; |
774 | } | 778 | } |
diff --git a/drivers/misc/sgi-gru/grulib.h b/drivers/misc/sgi-gru/grulib.h index 8615b904a7c7..a484a9fee3ce 100644 --- a/drivers/misc/sgi-gru/grulib.h +++ b/drivers/misc/sgi-gru/grulib.h | |||
@@ -98,7 +98,7 @@ struct gru_unload_context_req { | |||
98 | /* | 98 | /* |
99 | * Structure used to set context options | 99 | * Structure used to set context options |
100 | */ | 100 | */ |
101 | enum {sco_gseg_owner}; | 101 | enum {sco_gseg_owner, sco_cch_req_slice}; |
102 | struct gru_set_context_option_req { | 102 | struct gru_set_context_option_req { |
103 | unsigned long gseg; | 103 | unsigned long gseg; |
104 | int op; | 104 | int op; |
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c index 347004e4f591..0c20be007b20 100644 --- a/drivers/misc/sgi-gru/grumain.c +++ b/drivers/misc/sgi-gru/grumain.c | |||
@@ -321,6 +321,7 @@ struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, | |||
321 | gts->ts_tsid = tsid; | 321 | gts->ts_tsid = tsid; |
322 | gts->ts_ctxnum = NULLCTX; | 322 | gts->ts_ctxnum = NULLCTX; |
323 | gts->ts_tlb_int_select = -1; | 323 | gts->ts_tlb_int_select = -1; |
324 | gts->ts_cch_req_slice = -1; | ||
324 | gts->ts_sizeavail = GRU_SIZEAVAIL(PAGE_SHIFT); | 325 | gts->ts_sizeavail = GRU_SIZEAVAIL(PAGE_SHIFT); |
325 | if (vma) { | 326 | if (vma) { |
326 | gts->ts_mm = current->mm; | 327 | gts->ts_mm = current->mm; |
@@ -566,6 +567,12 @@ void gru_load_context(struct gru_thread_state *gts) | |||
566 | gts->ts_tlb_int_select = gru_cpu_fault_map_id(); | 567 | gts->ts_tlb_int_select = gru_cpu_fault_map_id(); |
567 | cch->tlb_int_select = gts->ts_tlb_int_select; | 568 | cch->tlb_int_select = gts->ts_tlb_int_select; |
568 | } | 569 | } |
570 | if (gts->ts_cch_req_slice >= 0) { | ||
571 | cch->req_slice_set_enable = 1; | ||
572 | cch->req_slice = gts->ts_cch_req_slice; | ||
573 | } else { | ||
574 | cch->req_slice_set_enable =0; | ||
575 | } | ||
569 | cch->tfm_done_bit_enable = 0; | 576 | cch->tfm_done_bit_enable = 0; |
570 | cch->dsr_allocation_map = gts->ts_dsr_map; | 577 | cch->dsr_allocation_map = gts->ts_dsr_map; |
571 | cch->cbr_allocation_map = gts->ts_cbr_map; | 578 | cch->cbr_allocation_map = gts->ts_cbr_map; |
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h index ee2f4121db21..34ab3d453919 100644 --- a/drivers/misc/sgi-gru/grutables.h +++ b/drivers/misc/sgi-gru/grutables.h | |||
@@ -380,6 +380,7 @@ struct gru_thread_state { | |||
380 | required for contest */ | 380 | required for contest */ |
381 | unsigned char ts_cbr_au_count;/* Number of CBR resources | 381 | unsigned char ts_cbr_au_count;/* Number of CBR resources |
382 | required for contest */ | 382 | required for contest */ |
383 | char ts_cch_req_slice;/* CCH packet slice */ | ||
383 | char ts_blade; /* If >= 0, migrate context if | 384 | char ts_blade; /* If >= 0, migrate context if |
384 | ref from diferent blade */ | 385 | ref from diferent blade */ |
385 | char ts_force_cch_reload; | 386 | char ts_force_cch_reload; |