diff options
Diffstat (limited to 'kernel/irq/debugfs.c')
| -rw-r--r-- | kernel/irq/debugfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c index 6f636136cccc..516c00a5e867 100644 --- a/kernel/irq/debugfs.c +++ b/kernel/irq/debugfs.c | |||
| @@ -56,6 +56,7 @@ static const struct irq_bit_descr irqchip_flags[] = { | |||
| 56 | BIT_MASK_DESCR(IRQCHIP_ONESHOT_SAFE), | 56 | BIT_MASK_DESCR(IRQCHIP_ONESHOT_SAFE), |
| 57 | BIT_MASK_DESCR(IRQCHIP_EOI_THREADED), | 57 | BIT_MASK_DESCR(IRQCHIP_EOI_THREADED), |
| 58 | BIT_MASK_DESCR(IRQCHIP_SUPPORTS_LEVEL_MSI), | 58 | BIT_MASK_DESCR(IRQCHIP_SUPPORTS_LEVEL_MSI), |
| 59 | BIT_MASK_DESCR(IRQCHIP_SUPPORTS_NMI), | ||
| 59 | }; | 60 | }; |
| 60 | 61 | ||
| 61 | static void | 62 | static void |
| @@ -140,6 +141,7 @@ static const struct irq_bit_descr irqdesc_istates[] = { | |||
| 140 | BIT_MASK_DESCR(IRQS_WAITING), | 141 | BIT_MASK_DESCR(IRQS_WAITING), |
| 141 | BIT_MASK_DESCR(IRQS_PENDING), | 142 | BIT_MASK_DESCR(IRQS_PENDING), |
| 142 | BIT_MASK_DESCR(IRQS_SUSPENDED), | 143 | BIT_MASK_DESCR(IRQS_SUSPENDED), |
| 144 | BIT_MASK_DESCR(IRQS_NMI), | ||
| 143 | }; | 145 | }; |
| 144 | 146 | ||
| 145 | 147 | ||
| @@ -203,8 +205,8 @@ static ssize_t irq_debug_write(struct file *file, const char __user *user_buf, | |||
| 203 | chip_bus_lock(desc); | 205 | chip_bus_lock(desc); |
| 204 | raw_spin_lock_irqsave(&desc->lock, flags); | 206 | raw_spin_lock_irqsave(&desc->lock, flags); |
| 205 | 207 | ||
| 206 | if (irq_settings_is_level(desc)) { | 208 | if (irq_settings_is_level(desc) || desc->istate & IRQS_NMI) { |
| 207 | /* Can't do level, sorry */ | 209 | /* Can't do level nor NMIs, sorry */ |
| 208 | err = -EINVAL; | 210 | err = -EINVAL; |
| 209 | } else { | 211 | } else { |
| 210 | desc->istate |= IRQS_PENDING; | 212 | desc->istate |= IRQS_PENDING; |
| @@ -256,8 +258,6 @@ static int __init irq_debugfs_init(void) | |||
| 256 | int irq; | 258 | int irq; |
| 257 | 259 | ||
| 258 | root_dir = debugfs_create_dir("irq", NULL); | 260 | root_dir = debugfs_create_dir("irq", NULL); |
| 259 | if (!root_dir) | ||
| 260 | return -ENOMEM; | ||
| 261 | 261 | ||
| 262 | irq_domain_debugfs_init(root_dir); | 262 | irq_domain_debugfs_init(root_dir); |
| 263 | 263 | ||
