/* GIC_Vx_SMASK - Set local interrupt mask bits */
GIC_VX_ACCESSOR_RW(32, 0x010, smask)
/* GIC_Vx_*_MAP - Route local interrupts to the desired pins */
GIC_VX_ACCESSOR_RW_INTR_REG(32, 0x040, 0x4, map)
/* GIC_Vx_WD_MAP - Route the local watchdog timer interrupt */
GIC_VX_ACCESSOR_RW(32, 0x040, wd_map)
/* GIC_Vx_COMPARE_MAP - Route the local count/compare interrupt */
GIC_VX_ACCESSOR_RW(32, 0x044, compare_map)
/* GIC_Vx_TIMER_MAP - Route the local CPU timer (cp0 count/compare) interrupt */
GIC_VX_ACCESSOR_RW(32, 0x048, timer_map)
/* GIC_Vx_FDC_MAP - Route the local fast debug channel interrupt */
GIC_VX_ACCESSOR_RW(32, 0x04c, fdc_map)
/* GIC_Vx_PERFCTR_MAP - Route the local performance counter interrupt */
GIC_VX_ACCESSOR_RW(32, 0x050, perfctr_map)
/* GIC_Vx_SWINT0_MAP - Route the local software interrupt 0 */
GIC_VX_ACCESSOR_RW(32, 0x054, swint0_map)
/* GIC_Vx_SWINT1_MAP - Route the local software interrupt 1 */
GIC_VX_ACCESSOR_RW(32, 0x058, swint1_map)
/* GIC_Vx_OTHER - Configure access to other Virtual Processor registers */
GIC_VX_ACCESSOR_RW(32, 0x080, other) #define GIC_VX_OTHER_VPNUM GENMASK(5, 0)
/* GIC_Vx_IDENT - Retrieve the local Virtual Processor's ID */
GIC_VX_ACCESSOR_RO(32, 0x088, ident) #define GIC_VX_IDENT_VPNUM GENMASK(5, 0)
/* GIC_Vx_COMPARE - Value to compare with GIC_SH_COUNTER */
GIC_VX_ACCESSOR_RW(64, 0x0a0, compare)
/* GIC_Vx_EIC_SHADOW_SET_BASE - Set shadow register set for each interrupt */
GIC_VX_ACCESSOR_RW_INTR_REG(32, 0x100, 0x4, eic_shadow_set)
/** * enum mips_gic_local_interrupt - GIC local interrupts * @GIC_LOCAL_INT_WD: GIC watchdog timer interrupt * @GIC_LOCAL_INT_COMPARE: GIC count/compare interrupt * @GIC_LOCAL_INT_TIMER: CP0 count/compare interrupt * @GIC_LOCAL_INT_PERFCTR: Performance counter interrupt * @GIC_LOCAL_INT_SWINT0: Software interrupt 0 * @GIC_LOCAL_INT_SWINT1: Software interrupt 1 * @GIC_LOCAL_INT_FDC: Fast debug channel interrupt * @GIC_NUM_LOCAL_INTRS: The number of local interrupts * * Enumerates interrupts provided by the GIC that are local to a VP.
*/ enum mips_gic_local_interrupt {
GIC_LOCAL_INT_WD,
GIC_LOCAL_INT_COMPARE,
GIC_LOCAL_INT_TIMER,
GIC_LOCAL_INT_PERFCTR,
GIC_LOCAL_INT_SWINT0,
GIC_LOCAL_INT_SWINT1,
GIC_LOCAL_INT_FDC,
GIC_NUM_LOCAL_INTRS
};
/** * mips_gic_present() - Determine whether a GIC is present * * Determines whether a MIPS Global Interrupt Controller (GIC) is present in * the system that the kernel is running on. * * Return true if a GIC is present, else false.
*/ staticinlinebool mips_gic_present(void)
{ return IS_ENABLED(CONFIG_MIPS_GIC) && mips_gic_base;
}
/** * mips_gic_vx_map_reg() - Return GIC_Vx_<intr>_MAP register offset * @intr: A GIC local interrupt * * Determine the index of the GIC_VL_<intr>_MAP or GIC_VO_<intr>_MAP register * within the block of GIC map registers. This is almost the same as the order * of interrupts in the pending & mask registers, as used by enum * mips_gic_local_interrupt, but moves the FDC interrupt & thus offsets the * interrupts after it... * * Return: The map register index corresponding to @intr. * * The return value is suitable for use with the (read|write)_gic_v[lo]_map * accessor functions.
*/ staticinlineunsignedint
mips_gic_vx_map_reg(enum mips_gic_local_interrupt intr)
{ /* WD, Compare & Timer are 1:1 */ if (intr <= GIC_LOCAL_INT_TIMER) return intr;
/* FDC moves to after Timer... */ if (intr == GIC_LOCAL_INT_FDC) return GIC_LOCAL_INT_TIMER + 1;
/* As a result everything else is offset by 1 */ return intr + 1;
}
/** * gic_get_c0_compare_int() - Return cp0 count/compare interrupt virq * * Determine the virq number to use for the coprocessor 0 count/compare * interrupt, which may be routed via the GIC. * * Returns the virq number or a negative error number.
*/ externint gic_get_c0_compare_int(void);
/** * gic_get_c0_perfcount_int() - Return performance counter interrupt virq * * Determine the virq number to use for CPU performance counter interrupts, * which may be routed via the GIC. * * Returns the virq number or a negative error number.
*/ externint gic_get_c0_perfcount_int(void);
/** * gic_get_c0_fdc_int() - Return fast debug channel interrupt virq * * Determine the virq number to use for fast debug channel (FDC) interrupts, * which may be routed via the GIC. * * Returns the virq number or a negative error number.
*/ externint gic_get_c0_fdc_int(void);
#endif/* __MIPS_ASM_MIPS_CPS_H__ */
Messung V0.5
¤ Dauer der Verarbeitung: 0.17 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.