Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: sc16is7xx: declare SPR/TLR/XOFF2 register as volatile

SPR shares the same address space as TLR and XOFF2. If SPR or TLR were to
be used eventually, this could lead to incorrect read value from the cache.

Prevent this potential bug by declaring SPR/TLR/XOFF2 as volatile.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20251027142957.1032073-8-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hugo Villeneuve and committed by
Greg Kroah-Hartman
983f91e5 e0925b4a

+1
+1
drivers/tty/serial/sc16is7xx.c
··· 546 546 case SC16IS7XX_IIR_REG: 547 547 case SC16IS7XX_LSR_REG: 548 548 case SC16IS7XX_MSR_REG: 549 + case SC16IS7XX_SPR_REG: /* Shared address space with TLR & XOFF2 */ 549 550 case SC16IS7XX_TXLVL_REG: 550 551 case SC16IS7XX_RXLVL_REG: 551 552 case SC16IS7XX_IOSTATE_REG: