linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will@willdeacon.co.uk (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: hw_breakpoint: Enable debug powerdown only if system supports 'has_ossr'
Date: Fri, 15 Mar 2013 05:00:14 +0000	[thread overview]
Message-ID: <20130315050014.GA15706@tiny-lites> (raw)
In-Reply-To: <51417E58.5050501@ti.com>

On Thu, Mar 14, 2013 at 01:08:00PM +0530, Santosh Shilimkar wrote:
> Will,

Hi guys,

I'm out of the office at the moment and have really terrible connectivity,
so I can't do too much until next week. However, I don't think adding the
has_ossr check is the right fix for this problem.

> On Wednesday 13 March 2013 05:59 PM, Lokesh Vutla wrote:
> > Hi Dietmar,
> > On Wednesday 13 March 2013 05:35 PM, Dietmar Eggemann wrote:
> >> On 13/03/13 06:52, Lokesh Vutla wrote:
> >>> Commit {9a6eb31 ARM: hw_breakpoint: Debug powerdown support for
> >>> self-hosted
> >>> debug} introduces debug powerdown support for self-hosted debug.
> >>> While merging the patch 'has_ossr' check was removed which
> >>> was needed for hardwares which doesn't support self-hosted debug.
> >>> Pandaboard (A9) is one such hardware and Dietmar's orginial
> >>> patch did mention this issue.
> >>> Without that check on Panda with CPUIDLE enabled, a flood of
> >>> below messages thrown.
> >>>
> >>> [ 3.597930] hw-breakpoint: CPU 0 failed to disable vector catch
> >>> [ 3.597991] hw-breakpoint: CPU 1 failed to disable vector catch

Ok, so this means that we've taken an undefined instruction exception while
trying to reset the debug registers on the PM_EXIT path. Now, the code there
deals with CPUs that don't have the save/restore registers just fine, so
that shouldn't have anything to do with this problem, particularly if the
bit that is tripping us up is related to clearing vector catch.

Furthermore, I was under the impression that hw_breakpoint did actually
work on panda, which implies that a cold boot *does* manage to reset the
registers (can you please confirm this by looking in your dmesg during
boot?). In that case, it seems as though a PM cycle is powering down a
bunch of debug logic that was powered up during boot, and then we trip over
because we can't access the register bank.

The proper solution to this problem requires us to establish exactly what is
turning off the debug registers, and then having an OMAP PM notifier to
enable it again. Assuming this has always been the case, I expect hardware
debug across PM fails silently with older kernels.

> I was also wondering whether we should just warn once rather
> than continuous warnings in the notifier. Patch is end of the
> email.

Could do, but I'd like to see a fix for the real issue before we simply hide
the warnings :)

Cheers,

Will

  reply	other threads:[~2013-03-15  5:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13  6:52 [PATCH] ARM: hw_breakpoint: Enable debug powerdown only if system supports 'has_ossr' Lokesh Vutla
2013-03-13 12:05 ` Dietmar Eggemann
2013-03-13 12:29   ` Lokesh Vutla
2013-03-14  7:38     ` Santosh Shilimkar
2013-03-15  5:00       ` Will Deacon [this message]
2013-03-18  6:51         ` Santosh Shilimkar
2013-03-18 15:07           ` Will Deacon
2013-03-18 15:46             ` Santosh Shilimkar
2013-03-18 17:06               ` Will Deacon
2013-03-19  6:39                 ` Santosh Shilimkar
2013-03-19 10:28                   ` Will Deacon
2013-03-25  9:11                     ` Santosh Shilimkar
2013-03-25 10:49                       ` Will Deacon
2013-03-25 10:55                         ` Santosh Shilimkar
2013-03-28 11:59                     ` Dietmar Eggemann
2013-03-14 17:38 ` Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130315050014.GA15706@tiny-lites \
    --to=will@willdeacon.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).