aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/dis.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-25s390: remove 31 bit supportHeiko Carstens1-47/+1
Remove the 31 bit support in order to reduce maintenance cost and effectively remove dead code. Since a couple of years there is no distribution left that comes with a 31 bit kernel. The 31 bit kernel also has been broken since more than a year before anybody noticed. In addition I added a removal warning to the kernel shown at ipl for 5 minutes: a960062e5826 ("s390: add 31 bit warning message") which let everybody know about the plan to remove 31 bit code. We didn't get any response. Given that the last 31 bit only machine was introduced in 1999 let's remove the code. Anybody with 31 bit user space code can still use the compat mode. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2015-01-22s390: add SMT supportMartin Schwidefsky1-2/+6
The multi-threading facility is introduced with the z13 processor family. This patch adds code to detect the multi-threading facility. With the facility enabled each core will surface multiple hardware threads to the system. Each hardware threads looks like a normal CPU to the operating system with all its registers and properties. The SCLP interface reports the SMT topology indirectly via the maximum thread id. Each reported CPU in the result of a read-scp-information is a core representing a number of hardware threads. To reflect the reduced CPU capacity if two hardware threads run on a single core the MT utilization counter set is used to normalize the raw cputime obtained by the CPU timer deltas. This scaled cputime is reported via the taskstats interface. The normal /proc/stat numbers are based on the raw cputime and are not affected by the normalization. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2015-01-08s390/disassembler: remove indentical initializerHeiko Carstens1-1/+0
Remove one of the two identical initializer entries. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2014-10-09s390/disassembler: add vector instructionsMartin Schwidefsky1-3/+242
Add the instruction introduced with the vector extension to the in-kernel disassembler. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-24s390/kprobes: allow kprobes only on known instructionsHeiko Carstens1-1/+1
Since we have an in-kernel disassembler we can make sure that there won't be any kprobes set on random data. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-24s390/dis: move common definitions to a header fileSuzuki K. Poulose1-28/+1
The patch moves some of the definitions to a header file. No functional changes involved. I have retained the Copyright Statement from the original file. Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com> [Heiko Carstens: rename s390-dis.h to dis.h] Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-10-24s390/dis: rename structures for unique typesSuzuki K. Poulose1-28/+28
Rename 'insn' and 'operand' structures to more canonical names to avoid conflicts. struct insn represents information about an instruction, including the mnemonics, format and opcode. struct operand represents the 'properties' and information on howto interpret the operand value and doesn't contain the value. We rename these structures for avoiding a global conflict. i.e, 1,$s/struct insn/struct s390_insn/g 1,$s/struct operand/struct s390_operand/g Signed-off-by: Suzuki K Poulose <suzuki@in.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-05-07s390/disassembler: prevent endless loop in print_fn_code()Heiko Carstens1-0/+2
If the size of the opcode to be printed is larger than "len" we'll see an overflow of an unsigned long value, which means that the while loop within print_fn_code() will loop quite a long time until there is the next chance for an exit. So add an early exit check. Reported-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-04-17s390/dis: use explicit buf lenStefan Raspl1-4/+5
Pass buffer length in extra parameter. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-28s390/dis: Fix invalid array sizeSyam Sidhardhan1-2/+2
We are using sizeof operator for an array given as function argument, which is incorrect. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-14s390/cleanup: rename SPP to LPPHendrik Brueckner1-1/+0
The set-program-parameter (SPP) instruction has been renamed to load-program-parameter (LPP) (see SA23-2260). Reflect this change and rename all macro/instruction references. Also remove the duplicate SPP/LPP entry in the kernel disassembler instruction list. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-30s390/pci: base supportJan Glauber1-0/+15
Add PCI support for s390, (only 64 bit mode is supported by hardware): - PCI facility tests - PCI instructions: pcilg, pcistg, pcistb, stpcifc, mpcifc, rpcit - map readb/w/l/q and writeb/w/l/q to pcilg and pcistg instructions - pci_iomap implementation - memcpy_fromio/toio - pci_root_ops using special pcilg/pcistg - device, bus and domain allocation Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-11-23s390/disassembler: add new instructionsHeiko Carstens1-193/+370
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2012-10-04Merge tag 'kvm-3.7-1' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds1-0/+27
Pull KVM updates from Avi Kivity: "Highlights of the changes for this release include support for vfio level triggered interrupts, improved big real mode support on older Intels, a streamlines guest page table walker, guest APIC speedups, PIO optimizations, better overcommit handling, and read-only memory." * tag 'kvm-3.7-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (138 commits) KVM: s390: Fix vcpu_load handling in interrupt code KVM: x86: Fix guest debug across vcpu INIT reset KVM: Add resampling irqfds for level triggered interrupts KVM: optimize apic interrupt delivery KVM: MMU: Eliminate pointless temporary 'ac' KVM: MMU: Avoid access/dirty update loop if all is well KVM: MMU: Eliminate eperm temporary KVM: MMU: Optimize is_last_gpte() KVM: MMU: Simplify walk_addr_generic() loop KVM: MMU: Optimize pte permission checks KVM: MMU: Update accessed and dirty bits after guest pagetable walk KVM: MMU: Move gpte_access() out of paging_tmpl.h KVM: MMU: Optimize gpte_access() slightly KVM: MMU: Push clean gpte write protection out of gpte_access() KVM: clarify kvmclock documentation KVM: make processes waiting on vcpu mutex killable KVM: SVM: Make use of asm.h KVM: VMX: Make use of asm.h KVM: VMX: Make lto-friendly KVM: x86: lapic: Clean up find_highest_vector() and count_vectors() ... Conflicts: arch/s390/include/asm/processor.h arch/x86/kvm/i8259.c
2012-09-26s390/disassembler: fix decoding of risblg instructionHeiko Carstens1-1/+1
Fix typo: risblk -> risblg. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-09-26s390: add support for transactional memoryMartin Schwidefsky1-0/+12
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 <schwidefsky@de.ibm.com>
2012-09-26s390: add support for runtime instrumentationJan Glauber1-0/+21
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 <heiko.carstens@de.ibm.com> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-09-26s390/bpf,jit: BPF Just In Time compiler for s390Martin Schwidefsky1-0/+23
The s390 implementation of the JIT compiler for packet filter speedup. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-08-05Merge remote-tracking branch 'upstream' into nextAvi Kivity1-2/+2
- bring back critical fixes (esp. aa67f6096c19bc) - provide an updated base for development * upstream: (4334 commits) missed mnt_drop_write() in do_dentry_open() UBIFS: nuke pdflush from comments gfs2: nuke pdflush from comments drbd: nuke pdflush from comments nilfs2: nuke write_super from comments hfs: nuke write_super from comments vfs: nuke pdflush from comments jbd/jbd2: nuke write_super from comments btrfs: nuke pdflush from comments btrfs: nuke write_super from comments ext4: nuke pdflush from comments ext4: nuke write_super from comments ext3: nuke write_super from comments Documentation: fix the VM knobs descritpion WRT pdflush Documentation: get rid of write_super vfs: kill write_super and sync_supers ACPI processor: Fix tick_broadcast_mask online/offline regression ACPI: Only count valid srat memory structures ACPI: Untangle a return statement for better readability Linux 3.6-rc1 ... Signed-off-by: Avi Kivity <avi@redhat.com>
2012-07-30s390: make use of user_mode() macro where possibleHeiko Carstens1-2/+2
We use the user_mode() helper already at several places but also have the open coded variant at other places. Convert the code to always use the helper function. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-07-26s390/dis: Instruction decoding interfaceCornelia Huck1-0/+27
Provide a new function, insn_to_mnemonic, by which e.g. kvm can obtain a human-readable decoding of an instruction's opcode. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2012-07-20s390/dis: Add the servc instruction to the disassembler.Cornelia Huck1-0/+1
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-07-20s390/comments: unify copyright messages and remove file namesHeiko Carstens1-2/+0
Remove the file name from the comment at top of many files. In most cases the file name was wrong anyway, so it's rather pointless. Also unify the IBM copyright statement. We did have a lot of sightly different statements and wanted to change them one after another whenever a file gets touched. However that never happened. Instead people start to take the old/"wrong" statements to use as a template for new files. So unify all of them in one go. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2012-03-28Disintegrate asm/system.h for S390David Howells1-1/+0
Disintegrate asm/system.h for S390. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-s390@vger.kernel.org
2011-12-27[S390] disassembler: mark exception causing instructionsHeiko Carstens1-2/+7
If an exception happens the PSW either points to the instruction that caused the exception or to the instruction that follows the exception causing instruction, depending on the exception type. Since the inkernel disassembler adds a ">" in front of the disassembly many people assume incorrectly that the instruction that is pointed to must be the cause of the exception. To make people aware that this is not necessarily the case add a different character in front of the disassembled instruction that precedes the current instructions. The output now looks like this: Krnl PSW : 0704200180000000 0000000000120de8 (test_function+0x0/0x100) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3 Krnl GPRS: 000003ff00000000 0000000000120de4 000000000091bb40 0000000000000001 000003fffd2ea000 0000000030fb7df8 0000000030fb7f10 000003ffffa113c8 000000000091bb40 000003fffd2ea000 0000000000000002 0000000030fb7f10 000000003f290240 0000000000606220 00000000002cfb5c 0000000030fb7d58 Krnl Code: 0000000000120ddc: b90400a9 lgr %r10,%r9 0000000000120de0: a7f4ff88 brc 15,120cf0 #0000000000120de4: a7f40001 brc 15,120de6 >0000000000120de8: a7f13f80 tmll %r15,16256 0000000000120dec: eb8ff0580024 stmg %r8,%r15,88(%r15) 0000000000120df2: a7840001 brc 8,120df4 0000000000120df6: b90400ef lgr %r14,%r15 0000000000120dfa: a7fbffb8 aghi %r15,-72 Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-07-26atomic: use <linux/atomic.h>Arun Sharma1-1/+1
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-26[S390] irq: merge irq.c and s390_ext.cHeiko Carstens1-1/+1
Merge irq.c and s390_ext.c into irq.c. That way all external interrupt related functions are together. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-05-10[S390] disassembler: handle b280/spp instructionChristian Borntraeger1-0/+1
arch/s390/kvm/sie64a.S uses the b280 instruction. Tell the builtin disassembler to handle that code. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-10-25[S390] add z196 instructions to kernel disassemblerMartin Schwidefsky1-13/+132
Add the new instructions introduced with z196 to the kernel disassembler. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-02-26[S390] add z9-ec/z10 instruction to kernel disassemblerMartin Schwidefsky1-84/+285
Add the instruction of the z9-ec and z10 machines to the kernel disassembler. Add the missing "ptff" instruction of z9-109 and the missing "sqd" of g5. Remove useless comments with instruction examples from format table. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-07-12headers: smp_lock.h reduxAlexey Dobriyan1-1/+0
* Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-30[S390] disassembler: fix idte instruction format.Martin Schwidefsky1-1/+1
The correct instruction format of idte is "idte r1,r3,r2" with r1 at bit 24, r3 at bit 16 and r2 at bit 28. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-12[S390] disassembler: Remove redundant variable assignmentChristian Borntraeger1-1/+0
There is no need to assign "0" to "hops" twice. Remove one assigment. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-10-12[S390] disassembler: fix output for insns with 6 operands.Martin Schwidefsky1-1/+3
The termination condition of the loop that prints the operands of an instruction doesn't stop after the maximum of 6 operands. It continues with the operands of the next instruction format instead which create really long lines. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-08-22[S390] disassembler: fix b2 opcodes like srst, bsg, and othersChristian Borntraeger1-1/+1
The instruction table for b2 opcodes was missing an opfrag value for the cpya instruction. All instructions specified after cpya were not considered by the disassembler. The fix is simple and obvious - add the opfrag field to the cpya instruction. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
2007-07-17[S390] Fix disassembly of RX_URRD, SI_URD & PC-relative instructions.Christian Borntraeger1-3/+4
The instructions with format RX_URRD and SI_URD and instructions with a PC relative operand are not disassembled correctly. For RX_URRD and SI_URD instructions find_insn sets opfrag to code[0]. The mask byte of these two formats is 0x00. table->opfrag will never be identical to (opfrag & opmask) and no matching instruction will be found. Set the mask byte to 0xff to actually check byte 0 against the table. For PC relative instructions the (unsigned) offset value needs to be casted to an signed integer so that negative branch offsets are handled correctly. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-05-08no longer #include <asm/kdebug.h>Adrian Bunk1-1/+1
Include the new linux/kdebug.h instead of asm/kdebug.h. Simply remove the asm/kdebug.h include if both had been included. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-27[S390] Improved oops output.Martin Schwidefsky1-0/+1278
This patch adds two improvements to the oops output. First it adds an additional line after the PSW which decodes the different fields of it. Second a disassembler is added that decodes the instructions surrounding the faulting PSW. The output of a test oops now looks like this: kernel BUG at init/main.c:419 illegal operation: 0001 [#1] CPU: 0 Not tainted Process swapper (pid: 0, task: 0000000000464968, ksp: 00000000004be000) Krnl PSW : 0700000180000000 00000000000120b6 (rest_init+0x36/0x38) R:0 T:1 IO:1 EX:1 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 EA:3 Krnl GPRS: 0000000000000003 00000000004ba017 0000000000000022 0000000000000001 000000000003a5f6 0000000000000000 00000000004be6a8 0000000000000000 0000000000000000 00000000004b8200 0000000000003a50 0000000000008000 0000000000516368 000000000033d008 00000000000120b2 00000000004bdee0 Krnl Code: 00000000000120a6: e3e0f0980024 stg %r14,152(%r15) 00000000000120ac: c0e500014296 brasl %r14,3a5d8 00000000000120b2: a7f40001 brc 15,120b4 >00000000000120b6: 0707 bcr 0,%r7 00000000000120b8: eb7ff0500024 stmg %r7,%r15,80(%r15) 00000000000120be: c0d000195825 larl %r13,33d108 00000000000120c4: a7f13f00 tmll %r15,16128 00000000000120c8: a7840001 brc 8,120ca Call Trace: ([<00000000000120b2>] rest_init+0x32/0x38) [<00000000004be614>] start_kernel+0x37c/0x410 [<0000000000012020>] _ehead+0x20/0x80 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>