1 Index: lk/drivers/dsp/bridge/rmgr/drv.c
2 ===================================================================
3 --- lk.orig/drivers/dsp/bridge/rmgr/drv.c 2008-08-18 10:38:37.000000000 +0300
4 +++ lk/drivers/dsp/bridge/rmgr/drv.c 2008-08-18 10:38:39.000000000 +0300
9 +#include <resourcecleanup.h>
12 /* ----------------------------------- Defines, Data Structures, Typedefs */
14 static DSP_STATUS RequestBridgeResourcesDSP(u32 dwContext, s32 fRequest);
16 #ifndef RES_CLEANUP_DISABLE
19 /* GPP PROCESS CLEANUP CODE */
20 -static DSP_STATUS PrintProcessInformation(void);
22 +static DSP_STATUS PrintProcessInformation(void);
23 +static DSP_STATUS DRV_ProcFreeNodeRes(HANDLE hPCtxt);
24 +static DSP_STATUS DRV_ProcFreeDMMRes(HANDLE hPCtxt);
25 +static DSP_STATUS DRV_ProcFreeSTRMRes(HANDLE hPCtxt);
26 extern enum NODE_STATE NODE_GetState(HANDLE hNode);
28 /* Get the process context list from driver object */
35 /* Update DMM resource status */
36 DSP_STATUS DRV_UpdateDMMResElement(HANDLE hDMMRes, u32 pMpuAddr, u32 ulSize,
37 u32 pReqAddr, u32 pMapAddr,
41 /* Actual DMM De-Allocation */
42 -DSP_STATUS DRV_ProcFreeDMMRes(HANDLE hPCtxt)
43 +static DSP_STATUS DRV_ProcFreeDMMRes(HANDLE hPCtxt)
45 struct PROCESS_CONTEXT *pCtxt = (struct PROCESS_CONTEXT *)hPCtxt;
46 DSP_STATUS status = DSP_SOK;
50 /* Actual Stream De-Allocation */
51 -DSP_STATUS DRV_ProcFreeSTRMRes(HANDLE hPCtxt)
52 +static DSP_STATUS DRV_ProcFreeSTRMRes(HANDLE hPCtxt)
54 struct PROCESS_CONTEXT *pCtxt = (struct PROCESS_CONTEXT *)hPCtxt;
55 DSP_STATUS status = DSP_SOK;
57 (*STRMRes)->uNumBufs = uNumBufs;
61 /* Displaying the resources allocated by a process */
62 DSP_STATUS DRV_ProcDisplayResInfo(u8 *pBuf1, u32 *pSize)
65 DSP_STATUS status = DSP_SOK;
67 CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
68 - DRV_GetProcCtxtList(&pCtxt, hDrvObject);
69 + DRV_GetProcCtxtList(&pCtxt, (struct DRV_OBJECT *)hDrvObject);
70 GT_0trace(curTrace, GT_ENTER, "*********************"
71 "DRV_ProcDisplayResourceInfo:*\n");
72 while (pCtxt != NULL) {
74 GT_0trace(curTrace, GT_7CLASS,
75 "Failed to reserve bridge resources ");
77 - DBC_Ensure((DSP_SUCCEEDED(status) && pDevNodeString != 0 &&
78 + DBC_Ensure((DSP_SUCCEEDED(status) && pDevNodeString != NULL &&
79 !LST_IsEmpty(pDRVObject->devNodeString)) ||
80 (DSP_FAILED(status) && *pDevNodeString == 0));
82 Index: lk/drivers/dsp/bridge/rmgr/drv_interface.c
83 ===================================================================
84 --- lk.orig/drivers/dsp/bridge/rmgr/drv_interface.c 2008-08-18 10:38:37.000000000 +0300
85 +++ lk/drivers/dsp/bridge/rmgr/drv_interface.c 2008-08-18 10:38:39.000000000 +0300
87 static s32 shm_size = 0x400000; /* 4 MB */
88 static u32 phys_mempool_base = 0x87000000;
89 static u32 phys_mempool_size = 0x600000;
91 #if !defined(CONFIG_ARCH_OMAP2430) && !defined(CONFIG_ARCH_OMAP3430)
92 static int tc_wordswapon = 1; /* Default value is always TRUE */
94 -static int tc_wordswapon = 0; /* Default value is always TRUE */
95 +static int tc_wordswapon = 0; /* Default value is always true */
100 /* This function is called when an application opens handle to the
103 -int bridge_open(struct inode *ip, struct file *filp)
104 +static int bridge_open(struct inode *ip, struct file *filp)
107 #ifndef RES_CLEANUP_DISABLE
109 if (DSP_FAILED(dsp_status))
112 - DRV_GetProcCtxtList(&pCtxtclosed, hDrvObject);
113 + DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject);
114 while (pCtxtclosed != NULL) {
115 tsk = find_task_by_vpid(pCtxtclosed->pid);
118 DRV_RemoveAllResources(pCtxtclosed);
119 if (pCtxtclosed->hProcessor != NULL) {
120 DRV_GetProcCtxtList(&pCtxttraverse,
122 + (struct DRV_OBJECT *)hDrvObject);
123 if (pCtxttraverse->next == NULL) {
124 PROC_Detach(pCtxtclosed->hProcessor);
129 pTmp = pCtxtclosed->next;
130 - DRV_RemoveProcContext(hDrvObject, pCtxtclosed,
131 + DRV_RemoveProcContext((struct DRV_OBJECT *)hDrvObject, pCtxtclosed,
132 (void *)pCtxtclosed->pid);
134 pTmp = pCtxtclosed->next;
137 dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
138 if (DSP_SUCCEEDED(dsp_status))
139 - dsp_status = DRV_InsertProcContext(hDrvObject, &pPctxt);
140 + dsp_status = DRV_InsertProcContext((struct DRV_OBJECT *)hDrvObject, &pPctxt);
142 if (pPctxt != NULL) {
143 PRCS_GetCurrentHandle(&hProcess);
146 /* This function is called when an application closes handle to the bridge
148 -int bridge_release(struct inode *ip, struct file *filp)
149 +static int bridge_release(struct inode *ip, struct file *filp)
153 @@ -657,14 +658,14 @@
156 /* This function provides IO interface to the bridge driver. */
157 -int bridge_ioctl(struct inode *ip, struct file *filp, unsigned int code,
158 +static int bridge_ioctl(struct inode *ip, struct file *filp, unsigned int code,
162 u32 retval = DSP_SOK;
163 union Trapped_Args pBufIn;
165 - DBC_Require(filp != 0);
166 + DBC_Require(filp != NULL);
167 #ifndef CONFIG_DISABLE_BRIDGE_PM
168 status = omap34xxbridge_suspend_lockout(&bridge_suspend_data, filp);
173 /* This function maps kernel space memory to user space memory. */
174 -int bridge_mmap(struct file *filp, struct vm_area_struct *vma)
175 +static int bridge_mmap(struct file *filp, struct vm_area_struct *vma)
178 u32 offset = vma->vm_pgoff << PAGE_SHIFT;
179 Index: lk/drivers/dsp/bridge/rmgr/dspdrv.c
180 ===================================================================
181 --- lk.orig/drivers/dsp/bridge/rmgr/dspdrv.c 2008-08-18 10:38:37.000000000 +0300
182 +++ lk/drivers/dsp/bridge/rmgr/dspdrv.c 2008-08-18 10:38:39.000000000 +0300
185 /* Remove the Driver Object */
186 (void)DRV_Destroy(drvObject);
190 GT_0trace(curTrace, GT_7CLASS,
191 "DSP_Init:Logical device Failed to Load\n");
192 Index: lk/drivers/dsp/bridge/rmgr/nldr.c
193 ===================================================================
194 --- lk.orig/drivers/dsp/bridge/rmgr/nldr.c 2008-08-18 10:38:37.000000000 +0300
195 +++ lk/drivers/dsp/bridge/rmgr/nldr.c 2008-08-18 10:38:39.000000000 +0300
200 - NLDR_debugMask.flags = 0;
201 + NLDR_debugMask.flags = NULL;
204 DBC_Ensure(cRefs >= 0);
205 @@ -1403,8 +1403,8 @@
207 depLibUUIDs = MEM_Calloc(sizeof(struct DSP_UUID) *
209 - persistentDepLibs = MEM_Calloc(sizeof(bool) *
211 + persistentDepLibs =
212 + MEM_Calloc(sizeof(bool) * nLibs, MEM_PAGED);
213 if (!depLibUUIDs || !persistentDepLibs)
214 status = DSP_EMEMORY;
216 Index: lk/drivers/dsp/bridge/rmgr/node.c
217 ===================================================================
218 --- lk.orig/drivers/dsp/bridge/rmgr/node.c 2008-08-18 10:38:37.000000000 +0300
219 +++ lk/drivers/dsp/bridge/rmgr/node.c 2008-08-18 10:38:39.000000000 +0300
223 /* Default buffer attributes */
224 -struct DSP_BUFFERATTR NODE_DFLTBUFATTRS = {
225 +static struct DSP_BUFFERATTR NODE_DFLTBUFATTRS = {
229 @@ -776,10 +776,10 @@
230 res_status = CFG_GetObject((u32 *)&hDrvObject,
232 if (DSP_SUCCEEDED(res_status)) {
233 - DRV_GetProcContext(hProcess, hDrvObject, &pPctxt,
234 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pPctxt,
236 if (pPctxt == NULL) {
237 - DRV_InsertProcContext(hDrvObject, &pPctxt);
238 + DRV_InsertProcContext((struct DRV_OBJECT *)hDrvObject, &pPctxt);
239 if (pPctxt != NULL) {
240 DRV_ProcUpdatestate(pPctxt,
243 res_status = CFG_GetObject((u32 *)&hDrvObject,
245 if (DSP_SUCCEEDED(res_status)) {
246 - DRV_GetProcContext(hProcess, hDrvObject, &pPctxt,
247 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pPctxt,
249 if (pPctxt != NULL) {
250 DRV_InsertNodeResElement(*phNode, &nodeRes,
251 @@ -1775,7 +1775,7 @@
252 if (DSP_FAILED(res_status))
255 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, hNode, 0);
256 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, hNode, 0);
260 Index: lk/drivers/dsp/bridge/rmgr/proc.c
261 ===================================================================
262 --- lk.orig/drivers/dsp/bridge/rmgr/proc.c 2008-08-18 10:38:37.000000000 +0300
263 +++ lk/drivers/dsp/bridge/rmgr/proc.c 2008-08-18 10:38:39.000000000 +0300
265 if (DSP_FAILED(res_status))
268 - DRV_GetProcContext(hProcess, hDRVObject, &pPctxt, NULL, 0);
269 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDRVObject, &pPctxt, NULL, 0);
270 if (pPctxt == NULL) {
271 - DRV_InsertProcContext(hDRVObject, &pPctxt);
272 + DRV_InsertProcContext((struct DRV_OBJECT *)hDRVObject, &pPctxt);
273 if (pPctxt != NULL) {
274 DRV_ProcUpdatestate(pPctxt, PROC_RES_ALLOCATED);
275 DRV_ProcSetPID(pPctxt, (s32)hProcess);
277 PRCS_GetCurrentHandle(&hProcess);
278 res_status = CFG_GetObject((u32 *)&hDRVObject, REG_DRV_OBJECT);
279 if (DSP_SUCCEEDED(res_status)) {
280 - DRV_GetProcContext(hProcess, hDRVObject, &pPctxt, NULL, 0);
281 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDRVObject, &pPctxt, NULL, 0);
283 pPctxt->hProcessor = (DSP_HPROCESSOR)*phProcessor;
286 res_status = CFG_GetObject((u32 *)&hDRVObject, REG_DRV_OBJECT);
287 /* res_status = CFG_GetObject(REG_DRV_OBJECT, (u32*)&hDRVObject); */
288 if (DSP_SUCCEEDED(res_status)) {
289 - DRV_GetProcContext(hProcess, hDRVObject, &pPctxt, NULL, 0);
290 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDRVObject, &pPctxt, NULL, 0);
292 pPctxt->hProcessor = NULL;
295 *phDevObject = pProcObject->hDevObject;
299 + *phDevObject = NULL;
302 DBC_Ensure((DSP_SUCCEEDED(status) && *phDevObject > 0) ||
303 @@ -1383,11 +1383,11 @@
304 res_status = CFG_GetObject((u32 *)&hDrvObject,
306 if (DSP_SUCCEEDED(res_status)) {
307 - if (DRV_GetProcContext(hProcess, hDrvObject, &pCtxt,
308 - NULL, (u32) pMpuAddr) != DSP_ENOTFOUND) {
309 + if (DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt,
310 + NULL, (u32)pMpuAddr) != DSP_ENOTFOUND) {
311 DRV_InsertDMMResElement(&dmmRes, pCtxt);
312 - DRV_UpdateDMMResElement(dmmRes, (u32) pMpuAddr,
313 - ulSize, (u32) pReqAddr,
314 + DRV_UpdateDMMResElement(dmmRes, (u32)pMpuAddr,
315 + ulSize, (u32)pReqAddr,
316 (u32)*ppMapAddr, hProcessor);
319 @@ -1737,7 +1737,7 @@
320 if (DSP_FAILED(res_status))
323 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, (u32)pMapAddr);
324 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, (u32)pMapAddr);
326 if (DRV_GetDMMResElement((u32)pMapAddr, &dmmRes, pCtxt) !=
328 Index: lk/drivers/dsp/bridge/rmgr/pwr.c
329 ===================================================================
330 --- lk.orig/drivers/dsp/bridge/rmgr/pwr.c 2008-08-18 10:38:37.000000000 +0300
331 +++ lk/drivers/dsp/bridge/rmgr/pwr.c 2008-08-18 10:38:39.000000000 +0300
335 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
337 + hDevObject != NULL;
339 (struct DEV_OBJECT *)DRV_GetNextDevObject
344 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
346 + hDevObject != NULL;
347 hDevObject = (struct DEV_OBJECT *)DRV_GetNextDevObject
349 if (DSP_SUCCEEDED(DEV_GetWMDContext(hDevObject,
353 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
355 + hDevObject != NULL;
356 hDevObject = (struct DEV_OBJECT *)DRV_GetNextDevObject
358 if (DSP_SUCCEEDED(DEV_GetWMDContext(hDevObject,
362 for (hDevObject = (struct DEV_OBJECT *)DRV_GetFirstDevObject();
364 + hDevObject != NULL;
365 hDevObject = (struct DEV_OBJECT *)DRV_GetNextDevObject
367 if (DSP_SUCCEEDED(DEV_GetWMDContext(hDevObject,
368 Index: lk/drivers/dsp/bridge/rmgr/strm.c
369 ===================================================================
370 --- lk.orig/drivers/dsp/bridge/rmgr/strm.c 2008-08-18 10:38:37.000000000 +0300
371 +++ lk/drivers/dsp/bridge/rmgr/strm.c 2008-08-18 10:38:39.000000000 +0300
373 if (DSP_FAILED(res_status))
376 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, 0);
377 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, 0);
379 if (DRV_GetSTRMResElement(hStrm, &hSTRMRes, pCtxt) !=
382 if (DSP_FAILED(res_status))
385 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, 0);
386 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, 0);
388 if (DRV_GetSTRMResElement(hStrm, &hSTRMRes, pCtxt) !=
391 PRCS_GetCurrentHandle(&hProcess);
392 res_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
393 if (DSP_SUCCEEDED(res_status)) {
394 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, NULL, 0);
395 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, NULL, 0);
397 if (DRV_GetSTRMResElement(hStrm, hSTRMRes, pCtxt) !=
400 PRCS_GetCurrentHandle(&hProcess);
401 res_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
402 if (DSP_SUCCEEDED(res_status)) {
403 - DRV_GetProcContext(hProcess, hDrvObject, &pCtxt, hNode, 0);
404 + DRV_GetProcContext((u32)hProcess, (struct DRV_OBJECT *)hDrvObject, &pCtxt, hNode, 0);
406 DRV_ProcInsertSTRMResElement(*phStrm, &hSTRMRes, pCtxt);
408 Index: lk/drivers/dsp/bridge/pmgr/cmm.c
409 ===================================================================
410 --- lk.orig/drivers/dsp/bridge/pmgr/cmm.c 2008-08-18 10:38:37.000000000 +0300
411 +++ lk/drivers/dsp/bridge/pmgr/cmm.c 2008-08-18 10:38:39.000000000 +0300
415 /* Address translator default attrs */
416 -struct CMM_XLATORATTRS CMM_DFLTXLATORATTRS = {
417 +static struct CMM_XLATORATTRS CMM_DFLTXLATORATTRS = {
418 1, /* ulSegId, does not have to match CMM_DFLTALCTATTRS ulSegId */
420 0, /* dwDSPBufSize */
421 Index: lk/drivers/dsp/bridge/pmgr/cod.c
422 ===================================================================
423 --- lk.orig/drivers/dsp/bridge/pmgr/cod.c 2008-08-18 10:38:37.000000000 +0300
424 +++ lk/drivers/dsp/bridge/pmgr/cod.c 2008-08-18 10:38:39.000000000 +0300
425 @@ -209,11 +209,11 @@
426 zlAttrs.baseImage = true;
427 zlAttrs.logWrite = NULL;
428 zlAttrs.logWriteHandle = NULL;
430 - zlAttrs.rmmHandle = 0;
431 - zlAttrs.wHandle = 0;
432 - zlAttrs.symHandle = 0;
433 - zlAttrs.symArg = 0;
434 + zlAttrs.write = NULL;
435 + zlAttrs.rmmHandle = NULL;
436 + zlAttrs.wHandle = NULL;
437 + zlAttrs.symHandle = NULL;
438 + zlAttrs.symArg = NULL;
440 hMgrNew->attrs = zlAttrs;
442 Index: lk/drivers/dsp/bridge/pmgr/dbll.c
443 ===================================================================
444 --- lk.orig/drivers/dsp/bridge/pmgr/dbll.c 2008-08-18 10:38:37.000000000 +0300
445 +++ lk/drivers/dsp/bridge/pmgr/dbll.c 2008-08-18 10:38:39.000000000 +0300
450 - DBLL_debugMask.flags = 0;
451 + DBLL_debugMask.flags = NULL;
455 Index: lk/drivers/dsp/bridge/pmgr/dmm.c
456 ===================================================================
457 --- lk.orig/drivers/dsp/bridge/pmgr/dmm.c 2008-08-18 10:38:37.000000000 +0300
458 +++ lk/drivers/dsp/bridge/pmgr/dmm.c 2008-08-18 10:38:39.000000000 +0300
460 status = DEV_GetDmmMgr(hDevObject, phDmmMgr);
462 GT_2trace(DMM_debugMask, GT_4CLASS, "Leaving DMM_GetHandle status %x, "
463 - "*phDmmMgr %x\n", status, phDmmMgr ? *phDmmMgr : 0);
464 + "*phDmmMgr %x\n", status, phDmmMgr ? *phDmmMgr : NULL);
470 * Returns a region containing the specified memory region
472 -struct MapPage *GetRegion(u32 aAddr)
473 +static struct MapPage *GetRegion(u32 aAddr)
475 struct MapPage *currRegion = NULL;
479 * Returns the requested free region
481 -struct MapPage *GetFreeRegion(u32 aSize)
482 +static struct MapPage *GetFreeRegion(u32 aSize)
484 struct MapPage *currRegion = NULL;
488 * Returns the requestedmapped region
490 -struct MapPage *GetMappedRegion(u32 aAddr)
491 +static struct MapPage *GetMappedRegion(u32 aAddr)
494 struct MapPage *currRegion = NULL;
495 Index: lk/drivers/dsp/bridge/pmgr/io.c
496 ===================================================================
497 --- lk.orig/drivers/dsp/bridge/pmgr/io.c 2008-08-18 10:38:37.000000000 +0300
498 +++ lk/drivers/dsp/bridge/pmgr/io.c 2008-08-18 10:38:39.000000000 +0300
500 /* ----------------------------------- This */
505 /* ----------------------------------- Globals */
507 Index: lk/drivers/dsp/bridge/pmgr/wcd.c
508 ===================================================================
509 --- lk.orig/drivers/dsp/bridge/pmgr/wcd.c 2008-08-18 10:38:37.000000000 +0300
510 +++ lk/drivers/dsp/bridge/pmgr/wcd.c 2008-08-18 10:38:39.000000000 +0300
514 /* ----------------------------------- Globals */
515 -struct GT_Mask WCD_debugMask = { NULL, NULL }; /* Core VxD Mask */
517 +static struct GT_Mask WCD_debugMask = { NULL, NULL }; /* Core VxD Mask */
518 +static u32 WCD_cRefs;
523 * numbers defined in wcdioctl.h This is how an IOCTL number in user mode
524 * turns into a function call in kernel mode.
526 -struct WCD_Cmd WCD_cmdTable[] = {
527 +static struct WCD_Cmd WCD_cmdTable[] = {
529 {MGRWRAP_EnumNode_Info, CMD_MGR_ENUMNODE_INFO_OFFSET},
530 {MGRWRAP_EnumProc_Info, CMD_MGR_ENUMPROC_INFO_OFFSET},
531 Index: lk/arch/arm/plat-omap/include/bridge/resourcecleanup.h
532 ===================================================================
533 --- lk.orig/arch/arm/plat-omap/include/bridge/resourcecleanup.h 2008-08-18 10:38:34.000000000 +0300
534 +++ lk/arch/arm/plat-omap/include/bridge/resourcecleanup.h 2008-08-18 10:38:39.000000000 +0300
539 -extern DSP_STATUS DRV_DisplayProcContext(HANDLE hDrvObject);
540 +extern DSP_STATUS DRV_GetProcCtxtList(struct PROCESS_CONTEXT **pPctxt,
541 + struct DRV_OBJECT *hDrvObject);
543 -extern DSP_STATUS DRV_GetProcCtxtList(HANDLE pPctxt, HANDLE hDrvObject);
545 -extern DSP_STATUS DRV_InsertProcContext(HANDLE hDrvObject, HANDLE pPctxt);
546 +extern DSP_STATUS DRV_InsertProcContext(struct DRV_OBJECT *hDrVObject, HANDLE hPCtxt);
548 extern DSP_STATUS DRV_RemoveAllDMMResElements(HANDLE pCtxt);
552 extern DSP_STATUS DRV_ProcSetPID(HANDLE pCtxt, s32 hProcess);
554 -extern DSP_STATUS DRV_GetProcContext(HANDLE phProcess, HANDLE hDrvObject,
555 - HANDLE pCtxt, DSP_HNODE hNode,
557 +extern DSP_STATUS DRV_GetProcContext(u32 phProcess,
558 + struct DRV_OBJECT *hDrvObject,
559 + HANDLE hPCtxt, DSP_HNODE hNode,
562 extern DSP_STATUS DRV_RemoveAllResources(HANDLE pPctxt);
564 -extern DSP_STATUS DRV_RemoveProcContext(HANDLE hDRVObject, HANDLE hPCtxt,
566 +extern DSP_STATUS DRV_RemoveProcContext(struct DRV_OBJECT *hDRVObject,
567 + HANDLE hPCtxt, HANDLE hProcess);
569 extern DSP_STATUS DRV_GetNodeResElement(HANDLE hNode, HANDLE nodeRes,
572 extern DSP_STATUS DRV_InsertNodeResElement(HANDLE hNode, HANDLE nodeRes,
575 -extern DSP_STATUS DRV_ProcNodeUpdateHeapStatus(HANDLE nodeRes, int status);
577 -extern DSP_STATUS DRV_ProcNodeUpdateStreamStatus(HANDLE nodeRes, int status);
578 +extern void DRV_ProcNodeUpdateHeapStatus(HANDLE hNodeRes, s32 status);
580 extern DSP_STATUS DRV_RemoveNodeResElement(HANDLE nodeRes, HANDLE status);
582 -extern DSP_STATUS DRV_ProcNodeUpdateStatus(HANDLE nodeRes, int status);
583 +extern void DRV_ProcNodeUpdateStatus(HANDLE hNodeRes, s32 status);
585 extern DSP_STATUS DRV_UpdateDMMResElement(HANDLE dmmRes, u32 pMpuAddr,
586 u32 ulSize, u32 pReqAddr,
587 Index: lk/drivers/dsp/bridge/services/mem.c
588 ===================================================================
589 --- lk.orig/drivers/dsp/bridge/services/mem.c 2008-08-18 10:38:37.000000000 +0300
590 +++ lk/drivers/dsp/bridge/services/mem.c 2008-08-18 10:38:39.000000000 +0300
595 -void MEM_ExtPhysPoolRelease(void)
596 +static void MEM_ExtPhysPoolRelease(void)
598 GT_0trace(MEM_debugMask, GT_1CLASS,
599 "Releasing External memory pool \n");
601 * Allocate physically contiguous, uncached memory from external memory pool
604 -void *MEM_ExtPhysMemAlloc(u32 bytes, u32 align, OUT u32 *pPhysAddr)
605 +static void *MEM_ExtPhysMemAlloc(u32 bytes, u32 align, OUT u32 *pPhysAddr)
610 "ExtPhysical Memory Allocation "
611 "unable to allocate memory for bytes = 0x%x \n",
617 offset = (extMemPool.nextPhysAllocPtr & (align - 1));
618 Index: lk/drivers/dsp/bridge/wmd/io_sm.c
619 ===================================================================
620 --- lk.orig/drivers/dsp/bridge/wmd/io_sm.c 2008-08-18 10:38:38.000000000 +0300
621 +++ lk/drivers/dsp/bridge/wmd/io_sm.c 2008-08-18 10:38:39.000000000 +0300
623 mapAttrs |= DSP_MAPELEMSIZE32;
624 /* Map the L4 peripherals */
628 while (L4PeripheralTable[i].physAddr && DSP_SUCCEEDED(status)) {
629 status = hIOMgr->pIntfFxns->pfnBrdMemMap
630 (hIOMgr->hWmdContext,
631 Index: lk/drivers/dsp/bridge/wmd/mmu_fault.c
632 ===================================================================
633 --- lk.orig/drivers/dsp/bridge/wmd/mmu_fault.c 2008-08-18 10:38:38.000000000 +0300
634 +++ lk/drivers/dsp/bridge/wmd/mmu_fault.c 2008-08-18 10:38:39.000000000 +0300
637 #include "mmu_fault.h"
640 +static u32 dmmuEventMask;
643 static bool MMU_CheckIfFault(struct WMD_DEV_CONTEXT *pDevContext);
644 Index: lk/drivers/dsp/bridge/wmd/msg_sm.c
645 ===================================================================
646 --- lk.orig/drivers/dsp/bridge/wmd/msg_sm.c 2008-08-18 10:38:38.000000000 +0300
647 +++ lk/drivers/dsp/bridge/wmd/msg_sm.c 2008-08-18 10:38:39.000000000 +0300
650 /* ----------------------------------- This */
654 /* ----------------------------------- Defines, Data Structures, Typedefs */
655 #define MSGQ_SIGNATURE 0x5147534d /* "QGSM" */
656 Index: lk/drivers/dsp/bridge/wmd/tiomap_io.c
657 ===================================================================
658 --- lk.orig/drivers/dsp/bridge/wmd/tiomap_io.c 2008-08-18 10:38:38.000000000 +0300
659 +++ lk/drivers/dsp/bridge/wmd/tiomap_io.c 2008-08-18 10:38:39.000000000 +0300
662 static u32 ulShm0End;
663 static u32 ulDynExtBase;
667 +static u32 ulTraceSecBeg;
668 +static u32 ulTraceSecEnd;
669 +static u32 ulShmBaseVirt;
671 bool bSymbolsReloaded = true;
674 DSP_STATUS status = DSP_SOK;
675 struct WMD_DEV_CONTEXT *pDevContext = hDevContext;
677 - static u32 ulShmBaseVirt;
678 u32 ulTLBBaseVirt = 0;
679 u32 ulShmOffsetVirt = 0;
680 - static u32 ulTraceSecBeg;
681 - static u32 ulTraceSecEnd;
682 u32 dwExtProgVirtMem;
683 u32 dwBaseAddr = pDevContext->dwDspExtBaseAddr;
684 bool bTraceRead = false;
685 Index: lk/drivers/dsp/bridge/wmd/ue_deh.c
686 ===================================================================
687 --- lk.orig/drivers/dsp/bridge/wmd/ue_deh.c 2008-08-18 10:38:38.000000000 +0300
688 +++ lk/drivers/dsp/bridge/wmd/ue_deh.c 2008-08-18 10:38:39.000000000 +0300
691 #include <_tiomap_mmu.h>
693 -struct HW_MMUMapAttrs_t mapAttrs = { HW_LITTLE_ENDIAN, HW_ELEM_SIZE_16BIT,
694 +static struct HW_MMUMapAttrs_t mapAttrs = { HW_LITTLE_ENDIAN, HW_ELEM_SIZE_16BIT,
696 #define VirtToPhys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
698 Index: lk/drivers/dsp/bridge/dynload/cload.c
699 ===================================================================
700 --- lk.orig/drivers/dsp/bridge/dynload/cload.c 2008-08-18 10:38:35.000000000 +0300
701 +++ lk/drivers/dsp/bridge/dynload/cload.c 2008-08-18 10:38:39.000000000 +0300
703 * returned. Individual errors are reported during the load process
704 * using syms->Error_Report().
705 ***********************************************************************/
706 -extern int Dynamic_Load_Module(struct Dynamic_Loader_Stream *module,
707 +int Dynamic_Load_Module(struct Dynamic_Loader_Stream *module,
708 struct Dynamic_Loader_Sym *syms ,
709 struct Dynamic_Loader_Allocate *alloc,
710 struct Dynamic_Loader_Initialize *init,
712 * returned. Individual errors are reported during the load process
713 * using syms->Error_Report().
714 ***********************************************************************/
717 Dynamic_Open_Module(struct Dynamic_Loader_Stream *module,
718 struct Dynamic_Loader_Sym *syms,
719 struct Dynamic_Loader_Allocate *alloc,
722 /* initialize the handle header */
723 hndl->dm.hnext = hndl->dm.hprev = hndl; /* circular list */
724 - hndl->dm.hroot = 0;
725 + hndl->dm.hroot = NULL;
727 dlthis->myhandle = hndl; /* save away for return */
728 /* pointer to the section list of allocated sections */
731 struct doff_syment_t *input_sym;
732 unsigned syms_in_buf;
734 struct doff_syment_t my_sym_buf[MY_SYM_BUF_SIZ];
735 input_sym = my_sym_buf;
736 syms_in_buf = symbols_left > MY_SYM_BUF_SIZ ?
738 /* This symbol is an absolute symbol */
739 if (sp->secnn == DN_ABS && ((sp->sclass == DN_EXT) ||
740 (sp->sclass == DN_EXTLAB))) {
741 - struct dynload_symbol *symp;
742 symp = dlthis->mysym->Find_Matching_Symbol
743 (dlthis->mysym, sname);
745 @@ -1699,7 +1697,7 @@
746 * Zero for success. On error, the number of errors detected is returned.
747 * Individual errors are reported using syms->Error_Report().
748 ************************************************************************/
749 -extern int Dynamic_Unload_Module(DLOAD_mhandle mhandle,
750 +int Dynamic_Unload_Module(DLOAD_mhandle mhandle,
751 struct Dynamic_Loader_Sym *syms,
752 struct Dynamic_Loader_Allocate *alloc,
753 struct Dynamic_Loader_Initialize *init)
754 Index: lk/drivers/dsp/bridge/dynload/getsection.c
755 ===================================================================
756 --- lk.orig/drivers/dsp/bridge/dynload/getsection.c 2008-08-18 10:38:35.000000000 +0300
757 +++ lk/drivers/dsp/bridge/dynload/getsection.c 2008-08-18 10:38:39.000000000 +0300
760 /* Check that mandatory arguments are present */
761 if (!module || !syms) {
764 dload_syms_error(syms, "Required parameter is NULL");
767 Index: lk/arch/arm/plat-omap/include/bridge/io.h
768 ===================================================================
769 --- lk.orig/arch/arm/plat-omap/include/bridge/io.h 2008-08-18 10:38:34.000000000 +0300
770 +++ lk/arch/arm/plat-omap/include/bridge/io.h 2008-08-18 10:38:39.000000000 +0300
772 * Resources, if any acquired in IO_Init(), are freed when the last
773 * client of IO calls IO_Exit().
775 - extern void IO_Exit();
776 + extern void IO_Exit(void);
779 * ======== IO_Init ========
782 * A requirement for each of the other public CHNL functions.
784 - extern bool IO_Init();
785 + extern bool IO_Init(void);
788 * ======== IO_OnLoaded ========