Robin Getz wrote: > Normally - Before the first instruction in the interrupt vector starts > execution, IPEND[4] is set to disable all interrupts. This allows context > save to be atomic. It is cleared (higher priority interrupts enabled) when > the return address in RETI is saved ([--SP] = RETI). > > On context restore, popping RETI (RETI = [SP++]) will set IPEND[4], disabling > all interrupts. When the RTI instruction executes, it re-enables interrupts > by clearing IPEND[4]. > > But I didn't think that code that we write should be playing with that? - and > that we should be doing CLI/STI.
That's correct. The kernel uses CLI/STI to disable interrupts; the interrupt entry points switch over from IPEND[4] disable to CLI disable. See also this comment in interrupt.S: /* Common interrupt entry code. First we do CLI, then push * RETI, to keep interrupts disabled, but to allow this state to be changed * by local_bh_enable. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif _______________________________________________ Uclinux-dist-devel mailing list Uclinux-dist-devel@blackfin.uclinux.org https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel