* Clearing DBSR and DBCR0 in host handler.
@ 2013-04-03 15:24 Bhushan Bharat-R65777
2013-04-03 16:10 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Bhushan Bharat-R65777 @ 2013-04-03 15:24 UTC (permalink / raw)
To: linuxppc-dev, Kumar Gala, Benjamin Herrenschmidt
Cc: Wood Scott-B07421, Alexander Graf
Hi All,
The kernel exception handling code for 32 bit (transfer_to_handler in entry=
_32.S) clear DBSR and load DBCR0 with 0 (global_dbcr0 variable, which is ze=
ro) if user space used debug (DBCR0.IDM set).
But I do not same (clearing DBCR0 and DBSR) in 64bit exception handler. Is =
this an issue or I am missing something?
Thanks
-Bharat
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Clearing DBSR and DBCR0 in host handler.
2013-04-03 15:24 Clearing DBSR and DBCR0 in host handler Bhushan Bharat-R65777
@ 2013-04-03 16:10 ` Kumar Gala
2013-04-03 17:33 ` Bhushan Bharat-R65777
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2013-04-03 16:10 UTC (permalink / raw)
To: Bhushan Bharat-R65777; +Cc: linuxppc-dev, Alexander Graf, Wood Scott-B07421
On Apr 3, 2013, at 10:24 AM, Bhushan Bharat-R65777 wrote:
> Hi All,
>=20
> The kernel exception handling code for 32 bit (transfer_to_handler in =
entry_32.S) clear DBSR and load DBCR0 with 0 (global_dbcr0 variable, =
which is zero) if user space used debug (DBCR0.IDM set).
>=20
> But I do not same (clearing DBCR0 and DBSR) in 64bit exception =
handler. Is this an issue or I am missing something?
>=20
> Thanks
> -Bharat
Are you having a problem with debug w/the 64-bit kernel? The 32-bit =
kernel supports several kernel level debug features that the 64-bit =
doesn't support. So if you are having an issue that might be more =
helpful to convey that just asking about exception code path.
- k=
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Clearing DBSR and DBCR0 in host handler.
2013-04-03 16:10 ` Kumar Gala
@ 2013-04-03 17:33 ` Bhushan Bharat-R65777
0 siblings, 0 replies; 3+ messages in thread
From: Bhushan Bharat-R65777 @ 2013-04-03 17:33 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Alexander Graf, Wood Scott-B07421
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Wednesday, April 03, 2013 9:41 PM
> To: Bhushan Bharat-R65777
> Cc: linuxppc-dev@lists.ozlabs.org; Benjamin Herrenschmidt; Alexander Graf=
; Wood
> Scott-B07421
> Subject: Re: Clearing DBSR and DBCR0 in host handler.
>=20
>=20
> On Apr 3, 2013, at 10:24 AM, Bhushan Bharat-R65777 wrote:
>=20
> > Hi All,
> >
> > The kernel exception handling code for 32 bit (transfer_to_handler in
> entry_32.S) clear DBSR and load DBCR0 with 0 (global_dbcr0 variable, whic=
h is
> zero) if user space used debug (DBCR0.IDM set).
> >
> > But I do not same (clearing DBCR0 and DBSR) in 64bit exception handler.=
Is
> this an issue or I am missing something?
> >
> > Thanks
> > -Bharat
>=20
> Are you having a problem with debug w/the 64-bit kernel?
No not any issue, I was looking into code where it saves/restores of debug =
register. I observed the above said inconsistency in 32 bit and 64 bit.
> The 32-bit kernel
> supports several kernel level debug features that the 64-bit doesn't supp=
ort.
I am talking about the a user process debugging:
- A user process is under debugging using gdb. So the h/w debug register =
will have thread context.
- An interrupt/exception happens in user process.
- Now on 32 bit we clear the DBSR (pending events) and DBCR0 (so no new e=
vents get captured). But on 64bit we do not follow same, Why it is so?
Are we doing something extra on 32 bit or something is missing on 64 bi=
t?=20
Can it happen that on 64 bit some more debug events get captured and de=
bug interrupts get fired if MSR.DE is set, which is undesired.=20
Or I am missing something here ?
Thanks
-Bharat
> So if you are having an issue that might be more helpful to convey that j=
ust
> asking about exception code path.
>=20
> - k
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-03 17:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-03 15:24 Clearing DBSR and DBCR0 in host handler Bhushan Bharat-R65777
2013-04-03 16:10 ` Kumar Gala
2013-04-03 17:33 ` Bhushan Bharat-R65777
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.