1. 18 Sep, 2021 6 commits
    • Ravi Bangoria's avatar
      perf annotate: Fix fused instr logic for assembly functions · 7efbcc8c
      Ravi Bangoria authored
      Some x86 microarchitectures fuse a subset of cmp/test/ALU instructions
      with branch instructions, and thus perf annotate highlight such valid
      pairs as fused.
      
      When annotated with source, perf uses struct disasm_line to contain
      either source or instruction line from objdump output. Usually, a C
      statement generates multiple instructions which include such
      cmp/test/ALU + branch instruction pairs. But in case of assembly
      function, each individual assembly source line generate one
      instruction.
      
      The 'perf annotate' instruction fusion logic assumes the previous
      disasm_line as the previous instruction line, which is wrong because,
      for assembly function, previous disasm_line contains source line.  And
      thus perf fails to highlight valid fused instruction pairs for assembly
      functions.
      
      Fix it by searching backward until we find an instruction line and
      consider that disasm_line as fused with current branch instruction.
      
      Before:
               │    cmpq    %rcx, RIP+8(%rsp)
          0.00 │      cmp    %rcx,0x88(%rsp)
               │    je      .Lerror_bad_iret      <--- Source line
          0.14 │   ┌──je     b4                   <--- Instruction line
               │   │movl    %ecx, %eax
      
      After:
               │    cmpq    %rcx, RIP+8(%rsp)
          0.00 │   ┌──cmp    %rcx,0x88(%rsp)
               │   │je      .Lerror_bad_iret
          0.14 │   ├──je     b4
               │   │movl    %ecx, %eax
      Reviewed-by: default avatarJin Yao <yao.jin@linux.intel.com>
      Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@amd.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kim Phillips <kim.phillips@amd.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https //lore.kernel.org/r/20210911043854.8373-1-ravi.bangoria@amd.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7efbcc8c
    • Linus Torvalds's avatar
      Merge tag 's390-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 93ff9f13
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix potential out-of-range access during secure boot facility
         detection.
      
       - Fully validate the VMA before calling follow_pte() in pci code.
      
       - Remove arch specific WARN_DYNAMIC_STACK config option.
      
       - Fix zcrypto kernel doc comments.
      
       - Update defconfigs.
      
      * tag 's390-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: remove WARN_DYNAMIC_STACK
        s390/ap: fix kernel doc comments
        s390: update defconfigs
        s390/sclp: fix Secure-IPL facility detection
        s390/pci_mmio: fully validate the VMA before calling follow_pte()
      93ff9f13
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · d1a88690
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Revert fw_devlink tracking 'phy-handle' links. This broke at least a
         few platforms. A better solution is being worked on.
      
       - Add Samsung UFS binding which fell thru the cracks
      
       - Doc reference fixes from Mauro
      
       - Fix for restricted DMA error handling
      
      * tag 'devicetree-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: arm: Fix Toradex compatible typo
        of: restricted dma: Fix condition for rmem init
        dt-bindings: arm: mediatek: mmsys: update mediatek,mmsys.yaml reference
        dt-bindings: net: dsa: sja1105: update nxp,sja1105.yaml reference
        dt-bindings: ufs: Add bindings for Samsung ufs host
        Revert "of: property: fw_devlink: Add support for "phy-handle" property"
      d1a88690
    • Linus Torvalds's avatar
      tgafb: clarify dependencies · cd395d52
      Linus Torvalds authored
      The TGA boards were based on the DECchip 21030 PCI graphics accelerator
      used mainly for alpha, and existed in a TURBOchannel (TC) version for
      the DECstation (MIPS) workstations.
      
      However, the config option for the TGA code is a bit confused, and says
      
      	depends on FB && (ALPHA || TC)
      
      because people didn't really want to enable the option for random PCI
      environments, so the "ALPHA" stands in for that case (while the TC case
      is then the MIPS DECstation case).
      
      So that config dependency is kind of a mixture of architecture and bus
      choices.  But it's incorrect, in that there were non-PCI-based alpha
      hardware, and then the driver just causes warnings:
      
        drivers/video/fbdev/tgafb.c:1532:13: error: ‘tgafb_unregister’ defined but not used [-Werror=unused-function]
         1532 | static void tgafb_unregister(struct device *dev)
              |             ^~~~~~~~~~~~~~~~
        drivers/video/fbdev/tgafb.c:1387:12: error: ‘tgafb_register’ defined but not used [-Werror=unused-function]
         1387 | static int tgafb_register(struct device *dev)
              |            ^~~~~~~~~~~~~~
      
      so let's make the config option dependencies a bit more explict:
      
      	depends on FB
      	depends on PCI || TC
      	depends on ALPHA || TC
      
      where that first "FB" is the software configuration dependency, the
      second "PCI || TC" is the hardware bus dependency, while that final
      "ALPHA || TC" dependency is the "don't bother asking except for these
      situations.
      
      We could make that third case have "COMPILE_TEST" as an option, and mark
      the register/unregister functions as __maybe_unused, but I'm not sure
      it's really worth it.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd395d52
    • Linus Torvalds's avatar
      alpha: make 'Jensen' IO functions build again · cc9d3aaa
      Linus Torvalds authored
      The Jensen IO functions are overly copmplicated because some of the IO
      addresses refer to special 'local IO' ports, and they get accessed
      differently.
      
      That then makes gcc not actually inline them, and since they were marked
      "extern inline" when included through the regular <asm/io.h> path, and
      then only marked "inline" when included from sys_jensen.c, you never
      necessarily got a body for the IO functions at all.
      
      The intent of the sys_jensen.c code is to actually get the non-inlined
      copy generated, so remove the 'inline' from the magic macro that is
      supposed to sort this all out.
      
      Also, do not mix 'extern inline' functions (that may or may not be
      inlined and will not generate a function body if they are not) with
      'static inline' (that _will_ generate a function body when not inlined).
      Because gcc will complain about this situation:
      
         error: ‘jensen_bus_outb’ is static but used in inline function ‘jensen_outb’ which is not static
      
      because gcc basically doesn't know whether to generate a body for that
      static inline function or not for that call site.
      
      So make all of these use that __EXTERN_INLINE marker.  Gcc will
      generally not inline these things on use, and then generate the function
      body out-of-line in sys_jensen.c.
      
      This makes the core IO functions build for the alpha Jensen config.
      
      Not that the rest then builds, because it turns out Jensen also doesn't
      enable PCI, which then makes other drievrs very unhappy, but that's a
      separate issue.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cc9d3aaa
    • Linus Torvalds's avatar
      spi: Fix tegra20 build with CONFIG_PM=n · efafec27
      Linus Torvalds authored
      Without CONFIG_PM enabled, the SET_RUNTIME_PM_OPS() macro ends up being
      empty, and the only use of tegra_slink_runtime_{resume,suspend} goes
      away, resulting in
      
        drivers/spi/spi-tegra20-slink.c:1200:12: error: ‘tegra_slink_runtime_resume’ defined but not used [-Werror=unused-function]
         1200 | static int tegra_slink_runtime_resume(struct device *dev)
              |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/spi/spi-tegra20-slink.c:1188:12: error: ‘tegra_slink_runtime_suspend’ defined but not used [-Werror=unused-function]
         1188 | static int tegra_slink_runtime_suspend(struct device *dev)
              |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      mark the functions __maybe_unused to make the build happy.
      
      This hits the alpha allmodconfig build (and others).
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      efafec27
  2. 17 Sep, 2021 12 commits
  3. 16 Sep, 2021 22 commits