[PATCH] ppc64: Small OF fixes

Anton Blanchard anton at samba.org
Wed Nov 10 16:41:37 EST 2004


Hi,

A few small fixes:

- Check for the model property before using it. Also check for the
  correct property name for nighthawk.
- Check for the existence of freeze-time-base before using it to
  synchronize timebases instead of making it conditional on !LPAR

Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN arch/ppc64/mm/hash_native.c~baremetal1 arch/ppc64/mm/hash_native.c
--- gr_work/arch/ppc64/mm/hash_native.c~baremetal1	2004-11-09 02:49:07.623626848 -0600
+++ gr_work-anton/arch/ppc64/mm/hash_native.c	2004-11-09 14:25:44.100397586 -0600
@@ -405,7 +405,7 @@ void hpte_init_native(void)
 	root = of_find_node_by_path("/");
 	if (root) {
 		model = get_property(root, "model", NULL);
-		if (!strcmp(model, "CHRP IBM,9076-N81")) {
+		if (model && !strcmp(model, "IBM,9076-N81")) {
 			of_node_put(root);
 			goto bail;
 		}
--- gr_work/arch/ppc64/kernel/pSeries_smp.c~baremetal1	2004-11-09 15:52:13.809408014 -0600
+++ gr_work-anton/arch/ppc64/kernel/pSeries_smp.c	2004-11-09 15:56:18.418031140 -0600
@@ -382,12 +382,11 @@ void __init smp_init_pSeries(void)
 		vpa_init(boot_cpuid);
 
 	/* Non-lpar has additional take/give timebase */
-	if (systemcfg->platform == PLATFORM_PSERIES) {
+	if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) {
 		smp_ops->give_timebase = pSeries_give_timebase;
 		smp_ops->take_timebase = pSeries_take_timebase;
 	}
 
-
 	DBG(" <- smp_init_pSeries()\n");
 }
 



More information about the Linuxppc64-dev mailing list