Carl van Schaik | fc8ada6 | 2018-05-28 19:13:56 +1000 | [diff] [blame^] | 1 | /* |
| 2 | * include/asm-generic/okl4_virq.h |
| 3 | * |
| 4 | * Copyright (c) 2017 General Dynamics |
| 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. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __OKL4_VIRQ_H__ |
| 12 | #define __OKL4_VIRQ_H__ |
| 13 | |
| 14 | #include <linux/irq.h> |
| 15 | #include <microvisor/microvisor.h> |
| 16 | |
| 17 | static inline okl4_virq_flags_t okl4_get_virq_payload(unsigned int irq) |
| 18 | { |
| 19 | struct irq_data *irqd = irq_get_irq_data(irq); |
| 20 | |
| 21 | if (WARN_ON_ONCE(!irqd)) |
| 22 | return 0; |
| 23 | |
| 24 | return _okl4_sys_interrupt_get_payload(irqd_to_hwirq(irqd)).payload; |
| 25 | } |
| 26 | |
| 27 | #endif |