aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 5dd056df0baa..4379a079b3c2 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -730,6 +730,28 @@ static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)
730 mtspr(SPRN_DABRX, dabrx); 730 mtspr(SPRN_DABRX, dabrx);
731 return 0; 731 return 0;
732} 732}
733#elif defined(CONFIG_PPC_8xx)
734static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)
735{
736 unsigned long addr = dabr & ~HW_BRK_TYPE_DABR;
737 unsigned long lctrl1 = 0x90000000; /* compare type: equal on E & F */
738 unsigned long lctrl2 = 0x8e000002; /* watchpoint 1 on cmp E | F */
739
740 if ((dabr & HW_BRK_TYPE_RDWR) == HW_BRK_TYPE_READ)
741 lctrl1 |= 0xa0000;
742 else if ((dabr & HW_BRK_TYPE_RDWR) == HW_BRK_TYPE_WRITE)
743 lctrl1 |= 0xf0000;
744 else if ((dabr & HW_BRK_TYPE_RDWR) == 0)
745 lctrl2 = 0;
746
747 mtspr(SPRN_LCTRL2, 0);
748 mtspr(SPRN_CMPE, addr);
749 mtspr(SPRN_CMPF, addr + 4);
750 mtspr(SPRN_LCTRL1, lctrl1);
751 mtspr(SPRN_LCTRL2, lctrl2);
752
753 return 0;
754}
733#else 755#else
734static inline int __set_dabr(unsigned long dabr, unsigned long dabrx) 756static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)
735{ 757{