From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 10 Dec 2009 12:41:35 -0500 From: Josh Boyer To: Dave Kleikamp Subject: Re: [RFC:PATCH 03/03] powerpc: Add support for BookE Debug Reg. traps, exceptions and ptrace Message-ID: <20091210174135.GW2937@zod.rchland.ibm.com> References: <20091210155709.6697.4635.sendpatchset@norville.austin.ibm.com> <20091210155727.6697.74672.sendpatchset@norville.austin.ibm.com> <20091210172711.GV2937@zod.rchland.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20091210172711.GV2937@zod.rchland.ibm.com> Cc: linuxppc-dev list , Sergio Durigan Junior , Torez Smith , Thiago Jung Bauermann , David Gibson List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Dec 10, 2009 at 12:27:11PM -0500, Josh Boyer wrote: >On Thu, Dec 10, 2009 at 01:57:27PM -0200, Dave Kleikamp wrote: >>+static void prime_debug_regs(struct thread_struct *thread) >>+{ >>+ mtspr(SPRN_IAC1, thread->iac1); >>+ mtspr(SPRN_IAC2, thread->iac2); >>+ mtspr(SPRN_IAC3, thread->iac3); >>+ mtspr(SPRN_IAC4, thread->iac4); >>+ mtspr(SPRN_DAC1, thread->dac1); >>+ mtspr(SPRN_DAC2, thread->dac2); >>+ mtspr(SPRN_DVC1, thread->dvc1); >>+ mtspr(SPRN_DVC2, thread->dvc2); >>+ mtspr(SPRN_DBCR0, thread->dbcr0); >>+ mtspr(SPRN_DBCR1, thread->dbcr1); >>+ mtspr(SPRN_DBCR2, thread->dbcr2); > >405 has no DBCR2, so I doubt setting it via mtspr would be good. Does this >compile for 40x and did you test it at all? > >Also, looking at the current kernel it seems SPRN_DBCR2 is only defined for >CONFIG_PPC_BOOK3E_64 which is also inaccurate. I mis-read the code on this part. SPRN_DBCR2 gets defined unconditionally, so Book-E should be fine. Still seems broken on 405 though. josh