This seems pretty generic. Is there no suitable existing function?
Could irqs_disabled_flags() be pressed into service? I guess it depends
on how ia64 (and other architectures) can get the saved flags state from
the interrupt context.
It's not possible to put this somewhere it could be an inline function?
It might be better to make it an out of line function then.
J
--