diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2010-11-10 18:09:09 (GMT) |
---|---|---|
committer | Omar Ramirez Luna <omar.ramirez@ti.com> | 2010-11-11 00:34:42 (GMT) |
commit | 2fa28a5182869968a388d34f8d809aa07a0d4046 (patch) | |
tree | bdafb4601aa8b4385160fee9401a33d139078460 /drivers/staging/tidspbridge/pmgr/dspapi.c | |
parent | 677f2ded8179c8d5d49cfea0d5217691182b48f2 (diff) | |
download | linux-2fa28a5182869968a388d34f8d809aa07a0d4046.tar.xz |
Revert "staging: tidspbridge - deprecate reserve/unreserve_memory funtions"
This reverts commit b1ced160af36043ee80d354318794753b6b7c008.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Diffstat (limited to 'drivers/staging/tidspbridge/pmgr/dspapi.c')
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dspapi.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c index 981551c..86ca785 100644 --- a/drivers/staging/tidspbridge/pmgr/dspapi.c +++ b/drivers/staging/tidspbridge/pmgr/dspapi.c @@ -993,10 +993,27 @@ u32 procwrap_register_notify(union trapped_args *args, void *pr_ctxt) /* * ======== procwrap_reserve_memory ======== */ -u32 __deprecated procwrap_reserve_memory(union trapped_args *args, - void *pr_ctxt) +u32 procwrap_reserve_memory(union trapped_args *args, void *pr_ctxt) { - return 0; + int status; + void *prsv_addr; + void *hprocessor = ((struct process_context *)pr_ctxt)->hprocessor; + + if ((args->args_proc_rsvmem.ul_size <= 0) || + (args->args_proc_rsvmem.ul_size & (PG_SIZE4K - 1)) != 0) + return -EINVAL; + + status = proc_reserve_memory(hprocessor, + args->args_proc_rsvmem.ul_size, &prsv_addr, + pr_ctxt); + if (!status) { + if (put_user(prsv_addr, args->args_proc_rsvmem.pp_rsv_addr)) { + status = -EINVAL; + proc_un_reserve_memory(args->args_proc_rsvmem. + hprocessor, prsv_addr, pr_ctxt); + } + } + return status; } /* @@ -1025,10 +1042,15 @@ u32 procwrap_un_map(union trapped_args *args, void *pr_ctxt) /* * ======== procwrap_un_reserve_memory ======== */ -u32 __deprecated procwrap_un_reserve_memory(union trapped_args *args, - void *pr_ctxt) +u32 procwrap_un_reserve_memory(union trapped_args *args, void *pr_ctxt) { - return 0; + int status; + void *hprocessor = ((struct process_context *)pr_ctxt)->hprocessor; + + status = proc_un_reserve_memory(hprocessor, + args->args_proc_unrsvmem.prsv_addr, + pr_ctxt); + return status; } /* |