To restart DSP system after DSP crash, reloading bridge module is necessary and a high order page allocation may fail after long use time because of memory fragmentation. To avoid this, mark it as reclaimable for immediate reloading. Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@xxxxxxxxx> --- drivers/dsp/bridge/services/mem.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/dsp/bridge/services/mem.c b/drivers/dsp/bridge/services/mem.c index 0a10304..3661fb1 100644 --- a/drivers/dsp/bridge/services/mem.c +++ b/drivers/dsp/bridge/services/mem.c @@ -357,9 +357,14 @@ void *MEM_AllocPhysMem(u32 cBytes, u32 ulAlign, OUT u32 *pPhysicalAddress) if (extPhysMemPoolEnabled) { pVaMem = MEM_ExtPhysMemAlloc(cBytes, ulAlign, (u32 *)&paMem); - } else - pVaMem = dma_alloc_coherent(NULL, cBytes, &paMem, - (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL); + } else { + gfp_t gfp = (in_atomic()) ? GFP_ATOMIC : GFP_KERNEL; + + /* To ensure allocation at immediate reloading */ + gfp |= __GFP_RECLAIMABLE; + + pVaMem = dma_alloc_coherent(NULL, cBytes, &paMem, gfp); + } if (pVaMem == NULL) { *pPhysicalAddress = 0; GT_1trace(MEM_debugMask, GT_6CLASS, -- 1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html