lkml.org 
[lkml]   [2024]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH printk v2 08/26] printk: nbcon: Implement processing in port->lock wrapper
    Date
    On 2024-03-11, John Ogness <john.ogness@linutronix.de> wrote:
    >>> + if (!uart_is_nbcon(up))
    >>> + return;
    >>> +
    >>> + WARN_ON_ONCE(up->nbcon_locked_port);
    >>> +
    >>> + do {
    >>> + do {
    >>> + memset(&ctxt, 0, sizeof(ctxt));
    >>> + ctxt.console = con;
    >>> + ctxt.prio = NBCON_PRIO_NORMAL;
    >>> + } while (!nbcon_context_try_acquire(&ctxt));
    >>> +
    >>> + } while (!nbcon_context_enter_unsafe(&ctxt));
    >>> +
    >>> + up->nbcon_locked_port = true;
    >>> +}
    >>> +EXPORT_SYMBOL_GPL(uart_nbcon_acquire);
    >>
    >> I would prefer to split the uart and nbcon specific code, for
    >> example:
    >
    > Can you explain why? This code will not be used anywhere else.

    No need to respond to this point. The v3 will be quite different here,
    but will follow your suggestion. I am splitting the uart-specific code
    into serial_core.h and calling a generic nbcon function for the nbcon
    locking.

    John

    \
     
     \ /
      Last update: 2024-05-27 15:49    [W:2.444 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site