aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-26s390/disassembler: fix decoding of risblg instructionHeiko Carstens1-1/+1
Fix typo: risblk -> risblg. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/bpf,jit: add support for BPF_S_ANC_ALU_XOR_X instructionHeiko Carstens1-0/+5
Add support for new BPF_S_ANC_ALU_XOR_X instruction which got added with ffe06c17 "filter: add XOR operation". s390 version of 4bfaddf1 "x86 bpf_jit: support BPF_S_ANC_ALU_XOR_X instruction". Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/traps: move call to print_modules() out of show_regs()Heiko Carstens1-1/+1
Same as 0fa0e2f0 "x86: Move call to print_modules() out of show_regs()". Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/mm: mark free_initrd_mem() as __initHeiko Carstens1-2/+2
Same as 0d26d1d8 "x86/mm: Mark free_initrd_mem() as __init". In addition also add the __init annotation to setup_zero_pages(). Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/dasd: check count address during online settingStefan Haberland1-2/+12
A common way to prepare a z/VM mini disk is to format the real device with a z/VM tool like CPFMTXA and then define a mini disk that excludes the first cylinder, i.e. the cylinder 0 of the virtual disk is located at cylinder 1 of the real device. The DASD device driver will recognize such a mini disk as formatted, as the uniform record layout on the disk matches that of an LDL formatted device. However, the cylinder value in the 'count' field of the ECKD records matches the geometry of the real device, and not that of the mini disk, so I/O requests will fail with 'record not found' errors. To make the mini disk usable, it needs to be formatted with a tool like dasdfmt. To enable tools like distribution installation tools to recognize this situation, the DASD device driver should report such a mini disk as 'not formatted'. To this end we need to extend the device recognition code to check not just for proper record sizes, but also for proper cylinder/head/record values. Signed-off-by: Stefan Haberland <[email protected]> Reviewed-by: Stefan Weinhuber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26drivers/s390/char/monreader.c: fix error return codePeter Senna Tschudin1-1/+4
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <[email protected]> Signed-off-by: Gerald Schaefer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/cmpxchg,percpu: implement cmpxchg_double()Heiko Carstens3-1/+83
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/percpu: implement this_cpu_add_return()Heiko Carstens1-2/+8
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/percpu: implement this_cpu_xchg()Heiko Carstens1-0/+18
The generic variant has a local_irq_save/restore pair which is quite expensive. It is sufficient to disable preemption, which is a no-op with !CONFIG_PREEMPT and then use the regular xchg macro. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/kexec: remove CONFIG_KEXECHeiko Carstens2-8/+2
Since "Kconfig: split the s390 base menu" CONFIG_KEXEC gets always selected. Therefore there is no point in keeping CONFIG_KEXEC anywhere. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/irq: use designated initializers for irq class arrayHeiko Carstens1-29/+29
Use designated initializers for the irq class array in irq.c so it's always guaranteed that the order of elements is equal to their corresponding parts in irq.h. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390: add uninitialized_var() to suppress false positive compiler warningsHeiko Carstens3-4/+4
Get rid of these: arch/s390/kernel/smp.c:134:19: warning: ‘status’ may be used uninitialized in this function [-Wuninitialized] arch/s390/mm/pgtable.c:641:10: warning: ‘table’ may be used uninitialized in this function [-Wuninitialized] arch/s390/mm/pgtable.c:644:12: warning: ‘page’ may be used uninitialized in this function [-Wuninitialized] drivers/s390/cio/cio.c:1037:14: warning: ‘schid’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/crashdump: move fill_cpu_elf_notes() prototype to header fileHeiko Carstens3-3/+5
Move fill_cpu_elf_notes() prototype to header file. This way we get compile errors if e.g. the number of function parameters get changed. Otherwise it's possible to change just the definition and everything else still compiles fine, but the result is broken code. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/process: add missing header includeHeiko Carstens1-0/+1
Add appropriate header file: arch/s390/kernel/process.c:327:15: warning: symbol 'arch_align_stack' was not declared. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/ptrace: add missing ifdefHeiko Carstens1-1/+2
if (MACHINE_HAS_TE) translates to if (0) on !CONFIG_64BIT however the compiler still warns about invalid shifts within non-reachable code. So add an explicit ifdef to get rid of this warning: arch/s390/kernel/ptrace.c: In function ‘update_per_regs’: arch/s390/kernel/ptrace.c:63:4: warning: left shift count >= width of type [enabled by default] arch/s390/kernel/ptrace.c:65:4: warning: left shift count >= width of type [enabled by default] Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/ipl,decrompressor: disable branch profilingHeiko Carstens1-0/+1
The early kernel decrompressing code can't call into the kernel in order to profile branches. Fixes this link error: arch/s390/boot/compressed/misc.o: In function `decompress_kernel': misc.c:(.text+0x9a6): undefined reference to `ftrace_likely_update' Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/perf_events: compile only for CONFIG_64BITHeiko Carstens1-1/+4
The whole hardware support is only available in zArch mode. Fixes also this compile warning: arch/s390/kernel/perf_cpum_cf.c: In function ‘cpumf_pmu_init’: arch/s390/kernel/perf_cpum_cf.c:670:2: warning: left shift count >= width of type [enabled by default] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/tape: remove even more tape block leftoversHeiko Carstens2-5/+0
Fix this compile error: In file included from drivers/s390/char/tape_core.c:29:0: drivers/s390/char/tape_std.h:103:66: warning: ‘struct request’ declared inside parameter list [enabled by default] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/ap_bus: add missing ifdefHeiko Carstens1-0/+2
Get rid of this compile warning for CONFIG_32BIT: drivers/s390/crypto/ap_bus.c:168:12: warning: ‘ap_configuration_available’ defined but not used [-Wunused-function] Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/topology: use for_each_set_bit to simplify the codeWei Yongjun1-4/+1
Use for_each_set_bit() to simplify the code. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/qdio: fix truncated debug output of hex valuesJan Glauber1-13/+25
Calling debug_event the s390 debug feature only logs up to buf_size bytes of the debug view. If debug_event is called with more bytes than buf_size the additional data is ignored and not logged in the debug view. Use multiple calls to debug_event if the length exceeds buf_size. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/syscalls: wire up kcmp system callHeiko Carstens3-1/+11
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/zcryt: Handle AP configuration changesHolger Dengler6-9/+201
Detect external AP bus configuration changes and request an AP device rescan. Signed-off-by: Holger Dengler <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/vmlogrdr: change return value from -ENOSYS to -EOPNOTSUPPHeiko Carstens1-1/+1
Changing the return value of vmlogrdr_open() to -EOPNOTSUPP if O_NONBLOCK is specified shouldn't have any negative side effects. Any existing user wouldn't specify that flag since it wouldn't work anyway. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/appldata: change return value of appldata_asmHeiko Carstens1-1/+1
Change return value of appldata_asm() to -EOPNOTSUPP in case of an error. The return value was only used internally and not passed to user space. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/kexec: change return value of machine_kexec_prepareHeiko Carstens1-1/+1
Returning -ENOSYS on kexec_load() is a bad idea since user space cannot tell if the system call is not implmented or if it failed. Use -EOPNOTSUPP in case somebody tries a kexec_load on a NSS image based kernel instead. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/etr,stp: use -EOPNOTSUPP instead of -ENOSYSHeiko Carstens3-8/+8
Change -ENOSYS to -EOPNOTSUPP. Return value is used only internally. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/sclp: use -EOPNOTSUPP instead of -ENOSYSHeiko Carstens2-2/+2
The return value was only internally used, so it's ok to change. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/dasd: fix return value for non-existent ioctlsHeiko Carstens1-2/+2
For non-existent ioctls -ENOTTY should be returned. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/sysinfo,stsi: change return code handlingHeiko Carstens6-61/+52
Change return code handling of the stsi() function: In case function code 0 was specified the return value is the current configuration level (already shifted). That way all the code that actually copied the stsi_0() function can go away. Otherwise the return value is 0 (success) or negative to indicate an error (currently only -EOPNOTSUPP). Also stsi() is no longer an inline function. The function is not performance critical, but every caller would generate an exception table entry for this function. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/3270: drop unused spinlock from struct con3270Jean Delvare1-1/+0
I was checking why this spinlock was never initialized, but it turns out it's not used anywhere, so we can drop it. Signed-off-by: Jean Delvare <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/exceptions: switch to relative exception table entriesHeiko Carstens10-33/+132
This is the s390 port of 70627654 "x86, extable: Switch to relative exception table entries". Reduces the size of our exception tables by 50% on 64 bit builds. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/scm: reorder scm_removeSebastian Ott1-1/+1
Do not reset drvdata before the block device is cleaned up. With a non-empty block queue drvdata could be accessed. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/scm: remove superfluous lockSebastian Ott3-16/+3
Remove the spinlock from struct scm_device. drvdata and attributes are guarded via device_lock. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/smp,topology: add polarization member to pcpu structHeiko Carstens4-29/+25
The cpu polarization member is the only per cpu state that is not part of the pcpu structure. So add it there and have everything in one place. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/sysinfo,topology: fix cpu topology maximum nesting detectionHeiko Carstens4-20/+31
The maximum nesting of the cpu topology is evaluated when /proc/sysinfo is the first time read. This happens without a lock and a concurrent reader on a different cpu can see and use an invalid intermediate value. Besides the fact that this race is quite unlikely the worst thing that could happen is that /proc/sysinfo would contain bogus information about the machine's cpu topology. Nevertheless this should be fixed. So move the detection code to the early machine detection code and since now the value is early available use it in the topology code as well. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/mm: implement __get_user_pages_fast()Gerald Schaefer1-0/+37
This patch introduces the __get_user_pages_fast() function on s390, which will be needed with CONFIG_TRANSPARENT_HUGEPAGE and futex. Signed-off-by: Gerald Schaefer <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/sysinfo: add additional z196 fields to outputHeiko Carstens2-14/+39
Add a couple of missing fields that were introduced with z196. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/sysinfo: convert /proc/sysinfo to seqfileHeiko Carstens1-167/+115
The current proc implementation of the /proc/sysinfo file writes all informations contained in all system information blocks to a single page. This is done by calling sprintf all the time in the expectation that everything will fit into a single page. This however is not necessarily true if the configuration of a machine is very large. So convert /proc/sysinfo to avoid writing into random memory regions. For readability reasons a couple of lines are longer than 80 characters. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/topology: remove sysinfo header include, add forward declaration insteadHeiko Carstens2-1/+2
Any change to sysinfo.h causes a whole kernel recompile since sysinfo.h is included by topology.h, which again is used nearly everywhere. So remove that include and add a forward declaration instead. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/mm: shorten addressing mode initializationHeiko Carstens1-18/+10
Shorten the code for addressing mode initialization. Also add missing __init annotations, since this code is only used during kernel initialization. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/mm: rename addressing_mode to s390_user_modeHeiko Carstens7-14/+14
Renaming the globally visible variable "user_mode" to "addressing_mode" in order to fix a name clash was not a good idea. (Commit 37fe1d73 "s390/mm: rename user_mode variable to addressing_mode") Looking at the code after a couple of weeks one thinks: addressing mode of what? So rename the variable again. This time to s390_user_mode. Which hopefully makes more sense. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/partitions: make partition detection independent from DASD ioctlsStefan Weinhuber1-183/+272
In some usage scenarios it is desireable to work with disk images or virtualized DASD devices. One problem that prevents such applications is the partition detection in ibm.c. Currently it works only for devices that support the BIODASDINFO2 ioctl, in other words, it only works for devices that belong to the DASD device driver. The information gained from the BIODASDINFO2 ioctl is only for a small set of legacy cases abolutely necessary. All current VOL1, LNX1 and CMS1 type of disk labels can be interpreted correctly without this information, as long as the generic HDIO_GETGEO ioctl works and provides a correct disk geometry. This patch makes the ibm.c partition detection as independent as possible from the BIODASDINFO2 ioctl. Only the following two cases are still restricted to real DASDs: - An FBA DASD, or LDL formatted ECKD DASD without any disk label. - An old style LNX1 label (without large volume support) on a disk with inconsistent device geometry. Signed-off-by: Stefan Weinhuber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/mm: change default addressing modeHeiko Carstens1-11/+1
Change the default addressing mode so that user space runs in primary space and the kernel runs in home space. In addition remove the "switch_amode" kernel parameter so all users who already specified they want the new default behaviour will stay in the "switched" mode instead of in the opposite they intended. If there is a need to switch addressing modes, this can be done with the "user_mode" kernel parameter: user_mode=home Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/smp: avoid concurrent write to sigp status fieldHeiko Carstens1-6/+7
When a sigp instruction is issued it may store a status. This status is currently stored in a per cpu field of the target cpu. If multiple cpus issue a sigp instruction with the same target cpu and a status is stored the result is not necessarily as expected. Currently this is not an issue: - on cpu hotplug no sigps, except "restart" and "sense" are sent to the target cpu. - on external call we don't look at the status if it is stored - on sense running the condition code "status stored" is sufficient to tell if a cpu is running or not Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/processor: use ARRAY_SIZE instead of hard coded valueHeiko Carstens1-2/+2
Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/cache: add cpu cache information to /proc/cpuinfoHeiko Carstens3-10/+43
Add a line for each cpu cache to /proc/cpuinfo. Since we only have information of private cpu caches in sysfs we add a line for each cpu cache in /proc/cpuinfo which will also contain information about shared caches. For a z196 machine /proc/cpuinfo now looks like: vendor_id : IBM/S390 bogomips per cpu: 14367.00 features : esan3 zarch stfle msa ldisp eimm dfp etf3eh highgprs cache0 : level=1 type=Data scope=Private size=64K line_size=256 associativity=4 cache1 : level=1 type=Instruction scope=Private size=128K line_size=256 associativity=8 cache2 : level=2 type=Unified scope=Private size=1536K line_size=256 associativity=12 cache3 : level=3 type=Unified scope=Shared size=24576K line_size=256 associativity=12 cache4 : level=4 type=Unified scope=Shared size=196608K line_size=256 associativity=24 processor 0: version = FF, identification = 000123, machine = 2817 processor 1: version = FF, identification = 100123, machine = 2817 processor 2: version = FF, identification = 200123, machine = 2817 processor 3: version = FF, identification = 200123, machine = 2817 Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390: add support for transactional memoryMartin Schwidefsky14-21/+151
Allow user-space processes to use transactional execution (TX). If the TX facility is available user space programs can use transactions for fine-grained serialization based on the data objects that are referenced during a transaction. This is useful for lockless data structures and speculative compiler optimizations. Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390: add support for runtime instrumentationJan Glauber14-3/+300
Allow user-space threads to use runtime instrumentation (RI). To enable RI for a thread there is a new s390 specific system call, sys_s390_runtime_instr, that takes as parameter a realtime signal number. If the RI facility is available the system call sets up a control block for the calling thread with the appropriate permissions for the thread to modify the control block. The user-space thread can then use the store and modify RI instructions to alter the control block and start/stop the instrumentation via RION/RIOFF. If the user specified program buffer runs full RI triggers an external interrupt. The external interrupt is translated to a real-time signal that is delivered to the thread that enabled RI on that CPU. The number of the real-time signal is the number specified in the RI system call. So, user-space can select any available real-time signal number in case the application itself uses real-time signals for other purposes. The kernel saves the RI control blocks on task switch only if the running thread was enabled for RI. Therefore, the performance impact on task switch should be negligible if RI is not used. RI is only enabled for user-space mode and is disabled for the supervisor state. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2012-09-26s390/scm_block: force cluster writesSebastian Ott5-3/+310
Force writes to Storage Class Memory (SCM) to be in done in clusters. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>