aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/align.c12
-rw-r--r--arch/powerpc/kernel/entry_64.S4
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S3
-rw-r--r--arch/powerpc/kernel/idle.c4
-rw-r--r--arch/powerpc/kernel/irq.c6
-rw-r--r--arch/powerpc/kernel/perf_event.c2
-rw-r--r--arch/powerpc/kernel/power5+-pmu.c4
-rw-r--r--arch/powerpc/kernel/power5-pmu.c6
-rw-r--r--arch/powerpc/kernel/power6-pmu.c2
-rw-r--r--arch/powerpc/kernel/power7-pmu.c6
-rw-r--r--arch/powerpc/kernel/ppc970-pmu.c4
-rw-r--r--arch/powerpc/kernel/prom.c23
-rw-r--r--arch/powerpc/kernel/setup-common.c1
-rw-r--r--arch/powerpc/kernel/setup_32.c2
-rw-r--r--arch/powerpc/kernel/setup_64.c2
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c52
-rw-r--r--arch/powerpc/kernel/time.c6
-rw-r--r--arch/powerpc/kernel/traps.c18
18 files changed, 40 insertions, 117 deletions
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index a5b632e52fa..3839839f83c 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -732,7 +732,7 @@ int fix_alignment(struct pt_regs *regs)
732 732
733#ifdef CONFIG_SPE 733#ifdef CONFIG_SPE
734 if ((instr >> 26) == 0x4) { 734 if ((instr >> 26) == 0x4) {
735 PPC_WARN_EMULATED(spe); 735 PPC_WARN_ALIGNMENT(spe, regs);
736 return emulate_spe(regs, reg, instr); 736 return emulate_spe(regs, reg, instr);
737 } 737 }
738#endif 738#endif
@@ -786,7 +786,7 @@ int fix_alignment(struct pt_regs *regs)
786 flags |= SPLT; 786 flags |= SPLT;
787 nb = 8; 787 nb = 8;
788 } 788 }
789 PPC_WARN_EMULATED(vsx); 789 PPC_WARN_ALIGNMENT(vsx, regs);
790 return emulate_vsx(addr, reg, areg, regs, flags, nb); 790 return emulate_vsx(addr, reg, areg, regs, flags, nb);
791 } 791 }
792#endif 792#endif
@@ -794,7 +794,7 @@ int fix_alignment(struct pt_regs *regs)
794 * the exception of DCBZ which is handled as a special case here 794 * the exception of DCBZ which is handled as a special case here
795 */ 795 */
796 if (instr == DCBZ) { 796 if (instr == DCBZ) {
797 PPC_WARN_EMULATED(dcbz); 797 PPC_WARN_ALIGNMENT(dcbz, regs);
798 return emulate_dcbz(regs, addr); 798 return emulate_dcbz(regs, addr);
799 } 799 }
800 if (unlikely(nb == 0)) 800 if (unlikely(nb == 0))
@@ -804,7 +804,7 @@ int fix_alignment(struct pt_regs *regs)
804 * function 804 * function
805 */ 805 */
806 if (flags & M) { 806 if (flags & M) {
807 PPC_WARN_EMULATED(multiple); 807 PPC_WARN_ALIGNMENT(multiple, regs);
808 return emulate_multiple(regs, addr, reg, nb, 808 return emulate_multiple(regs, addr, reg, nb,
809 flags, instr, swiz); 809 flags, instr, swiz);
810 } 810 }
@@ -825,11 +825,11 @@ int fix_alignment(struct pt_regs *regs)
825 825
826 /* Special case for 16-byte FP loads and stores */ 826 /* Special case for 16-byte FP loads and stores */
827 if (nb == 16) { 827 if (nb == 16) {
828 PPC_WARN_EMULATED(fp_pair); 828 PPC_WARN_ALIGNMENT(fp_pair, regs);
829 return emulate_fp_pair(addr, reg, flags); 829 return emulate_fp_pair(addr, reg, flags);
830 } 830 }
831 831
832 PPC_WARN_EMULATED(unaligned); 832 PPC_WARN_ALIGNMENT(unaligned, regs);
833 833
834 /* If we are loading, get the data from user space, else 834 /* If we are loading, get the data from user space, else
835 * get it from register values 835 * get it from register values
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 9763267e38b..bdcb557d470 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -551,7 +551,7 @@ restore:
551BEGIN_FW_FTR_SECTION 551BEGIN_FW_FTR_SECTION
552 ld r5,SOFTE(r1) 552 ld r5,SOFTE(r1)
553FW_FTR_SECTION_ELSE 553FW_FTR_SECTION_ELSE
554 b iseries_check_pending_irqs 554 b .Liseries_check_pending_irqs
555ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES) 555ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
5562: 5562:
557 TRACE_AND_RESTORE_IRQ(r5); 557 TRACE_AND_RESTORE_IRQ(r5);
@@ -623,7 +623,7 @@ ALT_FW_FTR_SECTION_END_IFCLR(FW_FEATURE_ISERIES)
623 623
624#endif /* CONFIG_PPC_BOOK3E */ 624#endif /* CONFIG_PPC_BOOK3E */
625 625
626iseries_check_pending_irqs: 626.Liseries_check_pending_irqs:
627#ifdef CONFIG_PPC_ISERIES 627#ifdef CONFIG_PPC_ISERIES
628 ld r5,SOFTE(r1) 628 ld r5,SOFTE(r1)
629 cmpdi 0,r5,0 629 cmpdi 0,r5,0
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index fc3ead066ce..e3be98ffe2a 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -190,14 +190,17 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
190 * prolog code of the PerformanceMonitor one. A little 190 * prolog code of the PerformanceMonitor one. A little
191 * trickery is thus necessary 191 * trickery is thus necessary
192 */ 192 */
193performance_monitor_pSeries_1:
193 . = 0xf00 194 . = 0xf00
194 DO_KVM 0xf00 195 DO_KVM 0xf00
195 b performance_monitor_pSeries 196 b performance_monitor_pSeries
196 197
198altivec_unavailable_pSeries_1:
197 . = 0xf20 199 . = 0xf20
198 DO_KVM 0xf20 200 DO_KVM 0xf20
199 b altivec_unavailable_pSeries 201 b altivec_unavailable_pSeries
200 202
203vsx_unavailable_pSeries_1:
201 . = 0xf40 204 . = 0xf40
202 DO_KVM 0xf40 205 DO_KVM 0xf40
203 b vsx_unavailable_pSeries 206 b vsx_unavailable_pSeries
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 88d9c1d5e5f..049dda60e47 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -110,18 +110,16 @@ int powersave_nap;
110 */ 110 */
111static ctl_table powersave_nap_ctl_table[]={ 111static ctl_table powersave_nap_ctl_table[]={
112 { 112 {
113 .ctl_name = KERN_PPC_POWERSAVE_NAP,
114 .procname = "powersave-nap", 113 .procname = "powersave-nap",
115 .data = &powersave_nap, 114 .data = &powersave_nap,
116 .maxlen = sizeof(int), 115 .maxlen = sizeof(int),
117 .mode = 0644, 116 .mode = 0644,
118 .proc_handler = &proc_dointvec, 117 .proc_handler = proc_dointvec,
119 }, 118 },
120 {} 119 {}
121}; 120};
122static ctl_table powersave_nap_sysctl_root[] = { 121static ctl_table powersave_nap_sysctl_root[] = {
123 { 122 {
124 .ctl_name = CTL_KERN,
125 .procname = "kernel", 123 .procname = "kernel",
126 .mode = 0555, 124 .mode = 0555,
127 .child = powersave_nap_ctl_table, 125 .child = powersave_nap_ctl_table,
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 042a5300970..f6dca4f4b29 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -70,6 +70,8 @@
70#include <asm/firmware.h> 70#include <asm/firmware.h>
71#include <asm/lv1call.h> 71#include <asm/lv1call.h>
72#endif 72#endif
73#define CREATE_TRACE_POINTS
74#include <asm/trace.h>
73 75
74int __irq_offset_value; 76int __irq_offset_value;
75static int ppc_spurious_interrupts; 77static int ppc_spurious_interrupts;
@@ -340,6 +342,8 @@ void do_IRQ(struct pt_regs *regs)
340 struct pt_regs *old_regs = set_irq_regs(regs); 342 struct pt_regs *old_regs = set_irq_regs(regs);
341 unsigned int irq; 343 unsigned int irq;
342 344
345 trace_irq_entry(regs);
346
343 irq_enter(); 347 irq_enter();
344 348
345 check_stack_overflow(); 349 check_stack_overflow();
@@ -363,6 +367,8 @@ void do_IRQ(struct pt_regs *regs)
363 timer_interrupt(regs); 367 timer_interrupt(regs);
364 } 368 }
365#endif 369#endif
370
371 trace_irq_exit(regs);
366} 372}
367 373
368void __init init_IRQ(void) 374void __init init_IRQ(void)
diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c
index 87f1663584b..1eb85fbf53a 100644
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -1165,7 +1165,7 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
1165 */ 1165 */
1166 if (record) { 1166 if (record) {
1167 struct perf_sample_data data = { 1167 struct perf_sample_data data = {
1168 .addr = 0, 1168 .addr = ~0ULL,
1169 .period = event->hw.last_period, 1169 .period = event->hw.last_period,
1170 }; 1170 };
1171 1171
diff --git a/arch/powerpc/kernel/power5+-pmu.c b/arch/powerpc/kernel/power5+-pmu.c
index 0f4c1c73a6a..199de527d41 100644
--- a/arch/powerpc/kernel/power5+-pmu.c
+++ b/arch/powerpc/kernel/power5+-pmu.c
@@ -73,10 +73,6 @@
73#define MMCR1_PMCSEL_MSK 0x7f 73#define MMCR1_PMCSEL_MSK 0x7f
74 74
75/* 75/*
76 * Bits in MMCRA
77 */
78
79/*
80 * Layout of constraint bits: 76 * Layout of constraint bits:
81 * 6666555555555544444444443333333333222222222211111111110000000000 77 * 6666555555555544444444443333333333222222222211111111110000000000
82 * 3210987654321098765432109876543210987654321098765432109876543210 78 * 3210987654321098765432109876543210987654321098765432109876543210
diff --git a/arch/powerpc/kernel/power5-pmu.c b/arch/powerpc/kernel/power5-pmu.c
index c351b3a57fb..98b6a729a9d 100644
--- a/arch/powerpc/kernel/power5-pmu.c
+++ b/arch/powerpc/kernel/power5-pmu.c
@@ -73,10 +73,6 @@
73#define MMCR1_PMCSEL_MSK 0x7f 73#define MMCR1_PMCSEL_MSK 0x7f
74 74
75/* 75/*
76 * Bits in MMCRA
77 */
78
79/*
80 * Layout of constraint bits: 76 * Layout of constraint bits:
81 * 6666555555555544444444443333333333222222222211111111110000000000 77 * 6666555555555544444444443333333333222222222211111111110000000000
82 * 3210987654321098765432109876543210987654321098765432109876543210 78 * 3210987654321098765432109876543210987654321098765432109876543210
@@ -390,7 +386,7 @@ static int power5_compute_mmcr(u64 event[], int n_ev,
390 unsigned int hwc[], unsigned long mmcr[]) 386 unsigned int hwc[], unsigned long mmcr[])
391{ 387{
392 unsigned long mmcr1 = 0; 388 unsigned long mmcr1 = 0;
393 unsigned long mmcra = 0; 389 unsigned long mmcra = MMCRA_SDAR_DCACHE_MISS | MMCRA_SDAR_ERAT_MISS;
394 unsigned int pmc, unit, byte, psel; 390 unsigned int pmc, unit, byte, psel;
395 unsigned int ttm, grp; 391 unsigned int ttm, grp;
396 int i, isbus, bit, grsel; 392 int i, isbus, bit, grsel;
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c
index ca399ba5034..84a607bda8f 100644
--- a/arch/powerpc/kernel/power6-pmu.c
+++ b/arch/powerpc/kernel/power6-pmu.c
@@ -178,7 +178,7 @@ static int p6_compute_mmcr(u64 event[], int n_ev,
178 unsigned int hwc[], unsigned long mmcr[]) 178 unsigned int hwc[], unsigned long mmcr[])
179{ 179{
180 unsigned long mmcr1 = 0; 180 unsigned long mmcr1 = 0;
181 unsigned long mmcra = 0; 181 unsigned long mmcra = MMCRA_SDAR_DCACHE_MISS | MMCRA_SDAR_ERAT_MISS;
182 int i; 182 int i;
183 unsigned int pmc, ev, b, u, s, psel; 183 unsigned int pmc, ev, b, u, s, psel;
184 unsigned int ttmset = 0; 184 unsigned int ttmset = 0;
diff --git a/arch/powerpc/kernel/power7-pmu.c b/arch/powerpc/kernel/power7-pmu.c
index 28a4daacdc0..852f7b7f6b4 100644
--- a/arch/powerpc/kernel/power7-pmu.c
+++ b/arch/powerpc/kernel/power7-pmu.c
@@ -51,10 +51,6 @@
51#define MMCR1_PMCSEL_MSK 0xff 51#define MMCR1_PMCSEL_MSK 0xff
52 52
53/* 53/*
54 * Bits in MMCRA
55 */
56
57/*
58 * Layout of constraint bits: 54 * Layout of constraint bits:
59 * 6666555555555544444444443333333333222222222211111111110000000000 55 * 6666555555555544444444443333333333222222222211111111110000000000
60 * 3210987654321098765432109876543210987654321098765432109876543210 56 * 3210987654321098765432109876543210987654321098765432109876543210
@@ -230,7 +226,7 @@ static int power7_compute_mmcr(u64 event[], int n_ev,
230 unsigned int hwc[], unsigned long mmcr[]) 226 unsigned int hwc[], unsigned long mmcr[])
231{ 227{
232 unsigned long mmcr1 = 0; 228 unsigned long mmcr1 = 0;
233 unsigned long mmcra = 0; 229 unsigned long mmcra = MMCRA_SDAR_DCACHE_MISS | MMCRA_SDAR_ERAT_MISS;
234 unsigned int pmc, unit, combine, l2sel, psel; 230 unsigned int pmc, unit, combine, l2sel, psel;
235 unsigned int pmc_inuse = 0; 231 unsigned int pmc_inuse = 0;
236 int i; 232 int i;
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c
index 479574413a9..8eff48e20db 100644
--- a/arch/powerpc/kernel/ppc970-pmu.c
+++ b/arch/powerpc/kernel/ppc970-pmu.c
@@ -84,10 +84,6 @@ static short mmcr1_adder_bits[8] = {
84}; 84};
85 85
86/* 86/*
87 * Bits in MMCRA
88 */
89
90/*
91 * Layout of constraint bits: 87 * Layout of constraint bits:
92 * 6666555555555544444444443333333333222222222211111111110000000000 88 * 6666555555555544444444443333333333222222222211111111110000000000
93 * 3210987654321098765432109876543210987654321098765432109876543210 89 * 3210987654321098765432109876543210987654321098765432109876543210
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index d4405b95bfa..4ec30086246 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1317,29 +1317,6 @@ struct device_node *of_find_next_cache_node(struct device_node *np)
1317} 1317}
1318 1318
1319/** 1319/**
1320 * of_find_all_nodes - Get next node in global list
1321 * @prev: Previous node or NULL to start iteration
1322 * of_node_put() will be called on it
1323 *
1324 * Returns a node pointer with refcount incremented, use
1325 * of_node_put() on it when done.
1326 */
1327struct device_node *of_find_all_nodes(struct device_node *prev)
1328{
1329 struct device_node *np;
1330
1331 read_lock(&devtree_lock);
1332 np = prev ? prev->allnext : allnodes;
1333 for (; np != 0; np = np->allnext)
1334 if (of_node_get(np))
1335 break;
1336 of_node_put(prev);
1337 read_unlock(&devtree_lock);
1338 return np;
1339}
1340EXPORT_SYMBOL(of_find_all_nodes);
1341
1342/**
1343 * of_node_get - Increment refcount of a node 1320 * of_node_get - Increment refcount of a node
1344 * @node: Node to inc refcount, NULL is supported to 1321 * @node: Node to inc refcount, NULL is supported to
1345 * simplify writing of callers 1322 * simplify writing of callers
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 4271f7a655a..845c72ab735 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -660,6 +660,7 @@ late_initcall(check_cache_coherency);
660 660
661#ifdef CONFIG_DEBUG_FS 661#ifdef CONFIG_DEBUG_FS
662struct dentry *powerpc_debugfs_root; 662struct dentry *powerpc_debugfs_root;
663EXPORT_SYMBOL(powerpc_debugfs_root);
663 664
664static int powerpc_debugfs_init(void) 665static int powerpc_debugfs_init(void)
665{ 666{
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 53bcf3d792d..b152de3e64d 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -345,7 +345,7 @@ void __init setup_arch(char **cmdline_p)
345 345
346#ifdef CONFIG_SWIOTLB 346#ifdef CONFIG_SWIOTLB
347 if (ppc_swiotlb_enable) 347 if (ppc_swiotlb_enable)
348 swiotlb_init(); 348 swiotlb_init(1);
349#endif 349#endif
350 350
351 paging_init(); 351 paging_init();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index fd785f7a279..6568406b2a3 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -545,7 +545,7 @@ void __init setup_arch(char **cmdline_p)
545 545
546#ifdef CONFIG_SWIOTLB 546#ifdef CONFIG_SWIOTLB
547 if (ppc_swiotlb_enable) 547 if (ppc_swiotlb_enable)
548 swiotlb_init(); 548 swiotlb_init(1);
549#endif 549#endif
550 550
551 paging_init(); 551 paging_init();
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index b97c2d67f4a..c5a4732bcc4 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -520,58 +520,6 @@ asmlinkage long compat_sys_umask(u32 mask)
520 return sys_umask((int)mask); 520 return sys_umask((int)mask);
521} 521}
522 522
523#ifdef CONFIG_SYSCTL_SYSCALL
524struct __sysctl_args32 {
525 u32 name;
526 int nlen;
527 u32 oldval;
528 u32 oldlenp;
529 u32 newval;
530 u32 newlen;
531 u32 __unused[4];
532};
533
534asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
535{
536 struct __sysctl_args32 tmp;
537 int error;
538 size_t oldlen;
539 size_t __user *oldlenp = NULL;
540 unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7;
541
542 if (copy_from_user(&tmp, args, sizeof(tmp)))
543 return -EFAULT;
544
545 if (tmp.oldval && tmp.oldlenp) {
546 /* Duh, this is ugly and might not work if sysctl_args
547 is in read-only memory, but do_sysctl does indirectly
548 a lot of uaccess in both directions and we'd have to
549 basically copy the whole sysctl.c here, and
550 glibc's __sysctl uses rw memory for the structure
551 anyway. */
552 oldlenp = (size_t __user *)addr;
553 if (get_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)) ||
554 put_user(oldlen, oldlenp))
555 return -EFAULT;
556 }
557
558 lock_kernel();
559 error = do_sysctl(compat_ptr(tmp.name), tmp.nlen,
560 compat_ptr(tmp.oldval), oldlenp,
561 compat_ptr(tmp.newval), tmp.newlen);
562 unlock_kernel();
563 if (oldlenp) {
564 if (!error) {
565 if (get_user(oldlen, oldlenp) ||
566 put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)))
567 error = -EFAULT;
568 }
569 copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
570 }
571 return error;
572}
573#endif
574
575unsigned long compat_sys_mmap2(unsigned long addr, size_t len, 523unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
576 unsigned long prot, unsigned long flags, 524 unsigned long prot, unsigned long flags,
577 unsigned long fd, unsigned long pgoff) 525 unsigned long fd, unsigned long pgoff)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 6c9e20898fa..e9af16cc7c0 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -54,6 +54,7 @@
54#include <linux/irq.h> 54#include <linux/irq.h>
55#include <linux/delay.h> 55#include <linux/delay.h>
56#include <linux/perf_event.h> 56#include <linux/perf_event.h>
57#include <asm/trace.h>
57 58
58#include <asm/io.h> 59#include <asm/io.h>
59#include <asm/processor.h> 60#include <asm/processor.h>
@@ -572,6 +573,8 @@ void timer_interrupt(struct pt_regs * regs)
572 struct clock_event_device *evt = &decrementer->event; 573 struct clock_event_device *evt = &decrementer->event;
573 u64 now; 574 u64 now;
574 575
576 trace_timer_interrupt_entry(regs);
577
575 /* Ensure a positive value is written to the decrementer, or else 578 /* Ensure a positive value is written to the decrementer, or else
576 * some CPUs will continuue to take decrementer exceptions */ 579 * some CPUs will continuue to take decrementer exceptions */
577 set_dec(DECREMENTER_MAX); 580 set_dec(DECREMENTER_MAX);
@@ -591,6 +594,7 @@ void timer_interrupt(struct pt_regs * regs)
591 now = decrementer->next_tb - now; 594 now = decrementer->next_tb - now;
592 if (now <= DECREMENTER_MAX) 595 if (now <= DECREMENTER_MAX)
593 set_dec((int)now); 596 set_dec((int)now);
597 trace_timer_interrupt_exit(regs);
594 return; 598 return;
595 } 599 }
596 old_regs = set_irq_regs(regs); 600 old_regs = set_irq_regs(regs);
@@ -621,6 +625,8 @@ void timer_interrupt(struct pt_regs * regs)
621 625
622 irq_exit(); 626 irq_exit();
623 set_irq_regs(old_regs); 627 set_irq_regs(old_regs);
628
629 trace_timer_interrupt_exit(regs);
624} 630}
625 631
626void wakeup_decrementer(void) 632void wakeup_decrementer(void)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index a81c7438d34..804f0f30f22 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -737,7 +737,7 @@ static int emulate_instruction(struct pt_regs *regs)
737 737
738 /* Emulate the mfspr rD, PVR. */ 738 /* Emulate the mfspr rD, PVR. */
739 if ((instword & PPC_INST_MFSPR_PVR_MASK) == PPC_INST_MFSPR_PVR) { 739 if ((instword & PPC_INST_MFSPR_PVR_MASK) == PPC_INST_MFSPR_PVR) {
740 PPC_WARN_EMULATED(mfpvr); 740 PPC_WARN_EMULATED(mfpvr, regs);
741 rd = (instword >> 21) & 0x1f; 741 rd = (instword >> 21) & 0x1f;
742 regs->gpr[rd] = mfspr(SPRN_PVR); 742 regs->gpr[rd] = mfspr(SPRN_PVR);
743 return 0; 743 return 0;
@@ -745,7 +745,7 @@ static int emulate_instruction(struct pt_regs *regs)
745 745
746 /* Emulating the dcba insn is just a no-op. */ 746 /* Emulating the dcba insn is just a no-op. */
747 if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA) { 747 if ((instword & PPC_INST_DCBA_MASK) == PPC_INST_DCBA) {
748 PPC_WARN_EMULATED(dcba); 748 PPC_WARN_EMULATED(dcba, regs);
749 return 0; 749 return 0;
750 } 750 }
751 751
@@ -754,7 +754,7 @@ static int emulate_instruction(struct pt_regs *regs)
754 int shift = (instword >> 21) & 0x1c; 754 int shift = (instword >> 21) & 0x1c;
755 unsigned long msk = 0xf0000000UL >> shift; 755 unsigned long msk = 0xf0000000UL >> shift;
756 756
757 PPC_WARN_EMULATED(mcrxr); 757 PPC_WARN_EMULATED(mcrxr, regs);
758 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk); 758 regs->ccr = (regs->ccr & ~msk) | ((regs->xer >> shift) & msk);
759 regs->xer &= ~0xf0000000UL; 759 regs->xer &= ~0xf0000000UL;
760 return 0; 760 return 0;
@@ -762,19 +762,19 @@ static int emulate_instruction(struct pt_regs *regs)
762 762
763 /* Emulate load/store string insn. */ 763 /* Emulate load/store string insn. */
764 if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING) { 764 if ((instword & PPC_INST_STRING_GEN_MASK) == PPC_INST_STRING) {
765 PPC_WARN_EMULATED(string); 765 PPC_WARN_EMULATED(string, regs);
766 return emulate_string_inst(regs, instword); 766 return emulate_string_inst(regs, instword);
767 } 767 }
768 768
769 /* Emulate the popcntb (Population Count Bytes) instruction. */ 769 /* Emulate the popcntb (Population Count Bytes) instruction. */
770 if ((instword & PPC_INST_POPCNTB_MASK) == PPC_INST_POPCNTB) { 770 if ((instword & PPC_INST_POPCNTB_MASK) == PPC_INST_POPCNTB) {
771 PPC_WARN_EMULATED(popcntb); 771 PPC_WARN_EMULATED(popcntb, regs);
772 return emulate_popcntb_inst(regs, instword); 772 return emulate_popcntb_inst(regs, instword);
773 } 773 }
774 774
775 /* Emulate isel (Integer Select) instruction */ 775 /* Emulate isel (Integer Select) instruction */
776 if ((instword & PPC_INST_ISEL_MASK) == PPC_INST_ISEL) { 776 if ((instword & PPC_INST_ISEL_MASK) == PPC_INST_ISEL) {
777 PPC_WARN_EMULATED(isel); 777 PPC_WARN_EMULATED(isel, regs);
778 return emulate_isel(regs, instword); 778 return emulate_isel(regs, instword);
779 } 779 }
780 780
@@ -973,7 +973,7 @@ void SoftwareEmulation(struct pt_regs *regs)
973#ifdef CONFIG_MATH_EMULATION 973#ifdef CONFIG_MATH_EMULATION
974 errcode = do_mathemu(regs); 974 errcode = do_mathemu(regs);
975 if (errcode >= 0) 975 if (errcode >= 0)
976 PPC_WARN_EMULATED(math); 976 PPC_WARN_EMULATED(math, regs);
977 977
978 switch (errcode) { 978 switch (errcode) {
979 case 0: 979 case 0:
@@ -996,7 +996,7 @@ void SoftwareEmulation(struct pt_regs *regs)
996#elif defined(CONFIG_8XX_MINIMAL_FPEMU) 996#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
997 errcode = Soft_emulate_8xx(regs); 997 errcode = Soft_emulate_8xx(regs);
998 if (errcode >= 0) 998 if (errcode >= 0)
999 PPC_WARN_EMULATED(8xx); 999 PPC_WARN_EMULATED(8xx, regs);
1000 1000
1001 switch (errcode) { 1001 switch (errcode) {
1002 case 0: 1002 case 0:
@@ -1107,7 +1107,7 @@ void altivec_assist_exception(struct pt_regs *regs)
1107 1107
1108 flush_altivec_to_thread(current); 1108 flush_altivec_to_thread(current);
1109 1109
1110 PPC_WARN_EMULATED(altivec); 1110 PPC_WARN_EMULATED(altivec, regs);
1111 err = emulate_altivec(regs); 1111 err = emulate_altivec(regs);
1112 if (err == 0) { 1112 if (err == 0) {
1113 regs->nip += 4; /* skip emulated instruction */ 1113 regs->nip += 4; /* skip emulated instruction */