1. 30 11月, 2012 1 次提交
    • J
      s390/pci: base support · cd248341
      Jan Glauber 提交于
      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: NJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      cd248341
  2. 23 11月, 2012 7 次提交
    • C
      s390/kvm: Fix address space mixup · ce6a04ac
      Christian Borntraeger 提交于
      I was chasing down a bug of random validity intercepts on s390.
      (guest prefix page not mapped in the host virtual aspace). Turns out
      that the problem was a wrong address space control element. The
      cause was quite complex:
      
      During paging activity a DAT protection during SIE caused a program
      interrupt. Normally, the sie retry loop tries to catch all
      interrupts during and shortly before sie to rerun the setup. The
      problem is now that protection causes a suppressing program interrupt,
      causing the PSW to point to the instruction AFTER SIE in case of DAT
      protection. This confused the logic of the retry loop to not trigger,
      instead we jumped directly back to SIE after return from
      the program  interrupt. (the protection fault handler itself did
      a rewind of the psw). This usually works quite well, but:
      
      If now the protection fault handler has to wait, another program
      might be scheduled in. Later on the sie process will be schedules
      in again. In that case the content of CR1 (primary address space)
      will be wrong because switch_to will put the user space ASCE into CR1
      and not the guest ASCE.
      
      In addition the program parameter is also wrong for every protection
      fault of a guest, since we dont issue the SPP instruction.
      
      So lets also check for PSW == instruction after SIE in the program
      check handler. Instead of expensively checking all program
      interruption codes that might be suppressing we assume that a program
      interrupt pointing after SIE was always a program interrupt in SIE.
      (Otherwise we have a kernel bug anyway).
      
      We also have to compensate the rewinding, since the C-level handlers
      will do that. Therefore we need to add a nop with the same length
      as SIE before the sie_loop.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      CC: stable@vger.kernel.org
      CC: Heiko Carstens <heiko.carstens@de.ibm.com>
      ce6a04ac
    • M
      s390/ptrace: race of single stepping vs signal delivery · 39efd4ec
      Martin Schwidefsky 提交于
      The current single step code is racy in regard to concurrent delivery
      of signals. If a signal is delivered after a PER program check occurred
      but before the TIF_PER_TRAP bit has been checked in entry[64].S the code
      clears TIF_PER_TRAP and then calls do_signal. This is wrong, if the
      instruction completed (or has been suppressed) a SIGTRAP should be
      delivered to the debugger in any case. Only if the instruction has been
      nullified the SIGTRAP may not be send.
      
      The new logic always sets TIF_PER_TRAP if the program check indicates PER
      tracing but removes it again for all program checks that are nullifying.
      The effect is that for each change in the PSW address we now get a
      single SIGTRAP.
      Reported-by: NAndreas Arnez <arnez@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      39efd4ec
    • H
      s390/disassembler: add new instructions · c68dba20
      Heiko Carstens 提交于
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      c68dba20
    • H
      s390: add zEC12 code generation support · 991c1505
      Heiko Carstens 提交于
      Allow to generate code that only runs on zEC12 machines.
      
      Also add a check which prevents the kernel to run on machines which
      do not have any of the following new facilities installed:
      
      - (48) decimal-floating-point zoned-conversion
      - (49) execution-hint
      - (49) load-and-trap
      - (49) miscellaneous-instruction-extensions
      - (49) processor-assist
      - (50) constrained transactional-execution
      - (73) transactional-execution
      
      48, 49, 50 and 73 are the bit numbers of the facility indications for
      each of the required facilities.
      
      Note that we assume that user-space gets compiled with the same
      compiler options, therefore we also test for a dfp facility even
      if the kernel doesn't make use of it.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      991c1505
    • H
      s390/topology: cleanup topology code · d1e57508
      Heiko Carstens 提交于
      Mainly merge all different per-cpu arrays into a single array which
      holds all topology information per logical cpu.
      Also fix the broken core vs socket variable naming and simplify the
      locking a bit.
      When running in environments without topology information also
      invent book, socket and core ids, so that not all ids are zero.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      d1e57508
    • H
      s390/memory hotplug: use pfmf instruction to initialize storage keys · 6b70a920
      Heiko Carstens 提交于
      Move and rename init_storage_keys() to pageattr.c, so it can also be
      used from the sclp memory hotplug code in order to initialize
      storage keys.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6b70a920
    • H
      s390/traps: preinitialize program check table · b01a37a7
      Heiko Carstens 提交于
      Preinitialize the program check table, so we can put it into the
      read-only data section.
      Also use only four byte entries for the table, since each program
      check handler resides within the first 2GB. Therefore this reduces
      the size of the table by 50% on 64 bit builds.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      b01a37a7
  3. 12 11月, 2012 2 次提交
    • H
      s390/topology: fix core id vs physical package id mix-up · 658e5ce7
      Heiko Carstens 提交于
      The current topology code confuses core id vs physical package id.
      
      In other words /sys/devices/system/cpu/cpuX/topology/core_id
      displays the physical_package_id (aka socket id) instead of the
      core id.
      The physical_package_id sysfs attribute always displays "-1"
      instead of the socket id.
      
      Fix this mix-up with a small patch which defines and initializes
      topology_physical_package_id correctly and fixes the broken
      core id handling.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      658e5ce7
    • M
      s390/signal: set correct address space control · fa968ee2
      Martin Schwidefsky 提交于
      If user space is running in primary mode it can switch to secondary
      or access register mode, this is used e.g. in the clock_gettime code
      of the vdso. If a signal is delivered to the user space process while
      it has been running in access register mode the signal handler is
      executed in access register mode as well which will result in a crash
      most of the time.
      
      Set the address space control bits in the PSW to the default for the
      execution of the signal handler and make sure that the previous
      address space control is restored on signal return. Take care
      that user space can not switch to the kernel address space by
      modifying the registers in the signal frame.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fa968ee2
  4. 07 11月, 2012 1 次提交
    • H
      s390/sclp: fix addressing mode clobber · 99e639b7
      Heiko Carstens 提交于
      The early mini sclp driver may be called in zArch mode either in
      31 or 64 bit addressing mode.
      If called in 31 bit addressing mode the new external interrupt psw
      however would switch to 64 bit addressing mode. This would cause an
      addressing exception within the interrupt handler, since the code
      didn't expect the zArch/31 bit addressing mode combination.
      
      Fix this by setting the new psw addressing mode bits so they fit
      the current addressing mode.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      99e639b7
  5. 18 10月, 2012 4 次提交
  6. 09 10月, 2012 7 次提交
  7. 06 10月, 2012 1 次提交
    • D
      compat: move compat_siginfo_t definition to asm/compat.h · 751f409d
      Denys Vlasenko 提交于
      This is a preparatory patch for the introduction of NT_SIGINFO elf note.
      
      Make the location of compat_siginfo_t uniform across eight architectures
      which have it.  Now it can be pulled in by including asm/compat.h or
      linux/compat.h.
      
      Most of the copies are verbatim.  compat_uid[32]_t had to be replaced by
      __compat_uid[32]_t.  compat_uptr_t had to be moved up before
      compat_siginfo_t in asm/compat.h on a several architectures (tile already
      had it moved up).  compat_sigval_t had to be relocated from linux/compat.h
      to asm/compat.h.
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Amerigo Wang <amwang@redhat.com>
      Cc: "Jonathan M. Foote" <jmfoote@cert.org>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Pedro Alves <palves@redhat.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      751f409d
  8. 01 10月, 2012 4 次提交
  9. 26 9月, 2012 13 次提交