[PATCH v7 0/7] Add support for DEVNAME:0.0 style hardware based addressing

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

 



Hi all,

With the recent serial core changes, we can now add DEVNAME:0.0 style
addressing for the serial ports. When using DEVNAME:0.0 naming, we don't
need to care which ttyS instance number is allocated depending on HSUART
settings or if the devicetree has added aliases for all the ports.

We also prepare the serial core to handle the ttyS related quirks done
in console_setup() to prepare things for eventually dropping the parsing
from console_setup().

Regards,

Tony

Changes since v6:
- Simplify console_opt_save() and add Co-developed-by for Andy

- Add patch to document new console option as suggested by Sebastian

- Init __free() as noted by Andy and the kernel test robot

- Use strstarts() for the boolean test and drop redundant assignment
  as noted by Andy

Changes since v5:
- Include types.h as noted by Andy

- Update patch description to use serial_base_add_one_prefcon() as noded
  by Andy

Changes since v4:
- Fix passing empty brl_opt to add_preferred_console() instead of NULL

- Fix console_setup() trying to parse a console index out of a DEVNAME:0.0
  option that can be an IO address instead of an index

- Fix issue with default console getting enabled before DEVNAME:0.0
  handling device driver calls add_preferred_console()

- Fix error check for kasprintf(), use serial_base_add_one_prefcon() and
  coding suggestions by Andy

- Fixed compile errors if console is not enabled in .config as noted
  by kernel test robot

Changes since v3:
- Fix handling of brl_options by saving them too in console_opt_save()

- Drop changes to remove console_setup() parsing, further changes to
  register_console() are still needed before can leave out the early
  parsing

- Added a patch for serial8250_isa_init_preferred_console(), otherwise
  the console gets initialized later for x86 when the console_setup()
  parsing is dropped as pointed out by Petr

- Initialize __free() variables to NULL as noted by Dan

- Return handled in console_setup() if saving console options fails

- Simplify serial_base_add_preferred_console() and add a helper for
  serial_base_add_one_prefcon() as suggested by Andy

- Header include changes to kernel/printk/conopt.c as suggested by Andy

Changes since v2:

- Console name got constified and already applied as suggested by Ilpo
  and Andy

- Add printk/conopt.c to save console command line options

- Add a patch to drop old console_setup() character device name parsing

- Use cleanup.h to simplify freeing as suggested by Andy

- Use types.h instead of kernel.h as suggested by Andy

- Use strcspn() as suggested by Andy

- Various coding improvments suggested by Andy

Changes since v1:

- Constify printk add_preferred_console() as suggested by Jiri

- Use proper kernel command line helpers for parsing console as
  suggested by Jiri

- Update description for HSUART based on Andy's comments

- Standardize on DEVNAME:0.0 style naming as suggested by Andy

- Added missing put_device() calls paired with device_find_child()

Tony Lindgren (7):
  printk: Save console options for add_preferred_console_match()
  printk: Don't try to parse DEVNAME:0.0 console options
  printk: Flag register_console() if console is set on command line
  serial: core: Add support for DEVNAME:0.0 style naming for kernel
    console
  serial: core: Handle serial console options
  serial: 8250: Add preferred console in serial8250_isa_init_ports()
  Documentation: kernel-parameters: Add DEVNAME:0.0 format for serial
    ports

 .../admin-guide/kernel-parameters.txt         |  19 +++
 drivers/tty/serial/8250/8250_core.c           |   5 +
 drivers/tty/serial/serial_base.h              |  24 +++
 drivers/tty/serial/serial_base_bus.c          | 136 ++++++++++++++++
 drivers/tty/serial/serial_core.c              |   4 +
 include/linux/printk.h                        |   3 +
 kernel/printk/Makefile                        |   2 +-
 kernel/printk/conopt.c                        | 146 ++++++++++++++++++
 kernel/printk/console_cmdline.h               |   6 +
 kernel/printk/printk.c                        |  23 ++-
 10 files changed, 363 insertions(+), 5 deletions(-)
 create mode 100644 kernel/printk/conopt.c

-- 
2.44.0




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux