[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/8] xen/arm: Add NXP LINFlexD UART Driver


  • To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrei Cherechesu <andrei.cherechesu@xxxxxxxxxxx>
  • Date: Tue, 1 Oct 2024 13:55:23 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AY1cWoeqTg004FL28fLqPm2SsocyiN0Sm9IalwiR7dM=; b=VEthfYFGT7WWbNw1tGClsMl6zhkm/0donYKycq0+XXBk7IfWcKMJNK2UX2BttkD7M9jZlSe7Kh+4x2d/YTyHwmq/YwuBkwvfp4A6BBpso6teOQBvwsJy5ADYyQoFtOw40ga0YoQEof7eyaa3/ul4IiInqLq6OCWroktTEag7avkfvnNhUfektThPMBVhRpb52e8kfQidSoWRHfVVWy44GlG0bLEhg2m/1Q0IY1ouQJhG3cmi9IlUAqeVTRm1ccoh0+F2ekt/af4svoIZ+FAUVZIJZ6NlxkOgncPbPv3yAZS8mpDYoZ6s3O1GxMCP2p8wskd5pdkyAjnoAKi6BiZZCg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AP+Ebn/6o+3wuojRyOQhNt1TctCqxV8hndwCuP+X/KccvukWtESi0JF6Qo8v1dSqT3ZklU+EFFkq/ImINOzAVMz3K1YxAyGB1V9fL1Gqi1x04UV6Xf7Os441vRfZeNXGCcJ24UtwxFM/4mlyRcLWUu2dUeeVK+WDWDJDP5BJ4p7hM5Z0JJQDhNDdNOlyrBhzO5Mw4Q0/lPpdX6f20gJnT+sQBkI8UZtOBsU+YV7SpIhbb+OQFQVWxl62OawcpWBdH5bpzjeNky9UveP21Q6tur9RbDnVDEV/tGQWk5TSOx4wqnbzOlBgoBH7lXcQ8iOR6P3YH00zGYnZLE0KHfHwkw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com;
  • Cc: S32@xxxxxxx, Andrei Cherechesu <andrei.cherechesu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Tue, 01 Oct 2024 10:56:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 01/10/2024 12:20, Julien Grall wrote:
> Hi Andrei,
>
> On 30/09/2024 12:47, Andrei Cherechesu (OSS) wrote:
>> +static void __init linflex_uart_init_preirq(struct serial_port *port)
>> +{
>> +    struct linflex_uart *uart = port->uart;
>> +    uint32_t ibr, fbr, divisr, dividr, ctrl;
>> +
>> +    /* Disable RX/TX before init mode */
>> +    ctrl = linflex_uart_readl(uart, UARTCR);
>> +    ctrl &= ~(UARTCR_RXEN | UARTCR_TXEN);
>> +    linflex_uart_writel(uart, UARTCR, ctrl);
>> +
>> +    /*
>> +     * Smoothen the transition from early_printk by waiting
>> +     * for all pending characters to transmit
>> +     */
>
> Just to note that early_printk() will still be used by secondary CPUs when 
> booting which happens after init_preirq() is called. Will this be a problem 
> for you?
>

No, there's no problem with that. At the end of init_preirq() the
UART can still be used via early_printk(). I know the secondary
cores have a mechanism to print some messages themselves when
being brought up, otherwise their initialization fails. 

But they're being enabled correctly in our case:
(XEN) Bringing up CPU1
- CPU 0000000000000001 booting -
- Current EL 0000000000000008 -
- Initialize CPU -
- Turning on paging -
- Paging turned on -
- Ready -
(XEN) GICv3: CPU1: Found redistributor in region 0 @00000a004003e000
(XEN) CPU1: Guest atomics will try 13 times before pausing the domain
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
- CPU 0000000000000002 booting -
- Current EL 0000000000000008 -
- Initialize CPU -
- Turning on paging -
- Paging turned on -
- Ready -
(XEN) GICv3: CPU2: Found redistributor in region 0 @00000a004005e000
(XEN) CPU2: Guest atomics will try 13 times before pausing the domain
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
...

> I haven't compared the code against the specification. But the logic LGTM 
> from a Xen PoV. So:
>
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
>
> Cheers,
>

Thank you for the review!

Regards,
Andrei Cherechesu




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.