emmc: modify dtb malloc method [1/1]
authorRuixuan Li <ruixuan.li@amlogic.com>
Tue, 8 Jan 2019 10:33:59 +0000 (18:33 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 16 Jan 2019 03:02:14 +0000 (19:02 -0800)
PD#SWPL-3951

Problem:
buffer malloc for dtb may failed

Solution:
malloc may sleep to wait for enough memory

Verify:
pass on p212

Change-Id: Ib4c266c17140d2a6abf2aea6c02b2ff591f0fe08
Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
drivers/amlogic/mmc/emmc_partitions.c

index a2e406a..b2bf502 100644 (file)
@@ -274,7 +274,7 @@ int amlmmc_dtb_read(struct mmc_card *card,
        memset(buf, 0x0, len);
 
        start_blk = MMC_DTB_PART_OFFSET;
-       buffer = kmalloc(CONFIG_DTB_SIZE, GFP_KERNEL);
+       buffer = kmalloc(CONFIG_DTB_SIZE, GFP_KERNEL|__GFP_RECLAIM);
        if (!buffer)
                return -ENOMEM;