1. 12 9月, 2019 1 次提交
  2. 15 8月, 2019 1 次提交
  3. 06 8月, 2019 1 次提交
  4. 02 8月, 2019 5 次提交
  5. 04 7月, 2019 1 次提交
  6. 14 6月, 2019 2 次提交
  7. 12 6月, 2019 1 次提交
  8. 30 4月, 2019 1 次提交
  9. 25 4月, 2019 1 次提交
  10. 06 3月, 2019 1 次提交
  11. 23 2月, 2019 1 次提交
  12. 12 2月, 2019 1 次提交
  13. 06 2月, 2019 1 次提交
  14. 16 1月, 2019 1 次提交
  15. 15 1月, 2019 3 次提交
  16. 05 8月, 2018 1 次提交
    • N
      x86: Don't include linux/irq.h from asm/hardirq.h · 447ae316
      Nicolai Stange 提交于
      The next patch in this series will have to make the definition of
      irq_cpustat_t available to entering_irq().
      
      Inclusion of asm/hardirq.h into asm/apic.h would cause circular header
      dependencies like
      
        asm/smp.h
          asm/apic.h
            asm/hardirq.h
              linux/irq.h
                linux/topology.h
                  linux/smp.h
                    asm/smp.h
      
      or
      
        linux/gfp.h
          linux/mmzone.h
            asm/mmzone.h
              asm/mmzone_64.h
                asm/smp.h
                  asm/apic.h
                    asm/hardirq.h
                      linux/irq.h
                        linux/irqdesc.h
                          linux/kobject.h
                            linux/sysfs.h
                              linux/kernfs.h
                                linux/idr.h
                                  linux/gfp.h
      
      and others.
      
      This causes compilation errors because of the header guards becoming
      effective in the second inclusion: symbols/macros that had been defined
      before wouldn't be available to intermediate headers in the #include chain
      anymore.
      
      A possible workaround would be to move the definition of irq_cpustat_t
      into its own header and include that from both, asm/hardirq.h and
      asm/apic.h.
      
      However, this wouldn't solve the real problem, namely asm/harirq.h
      unnecessarily pulling in all the linux/irq.h cruft: nothing in
      asm/hardirq.h itself requires it. Also, note that there are some other
      archs, like e.g. arm64, which don't have that #include in their
      asm/hardirq.h.
      
      Remove the linux/irq.h #include from x86' asm/hardirq.h.
      
      Fix resulting compilation errors by adding appropriate #includes to *.c
      files as needed.
      
      Note that some of these *.c files could be cleaned up a bit wrt. to their
      set of #includes, but that should better be done from separate patches, if
      at all.
      Signed-off-by: NNicolai Stange <nstange@suse.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      447ae316
  17. 05 6月, 2018 1 次提交
  18. 18 4月, 2018 1 次提交
  19. 11 4月, 2018 1 次提交
  20. 16 3月, 2018 1 次提交
    • T
      drm/i915/pmu: Work around compiler warnings on some kernel configs · 22de4e7a
      Tvrtko Ursulin 提交于
      Arnd Bergman reports:
      """
      The conditional spinlock confuses gcc into thinking the 'flags' value
      might contain uninitialized data:
      
      drivers/gpu/drm/i915/i915_pmu.c: In function '__i915_pmu_event_read':
      arch/x86/include/asm/paravirt_types.h:573:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      The code is correct, but it's easy to see how the compiler gets confused
      here. This avoids the problem by pulling the lock outside of the function
      into its only caller.
      """
      
      On deeper look it seems this is caused by paravirt spinlocks
      implementation when CONFIG_PARAVIRT_DEBUG is set, which by being
      complicated, manages to convince gcc locked parameter can be changed
      externally (impossible).
      
      Work around it by removing the conditional locking parameters altogether.
      (It was never the most elegant code anyway.)
      
      Slight penalty we now pay is an additional irqsave spin lock/unlock cycle
      on the event enable path. But since enable is not a fast path, that is
      preferrable to the alternative solution which was doing MMIO under irqsave
      spinlock.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 1fe699e3 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout")
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180314080535.17490-1-tvrtko.ursulin@linux.intel.com
      (cherry picked from commit ad055fb8)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      22de4e7a
  21. 15 3月, 2018 1 次提交
    • T
      drm/i915/pmu: Work around compiler warnings on some kernel configs · ad055fb8
      Tvrtko Ursulin 提交于
      Arnd Bergman reports:
      """
      The conditional spinlock confuses gcc into thinking the 'flags' value
      might contain uninitialized data:
      
      drivers/gpu/drm/i915/i915_pmu.c: In function '__i915_pmu_event_read':
      arch/x86/include/asm/paravirt_types.h:573:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      The code is correct, but it's easy to see how the compiler gets confused
      here. This avoids the problem by pulling the lock outside of the function
      into its only caller.
      """
      
      On deeper look it seems this is caused by paravirt spinlocks
      implementation when CONFIG_PARAVIRT_DEBUG is set, which by being
      complicated, manages to convince gcc locked parameter can be changed
      externally (impossible).
      
      Work around it by removing the conditional locking parameters altogether.
      (It was never the most elegant code anyway.)
      
      Slight penalty we now pay is an additional irqsave spin lock/unlock cycle
      on the event enable path. But since enable is not a fast path, that is
      preferrable to the alternative solution which was doing MMIO under irqsave
      spinlock.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 1fe699e3 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout")
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180314080535.17490-1-tvrtko.ursulin@linux.intel.com
      ad055fb8
  22. 10 3月, 2018 1 次提交
  23. 14 2月, 2018 3 次提交
  24. 08 2月, 2018 1 次提交
  25. 07 2月, 2018 1 次提交
    • T
      drm/i915/pmu: Fix sleep under atomic in RC6 readout · 1fe699e3
      Tvrtko Ursulin 提交于
      We are not allowed to call intel_runtime_pm_get from the PMU counter read
      callback since the former can sleep, and the latter is running under IRQ
      context.
      
      To workaround this, we record the last known RC6 and while runtime
      suspended estimate its increase by querying the runtime PM core
      timestamps.
      
      Downside of this approach is that we can temporarily lose a chunk of RC6
      time, from the last PMU read-out to runtime suspend entry, but that will
      eventually catch up, once device comes back online and in the presence of
      PMU queries.
      
      Also, we have to be careful not to overshoot the RC6 estimate, so once
      resumed after a period of approximation, we only update the counter once
      it catches up. With the observation that RC6 is increasing while the
      device is suspended, this should not pose a problem and can only cause
      slight inaccuracies due clock base differences.
      
      v2: Simplify by estimating on top of PM core counters. (Imre)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104943
      Fixes: 6060b6ae ("drm/i915/pmu: Add RC6 residency metrics")
      Testcase: igt/perf_pmu/rc6-runtime-pm
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180206183311.17924-1-tvrtko.ursulin@linux.intel.com
      1fe699e3
  26. 06 2月, 2018 1 次提交
    • T
      drm/i915/pmu: Fix PMU enable vs execlists tasklet race · b2f78cda
      Tvrtko Ursulin 提交于
      Commit 99e48bf9 ("drm/i915: Lock out execlist tasklet while peeking
      inside for busy-stats") added a tasklet_disable call in busy stats
      enabling, but we failed to understand that the PMU enable callback runs
      as an hard IRQ (IPI).
      
      Consequence of this is that the PMU enable callback can interrupt the
      execlists tasklet, and will then deadlock when it calls
      intel_engine_stats_enable->tasklet_disable.
      
      To fix this, I realized it is possible to move the engine stats enablement
      and disablement to PMU event init and destroy hooks. This allows for much
      simpler implementation since those hooks run in normal context (can
      sleep).
      
      v2: Extract engine_event_destroy. (Chris Wilson)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Fixes: 99e48bf9 ("drm/i915: Lock out execlist tasklet while peeking inside for busy-stats")
      Testcase: igt/perf_pmu/enable-race-*
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180205093448.13877-1-tvrtko.ursulin@linux.intel.com
      b2f78cda
  27. 24 1月, 2018 1 次提交
  28. 13 1月, 2018 2 次提交
  29. 11 1月, 2018 2 次提交