linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* advice needed on how best to fix kirkwood kexec
@ 2011-02-01 21:50 Eric Cooper
  2011-02-02  4:11 ` Nicolas Pitre
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Cooper @ 2011-02-01 21:50 UTC (permalink / raw)
  To: linux-arm-kernel

I found the problem with kexec'ing kirkwood kernels:

During late initialization, the kirkwood_clock_gate function powers
down unused units, including the PCIe.  But the early initialization
(kirkwood_timer_init) relies on reading the device ID register, which
is in the PCIe space, so it will hang when started by kexec.

My question is, should I patch the kexec code or the initialization code?

Patching the kexec code is much more useful, because it allows
kexec'ing the existing kirkwood kernels that are already "out there",
in distros, etc.  But it requires a kirkwood-specific operation in the
otherwise generic machine_kexec().

Patching just the kirkwood initialization is better from an
"information hiding" perspective, but won't provide any benefit until
it makes its way into the kernels that people might want to kexec.

-- 
Eric Cooper             e c c @ c m u . e d u

^ permalink raw reply	[flat|nested] 2+ messages in thread

* advice needed on how best to fix kirkwood kexec
  2011-02-01 21:50 advice needed on how best to fix kirkwood kexec Eric Cooper
@ 2011-02-02  4:11 ` Nicolas Pitre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pitre @ 2011-02-02  4:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 1 Feb 2011, Eric Cooper wrote:

> I found the problem with kexec'ing kirkwood kernels:
> 
> During late initialization, the kirkwood_clock_gate function powers
> down unused units, including the PCIe.  But the early initialization
> (kirkwood_timer_init) relies on reading the device ID register, which
> is in the PCIe space, so it will hang when started by kexec.
> 
> My question is, should I patch the kexec code or the initialization code?
> 
> Patching the kexec code is much more useful, because it allows
> kexec'ing the existing kirkwood kernels that are already "out there",
> in distros, etc.  But it requires a kirkwood-specific operation in the
> otherwise generic machine_kexec().
> 
> Patching just the kirkwood initialization is better from an
> "information hiding" perspective, but won't provide any benefit until
> it makes its way into the kernels that people might want to kexec.

I think that both should be patched.  The first one will let you kexec 
old kernels, while the later will let you be kexec'd by old kernels as 
well as be less dependent on whatever the bootloader might have done 
with the clock.

And machine_kexec() should probably call a machine specific hook if set 
by machine specific code, similar to pm_power_off in 
machine_power_off().


Nicolas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-02  4:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 21:50 advice needed on how best to fix kirkwood kexec Eric Cooper
2011-02-02  4:11 ` Nicolas Pitre

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).