|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 1/2] xen/ns16550: preserve XScale UUE bit in IER writes
On 24.11.2026 18:30, Ronaldo Nunez wrote:
> From: Zhang Zheng <zhangzheng@xxxxxxxxxxx>
>
> XScale-like UARTs are enabled by setting UART unit enable (UUE) bit
> in the IER register. Clearing IER to mask interrupts therefore also
> disables the UART, breaking both interrupt-driven and polled operation,
> and prevents Xen from taking control of the UART from the SBI (RISC-V
> IP variants).
>
> Introduce ns_write_ier() to set UART_IER_UUE whenever the port is
> flagged as an XScale device, and route all XScale-related IER writes
> through it. The flag is determined by matching "intel,xscale-uart", and
> that compatible is added to the DT match table so such UARTs are probed.
>
> Signed-off-by: Zhang Zheng <zhangzheng@xxxxxxxxxxx>
> Co-developed-by: Ronaldo Nunez <rnunez@xxxxxxxxxxxx>
> Signed-off-by: Ronaldo Nunez <rnunez@xxxxxxxxxxxx>
What does the Co-developed-by: convey that the S-o-b does not?
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -64,6 +64,7 @@ static struct ns16550 {
> bool intr_works;
> bool force_polling;
> bool dw_usr_bsy;
> + bool xscale;
> #ifdef NS16550_PCI
> /* PCI card parameters. */
> bool pb_bdf_enable; /* if =1, pb-bdf effective, port behind bridge */
The flag is added here outside of any #ifdef. With this, how did you
determine "all XScale-related IER writes" (as the commit message puts it)?
Also not that for hyperlaunch x86 is going to gain DT support, too. So
keying to DT may be wrong as well. I think you want to either alter all
calls, or make the field's presence conditional. Especially in the letter
case ...
> @@ -654,7 +664,7 @@ static void cf_check ns16550_start_tx(struct serial_port
> *port)
>
> /* Unmask transmit holding register empty interrupt if currently masked.
> */
> if ( !(ier & UART_IER_ETHREI) )
> - ns_write_reg(uart, UART_IER, ier | UART_IER_ETHREI);
> + ns_write_ier(uart, ier | UART_IER_ETHREI);
> }
>
> static void cf_check ns16550_stop_tx(struct serial_port *port)
> @@ -664,7 +674,7 @@ static void cf_check ns16550_stop_tx(struct serial_port
> *port)
>
> /* Mask off transmit holding register empty interrupt if currently
> unmasked. */
> if ( ier & UART_IER_ETHREI )
> - ns_write_reg(uart, UART_IER, ier & ~UART_IER_ETHREI);
> + ns_write_ier(uart, ier & ~UART_IER_ETHREI);
> }
>
> #ifdef CONFIG_ARM
... the need for these two changes (which don't clear UUE) would also be
questionable.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |