Skip to content
  1. Feb 03, 2022
  2. Feb 02, 2022
    • Matt Roper's avatar
      drm/i915: Only include i915_reg.h from .c files · ce2fce25
      Matt Roper authored
      
      
      Several of our i915 header files, have been including i915_reg.h.  This
      means that any change to i915_reg.h will trigger a full rebuild of
      pretty much every file of the driver, even those that don't have any
      kind of register access.  Let's delete the i915_reg.h include from all
      headers and add an explicit include from the .c files that truly
      need the register definitions; those that need a definition of
      i915_reg_t for a function definition can get it from i915_reg_defs.h
      instead.
      
      We also remove two non-register #define's (VLV_DISPLAY_BASE and
      GEN12_SFC_DONE_MAX) into i915_reg_defs.h to allow us to drop the
      i915_reg.h include from a couple of headers.
      
      There's probably a lot more header dependency optimization possible, but
      the changes here roughly cut the number of files compiled after 'touch
      i915_reg.h' in half --- a good first step.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-7-matthew.d.roper@intel.com
      ce2fce25
    • Matt Roper's avatar
      drm/i915: Move GT registers to their own header file · 0d6419e9
      Matt Roper authored
      
      
      This is a huge, chaotic mass of registers copied over as-is without any
      real cleanup.  We'll come back and organize these better, align on
      consistent coding style, remove dead code, etc. in separate patches
      later that will be easier to review.
      
      v2:
       - Add missing include in intel_pxp_irq.c
      v3:
       - Correct a few indentation errors (Lucas)
       - Minor conflict resolution
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-6-matthew.d.roper@intel.com
      0d6419e9
    • Matt Roper's avatar
      drm/i915: Parameterize MI_PREDICATE registers · e71a7412
      Matt Roper authored
      
      
      The various MI_PREDICATE registers have per-engine instances.  Today we
      only utilize the RCS0 instance of each, but that will likely change in
      the future; switch to parameterized register definitions to make these
      easier to work with going forward.
      
      Of special note is MI_PREDICATE_RESULT_2; we only use it in one place in
      the driver today in HSW-specific code.  It turns out that the bspec
      (page 94) lists two different offsets for this register on HSW; one is
      in the standard location shared by all other platforms (base + 0x3bc)
      and the other is an unusual location (0x2214).  We're using the second,
      non-standard offset in i915 today; that offset doesn't exist on any
      other platforms (and it's not even 100% clear that it's correct for HSW)
      so I've renamed the current non-standard definition to
      HSW_MI_PREDICATE_RESULT_2; the new cross-platform parameterized macro
      (which is still unused at the moment) uses the standard offset.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-5-matthew.d.roper@intel.com
      e71a7412
    • Matt Roper's avatar
      drm/i915: Parameterize R_PWR_CLK_STATE register definition · 7d296f36
      Matt Roper authored
      
      
      At the moment we only use R_PWR_CLK_STATE in the context of the RCS
      engine, but upcoming support for compute engines will start using
      instances relative to the CCS engine base offsets.  Let's parameterize
      the register and move it to the engine reg header.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-4-matthew.d.roper@intel.com
      7d296f36
    • Matt Roper's avatar
      drm/i915/perf: Express OA register ranges with i915_range · 66a19a3a
      Matt Roper authored
      
      
      Let's use 'struct i915_range' to express sets of b-counter and mux
      registers in the perf code.  This makes the code more similar to how we
      handle things like multicast register ranges, forcewake tables, shadow
      tables, etc. and also lets us avoid needing symbolic register name
      definitions for the various range end points.  With this change, many of
      the OA register definitions are no longer used in the code, so we can
      drop their #define's for simplicity.
      
      v2:  Drop 'inline' from reg_in_range_table().  (Jani)
      
      v3:  Split the first range in gen12_oa_mux_regs[] so that 0xd08 isn't
           whitelisted.  (Umesh)
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-3-matthew.d.roper@intel.com
      66a19a3a
    • Matt Roper's avatar
      drm/i915/perf: Move OA regs to their own header · 2ef6d3bf
      Matt Roper authored
      
      
      The OA unit registers are only used by the perf code; move them to their
      own header file.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220127234334.4016964-2-matthew.d.roper@intel.com
      2ef6d3bf
    • Jani Nikula's avatar
      drm/i915: remove VGA register definitions · 72be4584
      Jani Nikula authored
      
      
      The only user of the VGA registers has switched to using the definitions
      in linux/vga.h, so these have become redundant. Remove them.
      
      Suggested-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202112509.1886660-2-jani.nikula@intel.com
      72be4584
    • Jani Nikula's avatar
      drm/i915/vga: switch to use VGA definitions from video/vga.h · f0bb41fa
      Jani Nikula authored
      
      
      The video/vga.h has macros for the VGA registers. Switch to use them.
      
      v2: Use direct 0x01 instead of the confusing VGA_SEQ_CLOCK_MODE (Ville)
      
      Suggested-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202112509.1886660-1-jani.nikula@intel.com
      f0bb41fa
  3. Feb 01, 2022
  4. Jan 30, 2022
    • Linus Torvalds's avatar
      Linux 5.17-rc2 · 26291c54
      Linus Torvalds authored
      v5.17-rc2
      26291c54
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c5fe9de7
      Linus Torvalds authored
      Pull irq fixes from Borislav Petkov:
      
       - Drop an unused private data field in the AIC driver
      
       - Various fixes to the realtek-rtl driver
      
       - Make the GICv3 ITS driver compile again in !SMP configurations
      
       - Force reset of the GICv3 ITSs at probe time to avoid issues during kexec
      
       - Yet another kfree/bitmap_free conversion
      
       - Various DT updates (Renesas, SiFive)
      
      * tag 'irq_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples
        dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts
        dt-bindings: irqchip: renesas-irqc: Add R-Car V3U support
        irqchip/gic-v3-its: Reset each ITS's BASERn register before probe
        irqchip/gic-v3-its: Fix build for !SMP
        irqchip/loongson-pch-ms: Use bitmap_free() to free bitmap
        irqchip/realtek-rtl: Service all pending interrupts
        irqchip/realtek-rtl: Fix off-by-one in routing
        irqchip/realtek-rtl: Map control data to virq
        irqchip/apple-aic: Drop unused ipi_hwirq field
      c5fe9de7
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 27a96c4f
      Linus Torvalds authored
      Pull perf fixes from Borislav Petkov:
      
       - Prevent accesses to the per-CPU cgroup context list from another CPU
         except the one it belongs to, to avoid list corruption
      
       - Make sure parent events are always woken up to avoid indefinite hangs
         in the traced workload
      
      * tag 'perf_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Fix cgroup event list management
        perf: Always wake the parent event
      27a96c4f
    • Linus Torvalds's avatar
      Merge tag 'sched_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 24f4db1f
      Linus Torvalds authored
      Pull scheduler fix from Borislav Petkov:
       "Make sure the membarrier-rseq fence commands are part of the reported
        set when querying membarrier(2) commands through MEMBARRIER_CMD_QUERY"
      
      * tag 'sched_urgent_for_v5.17_rc2_p2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/membarrier: Fix membarrier-rseq fence command missing from query bitmask
      24f4db1f
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.17_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a96d3a5b
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Add another Intel CPU model to the list of CPUs supporting the
         processor inventory unique number
      
       - Allow writing to MCE thresholding sysfs files again - a previous
         change had accidentally disabled it and no one noticed. Goes to show
         how much is this stuff used
      
      * tag 'x86_urgent_for_v5.17_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Add Xeon Icelake-D to list of CPUs that support PPIN
        x86/MCE/AMD: Allow thresholding interface updates after init
      a96d3a5b
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 8dd71685
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "12 patches.
      
        Subsystems affected by this patch series: sysctl, binfmt, ia64, mm
        (memory-failure, folios, kasan, and psi), selftests, and ocfs2"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        ocfs2: fix a deadlock when commit trans
        jbd2: export jbd2_journal_[grab|put]_journal_head
        psi: fix "defined but not used" warnings when CONFIG_PROC_FS=n
        psi: fix "no previous prototype" warnings when CONFIG_CGROUPS=n
        mm, kasan: use compare-exchange operation to set KASAN page tag
        kasan: test: fix compatibility with FORTIFY_SOURCE
        tools/testing/scatterlist: add missing defines
        mm: page->mapping folio->mapping should have the same offset
        memory-failure: fetch compound_head after pgmap_pfn_valid()
        ia64: make IA64_MCA_RECOVERY bool instead of tristate
        binfmt_misc: fix crash when load/unload module
        include/linux/sysctl.h: fix register_sysctl_mount_point() return type
      8dd71685
    • Joseph Qi's avatar
      ocfs2: fix a deadlock when commit trans · ddf4b773
      Joseph Qi authored
      commit 6f1b2285 introduces a regression which can deadlock as
      follows:
      
        Task1:                              Task2:
        jbd2_journal_commit_transaction     ocfs2_test_bg_bit_allocatable
        spin_lock(&jh->b_state_lock)        jbd_lock_bh_journal_head
        __jbd2_journal_remove_checkpoint    spin_lock(&jh->b_state_lock)
        jbd2_journal_put_journal_head
        jbd_lock_bh_journal_head
      
      Task1 and Task2 lock bh->b_state and jh->b_state_lock in different
      order, which finally result in a deadlock.
      
      So use jbd2_journal_[grab|put]_journal_head instead in
      ocfs2_test_bg_bit_allocatable() to fix it.
      
      Link: https://lkml.kernel.org/r/20220121071205.100648-3-joseph.qi@linux.alibaba.com
      Fixes: 6f1b2285
      
       ("ocfs2: fix race between searching chunks and release journal_head from buffer_head")
      Signed-off-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Reported-by: default avatarGautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
      Tested-by: default avatarGautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
      Reported-by: default avatarSaeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Jun Piao <piaojun@huawei.com>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ddf4b773
    • Joseph Qi's avatar
      jbd2: export jbd2_journal_[grab|put]_journal_head · 4cd1103d
      Joseph Qi authored
      
      
      Patch series "ocfs2: fix a deadlock case".
      
      This fixes a deadlock case in ocfs2.  We firstly export jbd2 symbols
      jbd2_journal_[grab|put]_journal_head as preparation and later use them
      in ocfs2 insread of jbd_[lock|unlock]_bh_journal_head to fix the
      deadlock.
      
      This patch (of 2):
      
      This exports symbols jbd2_journal_[grab|put]_journal_head, which will be
      used outside modules, e.g.  ocfs2.
      
      Link: https://lkml.kernel.org/r/20220121071205.100648-2-joseph.qi@linux.alibaba.com
      Signed-off-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Junxiao Bi <junxiao.bi@oracle.com>
      Cc: Changwei Ge <gechangwei@live.cn>
      Cc: Gang He <ghe@suse.com>
      Cc: Jun Piao <piaojun@huawei.com>
      Cc: Andreas Dilger <adilger.kernel@dilger.ca>
      Cc: Gautham Ananthakrishna <gautham.ananthakrishna@oracle.com>
      Cc: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4cd1103d