Subject: Re: question about x86 spllower()
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Charles M. Hannum <abuse@spamalicious.com>
List: port-i386
Date: 12/16/2004 22:33:54
On Thursday 16 December 2004 22:14, Manuel Bouyer wrote:
> Hi,
> while trying to get current/xen working again I found something that
> I don't understannd in the x86 spllower() function:
>
>         struct cpu_info *ci = curcpu();
>         u_int32_t imask;
>         u_long psl;
>
>         __insn_barrier();
>
>         imask = IUNMASK(ci, nlevel);
>         psl = read_psl();
>         disable_intr();
>         if (ci->ci_ipending & imask) {
>                 Xspllower(nlevel);
>                 /* Xspllower does enable_intr() */
>         } else {
>                 ci->ci_ilevel = nlevel;
>                 write_psl(psl);
>         }
>
> What will do enable_intr() when Xspllower() is not called ?

The interrupt flag is in the "PSL", and therefore will get restored to its 
initial value by the write_psl().