diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/mpc7450-pmu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/power4-pmu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/power5+-pmu.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/power5-pmu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/power6-pmu.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/power7-pmu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc970-pmu.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace32.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/vector.S | 6 |
10 files changed, 29 insertions, 23 deletions
diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/powerpc/kernel/mpc7450-pmu.c index 75ff47fed7bf..cc466d039af6 100644 --- a/arch/powerpc/kernel/mpc7450-pmu.c +++ b/arch/powerpc/kernel/mpc7450-pmu.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/perf_counter.h> | 12 | #include <linux/perf_counter.h> |
13 | #include <linux/string.h> | ||
14 | #include <asm/reg.h> | 13 | #include <asm/reg.h> |
15 | #include <asm/cputable.h> | 14 | #include <asm/cputable.h> |
16 | 15 | ||
@@ -408,7 +407,8 @@ struct power_pmu mpc7450_pmu = { | |||
408 | 407 | ||
409 | static int init_mpc7450_pmu(void) | 408 | static int init_mpc7450_pmu(void) |
410 | { | 409 | { |
411 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450")) | 410 | if (!cur_cpu_spec->oprofile_cpu_type || |
411 | strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450")) | ||
412 | return -ENODEV; | 412 | return -ENODEV; |
413 | 413 | ||
414 | return register_power_pmu(&mpc7450_pmu); | 414 | return register_power_pmu(&mpc7450_pmu); |
diff --git a/arch/powerpc/kernel/power4-pmu.c b/arch/powerpc/kernel/power4-pmu.c index db90b0c5c27b..3c90a3d9173e 100644 --- a/arch/powerpc/kernel/power4-pmu.c +++ b/arch/powerpc/kernel/power4-pmu.c | |||
@@ -606,7 +606,8 @@ static struct power_pmu power4_pmu = { | |||
606 | 606 | ||
607 | static int init_power4_pmu(void) | 607 | static int init_power4_pmu(void) |
608 | { | 608 | { |
609 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4")) | 609 | if (!cur_cpu_spec->oprofile_cpu_type || |
610 | strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power4")) | ||
610 | return -ENODEV; | 611 | return -ENODEV; |
611 | 612 | ||
612 | return register_power_pmu(&power4_pmu); | 613 | return register_power_pmu(&power4_pmu); |
diff --git a/arch/powerpc/kernel/power5+-pmu.c b/arch/powerpc/kernel/power5+-pmu.c index f4adca8e98a4..31918af3e355 100644 --- a/arch/powerpc/kernel/power5+-pmu.c +++ b/arch/powerpc/kernel/power5+-pmu.c | |||
@@ -678,8 +678,9 @@ static struct power_pmu power5p_pmu = { | |||
678 | 678 | ||
679 | static int init_power5p_pmu(void) | 679 | static int init_power5p_pmu(void) |
680 | { | 680 | { |
681 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+") | 681 | if (!cur_cpu_spec->oprofile_cpu_type || |
682 | && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++")) | 682 | (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5+") |
683 | && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5++"))) | ||
683 | return -ENODEV; | 684 | return -ENODEV; |
684 | 685 | ||
685 | return register_power_pmu(&power5p_pmu); | 686 | return register_power_pmu(&power5p_pmu); |
diff --git a/arch/powerpc/kernel/power5-pmu.c b/arch/powerpc/kernel/power5-pmu.c index 29b2c6c0e83a..867f6f663963 100644 --- a/arch/powerpc/kernel/power5-pmu.c +++ b/arch/powerpc/kernel/power5-pmu.c | |||
@@ -618,7 +618,8 @@ static struct power_pmu power5_pmu = { | |||
618 | 618 | ||
619 | static int init_power5_pmu(void) | 619 | static int init_power5_pmu(void) |
620 | { | 620 | { |
621 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5")) | 621 | if (!cur_cpu_spec->oprofile_cpu_type || |
622 | strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power5")) | ||
622 | return -ENODEV; | 623 | return -ENODEV; |
623 | 624 | ||
624 | return register_power_pmu(&power5_pmu); | 625 | return register_power_pmu(&power5_pmu); |
diff --git a/arch/powerpc/kernel/power6-pmu.c b/arch/powerpc/kernel/power6-pmu.c index 09ae5bf5bda7..fa21890531da 100644 --- a/arch/powerpc/kernel/power6-pmu.c +++ b/arch/powerpc/kernel/power6-pmu.c | |||
@@ -537,7 +537,8 @@ static struct power_pmu power6_pmu = { | |||
537 | 537 | ||
538 | static int init_power6_pmu(void) | 538 | static int init_power6_pmu(void) |
539 | { | 539 | { |
540 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) | 540 | if (!cur_cpu_spec->oprofile_cpu_type || |
541 | strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power6")) | ||
541 | return -ENODEV; | 542 | return -ENODEV; |
542 | 543 | ||
543 | return register_power_pmu(&power6_pmu); | 544 | return register_power_pmu(&power6_pmu); |
diff --git a/arch/powerpc/kernel/power7-pmu.c b/arch/powerpc/kernel/power7-pmu.c index 5d755ef7ac8f..388cf57ad827 100644 --- a/arch/powerpc/kernel/power7-pmu.c +++ b/arch/powerpc/kernel/power7-pmu.c | |||
@@ -358,6 +358,7 @@ static struct power_pmu power7_pmu = { | |||
358 | .get_constraint = power7_get_constraint, | 358 | .get_constraint = power7_get_constraint, |
359 | .get_alternatives = power7_get_alternatives, | 359 | .get_alternatives = power7_get_alternatives, |
360 | .disable_pmc = power7_disable_pmc, | 360 | .disable_pmc = power7_disable_pmc, |
361 | .flags = PPMU_ALT_SIPR, | ||
361 | .n_generic = ARRAY_SIZE(power7_generic_events), | 362 | .n_generic = ARRAY_SIZE(power7_generic_events), |
362 | .generic_events = power7_generic_events, | 363 | .generic_events = power7_generic_events, |
363 | .cache_events = &power7_cache_events, | 364 | .cache_events = &power7_cache_events, |
@@ -365,7 +366,8 @@ static struct power_pmu power7_pmu = { | |||
365 | 366 | ||
366 | static int init_power7_pmu(void) | 367 | static int init_power7_pmu(void) |
367 | { | 368 | { |
368 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7")) | 369 | if (!cur_cpu_spec->oprofile_cpu_type || |
370 | strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/power7")) | ||
369 | return -ENODEV; | 371 | return -ENODEV; |
370 | 372 | ||
371 | return register_power_pmu(&power7_pmu); | 373 | return register_power_pmu(&power7_pmu); |
diff --git a/arch/powerpc/kernel/ppc970-pmu.c b/arch/powerpc/kernel/ppc970-pmu.c index 6637c87fe70e..75dccb71a043 100644 --- a/arch/powerpc/kernel/ppc970-pmu.c +++ b/arch/powerpc/kernel/ppc970-pmu.c | |||
@@ -10,7 +10,6 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/perf_counter.h> | 12 | #include <linux/perf_counter.h> |
13 | #include <linux/string.h> | ||
14 | #include <asm/reg.h> | 13 | #include <asm/reg.h> |
15 | #include <asm/cputable.h> | 14 | #include <asm/cputable.h> |
16 | 15 | ||
@@ -489,8 +488,9 @@ static struct power_pmu ppc970_pmu = { | |||
489 | 488 | ||
490 | static int init_ppc970_pmu(void) | 489 | static int init_ppc970_pmu(void) |
491 | { | 490 | { |
492 | if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970") | 491 | if (!cur_cpu_spec->oprofile_cpu_type || |
493 | && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")) | 492 | (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970") |
493 | && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP"))) | ||
494 | return -ENODEV; | 494 | return -ENODEV; |
495 | 495 | ||
496 | return register_power_pmu(&ppc970_pmu); | 496 | return register_power_pmu(&ppc970_pmu); |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 9fa2c7dcd05a..ef149880c145 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -736,15 +736,16 @@ void user_disable_single_step(struct task_struct *task) | |||
736 | { | 736 | { |
737 | struct pt_regs *regs = task->thread.regs; | 737 | struct pt_regs *regs = task->thread.regs; |
738 | 738 | ||
739 | |||
740 | #if defined(CONFIG_BOOKE) | ||
741 | /* If DAC then do not single step, skip */ | ||
742 | if (task->thread.dabr) | ||
743 | return; | ||
744 | #endif | ||
745 | |||
746 | if (regs != NULL) { | 739 | if (regs != NULL) { |
747 | #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) | 740 | #if defined(CONFIG_BOOKE) |
741 | /* If DAC don't clear DBCRO_IDM or MSR_DE */ | ||
742 | if (task->thread.dabr) | ||
743 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT); | ||
744 | else { | ||
745 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); | ||
746 | regs->msr &= ~MSR_DE; | ||
747 | } | ||
748 | #elif defined(CONFIG_40x) | ||
748 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); | 749 | task->thread.dbcr0 &= ~(DBCR0_IC | DBCR0_BT | DBCR0_IDM); |
749 | regs->msr &= ~MSR_DE; | 750 | regs->msr &= ~MSR_DE; |
750 | #else | 751 | #else |
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 297632cba047..8a6daf4129f6 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/smp.h> | 23 | #include <linux/smp.h> |
24 | #include <linux/smp_lock.h> | ||
25 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
26 | #include <linux/ptrace.h> | 25 | #include <linux/ptrace.h> |
27 | #include <linux/regset.h> | 26 | #include <linux/regset.h> |
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S index ef36cbbc5882..ea4d64644d02 100644 --- a/arch/powerpc/kernel/vector.S +++ b/arch/powerpc/kernel/vector.S | |||
@@ -80,10 +80,10 @@ _GLOBAL(load_up_altivec) | |||
80 | mtvscr vr0 | 80 | mtvscr vr0 |
81 | REST_32VRS(0,r4,r5) | 81 | REST_32VRS(0,r4,r5) |
82 | #ifndef CONFIG_SMP | 82 | #ifndef CONFIG_SMP |
83 | /* Update last_task_used_math to 'current' */ | 83 | /* Update last_task_used_altivec to 'current' */ |
84 | subi r4,r5,THREAD /* Back to 'current' */ | 84 | subi r4,r5,THREAD /* Back to 'current' */ |
85 | fromreal(r4) | 85 | fromreal(r4) |
86 | PPC_STL r4,ADDROFF(last_task_used_math)(r3) | 86 | PPC_STL r4,ADDROFF(last_task_used_altivec)(r3) |
87 | #endif /* CONFIG_SMP */ | 87 | #endif /* CONFIG_SMP */ |
88 | /* restore registers and return */ | 88 | /* restore registers and return */ |
89 | blr | 89 | blr |
@@ -172,7 +172,7 @@ _GLOBAL(load_up_vsx) | |||
172 | oris r12,r12,MSR_VSX@h | 172 | oris r12,r12,MSR_VSX@h |
173 | std r12,_MSR(r1) | 173 | std r12,_MSR(r1) |
174 | #ifndef CONFIG_SMP | 174 | #ifndef CONFIG_SMP |
175 | /* Update last_task_used_math to 'current' */ | 175 | /* Update last_task_used_vsx to 'current' */ |
176 | ld r4,PACACURRENT(r13) | 176 | ld r4,PACACURRENT(r13) |
177 | std r4,0(r3) | 177 | std r4,0(r3) |
178 | #endif /* CONFIG_SMP */ | 178 | #endif /* CONFIG_SMP */ |