aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-07-25 15:27:33 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-28 02:30:47 -0400
commit2325f0a0c3d76bb515f3312ab2b16afdbffcc594 (patch)
tree69386c213a02b0900054cdcfcaf4372c3ec31a3e /arch/powerpc/kernel/process.c
parentd3b060231b2e1eb7e7e9680ff93326a4ae576720 (diff)
powerpc/booke: Clean up the hardware watchpoint support
* CONFIG_BOOKE is selected by CONFIG_44x so we dont need both * Fixed a few comments * Go back to only using DBCR0_IDM to determine if we are using debug resources. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index db2497ccc111..e030f3bd5024 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -254,7 +254,7 @@ void do_dabr(struct pt_regs *regs, unsigned long address,
254 return; 254 return;
255 255
256 /* Clear the DAC and struct entries. One shot trigger */ 256 /* Clear the DAC and struct entries. One shot trigger */
257#if (defined(CONFIG_44x) || defined(CONFIG_BOOKE)) 257#if defined(CONFIG_BOOKE)
258 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | DBSR_DAC1W 258 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) & ~(DBSR_DAC1R | DBSR_DAC1W
259 | DBCR0_IDM)); 259 | DBCR0_IDM));
260#endif 260#endif
@@ -286,7 +286,7 @@ int set_dabr(unsigned long dabr)
286 mtspr(SPRN_DABR, dabr); 286 mtspr(SPRN_DABR, dabr);
287#endif 287#endif
288 288
289#if defined(CONFIG_44x) || defined(CONFIG_BOOKE) 289#if defined(CONFIG_BOOKE)
290 mtspr(SPRN_DAC1, dabr); 290 mtspr(SPRN_DAC1, dabr);
291#endif 291#endif
292 292
@@ -373,7 +373,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
373 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) 373 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
374 set_dabr(new->thread.dabr); 374 set_dabr(new->thread.dabr);
375 375
376#if defined(CONFIG_44x) || defined(CONFIG_BOOKE) 376#if defined(CONFIG_BOOKE)
377 /* If new thread DAC (HW breakpoint) is the same then leave it */ 377 /* If new thread DAC (HW breakpoint) is the same then leave it */
378 if (new->thread.dabr) 378 if (new->thread.dabr)
379 set_dabr(new->thread.dabr); 379 set_dabr(new->thread.dabr);
@@ -568,7 +568,7 @@ void flush_thread(void)
568 current->thread.dabr = 0; 568 current->thread.dabr = 0;
569 set_dabr(0); 569 set_dabr(0);
570 570
571#if defined(CONFIG_44x) || defined(CONFIG_BOOKE) 571#if defined(CONFIG_BOOKE)
572 current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W); 572 current->thread.dbcr0 &= ~(DBSR_DAC1R | DBSR_DAC1W);
573#endif 573#endif
574 } 574 }