[PATCH] suggested kexec API changes
Anton Blanchard
anton at samba.org
Sun Nov 14 11:12:36 EST 2004
Move the linux,rtas* properties into the /rtas node and make them 32bit.
Use rtas-size and avoid duplicating it in linux,rtas-size.
Signed-off-by: Anton Blanchard <anton at samba.org>
diff -puN arch/ppc64/kernel/prom_init.c~fix_rtas_of arch/ppc64/kernel/prom_init.c
--- foobar2/arch/ppc64/kernel/prom_init.c~fix_rtas_of 2004-11-13 09:24:42.030565821 +1100
+++ foobar2-anton/arch/ppc64/kernel/prom_init.c 2004-11-13 09:59:48.610764091 +1100
@@ -701,9 +701,9 @@ static void __init prom_instantiate_rtas
{
unsigned long offset = reloc_offset();
struct prom_t *_prom = PTRRELOC(&prom);
- phandle prom_rtas;
- u64 base, entry = 0;
- u32 size = 0;
+ phandle prom_rtas, rtas_node;
+ u32 base, entry = 0;
+ u32 size = 0;
prom_debug("prom_instantiate_rtas: start...\n");
@@ -723,12 +723,12 @@ static void __init prom_instantiate_rtas
}
prom_printf("instantiating rtas at 0x%x", base);
- prom_rtas = call_prom("open", 1, 1, ADDR("/rtas"));
+ rtas_node = call_prom("open", 1, 1, ADDR("/rtas"));
prom_printf("...");
if (call_prom("call-method", 3, 2,
ADDR("instantiate-rtas"),
- prom_rtas, base) != PROM_ERROR) {
+ rtas_node, base) != PROM_ERROR) {
entry = (long)_prom->args.rets[1];
}
if (entry == 0) {
@@ -739,9 +739,8 @@ static void __init prom_instantiate_rtas
reserve_mem(base, size);
- prom_setprop(_prom->chosen, "linux,rtas-base", &base, sizeof(base));
- prom_setprop(_prom->chosen, "linux,rtas-entry", &entry, sizeof(entry));
- prom_setprop(_prom->chosen, "linux,rtas-size", &size, sizeof(size));
+ prom_setprop(prom_rtas, "linux,rtas-base", &base, sizeof(base));
+ prom_setprop(prom_rtas, "linux,rtas-entry", &entry, sizeof(entry));
prom_debug("rtas base = 0x%x\n", base);
prom_debug("rtas entry = 0x%x\n", entry);
diff -puN arch/ppc64/kernel/rtas.c~fix_rtas_of arch/ppc64/kernel/rtas.c
--- foobar2/arch/ppc64/kernel/rtas.c~fix_rtas_of 2004-11-13 09:24:42.035565480 +1100
+++ foobar2-anton/arch/ppc64/kernel/rtas.c 2004-11-13 09:59:23.997753829 +1100
@@ -573,15 +573,15 @@ void __init rtas_initialize(void)
*/
rtas.dev = of_find_node_by_name(NULL, "rtas");
if (rtas.dev) {
- u64 *basep, *entryp;
+ u32 *basep, *entryp;
u32 *sizep;
- basep = (u64 *)get_property(of_chosen, "linux,rtas-base", NULL);
- sizep = (u32 *)get_property(of_chosen, "linux,rtas-size", NULL);
+ basep = (u32 *)get_property(rtas.dev, "linux,rtas-base", NULL);
+ sizep = (u32 *)get_property(rtas.dev, "rtas-size", NULL);
if (basep != NULL && sizep != NULL) {
rtas.base = *basep;
rtas.size = *sizep;
- entryp = (u64 *)get_property(of_chosen, "linux,rtas-entry", NULL);
+ entryp = (u32 *)get_property(rtas.dev, "linux,rtas-entry", NULL);
if (entryp == NULL) /* Ugh */
rtas.entry = rtas.base;
else
_
More information about the Linuxppc64-dev
mailing list