* [patch] PS3: Fix hardware watchpoints
@ 2007-03-14 1:18 Geoff Levand
2007-03-14 2:32 ` Paul Mackerras
0 siblings, 1 reply; 4+ messages in thread
From: Geoff Levand @ 2007-03-14 1:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev@ozlabs.org
From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Add PS3 support for the PowerPC processor's Data Address Breakpoint
Register (DABR).
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Paul, please consider for 2.6.21.
arch/powerpc/platforms/ps3/setup.c | 7 +++++++
1 files changed, 7 insertions(+)
--- ps3-linux-dev.orig/arch/powerpc/platforms/ps3/setup.c
+++ ps3-linux-dev/arch/powerpc/platforms/ps3/setup.c
@@ -137,6 +137,12 @@ early_param("ps3fb", early_parse_ps3fb);
#define prealloc_ps3fb_videomemory() do { } while (0)
#endif
+static int ps3_set_dabr(u64 dabr)
+{
+ enum {DABR_USER = 1, DABR_KERNEL = 2,};
+
+ return lv1_set_dabr(dabr, DABR_KERNEL | DABR_USER) ? -1 : 0;
+}
static void __init ps3_setup_arch(void)
{
@@ -234,6 +240,7 @@ define_machine(ps3) {
.get_boot_time = ps3_get_boot_time,
.set_rtc_time = ps3_set_rtc_time,
.get_rtc_time = ps3_get_rtc_time,
+ .set_dabr = ps3_set_dabr,
.calibrate_decr = ps3_calibrate_decr,
.progress = ps3_progress,
.restart = ps3_restart,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] PS3: Fix hardware watchpoints
2007-03-14 1:18 [patch] PS3: Fix hardware watchpoints Geoff Levand
@ 2007-03-14 2:32 ` Paul Mackerras
2007-03-14 16:30 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: Paul Mackerras @ 2007-03-14 2:32 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev@ozlabs.org
Geoff Levand writes:
> Add PS3 support for the PowerPC processor's Data Address Breakpoint
> Register (DABR).
>
> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
>
> ---
> Paul, please consider for 2.6.21.
It's nice and small, but it isn't really a bugfix as far as I can
see... What's the downside of it not going into 2.6.21, apart from
some inconvenience in debugging things?
Paul.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] PS3: Fix hardware watchpoints
2007-03-14 2:32 ` Paul Mackerras
@ 2007-03-14 16:30 ` Arnd Bergmann
2007-03-14 16:57 ` Geoff Levand
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2007-03-14 16:30 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras
On Wednesday 14 March 2007, Paul Mackerras wrote:
> Geoff Levand writes:
>
> > Add PS3 support for the PowerPC processor's Data Address Breakpoint
> > Register (DABR).
> >
> > Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
> > Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> >
> > ---
> > Paul, please consider for 2.6.21.
>
> It's nice and small, but it isn't really a bugfix as far as I can
> see... What's the downside of it not going into 2.6.21, apart from
> some inconvenience in debugging things?
It makes it possible for a regular user to hang the partition,
because the kernel falls back to access the actual SPR, which is
forbidden by the hypervisor.
My original changelog text was:
The lv1 hypervisor silently kills the partition if the kernel attempts
to access the dabr register directly. Instead, it needs to be set using
an hcall. Since both pseries and celleb have the same function, the guess
is that the implementation on ps3 is also the same.
How about making the actual changelog text something like this:
----
The lv1 hypervisor silently kills the partition if the kernel attempts
to access the dabr register directly, which can happen when gdb adds
a hardware breakpoint.
Instead, the kernel needs to be set using an hcall, the same way as
it does for pseries and celleb.
----
The real question however should be if there is a point in merging
any ps3 patches into 2.6.21 at this point. Geoff, my understanding
is that the current ps3 platform code in 2.6.21-rc still relies on
additional patches from you in order to even boot, right?
Maybe it's better to just queue them for 2.6.22 now, independent
of the severity of bugs fixed by a given patch.
Arnd <><
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] PS3: Fix hardware watchpoints
2007-03-14 16:30 ` Arnd Bergmann
@ 2007-03-14 16:57 ` Geoff Levand
0 siblings, 0 replies; 4+ messages in thread
From: Geoff Levand @ 2007-03-14 16:57 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, Paul Mackerras
Arnd Bergmann wrote:
> On Wednesday 14 March 2007, Paul Mackerras wrote:
>> Geoff Levand writes:
>>
>> > Add PS3 support for the PowerPC processor's Data Address Breakpoint
>> > Register (DABR).
>> >
>> > Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
>> > Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
>> >
>> > ---
>> > Paul, please consider for 2.6.21.
>>
>> It's nice and small, but it isn't really a bugfix as far as I can
>> see... What's the downside of it not going into 2.6.21, apart from
>> some inconvenience in debugging things?
>
...
> Maybe it's better to just queue them for 2.6.22 now, independent
> of the severity of bugs fixed by a given patch.
It doesn't matter so much, that's why I just said to consider for
2.6.21.
Paul, please just add to your for-2.6.22 branch.
-Geoff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-14 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-14 1:18 [patch] PS3: Fix hardware watchpoints Geoff Levand
2007-03-14 2:32 ` Paul Mackerras
2007-03-14 16:30 ` Arnd Bergmann
2007-03-14 16:57 ` Geoff Levand
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).