#define NR_CPU_IRQS 32 /* number of irq lines coming in */ #define TIMER0_IRQ 3 /* Fixed by ISA */
/* * Early Hardware specific Interrupt setup * -Platform independent, needed for each CPU (not foldable into init_IRQ) * -Called very early (start_kernel -> setup_arch -> setup_processor) * * what it does ? * -Optionally, setup the High priority Interrupts as Level 2 IRQs
*/ void arc_init_IRQ(void)
{ unsignedint level_mask = 0, i;
/* Is timer high priority Interrupt (Level2 in ARCompact jargon) */
level_mask |= IS_ENABLED(CONFIG_ARC_COMPACT_IRQ_LEVELS) << TIMER0_IRQ;
/* * Write to register, even if no LV2 IRQs configured to reset it * in case bootloader had mucked with it
*/
write_aux_reg(AUX_IRQ_LEV, level_mask);
if (level_mask)
pr_info("Level-2 interrupts bitset %x\n", level_mask);
/* * Disable all IRQ lines so faulty external hardware won't * trigger interrupt that kernel is not ready to handle.
*/ for (i = TIMER0_IRQ; i < NR_CPU_IRQS; i++) { unsignedint ienb;
/* * ARC700 core includes a simple on-chip intc supporting * -per IRQ enable/disable * -2 levels of interrupts (high/low) * -all interrupts being level triggered * * To reduce platform code, we assume all IRQs directly hooked-up into intc. * Platforms with external intc, hence cascaded IRQs, are free to over-ride * below, per IRQ.
*/
/* * arch_local_irq_enable - Enable interrupts. * * 1. Explicitly called to re-enable interrupts * 2. Implicitly called from spin_unlock_irq, write_unlock_irq etc * which maybe in hard ISR itself * * Semantics of this function change depending on where it is called from: * * -If called from hard-ISR, it must not invert interrupt priorities * e.g. suppose TIMER is high priority (Level 2) IRQ * Time hard-ISR, timer_interrupt( ) calls spin_unlock_irq several times. * Here local_irq_enable( ) shd not re-enable lower priority interrupts * -If called from soft-ISR, it must re-enable all interrupts * soft ISR are low priority jobs which can be very slow, thus all IRQs * must be enabled while they run. * Now hardware context wise we may still be in L2 ISR (not done rtie) * still we must re-enable both L1 and L2 IRQs * Another twist is prev scenario with flow being * L1 ISR ==> interrupted by L2 ISR ==> L2 soft ISR * here we must not re-enable Ll as prev Ll Interrupt's h/w context will get * over-written (this is deficiency in ARC700 Interrupt mechanism)
*/
#ifdef CONFIG_ARC_COMPACT_IRQ_LEVELS /* Complex version for 2 IRQ levels */
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.