s390 patches
Subsystems (6)
Hi Linus,
please pull from 'for-linus' branch of
git://git390.marist.edu/pub/scm/linux-2.6.git for-linus
to receive the following updates:
Christian Borntraeger (1):
[S390] ptrace: use common code for simple peek/poke operations
Felix Beck (1):
[S390] zcrypt: Do not add/remove devices in s/r callbacks
Heiko Carstens (9):
[S390] Convert sys_clone to function with parameters. [S390] Convert sys_execve to function with parameters. [S390] Get rid of init_module/delete_module compat functions. [S390] hibernation: fix guest page hinting related crash [S390] hibernation: reset system after resume
[S390] Change kernel_page_present coding style. [S390] fix disabled_wait inline assembly clobber list [S390] smp: introduce LC_ORDER and simplify lowcore handling [S390] hibernate: make sure pfn_is_nosave handles lowcore pages
Jan Glauber (2):
[S390] qdio: reduce per device debug messages [S390] qdio: change state of all primed input buffers
Martin Schwidefsky (1):
[S390] Update default configuration.
Michael Holzheu (1):
[S390] hibernate: Do real CPU swap at resume time
Sebastian Ott (6):
[S390] cio: merge init calls
[S390] cio: introduce css_eval_scheduled [S390] cio: introduce css_settle
[S390] cio: dont kfree vmalloced memory [S390] cio: idset use actual number of ssids [S390] cio: introduce consistent subchannel scanning
Stefan Weinhuber (1):
[S390] dasd: tolerate devices that have no feature codes
arch/s390/defconfig | 37 ++++-- arch/s390/include/asm/lowcore.h | 9 ++ arch/s390/include/asm/processor.h | 2 +- arch/s390/kernel/asm-offsets.c | 7 +- arch/s390/kernel/compat_linux.c | 83 ++---------- arch/s390/kernel/compat_linux.h | 4 +- arch/s390/kernel/compat_wrapper.S | 27 +++- arch/s390/kernel/entry.h | 6 +- arch/s390/kernel/process.c | 40 +++---- arch/s390/kernel/ptrace.c | 19 +--- arch/s390/kernel/sclp.S | 5 +- arch/s390/kernel/smp.c | 50 +------- arch/s390/kernel/suspend.c | 24 +--- arch/s390/kernel/swsusp_asm64.S | 102 +++++++++++++-- arch/s390/kernel/syscalls.S | 8 +- arch/s390/mm/page-states.c | 52 +++++++-- arch/s390/mm/pgtable.c | 17 +-- drivers/s390/block/dasd_eckd.c | 13 +- drivers/s390/cio/css.c | 252 +++++++++++++++++++------------------ drivers/s390/cio/css.h | 3 + drivers/s390/cio/device.c | 38 +++---- drivers/s390/cio/device.h | 1 + drivers/s390/cio/idset.c | 22 +++- drivers/s390/cio/idset.h | 2 + drivers/s390/cio/qdio_main.c | 32 ++--- drivers/s390/crypto/ap_bus.c | 40 +++++-- 26 files changed, 478 insertions(+), 417 deletions(-)
arch/s390/defconfig +25 -12
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.30 -# Mon Jun 22 11:08:16 2009 +# Linux kernel version: 2.6.31 +# Tue Sep 22 17:43:13 2009 # CONFIG_SCHED_MC=y CONFIG_MMU=y
@@ -24,6 +24,7 @@ CONFIG_PGSTE=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_S390=y +CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_CONSTRUCTORS=y
@@ -48,11 +49,12 @@ CONFIG_AUDIT=y # # RCU Subsystem # -CONFIG_CLASSIC_RCU=y -# CONFIG_TREE_RCU is not set -# CONFIG_PREEMPT_RCU is not set +CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=64 +# CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set -# CONFIG_PREEMPT_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=17
@@ -103,11 +105,12 @@ CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_AIO=y -CONFIG_HAVE_PERF_COUNTERS=y +CONFIG_HAVE_PERF_EVENTS=y # -# Performance Counters +# Kernel Performance Events And Counters # +# CONFIG_PERF_EVENTS is not set # CONFIG_PERF_COUNTERS is not set CONFIG_VM_EVENT_COUNTERS=y # CONFIG_STRIP_ASM_SYMS is not set
@@ -116,7 +119,6 @@ CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set # CONFIG_PROFILING is not set -# CONFIG_MARKERS is not set CONFIG_HAVE_OPROFILE=y CONFIG_KPROBES=y CONFIG_HAVE_SYSCALL_WRAPPERS=y
@@ -176,6 +178,7 @@ CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_64BIT=y +# CONFIG_KTIME_SCALAR is not set CONFIG_SMP=y CONFIG_NR_CPUS=32 CONFIG_HOTPLUG_CPU=y
@@ -257,7 +260,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9 CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set # CONFIG_CMM is not set -# CONFIG_PAGE_STATES is not set # CONFIG_APPLDATA_BASE is not set CONFIG_HZ_100=y # CONFIG_HZ_250 is not set
@@ -280,6 +282,7 @@ CONFIG_PM_SLEEP_SMP=y CONFIG_PM_SLEEP=y CONFIG_HIBERNATION=y CONFIG_PM_STD_PARTITION="" +# CONFIG_PM_RUNTIME is not set CONFIG_NET=y #
@@ -394,6 +397,7 @@ CONFIG_IP_SCTP=m # CONFIG_SCTP_HMAC_NONE is not set # CONFIG_SCTP_HMAC_SHA1 is not set CONFIG_SCTP_HMAC_MD5=y +# CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set
@@ -487,6 +491,7 @@ CONFIG_CCW=y # Generic Driver Options # CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +# CONFIG_DEVTMPFS is not set CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y
@@ -501,6 +506,7 @@ CONFIG_BLK_DEV=y CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_OSD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -594,8 +600,11 @@ CONFIG_BLK_DEV_DM=y CONFIG_DM_CRYPT=y CONFIG_DM_SNAPSHOT=y CONFIG_DM_MIRROR=y +# CONFIG_DM_LOG_USERSPACE is not set CONFIG_DM_ZERO=y CONFIG_DM_MULTIPATH=m +# CONFIG_DM_MULTIPATH_QL is not set +# CONFIG_DM_MULTIPATH_ST is not set # CONFIG_DM_DELAY is not set # CONFIG_DM_UEVENT is not set CONFIG_NETDEVICES=y
@@ -615,7 +624,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set -# CONFIG_KS8842 is not set CONFIG_NETDEV_1000=y CONFIG_NETDEV_10000=y # CONFIG_TR is not set
@@ -678,6 +686,7 @@ CONFIG_SCLP_CONSOLE=y CONFIG_SCLP_VT220_TTY=y CONFIG_SCLP_VT220_CONSOLE=y CONFIG_SCLP_CPI=m +CONFIG_SCLP_ASYNC=m CONFIG_S390_TAPE=m #
@@ -737,6 +746,7 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set CONFIG_FILE_LOCKING=y CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y
@@ -798,7 +808,6 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # CONFIG_EXOFS_FS is not set -# CONFIG_NILFS2_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y
@@ -885,11 +894,13 @@ CONFIG_DEBUG_MEMORY_INIT=y # CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_KPROBES_SANITY_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y # CONFIG_LKDTM is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set
@@ -979,11 +990,13 @@ CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_HMAC=m # CONFIG_CRYPTO_XCBC is not set +CONFIG_CRYPTO_VMAC=m # # Digest # CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_GHASH=m # CONFIG_CRYPTO_MD4 is not set CONFIG_CRYPTO_MD5=m # CONFIG_CRYPTO_MICHAEL_MIC is not set
arch/s390/include/asm/lowcore.h +9 -0
@@ -86,6 +86,7 @@#define __LC_PGM_OLD_PSW 0x0150#define __LC_MCK_OLD_PSW 0x0160#define __LC_IO_OLD_PSW 0x0170 +#define __LC_RESTART_PSW 0x01a0#define __LC_EXT_NEW_PSW 0x01b0#define __LC_SVC_NEW_PSW 0x01c0#define __LC_PGM_NEW_PSW 0x01d0
@@ -189,6 +190,14 @@ union save_area {#define SAVE_AREA_BASE SAVE_AREA_BASE_S390X#endif +#ifndef __s390x__ +#define LC_ORDER 0 +#else +#define LC_ORDER 1 +#endif + +#define LC_PAGES (1UL << LC_ORDER) +struct _lowcore {#ifndef __s390x__
arch/s390/include/asm/processor.h +1 -1
@@ -295,7 +295,7 @@ static inline void ATTRIB_NORET disabled_wait(unsigned long code) " oi 0x384(1),0x10\n"/* fake protection bit */ " lpswe 0(%1)" : "=m" (ctl_buf) - : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0"); + : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0", "1");#endif /* __s390x__ */ while (1 ); }
arch/s390/kernel/asm-offsets.c +6 -1
@@ -7,6 +7,7 @@#include <linux/sched.h> #include <linux/kbuild.h> #include <asm/vdso.h> +#include <asm/sigp.h> int main (void ) {
@@ -59,6 +60,10 @@ int main(void)DEFINE (CLOCK_REALTIME ,CLOCK_REALTIME );DEFINE (CLOCK_MONOTONIC ,CLOCK_MONOTONIC );DEFINE (CLOCK_REALTIME_RES ,MONOTONIC_RES_NSEC ); - +/* constants for SIGP */ +DEFINE (__SIGP_STOP, sigp_stop); +DEFINE (__SIGP_RESTART, sigp_restart); +DEFINE (__SIGP_SENSE, sigp_sense); +DEFINE (__SIGP_INITIAL_CPU_RESET, sigp_initial_cpu_reset);return 0 ; }
arch/s390/kernel/compat_linux.c +14 -69
103 lines not on this page · raw message
arch/s390/kernel/compat_linux.h +2 -2
@@ -198,7 +198,8 @@ long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, compat_sigset_t __user *oset, size_t sigsetsize);long sys32_rt_sigpending (compat_sigset_t __user *set,size_t sigsetsize);long sys32_rt_sigqueueinfo (int pid,int sig,compat_siginfo_t __user *uinfo); -long sys32_execve (void ); +long sys32_execve (char __user *name,compat_uptr_t __user *argv, +compat_uptr_t __user *envp);long sys32_init_module (void __user *umod,unsigned long len,const char __user *uargs);long sys32_delete_module (const char __user *name_user,unsigned int flags);
@@ -222,7 +223,6 @@ unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg);long sys32_mmap2 (struct mmap_arg_struct_emu31 __user *arg);long sys32_read (unsigned int fd,char __user * buf,size_t count);long sys32_write (unsigned int fd,char __user * buf,size_t count); -long sys32_clone (void );long sys32_fadvise64 (int fd,loff_t offset,size_t len,int advise);long sys32_fadvise64_64 (struct fadvise64_64_args __user *args); long sys32_sigaction(int sig, const struct old_sigaction32 __user *act,
arch/s390/kernel/compat_wrapper.S +21 -6
@@ -568,18 +568,18 @@ compat_sys_sigprocmask_wrapper: llgtr %r4,%r4 # compat_old_sigset_t * jg compat_sys_sigprocmask # branch to system call - .globl sys32_init_module_wrapper -sys32_init_module_wrapper: + .globl sys_init_module_wrapper +sys_init_module_wrapper: llgtr %r2,%r2 # void * llgfr %r3,%r3 # unsigned long llgtr %r4,%r4 # char * - jg sys32_init_module # branch to system call + jg sys_init_module # branch to system call - .globl sys32_delete_module_wrapper -sys32_delete_module_wrapper: + .globl sys_delete_module_wrapper +sys_delete_module_wrapper: llgtr %r2,%r2 # const char * llgfr %r3,%r3 # unsigned int - jg sys32_delete_module # branch to system call + jg sys_delete_module # branch to system call .globl sys32_quotactl_wrapper sys32_quotactl_wrapper:
@@ -1840,3 +1840,18 @@ sys_perf_event_open_wrapper: lgfr %r5,%r5 # int llgfr %r6,%r6 # unsigned long jg sys_perf_event_open # branch to system call + + .globl sys_clone_wrapper +sys_clone_wrapper: + llgfr %r2,%r2 # unsigned long + llgfr %r3,%r3 # unsigned long + llgtr %r4,%r4 # int * + llgtr %r5,%r5 # int * + jg sys_clone # branch to system call + + .globl sys32_execve_wrapper +sys32_execve_wrapper: + llgtr %r2,%r2 # char * + llgtr %r3,%r3 # compat_uptr_t * + llgtr %r4,%r4 # compat_uptr_t * + jg sys32_execve # branch to system call
arch/s390/kernel/entry.h +4 -2
@@ -42,10 +42,12 @@ long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args);long sys_s390_fallocate (int fd,int mode,loff_t offset,u32 len_high,u32 len_low);long sys_fork (void ); -long sys_clone (void ); +long sys_clone (unsigned long newsp,unsigned long clone_flags, +int __user *parent_tidptr,int __user *child_tidptr);long sys_vfork (void );void execve_tail (void ); -long sys_execve (void ); +long sys_execve (char __user *name,char __user *__user *argv, +char __user *__user *envp);long sys_sigsuspend (int history0,int history1,old_sigset_t mask);long sys_sigaction (int sig,const struct old_sigaction __user *act,struct old_sigaction __user *oact);
arch/s390/kernel/process.c +15 -25
@@ -32,6 +32,7 @@#include <linux/elfcore.h> #include <linux/kernel_stat.h> #include <linux/syscalls.h> +#include <linux/compat.h> #include <asm/compat.h> #include <asm/uaccess.h> #include <asm/pgtable.h>
@@ -230,17 +231,11 @@ SYSCALL_DEFINE0(fork)return do_fork (SIGCHLD , regs->gprs[15 ], regs,0 ,NULL ,NULL ); } -SYSCALL_DEFINE0 (clone) +SYSCALL_DEFINE4(clone, unsigned long, newsp, unsigned long, clone_flags, + int __user *, parent_tidptr, int __user *, child_tidptr) {struct pt_regs *regs =task_pt_regs (current); -unsigned long clone_flags; -unsigned long newsp; -int __user *parent_tidptr, *child_tidptr; - clone_flags = regs->gprs[3 ]; - newsp = regs->orig_gpr2; - parent_tidptr = (int __user *) regs->gprs[4 ]; - child_tidptr = (int __user *) regs->gprs[5 ];if (!newsp) newsp = regs->gprs[15 ]; return do_fork(clone_flags, newsp, regs, 0,
@@ -274,30 +269,25 @@ asmlinkage void execve_tail(void)/* * sys_execve() executes a new program. */ -SYSCALL_DEFINE0 (execve) +SYSCALL_DEFINE3(execve, char __user *, name, char __user * __user *, argv, + char __user * __user *, envp) {struct pt_regs *regs =task_pt_regs (current);char *filename; -unsigned long result; -int rc; +long rc; - filename =getname ((char __user *) regs->orig_gpr2); -if (IS_ERR (filename)) { - result =PTR_ERR (filename); + filename =getname (name); + rc =PTR_ERR (filename); +if (IS_ERR (filename)) +return rc; + rc =do_execve (filename, argv, envp, regs); +if (rc) goto out; - } - rc =do_execve (filename, (char __user *__user *) regs->gprs[3 ], - (char __user *__user *) regs->gprs[4 ], regs); -if (rc) { - result = rc; - goto out_putname; - }execve_tail (); - result = regs->gprs[2 ]; -out_putname: -putname (filename); + rc = regs->gprs[2 ]; out: -return result; +putname (filename); +return rc; }/*
arch/s390/kernel/ptrace.c +4 -15
@@ -339,24 +339,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)int copied, ret;switch (request) { -case PTRACE_PEEKTEXT : -case PTRACE_PEEKDATA : -/* Remove high order bit from address (only for 31 bit). */ - addr &=PSW_ADDR_INSN ; -/* read word at location addr. */ -return generic_ptrace_peekdata (child, addr, data); -case PTRACE_PEEKUSR :/* read the word at location addr in the USER area. */ return peek_user (child, addr, data); -case PTRACE_POKETEXT : -case PTRACE_POKEDATA : -/* Remove high order bit from address (only for 31 bit). */ - addr &=PSW_ADDR_INSN ; -/* write the word at location addr. */ -return generic_ptrace_pokedata (child, addr, data); -case PTRACE_POKEUSR :/* write the word at location addr in the USER area */ return poke_user (child, addr, data);
@@ -386,8 +372,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) copied +=sizeof (unsigned long ); }return 0 ; +default : +/* Removing high order bit from addr (only for 31 bit). */ + addr &=PSW_ADDR_INSN ; +return ptrace_request (child, request, addr, data); } -return ptrace_request (child, request, addr, data); }#ifdef CONFIG_COMPAT
arch/s390/kernel/sclp.S +1 -4
@@ -24,8 +24,6 @@ LC_EXT_INT_CODE = 0x86 # addr of ext int code # R3 = external interruption parameter if R2=0 # -.section ".init.text","ax" - _sclp_wait_int: stm %r6,%r15,24(%r15) # save registers basr %r13,0 # get base register
@@ -318,9 +316,8 @@ _sclp_print_early: .long _sclp_work_area .Lascebc: .long _ascebc -.previous -.section ".init.data","a" +.section .data,"aw",@progbits .balign 4096 _sclp_work_area: .fill 4096
arch/s390/kernel/smp.c +4 -46
94 lines not on this page · raw message
arch/s390/kernel/suspend.c +7 -17
@@ -6,36 +6,26 @@* Author(s): Hans-Joachim Picht <[email protected]> */ -#include <linux/suspend.h> -#include <linux/reboot.h> #include <linux/pfn.h> -#include <linux/mm.h> -#include <asm/sections.h> #include <asm/system.h> -#include <asm/ipl.h> /* * References to section boundaries */ extern const void __nosave_begin, __nosave_end; -/* -* check if given pfn is in the 'nosave' or in the read only NSS section -*/ int pfn_is_nosave (unsigned long pfn) { -unsigned long nosave_begin_pfn =__pa (&__nosave_begin) >>PAGE_SHIFT ; -unsigned long nosave_end_pfn =PAGE_ALIGN (__pa (&__nosave_end)) - >>PAGE_SHIFT ; -unsigned long eshared_pfn =PFN_DOWN (__pa (&_eshared)) -1 ; -unsigned long stext_pfn =PFN_DOWN (__pa (&_stext)); +unsigned long nosave_begin_pfn =PFN_DOWN (__pa (&__nosave_begin)); +unsigned long nosave_end_pfn =PFN_DOWN (__pa (&__nosave_end)); +/* Always save lowcore pages (LC protection might be enabled). */ +if (pfn <=LC_PAGES ) +return 0 ;if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn)return 1 ; -if (pfn >= stext_pfn && pfn <= eshared_pfn) { -if (ipl_info.type ==IPL_TYPE_NSS ) -return 1 ; - }else if ((tprot (pfn *PAGE_SIZE ) && pfn >0 )) +/* Skip memory holes and read-only pages (NSS, DCSS, ...). */ +if (tprot (PFN_PHYS (pfn)))return 1 ;return 0 ; }
arch/s390/kernel/swsusp_asm64.S +91 -11
139 lines not on this page · raw message
arch/s390/kernel/syscalls.S +4 -4
@@ -19,7 +19,7 @@ SYSCALL(sys_restart_syscall,sys_restart_syscall,sys_restart_syscall) SYSCALL(sys_creat,sys_creat,sys32_creat_wrapper) SYSCALL(sys_link,sys_link,sys32_link_wrapper) SYSCALL(sys_unlink,sys_unlink,sys32_unlink_wrapper) /* 10 */ -SYSCALL(sys_execve,sys_execve,sys32_execve) +SYSCALL(sys_execve,sys_execve,sys32_execve_wrapper) SYSCALL(sys_chdir,sys_chdir,sys32_chdir_wrapper) SYSCALL(sys_time,sys_ni_syscall,sys32_time_wrapper) /* old time syscall */ SYSCALL(sys_mknod,sys_mknod,sys32_mknod_wrapper)
@@ -128,7 +128,7 @@ SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) -SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */ +SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper) NI_SYSCALL /* modify_ldt for i386 */
@@ -136,8 +136,8 @@ SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) NI_SYSCALL /* old "create module" */ -SYSCALL(sys_init_module,sys_init_module,sys32_init_module_wrapper) -SYSCALL(sys_delete_module,sys_delete_module,sys32_delete_module_wrapper) +SYSCALL(sys_init_module,sys_init_module,sys_init_module_wrapper) +SYSCALL(sys_delete_module,sys_delete_module,sys_delete_module_wrapper) NI_SYSCALL /* 130: old get_kernel_syms */ SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper) SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper)
arch/s390/mm/page-states.c +44 -8
72 lines not on this page · raw message
arch/s390/mm/pgtable.c +7 -10
@@ -314,21 +314,18 @@ int s390_enable_sie(void) }EXPORT_SYMBOL_GPL (s390_enable_sie); -#ifdef CONFIG_DEBUG_PAGEALLOC -#ifdef CONFIG_HIBERNATION +#if defined(CONFIG_DEBUG_PAGEALLOC ) && defined(CONFIG_HIBERNATION )bool kernel_page_present (struct page *page) {unsigned long addr;int cc; addr =page_to_phys (page); - asm("lra %1,0(%1)\n" -"ipm %0\n" -"srl %0,28" - :"=d" (cc),"+a" (addr)::"cc" ); + asmvolatile ( +" lra %1,0(%1)\n" +" ipm %0\n" +" srl %0,28" + :"=d" (cc),"+a" (addr) : :"cc" );return cc ==0 ; } - -#endif /* CONFIG_HIBERNATION */ -#endif /* CONFIG_DEBUG_PAGEALLOC */ - +#endif /* CONFIG_HIBERNATION && CONFIG_DEBUG_PAGEALLOC */
drivers/s390/block/dasd_eckd.c +6 -7
@@ -935,6 +935,7 @@ static int dasd_eckd_read_features(struct dasd_device *device)struct dasd_eckd_private *private; private = (struct dasd_eckd_private *) device->private; +memset (&private->features,0 ,sizeof (struct dasd_rssd_features )); cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, 1 /* PSF */ + 1 /* RSSD */, (sizeof(struct dasd_psf_prssd_data) + sizeof(struct dasd_rssd_features)),
@@ -982,7 +983,9 @@ static int dasd_eckd_read_features(struct dasd_device *device) features = (struct dasd_rssd_features *) (prssdp +1 );memcpy (&private->features, features,sizeof (struct dasd_rssd_features )); - } + }else +dev_warn (&device->cdev->dev,"Reading device feature codes" +" failed with rc=%d\n" , rc);dasd_sfree_request (cqr, cqr->memdev);return rc; }
@@ -1144,9 +1147,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device) }/* Read Feature Codes */ - rc =dasd_eckd_read_features (device); -if (rc) - goto out_err3; +dasd_eckd_read_features (device);/* Read Device Characteristics */ rc = dasd_generic_read_dev_chars(device, DASD_ECKD_MAGIC,
@@ -3241,9 +3242,7 @@ int dasd_eckd_restore_device(struct dasd_device *device) }/* Read Feature Codes */ - rc =dasd_eckd_read_features (device); -if (rc) - goto out_err; +dasd_eckd_read_features (device);/* Read Device Characteristics */ memset (&private->rdc_data,0 ,sizeof (private->rdc_data));
drivers/s390/cio/css.c +128 -124
369 lines not on this page · raw message
drivers/s390/cio/css.h +3 -0
@@ -75,6 +75,7 @@ struct chp_link;* @freeze: callback for freezing during hibernation snapshotting * @thaw: undo work done in @freeze * @restore: callback for restoring after hibernation +* @settle: wait for asynchronous work to finish * @name: name of the device driver */ struct css_driver {
@@ -92,6 +93,7 @@ struct css_driver {int (*freeze)(struct subchannel *);int (*thaw) (struct subchannel *);int (*restore)(struct subchannel *); +void (*settle)(void );const char *name; };
@@ -109,6 +111,7 @@ extern void css_sch_device_unregister(struct subchannel *);extern int css_probe_device (struct subchannel_id );extern struct subchannel *get_subchannel_by_schid (struct subchannel_id );extern int css_init_done; +extern int max_ssid;int for_each_subchannel_staged (int (*fn_known)(struct subchannel *,void *),int (*fn_unknown)(struct subchannel_id ,void *),void *data);
drivers/s390/cio/device.c +15 -23
@@ -131,6 +131,10 @@ static void io_subchannel_shutdown(struct subchannel *);static int io_subchannel_sch_event (struct subchannel *,int );static int io_subchannel_chp_event (struct subchannel *,struct chp_link *,int ); +static void recovery_func (unsigned long data); +struct workqueue_struct *ccw_device_work; +wait_queue_head_t ccw_device_init_wq; +atomic_t ccw_device_init_count;static struct css_device_id io_subchannel_ids[] = { { .match_flags =0x1 , .type =SUBCHANNEL_TYPE_IO , },
@@ -151,6 +155,13 @@ static int io_subchannel_prepare(struct subchannel *sch)return 0 ; } +static void io_subchannel_settle (void ) +{ +wait_event (ccw_device_init_wq, +atomic_read (&ccw_device_init_count) ==0 ); +flush_workqueue (ccw_device_work); +} +static struct css_driver io_subchannel_driver = { .owner =THIS_MODULE , .subchannel_type = io_subchannel_ids,
@@ -162,16 +173,10 @@ static struct css_driver io_subchannel_driver = { .remove = io_subchannel_remove, .shutdown = io_subchannel_shutdown, .prepare = io_subchannel_prepare, + .settle = io_subchannel_settle, }; -struct workqueue_struct *ccw_device_work; -wait_queue_head_t ccw_device_init_wq; -atomic_t ccw_device_init_count; - -static void recovery_func (unsigned long data); - -static int __init -init_ccw_bus_type (void ) +int __init io_subchannel_init (void ) {int ret;
@@ -181,10 +186,10 @@ init_ccw_bus_type (void) ccw_device_work =create_singlethread_workqueue ("cio" );if (!ccw_device_work) -return -ENOMEM ;/* FIXME: better errno ? */ +return -ENOMEM ; slow_path_wq =create_singlethread_workqueue ("kslowcrw" );if (!slow_path_wq) { - ret = -ENOMEM ;/* FIXME: better errno ? */ + ret = -ENOMEM ; goto out_err; }if ((ret =bus_register (&ccw_bus_type)))
@@ -194,9 +199,6 @@ init_ccw_bus_type (void)if (ret) goto out_err; -wait_event (ccw_device_init_wq, -atomic_read (&ccw_device_init_count) ==0 ); -flush_workqueue (ccw_device_work);return 0 ; out_err:if (ccw_device_work)
@@ -206,16 +208,6 @@ out_err:return ret; } -static void __exit -cleanup_ccw_bus_type (void ) -{ -css_driver_unregister (&io_subchannel_driver); -bus_unregister (&ccw_bus_type); -destroy_workqueue (ccw_device_work); -} - -subsys_initcall (init_ccw_bus_type); -module_exit (cleanup_ccw_bus_type);/************************ device handling **************************/
drivers/s390/cio/device.h +1 -0
@@ -74,6 +74,7 @@ dev_fsm_final_state(struct ccw_device *cdev)extern struct workqueue_struct *ccw_device_work;extern wait_queue_head_t ccw_device_init_wq;extern atomic_t ccw_device_init_count; +int __init io_subchannel_init (void );void io_subchannel_recog_done (struct ccw_device *cdev);void io_subchannel_init_config (struct subchannel *sch);
drivers/s390/cio/idset.c +21 -1
@@ -78,7 +78,7 @@ static inline int idset_get_first(struct idset *set, int *ssid, int *id)struct idset *idset_sch_new (void ) { -return idset_new (__MAX_SSID +1 , __MAX_SUBCHANNEL +1 ); +return idset_new (max_ssid +1 , __MAX_SUBCHANNEL +1 ); }void idset_sch_add (struct idset *set,struct subchannel_id schid)
@@ -110,3 +110,23 @@ int idset_sch_get_first(struct idset *set, struct subchannel_id *schid) }return rc; } + +int idset_is_empty (struct idset *set) +{ +int bitnum; + + bitnum =find_first_bit (set->bitmap, set->num_ssid * set->num_id); +if (bitnum >= set->num_ssid * set->num_id) +return 1 ; +return 0 ; +} + +void idset_add_set (struct idset *to,struct idset *from) +{ +unsigned long i, len; + + len =min (__BITOPS_WORDS (to->num_ssid * to->num_id), +__BITOPS_WORDS (from->num_ssid * from->num_id)); +for (i =0 ; i < len ; i++) + to->bitmap[i] |= from->bitmap[i]; +}
drivers/s390/cio/idset.h +2 -0
@@ -21,5 +21,7 @@ void idset_sch_add(struct idset *set, struct subchannel_id id);void idset_sch_del (struct idset *set,struct subchannel_id id);int idset_sch_contains (struct idset *set,struct subchannel_id id);int idset_sch_get_first (struct idset *set,struct subchannel_id *id); +int idset_is_empty (struct idset *set); +void idset_add_set (struct idset *to,struct idset *from);#endif /* S390_IDSET_H */
drivers/s390/cio/qdio_main.c +14 -18
@@ -401,7 +401,7 @@ static void announce_buffer_error(struct qdio_q *q, int count)if ((!q->is_input_q && (q->sbal[q->first_to_check]->element[15 ].flags &0xff ) ==0x10 )) {qdio_perf_stat_inc (&perf_stats.outbound_target_full); -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"OUTFULL FTC:%3d" , +DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"OUTFULL FTC:%02x" , q->first_to_check);return ; }
@@ -418,7 +418,7 @@ static inline void inbound_primed(struct qdio_q *q, int count) {int new; -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"in prim: %3d" , count); +DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"in prim: %02x" , count);/* for QEBSM the ACK was already set by EQBS */ if (is_qebsm (q)) {
@@ -455,6 +455,8 @@ static inline void inbound_primed(struct qdio_q *q, int count) count--;if (!count)return ; +/* need to change ALL buffers to get more interrupts */ +set_buf_states (q, q->first_to_check,SLSB_P_INPUT_NOT_INIT , count); }static int get_inbound_buffer_frontier (struct qdio_q *q)
@@ -545,7 +547,7 @@ static inline int qdio_inbound_q_done(struct qdio_q *q)* has (probably) not moved (see qdio_inbound_processing). */ if (get_usecs () > q->u.in.timestamp +QDIO_INPUT_THRESHOLD ) { -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"in done:%3d" , +DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"in done:%02x" , q->first_to_check);return 1 ; }else
@@ -565,11 +567,10 @@ static void qdio_kick_handler(struct qdio_q *q)if (q->is_input_q) {qdio_perf_stat_inc (&perf_stats.inbound_handler); -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"kih s:%3d c:%3d" , start, count); - }else { -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"koh: nr:%1d" , q->nr); -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"s:%3d c:%3d" , start, count); - } +DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"kih s:%02x c:%02x" , start, count); + }else +DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"koh: s:%02x c:%02x" , + start, count); q->handler (q->irq_ptr->cdev, q->qdio_error, q->nr, start, count, q->irq_ptr->int_parm);
@@ -633,7 +634,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q)switch (state) {case SLSB_P_OUTPUT_EMPTY :/* the adapter got it */ -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"out empty:%1d %3d" , q->nr, count); +DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"out empty:%1d %02x" , q->nr, count);atomic_sub (count, &q->nr_buf_used); q->first_to_check =add_buf (q->first_to_check, count);
@@ -1481,10 +1482,9 @@ static int handle_outbound(struct qdio_q *q, unsigned int callflags,get_buf_state (q,prev_buf (bufnr), &state,0 );if (state !=SLSB_CU_OUTPUT_PRIMED ) rc =qdio_kick_outbound_q (q); -else { -DBF_DEV_EVENT (DBF_INFO , q->irq_ptr,"fast-req" ); +else qdio_perf_stat_inc (&perf_stats.fast_requeue); - } + out:tasklet_schedule (&q->tasklet);return rc;
@@ -1510,12 +1510,8 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags,if (!irq_ptr)return -ENODEV ; -if (callflags &QDIO_FLAG_SYNC_INPUT ) -DBF_DEV_EVENT (DBF_INFO , irq_ptr,"doQDIO input" ); -else -DBF_DEV_EVENT (DBF_INFO , irq_ptr,"doQDIO output" ); -DBF_DEV_EVENT (DBF_INFO , irq_ptr,"q:%1d flag:%4x" , q_nr, callflags); -DBF_DEV_EVENT (DBF_INFO , irq_ptr,"buf:%2d cnt:%3d" , bufnr, count); +DBF_DEV_EVENT (DBF_INFO , irq_ptr, +"do%02x b:%02x c:%02x" , callflags, bufnr, count);if (irq_ptr->state !=QDIO_IRQ_STATE_ACTIVE )return -EBUSY ;
drivers/s390/crypto/ap_bus.c +29 -11
@@ -60,6 +60,7 @@ static int ap_device_probe(struct device *dev);static void ap_interrupt_handler (void *unused1,void *unused2);static void ap_reset (struct ap_device *ap_dev);static void ap_config_timeout (unsigned long ptr); +static int ap_select_domain (void );/* * Module description.
@@ -109,6 +110,10 @@ static unsigned long long poll_timeout = 250000;/* Suspend flag */ static int ap_suspend_flag; +/* Flag to check if domain was set through module parameter domain=. This is +* important when supsend and resume is done in a z/VM environment where the +* domain might change. */ +static int user_set_domain =0 ;static struct bus_type ap_bus_type;/**
@@ -643,6 +648,7 @@ static int ap_bus_suspend(struct device *dev, pm_message_t state)destroy_workqueue (ap_work_queue); ap_work_queue =NULL ; } +tasklet_disable (&ap_tasklet); }/* Poll on the device until all requests are finished. */
@@ -653,7 +659,10 @@ static int ap_bus_suspend(struct device *dev, pm_message_t state)spin_unlock_bh (&ap_dev->lock); }while ((flags &1 ) || (flags &2 )); -ap_device_remove (dev); +spin_lock_bh (&ap_dev->lock); + ap_dev->unregistered =1 ; +spin_unlock_bh (&ap_dev->lock); +return 0 ; }
@@ -666,11 +675,10 @@ static int ap_bus_resume(struct device *dev) ap_suspend_flag =0 ;if (!ap_interrupts_available ()) ap_interrupt_indicator =NULL ; -ap_device_probe (dev); -ap_reset (ap_dev); -setup_timer (&ap_dev->timeout, ap_request_timeout, - (unsigned long ) ap_dev); -ap_scan_bus (NULL ); +if (!user_set_domain) { + ap_domain_index =-1 ; +ap_select_domain (); + }init_timer (&ap_config_timer); ap_config_timer.function = ap_config_timeout; ap_config_timer.data =0 ;
@@ -686,12 +694,14 @@ static int ap_bus_resume(struct device *dev)tasklet_schedule (&ap_tasklet);if (ap_thread_flag) rc =ap_poll_thread_start (); - }else { -ap_device_probe (dev); -ap_reset (ap_dev); -setup_timer (&ap_dev->timeout, ap_request_timeout, - (unsigned long ) ap_dev); } +if (AP_QID_QUEUE (ap_dev->qid) != ap_domain_index) { +spin_lock_bh (&ap_dev->lock); + ap_dev->qid =AP_MKQID (AP_QID_DEVICE (ap_dev->qid), + ap_domain_index); +spin_unlock_bh (&ap_dev->lock); + } +queue_work (ap_work_queue, &ap_config_work);return rc; }
@@ -1079,6 +1089,8 @@ static void ap_scan_bus(struct work_struct *unused)spin_lock_bh (&ap_dev->lock);if (rc || ap_dev->unregistered) {spin_unlock_bh (&ap_dev->lock); +if (ap_dev->unregistered) + i--;device_unregister (dev);put_device (dev);continue ;
@@ -1586,6 +1598,12 @@ int __init ap_module_init(void) ap_domain_index);return -EINVAL ; } +/* In resume callback we need to know if the user had set the domain. +* If so, we can not just reset it. +*/ +if (ap_domain_index >=0 ) + user_set_domain =1 ; +if (ap_instructions_available () !=0 ) {pr_warning ("The hardware system does not support " "AP instructions\n" );