kernel-ark/arch/powerpc/platforms
Benjamin Herrenschmidt 4d2bb3f500 powerpc/pseries: Re-implement HVSI as part of hvc_vio
On pseries machines, consoles are provided by the hypervisor using
a low level get_chars/put_chars type interface. However, this is
really just a transport to the service processor which implements
them either as "raw" console (networked consoles, HMC, ...) or as
"hvsi" serial ports.

The later is a simple packet protocol on top of the raw character
interface that is supposed to convey additional "serial port" style
semantics. In practice however, all it does is provide a way to
read the CD line and set/clear our DTR line, that's it.

We currently implement the "raw" protocol as an hvc console backend
(/dev/hvcN) and the "hvsi" protocol using a separate tty driver
(/dev/hvsi0).

However this is quite impractical. The arbitrary difference between
the two type of devices has been a major source of user (and distro)
confusion. Additionally, there's an additional mini -hvsi implementation
in the pseries platform code for our low level debug console and early
boot kernel messages, which means code duplication, though that low
level variant is impractical as it's incapable of doing the initial
protocol negociation to establish the link to the FSP.

This essentially replaces the dedicated hvsi driver and the platform
udbg code completely by extending the existing hvc_vio backend used
in "raw" mode so that:

 - It now supports HVSI as well
 - We add support for hvc backend providing tiocm{get,set}
 - It also provides a udbg interface for early debug and boot console

This is overall less code, though this will only be obvious once we
remove the old "hvsi" driver, which is still available for now. When
the old driver is enabled, the new code still kicks in for the low
level udbg console, replacing the old mini implementation in the platform
code, it just doesn't provide the higher level "hvc" interface.

In addition to producing generally simler code, this has several benefits
over our current situation:

 - The user/distro only has to deal with /dev/hvcN for the hypervisor
console, avoiding all sort of confusion that has plagued us in the past

 - The tty, kernel and low level debug console all use the same code
base which supports the full protocol establishment process, thus the
console is now available much earlier than it used to be with the
old HVSI driver. The kernel console works much earlier and udbg is
available much earlier too. Hackers can enable a hard coded very-early
debug console as well that works with HVSI (previously that was only
supported for the "raw" mode).

I've tried to keep the same semantics as hvsi relative to how I react
to things like CD changes, with some subtle differences though:

 - I clear DTR on close if HUPCL is set

 - Current hvsi triggers a hangup if it detects a up->down transition
   on CD (you can still open a console with CD down). My new implementation
   triggers a hangup if the link to the FSP is severed, and severs it upon
   detecting a up->down transition on CD.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-06-29 17:48:35 +10:00
..
8xx powerpc/irq: Stop exporting irq_map 2011-05-04 15:02:15 +10:00
40x powerpc/4xx: Adding PCIe MSI support 2011-05-26 15:00:37 +10:00
44x powerpc/4xx: Adding PCIe MSI support 2011-05-26 15:00:37 +10:00
52xx powerpc/mpc62xx_pic: Fix get_irq handling of NO_IRQ 2011-05-19 15:31:49 +10:00
82xx powerpc: Remove trival irq_host_ops.unmap 2011-05-19 15:31:39 +10:00
83xx drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
85xx powerpc/85xx: disable timebase synchronization under the hypervisor 2011-06-27 08:36:19 -05:00
86xx powerpc/86xx: improve calculation of DIU pixel clock on the MPC8610 HPCD 2011-06-27 08:36:17 -05:00
512x powerpc/mpc5121_ads_cpld: Remove use of NO_IRQ_IGNORE 2011-05-19 15:31:47 +10:00
amigaone of/address: Clean up function declarations 2010-08-01 01:42:42 -06:00
cell powerpc/cell: Rename ipi functions to match current abstractions 2011-05-26 13:38:58 +10:00
chrp powerpc/smp: smp_ops->kick_cpu() should be able to fail 2011-04-20 17:01:18 +10:00
embedded6xx powerpc: Remove trival irq_host_ops.unmap 2011-05-19 15:31:39 +10:00
iseries powerpc: Avoid extra indirect function call in sending IPIs 2011-06-20 11:21:32 +10:00
maple powerpc/maple: Register CPC925 EDAC device on all boards with CPC925 2011-06-29 17:48:26 +10:00
pasemi Fix common misspellings 2011-03-31 11:26:23 -03:00
powermac powerpc: Avoid extra indirect function call in sending IPIs 2011-06-20 11:21:32 +10:00
prep
ps3 powerpc: Remove trival irq_host_ops.unmap 2011-05-19 15:31:39 +10:00
pseries powerpc/pseries: Re-implement HVSI as part of hvc_vio 2011-06-29 17:48:35 +10:00
wsp powerpc: Avoid extra indirect function call in sending IPIs 2011-06-20 11:21:32 +10:00
fsl_uli1575.c PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs 2010-02-23 09:43:31 -08:00
Kconfig powerpc: introduce the ePAPR embedded hypervisor vmpic driver 2011-06-27 08:30:26 -05:00
Kconfig.cputype powerpc: Add kconfig for muxed smp ipi support 2011-05-19 15:31:05 +10:00
Makefile powerpc: Add WSP platform 2011-05-06 13:32:35 +10:00