gaoxu
04e774fb67
dma-remap: use kvmalloc_array/kvfree for larger dma memory remap
...
[ Upstream commit 51ff97d54f02b4444dfc42e380ac4c058e12d5dd ]
If dma_direct_alloc() alloc memory in size of 64MB, the inner function
dma_common_contiguous_remap() will allocate 128KB memory by invoking
the function kmalloc_array(). and the kmalloc_array seems to fail to try to
allocate 128KB mem.
Call trace:
[14977.928623] qcrosvm: page allocation failure: order:5, mode:0x40cc0
[14977.928638] dump_backtrace.cfi_jt+0x0/0x8
[14977.928647] dump_stack_lvl+0x80/0xb8
[14977.928652] warn_alloc+0x164/0x200
[14977.928657] __alloc_pages_slowpath+0x9f0/0xb4c
[14977.928660] __alloc_pages+0x21c/0x39c
[14977.928662] kmalloc_order+0x48/0x108
[14977.928666] kmalloc_order_trace+0x34/0x154
[14977.928668] __kmalloc+0x548/0x7e4
[14977.928673] dma_direct_alloc+0x11c/0x4f8
[14977.928678] dma_alloc_attrs+0xf4/0x138
[14977.928680] gh_vm_ioctl_set_fw_name+0x3c4/0x610 [gunyah]
[14977.928698] gh_vm_ioctl+0x90/0x14c [gunyah]
[14977.928705] __arm64_sys_ioctl+0x184/0x210
work around by doing kvmalloc_array instead.
Signed-off-by: Gao Xu <gaoxu2@hihonor.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-26 15:26:43 +02:00
..
2023-08-16 18:20:59 +02:00
2023-06-28 10:28:07 +02:00
2022-05-30 09:33:22 +02:00
2023-08-26 15:26:43 +02:00
2023-01-04 11:39:22 +01:00
2023-08-11 11:57:46 +02:00
2023-01-14 10:15:20 +01:00
2023-01-14 10:16:24 +01:00
2023-03-17 08:45:08 +01:00
2023-07-27 08:43:57 +02:00
2022-10-26 13:25:14 +02:00
2022-08-21 15:15:33 +02:00
2023-03-11 16:39:51 +01:00
2022-04-08 14:40:08 +02:00
2023-07-27 08:44:18 +02:00
2023-07-27 08:44:37 +02:00
2023-07-27 08:44:36 +02:00
2023-08-11 11:57:53 +02:00
2021-05-11 14:47:37 +02:00
2023-01-14 10:16:14 +01:00
2022-02-23 12:01:00 +01:00
2022-08-31 17:15:13 +02:00
2021-09-03 10:09:31 +02:00
2020-12-30 11:54:18 +01:00
2022-02-08 18:30:34 +01:00
2022-04-08 14:40:00 +02:00
2020-08-23 17:36:59 -05:00
2022-04-08 14:40:00 +02:00
2020-07-30 11:15:58 -07:00
2020-10-13 09:17:34 -07:00
2023-04-05 11:23:45 +02:00
2021-09-15 09:50:40 +02:00
2023-01-14 10:15:20 +01:00
2021-06-23 14:42:52 +02:00
2021-09-08 08:49:00 +02:00
2023-02-01 08:23:21 +01:00
2023-03-11 16:40:18 +01:00
2023-08-08 19:57:39 +02:00
2021-04-07 15:00:14 +02:00
2020-10-13 09:17:34 -07:00
2020-11-02 12:14:19 -08:00
2021-07-20 16:05:58 +02:00
2020-10-25 14:51:49 -07:00
2021-01-09 13:46:24 +01:00
2020-08-12 10:58:02 -07:00
2023-07-27 08:43:40 +02:00
2023-06-21 15:45:37 +02:00
2023-04-20 12:10:29 +02:00
2023-04-20 12:10:29 +02:00
2023-05-17 11:47:33 +02:00
2020-08-12 10:58:01 -07:00
2023-03-11 16:39:59 +01:00
2023-04-20 12:10:29 +02:00
2021-09-03 10:09:31 +02:00
2023-01-14 10:15:20 +01:00
2021-03-25 09:04:11 +01:00
2021-03-25 09:04:11 +01:00
2023-02-01 08:23:22 +01:00
2020-09-01 09:58:03 +02:00
2023-01-14 10:15:51 +01:00
2023-02-01 08:23:21 +01:00
2020-10-29 17:22:59 -05:00
2023-03-11 16:39:19 +01:00
2021-01-09 13:46:24 +01:00
2022-08-21 15:16:05 +02:00
2022-06-09 10:20:49 +02:00
2020-10-16 11:11:19 -07:00
2020-11-14 11:26:03 -08:00
2020-07-27 14:31:12 -04:00
2023-05-17 11:47:34 +02:00
2023-03-11 16:40:04 +01:00
2022-04-08 14:40:03 +02:00
2022-06-09 10:21:01 +02:00
2020-08-07 11:33:25 -07:00
2021-08-18 08:59:06 +02:00
2023-01-04 11:39:23 +01:00
2022-04-20 09:23:29 +02:00
2021-07-14 16:55:50 +02:00
2020-09-16 15:18:56 +02:00
2022-02-23 12:01:00 +01:00
2020-09-18 14:24:16 +01:00
2021-09-08 08:49:00 +02:00
2020-10-26 12:12:27 +01:00
2022-08-31 17:15:13 +02:00
2023-04-26 11:27:38 +02:00
2023-06-28 10:28:09 +02:00
2023-01-04 11:39:23 +01:00
2020-10-02 19:11:12 -07:00
2021-09-03 10:09:30 +02:00
2022-01-27 10:54:33 +01:00
2021-09-08 08:49:00 +02:00
2020-10-06 10:31:52 -07:00
2021-05-14 09:50:46 +02:00
2021-09-08 08:49:00 +02:00
2021-03-30 14:32:03 +02:00
2023-03-17 08:45:13 +01:00
2023-07-27 08:43:40 +02:00
2022-08-25 11:38:20 +02:00
2023-07-27 08:44:19 +02:00