RE: [PATCH] printk: nbcon: check uart port is nbcon or not in nbcon_release

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

 



On 2024-01-17, "Chang, Junxiao" <junxiao.chang@xxxxxxxxx> wrote:
> There are several serial ports in one Intel ADL hardware, they are
> enumerated as ttyS0, ttyS1, ttyS4, and so on. Multiple console options
> might be appended to kernel command line. For example,
> "console=ttyS0,115200n8 console=ttyS4,115200n8
> console=ttyS5,115200n8".
>
> In this case, several uarts "cons" pointers are same.

Typically a UART driver will register the console structure in the
driver's initcall(), which is only called once per driver. This is why
it is usually not possible to have multiple UART consoles.

If a driver _does_ allow registering consoles for multiple devices, then
it must allocate separate console structs for each registration.

Note that register_console() will generate a warning and abort if a
driver attempts to register the same console struct twice:

    WARN(con == newcon, "console '%s%d' already registered\n",
         con->name, con->index)

So I ask again. Please explain how this is possible.

John




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux