diff options
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/sclp.c | 14 | ||||
-rw-r--r-- | drivers/s390/char/sclp.h | 2 | ||||
-rw-r--r-- | drivers/s390/char/sclp_early.c | 5 | ||||
-rw-r--r-- | drivers/s390/char/sclp_ftp.c | 3 | ||||
-rw-r--r-- | drivers/s390/char/sclp_sd.c | 11 | ||||
-rw-r--r-- | drivers/s390/char/sclp_vt220.c | 4 |
6 files changed, 27 insertions, 12 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 2cf7fe131ece..f0763e36b861 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -163,7 +163,7 @@ static inline void sclp_trace_req(int prio, char *id, struct sclp_req *req, summary.timeout = (u16)req->queue_timeout; summary.start_count = (u16)req->start_count; - sclp_trace(prio, id, (u32)(addr_t)sccb, summary.b, err); + sclp_trace(prio, id, __pa(sccb), summary.b, err); } static inline void sclp_trace_register(int prio, char *id, u32 a, u64 b, @@ -502,7 +502,7 @@ sclp_add_request(struct sclp_req *req) } /* RQAD: Request was added (a=sccb, b=caller) */ - sclp_trace(2, "RQAD", (u32)(addr_t)req->sccb, _RET_IP_, false); + sclp_trace(2, "RQAD", __pa(req->sccb), _RET_IP_, false); req->status = SCLP_REQ_QUEUED; req->start_count = 0; @@ -617,15 +617,15 @@ __sclp_find_req(u32 sccb) list_for_each(l, &sclp_req_queue) { req = list_entry(l, struct sclp_req, list); - if (sccb == (u32) (addr_t) req->sccb) - return req; + if (sccb == __pa(req->sccb)) + return req; } return NULL; } static bool ok_response(u32 sccb_int, sclp_cmdw_t cmd) { - struct sccb_header *sccb = (struct sccb_header *)(addr_t)sccb_int; + struct sccb_header *sccb = (struct sccb_header *)__va(sccb_int); struct evbuf_header *evbuf; u16 response; @@ -664,7 +664,7 @@ static void sclp_interrupt_handler(struct ext_code ext_code, /* INT: Interrupt received (a=intparm, b=cmd) */ sclp_trace_sccb(0, "INT", param32, active_cmd, active_cmd, - (struct sccb_header *)(addr_t)finished_sccb, + (struct sccb_header *)__va(finished_sccb), !ok_response(finished_sccb, active_cmd)); if (finished_sccb) { @@ -1110,7 +1110,7 @@ static void sclp_check_handler(struct ext_code ext_code, /* Is this the interrupt we are waiting for? */ if (finished_sccb == 0) return; - if (finished_sccb != (u32) (addr_t) sclp_init_sccb) + if (finished_sccb != __pa(sclp_init_sccb)) panic("sclp: unsolicited interrupt for buffer at 0x%x\n", finished_sccb); spin_lock(&sclp_lock); diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h index 5e434108aae6..8a30e77db469 100644 --- a/drivers/s390/char/sclp.h +++ b/drivers/s390/char/sclp.h @@ -333,7 +333,7 @@ static inline int sclp_service_call(sclp_cmdw_t command, void *sccb) "2:\n" EX_TABLE(0b, 2b) EX_TABLE(1b, 2b) - : "+&d" (cc) : "d" (command), "a" ((unsigned long)sccb) + : "+&d" (cc) : "d" (command), "a" (__pa(sccb)) : "cc", "memory"); if (cc == 4) return -EINVAL; diff --git a/drivers/s390/char/sclp_early.c b/drivers/s390/char/sclp_early.c index c0052655fc4f..b64feab62caa 100644 --- a/drivers/s390/char/sclp_early.c +++ b/drivers/s390/char/sclp_early.c @@ -155,6 +155,11 @@ static void __init sclp_early_console_detect(struct init_sccb *sccb) sclp.has_linemode = 1; } +void __init sclp_early_adjust_va(void) +{ + sclp_early_sccb = __va((unsigned long)sclp_early_sccb); +} + void __init sclp_early_detect(void) { void *sccb = sclp_early_sccb; diff --git a/drivers/s390/char/sclp_ftp.c b/drivers/s390/char/sclp_ftp.c index 1e9de99dcd02..ec5a0e2b9255 100644 --- a/drivers/s390/char/sclp_ftp.c +++ b/drivers/s390/char/sclp_ftp.c @@ -31,6 +31,8 @@ static u64 sclp_ftp_length; /** * sclp_ftp_txcb() - Diagnostic Test FTP services SCLP command callback + * @req: sclp request + * @data: pointer to struct completion */ static void sclp_ftp_txcb(struct sclp_req *req, void *data) { @@ -45,6 +47,7 @@ static void sclp_ftp_txcb(struct sclp_req *req, void *data) /** * sclp_ftp_rxcb() - Diagnostic Test FTP services receiver event callback + * @evbuf: pointer to Diagnostic Test (ET7) event buffer */ static void sclp_ftp_rxcb(struct evbuf_header *evbuf) { diff --git a/drivers/s390/char/sclp_sd.c b/drivers/s390/char/sclp_sd.c index 1e244f78f192..25c2d760f6e6 100644 --- a/drivers/s390/char/sclp_sd.c +++ b/drivers/s390/char/sclp_sd.c @@ -122,6 +122,7 @@ static void sclp_sd_listener_remove(struct sclp_sd_listener *listener) /** * sclp_sd_listener_init() - Initialize a Store Data response listener + * @listener: Response listener to initialize * @id: Event ID to listen for * * Initialize a listener for asynchronous Store Data responses. This listener @@ -193,7 +194,7 @@ static int sclp_sd_sync(unsigned long page, u8 eq, u8 di, u64 sat, u64 sa, struct sclp_sd_evbuf *evbuf; int rc; - sclp_sd_listener_init(&listener, (u32) (addr_t) sccb); + sclp_sd_listener_init(&listener, __pa(sccb)); sclp_sd_listener_add(&listener); /* Prepare SCCB */ @@ -403,6 +404,7 @@ static int sclp_sd_file_update(struct sclp_sd_file *sd_file) /** * sclp_sd_file_update_async() - Wrapper for asynchronous update call * @data: Object to update + * @cookie: Unused */ static void sclp_sd_file_update_async(void *data, async_cookie_t cookie) { @@ -414,6 +416,9 @@ static void sclp_sd_file_update_async(void *data, async_cookie_t cookie) /** * reload_store() - Store function for "reload" sysfs attribute * @kobj: Kobject of sclp_sd_file object + * @attr: Reload attribute + * @buf: Data written to sysfs attribute + * @count: Count of bytes written * * Initiate a reload of the data associated with an sclp_sd_file object. */ @@ -441,8 +446,10 @@ static struct kobj_type sclp_sd_file_ktype = { }; /** - * data_read() - Read function for "read" sysfs attribute + * data_read() - Read function for "data" sysfs attribute + * @file: Open file pointer * @kobj: Kobject of sclp_sd_file object + * @attr: Data attribute * @buffer: Target buffer * @off: Requested file offset * @size: Requested number of bytes diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 29a6a0099f83..7bc4e4a10937 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -768,6 +768,8 @@ out_driver: } __initcall(sclp_vt220_tty_init); +#ifdef CONFIG_SCLP_VT220_CONSOLE + static void __sclp_vt220_flush_buffer(void) { unsigned long flags; @@ -784,8 +786,6 @@ static void __sclp_vt220_flush_buffer(void) spin_unlock_irqrestore(&sclp_vt220_lock, flags); } -#ifdef CONFIG_SCLP_VT220_CONSOLE - static void sclp_vt220_con_write(struct console *con, const char *buf, unsigned int count) { |