ubwcp: Switch to using offline_and_remove_memory

remove_memory doesn't work when memory hotplug has been enabled, switch
to using offline_and_remove_memory.

Change-Id: Ia62efc9394326cde5bb0a5dd76ba811f9b1d4b17
Signed-off-by: Liam Mark <quic_lmark@quicinc.com>
This commit is contained in:
Liam Mark
2022-12-01 15:29:30 -08:00
부모 ad3b9b9ada
커밋 bbc9e0b644

파일 보기

@@ -1842,15 +1842,16 @@ static int ubwcp_free_buffer(struct dma_buf *dmabuf)
* care of flush. Just a note for now. Might need to add the
* flush here for debug purpose.
*/
DBG("Calling remove_memory() for ULA PA pool");
ret = remove_memory(ubwcp->ula_pool_base, ubwcp->ula_pool_size);
DBG("Calling offline_and_remove_memory() for ULA PA pool");
ret = offline_and_remove_memory(ubwcp->ula_pool_base,
ubwcp->ula_pool_size);
if (ret) {
ERR("remove_memory failed st:0x%lx sz:0x%lx err: %d",
ERR("offline_and_remove_memory failed st:0x%lx sz:0x%lx err: %d",
ubwcp->ula_pool_base,
ubwcp->ula_pool_size, ret);
goto err_remove_mem;
} else {
DBG("DONE: calling remove_memory() for ULA PA pool");
DBG("DONE: calling offline_and_remove_memory() for ULA PA pool");
}
DBG("Don't Call power OFF ...");
}