]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.arch/ppc-cell-gdb-watchpoints.patch
Merge branch 'master' into next
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / ppc-cell-gdb-watchpoints.patch
CommitLineData
2cb7cef9
BS
1Subject: Fix GDB watchpoints on Cell
2From: Arnd Bergmann <arnd@arndb.de>
3References: 456405 - LTC50396
4
5An earlier patch from Jens Osterkamp attempted to fix GDB
6watchpoints by enabling the DABRX register at boot time.
7Unfortunately, this did not work on SMP setups, where
8secondary CPUs were still using the power-on DABRX value.
9
10This introduces the same change for secondary CPUs on cell
11as well.
12
13Reported-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14Tested-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16Signed-off-by: Paul Mackerras <paulus@samba.org>
17Signed-off-by: Olaf Hering <olh@suse.de>
18
19---
20 arch/powerpc/platforms/cell/smp.c | 9 +++++++--
21 1 file changed, 7 insertions(+), 2 deletions(-)
22
23--- a/arch/powerpc/platforms/cell/smp.c
24+++ b/arch/powerpc/platforms/cell/smp.c
25@@ -129,10 +129,15 @@ static int __init smp_iic_probe(void)
26 return cpus_weight(cpu_possible_map);
27 }
28
29-static void __devinit smp_iic_setup_cpu(int cpu)
30+static void __devinit smp_cell_setup_cpu(int cpu)
31 {
32 if (cpu != boot_cpuid)
33 iic_setup_cpu();
34+
35+ /*
36+ * change default DABRX to allow user watchpoints
37+ */
38+ mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER);
39 }
40
41 static DEFINE_SPINLOCK(timebase_lock);
42@@ -192,7 +197,7 @@ static struct smp_ops_t bpa_iic_smp_ops
43 .message_pass = smp_iic_message_pass,
44 .probe = smp_iic_probe,
45 .kick_cpu = smp_cell_kick_cpu,
46- .setup_cpu = smp_iic_setup_cpu,
47+ .setup_cpu = smp_cell_setup_cpu,
48 .cpu_bootable = smp_cell_cpu_bootable,
49 };
50