struct intel_uncore_mmio_debug {
spinlock_t lock; /** lock is also taken in irq contexts. */ int unclaimed_mmio_check; int saved_mmio_check;
u32 suspend_count;
};
spinlock_t lock; /** lock is also taken in irq contexts. */
/* * Do we need to apply an additional offset to reach the beginning * of the basic non-engine GT registers (referred to as "GSI" on * newer platforms, or "GT block" on older platforms)? If so, we'll * track that here and apply it transparently to registers in the * appropriate range to maintain compatibility with our existing * register definitions and GT code.
*/
u32 gsi_offset;
/* * Shadowed registers are special cases where we can safely write * to the register *without* grabbing forcewake.
*/ conststruct i915_range *shadowed_reg_table; unsignedint shadowed_reg_table_entries;
/* * Like above but the caller must manage the uncore.lock itself. * Must be used with intel_uncore_read_fw() and friends.
*/ void intel_uncore_forcewake_get__locked(struct intel_uncore *uncore, enum forcewake_domains domains); void intel_uncore_forcewake_put__locked(struct intel_uncore *uncore, enum forcewake_domains domains);
/* Be very careful with read/write 64-bit values. On 32-bit machines, they * will be implemented using 2 32-bit writes in an arbitrary order with * an arbitrary delay between them. This can cause the hardware to * act upon the intermediate value, possibly leading to corruption and * machine death. For this reason we do not support intel_uncore_write64, * or uncore->funcs.mmio_writeq. * * When reading a 64-bit value as two 32-bit values, the delay may cause * the two reads to mismatch, e.g. a timestamp overflowing. Also note that * occasionally a 64-bit register does not actually support a full readq * and must be read using two 32-bit reads. * * You have been warned.
*/
__uncore_read(read64, 64, q, true)
/* These are untraced mmio-accessors that are only valid to be used inside * critical sections, such as inside IRQ handlers, where forcewake is explicitly * controlled. * * Think twice, and think again, before using these. * * As an example, these accessors can possibly be used between: * * spin_lock_irq(&uncore->lock); * intel_uncore_forcewake_get__locked(); * * and * * intel_uncore_forcewake_put__locked(); * spin_unlock_irq(&uncore->lock); * * * Note: some registers may not need forcewake held, so * intel_uncore_forcewake_{get,put} can be omitted, see * intel_uncore_forcewake_for_reg(). * * Certain architectures will die if the same cacheline is concurrently accessed * by different clients (e.g. on Ivybridge). Access to registers should * therefore generally be serialised, by either the dev_priv->uncore.lock or * a more localised lock guarding all access to that bank of registers.
*/ #define intel_uncore_read_fw(...) __raw_uncore_read32(__VA_ARGS__) #define intel_uncore_write_fw(...) __raw_uncore_write32(__VA_ARGS__) #define intel_uncore_write64_fw(...) __raw_uncore_write64(__VA_ARGS__) #define intel_uncore_posting_read_fw(...) ((void)intel_uncore_read_fw(__VA_ARGS__))
/* * The raw_reg_{read,write} macros are intended as a micro-optimization for * interrupt handlers so that the pointer indirection on uncore->regs can * be computed once (and presumably cached in a register) instead of generating * extra load instructions for each MMIO access. * * Given that these macros are only intended for non-GSI interrupt registers * (and the goal is to avoid extra instructions generated by the compiler), * these macros do not account for uncore->gsi_offset. Any caller that needs * to use these macros on a GSI register is responsible for adding the * appropriate GSI offset to the 'base' parameter.
*/ #define raw_reg_read(base, reg) \
readl(base + i915_mmio_reg_offset(reg)) #define raw_reg_write(base, reg, value) \
writel(value, base + i915_mmio_reg_offset(reg))
#endif/* !__INTEL_UNCORE_H__ */
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.