aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c4
-rw-r--r--arch/powerpc/kernel/rtas.c111
-rw-r--r--arch/powerpc/kernel/time.c5
-rw-r--r--arch/powerpc/kernel/vdso.c11
-rw-r--r--arch/powerpc/kernel/vdso32/cacheflush.S41
-rw-r--r--arch/powerpc/kernel/vdso64/cacheflush.S41
-rw-r--r--arch/powerpc/mm/stab.c1
-rw-r--r--arch/powerpc/platforms/40x/walnut.c3
-rw-r--r--arch/powerpc/platforms/44x/bamboo.c3
-rw-r--r--arch/powerpc/platforms/44x/ebony.c3
-rw-r--r--arch/powerpc/platforms/44x/sequoia.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c1
-rw-r--r--arch/powerpc/platforms/embedded6xx/prpmc2800.c1
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c2
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c3
-rw-r--r--arch/powerpc/sysdev/uic.c18
17 files changed, 172 insertions, 81 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 2c8e756d19a3..d67bcd84f329 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -284,6 +284,10 @@ int main(void)
284 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32)); 284 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
285 DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec)); 285 DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
286 DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); 286 DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
287 DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size));
288 DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size));
289 DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size));
290 DEFINE(CFG_DCACHE_LOGBLOCKSZ, offsetof(struct vdso_data, dcache_log_block_size));
287#ifdef CONFIG_PPC64 291#ifdef CONFIG_PPC64
288 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64)); 292 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64));
289 DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); 293 DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec));
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 214780798289..053cac19f714 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -19,6 +19,9 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/capability.h> 20#include <linux/capability.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/smp.h>
23#include <linux/completion.h>
24#include <linux/cpumask.h>
22 25
23#include <asm/prom.h> 26#include <asm/prom.h>
24#include <asm/rtas.h> 27#include <asm/rtas.h>
@@ -34,6 +37,8 @@
34#include <asm/lmb.h> 37#include <asm/lmb.h>
35#include <asm/udbg.h> 38#include <asm/udbg.h>
36#include <asm/syscalls.h> 39#include <asm/syscalls.h>
40#include <asm/smp.h>
41#include <asm/atomic.h>
37 42
38struct rtas_t rtas = { 43struct rtas_t rtas = {
39 .lock = SPIN_LOCK_UNLOCKED 44 .lock = SPIN_LOCK_UNLOCKED
@@ -41,8 +46,10 @@ struct rtas_t rtas = {
41EXPORT_SYMBOL(rtas); 46EXPORT_SYMBOL(rtas);
42 47
43struct rtas_suspend_me_data { 48struct rtas_suspend_me_data {
44 long waiting; 49 atomic_t working; /* number of cpus accessing this struct */
45 struct rtas_args *args; 50 int token; /* ibm,suspend-me */
51 int error;
52 struct completion *complete; /* wait on this until working == 0 */
46}; 53};
47 54
48DEFINE_SPINLOCK(rtas_data_buf_lock); 55DEFINE_SPINLOCK(rtas_data_buf_lock);
@@ -631,18 +638,18 @@ void rtas_halt(void)
631/* Must be in the RMO region, so we place it here */ 638/* Must be in the RMO region, so we place it here */
632static char rtas_os_term_buf[2048]; 639static char rtas_os_term_buf[2048];
633 640
634void rtas_os_term(char *str) 641void rtas_panic_msg(char *str)
635{ 642{
636 int status; 643 snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
644}
637 645
638 if (panic_timeout) 646void rtas_os_term(void)
639 return; 647{
648 int status;
640 649
641 if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) 650 if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
642 return; 651 return;
643 652
644 snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
645
646 do { 653 do {
647 status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, 654 status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
648 __pa(rtas_os_term_buf)); 655 __pa(rtas_os_term_buf));
@@ -657,50 +664,62 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;
657#ifdef CONFIG_PPC_PSERIES 664#ifdef CONFIG_PPC_PSERIES
658static void rtas_percpu_suspend_me(void *info) 665static void rtas_percpu_suspend_me(void *info)
659{ 666{
660 int i;
661 long rc; 667 long rc;
662 long flags; 668 unsigned long msr_save;
669 int cpu;
663 struct rtas_suspend_me_data *data = 670 struct rtas_suspend_me_data *data =
664 (struct rtas_suspend_me_data *)info; 671 (struct rtas_suspend_me_data *)info;
665 672
666 /* 673 atomic_inc(&data->working);
667 * We use "waiting" to indicate our state. As long 674
668 * as it is >0, we are still trying to all join up. 675 /* really need to ensure MSR.EE is off for H_JOIN */
669 * If it goes to 0, we have successfully joined up and 676 msr_save = mfmsr();
670 * one thread got H_CONTINUE. If any error happens, 677 mtmsr(msr_save & ~(MSR_EE));
671 * we set it to <0. 678
672 */ 679 rc = plpar_hcall_norets(H_JOIN);
673 local_irq_save(flags);
674 do {
675 rc = plpar_hcall_norets(H_JOIN);
676 smp_rmb();
677 } while (rc == H_SUCCESS && data->waiting > 0);
678 if (rc == H_SUCCESS)
679 goto out;
680 680
681 if (rc == H_CONTINUE) { 681 mtmsr(msr_save);
682 data->waiting = 0; 682
683 data->args->args[data->args->nargs] = 683 if (rc == H_SUCCESS) {
684 rtas_call(ibm_suspend_me_token, 0, 1, NULL); 684 /* This cpu was prodded and the suspend is complete. */
685 for_each_possible_cpu(i) 685 goto out;
686 plpar_hcall_norets(H_PROD,i); 686 } else if (rc == H_CONTINUE) {
687 /* All other cpus are in H_JOIN, this cpu does
688 * the suspend.
689 */
690 printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n",
691 smp_processor_id());
692 data->error = rtas_call(data->token, 0, 1, NULL);
693
694 if (data->error)
695 printk(KERN_DEBUG "ibm,suspend-me returned %d\n",
696 data->error);
687 } else { 697 } else {
688 data->waiting = -EBUSY; 698 printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n",
689 printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); 699 smp_processor_id(), rc);
700 data->error = rc;
690 } 701 }
691 702 /* This cpu did the suspend or got an error; in either case,
703 * we need to prod all other other cpus out of join state.
704 * Extra prods are harmless.
705 */
706 for_each_online_cpu(cpu)
707 plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu));
692out: 708out:
693 local_irq_restore(flags); 709 if (atomic_dec_return(&data->working) == 0)
694 return; 710 complete(data->complete);
695} 711}
696 712
697static int rtas_ibm_suspend_me(struct rtas_args *args) 713static int rtas_ibm_suspend_me(struct rtas_args *args)
698{ 714{
699 int i;
700 long state; 715 long state;
701 long rc; 716 long rc;
702 unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; 717 unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
703 struct rtas_suspend_me_data data; 718 struct rtas_suspend_me_data data;
719 DECLARE_COMPLETION_ONSTACK(done);
720
721 if (!rtas_service_present("ibm,suspend-me"))
722 return -ENOSYS;
704 723
705 /* Make sure the state is valid */ 724 /* Make sure the state is valid */
706 rc = plpar_hcall(H_VASI_STATE, retbuf, 725 rc = plpar_hcall(H_VASI_STATE, retbuf,
@@ -721,25 +740,23 @@ static int rtas_ibm_suspend_me(struct rtas_args *args)
721 return 0; 740 return 0;
722 } 741 }
723 742
724 data.waiting = 1; 743 atomic_set(&data.working, 0);
725 data.args = args; 744 data.token = rtas_token("ibm,suspend-me");
745 data.error = 0;
746 data.complete = &done;
726 747
727 /* Call function on all CPUs. One of us will make the 748 /* Call function on all CPUs. One of us will make the
728 * rtas call 749 * rtas call
729 */ 750 */
730 if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0)) 751 if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))
731 data.waiting = -EINVAL; 752 data.error = -EINVAL;
732 753
733 if (data.waiting != 0) 754 wait_for_completion(&done);
734 printk(KERN_ERR "Error doing global join\n");
735 755
736 /* Prod each CPU. This won't hurt, and will wake 756 if (data.error != 0)
737 * anyone we successfully put to sleep with H_JOIN. 757 printk(KERN_ERR "Error doing global join\n");
738 */
739 for_each_possible_cpu(i)
740 plpar_hcall_norets(H_PROD, i);
741 758
742 return data.waiting; 759 return data.error;
743} 760}
744#else /* CONFIG_PPC_PSERIES */ 761#else /* CONFIG_PPC_PSERIES */
745static int rtas_ibm_suspend_me(struct rtas_args *args) 762static int rtas_ibm_suspend_me(struct rtas_args *args)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index c0d77723ba11..a925a8eae121 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -241,8 +241,9 @@ void account_system_vtime(struct task_struct *tsk)
241 /* deltascaled includes both user and system time. 241 /* deltascaled includes both user and system time.
242 * Hence scale it based on the purr ratio to estimate 242 * Hence scale it based on the purr ratio to estimate
243 * the system time */ 243 * the system time */
244 deltascaled = deltascaled * get_paca()->system_time / 244 if (get_paca()->user_time)
245 (get_paca()->system_time + get_paca()->user_time); 245 deltascaled = deltascaled * get_paca()->system_time /
246 (get_paca()->system_time + get_paca()->user_time);
246 delta += get_paca()->system_time; 247 delta += get_paca()->system_time;
247 get_paca()->system_time = 0; 248 get_paca()->system_time = 0;
248 } 249 }
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index 2322ba5cce4c..3702df7dc567 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -699,11 +699,22 @@ static int __init vdso_init(void)
699 vdso_data->icache_size = ppc64_caches.isize; 699 vdso_data->icache_size = ppc64_caches.isize;
700 vdso_data->icache_line_size = ppc64_caches.iline_size; 700 vdso_data->icache_line_size = ppc64_caches.iline_size;
701 701
702 /* XXXOJN: Blocks should be added to ppc64_caches and used instead */
703 vdso_data->dcache_block_size = ppc64_caches.dline_size;
704 vdso_data->icache_block_size = ppc64_caches.iline_size;
705 vdso_data->dcache_log_block_size = ppc64_caches.log_dline_size;
706 vdso_data->icache_log_block_size = ppc64_caches.log_iline_size;
707
702 /* 708 /*
703 * Calculate the size of the 64 bits vDSO 709 * Calculate the size of the 64 bits vDSO
704 */ 710 */
705 vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; 711 vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT;
706 DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages); 712 DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages);
713#else
714 vdso_data->dcache_block_size = L1_CACHE_BYTES;
715 vdso_data->dcache_log_block_size = L1_CACHE_SHIFT;
716 vdso_data->icache_block_size = L1_CACHE_BYTES;
717 vdso_data->icache_log_block_size = L1_CACHE_SHIFT;
707#endif /* CONFIG_PPC64 */ 718#endif /* CONFIG_PPC64 */
708 719
709 720
diff --git a/arch/powerpc/kernel/vdso32/cacheflush.S b/arch/powerpc/kernel/vdso32/cacheflush.S
index 9cb319992c38..1ba6feb71b31 100644
--- a/arch/powerpc/kernel/vdso32/cacheflush.S
+++ b/arch/powerpc/kernel/vdso32/cacheflush.S
@@ -23,29 +23,46 @@
23 * 23 *
24 * Flushes the data cache & invalidate the instruction cache for the 24 * Flushes the data cache & invalidate the instruction cache for the
25 * provided range [start, end[ 25 * provided range [start, end[
26 *
27 * Note: all CPUs supported by this kernel have a 128 bytes cache
28 * line size so we don't have to peek that info from the datapage
29 */ 26 */
30V_FUNCTION_BEGIN(__kernel_sync_dicache) 27V_FUNCTION_BEGIN(__kernel_sync_dicache)
31 .cfi_startproc 28 .cfi_startproc
32 li r5,127 29 mflr r12
33 andc r6,r3,r5 /* round low to line bdy */ 30 .cfi_register lr,r12
31 mr r11,r3
32 bl __get_datapage@local
33 mtlr r12
34 mr r10,r3
35
36 lwz r7,CFG_DCACHE_BLOCKSZ(r10)
37 addi r5,r7,-1
38 andc r6,r11,r5 /* round low to line bdy */
34 subf r8,r6,r4 /* compute length */ 39 subf r8,r6,r4 /* compute length */
35 add r8,r8,r5 /* ensure we get enough */ 40 add r8,r8,r5 /* ensure we get enough */
36 srwi. r8,r8,7 /* compute line count */ 41 lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10)
42 srw. r8,r8,r9 /* compute line count */
37 crclr cr0*4+so 43 crclr cr0*4+so
38 beqlr /* nothing to do? */ 44 beqlr /* nothing to do? */
39 mtctr r8 45 mtctr r8
40 mr r3,r6 461: dcbst 0,r6
411: dcbst 0,r3 47 add r6,r6,r7
42 addi r3,r3,128
43 bdnz 1b 48 bdnz 1b
44 sync 49 sync
50
51/* Now invalidate the instruction cache */
52
53 lwz r7,CFG_ICACHE_BLOCKSZ(r10)
54 addi r5,r7,-1
55 andc r6,r11,r5 /* round low to line bdy */
56 subf r8,r6,r4 /* compute length */
57 add r8,r8,r5
58 lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10)
59 srw. r8,r8,r9 /* compute line count */
60 crclr cr0*4+so
61 beqlr /* nothing to do? */
45 mtctr r8 62 mtctr r8
461: icbi 0,r6 632: icbi 0,r6
47 addi r6,r6,128 64 add r6,r6,r7
48 bdnz 1b 65 bdnz 2b
49 isync 66 isync
50 li r3,0 67 li r3,0
51 blr 68 blr
diff --git a/arch/powerpc/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S
index 66a36d3cc6ad..69c5af2b3c96 100644
--- a/arch/powerpc/kernel/vdso64/cacheflush.S
+++ b/arch/powerpc/kernel/vdso64/cacheflush.S
@@ -23,29 +23,46 @@
23 * 23 *
24 * Flushes the data cache & invalidate the instruction cache for the 24 * Flushes the data cache & invalidate the instruction cache for the
25 * provided range [start, end[ 25 * provided range [start, end[
26 *
27 * Note: all CPUs supported by this kernel have a 128 bytes cache
28 * line size so we don't have to peek that info from the datapage
29 */ 26 */
30V_FUNCTION_BEGIN(__kernel_sync_dicache) 27V_FUNCTION_BEGIN(__kernel_sync_dicache)
31 .cfi_startproc 28 .cfi_startproc
32 li r5,127 29 mflr r12
33 andc r6,r3,r5 /* round low to line bdy */ 30 .cfi_register lr,r12
31 mr r11,r3
32 bl V_LOCAL_FUNC(__get_datapage)
33 mtlr r12
34 mr r10,r3
35
36 lwz r7,CFG_DCACHE_BLOCKSZ(r10)
37 addi r5,r7,-1
38 andc r6,r11,r5 /* round low to line bdy */
34 subf r8,r6,r4 /* compute length */ 39 subf r8,r6,r4 /* compute length */
35 add r8,r8,r5 /* ensure we get enough */ 40 add r8,r8,r5 /* ensure we get enough */
36 srwi. r8,r8,7 /* compute line count */ 41 lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10)
42 srw. r8,r8,r9 /* compute line count */
37 crclr cr0*4+so 43 crclr cr0*4+so
38 beqlr /* nothing to do? */ 44 beqlr /* nothing to do? */
39 mtctr r8 45 mtctr r8
40 mr r3,r6 461: dcbst 0,r6
411: dcbst 0,r3 47 add r6,r6,r7
42 addi r3,r3,128
43 bdnz 1b 48 bdnz 1b
44 sync 49 sync
50
51/* Now invalidate the instruction cache */
52
53 lwz r7,CFG_ICACHE_BLOCKSZ(r10)
54 addi r5,r7,-1
55 andc r6,r11,r5 /* round low to line bdy */
56 subf r8,r6,r4 /* compute length */
57 add r8,r8,r5
58 lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10)
59 srw. r8,r8,r9 /* compute line count */
60 crclr cr0*4+so
61 beqlr /* nothing to do? */
45 mtctr r8 62 mtctr r8
461: icbi 0,r6 632: icbi 0,r6
47 addi r6,r6,128 64 add r6,r6,r7
48 bdnz 1b 65 bdnz 2b
49 isync 66 isync
50 li r3,0 67 li r3,0
51 blr 68 blr
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 9e85bda76216..50448d5de9d2 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -20,6 +20,7 @@
20#include <asm/lmb.h> 20#include <asm/lmb.h>
21#include <asm/abs_addr.h> 21#include <asm/abs_addr.h>
22#include <asm/firmware.h> 22#include <asm/firmware.h>
23#include <asm/iseries/hv_call.h>
23 24
24struct stab_entry { 25struct stab_entry {
25 unsigned long esid_data; 26 unsigned long esid_data;
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index eb0c136b1c44..ff6db2431798 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -17,12 +17,13 @@
17 */ 17 */
18 18
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/of_platform.h>
21
20#include <asm/machdep.h> 22#include <asm/machdep.h>
21#include <asm/prom.h> 23#include <asm/prom.h>
22#include <asm/udbg.h> 24#include <asm/udbg.h>
23#include <asm/time.h> 25#include <asm/time.h>
24#include <asm/uic.h> 26#include <asm/uic.h>
25#include <asm/of_platform.h>
26 27
27static struct of_device_id walnut_of_bus[] = { 28static struct of_device_id walnut_of_bus[] = {
28 { .compatible = "ibm,plb3", }, 29 { .compatible = "ibm,plb3", },
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index 470e1a3fd755..be23f112184f 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -14,12 +14,13 @@
14 * option) any later version. 14 * option) any later version.
15 */ 15 */
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/of_platform.h>
18
17#include <asm/machdep.h> 19#include <asm/machdep.h>
18#include <asm/prom.h> 20#include <asm/prom.h>
19#include <asm/udbg.h> 21#include <asm/udbg.h>
20#include <asm/time.h> 22#include <asm/time.h>
21#include <asm/uic.h> 23#include <asm/uic.h>
22#include <asm/of_platform.h>
23#include "44x.h" 24#include "44x.h"
24 25
25static struct of_device_id bamboo_of_bus[] = { 26static struct of_device_id bamboo_of_bus[] = {
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 40e18fcb666c..6cd3476767cc 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -17,12 +17,13 @@
17 */ 17 */
18 18
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/of_platform.h>
21
20#include <asm/machdep.h> 22#include <asm/machdep.h>
21#include <asm/prom.h> 23#include <asm/prom.h>
22#include <asm/udbg.h> 24#include <asm/udbg.h>
23#include <asm/time.h> 25#include <asm/time.h>
24#include <asm/uic.h> 26#include <asm/uic.h>
25#include <asm/of_platform.h>
26 27
27#include "44x.h" 28#include "44x.h"
28 29
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index 30700b31d43b..21a9dd14f297 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -14,12 +14,13 @@
14 * option) any later version. 14 * option) any later version.
15 */ 15 */
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/of_platform.h>
18
17#include <asm/machdep.h> 19#include <asm/machdep.h>
18#include <asm/prom.h> 20#include <asm/prom.h>
19#include <asm/udbg.h> 21#include <asm/udbg.h>
20#include <asm/time.h> 22#include <asm/time.h>
21#include <asm/uic.h> 23#include <asm/uic.h>
22#include <asm/of_platform.h>
23#include "44x.h" 24#include "44x.h"
24 25
25static struct of_device_id sequoia_of_bus[] = { 26static struct of_device_id sequoia_of_bus[] = {
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 0966d093db43..c0e968a4c211 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -171,6 +171,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir)
171{ 171{
172 /* remove all entries */ 172 /* remove all entries */
173 spufs_prune_dir(dir); 173 spufs_prune_dir(dir);
174 d_drop(dir);
174 175
175 return simple_rmdir(parent, dir); 176 return simple_rmdir(parent, dir);
176} 177}
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
index e484cac75095..653a5eb91c90 100644
--- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -144,6 +144,7 @@ static int __init prpmc2800_probe(void)
144 strncpy(prpmc2800_platform_name, m, 144 strncpy(prpmc2800_platform_name, m,
145 min((int)len, PLATFORM_NAME_MAX - 1)); 145 min((int)len, PLATFORM_NAME_MAX - 1));
146 146
147 _set_L2CR(_get_L2CR() | L2CR_L2E);
147 return 1; 148 return 1;
148} 149}
149 150
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 3a5d112af5e0..3d62060498b4 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -214,7 +214,7 @@ static __init void pas_init_IRQ(void)
214 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 214 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
215 215
216 mpic = mpic_alloc(mpic_node, openpic_addr, 216 mpic = mpic_alloc(mpic_node, openpic_addr,
217 MPIC_PRIMARY|MPIC_LARGE_VECTORS|MPIC_WANTS_RESET, 217 MPIC_PRIMARY|MPIC_LARGE_VECTORS,
218 0, 0, " PAS-OPIC "); 218 0, 0, " PAS-OPIC ");
219 BUG_ON(!mpic); 219 BUG_ON(!mpic);
220 220
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 16e4e401b820..306a9d07491d 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -21,7 +21,7 @@ config PPC_SPLPAR
21 21
22config EEH 22config EEH
23 bool "PCI Extended Error Handling (EEH)" if EMBEDDED 23 bool "PCI Extended Error Handling (EEH)" if EMBEDDED
24 depends on PPC_PSERIES 24 depends on PPC_PSERIES && PCI
25 default y if !EMBEDDED 25 default y if !EMBEDDED
26 26
27config SCANLOG 27config SCANLOG
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index fdb9b1c8f977..fdeefe54ea91 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -507,7 +507,8 @@ define_machine(pseries) {
507 .restart = rtas_restart, 507 .restart = rtas_restart,
508 .power_off = pSeries_power_off, 508 .power_off = pSeries_power_off,
509 .halt = rtas_halt, 509 .halt = rtas_halt,
510 .panic = rtas_os_term, 510 .panic = rtas_panic_msg,
511 .machine_shutdown = rtas_os_term,
511 .get_boot_time = rtas_get_boot_time, 512 .get_boot_time = rtas_get_boot_time,
512 .get_rtc_time = rtas_get_rtc_time, 513 .get_rtc_time = rtas_get_rtc_time,
513 .set_rtc_time = rtas_set_rtc_time, 514 .set_rtc_time = rtas_set_rtc_time,
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index 5149716c734d..847a5496b869 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -97,6 +97,22 @@ static void uic_ack_irq(unsigned int virq)
97 spin_unlock_irqrestore(&uic->lock, flags); 97 spin_unlock_irqrestore(&uic->lock, flags);
98} 98}
99 99
100static void uic_mask_ack_irq(unsigned int virq)
101{
102 struct uic *uic = get_irq_chip_data(virq);
103 unsigned int src = uic_irq_to_hw(virq);
104 unsigned long flags;
105 u32 er, sr;
106
107 sr = 1 << (31-src);
108 spin_lock_irqsave(&uic->lock, flags);
109 er = mfdcr(uic->dcrbase + UIC_ER);
110 er &= ~sr;
111 mtdcr(uic->dcrbase + UIC_ER, er);
112 mtdcr(uic->dcrbase + UIC_SR, sr);
113 spin_unlock_irqrestore(&uic->lock, flags);
114}
115
100static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) 116static int uic_set_irq_type(unsigned int virq, unsigned int flow_type)
101{ 117{
102 struct uic *uic = get_irq_chip_data(virq); 118 struct uic *uic = get_irq_chip_data(virq);
@@ -152,7 +168,7 @@ static struct irq_chip uic_irq_chip = {
152 .typename = " UIC ", 168 .typename = " UIC ",
153 .unmask = uic_unmask_irq, 169 .unmask = uic_unmask_irq,
154 .mask = uic_mask_irq, 170 .mask = uic_mask_irq,
155/* .mask_ack = uic_mask_irq_and_ack, */ 171 .mask_ack = uic_mask_ack_irq,
156 .ack = uic_ack_irq, 172 .ack = uic_ack_irq,
157 .set_type = uic_set_irq_type, 173 .set_type = uic_set_irq_type,
158}; 174};