powerpc: Make RTAS console init generic
Subsystems (2)
PATCH 1/1 powerpc: Make RTAS console init generic
The RTAS console doesn't have to be Cell specific. If we have both the put and get char RTAS functions, init the rtas console.
---
Paulus: This is relatively low risk, so if the Cell guys ack it, it could be a candidate for 2.6.18.
arch/powerpc/kernel/rtas.c | 5 +++++ arch/powerpc/platforms/cell/setup.c | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-)
arch/powerpc/kernel/rtas.c +5 -0
@@ -910,6 +910,11 @@ int __init early_init_dt_scan_rtas(unsig basep =of_get_flat_dt_prop (node,"get-term-char" ,NULL );if (basep) rtas_getchar_token = *basep; + +if (rtas_putchar_token !=RTAS_UNKNOWN_SERVICE && + rtas_getchar_token !=RTAS_UNKNOWN_SERVICE ) +udbg_init_rtas_console (); +#endif /* break now */
arch/powerpc/platforms/cell/setup.c +0 -4
@@ -150,10 +150,6 @@ static int __init cell_probe(void) !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))return 0 ; -#ifdef CONFIG_UDBG_RTAS_CONSOLE -udbg_init_rtas_console (); -#endif -hpte_init_native ();return 1 ;
Quoted 24 lines · Michael Neuling
The RTAS console doesn't have to be Cell specific. If we have both the put and get char RTAS functions, init the rtas console.
Index:
linux-2.6-ozlabs/arch/powerpc/kernel/rtas.c
===================================================================arch/powerpc/kernel/rtas.c +5
-0@@ -910,6 +910,11 @@ int __init early_init_dt_scan_rtas(unsig basep =of_get_flat_dt_prop (node,"get-term-char" ,NULL );if (basep) rtas_getchar_token = *basep; + +if (rtas_putchar_token !=RTAS_UNKNOWN_SERVICE && + rtas_getchar_token !=RTAS_UNKNOWN_SERVICE ) +udbg_init_rtas_console (); +#endif /* break now */ Index:
linux-2.6-ozlabs/arch/powerpc/platforms/cell/setup.c
===================================================================
arch/powerpc/platforms/cell/setup.c static int __init cell_probe(void) · line 156
Quoted 7 lines
arch/powerpc/platforms/cell/setup.c +0
-4@@ -150,10 +150,6 @@ static int __init cell_probe(void) !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))return 0 ; -#ifdef CONFIG_UDBG_RTAS_CONSOLE -udbg_init_rtas_console (); -#endif -
I'd like to see it still guarded by UDBG_RTAS_CONSOLE, otherwise there's no way to select a different type of early console on a machine which has those tokens in the device tree.
cheers
Signature · 8 lines
Michael Ellerman IBM OzLabs 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
Quoted 31 lines · In message <[email protected]> you wrote:
--=-PNKyW5KJv4630LcmkXVt
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printableQuoted 5 lines · Michael Neuling
The RTAS console doesn't have to be Cell specific. If we have both the put and get char RTAS functions, init the rtas console. =20
Index:linux-2.6-ozlabs/arch/powerpc/kernel/rtas.c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Quoted 12 lines
arch/powerpc/kernel/rtas.c +5
-0@@ -910,6 +910,11 @@ int __init early_init_dt_scan_rtas(unsig basep =3D of_get_flat_dt_prop(node, "get-term-char", NULL);if (basep) rtas_getchar_token =3D *basep; + + if (rtas_putchar_token !=3D RTAS_UNKNOWN_SERVICE && + rtas_getchar_token !=3D RTAS_UNKNOWN_SERVICE) +udbg_init_rtas_console (); +#endif Quoted 4 lines
=20
/* break now */
Index:linux-2.6-ozlabs/arch/powerpc/platforms/cell/setup.c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Quoted 14 lines
arch/powerpc/platforms/cell/setup.c static int __init cell_probe(void) · line 156
Quoted 10 lines
arch/powerpc/platforms/cell/setup.c +0
-0@@ -150,10 +150,6 @@ static int __init cell_probe(void) !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))return 0 ;=20
arch/powerpc/platforms/cell/setup.c +0
-4-#ifdef CONFIG_UDBG_RTAS_CONSOLE -udbg_init_rtas_console (); -#endif -I'd like to see it still guarded by
UDBG_RTAS_CONSOLE, otherwise there's no way to select a different type of early console on a machine which has those tokens in the device tree.
Agreed but that section in rtas.c is already guarded by UDBG_RTAS_CONSOLE. After applying the patch, it looks like:
#ifdef CONFIG_UDBG_RTAS_CONSOLE basep = of_get_flat_dt_prop(node, "put-term-char", NULL); if (basep) rtas_putchar_token = *basep; basep = of_get_flat_dt_prop(node, "get-term-char", NULL); if (basep) rtas_getchar_token = *basep; if (rtas_putchar_token != RTAS_UNKNOWN_SERVICE && rtas_getchar_token != RTAS_UNKNOWN_SERVICE) udbg_init_rtas_console();
#endif
Mikey
Quoted 63 lines · Michael Neuling
Quoted 31 lines · In message <[email protected]> you wrote:
--=-PNKyW5KJv4630LcmkXVt
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printableQuoted 5 lines · Michael Neuling
The RTAS console doesn't have to be Cell specific. If we have both the put and get char RTAS functions, init the rtas console. =20
Index:linux-2.6-ozlabs/arch/powerpc/kernel/rtas.c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Quoted 12 lines
arch/powerpc/kernel/rtas.c +5
-0@@ -910,6 +910,11 @@ int __init early_init_dt_scan_rtas(unsig basep =3D of_get_flat_dt_prop(node, "get-term-char", NULL);if (basep) rtas_getchar_token =3D *basep; + + if (rtas_putchar_token !=3D RTAS_UNKNOWN_SERVICE && + rtas_getchar_token !=3D RTAS_UNKNOWN_SERVICE) +udbg_init_rtas_console (); +#endif Quoted 4 lines
=20
/* break now */
Index:linux-2.6-ozlabs/arch/powerpc/platforms/cell/setup.c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Quoted 14 lines
arch/powerpc/platforms/cell/setup.c static int __init cell_probe(void) · line 156
Quoted 10 lines
arch/powerpc/platforms/cell/setup.c +0
-0@@ -150,10 +150,6 @@ static int __init cell_probe(void) !of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))return 0 ;=20
arch/powerpc/platforms/cell/setup.c +0
-4-#ifdef CONFIG_UDBG_RTAS_CONSOLE -udbg_init_rtas_console (); -#endif -I'd like to see it still guarded by
UDBG_RTAS_CONSOLE, otherwise there's no way to select a different type of early console on a machine which has those tokens in the device tree.Agreed but that section in
rtas.cis already guarded byUDBG_RTAS_CONSOLE. After applying the patch, it looks like:#ifdef CONFIG_UDBG_RTAS_CONSOLE basep = of_get_flat_dt_prop(node, "put-term-char", NULL); if (basep) rtas_putchar_token = *basep; basep = of_get_flat_dt_prop(node, "get-term-char", NULL); if (basep) rtas_getchar_token = *basep; if (rtas_putchar_token != RTAS_UNKNOWN_SERVICE && rtas_getchar_token != RTAS_UNKNOWN_SERVICE) udbg_init_rtas_console();
Quoted 1 line
#endif
Ah sorry, I just looked at the patch.
cheers
Signature · 8 lines
Michael Ellerman IBM OzLabs 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