ARC: Entry Handler tweaks: Optimize away redundant IRQ_DISABLE_SAVE
authorVineet Gupta <vgupta@synopsys.com>
Tue, 9 Jul 2013 11:36:40 +0000 (17:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 May 2014 11:59:42 +0000 (13:59 +0200)
commit27dd47db1ba11a6f34d158a7dfa4c5bd78f81d1f
tree4795921fc8e077cd80e6095b787fe5ae6ebe6a2a
parent1a43738d057559e87e0036e25c33715d6eff11ed
ARC: Entry Handler tweaks: Optimize away redundant IRQ_DISABLE_SAVE

commit fce16bc35ae4a45634f3dc348d8d297a25c277cf upstream.

In the exception return path, for both U/K cases, intr are already
disabled (for various existing reasons). So when we drop down to
@restore_regs, we need not redo that.

There was subtle issue - when intr were NOT being disabled for
ret-to-kernel-but-no-preemption case - now fixed by moving the
IRQ_DISABLE further up in @resume_kernel_mode.

So what do we gain:

* Shaves off a few insn in return path.

* Eliminates the need for IRQ_DISABLE_SAVE assembler macro for ARCv2
  hence allows for entry code sharing.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arc/include/asm/irqflags.h
arch/arc/kernel/entry.S