gru: support cch_allocate for kernel threads
Change the interface to cch_allocate so that it can be used to allocate GRU contexts for kernel threads. Kernel threads use the GRU in unmapped mode and do not require ASIDs for the GRU TLB. 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>
This commit is contained in:

committed by
Linus Torvalds

parent
d57c82b107
commit
6e9100741c
@@ -72,18 +72,8 @@ static int wait_instruction_complete(void *h, enum mcs_op opc)
|
||||
return status;
|
||||
}
|
||||
|
||||
int cch_allocate(struct gru_context_configuration_handle *cch,
|
||||
int asidval, int sizeavail, unsigned long cbrmap,
|
||||
unsigned long dsrmap)
|
||||
int cch_allocate(struct gru_context_configuration_handle *cch)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
cch->asid[i] = (asidval++);
|
||||
cch->sizeavail[i] = sizeavail;
|
||||
}
|
||||
cch->dsr_allocation_map = dsrmap;
|
||||
cch->cbr_allocation_map = cbrmap;
|
||||
cch->opc = CCHOP_ALLOCATE;
|
||||
start_instruction(cch);
|
||||
return wait_instruction_complete(cch, cchop_allocate);
|
||||
|
Reference in New Issue
Block a user