gaoxu
b7a34e30d4
dma-remap: use kvmalloc_array/kvfree for larger dma memory remap
[ Upstream commit 51ff97d54f ]
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-23 17:52:21 +02:00
..
2023-08-11 12:08:23 +02:00
2023-07-27 08:50:38 +02:00
2022-09-28 09:02:20 +02:00
2022-09-26 19:46:18 -07:00
2023-08-23 17:52:21 +02:00
2023-03-30 12:49:13 +02:00
2023-08-11 12:08:09 +02:00
2023-01-04 11:28:58 +01:00
2022-12-31 13:33:11 +01:00
2023-05-30 14:03:22 +01:00
2023-07-19 16:21:37 +02:00
2022-10-10 11:36:19 -07:00
2023-08-03 10:24:14 +02:00
2023-02-01 08:34:37 +01:00
2023-07-23 13:49:45 +02:00
2023-03-11 13:55:32 +01:00
2023-07-27 08:50:33 +02:00
2023-07-27 08:50:38 +02:00
2023-07-19 16:20:59 +02:00
2023-08-11 12:08:21 +02:00
2022-12-31 13:32:58 +01:00
2022-02-03 11:20:34 -08:00
2022-08-22 18:50:06 -04:00
2022-04-25 14:37:28 +02:00
2022-09-01 17:39:30 -04:00
2022-08-29 19:47:03 -04:00
2022-09-07 11:30:15 -04:00
2022-01-11 13:08:21 -08:00
2022-10-04 11:05:43 -07:00
2022-09-26 19:46:09 -07:00
2022-03-09 10:32:06 -08:00
2022-09-26 10:13:13 -07:00
2023-04-06 12:10:40 +02:00
2023-03-10 09:33:45 +01:00
2022-07-05 13:32:59 -07:00
2022-12-31 13:31:59 +01:00
2022-08-28 14:02:44 -07:00
2022-03-15 10:32:44 +01:00
2022-09-26 19:46:07 -07:00
2023-03-10 09:33:45 +01:00
2022-07-05 13:32:59 -07:00
2023-03-11 13:55:39 +01:00
2023-08-08 20:03:49 +02:00
2022-09-07 21:53:50 +02:00
2022-09-29 04:40:15 +09:00
2022-07-15 18:21:49 +00:00
2022-09-30 16:50:39 +02:00
2022-04-15 14:49:55 -07:00
2022-06-24 09:48:55 +02:00
2023-07-27 08:50:39 +02:00
2023-07-27 08:50:39 +02:00
2021-08-17 17:50:51 +02:00
2022-03-31 10:36:55 +02:00
2022-10-03 14:03:23 -07:00
2023-07-19 16:21:08 +02:00
2023-06-21 16:00:55 +02:00
2022-09-11 21:55:06 -07:00
2022-09-11 21:55:06 -07:00
2023-05-11 23:03:02 +09:00
2023-03-10 09:34:27 +01:00
2022-09-11 21:55:06 -07:00
2022-10-09 16:01:59 -07:00
2022-09-11 21:55:12 -07:00
2022-12-31 13:33:08 +01:00
2022-05-19 19:30:30 +02:00
2022-09-13 10:38:43 -07:00
2022-12-31 13:32:34 +01:00
2023-03-10 09:34:25 +01:00
2021-12-28 11:26:18 +01:00
2023-03-10 09:32:52 +01:00
2022-06-29 13:07:16 +02:00
2022-09-11 21:55:12 -07:00
2022-09-07 21:53:50 +02:00
2022-10-04 15:59:36 +02:00
2023-05-11 23:03:03 +09:00
2023-03-10 09:34:25 +01:00
2022-11-14 09:58:32 +01:00
2022-04-11 17:07:29 -07:00
2022-03-24 19:06:48 -07:00
2022-05-03 14:11:58 -07:00
2023-08-03 10:24:01 +02:00
2022-10-10 12:49:34 -07:00
2022-09-11 21:55:10 -07:00
2022-07-05 13:32:59 -07:00
2022-05-08 01:33:09 -07:00
2022-02-25 09:36:06 +01:00
2022-04-05 09:59:38 +02:00
2022-04-05 09:59:38 +02:00
2022-05-24 11:11:13 -07:00
2022-08-20 15:17:45 -07:00
2023-04-26 14:28:39 +02:00
2022-09-08 16:56:45 -07:00
2022-12-05 12:09:06 -08:00
2022-09-11 21:55:10 -07:00
2022-08-29 12:47:15 +01:00
2023-03-10 09:34:07 +01:00
2022-09-26 13:01:18 -04:00
2022-04-29 14:38:03 -07:00
2022-05-18 18:24:57 -05:00
2023-02-22 12:59:50 +01:00
2022-10-09 16:24:05 -07:00
2021-09-08 11:50:27 -07:00
2022-05-19 23:25:47 -04:00
2022-10-23 12:01:01 -07:00
2023-07-19 16:22:10 +02:00
2023-07-19 16:21:08 +02:00
2022-08-06 16:38:17 -07:00
2021-08-17 07:49:10 -10:00
2023-07-23 13:49:19 +02:00