1. 09 10月, 2017 1 次提交
  2. 22 3月, 2017 3 次提交
    • H
      s390/debugfs: introduce top-level 's390' directory · 050f99b1
      Heiko Carstens 提交于
      Introduce a top-level 's390' directory which should be used when
      adding new s390 specific debug feature files and/or directories.
      
      This makes hopefully sure that the contents of the s390 directory will
      be a bit more structured. Right now we have a couple of top-level
      files where it is not easy to tell to which subsystem they belong to.
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      050f99b1
    • H
      s390/sysinfo: allow compiler warnings again · 59808fc8
      Heiko Carstens 提交于
      Allow compiler warnings again for the sysinfo file. Compiler warnings
      were disabled when the bogomips calculation with math-emu code was
      introduced ("[S390] Calibrate delay and bogomips.").
      Since that code is gone, we can enable warnings again.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      59808fc8
    • M
      s390: add a system call for guarded storage · 916cda1a
      Martin Schwidefsky 提交于
      This adds a new system call to enable the use of guarded storage for
      user space processes. The system call takes two arguments, a command
      and pointer to a guarded storage control block:
      
          s390_guarded_storage(int command, struct gs_cb *gs_cb);
      
      The second argument is relevant only for the GS_SET_BC_CB command.
      
      The commands in detail:
      
      0 - GS_ENABLE
          Enable the guarded storage facility for the current task. The
          initial content of the guarded storage control block will be
          all zeros. After the enablement the user space code can use
          load-guarded-storage-controls instruction (LGSC) to load an
          arbitrary control block. While a task is enabled the kernel
          will save and restore the current content of the guarded
          storage registers on context switch.
      1 - GS_DISABLE
          Disables the use of the guarded storage facility for the current
          task. The kernel will cease to save and restore the content of
          the guarded storage registers, the task specific content of
          these registers is lost.
      2 - GS_SET_BC_CB
          Set a broadcast guarded storage control block. This is called
          per thread and stores a specific guarded storage control block
          in the task struct of the current task. This control block will
          be used for the broadcast event GS_BROADCAST.
      3 - GS_CLEAR_BC_CB
          Clears the broadcast guarded storage control block. The guarded-
          storage control block is removed from the task struct that was
          established by GS_SET_BC_CB.
      4 - GS_BROADCAST
          Sends a broadcast to all thread siblings of the current task.
          Every sibling that has established a broadcast guarded storage
          control block will load this control block and will be enabled
          for guarded storage. The broadcast guarded storage control block
          is used up, a second broadcast without a refresh of the stored
          control block with GS_SET_BC_CB will not have any effect.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      916cda1a
  3. 08 2月, 2017 1 次提交
  4. 16 1月, 2017 1 次提交
  5. 12 12月, 2016 2 次提交
  6. 20 9月, 2016 1 次提交
  7. 08 8月, 2016 1 次提交
  8. 31 7月, 2016 2 次提交
  9. 28 6月, 2016 1 次提交
  10. 14 6月, 2016 1 次提交
  11. 30 12月, 2015 1 次提交
  12. 18 12月, 2015 1 次提交
    • H
      s390: compile head.S always with -march=z900 · 6527f6e0
      Heiko Carstens 提交于
      head.S on s390 contains some sanity checks if the kernel will run on a
      machine or if the machine is too old, e.g. if the kernel contains
      instructions not available on the machine. If so, it will emit an error
      message to the console before it stops execution.
      
      Therefore head.S contains only instructions which are availanble with the
      earliest machine generation (z900).  In order to make sure we don't
      accidently add instructions which are not available on z900, always compile
      with -march=z900. This makes sure compilation will fail if wrong
      instructions are used.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6527f6e0
  13. 14 10月, 2015 1 次提交
  14. 29 7月, 2015 1 次提交
  15. 25 3月, 2015 3 次提交
  16. 29 1月, 2015 1 次提交
  17. 09 10月, 2014 2 次提交
  18. 25 9月, 2014 1 次提交
  19. 09 9月, 2014 1 次提交
  20. 07 3月, 2014 1 次提交
  21. 06 3月, 2014 1 次提交
  22. 04 3月, 2014 1 次提交
    • H
      s390/compat: convert system call wrappers to C part 01 · b07edab2
      Heiko Carstens 提交于
      Introduce a new compat_wrap.c file which contains the s390 specific compat
      system call wrappers.
      The s390 specific system call wrappers only perform sign, zero and pointer
      conversion of system call arguments before actually calling the non-compat
      system call.
      
      Therefore introduce COMPAT_SYSCALL_WRAPx macros which generate C code that
      is nearly identical to the assembly code. This has the advantage that the
      compile will generate correct code, and we avoid the frequent copy-paste
      errors seen in the compat_wrapper.S file.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      b07edab2
  23. 16 12月, 2013 2 次提交
  24. 24 10月, 2013 1 次提交
    • H
      s390/bitops: use generic find bit functions / reimplement _left variant · 746479cd
      Heiko Carstens 提交于
      Just like all other architectures we should use out-of-line find bit
      operations, since the inline variant bloat the size of the kernel image.
      And also like all other architecures we should only supply optimized
      variants of the __ffs, ffs, etc. primitives.
      
      Therefore this patch removes the inlined s390 find bit functions and uses
      the generic out-of-line variants instead.
      
      The optimization of the primitives follows with the next patch.
      
      With this patch also the functions find_first_bit_left() and
      find_next_bit_left() have been reimplemented, since logically, they are
      nothing else but a find_first_bit()/find_next_bit() implementation that
      use an inverted __fls() instead of __ffs().
      Also the restriction that these functions only work on machines which
      support the "flogr" instruction is gone now.
      
      This reduces the size of the kernel image (defconfig, -march=z9-109)
      by 144,482 bytes.
      Alone the size of the function build_sched_domains() gets reduced from
      7 KB to 3,5 KB.
      
      We also git rid of unused functions like find_first_bit_le()...
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      746479cd
  25. 02 5月, 2013 1 次提交
  26. 17 4月, 2013 1 次提交
    • H
      s390/dumpstack: fix call chain walking · 1bca09f7
      Heiko Carstens 提交于
      dumpstack() did not always print a sane callchain when being called.
      The reason is that show_trace() accessed register 15 directly to get
      the current stack pointer and passed that pointer to __show_trace()
      which expects a valid stack frame pointer as argument.
      However due to tail call optimization the stack frame may not exist
      anymore when __show_trace() gets called and therefore an invalid
      stack frame pointer gets passed.
      To prevent that disable tail call optimization for call chain walking
      functions.
      So move all the show_* functions to a dumpstack.c file like other
      architectures have it already and add a -fno-optimize-sibling-calls
      compile flag to both dumpstack.c and stacktrace.c to prevent tail
      call optimization.
      
      Fixes callchains that looked e.g. like this:
      
      [   12.868258] Call Trace:
      [   12.868262] ([<0000000000008000>] 0x8000)
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1bca09f7
  27. 23 11月, 2012 1 次提交
  28. 26 9月, 2012 5 次提交
    • H
      s390/kexec: remove CONFIG_KEXEC · 0ed23b3e
      Heiko Carstens 提交于
      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: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0ed23b3e
    • H
      s390/perf_events: compile only for CONFIG_64BIT · 305e4f10
      Heiko Carstens 提交于
      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: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      305e4f10
    • J
      s390: add support for runtime instrumentation · e4b8b3f3
      Jan Glauber 提交于
      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: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      e4b8b3f3
    • H
      s390/kexec: move machine_crash_shutdown() to machine_kexec.c · 48a8ca03
      Heiko Carstens 提交于
      machine_crash_shutdown() was the only function in crash.c.
      So move the function and delete one file.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      48a8ca03
    • H
      s390/cache: expose cpu cache topology via sysfs · 881730ad
      Heiko Carstens 提交于
      Expose cpu cache topology via sysfs.
      The created sysfs directory structure is compatible to what x86, ia64
      and powerpc have.
      On s390 we expose only information about cpu caches which are private
      to a cpu via sysfs . Caches which are shared between cpus do not have
      a sysfs representation.
      The reason for that is that the file "shared_cpu_map" is mandatory
      and only if running under LPAR it is possible to tell which cpus
      share which cache. Second level hypervisors however do not and cannot
      expose that information to guests.
      In order to have a consistent view we made the choice to always only
      expose information about private cpu caches via sysfs.
      
      Example for a z196 cpu (cpu1 in /sys/devices/cpu):
      
      cpu1/cache/index0/size -- 64K
      cpu1/cache/index0/type -- Data
      cpu1/cache/index0/level -- 1
      cpu1/cache/index0/number_of_sets -- 64
      cpu1/cache/index0/shared_cpu_map -- 00000000,00000002
      cpu1/cache/index0/shared_cpu_list -- 1
      cpu1/cache/index0/coherency_line_size -- 256
      cpu1/cache/index0/ways_of_associativity -- 4
      cpu1/cache/index1/size -- 128K
      cpu1/cache/index1/type -- Instruction
      cpu1/cache/index1/level -- 1
      cpu1/cache/index1/number_of_sets -- 64
      cpu1/cache/index1/shared_cpu_map -- 00000000,00000002
      cpu1/cache/index1/shared_cpu_list -- 1
      cpu1/cache/index1/coherency_line_size -- 256
      cpu1/cache/index1/ways_of_associativity -- 8
      cpu1/cache/index2/size -- 1536K
      cpu1/cache/index2/type -- Unified
      cpu1/cache/index2/level -- 2
      cpu1/cache/index2/number_of_sets -- 512
      cpu1/cache/index2/shared_cpu_map -- 00000000,00000002
      cpu1/cache/index2/shared_cpu_list -- 1
      cpu1/cache/index2/coherency_line_size -- 256
      cpu1/cache/index2/ways_of_associativity -- 12
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      881730ad