Commit ebcaf5e8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: various trivial patches

From: Anton Blanchard <anton@samba.org>

various trivial patches
parent 50405fa2
...@@ -318,7 +318,7 @@ endmenu ...@@ -318,7 +318,7 @@ endmenu
config VIOPATH config VIOPATH
bool bool
depends on PPC_ISERIES depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || VETH
default y default y
source "arch/ppc64/oprofile/Kconfig" source "arch/ppc64/oprofile/Kconfig"
......
...@@ -234,6 +234,10 @@ void __init ...@@ -234,6 +234,10 @@ void __init
chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7) unsigned long r6, unsigned long r7)
{ {
struct device_node * dn;
char * hypertas;
unsigned int len;
#if 0 /* PPPBBB remove this later... -Peter */ #if 0 /* PPPBBB remove this later... -Peter */
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
/* take care of initrd if we have one */ /* take care of initrd if we have one */
...@@ -273,15 +277,12 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -273,15 +277,12 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
* using contents of device-tree/ibm,hypertas-functions. * using contents of device-tree/ibm,hypertas-functions.
* Ultimately this functionality may be moved into prom.c prom_init(). * 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"); dn = of_find_node_by_path("/rtas");
cur_cpu_spec->firmware_features = 0; cur_cpu_spec->firmware_features = 0;
hypertas = get_property(dn, "ibm,hypertas-functions", &len); hypertas = get_property(dn, "ibm,hypertas-functions", &len);
if (hypertas) { if (hypertas) {
while (len > 0){ while (len > 0){
int i; int i, hypertas_len;
/* check value against table of strings */ /* check value against table of strings */
for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) { for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) {
if ((firmware_features_table[i].name) && (strcmp(firmware_features_table[i].name,hypertas))==0) { if ((firmware_features_table[i].name) && (strcmp(firmware_features_table[i].name,hypertas))==0) {
...@@ -290,7 +291,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -290,7 +291,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
break; break;
} }
} }
int hypertas_len = strlen(hypertas); hypertas_len = strlen(hypertas);
len -= hypertas_len +1; len -= hypertas_len +1;
hypertas+= hypertas_len +1; hypertas+= hypertas_len +1;
} }
...@@ -325,6 +326,13 @@ chrp_progress(char *s, unsigned short hex) ...@@ -325,6 +326,13 @@ chrp_progress(char *s, unsigned short hex)
display_character = rtas_token("display-character"); display_character = rtas_token("display-character");
set_indicator = rtas_token("set-indicator"); 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) { if(display_character == RTAS_UNKNOWN_SERVICE) {
/* use hex display if available */ /* use hex display if available */
......
...@@ -499,6 +499,12 @@ _STATIC(rtas_return_loc) ...@@ -499,6 +499,12 @@ _STATIC(rtas_return_loc)
SET_REG_TO_CONST(r5, KERNELBASE) SET_REG_TO_CONST(r5, KERNELBASE)
sub r4,r4,r5 /* RELOC the PACA base pointer */ 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 */ ld r1,PACAR1(r4) /* Restore our SP */
LOADADDR(r3,.rtas_restore_regs) LOADADDR(r3,.rtas_restore_regs)
ld r4,PACASAVEDMSR(r4) /* Restore our MSR */ ld r4,PACASAVEDMSR(r4) /* Restore our MSR */
......
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
static int proc_pmc_control_mode = 0; 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_system_root = NULL;
static struct proc_dir_entry *proc_ppc64_pmc_cpu_root[NR_CPUS] = {NULL, }; static struct proc_dir_entry *proc_ppc64_pmc_cpu_root[NR_CPUS] = {NULL, };
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/proc_fs.h>
#include <asm/rtas.h> #include <asm/rtas.h>
#define MODULE_VERSION "1.0" #define MODULE_VERSION "1.0"
......
...@@ -295,6 +295,8 @@ smp_xics_message_pass(int target, int msg, unsigned long data, int wait) ...@@ -295,6 +295,8 @@ smp_xics_message_pass(int target, int msg, unsigned long data, int wait)
} }
} }
extern void xics_request_IPIs(void);
static int __init smp_xics_probe(void) static int __init smp_xics_probe(void)
{ {
int i; int i;
...@@ -305,7 +307,6 @@ static int __init smp_xics_probe(void) ...@@ -305,7 +307,6 @@ static int __init smp_xics_probe(void)
nr_cpus++; nr_cpus++;
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern void xics_request_IPIs(void);
xics_request_IPIs(); xics_request_IPIs();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment