diff options
author | Jack Steiner <steiner@sgi.com> | 2009-04-03 01:59:12 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-03 04:05:07 +0200 |
commit | 7b8274e93fbabc7534aa51f95551c30aecdd0066 (patch) | |
tree | f1cfc0e87b07a4094ee06d2dc73673635b4b1775 /drivers/misc/sgi-gru/gruhandles.c | |
parent | sgi-gru: fix bugs related to module unload of the GRU driver (diff) | |
download | linux-7b8274e93fbabc7534aa51f95551c30aecdd0066.tar.xz linux-7b8274e93fbabc7534aa51f95551c30aecdd0066.zip |
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>
Diffstat (limited to 'drivers/misc/sgi-gru/gruhandles.c')
-rw-r--r-- | drivers/misc/sgi-gru/gruhandles.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/drivers/misc/sgi-gru/gruhandles.c b/drivers/misc/sgi-gru/gruhandles.c index 9dcf5d896683..9b7ccb328697 100644 --- a/drivers/misc/sgi-gru/gruhandles.c +++ b/drivers/misc/sgi-gru/gruhandles.c @@ -72,42 +72,16 @@ static int wait_instruction_complete(void *h, enum mcs_op opc) return status; } -#if defined CONFIG_IA64 -static void cch_allocate_set_asids( - struct gru_context_configuration_handle *cch, int asidval) +int cch_allocate(struct gru_context_configuration_handle *cch, + int asidval, int sizeavail, unsigned long cbrmap, + unsigned long dsrmap) { int i; for (i = 0; i < 8; i++) { cch->asid[i] = (asidval++); -#if 0 - /* ZZZ hugepages not supported yet */ - if (i == RGN_HPAGE) - cch->sizeavail[i] = GRU_SIZEAVAIL(hpage_shift); - else -#endif - cch->sizeavail[i] = GRU_SIZEAVAIL(PAGE_SHIFT); + cch->sizeavail[i] = sizeavail; } -} -#elif defined CONFIG_X86_64 -static void cch_allocate_set_asids( - struct gru_context_configuration_handle *cch, int asidval) -{ - int i; - - for (i = 0; i < 8; i++) { - cch->asid[i] = asidval++; - cch->sizeavail[i] = GRU_SIZEAVAIL(PAGE_SHIFT) | - GRU_SIZEAVAIL(21); - } -} -#endif - -int cch_allocate(struct gru_context_configuration_handle *cch, - int asidval, unsigned long cbrmap, - unsigned long dsrmap) -{ - cch_allocate_set_asids(cch, asidval); cch->dsr_allocation_map = dsrmap; cch->cbr_allocation_map = cbrmap; cch->opc = CCHOP_ALLOCATE; |