| .. | .. |
|---|
| 59 | 59 | #include <linux/irq.h> |
|---|
| 60 | 60 | #include <linux/delay.h> |
|---|
| 61 | 61 | |
|---|
| 62 | | -#include "../../staging/android/fiq_debugger/fiq_debugger_priv.h" |
|---|
| 62 | +#include "fiq_debugger/fiq_debugger_priv.h" |
|---|
| 63 | 63 | #include "rockchip_debug.h" |
|---|
| 64 | 64 | |
|---|
| 65 | 65 | #define EDPCSR_LO 0x0a0 |
|---|
| .. | .. |
|---|
| 425 | 425 | struct irq_desc *desc; |
|---|
| 426 | 426 | |
|---|
| 427 | 427 | if (i > nr_irqs) |
|---|
| 428 | | - return 0; |
|---|
| 428 | + return -1; |
|---|
| 429 | 429 | |
|---|
| 430 | 430 | /* print header and calculate the width of the first column */ |
|---|
| 431 | 431 | if (i == 0) { |
|---|
| .. | .. |
|---|
| 433 | 433 | j *= 10; |
|---|
| 434 | 434 | |
|---|
| 435 | 435 | buf += sprintf(buf, "%*s", prec + 8, ""); |
|---|
| 436 | | - for_each_online_cpu(j) |
|---|
| 436 | + for_each_possible_cpu(j) |
|---|
| 437 | 437 | buf += sprintf(buf, "CPU%-8d", j); |
|---|
| 438 | 438 | buf += sprintf(buf, "\n"); |
|---|
| 439 | 439 | } |
|---|
| 440 | 440 | |
|---|
| 441 | 441 | desc = irq_to_desc(i); |
|---|
| 442 | | - if (!desc) |
|---|
| 442 | + if (!desc || (desc->status_use_accessors & IRQ_HIDDEN)) |
|---|
| 443 | 443 | goto outsparse; |
|---|
| 444 | 444 | |
|---|
| 445 | 445 | if (desc->kstat_irqs) |
|---|
| 446 | | - for_each_online_cpu(j) |
|---|
| 446 | + for_each_possible_cpu(j) |
|---|
| 447 | 447 | any_count |= *per_cpu_ptr(desc->kstat_irqs, j); |
|---|
| 448 | 448 | |
|---|
| 449 | | - if ((!desc->action || (desc->action && desc->action == &chained_action)) && !any_count) |
|---|
| 449 | + if ((!desc->action) && !any_count) |
|---|
| 450 | 450 | goto outsparse; |
|---|
| 451 | 451 | |
|---|
| 452 | 452 | buf += sprintf(buf, "%*d: ", prec, i); |
|---|
| 453 | | - for_each_online_cpu(j) |
|---|
| 453 | + for_each_possible_cpu(j) |
|---|
| 454 | 454 | buf += sprintf(buf, "%10u ", desc->kstat_irqs ? |
|---|
| 455 | 455 | *per_cpu_ptr(desc->kstat_irqs, j) : 0); |
|---|
| 456 | 456 | |
|---|
| .. | .. |
|---|
| 463 | 463 | buf += sprintf(buf, " %8s", "None"); |
|---|
| 464 | 464 | } |
|---|
| 465 | 465 | if (desc->irq_data.domain) |
|---|
| 466 | | - buf += sprintf(buf, " %*d", prec, (int) desc->irq_data.hwirq); |
|---|
| 466 | + buf += sprintf(buf, " %*lu", prec, desc->irq_data.hwirq); |
|---|
| 467 | 467 | else |
|---|
| 468 | 468 | buf += sprintf(buf, " %*s", prec, ""); |
|---|
| 469 | 469 | #ifdef CONFIG_GENERIC_IRQ_SHOW_LEVEL |
|---|
| .. | .. |
|---|
| 480 | 480 | } |
|---|
| 481 | 481 | |
|---|
| 482 | 482 | sprintf(buf, "\n"); |
|---|
| 483 | | -outsparse: |
|---|
| 484 | 483 | return 0; |
|---|
| 484 | +outsparse: |
|---|
| 485 | + return -1; |
|---|
| 485 | 486 | } |
|---|
| 486 | 487 | |
|---|
| 487 | 488 | static void rockchip_panic_notify_dump_irqs(void) |
|---|
| .. | .. |
|---|
| 570 | 571 | return -ENODEV; |
|---|
| 571 | 572 | |
|---|
| 572 | 573 | atomic_notifier_chain_register(&panic_notifier_list, |
|---|
| 573 | | - &rockchip_panic_nb); |
|---|
| 574 | + &rockchip_panic_nb); |
|---|
| 575 | + if (IS_ENABLED(CONFIG_NO_GKI)) { |
|---|
| 576 | + if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR)) |
|---|
| 577 | + atomic_notifier_chain_register(&hardlock_notifier_list, |
|---|
| 578 | + &rockchip_panic_nb); |
|---|
| 574 | 579 | |
|---|
| 575 | | - if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR)) |
|---|
| 576 | | - atomic_notifier_chain_register(&hardlock_notifier_list, |
|---|
| 577 | | - &rockchip_panic_nb); |
|---|
| 578 | | - |
|---|
| 579 | | - atomic_notifier_chain_register(&rcu_stall_notifier_list, |
|---|
| 580 | | - &rockchip_panic_nb); |
|---|
| 580 | + atomic_notifier_chain_register(&rcu_stall_notifier_list, |
|---|
| 581 | + &rockchip_panic_nb); |
|---|
| 582 | + } |
|---|
| 581 | 583 | |
|---|
| 582 | 584 | return 0; |
|---|
| 583 | 585 | } |
|---|
| .. | .. |
|---|
| 589 | 591 | |
|---|
| 590 | 592 | atomic_notifier_chain_unregister(&panic_notifier_list, |
|---|
| 591 | 593 | &rockchip_panic_nb); |
|---|
| 594 | + if (IS_ENABLED(CONFIG_NO_GKI)) { |
|---|
| 595 | + if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR)) |
|---|
| 596 | + atomic_notifier_chain_unregister(&hardlock_notifier_list, |
|---|
| 597 | + &rockchip_panic_nb); |
|---|
| 592 | 598 | |
|---|
| 593 | | - if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR)) |
|---|
| 594 | | - atomic_notifier_chain_unregister(&hardlock_notifier_list, |
|---|
| 599 | + atomic_notifier_chain_unregister(&rcu_stall_notifier_list, |
|---|
| 595 | 600 | &rockchip_panic_nb); |
|---|
| 596 | | - |
|---|
| 597 | | - atomic_notifier_chain_unregister(&rcu_stall_notifier_list, |
|---|
| 598 | | - &rockchip_panic_nb); |
|---|
| 601 | + } |
|---|
| 599 | 602 | |
|---|
| 600 | 603 | while (rockchip_cpu_debug[i]) |
|---|
| 601 | 604 | iounmap(rockchip_cpu_debug[i++]); |
|---|