[ppc64] various trivial patches


---

 arch/ppc64/Kconfig             |    2 +-
 arch/ppc64/kernel/chrp_setup.c |   22 +++++++++++++++-------
 arch/ppc64/kernel/entry.S      |    6 ++++++
 arch/ppc64/kernel/proc_pmc.c   |    2 --
 arch/ppc64/kernel/rtas_flash.c |    1 +
 arch/ppc64/kernel/smp.c        |    3 ++-
 6 files changed, 25 insertions(+), 11 deletions(-)

diff -puN arch/ppc64/kernel/chrp_setup.c~ppc64-trivial arch/ppc64/kernel/chrp_setup.c
--- 25/arch/ppc64/kernel/chrp_setup.c~ppc64-trivial	2004-01-13 23:22:02.000000000 -0800
+++ 25-akpm/arch/ppc64/kernel/chrp_setup.c	2004-01-13 23:22:02.000000000 -0800
@@ -234,6 +234,10 @@ void __init
 chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
 	  unsigned long r6, unsigned long r7)
 {
+	struct device_node * dn;
+	char * hypertas;
+	unsigned int len;
+
 #if 0 /* PPPBBB remove this later... -Peter */
 #ifdef CONFIG_BLK_DEV_INITRD
 	/* take care of initrd if we have one */
@@ -273,15 +277,12 @@ chrp_init(unsigned long r3, unsigned lon
          * using contents of device-tree/ibm,hypertas-functions.
          * Ultimately this functionality may be moved into prom.c prom_init().
          */
-	struct device_node * dn;
-	char * hypertas;
-	unsigned int len;
 	dn = of_find_node_by_path("/rtas");
 	cur_cpu_spec->firmware_features = 0;
 	hypertas = get_property(dn, "ibm,hypertas-functions", &len);
 	if (hypertas) {
 	    while (len > 0){
-		int i;
+		int i, hypertas_len;
 		/* check value against table of strings */
 		for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) {
 		    if ((firmware_features_table[i].name) && (strcmp(firmware_features_table[i].name,hypertas))==0) {
@@ -290,7 +291,7 @@ chrp_init(unsigned long r3, unsigned lon
 			break;
 		    } 
 		}
-		int hypertas_len = strlen(hypertas);
+		hypertas_len = strlen(hypertas);
 		len -= hypertas_len +1;
 		hypertas+= hypertas_len +1;
 	    }
@@ -325,6 +326,13 @@ chrp_progress(char *s, unsigned short he
 		display_character = rtas_token("display-character");
 		set_indicator = rtas_token("set-indicator");
 	}
+	if (display_character == RTAS_UNKNOWN_SERVICE) {
+		/* use hex display */
+		if (set_indicator == RTAS_UNKNOWN_SERVICE)
+			return;
+		rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
+		return;
+	}
 
 	if(display_character == RTAS_UNKNOWN_SERVICE) {
 		/* use hex display if available */
@@ -430,10 +438,10 @@ void __init pSeries_calibrate_decr(void)
 	ppc_proc_freq = processor_freq;
 	of_node_put(cpu);
 
-        printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
+	printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
 	       freq/1000000, freq%1000000);
 	printk("time_init: processor frequency   = %lu.%.6lu MHz\n",
-		processor_freq/1000000, processor_freq%1000000);
+	       processor_freq/1000000, processor_freq%1000000);
 
 	tb_ticks_per_jiffy = freq / HZ;
 	tb_ticks_per_sec = tb_ticks_per_jiffy * HZ;
diff -puN arch/ppc64/kernel/rtas_flash.c~ppc64-trivial arch/ppc64/kernel/rtas_flash.c
--- 25/arch/ppc64/kernel/rtas_flash.c~ppc64-trivial	2004-01-13 23:22:02.000000000 -0800
+++ 25-akpm/arch/ppc64/kernel/rtas_flash.c	2004-01-13 23:22:02.000000000 -0800
@@ -17,6 +17,7 @@
 #include <linux/proc_fs.h>
 #include <linux/init.h>
 #include <asm/uaccess.h>
+#include <asm/proc_fs.h>
 #include <asm/rtas.h>
 
 #define MODULE_VERSION "1.0"
diff -puN arch/ppc64/kernel/smp.c~ppc64-trivial arch/ppc64/kernel/smp.c
--- 25/arch/ppc64/kernel/smp.c~ppc64-trivial	2004-01-13 23:22:02.000000000 -0800
+++ 25-akpm/arch/ppc64/kernel/smp.c	2004-01-13 23:22:02.000000000 -0800
@@ -295,6 +295,8 @@ smp_xics_message_pass(int target, int ms
 	}
 }
 
+extern void xics_request_IPIs(void);
+
 static int __init smp_xics_probe(void)
 {
 	int i;
@@ -305,7 +307,6 @@ static int __init smp_xics_probe(void)
 			nr_cpus++;
 	}
 #ifdef CONFIG_SMP
-	extern void xics_request_IPIs(void);
 	xics_request_IPIs();
 #endif
 
diff -puN arch/ppc64/Kconfig~ppc64-trivial arch/ppc64/Kconfig
--- 25/arch/ppc64/Kconfig~ppc64-trivial	2004-01-13 23:22:02.000000000 -0800
+++ 25-akpm/arch/ppc64/Kconfig	2004-01-13 23:22:02.000000000 -0800
@@ -318,7 +318,7 @@ endmenu
 
 config VIOPATH
 	bool
-	depends on PPC_ISERIES
+	depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || VETH
 	default y
 
 source "arch/ppc64/oprofile/Kconfig"
diff -puN arch/ppc64/kernel/entry.S~ppc64-trivial arch/ppc64/kernel/entry.S
--- 25/arch/ppc64/kernel/entry.S~ppc64-trivial	2004-01-13 23:22:02.000000000 -0800
+++ 25-akpm/arch/ppc64/kernel/entry.S	2004-01-13 23:22:02.000000000 -0800
@@ -498,6 +498,12 @@ _STATIC(rtas_return_loc)
 	mfspr	r4,SPRG3	        /* Get PACA */
 	SET_REG_TO_CONST(r5, KERNELBASE)
         sub     r4,r4,r5                /* RELOC the PACA base pointer */
+
+	mfmsr   r6
+	li	r0,MSR_RI
+	andc	r6,r6,r0
+	sync	
+	mtmsrd  r6
         
         ld	r1,PACAR1(r4)           /* Restore our SP */
 	LOADADDR(r3,.rtas_restore_regs)
diff -puN arch/ppc64/kernel/proc_pmc.c~ppc64-trivial arch/ppc64/kernel/proc_pmc.c
--- 25/arch/ppc64/kernel/proc_pmc.c~ppc64-trivial	2004-01-13 23:22:02.000000000 -0800
+++ 25-akpm/arch/ppc64/kernel/proc_pmc.c	2004-01-13 23:22:02.000000000 -0800
@@ -44,8 +44,6 @@
 
 static int proc_pmc_control_mode = 0;
 
-static struct proc_dir_entry *proc_ppc64_root = NULL;
-static struct proc_dir_entry *proc_ppc64_pmc_root = NULL;
 static struct proc_dir_entry *proc_ppc64_pmc_system_root = NULL;
 static struct proc_dir_entry *proc_ppc64_pmc_cpu_root[NR_CPUS] = {NULL, };
 

_