Skip to content
  1. Mar 01, 2022
  2. Feb 23, 2022
    • Maxime Ripard's avatar
      drm/edid: Always set RGB444 · ecbd4912
      Maxime Ripard authored
      In order to fill the drm_display_info structure each time an EDID is
      read, the code currently will call drm_add_display_info with the parsed
      EDID.
      
      drm_add_display_info will then call drm_reset_display_info to reset all
      the fields to 0, and then set them to the proper value depending on the
      EDID.
      
      In the color_formats case, we will thus report that we don't support any
      color format, and then fill it back with RGB444 plus the additional
      formats described in the EDID Feature Support byte.
      
      However, since that byte only contains format-related bits since the 1.4
      specification, this doesn't happen if the EDID is following an earlier
      specification. In turn, it means that for one of these EDID, we end up
      with color_formats set to 0.
      
      The EDID 1.3 specification never really specifies what it means by RGB
      exactly, but since both HDMI and DVI will use RGB444, it's fairly safe
      to assume it's supposed to be RGB444.
      
      Let's move the addition of RGB444 to color_formats earlier in
      drm_add_display_info() so that it's always set for a digital display.
      
      Fixes: da05a5a7
      
       ("drm: parse color format support for digital displays")
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reported-by: default avatarMatthias Reichl <hias@horus.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220203115416.1137308-1-maxime@cerno.tech
      ecbd4912
    • Christian König's avatar
      drm/radeon: fix variable type · f762ce78
      Christian König authored
      
      
      When we switch to dma_resv_wait_timeout() the returned type changes as
      well.
      
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Fixes: 89aae41d
      
       ("drm/radeon: use dma_resv_wait_timeout() instead of manually waiting")
      Bug: https://bugzilla.kernel.org/show_bug.cgi?id=215600
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220221110503.2803-1-christian.koenig@amd.com
      f762ce78
  3. Feb 18, 2022
  4. Feb 16, 2022
  5. Feb 12, 2022
    • Robin Murphy's avatar
      drm/cma-helper: Set VM_DONTEXPAND for mmap · 59f39bfa
      Robin Murphy authored
      drm_gem_cma_mmap() cannot assume every implementation of dma_mmap_wc()
      will end up calling remap_pfn_range() (which happens to set the relevant
      vma flag, among others), so in order to make sure expectations around
      VM_DONTEXPAND are met, let it explicitly set the flag like most other
      GEM mmap implementations do.
      
      This avoids repeated warnings on a small minority of systems where the
      display is behind an IOMMU, and has a simple driver which does not
      override drm_gem_cma_default_funcs. Arm hdlcd is an in-tree affected
      driver. Out-of-tree, the Apple DCP driver is affected; this fix is
      required for DCP to be mainlined.
      
      [Alyssa: Update commit message.]
      
      Fixes: c40069cb
      
       ("drm: add mmap() to drm_gem_object_funcs")
      Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211013143654.39031-1-alyssa@rosenzweig.io
      59f39bfa
  6. Feb 09, 2022
    • Brian Norris's avatar
      drm/rockchip: vop: Correct RK3399 VOP register fields · 9da1e9ab
      Brian Norris authored
      Commit 7707f722 ("drm/rockchip: Add support for afbc") switched up
      the rk3399_vop_big[] register windows, but it did so incorrectly.
      
      The biggest problem is in rk3288_win23_data[] vs.
      rk3368_win23_data[] .format field:
      
        RK3288's format: VOP_REG(RK3288_WIN2_CTRL0, 0x7, 1)
        RK3368's format: VOP_REG(RK3368_WIN2_CTRL0, 0x3, 5)
      
      Bits 5:6 (i.e., shift 5, mask 0x3) are correct for RK3399, according to
      the TRM.
      
      There are a few other small differences between the 3288 and 3368
      definitions that were swapped in commit 7707f722. I reviewed them to
      the best of my ability according to the RK3399 TRM and fixed them up.
      
      This fixes IOMMU issues (and display errors) when testing with BG24
      color formats.
      
      Fixes: 7707f722
      
       ("drm/rockchip: Add support for afbc")
      Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Tested-by: default avatarAndrzej Pietrasiewicz <andrzej.p@collabora.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220119161104.1.I1d01436bef35165a8cdfe9308789c0badb5ff46a@changeid
      9da1e9ab
    • Sascha Hauer's avatar
      drm/rockchip: dw_hdmi: Do not leave clock enabled in error case · c0cfbb12
      Sascha Hauer authored
      
      
      The driver returns an error when devm_phy_optional_get() fails leaving
      the previously enabled clock turned on. Change order and enable the
      clock only after the phy has been acquired.
      
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220126145549.617165-3-s.hauer@pengutronix.de
      c0cfbb12
  7. Feb 08, 2022
    • Daniel Vetter's avatar
      MAINTAINERS: Add entry for fbdev core · db405774
      Daniel Vetter authored
      
      
      Ever since Tomi extracted the core code in 2014 it's been defacto me
      maintaining this, with help from others from dri-devel and sometimes
      Linus (but those are mostly merge conflicts):
      
      $ git shortlog -ns  drivers/video/fbdev/core/ | head -n5
          35  Daniel Vetter
          23  Linus Torvalds
          10  Hans de Goede
           9  Dave Airlie
           6  Peter Rosin
      
      I think ideally we'd also record that the various firmware fb drivers
      (efifb, vesafb, ...) are also maintained in drm-misc because for the
      past few years the patches have either been to fix handover issues
      with drm drivers, or caused handover issues with drm drivers. So any
      other tree just doesn't make sense. But also, there's plenty of
      outdated MAINTAINER entries for these with people and git trees that
      haven't been active in years, so maybe let's just leave them alone.
      And furthermore distros are now adopting simpledrm as the firmware fb
      driver, so hopefully the need to care about the fbdev firmware drivers
      will go down going forward.
      
      Note that drm-misc is group maintained, I expect that to continue like
      we've done before, so no new expectations that patches all go through
      my hands. That would be silly. This also means I'm happy to put any
      other volunteer's name in the M: line, but otherwise git log says I'm
      the one who's stuck with this.
      
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Acked-by: default avatarDaniel Stone <daniels@collabora.com>
      Acked-by: default avatarDave Airlie <airlied@redhat.com>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarGreg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Cc: Dave Airlie <airlied@gmail.com>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Acked-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Acked-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
      Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Linux Fbdev development list <linux-fbdev@vger.kernel.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Javier Martinez Canillas <javierm@redhat.com>
      Cc: DRI Development <dri-devel@lists.freedesktop.org>
      Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
      Cc: Claudio Suarez <cssk@net-c.es>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Sven Schnelle <svens@stackframe.org>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220131210552.482606-2-daniel.vetter@ffwll.ch
      db405774
    • Helge Deller's avatar
      fbcon: Avoid 'cap' set but not used warning · 50b10528
      Helge Deller authored
      Fix this kernel test robot warning:
      
        drivers/video/fbdev/core/fbcon.c: In function 'fbcon_init':
        drivers/video/fbdev/core/fbcon.c:1028:6: warning: variable 'cap' set but not used [-Wunused-but-set-variable]
      
      The cap variable is only used when CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION
      is enabled. Drop the temporary variable and use info->flags instead.
      
      Fixes: 87ab9f6b
      
       ("Revert "fbcon: Disable accelerated scrolling")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/YgFB4xqI+As196FR@p100
      50b10528
  8. Feb 07, 2022
  9. Feb 06, 2022
  10. Feb 03, 2022
  11. Feb 02, 2022
    • Helge Deller's avatar
      fbcon: Add option to enable legacy hardware acceleration · a3f781a9
      Helge Deller authored
      
      
      Add a config option CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION to
      enable bitblt and fillrect hardware acceleration in the framebuffer
      console. If disabled, such acceleration will not be used, even if it is
      supported by the graphics hardware driver.
      
      If you plan to use DRM as your main graphics output system, you should
      disable this option since it will prevent compiling in code which isn't
      used later on when DRM takes over.
      
      For all other configurations, e.g. if none of your graphic cards support
      DRM (yet), DRM isn't available for your architecture, or you can't be
      sure that the graphic card in the target system will support DRM, you
      most likely want to enable this option.
      
      In the non-accelerated case (e.g. when DRM is used), the inlined
      fb_scrollmode() function is hardcoded to return SCROLL_REDRAW and as such the
      compiler is able to optimize much unneccesary code away.
      
      In this v3 patch version I additionally changed the GETVYRES() and GETVXRES()
      macros to take a pointer to the fbcon_display struct. This fixes the build when
      console rotation is enabled and helps the compiler again to optimize out code.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org # v5.10+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-4-deller@gmx.de
      a3f781a9
    • Helge Deller's avatar
      Revert "fbcon: Disable accelerated scrolling" · 87ab9f6b
      Helge Deller authored
      This reverts commit 39aead83.
      
      Revert the first (of 2) commits which disabled scrolling acceleration in
      fbcon/fbdev.  It introduced a regression for fbdev-supported graphic cards
      because of the performance penalty by doing screen scrolling by software
      instead of using the existing graphic card 2D hardware acceleration.
      
      Console scrolling acceleration was disabled by dropping code which
      checked at runtime the driver hardware capabilities for the
      BINFO_HWACCEL_COPYAREA or FBINFO_HWACCEL_FILLRECT flags and if set, it
      enabled scrollmode SCROLL_MOVE which uses hardware acceleration to move
      screen contents.  After dropping those checks scrollmode was hard-wired
      to SCROLL_REDRAW instead, which forces all graphic cards to redraw every
      character at the new screen position when scrolling.
      
      This change effectively disabled all hardware-based scrolling acceleration for
      ALL drivers, because now all kind of 2D hardware acceleration (bitblt,
      fillrect) in the drivers isn't used any longer.
      
      The original commit message mentions that only 3 DRM drivers (nouveau, omapdrm
      and gma500) used hardware acceleration in the past and thus code for checking
      and using scrolling acceleration is obsolete.
      
      This statement is NOT TRUE, because beside the DRM drivers there are around 35
      other fbdev drivers which depend on fbdev/fbcon and still provide hardware
      acceleration for fbdev/fbcon.
      
      The original commit message also states that syzbot found lots of bugs in fbcon
      and thus it's "often the solution to just delete code and remove features".
      This is true, and the bugs - which actually affected all users of fbcon,
      including DRM - were fixed, or code was dropped like e.g. the support for
      software scrollback in vgacon (commit 973c096f
      
      ).
      
      So to further analyze which bugs were found by syzbot, I've looked through all
      patches in drivers/video which were tagged with syzbot or syzkaller back to
      year 2005. The vast majority fixed the reported issues on a higher level, e.g.
      when screen is to be resized, or when font size is to be changed. The few ones
      which touched driver code fixed a real driver bug, e.g. by adding a check.
      
      But NONE of those patches touched code of either the SCROLL_MOVE or the
      SCROLL_REDRAW case.
      
      That means, there was no real reason why SCROLL_MOVE had to be ripped-out and
      just SCROLL_REDRAW had to be used instead. The only reason I can imagine so far
      was that SCROLL_MOVE wasn't used by DRM and as such it was assumed that it
      could go away. That argument completely missed the fact that SCROLL_MOVE is
      still heavily used by fbdev (non-DRM) drivers.
      
      Some people mention that using memcpy() instead of the hardware acceleration is
      pretty much the same speed. But that's not true, at least not for older graphic
      cards and machines where we see speed decreases by factor 10 and more and thus
      this change leads to console responsiveness way worse than before.
      
      That's why the original commit is to be reverted. By reverting we
      reintroduce hardware-based scrolling acceleration and fix the
      performance regression for fbdev drivers.
      
      There isn't any impact on DRM when reverting those patches.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarSven Schnelle <svens@stackframe.org>
      Cc: stable@vger.kernel.org # v5.10+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-3-deller@gmx.de
      87ab9f6b
    • Helge Deller's avatar
      Revert "fbdev: Garbage collect fbdev scrolling acceleration, part 1 (from TODO list)" · 1148836f
      Helge Deller authored
      This reverts commit b3ec8cdf.
      
      Revert the second (of 2) commits which disabled scrolling acceleration
      in fbcon/fbdev.  It introduced a regression for fbdev-supported graphic
      cards because of the performance penalty by doing screen scrolling by
      software instead of using the existing graphic card 2D hardware
      acceleration.
      
      Console scrolling acceleration was disabled by dropping code which
      checked at runtime the driver hardware capabilities for the
      BINFO_HWACCEL_COPYAREA or FBINFO_HWACCEL_FILLRECT flags and if set, it
      enabled scrollmode SCROLL_MOVE which uses hardware acceleration to move
      screen contents.  After dropping those checks scrollmode was hard-wired
      to SCROLL_REDRAW instead, which forces all graphic cards to redraw every
      character at the new screen position when scrolling.
      
      This change effectively disabled all hardware-based scrolling acceleration for
      ALL drivers, because now all kind of 2D hardware acceleration (bitblt,
      fillrect) in the drivers isn't used any longer.
      
      The original commit message mentions that only 3 DRM drivers (nouveau, omapdrm
      and gma500) used hardware acceleration in the past and thus code for checking
      and using scrolling acceleration is obsolete.
      
      This statement is NOT TRUE, because beside the DRM drivers there are around 35
      other fbdev drivers which depend on fbdev/fbcon and still provide hardware
      acceleration for fbdev/fbcon.
      
      The original commit message also states that syzbot found lots of bugs in fbcon
      and thus it's "often the solution to just delete code and remove features".
      This is true, and the bugs - which actually affected all users of fbcon,
      including DRM - were fixed, or code was dropped like e.g. the support for
      software scrollback in vgacon (commit 973c096f
      
      ).
      
      So to further analyze which bugs were found by syzbot, I've looked through all
      patches in drivers/video which were tagged with syzbot or syzkaller back to
      year 2005. The vast majority fixed the reported issues on a higher level, e.g.
      when screen is to be resized, or when font size is to be changed. The few ones
      which touched driver code fixed a real driver bug, e.g. by adding a check.
      
      But NONE of those patches touched code of either the SCROLL_MOVE or the
      SCROLL_REDRAW case.
      
      That means, there was no real reason why SCROLL_MOVE had to be ripped-out and
      just SCROLL_REDRAW had to be used instead. The only reason I can imagine so far
      was that SCROLL_MOVE wasn't used by DRM and as such it was assumed that it
      could go away. That argument completely missed the fact that SCROLL_MOVE is
      still heavily used by fbdev (non-DRM) drivers.
      
      Some people mention that using memcpy() instead of the hardware acceleration is
      pretty much the same speed. But that's not true, at least not for older graphic
      cards and machines where we see speed decreases by factor 10 and more and thus
      this change leads to console responsiveness way worse than before.
      
      That's why the original commit is to be reverted. By reverting we
      reintroduce hardware-based scrolling acceleration and fix the
      performance regression for fbdev drivers.
      
      There isn't any impact on DRM when reverting those patches.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarSven Schnelle <svens@stackframe.org>
      Cc: stable@vger.kernel.org # v5.16+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-2-deller@gmx.de
      1148836f
  12. Feb 01, 2022
  13. Jan 28, 2022
    • Anitha Chrisanthus's avatar
      drm/kmb: Fix for build errors with Warray-bounds · 43f25179
      Anitha Chrisanthus authored
      This fixes the following build error
      
      drivers/gpu/drm/kmb/kmb_plane.c: In function 'kmb_plane_atomic_disable':
      drivers/gpu/drm/kmb/kmb_plane.c:165:34: error: array subscript 3 is above array bounds of 'struct layer_status[2]' [-Werror=array-bounds]
        165 |                 kmb->plane_status[plane_id].ctrl =
        LCD_CTRL_GL2_ENABLE;
        |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~
        In file included from drivers/gpu/drm/kmb/kmb_plane.c:17:
        drivers/gpu/drm/kmb/kmb_drv.h:61:41: note: while referencing 'plane_status'
        61 |         struct layer_status  plane_status[KMB_MAX_PLANES];
        |                                         ^~~~~~~~~~~~
        drivers/gpu/drm/kmb/kmb_plane.c:162:34: error: array subscript 2 is above array bounds of 'struct layer_status[2]' [-Werror=array-bounds]
        162 |  kmb->plane_status[plane_id].ctrl =  LCD_CTRL_GL1_ENABLE;
        |                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~
        In file included from
        drivers/gpu/drm/kmb/kmb_plane.c:17:
        drivers/gpu/drm/kmb/kmb_drv.h:61:41: note: while referencing 'plane_status'
        61 |         struct layer_status  plane_status[KMB_MAX_PLANES];
        |
        ^~~~~~~~~~~~
      
      Fixes: 7f7b96a8
      
       ("drm/kmb: Add support for KeemBay Display")
      Signed-off-by: default avatarAnitha Chrisanthus <anitha.chrisanthus@intel.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127194227.2213608-1-anitha.chrisanthus@intel.com
      43f25179
  14. Jan 26, 2022
  15. Jan 25, 2022
    • Manasi Navare's avatar
      drm/atomic: Add the crtc to affected crtc only if uapi.enable = true · 5ec1cebd
      Manasi Navare authored
      In case of a modeset where a mode gets split across multiple CRTCs
      in the driver specific implementation (bigjoiner in i915) we wrongly count
      the affected CRTCs based on the drm_crtc_mask and indicate the stolen CRTC as
      an affected CRTC in atomic_check_only().
      This triggers a warning since affected CRTCs doent match requested CRTC.
      
      To fix this in such bigjoiner configurations, we should only
      increment affected crtcs if that CRTC is enabled in UAPI not
      if it is just used internally in the driver to split the mode.
      
      v3: Add the same uapi crtc_state->enable check in requested
      crtc calc (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Simon Ser <contact@emersion.fr>
      Cc: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
      Cc: Daniel Stone <daniels@collabora.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.11+
      Fixes: 919c2299
      
       ("drm/i915: Enable bigjoiner")
      Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211004115913.23889-1-manasi.d.navare@intel.com
      5ec1cebd
  16. Jan 23, 2022
    • Linus Torvalds's avatar
      Linux 5.17-rc1 · e783362e
      Linus Torvalds authored
      e783362e
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.17-2022-01-22' of... · 40c84321
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.17-2022-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Fix printing 'phys_addr' in 'perf script'.
      
       - Fix failure to add events with 'perf probe' in ppc64 due to not
         removing leading dot (ppc64 ABIv1).
      
       - Fix cpu_map__item() python binding building.
      
       - Support event alias in form foo-bar-baz, add pmu-events and
         parse-event tests for it.
      
       - No need to setup affinities when starting a workload or attaching to
         a pid.
      
       - Use path__join() to compose a path instead of ad-hoc snprintf()
         equivalent.
      
       - Override attr->sample_period for non-libpfm4 events.
      
       - Use libperf cpumap APIs instead of accessing the internal state
         directly.
      
       - Sync x86 arch prctl headers and files changed by the new
         set_mempolicy_home_node syscall with the kernel sources.
      
       - Remove duplicate include in cpumap.h.
      
       - Remove redundant err variable.
      
      * tag 'perf-tools-for-v5.17-2022-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Remove redundant err variable
        perf test: Add parse-events test for aliases with hyphens
        perf test: Add pmu-events test for aliases with hyphens
        perf parse-events: Support event alias in form foo-bar-baz
        perf evsel: Override attr->sample_period for non-libpfm4 events
        perf cpumap: Remove duplicate include in cpumap.h
        perf cpumap: Migrate to libperf cpumap api
        perf python: Fix cpu_map__item() building
        perf script: Fix printing 'phys_addr' failure issue
        tools headers UAPI: Sync files changed by new set_mempolicy_home_node syscall
        tools headers UAPI: Sync x86 arch prctl headers with the kernel sources
        perf machine: Use path__join() to compose a path instead of snprintf(dir, '/', filename)
        perf evlist: No need to setup affinities when disabling events for pid targets
        perf evlist: No need to setup affinities when enabling events for pid targets
        perf stat: No need to setup affinities when starting a workload
        perf affinity: Allow passing a NULL arg to affinity__cleanup()
        perf probe: Fix ppc64 'perf probe add events failed' case
      40c84321
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 67bfce0e
      Linus Torvalds authored
      Pull ftrace fix from Steven Rostedt:
       "Fix s390 breakage from sorting mcount tables.
      
        The latest merge of the tracing tree sorts the mcount table at build
        time. But s390 appears to do things differently (like always) and
        replaces the sorted table back to the original unsorted one. As the
        ftrace algorithm depends on it being sorted, bad things happen when it
        is not, and s390 experienced those bad things.
      
        Add a new config to tell the boot if the mcount table is sorted or
        not, and allow s390 to opt out of it"
      
      * tag 'trace-v5.17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix assuming build time sort works for s390
      67bfce0e
    • Steven Rostedt (Google)'s avatar
      ftrace: Fix assuming build time sort works for s390 · 6b9b6413
      Steven Rostedt (Google) authored
      To speed up the boot process, as mcount_loc needs to be sorted for ftrace
      to work properly, sorting it at build time is more efficient than boot up
      and can save milliseconds of time. Unfortunately, this change broke s390
      as it will modify the mcount_loc location after the sorting takes place
      and will put back the unsorted locations. Since the sorting is skipped at
      boot up if it is believed that it was sorted at run time, ftrace can crash
      as its algorithms are dependent on the list being sorted.
      
      Add a new config BUILDTIME_MCOUNT_SORT that is set when
      BUILDTIME_TABLE_SORT but not if S390 is set. Use this config to determine
      if sorting should take place at boot up.
      
      Link: https://lore.kernel.org/all/yt9dee51ctfn.fsf@linux.ibm.com/
      
      Fixes: 72b3942a
      
       ("scripts: ftrace - move the sort-processing in ftrace_init")
      Reported-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Tested-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      6b9b6413
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.17' of... · 473aec0e
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Bring include/uapi/linux/nfc.h into the UAPI compile-test coverage
      
       - Revert the workaround of CONFIG_CC_IMPLICIT_FALLTHROUGH
      
       - Fix build errors in certs/Makefile
      
      * tag 'kbuild-fixes-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        certs: Fix build error when CONFIG_MODULE_SIG_KEY is empty
        certs: Fix build error when CONFIG_MODULE_SIG_KEY is PKCS#11 URI
        Revert "Makefile: Do not quote value for CONFIG_CC_IMPLICIT_FALLTHROUGH"
        usr/include/Makefile: add linux/nfc.h to the compile-test coverage
      473aec0e
    • Linus Torvalds's avatar
      Merge tag 'bitmap-5.17-rc1' of git://github.com/norov/linux · 3689f9f8
      Linus Torvalds authored
      Pull bitmap updates from Yury Norov:
      
       - introduce for_each_set_bitrange()
      
       - use find_first_*_bit() instead of find_next_*_bit() where possible
      
       - unify for_each_bit() macros
      
      * tag 'bitmap-5.17-rc1' of git://github.com/norov/linux:
        vsprintf: rework bitmap_list_string
        lib: bitmap: add performance test for bitmap_print_to_pagebuf
        bitmap: unify find_bit operations
        mm/percpu: micro-optimize pcpu_is_populated()
        Replace for_each_*_bit_from() with for_each_*_bit() where appropriate
        find: micro-optimize for_each_{set,clear}_bit()
        include/linux: move for_each_bit() macros from bitops.h to find.h
        cpumask: replace cpumask_next_* with cpumask_first_* where appropriate
        tools: sync tools/bitmap with mother linux
        all: replace find_next{,_zero}_bit with find_first{,_zero}_bit where appropriate
        cpumask: use find_first_and_bit()
        lib: add find_first_and_bit()
        arch: remove GENERIC_FIND_FIRST_BIT entirely
        include: move find.h from asm_generic to linux
        bitops: move find_bit_*_le functions from le.h to find.h
        bitops: protect find_first_{,zero}_bit properly
      3689f9f8
    • Minghao Chi's avatar
      perf tools: Remove redundant err variable · f0ac5b85
      Minghao Chi authored
      
      
      Return value from perf_event__process_tracing_data() directly instead
      of taking this in another redundant variable.
      
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lore.kernel.org/lkml/20220112080109.666800-1-chi.minghao@zte.com.cn
      Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f0ac5b85
    • John Garry's avatar
      perf test: Add parse-events test for aliases with hyphens · b4a7276c
      John Garry authored
      
      
      Add a test which allows us to test parsing an event alias with hyphens.
      
      Since these events typically do not exist on most host systems, add the
      alias to the fake pmu.
      
      Function perf_pmu__test_parse_init() has terms added to match known test
      aliases.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi115@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/1642432215-234089-4-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b4a7276c
    • John Garry's avatar
      perf test: Add pmu-events test for aliases with hyphens · 34fa67e7
      John Garry authored
      
      
      Add a test for aliases with hyphens in the name to ensure that the
      pmu-events tables are as expects. There should be no reason why these sort
      of aliases would be treated differently, but no harm in checking.
      
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Qi Liu <liuqi115@huawei.com>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: linuxarm@huawei.com
      Link: https://lore.kernel.org/r/1642432215-234089-3-git-send-email-john.garry@huawei.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      34fa67e7