From patchwork Fri Nov 28 19:51:24 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11344 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id C743947C8C for ; Sat, 29 Nov 2008 07:14:43 +1100 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by ozlabs.org (Postfix) with ESMTP id 7EA22DDDE3; Sat, 29 Nov 2008 07:12:31 +1100 (EST) Received: from dyn-9-152-222-92.boeblingen.de.ibm.com (blueice1n1.de.ibm.com [195.212.29.163]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1L69hV0K4c-0003HI; Fri, 28 Nov 2008 21:12:29 +0100 Message-Id: <20081128200325.240671747@arndb.de> References: <20081128195120.869318403@arndb.de> User-Agent: quilt/0.46-1 Date: Fri, 28 Nov 2008 20:51:24 +0100 From: Arnd Bergmann To: linuxppc-dev@ozlabs.org Content-Disposition: inline; filename=0004-powerpc-cell-fix-GDB-watchpoints-again.patch X-Provags-ID: V01U2FsdGVkX1/3uJYLOA24brnNdNxDqSlRfc1lffGy/Hr6HOO 94TQEDIt4drYeVstOd2NdNTXTfo1bgMeJMRxWKL9Qpckg5ZIv3 yc7yZ8g15kdn6Gh5fKRKQ== Cc: cbe-oss-dev@ozlabs.org Subject: [Cbe-oss-dev] [patch 4/4] powerpc/cell: fix GDB watchpoints, again X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org An earlier patch from Jens Osterkamp attempted to fix GDB watchpoints by enabling the DABRX register at boot time. Unfortunately, this did not work on SMP setups, where secondary CPUs were still using the power-on DABRX value. This introduces the same change for secondary CPUs on cell as well. Reported-by: Ulrich Weigand Tested-by: Ulrich Weigand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/smp.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index c0d86e1..9046803 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c @@ -129,10 +129,15 @@ static int __init smp_iic_probe(void) return cpus_weight(cpu_possible_map); } -static void __devinit smp_iic_setup_cpu(int cpu) +static void __devinit smp_cell_setup_cpu(int cpu) { if (cpu != boot_cpuid) iic_setup_cpu(); + + /* + * change default DABRX to allow user watchpoints + */ + mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); } static DEFINE_SPINLOCK(timebase_lock); @@ -192,7 +197,7 @@ static struct smp_ops_t bpa_iic_smp_ops = { .message_pass = smp_iic_message_pass, .probe = smp_iic_probe, .kick_cpu = smp_cell_kick_cpu, - .setup_cpu = smp_iic_setup_cpu, + .setup_cpu = smp_cell_setup_cpu, .cpu_bootable = smp_cell_cpu_bootable, };