Remove unused duplicate grant code in umap
This commit is contained in:
parent
1e5f9dfa14
commit
b08dff6011
@ -350,10 +350,6 @@ vir_bytes bytes; /* # of bytes to be copied */
|
||||
vir_bytes linear;
|
||||
u32_t phys = 0;
|
||||
|
||||
if(seg == MEM_GRANT) {
|
||||
return umap_grant(rp, (cp_grant_id_t) vir_addr, bytes);
|
||||
}
|
||||
|
||||
if(!(linear = umap_local(rp, seg, vir_addr, bytes))) {
|
||||
printf("SYSTEM:umap_virtual: umap_local failed\n");
|
||||
phys = 0;
|
||||
|
@ -84,7 +84,6 @@ _PROTOTYPE( void kernel_call, (message *m_user, struct proc * caller) );
|
||||
_PROTOTYPE( void system_init, (void) );
|
||||
#define numap_local(proc_nr, vir_addr, bytes) \
|
||||
umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes))
|
||||
_PROTOTYPE( phys_bytes umap_grant, (struct proc *, cp_grant_id_t, vir_bytes));
|
||||
_PROTOTYPE( void clear_endpoint, (struct proc *rc) );
|
||||
_PROTOTYPE( void clear_ipc_refs, (struct proc *rc, int caller_ret) );
|
||||
_PROTOTYPE( phys_bytes umap_bios, (vir_bytes vir_addr, vir_bytes bytes));
|
||||
|
@ -478,45 +478,6 @@ vir_bytes bytes; /* # of bytes to be copied */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*===========================================================================*
|
||||
* umap_grant *
|
||||
*===========================================================================*/
|
||||
PUBLIC phys_bytes umap_grant(rp, grant, bytes)
|
||||
struct proc *rp; /* pointer to proc table entry for process */
|
||||
cp_grant_id_t grant; /* grant no. */
|
||||
vir_bytes bytes; /* size */
|
||||
{
|
||||
int proc_nr;
|
||||
vir_bytes offset, ret;
|
||||
endpoint_t granter;
|
||||
|
||||
/* See if the grant in that process is sensible, and
|
||||
* find out the virtual address and (optionally) new
|
||||
* process for that address.
|
||||
*
|
||||
* Then convert that process to a slot number.
|
||||
*/
|
||||
if(verify_grant(rp->p_endpoint, ANY, grant, bytes, 0, 0,
|
||||
&offset, &granter) != OK) {
|
||||
printf("SYSTEM: umap_grant: verify_grant failed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!isokendpt(granter, &proc_nr)) {
|
||||
printf("SYSTEM: umap_grant: isokendpt failed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Do the mapping from virtual to physical. */
|
||||
ret = umap_virtual(proc_addr(proc_nr), D, offset, bytes);
|
||||
if(!ret) {
|
||||
printf("SYSTEM:umap_grant:umap_virtual failed; grant %s:%d -> %s: vir 0x%lx\n",
|
||||
rp->p_name, grant,
|
||||
proc_addr(proc_nr)->p_name, offset);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* clear_ipc *
|
||||
*===========================================================================*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user