1. 09 Feb, 2023 9 commits
    • Heiko Carstens's avatar
      s390/idle: remove arch_cpu_idle_time() and corresponding code · be76ea61
      Heiko Carstens authored
      arch_cpu_idle_time() returns the idle time of any given cpu if it is in
      idle, or zero if not. All if this is racy and partially incorrect. Time
      stamps taken with store clock extended and store clock fast from different
      cpus are compared, while the architecture states that this is nothing which
      can be relied on (see Principles of Operation; Chapter 4, "Setting and
      Inspecting the Clock").
      
      A more fundamental problem is that the timestamp when a cpu is leaving idle
      is taken early in the assembler part of the interrupt handler, and this
      value is only transferred many cycles later to the cpu's per-cpu idle data
      structure.
      
      This per cpu data structure is read by arch_cpu_idle() to tell for which
      period of time a remote cpu is idle: if only an idle_enter value is
      present, the assumed idle time of the cpu is calculated by taking a local
      timestamp and returning the difference of the local timestamp and the
      idle_enter value. This is potentially incorrect, since the remote cpu may
      have already left idle, but the taken timestamp may not have been
      transferred to the per-cpu data structure. This in turn means that too much
      idle time may be reported for a cpu, and a subsequent calculation of system
      idle time may result in a smaller value.
      
      Instead of coming up with even more complex code trying to fix this, just
      remove this code, and only account idle time of a cpu, after idle state is
      left.
      
      Another minor bug is that it is assumed that timestamps are non-zero, which
      is not necessarily the case for timestamps taken with store clock
      fast. This however is just a very minor problem, since this can only happen
      when the epoch increases.
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      be76ea61
    • Heiko Carstens's avatar
      s390/vx: use simple assignments to access __vector128 members · a02d584e
      Heiko Carstens authored
      Use simple assignments to access __vector128 members instead of hard
      to read casts.
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      a02d584e
    • Heiko Carstens's avatar
      s390/vx: add 64 and 128 bit members to __vector128 struct · b0b7b43f
      Heiko Carstens authored
      Add 64 and 128 bit members to __vector128 struct in order to allow reading
      of the complete value, or the higher or lower part of vector register
      contents instead of having to use casts.
      
      Add an explicit __aligned(4) statement to avoid that the alignment of the
      structure changes from 4 to 8. This should make sure that no breakage
      happens because of this change.
      Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      b0b7b43f
    • Heiko Carstens's avatar
      MAINTAINERS: add diag288_wdt driver to s390 maintained files · 1306711a
      Heiko Carstens authored
      The diag288_wdt watchdog driver is s390 specific.
      Document who is responsible for this driver.
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      1306711a
    • Vineeth Vijayan's avatar
      MAINTAINERS: add entry for s390 SCM driver · be20b9d3
      Vineeth Vijayan authored
      Storage Class Memory driver support for s390 architecture has been there
      for a while. The original author of this work, Sebastian Ott has left IBM
      and I am taking over this module. Adding myself as the upstream maintainer
      for SCM on s390 architecture.
      Signed-off-by: default avatarVineeth Vijayan <vneethv@linux.ibm.com>
      Acked-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      be20b9d3
    • Heiko Carstens's avatar
      s390/processor: always inline cpu flag helper functions · 87f79d88
      Heiko Carstens authored
      arch_cpu_idle() is marked noinstr and therefore must only call functions
      which are also not instrumented.
      
      Make sure that cpu flag helper functions are always inlined to avoid that
      the compiler generates an out-of-line function for e.g. the call within
      arch_cpu_idle().
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      87f79d88
    • Heiko Carstens's avatar
      s390/idle: mark arch_cpu_idle() noinstr · a9cbc1b4
      Heiko Carstens authored
      linux-next commit ("cpuidle: tracing: Warn about !rcu_is_watching()")
      adds a new warning which hits on s390's arch_cpu_idle() function:
      
      RCU not on for: arch_cpu_idle+0x0/0x28
      WARNING: CPU: 2 PID: 0 at include/linux/trace_recursion.h:162 arch_ftrace_ops_list_func+0x24c/0x258
      Modules linked in:
      CPU: 2 PID: 0 Comm: swapper/2 Not tainted 6.2.0-rc6-next-20230202 #4
      Hardware name: IBM 8561 T01 703 (z/VM 7.3.0)
      Krnl PSW : 0404d00180000000 00000000002b55c0 (arch_ftrace_ops_list_func+0x250/0x258)
                 R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:1 PM:0 RI:0 EA:3
      Krnl GPRS: c0000000ffffbfff 0000000080000002 0000000000000026 0000000000000000
                 0000037ffffe3a28 0000037ffffe3a20 0000000000000000 0000000000000000
                 0000000000000000 0000000000f4acf6 00000000001044f0 0000037ffffe3cb0
                 0000000000000000 0000000000000000 00000000002b55bc 0000037ffffe3bb8
      Krnl Code: 00000000002b55b0: c02000840051        larl    %r2,0000000001335652
                 00000000002b55b6: c0e5fff512d1        brasl   %r14,0000000000157b58
                #00000000002b55bc: af000000            mc      0,0
                >00000000002b55c0: a7f4ffe7            brc     15,00000000002b558e
                 00000000002b55c4: 0707                bcr     0,%r7
                 00000000002b55c6: 0707                bcr     0,%r7
                 00000000002b55c8: eb6ff0480024        stmg    %r6,%r15,72(%r15)
                 00000000002b55ce: b90400ef            lgr     %r14,%r15
      Call Trace:
       [<00000000002b55c0>] arch_ftrace_ops_list_func+0x250/0x258
      ([<00000000002b55bc>] arch_ftrace_ops_list_func+0x24c/0x258)
       [<0000000000f5f0fc>] ftrace_common+0x1c/0x20
       [<00000000001044f6>] arch_cpu_idle+0x6/0x28
       [<0000000000f4acf6>] default_idle_call+0x76/0x128
       [<00000000001cc374>] do_idle+0xf4/0x1b0
       [<00000000001cc6ce>] cpu_startup_entry+0x36/0x40
       [<0000000000119d00>] smp_start_secondary+0x140/0x150
       [<0000000000f5d2ae>] restart_int_handler+0x6e/0x90
      
      Mark arch_cpu_idle() noinstr like all other architectures with
      CONFIG_ARCH_WANTS_NO_INSTR (should) have it to fix this.
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      a9cbc1b4
    • Heiko Carstens's avatar
      s390/idle: move idle time accounting to account_idle_time_irq() · c0101629
      Heiko Carstens authored
      There is no reason to do idle time accounting in arch_cpu_idle().
      Do idle time accounting in account_idle_time_irq(), where it belongs
      to. The accounted values don't change between account_idle_time_irq() and
      arch_cpu_idle(); so the result is the same.
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      c0101629
    • Heiko Carstens's avatar
      740d63b5
  2. 06 Feb, 2023 23 commits
  3. 31 Jan, 2023 6 commits
  4. 30 Jan, 2023 2 commits