diff options
author | Ian Munsie <imunsie@au1.ibm.com> | 2012-11-14 13:49:48 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-01-09 23:09:07 -0500 |
commit | fe9e1d54e3ea2e5134d7aaa233441f9229326ef6 (patch) | |
tree | b8347ea44bef6ad8c8a615a26a9a8124745f50f3 /arch/powerpc/kernel/entry_64.S | |
parent | 919ca8681f48ce81848c76f0ed66edb1bb99209b (diff) |
powerpc: Add code to handle soft-disabled doorbells on server
This patch adds the logic to properly handle doorbells that come in when
interrupts have been soft disabled and to replay them when interrupts
are re-enabled:
- masked_##_H##interrupt is modified to leave interrupts enabled when a
doorbell has come in since doorbells are edge sensitive and as such
won't be automatically re-raised.
- __check_irq_replay now tests if a doorbell happened on book3s, and
returns either 0xe80 or 0xa00 depending on whether we are the
hypervisor or not.
- restore_check_irq_replay now tests for the two possible server
doorbell vector numbers to replay.
- __replay_interrupt also adds tests for the two server doorbell vector
numbers, and is modified to use a compare instruction rather than an
andi. on the single bit difference between 0x500 and 0x900.
The last two use a CPU feature section to avoid needlessly testing
against the hypervisor vector if it is not the hypervisor, and vice
versa.
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index b310a0573625..73c1f083ba21 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -836,13 +836,22 @@ restore_check_irq_replay: | |||
836 | addi r3,r1,STACK_FRAME_OVERHEAD; | 836 | addi r3,r1,STACK_FRAME_OVERHEAD; |
837 | bl .timer_interrupt | 837 | bl .timer_interrupt |
838 | b .ret_from_except | 838 | b .ret_from_except |
839 | #ifdef CONFIG_PPC_DOORBELL | ||
840 | 1: | ||
839 | #ifdef CONFIG_PPC_BOOK3E | 841 | #ifdef CONFIG_PPC_BOOK3E |
840 | 1: cmpwi cr0,r3,0x280 | 842 | cmpwi cr0,r3,0x280 |
843 | #else | ||
844 | BEGIN_FTR_SECTION | ||
845 | cmpwi cr0,r3,0xe80 | ||
846 | FTR_SECTION_ELSE | ||
847 | cmpwi cr0,r3,0xa00 | ||
848 | ALT_FTR_SECTION_END_IFSET(CPU_FTR_HVMODE) | ||
849 | #endif /* CONFIG_PPC_BOOK3E */ | ||
841 | bne 1f | 850 | bne 1f |
842 | addi r3,r1,STACK_FRAME_OVERHEAD; | 851 | addi r3,r1,STACK_FRAME_OVERHEAD; |
843 | bl .doorbell_exception | 852 | bl .doorbell_exception |
844 | b .ret_from_except | 853 | b .ret_from_except |
845 | #endif /* CONFIG_PPC_BOOK3E */ | 854 | #endif /* CONFIG_PPC_DOORBELL */ |
846 | 1: b .ret_from_except /* What else to do here ? */ | 855 | 1: b .ret_from_except /* What else to do here ? */ |
847 | 856 | ||
848 | unrecov_restore: | 857 | unrecov_restore: |