Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix Niagara2 perf event handling.
sparc64: Fix NMI programming when perf events are active.
bbc_envctrl: Clean up properly if kthread_run() fails.

+51 -27
+2 -1
arch/sparc/kernel/nmi.c
··· 96 96 int cpu = smp_processor_id(); 97 97 98 98 clear_softint(1 << irq); 99 - pcr_ops->write(PCR_PIC_PRIV); 100 99 101 100 local_cpu_data().__nmi_count++; 102 101 ··· 104 105 if (notify_die(DIE_NMI, "nmi", regs, 0, 105 106 pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) 106 107 touched = 1; 108 + else 109 + pcr_ops->write(PCR_PIC_PRIV); 107 110 108 111 sum = kstat_irqs_cpu(0, cpu); 109 112 if (__get_cpu_var(nmi_touch)) {
+11
arch/sparc/kernel/perf_event.c
··· 986 986 data.addr = 0; 987 987 988 988 cpuc = &__get_cpu_var(cpu_hw_events); 989 + 990 + /* If the PMU has the TOE IRQ enable bits, we need to do a 991 + * dummy write to the %pcr to clear the overflow bits and thus 992 + * the interrupt. 993 + * 994 + * Do this before we peek at the counters to determine 995 + * overflow so we don't lose any events. 996 + */ 997 + if (sparc_pmu->irq_bit) 998 + pcr_ops->write(cpuc->pcr); 999 + 989 1000 for (idx = 0; idx < MAX_HWEVENTS; idx++) { 990 1001 struct perf_event *event = cpuc->events[idx]; 991 1002 struct hw_perf_event *hwc;
+38 -26
drivers/sbus/char/bbc_envctrl.c
··· 522 522 set_fan_speeds(fp); 523 523 } 524 524 525 + static void destroy_one_temp(struct bbc_cpu_temperature *tp) 526 + { 527 + bbc_i2c_detach(tp->client); 528 + kfree(tp); 529 + } 530 + 531 + static void destroy_all_temps(struct bbc_i2c_bus *bp) 532 + { 533 + struct bbc_cpu_temperature *tp, *tpos; 534 + 535 + list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { 536 + list_del(&tp->bp_list); 537 + list_del(&tp->glob_list); 538 + destroy_one_temp(tp); 539 + } 540 + } 541 + 542 + static void destroy_one_fan(struct bbc_fan_control *fp) 543 + { 544 + bbc_i2c_detach(fp->client); 545 + kfree(fp); 546 + } 547 + 548 + static void destroy_all_fans(struct bbc_i2c_bus *bp) 549 + { 550 + struct bbc_fan_control *fp, *fpos; 551 + 552 + list_for_each_entry_safe(fp, fpos, &bp->fans, bp_list) { 553 + list_del(&fp->bp_list); 554 + list_del(&fp->glob_list); 555 + destroy_one_fan(fp); 556 + } 557 + } 558 + 525 559 int bbc_envctrl_init(struct bbc_i2c_bus *bp) 526 560 { 527 561 struct of_device *op; ··· 575 541 int err = PTR_ERR(kenvctrld_task); 576 542 577 543 kenvctrld_task = NULL; 544 + destroy_all_temps(bp); 545 + destroy_all_fans(bp); 578 546 return err; 579 547 } 580 548 } ··· 584 548 return 0; 585 549 } 586 550 587 - static void destroy_one_temp(struct bbc_cpu_temperature *tp) 588 - { 589 - bbc_i2c_detach(tp->client); 590 - kfree(tp); 591 - } 592 - 593 - static void destroy_one_fan(struct bbc_fan_control *fp) 594 - { 595 - bbc_i2c_detach(fp->client); 596 - kfree(fp); 597 - } 598 - 599 551 void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp) 600 552 { 601 - struct bbc_cpu_temperature *tp, *tpos; 602 - struct bbc_fan_control *fp, *fpos; 603 - 604 553 if (kenvctrld_task) 605 554 kthread_stop(kenvctrld_task); 606 555 607 - list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) { 608 - list_del(&tp->bp_list); 609 - list_del(&tp->glob_list); 610 - destroy_one_temp(tp); 611 - } 612 - 613 - list_for_each_entry_safe(fp, fpos, &bp->fans, bp_list) { 614 - list_del(&fp->bp_list); 615 - list_del(&fp->glob_list); 616 - destroy_one_fan(fp); 617 - } 556 + destroy_all_temps(bp); 557 + destroy_all_fans(bp); 618 558 }