aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorXuhua Zhang <zhangxuhua@kylinsec.com.cn>2026-09-07 23:08:08 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-10-14 14:38:11 -0400
commitc84f9fc657986a65f64124a986a5d3a177c44f0c (patch)
tree9fcfc44d71141fcbba7e7a9db3543a16e2812500 /scripts/Makefile.thinlto
parentBluetooth: hci_bcsp: Use the shared CRC-CCITT byte helper (diff)
Bluetooth: hci_h5: Avoid clearing the escape bit for ordinary bytes
h5_unslip_one_byte() calls test_and_clear_bit() for every byte other than an initial SLIP escape byte, even when H5_RX_ESC is already clear. This performs an unnecessary atomic read-modify-write on the ordinary-byte receive path. On x86, it emits a locked btr instruction for each such byte. Test H5_RX_ESC first and clear it only when consuming an escaped byte. Handle an initial SLIP escape byte in the alternative branch. The HCI UART receive callbacks are serialized by the TTY layer, and H5_RX_ESC is only changed by receive processing and initialization, so there is no need to atomically test and clear it in one operation. Keep set_bit() and clear_bit() atomic because other bits in h5->flags can be updated by the transmit path concurrently. Escape decoding and invalid-escape recovery remain unchanged. Signed-off-by: Xuhua Zhang <zhangxuhua@kylinsec.com.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions