Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176726
b: refs/heads/master
c: 518e5cd
h: refs/heads/master
v: v3
  • Loading branch information
Jack Steiner authored and Linus Torvalds committed Dec 16, 2009
1 parent a7f222e commit b7f9296
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9178052fda2f934535f0b9940b987c3ac4c51bd7
refs/heads/master: 518e5cd4aae476042bdee511e0e00c8670c0df42
10 changes: 10 additions & 0 deletions trunk/drivers/misc/sgi-gru/grufault.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,16 @@ int gru_set_context_option(unsigned long arg)
return -EINVAL;

switch (req.op) {
case sco_blade_chiplet:
/* Select blade/chiplet for GRU context */
if (req.val1 < -1 || req.val1 >= GRU_MAX_BLADES || !gru_base[req.val1] ||
req.val0 < -1 || req.val0 >= GRU_CHIPLETS_PER_HUB) {
ret = -EINVAL;
} else {
gts->ts_user_blade_id = req.val1;
gts->ts_user_chiplet_id = req.val0;
}
break;
case sco_gseg_owner:
/* Register the current task as the GSEG owner */
gts->ts_tgid_owner = current->tgid;
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/misc/sgi-gru/grulib.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ struct gru_unload_context_req {
/*
* Structure used to set context options
*/
enum {sco_gseg_owner, sco_cch_req_slice};
enum {sco_gseg_owner, sco_cch_req_slice, sco_blade_chiplet};
struct gru_set_context_option_req {
unsigned long gseg;
int op;
unsigned long val1;
int val0;
long val1;
};

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/misc/sgi-gru/grumain.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma,
gts->ts_cbr_au_count = cbr_au_count;
gts->ts_dsr_au_count = dsr_au_count;
gts->ts_user_options = options;
gts->ts_user_blade_id = -1;
gts->ts_user_chiplet_id = -1;
gts->ts_tsid = tsid;
gts->ts_ctxnum = NULLCTX;
gts->ts_tlb_int_select = -1;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/misc/sgi-gru/grutables.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ struct gru_thread_state {
long ts_user_options;/* misc user option flags */
pid_t ts_tgid_owner; /* task that is using the
context - for migration */
short ts_user_blade_id;/* user selected blade */
char ts_user_chiplet_id;/* user selected chiplet */
unsigned short ts_sizeavail; /* Pagesizes in use */
int ts_tsid; /* thread that owns the
structure */
Expand Down

0 comments on commit b7f9296

Please sign in to comment.