Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176733
b: refs/heads/master
c: b8229be
h: refs/heads/master
i:
  176731: 62a6efe
v: v3
  • Loading branch information
Jack Steiner authored and Linus Torvalds committed Dec 16, 2009
1 parent 78f146a commit 83710f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 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: 7f2251b1bcdd3d2971b2fde3008b270ea11b8780
refs/heads/master: b8229bedd1f39799dc83d5c0dad0bd9cd3e5f44c
13 changes: 8 additions & 5 deletions trunk/drivers/misc/sgi-gru/grukdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ static int gru_user_copy_handle(void __user **dp, void *s)

static int gru_dump_context_data(void *grubase,
struct gru_context_configuration_handle *cch,
void __user *ubuf, int ctxnum, int dsrcnt)
void __user *ubuf, int ctxnum, int dsrcnt,
int flush_cbrs)
{
void *cb, *cbe, *tfh, *gseg;
int i, scr;
Expand All @@ -55,6 +56,8 @@ static int gru_dump_context_data(void *grubase,
tfh = grubase + GRU_TFH_BASE;

for_each_cbr_in_allocation_map(i, &cch->cbr_allocation_map, scr) {
if (flush_cbrs)
gru_flush_cache(cb);
if (gru_user_copy_handle(&ubuf, cb))
goto fail;
if (gru_user_copy_handle(&ubuf, tfh + i * GRU_HANDLE_STRIDE))
Expand Down Expand Up @@ -115,7 +118,7 @@ static int gru_dump_tgh(struct gru_state *gru,

static int gru_dump_context(struct gru_state *gru, int ctxnum,
void __user *ubuf, void __user *ubufend, char data_opt,
char lock_cch)
char lock_cch, char flush_cbrs)
{
struct gru_dump_context_header hdr;
struct gru_dump_context_header __user *uhdr = ubuf;
Expand Down Expand Up @@ -159,8 +162,7 @@ static int gru_dump_context(struct gru_state *gru, int ctxnum,
ret = -EFBIG;
else
ret = gru_dump_context_data(grubase, cch, ubuf, ctxnum,
dsrcnt);

dsrcnt, flush_cbrs);
}
if (cch_locked)
unlock_cch_handle(cch);
Expand Down Expand Up @@ -215,7 +217,8 @@ int gru_dump_chiplet_request(unsigned long arg)
for (ctxnum = 0; ctxnum < GRU_NUM_CCH; ctxnum++) {
if (req.ctxnum == ctxnum || req.ctxnum < 0) {
ret = gru_dump_context(gru, ctxnum, ubuf, ubufend,
req.data_opt, req.lock_cch);
req.data_opt, req.lock_cch,
req.flush_cbrs);
if (ret < 0)
goto fail;
ubuf += ret;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/misc/sgi-gru/grulib.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ struct gru_dump_chiplet_state_req {
int ctxnum;
char data_opt;
char lock_cch;
char flush_cbrs;
char fill[10];
pid_t pid;
void *buf;
size_t buflen;
Expand Down

0 comments on commit 83710f4

Please sign in to comment.