summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-17 09:23:59 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-02-19 09:59:38 +0100
commit801b5d80325dbd3e92218271d54e75f389da7136 (patch)
treed804e85db347bafd1c7b52b086beff7b6d61c170 /cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S
parentscore: Move SMP interrupt stack initialization (diff)
downloadrtems-801b5d80325dbd3e92218271d54e75f389da7136.tar.bz2
powerpc: Change interrupt disable implemetation
Instead of SPRG0 (= special purpose register 272) use the new global symbol _PPC_INTERRUPT_DISABLE_MASK to store the interrupt disable mask. The benefit is that it is now possible to disable interrupts without further run-time initialization in boot_card(). At least on Freescale e500 cores this leads also to a faster execution since the mfmsr and mfspr instruction require four cycles to complete. The instructions to load the mask value can execute while the mfmsr is in progress.
Diffstat (limited to 'cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S')
-rw-r--r--cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S b/cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S
new file mode 100644
index 0000000000..4784b65b7e
--- /dev/null
+++ b/cpukit/score/cpu/powerpc/ppc-isr-disable-mask.S
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/asm.h>
+#include <rtems/score/cpu.h>
+
+.global _PPC_INTERRUPT_DISABLE_MASK
+.weak _PPC_INTERRUPT_DISABLE_MASK
+.set _PPC_INTERRUPT_DISABLE_MASK, PPC_INTERRUPT_DISABLE_MASK_DEFAULT