]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/preempt: mark all functions __always_inline
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 20 Mar 2024 22:47:49 +0000 (23:47 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 3 Apr 2024 13:00:20 +0000 (15:00 +0200)
commitc9c260681f521e4ad9f9f4cc71fe35b978e06222
treea9a4ff0b4395d595204870a6856586b1daa2c7b3
parent01cac82ae02b43983173ea8e475a1c999edd25a6
s390/preempt: mark all functions __always_inline

preempt_count-related functions are quite ubiquitous and may be called
by noinstr ones, introducing unwanted instrumentation. Here is one
example call chain:

  irqentry_nmi_enter()  # noinstr
    lockdep_hardirqs_enabled()
      this_cpu_read()
        __pcpu_size_call_return()
          this_cpu_read_*()
            this_cpu_generic_read()
              __this_cpu_generic_read_nopreempt()
                preempt_disable_notrace()
                  __preempt_count_inc()
                    __preempt_count_add()

They are very small, so there are no significant downsides to
force-inlining them.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20240320230007.4782-3-iii@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/preempt.h