After some more thoughts it's obvious that we should do the return-PC-tweaking according to the "custom ie" flag in the ISR entry code rather than in the Kernel exit code, as the exit will go to another process than the one that was interrupted ans did set the flag. I don't know if that is more difficult than using the exit code (as blackfin does).