diff options
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/con3270.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/fs3270.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/keyboard.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/monreader.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/monwriter.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/sclp_async.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 14 | ||||
-rw-r--r-- | drivers/s390/char/sclp_con.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/sclp_tty.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/sclp_vt220.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/tape_3590.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/tape_class.c | 2 | ||||
-rw-r--r-- | drivers/s390/char/tape_core.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/vmcp.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/vmlogrdr.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/vmur.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/vmwatchdog.c | 1 | ||||
-rw-r--r-- | drivers/s390/char/zcore.c | 32 |
19 files changed, 29 insertions, 37 deletions
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c index 6bca81aea396..bb07577e8fd4 100644 --- a/drivers/s390/char/con3270.c +++ b/drivers/s390/char/con3270.c @@ -12,6 +12,7 @@ #include <linux/interrupt.h> #include <linux/list.h> #include <linux/types.h> +#include <linux/slab.h> #include <linux/err.h> #include <linux/reboot.h> diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c index 31c59b0d6df0..0eabcca3c92d 100644 --- a/drivers/s390/char/fs3270.c +++ b/drivers/s390/char/fs3270.c @@ -12,6 +12,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/list.h> +#include <linux/slab.h> #include <linux/types.h> #include <linux/smp_lock.h> diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index cee4d4e42429..cb6bffe7141a 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c @@ -9,6 +9,7 @@ #include <linux/module.h> #include <linux/sched.h> +#include <linux/slab.h> #include <linux/sysrq.h> #include <linux/consolemap.h> diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c index 33e96484d54f..2ed3f82e5c30 100644 --- a/drivers/s390/char/monreader.c +++ b/drivers/s390/char/monreader.c @@ -21,6 +21,7 @@ #include <linux/interrupt.h> #include <linux/poll.h> #include <linux/device.h> +#include <linux/slab.h> #include <net/iucv/iucv.h> #include <asm/uaccess.h> #include <asm/ebcdic.h> diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c index 668a0579b26b..98a49dfda1de 100644 --- a/drivers/s390/char/monwriter.c +++ b/drivers/s390/char/monwriter.c @@ -20,6 +20,7 @@ #include <linux/poll.h> #include <linux/mutex.h> #include <linux/platform_device.h> +#include <linux/slab.h> #include <asm/uaccess.h> #include <asm/ebcdic.h> #include <asm/io.h> diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c index 740fe405c395..7ad30e72f868 100644 --- a/drivers/s390/char/sclp_async.c +++ b/drivers/s390/char/sclp_async.c @@ -11,6 +11,7 @@ #include <linux/device.h> #include <linux/stat.h> #include <linux/string.h> +#include <linux/slab.h> #include <linux/ctype.h> #include <linux/kmod.h> #include <linux/err.h> @@ -84,6 +85,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, rc = copy_from_user(buf, buffer, sizeof(buf)); if (rc != 0) return -EFAULT; + buf[sizeof(buf) - 1] = '\0'; if (strict_strtoul(buf, 0, &val) != 0) return -EINVAL; if (val != 0 && val != 1) diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index fc7ae05ce48a..4b60ede07f0e 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c @@ -308,6 +308,13 @@ struct assign_storage_sccb { u16 rn; } __packed; +int arch_get_memory_phys_device(unsigned long start_pfn) +{ + if (!rzm) + return 0; + return PFN_PHYS(start_pfn) >> ilog2(rzm); +} + static unsigned long long rn2addr(u16 rn) { return (unsigned long long) (rn - 1) * rzm; @@ -704,13 +711,6 @@ int sclp_chp_deconfigure(struct chp_id chpid) return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); } -int arch_get_memory_phys_device(unsigned long start_pfn) -{ - if (!rzm) - return 0; - return PFN_PHYS(start_pfn) / rzm; -} - struct chp_info_sccb { struct sccb_header header; u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index ad698d30cb3b..ecf45c54f8c4 100644 --- a/drivers/s390/char/sclp_con.c +++ b/drivers/s390/char/sclp_con.c @@ -14,6 +14,7 @@ #include <linux/termios.h> #include <linux/err.h> #include <linux/reboot.h> +#include <linux/gfp.h> #include "sclp.h" #include "sclp_rw.h" diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 434ba04b1309..8258d590505f 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -13,10 +13,10 @@ #include <linux/tty.h> #include <linux/tty_driver.h> #include <linux/tty_flip.h> -#include <linux/slab.h> #include <linux/err.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/gfp.h> #include <asm/uaccess.h> #include "ctrlchar.h" diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 3796ffdb8479..5d706e6c946f 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -23,6 +23,7 @@ #include <linux/interrupt.h> #include <linux/init.h> #include <linux/reboot.h> +#include <linux/slab.h> #include <asm/uaccess.h> #include "sclp.h" diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index cb70fa1cf539..c17f35b6136a 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c @@ -15,6 +15,7 @@ #include <linux/init.h> #include <linux/bio.h> #include <linux/workqueue.h> +#include <linux/slab.h> #define TAPE_DBF_AREA tape_34xx_dbf diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index 9821c5886613..fc993acf99b6 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c @@ -12,6 +12,7 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include <linux/module.h> +#include <linux/slab.h> #include <linux/init.h> #include <linux/bio.h> #include <asm/ebcdic.h> diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index b2864e3edb6d..55343df61edd 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -11,6 +11,8 @@ #define KMSG_COMPONENT "tape" #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt +#include <linux/slab.h> + #include "tape_class.h" MODULE_AUTHOR("Stefan Bader <shbader@de.ibm.com>"); diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 81b094e480e6..29c2d73d719d 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c @@ -20,6 +20,7 @@ #include <linux/spinlock.h> // for locks #include <linux/vmalloc.h> #include <linux/list.h> +#include <linux/slab.h> #include <asm/types.h> // for variable types diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 921dcda77676..5bb59d36a6d4 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -19,6 +19,7 @@ #include <linux/kernel.h> #include <linux/miscdevice.h> #include <linux/module.h> +#include <linux/slab.h> #include <asm/compat.h> #include <asm/cpcmd.h> #include <asm/debug.h> diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 7dfa5412d5a8..e40a1b892866 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -16,6 +16,7 @@ #include <linux/module.h> #include <linux/init.h> +#include <linux/slab.h> #include <linux/errno.h> #include <linux/types.h> #include <linux/interrupt.h> diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index cc56fc708bae..1de672f21037 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c @@ -12,6 +12,7 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include <linux/cdev.h> +#include <linux/slab.h> #include <linux/smp_lock.h> #include <asm/uaccess.h> diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c index c974058e48d2..e13508c98b1a 100644 --- a/drivers/s390/char/vmwatchdog.c +++ b/drivers/s390/char/vmwatchdog.c @@ -17,6 +17,7 @@ #include <linux/miscdevice.h> #include <linux/module.h> #include <linux/moduleparam.h> +#include <linux/slab.h> #include <linux/suspend.h> #include <linux/watchdog.h> diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c index 3438658b66b7..18daf16aa357 100644 --- a/drivers/s390/char/zcore.c +++ b/drivers/s390/char/zcore.c @@ -13,6 +13,7 @@ #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt #include <linux/init.h> +#include <linux/slab.h> #include <linux/miscdevice.h> #include <linux/debugfs.h> #include <asm/asm-offsets.h> @@ -141,33 +142,6 @@ static int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count) return memcpy_hsa(dest, src, count, TO_KERNEL); } -static int memcpy_real(void *dest, unsigned long src, size_t count) -{ - unsigned long flags; - int rc = -EFAULT; - register unsigned long _dest asm("2") = (unsigned long) dest; - register unsigned long _len1 asm("3") = (unsigned long) count; - register unsigned long _src asm("4") = src; - register unsigned long _len2 asm("5") = (unsigned long) count; - - if (count == 0) - return 0; - flags = __raw_local_irq_stnsm(0xf8UL); /* switch to real mode */ - asm volatile ( - "0: mvcle %1,%2,0x0\n" - "1: jo 0b\n" - " lhi %0,0x0\n" - "2:\n" - EX_TABLE(1b,2b) - : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), - "+d" (_len2), "=m" (*((long*)dest)) - : "m" (*((long*)src)) - : "cc", "memory"); - __raw_local_irq_ssm(flags); - - return rc; -} - static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) { static char buf[4096]; @@ -175,7 +149,7 @@ static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) while (offs < count) { size = min(sizeof(buf), count - offs); - if (memcpy_real(buf, src + offs, size)) + if (memcpy_real(buf, (void *) src + offs, size)) return -EFAULT; if (copy_to_user(dest + offs, buf, size)) return -EFAULT; @@ -663,7 +637,7 @@ static int __init zcore_reipl_init(void) if (ipib_info.ipib < ZFCPDUMP_HSA_SIZE) rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); else - rc = memcpy_real(ipl_block, ipib_info.ipib, PAGE_SIZE); + rc = memcpy_real(ipl_block, (void *) ipib_info.ipib, PAGE_SIZE); if (rc) { free_page((unsigned long) ipl_block); return rc; |