Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _ASM_POWERPC_HARDIRQ_H
3#define _ASM_POWERPC_HARDIRQ_H
4
5#include <linux/threads.h>
6#include <linux/irq.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10 unsigned int timer_irqs_event;
11 unsigned int broadcast_irqs_event;
12 unsigned int timer_irqs_others;
13 unsigned int pmu_irqs;
14 unsigned int mce_exceptions;
15 unsigned int spurious_irqs;
16 unsigned int sreset_irqs;
17#ifdef CONFIG_PPC_WATCHDOG
18 unsigned int soft_nmi_irqs;
19#endif
20#ifdef CONFIG_PPC_DOORBELL
21 unsigned int doorbell_irqs;
22#endif
23} ____cacheline_aligned irq_cpustat_t;
24
25DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
26
27#define __ARCH_IRQ_STAT
28#define __ARCH_IRQ_EXIT_IRQS_DISABLED
29
30static inline void ack_bad_irq(unsigned int irq)
31{
32 printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
33}
34
35extern u64 arch_irq_stat_cpu(unsigned int cpu);
36#define arch_irq_stat_cpu arch_irq_stat_cpu
37
38#endif /* _ASM_POWERPC_HARDIRQ_H */
1#ifndef _ASM_POWERPC_HARDIRQ_H
2#define _ASM_POWERPC_HARDIRQ_H
3
4#include <linux/threads.h>
5#include <linux/irq.h>
6
7typedef struct {
8 unsigned int __softirq_pending;
9 unsigned int timer_irqs_event;
10 unsigned int timer_irqs_others;
11 unsigned int pmu_irqs;
12 unsigned int mce_exceptions;
13 unsigned int spurious_irqs;
14 unsigned int hmi_exceptions;
15#ifdef CONFIG_PPC_DOORBELL
16 unsigned int doorbell_irqs;
17#endif
18} ____cacheline_aligned irq_cpustat_t;
19
20DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
21
22#define __ARCH_IRQ_STAT
23
24#define local_softirq_pending() __this_cpu_read(irq_stat.__softirq_pending)
25
26#define __ARCH_SET_SOFTIRQ_PENDING
27
28#define set_softirq_pending(x) __this_cpu_write(irq_stat.__softirq_pending, (x))
29#define or_softirq_pending(x) __this_cpu_or(irq_stat.__softirq_pending, (x))
30
31static inline void ack_bad_irq(unsigned int irq)
32{
33 printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
34}
35
36extern u64 arch_irq_stat_cpu(unsigned int cpu);
37#define arch_irq_stat_cpu arch_irq_stat_cpu
38
39#endif /* _ASM_POWERPC_HARDIRQ_H */