diff options
author | Jack Steiner <steiner@sgi.com> | 2009-04-02 16:59:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 19:05:07 -0700 |
commit | 7b8274e93fbabc7534aa51f95551c30aecdd0066 (patch) | |
tree | f1cfc0e87b07a4094ee06d2dc73673635b4b1775 /drivers/misc/sgi-gru/gruhandles.c | |
parent | 27ca8a7b2bdfb3e22e67fbd5df58e6b6f0bbcd48 (diff) | |
download | blackbird-op-linux-7b8274e93fbabc7534aa51f95551c30aecdd0066.tar.gz blackbird-op-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; |