Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176742
b: refs/heads/master
c: 9c13cb3
h: refs/heads/master
v: v3
  • Loading branch information
Jack Steiner authored and Linus Torvalds committed Dec 16, 2009
1 parent 731711c commit 8a45c3c
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 1848a710287b33a92c3c5b2f4c3ae201a879eb7e
refs/heads/master: 9c13cb331f7054d537d4caa094d3ebbba544833a
16 changes: 11 additions & 5 deletions trunk/drivers/misc/sgi-gru/grufault.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
#include "gru_instructions.h"
#include <asm/uv/uv_hub.h>

/* Return codes for vtop functions */
#define VTOP_SUCCESS 0
#define VTOP_INVALID -1
#define VTOP_RETRY -2


/*
* Test if a physical address is a valid GRU GSEG address
*/
Expand Down Expand Up @@ -280,12 +286,12 @@ static int gru_vtop(struct gru_thread_state *gts, unsigned long vaddr,
paddr = paddr & ~((1UL << ps) - 1);
*gpa = uv_soc_phys_ram_to_gpa(paddr);
*pageshift = ps;
return 0;
return VTOP_SUCCESS;

inval:
return -1;
return VTOP_INVALID;
upm:
return -2;
return VTOP_RETRY;
}


Expand Down Expand Up @@ -412,9 +418,9 @@ static int gru_try_dropin(struct gru_thread_state *gts,
goto failactive;

ret = gru_vtop(gts, vaddr, write, atomic, &gpa, &pageshift);
if (ret == -1)
if (ret == VTOP_INVALID)
goto failinval;
if (ret == -2)
if (ret == VTOP_RETRY)
goto failupm;

if (!(gts->ts_sizeavail & GRU_SIZEAVAIL(pageshift))) {
Expand Down

0 comments on commit 8a45c3c

Please sign in to comment.