s390 (4/16): s390 console changes.
Subsystems (2)
PATCH 1/1 s390 (4/16): s390 console changes.
s390 console fixes for 3215 and sclp.
diffstat:
char/tty_io.c | 2 s390/char/con3215.c | 13 ++-- s390/char/sclp.c | 151 +++++++++++++++++++++++++++++++-------------------- s390/char/sclp.h | 1 s390/char/sclp_con.c | 15 ++--- s390/char/sclp_cpi.c | 2 s390/char/sclp_rw.c | 46 ++------------- s390/char/sclp_tty.c | 59 ++++++++++++------- 8 files changed, 153 insertions(+), 136 deletions(-)
drivers/char/tty_io.c +1 -1
@@ -151,7 +151,7 @@extern int vme_scc_init (void );extern int serial167_init (void );extern int rs_8xx_init (void ); -extern void hwc_tty_init (void ); +extern void sclp_tty_init (void );extern void tty3215_init (void );extern void tub3270_init (void );extern void rs_360_init (void );
drivers/s390/char/con3215.c +7 -6
@@ -872,7 +872,7 @@* The console structure for the 3215 console */ static struct console con3215 = { - .name ="tty3215" , + .name ="ttyS" , .write = con3215_write, .device = con3215_device, .unblank = con3215_unblank,
@@ -884,7 +884,7 @@* 3215 console initialization code called from console_init(). * NOTE: This is called before kmalloc is available. */ -static void __init +static int __init con3215_init (void ) {struct ccw_device *cdev;
@@ -894,7 +894,7 @@/* Check if 3215 is to be the console */ if (!CONSOLE_IS_3215 ) -return ; +return -ENODEV ;/* Set the console mode for VM */ if (MACHINE_IS_VM ) {
@@ -913,7 +913,7 @@ cdev =ccw_device_probe_console ();if (!cdev) -return ; +return -ENODEV ; raw3215[0 ] = raw = (struct raw3215_info *)alloc_bootmem_low (sizeof (struct raw3215_info ));
@@ -938,10 +938,12 @@free_bootmem ((unsigned long ) raw,sizeof (struct raw3215_info )); raw3215[0 ] =NULL ;printk ("Couldn't find a 3215 console device\n" ); - return; + return -ENODEV; }register_console (&con3215); +return 0 ; } +console_initcall (con3215_init);#endif /*
@@ -1122,7 +1124,6 @@spin_unlock_irqrestore (raw->lock, flags); } } -console_initcall (con3215_init);/* * Disable writing to a 3215 tty
drivers/s390/char/sclp.c +92 -59
235 lines not on this page · raw message
drivers/s390/char/sclp.h +1 -0
@@ -126,6 +126,7 @@int sclp_register (struct sclp_register *reg);void sclp_unregister (struct sclp_register *reg);char *sclp_error_message (u16 response_code); +int sclp_remove_processed (struct sccb_header *sccb);/* useful inlines */
drivers/s390/char/sclp_con.c +8 -7
@@ -9,7 +9,6 @@*/ #include <linux/config.h> -#include <linux/version.h> #include <linux/kmod.h> #include <linux/console.h> #include <linux/init.h>
@@ -24,7 +23,7 @@#define sclp_console_major 4/* TTYAUX_MAJOR */ #define sclp_console_minor 64 -#define sclp_console_name "console" +#define sclp_console_name "ttyS"/* Lock to guard over changes to global variables */ static spinlock_t sclp_con_lock;
@@ -193,28 +192,29 @@ .write = sclp_console_write, .device = sclp_console_device, .unblank = sclp_console_unblank, - .flags = CON_PRINTBUFFER + .flags = CON_PRINTBUFFER, + .index = 0 /* ttyS0 */ };/* * called by console_init() in drivers/char/tty_io.c at boot-time. */ -void __init +static int __init sclp_console_init (void ) {void *page;int i;if (!CONSOLE_IS_SCLP ) -return ; +return 0 ;if (sclp_rw_init () !=0 ) -return ; +return 0 ;/* Allocate pages for output buffering */ INIT_LIST_HEAD (&sclp_con_pages);for (i =0 ; i <MAX_CONSOLE_PAGES ; i++) { page =alloc_bootmem_low_pages (PAGE_SIZE );if (page ==NULL ) -return ; +return 0 ;list_add_tail ((struct list_head *) page, &sclp_con_pages); }INIT_LIST_HEAD (&sclp_con_outqueue);
@@ -236,6 +236,7 @@/* enable printk-access to this driver */ register_console (&sclp_console); +return 0 ; }console_initcall (sclp_console_init);
drivers/s390/char/sclp_cpi.c +1 -1
@@ -130,7 +130,7 @@ req = (struct sclp_req *)kmalloc (sizeof (struct sclp_req ),GFP_KERNEL );if (req ==NULL )return ERR_PTR (-ENOMEM ); - sccb = (struct cpi_sccb *)__get_free_page (GFP_KERNEL ); + sccb = (struct cpi_sccb *)__get_free_page (GFP_KERNEL |GFP_DMA );if (sccb ==NULL ) {kfree (req);return ERR_PTR (-ENOMEM );
drivers/s390/char/sclp_rw.c +6 -40
77 lines not on this page · raw message
drivers/s390/char/sclp_tty.c +37 -22
135 lines not on this page · raw message