linux/arch/powerpc/platforms/pseries
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
..
cmm.c powerpc/pseries: Cleanup use of notifier_from_errno() 2011-03-02 16:50:06 +11:00
dlpar.c powerpc/pseries: Introduce pSeries_reconfig_notify() 2011-06-29 17:48:22 +10:00
dtl.c powerpc: Ensure dtl buffers do not cross 4k boundary 2011-05-19 14:30:41 +10:00
eeh_cache.c powerpc/pseries/eeh: Use for_each_pci_dev() 2010-07-09 11:28:25 +10:00
eeh_driver.c powerpc/eeh: Display eeh error location for bus and device 2011-05-06 13:32:31 +10:00
eeh_event.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
eeh_sysfs.c headers: kobject.h redux 2011-01-10 08:51:44 -08:00
eeh.c powerpc/pseries/eeh: Handle functional reset on non-PCIe device 2011-05-04 16:02:38 +10:00
event_sources.c powerpc/pseries: Add WARN_ON() to request_event_sources_irqs() on irq allocation/request failure 2010-07-09 11:28:32 +10:00
firmware.c powerpc: Add VPHN firmware feature 2010-11-29 15:48:22 +11:00
hotplug-cpu.c powerpc/pseries: Improve error code on reconfiguration notifier failure 2011-06-29 17:48:24 +10:00
hotplug-memory.c powerpc/pseries: Improve error code on reconfiguration notifier failure 2011-06-29 17:48:24 +10:00
hvCall_inst.c powerpc: remove cast from void* 2010-11-03 10:23:26 -04:00
hvCall.S powerpc: Remove second definition of STACK_FRAME_OVERHEAD 2010-11-29 15:48:23 +11:00
hvconsole.c
hvcserver.c
io_event_irq.c powerpc/pseries: Add support for IO event interrupts 2011-05-06 13:19:01 +10:00
iommu.c powerpc/pseries/iommu: Cleanup ddw naming 2011-05-19 17:25:28 +10:00
Kconfig powerpc/pseries: Add support for IO event interrupts 2011-05-06 13:19:01 +10:00
kexec.c powerpc/xics: Rewrite XICS driver 2011-04-20 11:02:35 +10:00
lpar.c powerpc/pseries: Re-implement HVSI as part of hvc_vio 2011-06-29 17:48:35 +10:00
Makefile powerpc/pseries: Add support for IO event interrupts 2011-05-06 13:19:01 +10:00
mobility.c powerpc/pseries: Partition migration in the kernel 2010-10-13 16:19:03 +11:00
msi.c powerpc: Convert to new irq_* function names 2011-03-29 14:48:12 +02:00
nvram.c powerpc/nvram: Don't overwrite oops/panic report on normal shutdown 2011-03-30 10:36:23 +11:00
offline_states.h powerpc/smp: soft-replugged CPUs must go back to start_secondary 2011-04-01 15:37:09 +11:00
pci_dlpar.c powerpc/pci: Make both ppc32 and ppc64 use sysdata for pci_controller 2011-02-04 11:46:51 -07:00
pci.c
phyp_dump.c lmb: rename to memblock 2010-07-14 17:14:00 +10:00
plpar_wrappers.h powerpc/xics: Rewrite XICS driver 2011-04-20 11:02:35 +10:00
power.c [POWERPC] Fix warning in pseries/power.c 2008-02-20 13:33:37 +11:00
pseries_energy.c powerpc: Add support for new hcall H_BEST_ENERGY 2010-11-29 15:48:19 +11:00
pseries.h powerpc/pseries: Re-implement HVSI as part of hvc_vio 2011-06-29 17:48:35 +10:00
ras.c powerpc/pseries: Print corrupt r3 in FWNMI code 2011-05-19 14:30:43 +10:00
reconfig.c powerpc/pseries: Improve error code on reconfiguration notifier failure 2011-06-29 17:48:24 +10:00
scanlog.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
setup.c powerpc/pseries: Re-implement HVSI as part of hvc_vio 2011-06-29 17:48:35 +10:00
smp.c powerpc: Avoid extra indirect function call in sending IPIs 2011-06-20 11:21:32 +10:00
suspend.c suspend: constify platform_suspend_ops 2010-11-16 14:14:02 +01:00