On Mon 2017-08-28 19:58:07, Eugeniy Paltsev wrote:> In the current implementation we take the first console that> registers if we didn't select one.> > But if we specify console via "stdout-path" property in device tree> we don't want first console that registers here to be selected.> Otherwise we may choose wrong console - for example if some console> is registered earlier than console is pointed in "stdout-path"> property because console pointed in "stdout-path" property can be add as> preferred quite late - when it's driver is probed.

register_console() is really twisted function. I would like to betterunderstand your problems before we add yet another twist there.

Could you please be more specific about your problems?What was the output of "cat /proc/consoles" before and after the fix?What exactly started and stopped working?

> We retain previous behavior for tty0 console (if "stdout-path" used)> as a special case:> tty0 will be registered even if it was specified neither> in "bootargs" nor in "stdout-path".> We had to retain this behavior because a lot of ARM boards (and some> powerpc) rely on it.

My main concern is the exception for "tty". Yes, it was regiressionreported in the commit c6c7d83b9c9e6a8b3e ("Revert "console: don'tprefer first registered if DT specifies stdout-path""). But is thisthe only possible regression?

All this is about the fallback code that tries to enable allconsoles until a real one with tty binding (newcon->device)is enabled.

v1 version of you patch disabled this fallback code when a consolewas defined by stdout-path in the device tree. This emulatesdefining the console by console= parameter on the command line.

It might make sense until some complains that a console is notlonger automatically enabled while it was before. But wait.Someone already complained about "tty0". We can solve thisby adding an exception for "tty0". And if anyone else complainsabout another console, we might need more exceptions.

We might endup with so many exceptions that the fallback codewill be always used. But then we are back in the squareand have the original behavior before your patch.

This is why I would like to know more info about your problem.We need to decide if it is more important than a regression.Or if it can be fixed another way.