From 500837de503650e001e4a1cb3177f4a4c69529cc Mon Sep 17 00:00:00 2001 From: Roy Pledge Date: Wed, 23 Oct 2013 13:31:50 -0400 Subject: Prevent kernel panic if USDPAA mem cannot be allocated USDPAA DMA memory is allocated very early in the boot process using the memblock_alloc functions. The old function would call panic() in cases that the allocation would fail, but no indication would be given on the console since the drivers were not loaded yet. This patch changes the function called so that the panic will not occur and debug info can be seen in the boot log Signed-off-by: Roy Pledge Change-Id: I8ebe9eb826973ea8ef6d16ba6fc73512b779ab77 Reviewed-on: http://git.am.freescale.net:8181/5953 Tested-by: Review Code-CDREVIEW Reviewed-by: Haiying Wang Reviewed-by: Thorpe Geoff-R01361 Reviewed-by: Rivera Jose-B46482 diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa.c b/drivers/staging/fsl_qbman/fsl_usdpaa.c index f493def..e31d709 100644 --- a/drivers/staging/fsl_qbman/fsl_usdpaa.c +++ b/drivers/staging/fsl_qbman/fsl_usdpaa.c @@ -1487,7 +1487,9 @@ __init void fsl_usdpaa_init_early(void) phys_size = 0; return; } - phys_start = memblock_alloc(phys_size, largest_page_size(phys_size)); + phys_start = __memblock_alloc_base(phys_size, + largest_page_size(phys_size), + MEMBLOCK_ALLOC_ACCESSIBLE ); if (!phys_start) { pr_err("Failed to reserve USDPAA region (sz:%llx)\n", phys_size); -- cgit v0.10.2