Skip to content

Commit 91ff4d3

Browse files
rootroot
authored andcommitted
from map220v
HACK: anything less than 0x1001(4097) causes kernel to hang on boot for unknown reason. ( Original ptr_sz value is 0xCO(192) ) modify to be max(4097, ptr_sz)
1 parent a017601 commit 91ff4d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/firmware/qcom_scm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,8 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t mem_sz,
927927
src_sz = hweight64(srcvm_bits) * sizeof(*src);
928928
mem_to_map_sz = sizeof(*mem_to_map);
929929
dest_sz = dest_cnt * sizeof(*destvm);
930-
ptr_sz = ALIGN(src_sz, SZ_64) + ALIGN(mem_to_map_sz, SZ_64) +
931-
ALIGN(dest_sz, SZ_64);
930+
ptr_sz = max(4097, ALIGN(src_sz, SZ_64) + ALIGN(mem_to_map_sz, SZ_64) +
931+
ALIGN(dest_sz, SZ_64));
932932

933933
ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_phys, GFP_KERNEL);
934934
if (!ptr)

0 commit comments

Comments
 (0)