[PATCH] ppc64: ppc_md.progress should not be __init
Arnd Bergmann
arnd at arndb.de
Sat Jun 18 00:31:18 EST 2005
I noticed on BPA that ppc_md.progress() is called from some places outside
of the init call sequence, e.g. the rtas flash code. However, I copied the
__init annotation from one of the other platform types, which caused the
kernel to crash upon hitting the freed code segment.
I have checked that iSeries, pmac and maple all have .progress marked as
__init and can never incorrectly hit that function after boot, so there
is no actual breakage in the current source.
However, I find the behavior rather surprising and suggest removing this
to have it the same way as it is required on pSeries and BPA.
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
--- linux-cg.orig/arch/ppc64/kernel/iSeries_setup.c 2005-06-06 15:08:43.000000000 -0400
+++ linux-cg/arch/ppc64/kernel/iSeries_setup.c 2005-06-17 16:25:14.050938184 -0400
@@ -811,7 +811,7 @@ static void __init iSeries_calibrate_dec
setup_default_decr();
}
-static void __init iSeries_progress(char * st, unsigned short code)
+static void iSeries_progress(char * st, unsigned short code)
{
printk("Progress: [%04x] - %s\n", (unsigned)code, st);
if (!piranha_simulator && mf_initialized) {
--- linux-cg.orig/arch/ppc64/kernel/maple_setup.c 2005-05-11 11:32:10.000000000 -0400
+++ linux-cg/arch/ppc64/kernel/maple_setup.c 2005-06-17 16:25:21.348895104 -0400
@@ -197,7 +197,7 @@ static __init void maple_init_IRQ(void)
DBG(" <- maple_init_IRQ\n");
}
-static void __init maple_progress(char *s, unsigned short hex)
+static void maple_progress(char *s, unsigned short hex)
{
printk("*** %04x : %s\n", hex, s ? s : "");
}
--- linux-cg.orig/arch/ppc64/kernel/pmac_setup.c 2005-05-11 11:32:10.000000000 -0400
+++ linux-cg/arch/ppc64/kernel/pmac_setup.c 2005-06-17 16:25:31.320976880 -0400
@@ -419,7 +419,7 @@ static __init void pmac_init_IRQ(void)
of_node_put(irqctrler2);
}
-static void __init pmac_progress(char *s, unsigned short hex)
+static void pmac_progress(char *s, unsigned short hex)
{
if (sccdbg) {
udbg_puts(s);
More information about the Linuxppc64-dev
mailing list