Extensible console matching & direct earlycon
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest11 patches 20 repliesIn review
- v213 patches 6 repliesSuperseded
- v113 patches 10 repliesSuperseded
Changes in v3 from the cover letter
* 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.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | console: Add extensible console matchingdrivers/ drivers/ include/ +2 more | +67 | 0 replies | |
| 2/11 | serial: core: Fix kernel doc for uart_console_write()drivers/ | +1 | 0 replies | |
| 3/11 | serial: 8250_early: Remove early_device variabledrivers/ | +2 | 0 replies | |
| 4/11 | serial: earlycon: Move ->uartclk initializedrivers/ | +1 | 0 replies | |
| 5/11 | serial: 8250_early: Assume uart already initialized if no baud optiondrivers/ | +8 | 0 replies | |
| 6/11 | serial: 8250_early: Fix setup() error codedrivers/ | +1 | 0 replies | |
| 7/11 | serial: earlycon: Ignore parse_options() error codedrivers/ | +1 | 0 replies | |
| 8/11 | serial: earlycon: Skip parse_options() if empty stringdrivers/ | +7 | 0 replies | |
| 9/11 | serial: earlycon: Refactor earlycon registrationdrivers/ | +25 | 0 replies | |
| 10/11 | serial: earlycon: Enable earlycon without command line paramdrivers/ drivers/ include/ +1 more | +94 | 0 replies | |
| 11/11 | serial: 8250_early: Remove setup_early_serial8250_console()arch/ drivers/ drivers/ +1 more | +4 | 50 replies |
Reviews trailers per patch
All 11 patches have a Reviewed-by or Acked-by.
| Patch | Rob Herring |
|---|---|
| 1/11 | A-b |
| 2/11 | A-b |
| 3/11 | A-b |
| 4/11 | A-b |
| 5/11 | A-b |
| 6/11 | A-b |
| 7/11 | A-b |
| 8/11 | A-b |
| 9/11 | A-b |
| 10/11 | A-b |
| 11/11 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 -next 00/11] Extensible console matching & direct earlycon
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(-)
Signature · 1 line
2.3.1