1. 10 Mar, 2022 3 commits
    • Vasily Gorbik's avatar
      s390/nospec: add an option to use thunk-extern · 1d2ad084
      Vasily Gorbik authored
      Currently with -mindirect-branch=thunk and -mfunction-return=thunk compiler
      options expoline thunks are put into individual COMDAT group sections. s390
      is the only architecture which has group sections and it has implications
      for kpatch and objtool tools support.
      
      Using -mindirect-branch=thunk-extern and -mfunction-return=thunk-extern
      is an alternative, which comes with a need to generate all required
      expoline thunks manually. Unfortunately modules area is too far away from
      the kernel image, and expolines from the kernel image cannon be used.
      But since all new distributions (except Debian) build kernels for machine
      generations newer than z10, where "exrl" instruction is available, that
      leaves only 16 expolines thunks possible.
      
      Provide an option to build the kernel with
      -mindirect-branch=thunk-extern and -mfunction-return=thunk-extern for
      z10 or newer. This also requires to postlink expoline thunks into all
      modules explicitly. Currently modules already contain most expolines
      anyhow.
      
      Unfortunately -mindirect-branch=thunk-extern and
      -mfunction-return=thunk-extern options support is broken in gcc <= 11.2.
      Additional compile test is required to verify proper gcc support.
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Co-developed-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Signed-off-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      1d2ad084
    • Vasily Gorbik's avatar
      s390/nospec: generate single register thunks if possible · eed38cd2
      Vasily Gorbik authored
      Currently assembler generated expoline thunks are always in a form
      __s390_indirect_jump_rXuse_rX even when exrl instruction is available
      and no additional register is utilized.
      
      Generate __s390_indirect_jump_rX versions using a single register if the
      kernel is built for z10 or newer machine, which have exrl instruction
      available. Thunks generated are identical to the ones generated by the
      compiler.
      
      This helps to reduce the number of thunks for newer machines generations.
      Acked-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
      Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      eed38cd2
    • Niklas Schnelle's avatar
      s390/pci: make zpci_set_irq()/zpci_clear_irq() static · 6c2797cd
      Niklas Schnelle authored
      Commit c1e18c17 ("s390/pci: add zpci_set_irq()/zpci_clear_irq()")
      made zpci_set_irq()/zpci_clear_irq() non-static in preparation for using
      them in zpci_hot_reset_device(). The version of zpci_hot_reset_device()
      that was finally merged however exploits the fact that IRQs and DMA is
      implicitly disabled by clp_disable_fh() so the call to zpci_clear_irq()
      was never added. There are no other calls outside pci_irq.c so lets make
      both functions static.
      Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      6c2797cd
  2. 07 Mar, 2022 24 commits
  3. 01 Mar, 2022 13 commits