Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2010 Tilera Corporation. All Rights Reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation, version 2. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, but |
| 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or |
| 11 | * NON INFRINGEMENT. See the GNU General Public License for |
| 12 | * more details. |
| 13 | */ |
| 14 | |
| 15 | #include <linux/module.h> |
| 16 | #include <linux/seq_file.h> |
| 17 | #include <linux/interrupt.h> |
| 18 | #include <linux/irq.h> |
| 19 | #include <linux/kernel_stat.h> |
| 20 | #include <linux/uaccess.h> |
| 21 | #include <hv/drv_pcie_rc_intf.h> |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 22 | #include <arch/spr_def.h> |
| 23 | #include <asm/traps.h> |
Zhigang Lu | 8d61dd7 | 2014-01-28 10:03:50 +0800 | [diff] [blame] | 24 | #include <linux/perf_event.h> |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 25 | |
| 26 | /* Bit-flag stored in irq_desc->chip_data to indicate HW-cleared irqs. */ |
| 27 | #define IS_HW_CLEARED 1 |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 28 | |
| 29 | /* |
Chris Metcalf | 5d96611 | 2010-11-01 15:24:29 -0400 | [diff] [blame] | 30 | * The set of interrupts we enable for arch_local_irq_enable(). |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 31 | * This is initialized to have just a single interrupt that the kernel |
| 32 | * doesn't actually use as a sentinel. During kernel init, |
| 33 | * interrupts are added as the kernel gets prepared to support them. |
| 34 | * NOTE: we could probably initialize them all statically up front. |
| 35 | */ |
| 36 | DEFINE_PER_CPU(unsigned long long, interrupts_enabled_mask) = |
| 37 | INITIAL_INTERRUPTS_ENABLED; |
| 38 | EXPORT_PER_CPU_SYMBOL(interrupts_enabled_mask); |
| 39 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 40 | /* Define per-tile device interrupt statistics state. */ |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 41 | DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp; |
| 42 | EXPORT_PER_CPU_SYMBOL(irq_stat); |
| 43 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 44 | /* |
| 45 | * Define per-tile irq disable mask; the hardware/HV only has a single |
| 46 | * mask that we use to implement both masking and disabling. |
| 47 | */ |
| 48 | static DEFINE_PER_CPU(unsigned long, irq_disable_mask) |
| 49 | ____cacheline_internodealigned_in_smp; |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 50 | |
| 51 | /* |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 52 | * Per-tile IRQ nesting depth. Used to make sure we enable newly |
| 53 | * enabled IRQs before exiting the outermost interrupt. |
| 54 | */ |
| 55 | static DEFINE_PER_CPU(int, irq_depth); |
| 56 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 57 | #if CHIP_HAS_IPI() |
| 58 | /* Use SPRs to manipulate device interrupts. */ |
Chris Metcalf | a78c942 | 2010-10-14 16:23:03 -0400 | [diff] [blame] | 59 | #define mask_irqs(irq_mask) __insn_mtspr(SPR_IPI_MASK_SET_K, irq_mask) |
| 60 | #define unmask_irqs(irq_mask) __insn_mtspr(SPR_IPI_MASK_RESET_K, irq_mask) |
| 61 | #define clear_irqs(irq_mask) __insn_mtspr(SPR_IPI_EVENT_RESET_K, irq_mask) |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 62 | #else |
| 63 | /* Use HV to manipulate device interrupts. */ |
| 64 | #define mask_irqs(irq_mask) hv_disable_intr(irq_mask) |
| 65 | #define unmask_irqs(irq_mask) hv_enable_intr(irq_mask) |
| 66 | #define clear_irqs(irq_mask) hv_clear_intr(irq_mask) |
| 67 | #endif |
| 68 | |
| 69 | /* |
| 70 | * The interrupt handling path, implemented in terms of HV interrupt |
Chris Metcalf | d7c9661 | 2013-08-15 16:23:24 -0400 | [diff] [blame] | 71 | * emulation on TILEPro, and IPI hardware on TILE-Gx. |
Chris Metcalf | bc1a298 | 2013-08-07 11:36:54 -0400 | [diff] [blame] | 72 | * Entered with interrupts disabled. |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 73 | */ |
| 74 | void tile_dev_intr(struct pt_regs *regs, int intnum) |
| 75 | { |
Christoph Lameter | b4f5019 | 2014-08-17 12:30:50 -0500 | [diff] [blame] | 76 | int depth = __this_cpu_inc_return(irq_depth); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 77 | unsigned long original_irqs; |
| 78 | unsigned long remaining_irqs; |
| 79 | struct pt_regs *old_regs; |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 80 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 81 | #if CHIP_HAS_IPI() |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 82 | /* |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 83 | * Pending interrupts are listed in an SPR. We might be |
| 84 | * nested, so be sure to only handle irqs that weren't already |
| 85 | * masked by a previous interrupt. Then, mask out the ones |
| 86 | * we're going to handle. |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 87 | */ |
Chris Metcalf | a78c942 | 2010-10-14 16:23:03 -0400 | [diff] [blame] | 88 | unsigned long masked = __insn_mfspr(SPR_IPI_MASK_K); |
| 89 | original_irqs = __insn_mfspr(SPR_IPI_EVENT_K) & ~masked; |
| 90 | __insn_mtspr(SPR_IPI_MASK_SET_K, original_irqs); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 91 | #else |
| 92 | /* |
| 93 | * Hypervisor performs the equivalent of the Gx code above and |
| 94 | * then puts the pending interrupt mask into a system save reg |
| 95 | * for us to find. |
| 96 | */ |
Chris Metcalf | a78c942 | 2010-10-14 16:23:03 -0400 | [diff] [blame] | 97 | original_irqs = __insn_mfspr(SPR_SYSTEM_SAVE_K_3); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 98 | #endif |
| 99 | remaining_irqs = original_irqs; |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 100 | |
| 101 | /* Track time spent here in an interrupt context. */ |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 102 | old_regs = set_irq_regs(regs); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 103 | irq_enter(); |
| 104 | |
| 105 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
| 106 | /* Debugging check for stack overflow: less than 1/8th stack free? */ |
| 107 | { |
| 108 | long sp = stack_pointer - (long) current_thread_info(); |
| 109 | if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) { |
Joe Perches | f474367 | 2014-10-31 10:50:46 -0700 | [diff] [blame] | 110 | pr_emerg("%s: stack overflow: %ld\n", |
| 111 | __func__, sp - sizeof(struct thread_info)); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 112 | dump_stack(); |
| 113 | } |
| 114 | } |
| 115 | #endif |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 116 | while (remaining_irqs) { |
| 117 | unsigned long irq = __ffs(remaining_irqs); |
| 118 | remaining_irqs &= ~(1UL << irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 119 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 120 | /* Count device irqs; Linux IPIs are counted elsewhere. */ |
| 121 | if (irq != IRQ_RESCHEDULE) |
Christoph Lameter | b4f5019 | 2014-08-17 12:30:50 -0500 | [diff] [blame] | 122 | __this_cpu_inc(irq_stat.irq_dev_intr_count); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 123 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 124 | generic_handle_irq(irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 125 | } |
| 126 | |
| 127 | /* |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 128 | * If we weren't nested, turn on all enabled interrupts, |
| 129 | * including any that were reenabled during interrupt |
| 130 | * handling. |
| 131 | */ |
Christoph Lameter | b4f5019 | 2014-08-17 12:30:50 -0500 | [diff] [blame] | 132 | if (depth == 1) |
| 133 | unmask_irqs(~__this_cpu_read(irq_disable_mask)); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 134 | |
Christoph Lameter | b4f5019 | 2014-08-17 12:30:50 -0500 | [diff] [blame] | 135 | __this_cpu_dec(irq_depth); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 136 | |
| 137 | /* |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 138 | * Track time spent against the current process again and |
| 139 | * process any softirqs if they are waiting. |
| 140 | */ |
| 141 | irq_exit(); |
| 142 | set_irq_regs(old_regs); |
| 143 | } |
| 144 | |
| 145 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 146 | /* |
| 147 | * Remove an irq from the disabled mask. If we're in an interrupt |
| 148 | * context, defer enabling the HW interrupt until we leave. |
| 149 | */ |
Chris Metcalf | 0c90547 | 2011-12-01 12:58:19 -0500 | [diff] [blame] | 150 | static void tile_irq_chip_enable(struct irq_data *d) |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 151 | { |
Chris Metcalf | 0c90547 | 2011-12-01 12:58:19 -0500 | [diff] [blame] | 152 | get_cpu_var(irq_disable_mask) &= ~(1UL << d->irq); |
Christoph Lameter | b4f5019 | 2014-08-17 12:30:50 -0500 | [diff] [blame] | 153 | if (__this_cpu_read(irq_depth) == 0) |
Chris Metcalf | 0c90547 | 2011-12-01 12:58:19 -0500 | [diff] [blame] | 154 | unmask_irqs(1UL << d->irq); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 155 | put_cpu_var(irq_disable_mask); |
| 156 | } |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 157 | |
| 158 | /* |
| 159 | * Add an irq to the disabled mask. We disable the HW interrupt |
| 160 | * immediately so that there's no possibility of it firing. If we're |
| 161 | * in an interrupt context, the return path is careful to avoid |
| 162 | * unmasking a newly disabled interrupt. |
| 163 | */ |
Chris Metcalf | 0c90547 | 2011-12-01 12:58:19 -0500 | [diff] [blame] | 164 | static void tile_irq_chip_disable(struct irq_data *d) |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 165 | { |
Chris Metcalf | 0c90547 | 2011-12-01 12:58:19 -0500 | [diff] [blame] | 166 | get_cpu_var(irq_disable_mask) |= (1UL << d->irq); |
| 167 | mask_irqs(1UL << d->irq); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 168 | put_cpu_var(irq_disable_mask); |
| 169 | } |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 170 | |
| 171 | /* Mask an interrupt. */ |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 172 | static void tile_irq_chip_mask(struct irq_data *d) |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 173 | { |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 174 | mask_irqs(1UL << d->irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | /* Unmask an interrupt. */ |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 178 | static void tile_irq_chip_unmask(struct irq_data *d) |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 179 | { |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 180 | unmask_irqs(1UL << d->irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | /* |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 184 | * Clear an interrupt before processing it so that any new assertions |
| 185 | * will trigger another irq. |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 186 | */ |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 187 | static void tile_irq_chip_ack(struct irq_data *d) |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 188 | { |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 189 | if ((unsigned long)irq_data_get_irq_chip_data(d) != IS_HW_CLEARED) |
| 190 | clear_irqs(1UL << d->irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | /* |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 194 | * For per-cpu interrupts, we need to avoid unmasking any interrupts |
| 195 | * that we disabled via disable_percpu_irq(). |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 196 | */ |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 197 | static void tile_irq_chip_eoi(struct irq_data *d) |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 198 | { |
Christoph Lameter | b4f5019 | 2014-08-17 12:30:50 -0500 | [diff] [blame] | 199 | if (!(__this_cpu_read(irq_disable_mask) & (1UL << d->irq))) |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 200 | unmask_irqs(1UL << d->irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 201 | } |
| 202 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 203 | static struct irq_chip tile_irq_chip = { |
Thomas Gleixner | d1ea13c | 2010-09-23 18:40:07 +0200 | [diff] [blame] | 204 | .name = "tile_irq_chip", |
Chris Metcalf | 0c90547 | 2011-12-01 12:58:19 -0500 | [diff] [blame] | 205 | .irq_enable = tile_irq_chip_enable, |
| 206 | .irq_disable = tile_irq_chip_disable, |
Thomas Gleixner | f5b42c9 | 2011-02-06 23:04:40 +0000 | [diff] [blame] | 207 | .irq_ack = tile_irq_chip_ack, |
| 208 | .irq_eoi = tile_irq_chip_eoi, |
| 209 | .irq_mask = tile_irq_chip_mask, |
| 210 | .irq_unmask = tile_irq_chip_unmask, |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 211 | }; |
| 212 | |
| 213 | void __init init_IRQ(void) |
| 214 | { |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 215 | ipi_init(); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 216 | } |
| 217 | |
Paul Gortmaker | 18f894c | 2013-06-18 17:28:07 -0400 | [diff] [blame] | 218 | void setup_irq_regs(void) |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 219 | { |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 220 | /* Enable interrupt delivery. */ |
| 221 | unmask_irqs(~0UL); |
| 222 | #if CHIP_HAS_IPI() |
Chris Metcalf | 5d96611 | 2010-11-01 15:24:29 -0400 | [diff] [blame] | 223 | arch_local_irq_unmask(INT_IPI_K); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 224 | #endif |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 225 | } |
| 226 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 227 | void tile_irq_activate(unsigned int irq, int tile_irq_type) |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 228 | { |
| 229 | /* |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 230 | * We use handle_level_irq() by default because the pending |
Chris Metcalf | d7c9661 | 2013-08-15 16:23:24 -0400 | [diff] [blame] | 231 | * interrupt vector (whether modeled by the HV on |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 232 | * TILEPro or implemented in hardware on TILE-Gx) has |
| 233 | * level-style semantics for each bit. An interrupt fires |
| 234 | * whenever a bit is high, not just at edges. |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 235 | */ |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 236 | irq_flow_handler_t handle = handle_level_irq; |
| 237 | if (tile_irq_type == TILE_IRQ_PERCPU) |
| 238 | handle = handle_percpu_irq; |
Thomas Gleixner | 1919d64 | 2011-03-25 14:21:16 +0000 | [diff] [blame] | 239 | irq_set_chip_and_handler(irq, &tile_irq_chip, handle); |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 240 | |
| 241 | /* |
| 242 | * Flag interrupts that are hardware-cleared so that ack() |
| 243 | * won't clear them. |
| 244 | */ |
| 245 | if (tile_irq_type == TILE_IRQ_HW_CLEAR) |
Thomas Gleixner | 1919d64 | 2011-03-25 14:21:16 +0000 | [diff] [blame] | 246 | irq_set_chip_data(irq, (void *)IS_HW_CLEARED); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 247 | } |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 248 | EXPORT_SYMBOL(tile_irq_activate); |
| 249 | |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 250 | |
| 251 | void ack_bad_irq(unsigned int irq) |
| 252 | { |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 253 | pr_err("unexpected IRQ trap at vector %02x\n", irq); |
Chris Metcalf | 867e359 | 2010-05-28 23:09:12 -0400 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | /* |
Zhigang Lu | 8d61dd7 | 2014-01-28 10:03:50 +0800 | [diff] [blame] | 257 | * /proc/interrupts printing: |
| 258 | */ |
| 259 | int arch_show_interrupts(struct seq_file *p, int prec) |
| 260 | { |
| 261 | #ifdef CONFIG_PERF_EVENTS |
| 262 | int i; |
| 263 | |
| 264 | seq_printf(p, "%*s: ", prec, "PMI"); |
| 265 | |
| 266 | for_each_online_cpu(i) |
| 267 | seq_printf(p, "%10llu ", per_cpu(perf_irqs, i)); |
| 268 | seq_puts(p, " perf_events\n"); |
| 269 | #endif |
| 270 | return 0; |
| 271 | } |
| 272 | |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 273 | #if CHIP_HAS_IPI() |
Thomas Gleixner | b26d851 | 2014-05-07 15:44:16 +0000 | [diff] [blame] | 274 | int arch_setup_hwirq(unsigned int irq, int node) |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 275 | { |
Thomas Gleixner | b26d851 | 2014-05-07 15:44:16 +0000 | [diff] [blame] | 276 | return irq >= NR_IRQS ? -EINVAL : 0; |
Thomas Gleixner | 6ef4051 | 2014-05-07 15:44:13 +0000 | [diff] [blame] | 277 | } |
| 278 | |
Thomas Gleixner | b26d851 | 2014-05-07 15:44:16 +0000 | [diff] [blame] | 279 | void arch_teardown_hwirq(unsigned int irq) { } |
Chris Metcalf | fb702b9 | 2010-06-25 16:41:11 -0400 | [diff] [blame] | 280 | #endif |