* [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
@ 2008-06-11 16:28 Arnd Bergmann
2008-06-11 16:34 ` please pull merge branch of cell-2.6.git Arnd Bergmann
2008-06-11 16:49 ` [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Michael Ellerman
0 siblings, 2 replies; 7+ messages in thread
From: Arnd Bergmann @ 2008-06-11 16:28 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Jeremy Kerr, cbe-oss-dev
The ibm,cbe-start-ptcal rtas call transfers ownership
of a memory range to the hardware in order to do
periodic memory interface recalibration.
When we do a kexec, we need to get this page back,
so we don't step on the new kernel's toes.
We used to do this correctly in case of a user triggered
kexec, but not for kdump.
This patch disables ptcal from the cell specific
machine_crash_shutdown() callback. I also needed
to fix the pseries code that tries to install its
default_machine_crash_shutdown() code independent
of what machine we're running on.
The fix has been verified by Akira Tsukamoto, the
original reporter of the problem.
Acked-by: Akira Tsukamoto <akirat@rd.scei.sony.co.jp>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/powerpc/platforms/cell/ras.c | 6 ++++++
arch/powerpc/platforms/cell/ras.h | 1 +
arch/powerpc/platforms/cell/setup.c | 2 +-
arch/powerpc/platforms/pseries/kexec.c | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index 655704a..21b313d 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -226,6 +226,12 @@ static int cbe_ptcal_notify_reboot(struct notifier_block *nb,
return cbe_ptcal_disable();
}
+void cbe_machine_crash_shutdown(struct pt_regs *regs)
+{
+ cbe_ptcal_disable();
+ return default_machine_crash_shutdown(regs);
+}
+
static struct notifier_block cbe_ptcal_reboot_notifier = {
.notifier_call = cbe_ptcal_notify_reboot
};
diff --git a/arch/powerpc/platforms/cell/ras.h b/arch/powerpc/platforms/cell/ras.h
index eb7ee54..d1401f9 100644
--- a/arch/powerpc/platforms/cell/ras.h
+++ b/arch/powerpc/platforms/cell/ras.h
@@ -5,5 +5,6 @@ extern void cbe_system_error_exception(struct pt_regs *regs);
extern void cbe_maintenance_exception(struct pt_regs *regs);
extern void cbe_thermal_exception(struct pt_regs *regs);
extern void cbe_ras_init(void);
+extern void cbe_machine_crash_shutdown(struct pt_regs *regs);
#endif /* RAS_H */
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index ab721b5..b555030 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -292,6 +292,6 @@ define_machine(cell) {
#ifdef CONFIG_KEXEC
.machine_kexec = default_machine_kexec,
.machine_kexec_prepare = default_machine_kexec_prepare,
- .machine_crash_shutdown = default_machine_crash_shutdown,
+ .machine_crash_shutdown = cbe_machine_crash_shutdown,
#endif
};
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
index e9dd5fe..53cbd53 100644
--- a/arch/powerpc/platforms/pseries/kexec.c
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -70,4 +70,4 @@ static int __init pseries_kexec_setup(void)
return 0;
}
-__initcall(pseries_kexec_setup);
+machine_device_initcall(pseries, pseries_kexec_setup);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* please pull merge branch of cell-2.6.git
2008-06-11 16:28 [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Arnd Bergmann
@ 2008-06-11 16:34 ` Arnd Bergmann
2008-06-11 16:49 ` [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Michael Ellerman
1 sibling, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2008-06-11 16:34 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Paul Mackerras, Jeremy Kerr, cbe-oss-dev
Hi Paul,
Please pull the fix I just sent from
master.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6.git merge
Jeremy might want to look at it as well, since he wrote the
code originally.
Thanks,
Arnd <><
---
Arnd Bergmann <arnd@arndb.de>:
powerpc/cell: disable ptcal in case of kdump reboot
arch/powerpc/platforms/cell/ras.c | 6 ++++++
arch/powerpc/platforms/cell/ras.h | 1 +
arch/powerpc/platforms/cell/setup.c | 2 +-
arch/powerpc/platforms/pseries/kexec.c | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
2008-06-11 16:28 [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Arnd Bergmann
2008-06-11 16:34 ` please pull merge branch of cell-2.6.git Arnd Bergmann
@ 2008-06-11 16:49 ` Michael Ellerman
2008-06-12 7:39 ` Arnd Bergmann
1 sibling, 1 reply; 7+ messages in thread
From: Michael Ellerman @ 2008-06-11 16:49 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linuxppc-dev, Michael Neuling, Paul Mackerras, Jeremy Kerr,
cbe-oss-dev
[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]
On Wed, 2008-06-11 at 18:28 +0200, Arnd Bergmann wrote:
> The ibm,cbe-start-ptcal rtas call transfers ownership
> of a memory range to the hardware in order to do
> periodic memory interface recalibration.
> When we do a kexec, we need to get this page back,
> so we don't step on the new kernel's toes.
> We used to do this correctly in case of a user triggered
> kexec, but not for kdump.
Used to?
> This patch disables ptcal from the cell specific
> machine_crash_shutdown() callback.
I'd rather you used the crash_shutdown_register() infrastructure Mikey
added for EHEA - it's designed for just this sort of thing.
> I also needed to fix the pseries code that tries to install its
> default_machine_crash_shutdown() code independent
> of what machine we're running on.
That's a buglet.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
2008-06-11 16:49 ` [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Michael Ellerman
@ 2008-06-12 7:39 ` Arnd Bergmann
2008-06-12 8:06 ` Michael Neuling
0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2008-06-12 7:39 UTC (permalink / raw)
To: michael
Cc: linuxppc-dev, Michael Neuling, Paul Mackerras, Jeremy Kerr,
cbe-oss-dev
On Wednesday 11 June 2008, Michael Ellerman wrote:
> On Wed, 2008-06-11 at 18:28 +0200, Arnd Bergmann wrote:
> > We used to do this correctly in case of a user triggered
> > kexec, but not for kdump.
>
> Used to?
Sorry, wrong wording. I meant without this patch, it's correct
for kexec.
> > This patch disables ptcal from the cell specific
> > machine_crash_shutdown() callback.
>
> I'd rather you used the crash_shutdown_register() infrastructure Mikey
> added for EHEA - it's designed for just this sort of thing.
Thanks for pointing this out, I wasn't aware of that call.
New patch coming up.
Arnd <><
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
2008-06-12 7:39 ` Arnd Bergmann
@ 2008-06-12 8:06 ` Michael Neuling
2008-06-12 9:04 ` Michael Ellerman
0 siblings, 1 reply; 7+ messages in thread
From: Michael Neuling @ 2008-06-12 8:06 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, Paul Mackerras, Jeremy Kerr, cbe-oss-dev
In message <200806120939.23836.arnd@arndb.de> you wrote:
> On Wednesday 11 June 2008, Michael Ellerman wrote:
> > On Wed, 2008-06-11 at 18:28 +0200, Arnd Bergmann wrote:
> > > We used to do this correctly in case of a user triggered
> > > kexec, but not for kdump.
> >
> > Used to?
>
> Sorry, wrong wording. I meant without this patch, it's correct
> for kexec.
>
> > > This patch disables ptcal from the cell specific
> > > machine_crash_shutdown() callback.
> >
> > I'd rather you used the crash_shutdown_register() infrastructure Mikey
> > added for EHEA - it's designed for just this sort of thing.
>
> Thanks for pointing this out, I wasn't aware of that call.
> New patch coming up.
In theory we can register lots of call backs but currently the maximum
is set to 1 through CRASH_HANDLER_MAX. This is to discourage people
from using this infrastructure at all.
Unless there's some crazy arse company that's going to mix a CBE with an
eHEA, we are probably ok leaving this at 1. Right?
Mikey
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
2008-06-12 8:06 ` Michael Neuling
@ 2008-06-12 9:04 ` Michael Ellerman
2008-06-12 11:22 ` Michael Neuling
0 siblings, 1 reply; 7+ messages in thread
From: Michael Ellerman @ 2008-06-12 9:04 UTC (permalink / raw)
To: Michael Neuling
Cc: linuxppc-dev, Paul Mackerras, Jeremy Kerr, Arnd Bergmann,
cbe-oss-dev
[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]
On Thu, 2008-06-12 at 18:06 +1000, Michael Neuling wrote:
> In message <200806120939.23836.arnd@arndb.de> you wrote:
> > On Wednesday 11 June 2008, Michael Ellerman wrote:
> > > On Wed, 2008-06-11 at 18:28 +0200, Arnd Bergmann wrote:
> > > > We used to do this correctly in case of a user triggered
> > > > kexec, but not for kdump.
> > >
> > > Used to?
> >
> > Sorry, wrong wording. I meant without this patch, it's correct
> > for kexec.
> >
> > > > This patch disables ptcal from the cell specific
> > > > machine_crash_shutdown() callback.
> > >
> > > I'd rather you used the crash_shutdown_register() infrastructure Mikey
> > > added for EHEA - it's designed for just this sort of thing.
> >
> > Thanks for pointing this out, I wasn't aware of that call.
> > New patch coming up.
>
> In theory we can register lots of call backs but currently the maximum
> is set to 1 through CRASH_HANDLER_MAX. This is to discourage people
> from using this infrastructure at all.
Yeah true. In this case I think it's the less horrible solution to
something that's fundamentally kdump-unfriendly.
> Unless there's some crazy arse company that's going to mix a CBE with an
> eHEA, we are probably ok leaving this at 1. Right?
No comment *cough*. I guess I'd say just increase it to 2 on the off
chance, can't hurt much.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot
2008-06-12 9:04 ` Michael Ellerman
@ 2008-06-12 11:22 ` Michael Neuling
0 siblings, 0 replies; 7+ messages in thread
From: Michael Neuling @ 2008-06-12 11:22 UTC (permalink / raw)
To: michael
Cc: linuxppc-dev, Paul Mackerras, Jeremy Kerr, Arnd Bergmann,
cbe-oss-dev
In message <1213261480.8652.5.camel@localhost> you wrote:
>
> On Thu, 2008-06-12 at 18:06 +1000, Michael Neuling wrote:
> > In message <200806120939.23836.arnd@arndb.de> you wrote:
> > > On Wednesday 11 June 2008, Michael Ellerman wrote:
> > > > On Wed, 2008-06-11 at 18:28 +0200, Arnd Bergmann wrote:
> > > > > We used to do this correctly in case of a user triggered
> > > > > kexec, but not for kdump.
> > > >=20
> > > > Used to?
> > >=20
> > > Sorry, wrong wording. I meant without this patch, it's correct
> > > for kexec.
> > > =20
> > > > > This patch disables ptcal from the cell specific
> > > > > machine_crash_shutdown() callback.=20
> > > >=20
> > > > I'd rather you used the crash_shutdown_register() infrastructure Mike=
> y
> > > > added for EHEA - it's designed for just this sort of thing.
> > >=20
> > > Thanks for pointing this out, I wasn't aware of that call.
> > > New patch coming up.
> >=20
> > In theory we can register lots of call backs but currently the maximum
> > is set to 1 through CRASH_HANDLER_MAX. This is to discourage people
> > from using this infrastructure at all.
>
> Yeah true. In this case I think it's the less horrible solution to
> something that's fundamentally kdump-unfriendly.
>
> > Unless there's some crazy arse company that's going to mix a CBE with an
> > eHEA, we are probably ok leaving this at 1. Right?
>
> No comment *cough*. I guess I'd say just increase it to 2 on the off
> chance, can't hurt much.
Ok.. but this one really really is the last one!! :-)
Mikey
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-12 11:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-11 16:28 [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Arnd Bergmann
2008-06-11 16:34 ` please pull merge branch of cell-2.6.git Arnd Bergmann
2008-06-11 16:49 ` [Cbe-oss-dev] [PATCH] powerpc/cell: disable ptcal in case of kdump reboot Michael Ellerman
2008-06-12 7:39 ` Arnd Bergmann
2008-06-12 8:06 ` Michael Neuling
2008-06-12 9:04 ` Michael Ellerman
2008-06-12 11:22 ` Michael Neuling
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).