smp.c (ca6e4405779ed56ebac941570615abd667c72c02) smp.c (96f0e00378d4a1fc1b79933ef84e1595015de808)
1/*
2 * linux/arch/arm/kernel/smp.c
3 *
4 * Copyright (C) 2002 ARM Limited, All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 7 unchanged lines hidden (view full) ---

16#include <linux/cache.h>
17#include <linux/profile.h>
18#include <linux/errno.h>
19#include <linux/mm.h>
20#include <linux/err.h>
21#include <linux/cpu.h>
22#include <linux/seq_file.h>
23#include <linux/irq.h>
1/*
2 * linux/arch/arm/kernel/smp.c
3 *
4 * Copyright (C) 2002 ARM Limited, All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.

--- 7 unchanged lines hidden (view full) ---

16#include <linux/cache.h>
17#include <linux/profile.h>
18#include <linux/errno.h>
19#include <linux/mm.h>
20#include <linux/err.h>
21#include <linux/cpu.h>
22#include <linux/seq_file.h>
23#include <linux/irq.h>
24#include <linux/nmi.h>
24#include <linux/percpu.h>
25#include <linux/clockchips.h>
26#include <linux/completion.h>
27#include <linux/cpufreq.h>
28#include <linux/irq_work.h>
29
30#include <linux/atomic.h>
31#include <asm/smp.h>

--- 35 unchanged lines hidden (view full) ---

67 IPI_WAKEUP,
68 IPI_TIMER,
69 IPI_RESCHEDULE,
70 IPI_CALL_FUNC,
71 IPI_CALL_FUNC_SINGLE,
72 IPI_CPU_STOP,
73 IPI_IRQ_WORK,
74 IPI_COMPLETION,
25#include <linux/percpu.h>
26#include <linux/clockchips.h>
27#include <linux/completion.h>
28#include <linux/cpufreq.h>
29#include <linux/irq_work.h>
30
31#include <linux/atomic.h>
32#include <asm/smp.h>

--- 35 unchanged lines hidden (view full) ---

68 IPI_WAKEUP,
69 IPI_TIMER,
70 IPI_RESCHEDULE,
71 IPI_CALL_FUNC,
72 IPI_CALL_FUNC_SINGLE,
73 IPI_CPU_STOP,
74 IPI_IRQ_WORK,
75 IPI_COMPLETION,
76 IPI_CPU_BACKTRACE = 15,
75};
76
77static DECLARE_COMPLETION(cpu_running);
78
79static struct smp_operations smp_ops;
80
81void __init smp_set_ops(struct smp_operations *ops)
82{

--- 490 unchanged lines hidden (view full) ---

573}
574
575void handle_IPI(int ipinr, struct pt_regs *regs)
576{
577 unsigned int cpu = smp_processor_id();
578 struct pt_regs *old_regs = set_irq_regs(regs);
579
580 if ((unsigned)ipinr < NR_IPI) {
77};
78
79static DECLARE_COMPLETION(cpu_running);
80
81static struct smp_operations smp_ops;
82
83void __init smp_set_ops(struct smp_operations *ops)
84{

--- 490 unchanged lines hidden (view full) ---

575}
576
577void handle_IPI(int ipinr, struct pt_regs *regs)
578{
579 unsigned int cpu = smp_processor_id();
580 struct pt_regs *old_regs = set_irq_regs(regs);
581
582 if ((unsigned)ipinr < NR_IPI) {
581 trace_ipi_entry_rcuidle(ipi_types[ipinr]);
583 trace_ipi_entry(ipi_types[ipinr]);
582 __inc_irq_stat(cpu, ipi_irqs[ipinr]);
583 }
584
585 switch (ipinr) {
586 case IPI_WAKEUP:
587 break;
588
589#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST

--- 35 unchanged lines hidden (view full) ---

625#endif
626
627 case IPI_COMPLETION:
628 irq_enter();
629 ipi_complete(cpu);
630 irq_exit();
631 break;
632
584 __inc_irq_stat(cpu, ipi_irqs[ipinr]);
585 }
586
587 switch (ipinr) {
588 case IPI_WAKEUP:
589 break;
590
591#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST

--- 35 unchanged lines hidden (view full) ---

627#endif
628
629 case IPI_COMPLETION:
630 irq_enter();
631 ipi_complete(cpu);
632 irq_exit();
633 break;
634
635 case IPI_CPU_BACKTRACE:
636 irq_enter();
637 nmi_cpu_backtrace(regs);
638 irq_exit();
639 break;
640
633 default:
634 pr_crit("CPU%u: Unknown IPI message 0x%x\n",
635 cpu, ipinr);
636 break;
637 }
638
639 if ((unsigned)ipinr < NR_IPI)
641 default:
642 pr_crit("CPU%u: Unknown IPI message 0x%x\n",
643 cpu, ipinr);
644 break;
645 }
646
647 if ((unsigned)ipinr < NR_IPI)
640 trace_ipi_exit_rcuidle(ipi_types[ipinr]);
648 trace_ipi_exit(ipi_types[ipinr]);
641 set_irq_regs(old_regs);
642}
643
644void smp_send_reschedule(int cpu)
645{
646 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
647}
648

--- 70 unchanged lines hidden (view full) ---

719static int __init register_cpufreq_notifier(void)
720{
721 return cpufreq_register_notifier(&cpufreq_notifier,
722 CPUFREQ_TRANSITION_NOTIFIER);
723}
724core_initcall(register_cpufreq_notifier);
725
726#endif
649 set_irq_regs(old_regs);
650}
651
652void smp_send_reschedule(int cpu)
653{
654 smp_cross_call(cpumask_of(cpu), IPI_RESCHEDULE);
655}
656

--- 70 unchanged lines hidden (view full) ---

727static int __init register_cpufreq_notifier(void)
728{
729 return cpufreq_register_notifier(&cpufreq_notifier,
730 CPUFREQ_TRANSITION_NOTIFIER);
731}
732core_initcall(register_cpufreq_notifier);
733
734#endif
735
736static void raise_nmi(cpumask_t *mask)
737{
738 smp_cross_call(mask, IPI_CPU_BACKTRACE);
739}
740
741void arch_trigger_all_cpu_backtrace(bool include_self)
742{
743 nmi_trigger_all_cpu_backtrace(include_self, raise_nmi);
744}