aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
AgeCommit message (Collapse)AuthorFilesLines
2013-02-14s390/pci: fix hotplug module initSebastian Ott2-7/+24
Loading the pci hotplug module when no devices are present will fail but unfortunately some hotplug callbacks stay registered to the pci bus level. Fix this by not letting module loading fail when no pci devices are present and provide proper {de}registration functions for these callbacks. Reviewed-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: cleanup clp page allocationSebastian Ott2-3/+2
Use the __get_free_pages wrapper in clp_alloc_block. Also change the allocation to use one page only. This page is used as CLP response block e.g. to list available pci functions. Using one page we can list > 250 pci functions at once and we have code to loop around this CLP command (if not all functions fit into to the CLP block) already in place. Acked-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: cleanup clp inline assemblySebastian Ott1-5/+6
Tell gcc that the memory region pointed to by req will be used (and changed). Also remove the (now) superfluous memory constraint. Acked-by: Gerald Schaefer <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/perf: cpum_cf: fallback to software sampling eventsHendrik Brueckner1-7/+6
The CPU-measurement counter facility does not support sampling events and returns -EINVAL in that case. This return code lets the perf tool fail. To fall back to software sampling events, return -ENOENT instead. Signed-off-by: Hendrik Brueckner <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/mm: provide PAGE_SHARED defineHeiko Carstens1-0/+1
Only needed to make some drivers compile... Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/pci: rename pci_probe to s390_pci_probeHeiko Carstens2-5/+5
pci_probe is too generic and has a name clash with other common code parts. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/dma: remove dma_is_consistent() declarationHeiko Carstens1-1/+0
There is no such function nor any caller in the whole kernel. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/dma: provide dma_cache_sync() functionHeiko Carstens1-2/+5
Provide empty dma_cache_sync() function. Acked-by: Sebastian Ott <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/barrier: convert mb() to define againHeiko Carstens1-6/+3
Some of the now available common code drivers only compile if mb() is a define. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/time: rename tod clock access functionsHeiko Carstens13-48/+48
Fix name clash with some common code device drivers and add "tod" to all tod clock access function names. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/ipl: Implement diag308 loop for zfcpdumpMichael Holzheu1-4/+12
When a zfcpdump is triggered and a second dump on the same CEC is already in progress for another LPAR, diagnose 308 returns with an error code until the first dump is finished. Currently the second Linux stops with a disabled wait PSW in that case. This is improved now by by triggering diag 308 in a loop until it works. Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/chsc: cleanup SEI helper functionsSebastian Ott1-0/+5
Cleanup the functions used to call SEI. Also provide !CONFIG_PCI dummys for pci error handling. Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14s390/modules: add relocation overflow checkingMartin Schwidefsky1-51/+89
Given enough debug options some modules can grow large enough that the GOT table gets bigger than 4K. On s390 the modules are compiled with -fpic which limits the GOT to 4K. The end result is a module that is loaded but won't work. Add a sanity check to apply_rela and return with an error if a relocation error is detected for a module. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-02-14burying unused conditionalsAl Viro2-8/+0
__ARCH_WANT_SYS_RT_SIGACTION, __ARCH_WANT_SYS_RT_SIGSUSPEND, __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND, __ARCH_WANT_COMPAT_SYS_SCHED_RR_GET_INTERVAL - not used anymore CONFIG_GENERIC_{SIGALTSTACK,COMPAT_RT_SIG{ACTION,QUEUEINFO,PENDING,PROCMASK}} - can be assumed always set.
2013-02-11KVM: s390: Fix handling of iscs.Cornelia Huck1-3/+15
There are two ways to express an interruption subclass: - As a bitmask, as used in cr6. - As a number, as used in the I/O interruption word. Unfortunately, we have treated the I/O interruption word as if it contained the bitmask as well, which went unnoticed so far as - (not-yet-released) qemu made the same mistake, and - Linux guest kernels don't check the isc value in the I/O interruption word for subchannel interrupts. Make sure that we treat the I/O interruption word correctly. Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-02-08Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+12
Synchronize with 'net' in order to sort out some l2tp, wireless, and ipv6 GRE fixes that will be built on top of in 'net-next'. Signed-off-by: David S. Miller <[email protected]>
2013-02-03s390: kill useless wrappersAl Viro2-161/+22
COMPAT_SYSCALL_DEFINEx already does everything we need Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic old sigaction()Al Viro7-89/+3
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic compat rt_sigactionAl Viro4-49/+2
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic compat sched_rr_get_interval()Al Viro3-19/+1
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic old sigsuspendAl Viro3-11/+1
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic compat rt_sigqueueinfo()Al Viro4-17/+2
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic compat rt_sigpending()Al Viro4-22/+2
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic compat rt_sigprocmask(2)Al Viro4-32/+2
Signed-off-by: Al Viro <[email protected]>
2013-02-03s390: switch to generic sigaltstackAl Viro7-83/+7
Signed-off-by: Al Viro <[email protected]>
2013-02-03consolidate kernel-side struct sigaction declarationsAl Viro1-7/+1
Signed-off-by: Al Viro <[email protected]>
2013-02-03consolidate declarations of k_sigactionAl Viro1-4/+0
Only alpha and sparc are unusual - they have ka_restorer in it. And nobody needs that exposed to userland. Signed-off-by: Al Viro <[email protected]>
2013-01-31s390/timer: avoid overflow when programming clock comparatorHeiko Carstens1-0/+3
Since ed4f209 "s390/time: fix sched_clock() overflow" a new helper function is used to avoid overflows when converting TOD format values to nanosecond values. The kvm interrupt code formerly however only worked by accident because of an overflow. It tried to program a timer that would expire in more than ~29 years. Because of the old TOD-to-nanoseconds overflow bug the real expiry value however was much smaller, but now it isn't anymore. This however triggers yet another bug in the function that programs the clock comparator s390_next_ktime(): if the absolute "expires" value is after 2042 this will result in an overflow and the programmed value is lower than the current TOD value which immediatly triggers a clock comparator (= timer) interrupt. Since the timer isn't expired it will be programmed immediately again and so on... the result is a dead system. To fix this simply program the maximum possible value if an overflow is detected. Reported-by: Christian Borntraeger <[email protected]> Tested-by: Christian Borntraeger <[email protected]> Cc: [email protected] # v3.3+ Signed-off-by: Heiko Carstens <[email protected]>
2013-01-30s390/kvm: Fix instruction decodingChristian Borntraeger1-11/+14
Instructions with long displacement have a signed displacement. Currently the sign bit is interpreted as 2^20: Lets fix it by doing the sign extension from 20bit to 32bit and then use it as a signed variable in the addition (see kvm_s390_get_base_disp_rsy). Furthermore, there are lots of "int" in that code. This is problematic, because shifting on a signed integer is undefined/implementation defined if the bit value happens to be negative. Fortunately the promotion rules will make the right hand side unsigned anyway, so there is no real problem right now. Let's convert them anyway to unsigned where appropriate to avoid problems if the code is changed or copy/pasted later on. Signed-off-by: Christian Borntraeger <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-01-30s390/kvm: Fix store status for ACRS/FPRSChristian Borntraeger1-0/+8
On store status we need to copy the current state of registers into a save area. Currently we might save stale versions: The sie state descriptor doesnt have fields for guest ACRS,FPRS, those registers are simply stored in the host registers. The host program must copy these away if needed. We do that in vcpu_put/load. If we now do a store status in KVM code between vcpu_put/load, the saved values are not up-to-date. Lets collect the ACRS/FPRS before saving them. This also fixes some strange problems with hotplug and virtio-ccw, since the low level machine check handler (on hotplug a machine check will happen) will revalidate all registers with the content of the save area. Signed-off-by: Christian Borntraeger <[email protected]> CC: [email protected] Signed-off-by: Gleb Natapov <[email protected]>
2013-01-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller6-8/+35
Bring in the 'net' tree so that we can get some ipv4/ipv6 bug fixes that some net-next work will build upon. Signed-off-by: David S. Miller <[email protected]>
2013-01-27cputime: Safely read cputime of full dynticks CPUsFrederic Weisbecker1-3/+3
While remotely reading the cputime of a task running in a full dynticks CPU, the values stored in utime/stime fields of struct task_struct may be stale. Its values may be those of the last kernel <-> user transition time snapshot and we need to add the tickless time spent since this snapshot. To fix this, flush the cputime of the dynticks CPUs on kernel <-> user transition and record the time / context where we did this. Then on top of this snapshot and the current time, perform the fixup on the reader side from task_times() accessors. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Li Zhong <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Thomas Gleixner <[email protected]> [fixed kvm module related build errors] Signed-off-by: Sedat Dilek <[email protected]>
2013-01-24Merge branch 'core/irq_work' of ↵Ingo Molnar1-1/+0
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into irq/core irq_work fixes and cleanups, in preparation for full dyntics support. Signed-off-by: Ingo Molnar <[email protected]>
2013-01-23soreuseport: infrastructureTom Herbert1-1/+1
Definitions and macros for implementing soreusport. Signed-off-by: Tom Herbert <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-01-22s390/thp: implement pmdp_set_wrprotect()Gerald Schaefer1-0/+12
On s390, an architecture-specific implementation of the function pmdp_set_wrprotect() is missing and the generic version is currently being used. The generic version does not flush the tlb as it would be needed on s390 when modifying an active pmd, which can lead to subtle tlb errors on s390 when using transparent hugepages. This patch adds an s390-specific implementation of pmdp_set_wrprotect() including the missing tlb flush. Cc: [email protected] Signed-off-by: Gerald Schaefer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-21taint: add explicit flag to show whether lock dep is still OK.Rusty Russell1-1/+1
Fix up all callers as they were before, with make one change: an unsigned module taints the kernel, but doesn't turn off lockdep. Signed-off-by: Rusty Russell <[email protected]>
2013-01-17Merge 3.9-rc4 into driver-core-nextGreg Kroah-Hartman24-138/+205
This is to fix up a build problem with a wireless driver due to the dynamic-debug patches in this branch. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-17Merge branch 'for-linus' of ↵Linus Torvalds5-8/+33
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 patches from Martin Schwidefsky: "A couple of bug fixes: one of the transparent huge page primitives is broken, the sched_clock function overflows after 417 days, the XFS module has grown too large for -fpic and the new pci code has broken normal channel subsystem notifications." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/chsc: fix SEI usage s390/time: fix sched_clock() overflow s390: use -fPIC for module compile s390/mm: fix pmd_pfn() for thp
2013-01-17sk-filter: Add ability to lock a socket filter programVincent Bernat1-0/+2
While a privileged program can open a raw socket, attach some restrictive filter and drop its privileges (or send the socket to an unprivileged program through some Unix socket), the filter can still be removed or modified by the unprivileged program. This commit adds a socket option to lock the filter (SO_LOCK_FILTER) preventing any modification of a socket filter program. This is similar to OpenBSD BIOCLOCK ioctl on bpf sockets, except even root is not allowed change/drop the filter. The state of the lock can be read with getsockopt(). No error is triggered if the state is not changed. -EPERM is returned when a user tries to remove the lock or to change/remove the filter while the lock is active. The check is done directly in sk_attach_filter() and sk_detach_filter() and does not affect only setsockopt() syscall. Signed-off-by: Vincent Bernat <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-01-17KVM: s390: kvm/sigp.c: fix memory leakageCong Ding1-1/+3
the variable inti should be freed in the branch CPUSTAT_STOPPED. Signed-off-by: Cong Ding <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-01-16s390/time: fix sched_clock() overflowHeiko Carstens3-2/+30
Converting a 64 Bit TOD format value to nanoseconds means that the value must be divided by 4.096. In order to achieve that we multiply with 125 and divide by 512. When used within sched_clock() this triggers an overflow after appr. 417 days. Resulting in a sched_clock() return value that is much smaller than previously and therefore may cause all sort of weird things in subsystems that rely on a monotonic sched_clock() behaviour. To fix this implement a tod_to_ns() helper function which converts TOD values without overflow and call this function from both places that open coded the conversion: sched_clock() and kvm_s390_handle_wait(). Cc: [email protected] Reviewed-by: Martin Schwidefsky <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-12s390: use -fPIC for module compileMartin Schwidefsky1-2/+2
The xfs module uses a lot of tracepoint, with TRACEPOINTS=y and a few debugging options the GOT table of the xfs module will get bigger than 4K. To get a working xfs module it needs to be compiled with -fPIC instead of -fpic. To play safe use -fPIC for all modules. Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-12s390/mm: fix pmd_pfn() for thpGerald Schaefer1-4/+1
The pfn calculation in pmd_pfn() is broken for thp, because it uses HPAGE_SHIFT instead of the normal PAGE_SHIFT. This is fixed by removing the distinction between thp and normal pmds in that function, and always using PAGE_SHIFT. Reported-by: Christian Borntraeger <[email protected]> Signed-off-by: Gerald Schaefer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-11arch/s390/kvm: remove depends on CONFIG_EXPERIMENTALKees Cook1-1/+1
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it from any "depends on" lines in Kconfigs. CC: Avi Kivity <[email protected]> CC: Marcelo Tosatti <[email protected]> CC: Christian Borntraeger <[email protected]> CC: Cornelia Huck <[email protected]> CC: Martin Schwidefsky <[email protected]> CC: Heiko Carstens <[email protected]> Signed-off-by: Kees Cook <[email protected]> Acked-by: Cornelia Huck <[email protected]>
2013-01-11arch/s390: remove depends on CONFIG_EXPERIMENTALKees Cook1-2/+2
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it from any "depends on" lines in Kconfigs. CC: Martin Schwidefsky <[email protected]> Signed-off-by: Kees Cook <[email protected]> Acked-by: Heiko Carstens <[email protected]>
2013-01-10s390/kvm: Fix BUG in include/linux/kvm_host.h:745Christian Borntraeger1-0/+2
commit b080935c8638e08134629d0a9ebdf35669bec14d kvm: Directly account vtime to system on guest switch also removed the irq_disable/enable around kvm guest switch, which is correct in itself. Unfortunately, there is a BUG ON that (correctly) checks for preemptible to cover the call to rcu later on. (Introduced with commit 8fa2206821953a50a3a02ea33fcfb3ced2fd9997 KVM: make guest mode entry to be rcu quiescent state) This check might trigger depending on the kernel config. Lets make sure that no preemption happens during kvm_guest_enter. We can enable preemption again after the call to rcu_virt_note_context_switch returns. Please note that we continue to run s390 guests with interrupts enabled. Acked-by: Frederic Weisbecker <[email protected]> CC: Gleb Natapov <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2013-01-08s390/pci: define read*_relaxed functionsHeiko Carstens1-0/+5
Just map the read*_relaxed() functions to their corresponding read*() functions. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-08s390/topology: export cpu_topologyHeiko Carstens1-0/+2
Export cpu_topology symbol, so it's available for modules. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-08s390/pm: export pm_power_offHeiko Carstens1-1/+2
Export pm_power_off symbol. Needed by at least one of the new device drivers that come with CONFIG_PCI. And all other architectures export that symbol as well. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2013-01-08s390/pci: define isa_dma_bridge_buggyHeiko Carstens1-0/+6
Define isa_dma_bridge_buggy. Needed to make pci quirks compile: drivers/pci/quirks.c: In function ‘quirk_isa_dma_hangs’: drivers/pci/quirks.c:88:7: error: ‘isa_dma_bridge_buggy’ undeclared (first use in this function) Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>