linux_dsm_epyc7002/drivers/bluetooth
Maxim Mikityanskiy 268d3636df Bluetooth: btrtl: Use kvmalloc for FW allocations
Currently, kmemdup is applied to the firmware data, and it invokes
kmalloc under the hood. The firmware size and patch_length are big (more
than PAGE_SIZE), and on some low-end systems (like ASUS E202SA) kmalloc
may fail to allocate a contiguous chunk under high memory usage and
fragmentation:

Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000a lmp_ver=06 lmp_subver=8821
Bluetooth: hci0: RTL: rom_version status=0 version=1
Bluetooth: hci0: RTL: loading rtl_bt/rtl8821a_fw.bin
kworker/u9:2: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0
<stack trace follows>

As firmware load happens on each resume, Bluetooth will stop working
after several iterations, when the kernel fails to allocate an order-4
page.

This patch replaces kmemdup with kvmalloc+memcpy. It's not required to
have a contiguous chunk here, because it's not mapped to the device
directly.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2020-01-24 19:57:53 +01:00
..
ath3k.c
bcm203x.c
bfusb.c
bluecard_cs.c
bpa10x.c
bt3c_cs.c
btbcm.c Bluetooth: btbcm : Fix warning about missing blank lines after declarations 2020-01-09 21:24:47 +01:00
btbcm.h Bluetooth: btbcm: Add missing static inline in header 2020-01-04 10:41:03 +01:00
btintel.c
btintel.h
btmrvl_debugfs.c
btmrvl_drv.h
btmrvl_main.c
btmrvl_sdio.c
btmrvl_sdio.h
btmtksdio.c
btmtkuart.c
btqca.c
btqca.h
btqcomsmd.c
btrsi.c
btrtl.c Bluetooth: btrtl: Use kvmalloc for FW allocations 2020-01-24 19:57:53 +01:00
btrtl.h
btsdio.c Bluetooth: btsdio: Check for valid packet type 2020-01-15 22:28:51 +01:00
btusb.c Bluetooth: btusb: Add support for 04ca:3021 QCA_ROME device 2020-01-06 14:36:00 +01:00
dtl1_cs.c
h4_recv.h
hci_ag6xx.c
hci_ath.c
hci_bcm.c Bluetooth: hci_bcm: enable IRQ capability from devicetree 2020-01-15 22:32:31 +01:00
hci_bcsp.c
hci_h4.c Bluetooth: hci_h4: Add support for ISO packets 2020-01-15 22:28:51 +01:00
hci_h5.c Bluetooth: hci_h5: Add support for ISO packets 2020-01-15 22:28:51 +01:00
hci_intel.c
hci_ldisc.c
hci_ll.c
hci_mrvl.c
hci_nokia.c
hci_qca.c Bluetooth: hci_qca: Enable power off/on support during hci down/up for QCA Rome 2020-01-16 06:30:35 +01:00
hci_serdev.c
hci_uart.h Bluetooth: hci_h4: Add support for ISO packets 2020-01-15 22:28:51 +01:00
hci_vhci.c Bluetooth: hci_vhci: Add support for ISO packets 2020-01-15 22:28:51 +01:00
Kconfig
Makefile