From ebcaf5e8ef649f18f675bae864a2b1b44630d10e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 18 Jan 2004 18:13:05 -0800 Subject: [PATCH] [PATCH] ppc64: various trivial patches From: Anton Blanchard 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 --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig index ed77dfb1106af..156d66bc7c4e0 100644 --- a/arch/ppc64/Kconfig +++ b/arch/ppc64/Kconfig @@ -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 --git a/arch/ppc64/kernel/chrp_setup.c b/arch/ppc64/kernel/chrp_setup.c index 751e3cb8460ca..030eadabde97e 100644 --- a/arch/ppc64/kernel/chrp_setup.c +++ b/arch/ppc64/kernel/chrp_setup.c @@ -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 long r4, unsigned long r5, * 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 long r4, unsigned long r5, 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 hex) 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 --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S index b538e146bc091..418fe582d83f7 100644 --- a/arch/ppc64/kernel/entry.S +++ b/arch/ppc64/kernel/entry.S @@ -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 --git a/arch/ppc64/kernel/proc_pmc.c b/arch/ppc64/kernel/proc_pmc.c index 349e4cd39a77c..a77d2959299bf 100644 --- a/arch/ppc64/kernel/proc_pmc.c +++ b/arch/ppc64/kernel/proc_pmc.c @@ -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, }; diff --git a/arch/ppc64/kernel/rtas_flash.c b/arch/ppc64/kernel/rtas_flash.c index 636fee656773e..92654db84cb89 100644 --- a/arch/ppc64/kernel/rtas_flash.c +++ b/arch/ppc64/kernel/rtas_flash.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #define MODULE_VERSION "1.0" diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c index ef7e2fb384da6..f44fad1908a77 100644 --- a/arch/ppc64/kernel/smp.c +++ b/arch/ppc64/kernel/smp.c @@ -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) { 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 -- 2.53.0