* [PATCH] ARM: hw_breakpoint: clear DBGVCR out of reset
@ 2011-04-01 11:24 Will Deacon
2011-04-03 7:25 ` Stephen Boyd
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2011-04-01 11:24 UTC (permalink / raw)
To: linux-arm-kernel
The DBGVCR, used for configuring vector catch debug events, is UNKNOWN
out of reset on ARMv7. When enabling monitor mode, this must be zeroed
to avoid UNPREDICTABLE behaviour.
This patch adds the zeroing code to the debug reset path.
Reported-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm/kernel/hw_breakpoint.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 8dbc126..87acc25 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info)
*/
asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0));
isb();
+
+ /*
+ * Clear any configured vector-catch events before
+ * enabling monitor mode.
+ */
+ asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0));
+ isb();
}
if (enable_monitor_mode())
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: hw_breakpoint: clear DBGVCR out of reset
2011-04-01 11:24 [PATCH] ARM: hw_breakpoint: clear DBGVCR out of reset Will Deacon
@ 2011-04-03 7:25 ` Stephen Boyd
2011-04-03 12:22 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2011-04-03 7:25 UTC (permalink / raw)
To: linux-arm-kernel
On 4/1/2011 4:24 AM, Will Deacon wrote:
> The DBGVCR, used for configuring vector catch debug events, is UNKNOWN
> out of reset on ARMv7. When enabling monitor mode, this must be zeroed
> to avoid UNPREDICTABLE behaviour.
>
> This patch adds the zeroing code to the debug reset path.
>
> Reported-by: Stepan Moskovchenko <stepanm@codeaurora.org>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Please Cc stable as this fix should go to the 37 and 38 stable trees.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: hw_breakpoint: clear DBGVCR out of reset
2011-04-03 7:25 ` Stephen Boyd
@ 2011-04-03 12:22 ` Will Deacon
2011-04-04 20:03 ` Stepan Moskovchenko
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2011-04-03 12:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi Stephen,
On Sun, 2011-04-03 at 08:25 +0100, Stephen Boyd wrote:
> On 4/1/2011 4:24 AM, Will Deacon wrote:
> > The DBGVCR, used for configuring vector catch debug events, is UNKNOWN
> > out of reset on ARMv7. When enabling monitor mode, this must be zeroed
> > to avoid UNPREDICTABLE behaviour.
> >
> > This patch adds the zeroing code to the debug reset path.
> >
> > Reported-by: Stepan Moskovchenko <stepanm@codeaurora.org>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
>
> Please Cc stable as this fix should go to the 37 and 38 stable trees.
Will do. If you could please confirm that it fixes the problems reported
initially then that would be great.
Thanks,
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: hw_breakpoint: clear DBGVCR out of reset
2011-04-03 12:22 ` Will Deacon
@ 2011-04-04 20:03 ` Stepan Moskovchenko
0 siblings, 0 replies; 4+ messages in thread
From: Stepan Moskovchenko @ 2011-04-04 20:03 UTC (permalink / raw)
To: linux-arm-kernel
On 4/3/2011 5:22 AM, Will Deacon wrote:
> Hi Stephen,
>
> On Sun, 2011-04-03 at 08:25 +0100, Stephen Boyd wrote:
>> On 4/1/2011 4:24 AM, Will Deacon wrote:
>>> The DBGVCR, used for configuring vector catch debug events, is UNKNOWN
>>> out of reset on ARMv7. When enabling monitor mode, this must be zeroed
>>> to avoid UNPREDICTABLE behaviour.
>>>
>>> This patch adds the zeroing code to the debug reset path.
>>>
>>> Reported-by: Stepan Moskovchenko<stepanm@codeaurora.org>
>>> Signed-off-by: Will Deacon<will.deacon@arm.com>
>> Please Cc stable as this fix should go to the 37 and 38 stable trees.
> Will do. If you could please confirm that it fixes the problems reported
> initially then that would be great.
>
> Thanks,
>
> Will
>
I confirm that this fixes the problem I was seeing.
Thanks
Steve
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-04 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01 11:24 [PATCH] ARM: hw_breakpoint: clear DBGVCR out of reset Will Deacon
2011-04-03 7:25 ` Stephen Boyd
2011-04-03 12:22 ` Will Deacon
2011-04-04 20:03 ` Stepan Moskovchenko
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).