[RFC] interrupt drive hvc_console as vio device

Ryan Arnold rsa at us.ibm.com
Fri Aug 20 06:50:22 EST 2004


Greetings,

Thanks for the patience with the hvc_console build problems in Ameslab.
Paulus just reverted Ameslab to the equivalent of what is in mainline to
fix some arch/ppc64/hvconsole merge problems when the newest version of
HVCS was pulled into Ameslab.

This patch adds the items listed in the changelog to the mainline
(2.6.8.1) version of hvc_console.  Once accepted there it will be pulled
down into Ameslab to fix Paulus's revert.

http://www-124.ibm.com/linux/patches/?patch_id=1619

Please comment!  For the most part this is very similar code to what was
in hvc_console in Ameslab before the revert.

Changelog:

arch/ppc64/kernel/hvconsole.c
-----------------------------------------

-Changed hvc_get_chars() and hvc_put_chars() api to take vtermno rather
than index number.

-Added hvc_find_vtys() function which walks the bus looking for
vterm/vty devices to callback to the hvc_console driver.  This is for
early console init (pre mem init and pre device probe).

include/asm-ppc64/hvconsole.h
------------------------------------------

-Changed hvc_get_chars() and hvc_put_chars() api to take vtermno rather
than index number.

-Added hvc_find_vtys() function.

-Added hvc_instantiate() function which is implemented by a console
driver wanting to receive a callback of and early console init.

drivers/char/hvc_console.c
-------------------------------------------

-Switch khvcd from kernel_threads to kthreads which got rid of
deprecated daemonize().

-Added module exit clause to be thorough (not terribly necessary with a
console driver of course)

-Added early discovery of vterm/vty adapters by doing a bus walk on
early console init which results in hvc_instantiate() callback and
addition of the vtermno into a static array of vtermnos supported as
console adapters (meaning the console api's work against these vtermnos
prior to full console initialization).

-This driver is now registered as a vio driver which means that vty
adapters are now managed via probe/remove.  This means hvc_console
theoretically supports hotplug vty adapters.

-Removed static hvc_struct array and replaced with a linux list that has
elements (hvc_struct instances) added/removed on probe/remove AFTER
early console init.  This is important because kmalloc can't be done at
early console init.

-Driver now either runs in interrupt driven mode or in polling mode on
older hardware.  The khvcd is smart enough to not 'schedule()' when
there are no interrupts.

-kobjects are now used for ref counting on the hvc_struct instances.

Thanks,

Ryan S. Arnold
IBM Linux Technology Center


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list