Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
tile: Use generic show_interupts()
tile: Convert to new irq function names
dma: Ipu: Convert interupt code

+32 -72
+1
arch/tile/Kconfig
··· 12 12 select GENERIC_IRQ_PROBE 13 13 select GENERIC_PENDING_IRQ if SMP 14 14 select GENERIC_HARDIRQS_NO_DEPRECATED 15 + select GENERIC_IRQ_SHOW 15 16 16 17 # FIXME: investigate whether we need/want these options. 17 18 # select HAVE_IOREMAP_PROT
+2 -43
arch/tile/kernel/irq.c
··· 241 241 irq_flow_handler_t handle = handle_level_irq; 242 242 if (tile_irq_type == TILE_IRQ_PERCPU) 243 243 handle = handle_percpu_irq; 244 - set_irq_chip_and_handler(irq, &tile_irq_chip, handle); 244 + irq_set_chip_and_handler(irq, &tile_irq_chip, handle); 245 245 246 246 /* 247 247 * Flag interrupts that are hardware-cleared so that ack() 248 248 * won't clear them. 249 249 */ 250 250 if (tile_irq_type == TILE_IRQ_HW_CLEAR) 251 - set_irq_chip_data(irq, (void *)IS_HW_CLEARED); 251 + irq_set_chip_data(irq, (void *)IS_HW_CLEARED); 252 252 } 253 253 EXPORT_SYMBOL(tile_irq_activate); 254 254 ··· 261 261 /* 262 262 * Generic, controller-independent functions: 263 263 */ 264 - 265 - int show_interrupts(struct seq_file *p, void *v) 266 - { 267 - int i = *(loff_t *) v, j; 268 - struct irqaction *action; 269 - unsigned long flags; 270 - 271 - if (i == 0) { 272 - seq_printf(p, " "); 273 - for (j = 0; j < NR_CPUS; j++) 274 - if (cpu_online(j)) 275 - seq_printf(p, "CPU%-8d", j); 276 - seq_putc(p, '\n'); 277 - } 278 - 279 - if (i < NR_IRQS) { 280 - struct irq_desc *desc = irq_to_desc(i); 281 - 282 - raw_spin_lock_irqsave(&desc->lock, flags); 283 - action = desc->action; 284 - if (!action) 285 - goto skip; 286 - seq_printf(p, "%3d: ", i); 287 - #ifndef CONFIG_SMP 288 - seq_printf(p, "%10u ", kstat_irqs(i)); 289 - #else 290 - for_each_online_cpu(j) 291 - seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); 292 - #endif 293 - seq_printf(p, " %14s", get_irq_desc_chip(desc)->name); 294 - seq_printf(p, " %s", action->name); 295 - 296 - for (action = action->next; action; action = action->next) 297 - seq_printf(p, ", %s", action->name); 298 - 299 - seq_putc(p, '\n'); 300 - skip: 301 - raw_spin_unlock_irqrestore(&desc->lock, flags); 302 - } 303 - return 0; 304 - } 305 264 306 265 #if CHIP_HAS_IPI() 307 266 int create_irq(void)
+29 -29
drivers/dma/ipu/ipu_irq.c
··· 94 94 return NULL; 95 95 } 96 96 97 - static void ipu_irq_unmask(unsigned int irq) 97 + static void ipu_irq_unmask(struct irq_data *d) 98 98 { 99 - struct ipu_irq_map *map = get_irq_chip_data(irq); 99 + struct ipu_irq_map *map = irq_data_get_irq_chip_data(d); 100 100 struct ipu_irq_bank *bank; 101 101 uint32_t reg; 102 102 unsigned long lock_flags; ··· 106 106 bank = map->bank; 107 107 if (!bank) { 108 108 spin_unlock_irqrestore(&bank_lock, lock_flags); 109 - pr_err("IPU: %s(%u) - unmapped!\n", __func__, irq); 109 + pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq); 110 110 return; 111 111 } 112 112 ··· 117 117 spin_unlock_irqrestore(&bank_lock, lock_flags); 118 118 } 119 119 120 - static void ipu_irq_mask(unsigned int irq) 120 + static void ipu_irq_mask(struct irq_data *d) 121 121 { 122 - struct ipu_irq_map *map = get_irq_chip_data(irq); 122 + struct ipu_irq_map *map = irq_data_get_irq_chip_data(d); 123 123 struct ipu_irq_bank *bank; 124 124 uint32_t reg; 125 125 unsigned long lock_flags; ··· 129 129 bank = map->bank; 130 130 if (!bank) { 131 131 spin_unlock_irqrestore(&bank_lock, lock_flags); 132 - pr_err("IPU: %s(%u) - unmapped!\n", __func__, irq); 132 + pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq); 133 133 return; 134 134 } 135 135 ··· 140 140 spin_unlock_irqrestore(&bank_lock, lock_flags); 141 141 } 142 142 143 - static void ipu_irq_ack(unsigned int irq) 143 + static void ipu_irq_ack(struct irq_data *d) 144 144 { 145 - struct ipu_irq_map *map = get_irq_chip_data(irq); 145 + struct ipu_irq_map *map = irq_data_get_irq_chip_data(d); 146 146 struct ipu_irq_bank *bank; 147 147 unsigned long lock_flags; 148 148 ··· 151 151 bank = map->bank; 152 152 if (!bank) { 153 153 spin_unlock_irqrestore(&bank_lock, lock_flags); 154 - pr_err("IPU: %s(%u) - unmapped!\n", __func__, irq); 154 + pr_err("IPU: %s(%u) - unmapped!\n", __func__, d->irq); 155 155 return; 156 156 } 157 157 ··· 167 167 */ 168 168 bool ipu_irq_status(unsigned int irq) 169 169 { 170 - struct ipu_irq_map *map = get_irq_chip_data(irq); 170 + struct ipu_irq_map *map = irq_get_chip_data(irq); 171 171 struct ipu_irq_bank *bank; 172 172 unsigned long lock_flags; 173 173 bool ret; ··· 269 269 /* Chained IRQ handler for IPU error interrupt */ 270 270 static void ipu_irq_err(unsigned int irq, struct irq_desc *desc) 271 271 { 272 - struct ipu *ipu = get_irq_data(irq); 272 + struct ipu *ipu = irq_get_handler_data(irq); 273 273 u32 status; 274 274 int i, line; 275 275 ··· 310 310 /* Chained IRQ handler for IPU function interrupt */ 311 311 static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc) 312 312 { 313 - struct ipu *ipu = get_irq_data(irq); 313 + struct ipu *ipu = irq_desc_get_handler_data(desc); 314 314 u32 status; 315 315 int i, line; 316 316 ··· 345 345 } 346 346 347 347 static struct irq_chip ipu_irq_chip = { 348 - .name = "ipu_irq", 349 - .ack = ipu_irq_ack, 350 - .mask = ipu_irq_mask, 351 - .unmask = ipu_irq_unmask, 348 + .name = "ipu_irq", 349 + .irq_ack = ipu_irq_ack, 350 + .irq_mask = ipu_irq_mask, 351 + .irq_unmask = ipu_irq_unmask, 352 352 }; 353 353 354 354 /* Install the IRQ handler */ ··· 366 366 int ret; 367 367 368 368 irq = irq_base + i; 369 - ret = set_irq_chip(irq, &ipu_irq_chip); 369 + ret = irq_set_chip(irq, &ipu_irq_chip); 370 370 if (ret < 0) 371 371 return ret; 372 - ret = set_irq_chip_data(irq, irq_map + i); 372 + ret = irq_set_chip_data(irq, irq_map + i); 373 373 if (ret < 0) 374 374 return ret; 375 375 irq_map[i].ipu = ipu; 376 376 irq_map[i].irq = irq; 377 377 irq_map[i].source = -EINVAL; 378 - set_irq_handler(irq, handle_level_irq); 378 + irq_set_handler(irq, handle_level_irq); 379 379 #ifdef CONFIG_ARM 380 380 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 381 381 #endif 382 382 } 383 383 384 - set_irq_data(ipu->irq_fn, ipu); 385 - set_irq_chained_handler(ipu->irq_fn, ipu_irq_fn); 384 + irq_set_handler_data(ipu->irq_fn, ipu); 385 + irq_set_chained_handler(ipu->irq_fn, ipu_irq_fn); 386 386 387 - set_irq_data(ipu->irq_err, ipu); 388 - set_irq_chained_handler(ipu->irq_err, ipu_irq_err); 387 + irq_set_handler_data(ipu->irq_err, ipu); 388 + irq_set_chained_handler(ipu->irq_err, ipu_irq_err); 389 389 390 390 return 0; 391 391 } ··· 397 397 398 398 irq_base = pdata->irq_base; 399 399 400 - set_irq_chained_handler(ipu->irq_fn, NULL); 401 - set_irq_data(ipu->irq_fn, NULL); 400 + irq_set_chained_handler(ipu->irq_fn, NULL); 401 + irq_set_handler_data(ipu->irq_fn, NULL); 402 402 403 - set_irq_chained_handler(ipu->irq_err, NULL); 404 - set_irq_data(ipu->irq_err, NULL); 403 + irq_set_chained_handler(ipu->irq_err, NULL); 404 + irq_set_handler_data(ipu->irq_err, NULL); 405 405 406 406 for (irq = irq_base; irq < irq_base + CONFIG_MX3_IPU_IRQS; irq++) { 407 407 #ifdef CONFIG_ARM 408 408 set_irq_flags(irq, 0); 409 409 #endif 410 - set_irq_chip(irq, NULL); 411 - set_irq_chip_data(irq, NULL); 410 + irq_set_chip(irq, NULL); 411 + irq_set_chip_data(irq, NULL); 412 412 } 413 413 }