@@ -1926,24 +1926,31 @@ __unclaimed_previous_reg_debug(struct intel_uncore *uncore,
1926
1926
}
1927
1927
1928
1928
static inline void
1929
- unclaimed_reg_debug (struct intel_uncore * uncore ,
1930
- const i915_reg_t reg ,
1931
- const bool read ,
1932
- const bool before )
1929
+ unclaimed_reg_debug_header (struct intel_uncore * uncore ,
1930
+ const i915_reg_t reg , const bool read )
1933
1931
{
1934
1932
if (likely (!uncore -> i915 -> params .mmio_debug ) || !uncore -> debug )
1935
1933
return ;
1936
1934
1937
1935
/* interrupts are disabled and re-enabled around uncore->lock usage */
1938
1936
lockdep_assert_held (& uncore -> lock );
1939
1937
1940
- if (before ) {
1941
- spin_lock (& uncore -> debug -> lock );
1942
- __unclaimed_previous_reg_debug (uncore , reg , read );
1943
- } else {
1944
- __unclaimed_reg_debug (uncore , reg , read );
1945
- spin_unlock (& uncore -> debug -> lock );
1946
- }
1938
+ spin_lock (& uncore -> debug -> lock );
1939
+ __unclaimed_previous_reg_debug (uncore , reg , read );
1940
+ }
1941
+
1942
+ static inline void
1943
+ unclaimed_reg_debug_footer (struct intel_uncore * uncore ,
1944
+ const i915_reg_t reg , const bool read )
1945
+ {
1946
+ if (likely (!uncore -> i915 -> params .mmio_debug ) || !uncore -> debug )
1947
+ return ;
1948
+
1949
+ /* interrupts are disabled and re-enabled around uncore->lock usage */
1950
+ lockdep_assert_held (& uncore -> lock );
1951
+
1952
+ __unclaimed_reg_debug (uncore , reg , read );
1953
+ spin_unlock (& uncore -> debug -> lock );
1947
1954
}
1948
1955
1949
1956
#define __vgpu_read (x ) \
@@ -2004,10 +2011,10 @@ __gen2_read(64)
2004
2011
u##x val = 0; \
2005
2012
assert_rpm_wakelock_held(uncore->rpm); \
2006
2013
spin_lock_irqsave(&uncore->lock, irqflags); \
2007
- unclaimed_reg_debug (uncore, reg, true , true)
2014
+ unclaimed_reg_debug_header (uncore, reg, true)
2008
2015
2009
2016
#define GEN6_READ_FOOTER \
2010
- unclaimed_reg_debug (uncore, reg, true, false ); \
2017
+ unclaimed_reg_debug_footer (uncore, reg, true); \
2011
2018
spin_unlock_irqrestore(&uncore->lock, irqflags); \
2012
2019
trace_i915_reg_rw(false, reg, val, sizeof(val), trace); \
2013
2020
return val
@@ -2108,10 +2115,10 @@ __gen2_write(32)
2108
2115
trace_i915_reg_rw(true, reg, val, sizeof(val), trace); \
2109
2116
assert_rpm_wakelock_held(uncore->rpm); \
2110
2117
spin_lock_irqsave(&uncore->lock, irqflags); \
2111
- unclaimed_reg_debug (uncore, reg, false, true )
2118
+ unclaimed_reg_debug_header (uncore, reg, false)
2112
2119
2113
2120
#define GEN6_WRITE_FOOTER \
2114
- unclaimed_reg_debug (uncore, reg, false , false); \
2121
+ unclaimed_reg_debug_footer (uncore, reg, false); \
2115
2122
spin_unlock_irqrestore(&uncore->lock, irqflags)
2116
2123
2117
2124
#define __gen6_write (x ) \
0 commit comments