mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
powerpc: Replace mfmsr instructions with load from PACA kernel_msr field
On 64-bit, the mfmsr instruction can be quite slow, slower than loading a field from the cache-hot PACA, which happens to already contain the value we want in most cases. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
9424fabf86
commit
d9ada91ae2
4 changed files with 10 additions and 15 deletions
|
@ -68,8 +68,8 @@ static inline bool arch_irqs_disabled(void)
|
|||
#define __hard_irq_enable() asm volatile("wrteei 1" : : : "memory");
|
||||
#define __hard_irq_disable() asm volatile("wrteei 0" : : : "memory");
|
||||
#else
|
||||
#define __hard_irq_enable() __mtmsrd(mfmsr() | MSR_EE, 1)
|
||||
#define __hard_irq_disable() __mtmsrd(mfmsr() & ~MSR_EE, 1)
|
||||
#define __hard_irq_enable() __mtmsrd(local_paca->kernel_msr | MSR_EE, 1)
|
||||
#define __hard_irq_disable() __mtmsrd(local_paca->kernel_msr, 1)
|
||||
#endif
|
||||
|
||||
#define hard_irq_disable() \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue