From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754010AbcHRKRP (ORCPT ); Thu, 18 Aug 2016 06:17:15 -0400 Received: from torres.puc.rediris.es ([130.206.18.22]:39048 "EHLO torres.puc.rediris.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753656AbcHRKRO (ORCPT ); Thu, 18 Aug 2016 06:17:14 -0400 X-Envelope-From: paubert@iram.es Date: Thu, 18 Aug 2016 12:16:47 +0200 From: Gabriel Paubert To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/8xx: fix single_step debug Message-ID: <20160818101647.GA16503@visitor2.iram.es> References: <20160818094420.8E0991A2459@localhost.localdomain> <20160818095807.GA14832@visitor2.iram.es> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spamina-Bogosity: Unsure X-Spamina-Spam-Score: -1.0 (-) X-Spamina-Spam-Report: Content analysis details: (-1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -0.0 BAYES_40 BODY: Bayes spam probability is 20 to 40% [score: 0.2433] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 18, 2016 at 12:13:21PM +0200, Christophe Leroy wrote: > > > Le 18/08/2016 à 11:58, Gabriel Paubert a écrit : > >On Thu, Aug 18, 2016 at 11:44:20AM +0200, Christophe Leroy wrote: > >>SPRN_ICR must be read for clearing the internal freeze signal which > >>is asserted by the single step exception, otherwise the timebase and > >>decrementer remain freezed > > > >Minor nit: s/freezed/frozen/ > > > >If the timebase and decrementer are frozen even for a few cycles, this > >probably upsets timekeeping. I consider this a completely stupid design > >decision, and maybe I'm not alone. > > > > Gabriel > > We could also unset TBF bit (TimeBase Freeze enable) in TBSCR > register (today it is set in > arch/powerpc/platforms/8xx/m8xx_setup.c) but then it would impact > debug done with an external BDM system which expects the decrementer > and TB frozen when it freezes the execution. Ok, I believe that systematically setting it is a mistake, but then I'm always a bit nervous about screwing up timekeeping (it certainly is always a very bad idea when you are driving telescopes). Gabriel