linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 -next 00/11]  Extensible console matching & direct earlycon
@ 2015-03-09 20:27 Peter Hurley
  2015-03-09 20:27 ` [PATCH v3 -next 01/11] console: Add extensible console matching Peter Hurley
                   ` (11 more replies)
  0 siblings, 12 replies; 63+ messages in thread
From: Peter Hurley @ 2015-03-09 20:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Andrew Morton, Jiri Slaby, Rob Herring, linux-kernel,
	linux-serial, Peter Hurley

Changes from v2:
* remainder of unapplied series
* Changed the title and commit log for
  "serial: earlycon: Allow earlycon params with name only" to
  "serial: earlycon: Skip parse_options() for empty string" per Rob's
  comment.

Changes from v1:
* rebased on and requires "console: Fix console name size mismatch"


Hi Greg & Andrew,

This patch series implements:
  1. console-definable (aka extensible) matching
  2. generic earlycon-to-console handoff via extensible matching
  3. arch/prom support for direct earlycon


Extensible console matching

Extensible console matching enables the console itself to define the
conditions for a "command line" match. This mimics the design of
device matching in the driver model. Two important use-cases which this
feature enables are generic earlycon-to-console handoff and support
for driver migration.

Earlycon-to-console handoff was implemented in 2007. Console command
lines of the form:
   console=uart,io,0x3f8,115200n8
start an earlycon and later allow the 8250 driver console to takeover.
Unfortunately this implementation requires direct coupling between
the earlycon and the console and is facilitated by ugly hacks like
editing the console command line in-place.

Extensible console matching allows the 8250 driver to directly match
that console command line instead, and enables other serial drivers
to trivially support console handoff themselves.

In addition, extensible console matching allows a new driver to
provide support for a different driver's console. This requirement
stems from needing to minimize breakage when migrating serial drivers.
Since many devices are based on the original 8250/16550 designs
but sometimes have features incompatible with the existing 8250 driver
support, the initial driver is often standalone. When/if the standalone
driver is migrated to the 8250 driver, the problem of console names in
the command line remains. Extensible console matching enables a simple
migration path.


Direct earlycon

This feature enables arches and proms to start an earlycon directly,
rather than requiring an "earlycon=" command line parameter.
Devicetree can already do this via the 'linux,stdout-path' property,
but arch and prom code requires direct coupling to the serial driver.

This support is implemented by judicious refactoring and the same
construct that devicetree and early_param use: a link table containing
the necessary information (name and setup() function) to find and
bind the appropriate earlycon "driver".


NB: I combined these two features in this series because their
implementations heavily overlap in the same source files.

Regards,

Peter Hurley (11):
  console: Add extensible console matching
  serial: core: Fix kernel doc for uart_console_write()
  serial: 8250_early: Remove early_device variable
  serial: earlycon: Move ->uartclk initialize
  serial: 8250_early: Assume uart already initialized if no baud option
  serial: 8250_early: Fix setup() error code
  serial: earlycon: Ignore parse_options() error code
  serial: earlycon: Skip parse_options() if empty string
  serial: earlycon: Refactor earlycon registration
  serial: earlycon: Enable earlycon without command line param
  serial: 8250_early: Remove setup_early_serial8250_console()

 arch/mips/mti-malta/malta-init.c     |   4 +-
 drivers/firmware/pcdp.c              |   4 +-
 drivers/tty/serial/8250/8250_core.c  |  64 ++++++++++++++++------
 drivers/tty/serial/8250/8250_early.c |  51 ++++--------------
 drivers/tty/serial/earlycon.c        | 101 ++++++++++++++++++++++++++++-------
 drivers/tty/serial/serial_core.c     |   2 +-
 include/asm-generic/vmlinux.lds.h    |   9 ++++
 include/linux/console.h              |   3 +-
 include/linux/serial_8250.h          |   3 --
 include/linux/serial_core.h          |  19 ++++---
 kernel/printk/printk.c               |  52 +++++++-----------
 11 files changed, 185 insertions(+), 127 deletions(-)

-- 
2.3.1


^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2015-04-06 14:49 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 20:27 [PATCH v3 -next 00/11] Extensible console matching & direct earlycon Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 01/11] console: Add extensible console matching Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 02/11] serial: core: Fix kernel doc for uart_console_write() Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 03/11] serial: 8250_early: Remove early_device variable Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 04/11] serial: earlycon: Move ->uartclk initialize Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 05/11] serial: 8250_early: Assume uart already initialized if no baud option Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 06/11] serial: 8250_early: Fix setup() error code Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 07/11] serial: earlycon: Ignore parse_options() " Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 08/11] serial: earlycon: Skip parse_options() if empty string Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 09/11] serial: earlycon: Refactor earlycon registration Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 10/11] serial: earlycon: Enable earlycon without command line param Peter Hurley
2015-03-09 20:27 ` [PATCH v3 -next 11/11] serial: 8250_early: Remove setup_early_serial8250_console() Peter Hurley
2015-04-02  2:04   ` Yinghai Lu
2015-04-02  3:22     ` Peter Hurley
2015-04-02  9:15       ` Yinghai Lu
2015-04-02 16:31         ` Peter Hurley
2015-04-02 17:23           ` Yinghai Lu
2015-04-02 22:12             ` Yinghai Lu
2015-04-02 22:36               ` Yinghai Lu
2015-04-03  0:02                 ` Yinghai Lu
2015-04-03  0:22                   ` Yinghai Lu
2015-04-03  2:38                     ` Yinghai Lu
2015-04-03 10:37                       ` Peter Hurley
2015-04-03 16:57                         ` Yinghai Lu
2015-04-03 17:38                           ` Peter Hurley
2015-04-03 17:44                             ` Yinghai Lu
2015-04-03 18:27                               ` Peter Hurley
2015-04-03 19:00                                 ` Greg Kroah-Hartman
2015-04-03 23:03                                   ` [PATCH] earlycon: 8250: Fix command line regression Peter Hurley
2015-04-04  0:04                                     ` [PATCH v2] " Peter Hurley
2015-04-04  2:19                                       ` Yinghai Lu
2015-04-04  2:29                                         ` Peter Hurley
2015-04-04  2:50                                           ` Peter Hurley
2015-04-04  3:00                                             ` Yinghai Lu
2015-04-04  2:56                                           ` Yinghai Lu
2015-04-04  3:09                                             ` Peter Hurley
2015-04-04  3:28                                               ` Yinghai Lu
2015-04-04  3:09                                         ` Yinghai Lu
2015-04-04  3:15                                           ` Peter Hurley
2015-04-04  3:24                                             ` Yinghai Lu
2015-04-04  3:31                                               ` Yinghai Lu
2015-04-04  3:32                                               ` Peter Hurley
2015-04-04  3:37                                                 ` Yinghai Lu
2015-04-04  3:41                                                   ` Peter Hurley
2015-04-04  6:05                                                 ` Yinghai Lu
2015-04-04 14:27                                       ` [PATCH v3] " Peter Hurley
2015-04-04 16:09                                         ` Greg Kroah-Hartman
2015-04-04 16:23                                           ` Peter Hurley
2015-04-04 16:52                                             ` Greg Kroah-Hartman
2015-04-04 17:08                                               ` Peter Hurley
2015-04-04 17:19                                         ` [PATCH v4] " Peter Hurley
2015-04-04 17:24                                           ` Peter Hurley
2015-04-04 17:41                                             ` Greg Kroah-Hartman
2015-04-05  7:09                                           ` Yinghai Lu
2015-04-05 13:06                                             ` Peter Hurley
2015-04-05 20:14                                               ` Yinghai Lu
2015-04-05 14:52                                           ` [PATCH v5] " Peter Hurley
2015-04-05 20:02                                             ` Yinghai Lu
2015-04-06 14:48                                             ` [PATCH v6] " Peter Hurley
2015-04-04  0:52                                 ` [PATCH v3 -next 11/11] serial: 8250_early: Remove setup_early_serial8250_console() Yinghai Lu
2015-04-04  1:16                                   ` Peter Hurley
2015-04-04  0:58                                 ` Yinghai Lu
2015-03-26 17:13 ` [PATCH v3 -next 00/11] Extensible console matching & direct earlycon Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).