irq.h (0b05ac6e24807f0c26f763b3a546c0bcbf84125f) | irq.h (476eb4912601a8c01e6702b9a029f476b4b131d2) |
---|---|
1#ifdef __KERNEL__ 2#ifndef _ASM_POWERPC_IRQ_H 3#define _ASM_POWERPC_IRQ_H 4 5/* 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 114 unchanged lines hidden (view full) --- 123 struct irq_host_ops *ops; 124 void *host_data; 125 irq_hw_number_t inval_irq; 126 127 /* Optional device node pointer */ 128 struct device_node *of_node; 129}; 130 | 1#ifdef __KERNEL__ 2#ifndef _ASM_POWERPC_IRQ_H 3#define _ASM_POWERPC_IRQ_H 4 5/* 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 114 unchanged lines hidden (view full) --- 123 struct irq_host_ops *ops; 124 void *host_data; 125 irq_hw_number_t inval_irq; 126 127 /* Optional device node pointer */ 128 struct device_node *of_node; 129}; 130 |
131/* The main irq map itself is an array of NR_IRQ entries containing the 132 * associate host and irq number. An entry with a host of NULL is free. 133 * An entry can be allocated if it's free, the allocator always then sets 134 * hwirq first to the host's invalid irq number and then fills ops. 135 */ 136struct irq_map_entry { 137 irq_hw_number_t hwirq; 138 struct irq_host *host; 139}; 140 141extern struct irq_map_entry irq_map[NR_IRQS]; 142 | 131struct irq_data; 132extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d); |
143extern irq_hw_number_t virq_to_hw(unsigned int virq); | 133extern irq_hw_number_t virq_to_hw(unsigned int virq); |
134extern struct irq_host *virq_to_host(unsigned int virq); |
|
144 | 135 |
145/* This will eventually -replace- virq_to_hw if/when we stash the 146 * HW number in the irq_data itself. We use a macro so we can inline 147 * it as irq_data isn't defined yet 148 */ 149#define irq_data_to_hw(d) (irq_map[(d)->irq].hwirq) 150 | |
151/** 152 * irq_alloc_host - Allocate a new irq_host data structure 153 * @of_node: optional device-tree node of the interrupt controller 154 * @revmap_type: type of reverse mapping to use 155 * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map 156 * @ops: map/unmap host callbacks 157 * @inval_irq: provide a hw number in that host space that is always invalid 158 * --- 194 unchanged lines hidden --- | 136/** 137 * irq_alloc_host - Allocate a new irq_host data structure 138 * @of_node: optional device-tree node of the interrupt controller 139 * @revmap_type: type of reverse mapping to use 140 * @revmap_arg: for IRQ_HOST_MAP_LINEAR linear only: size of the map 141 * @ops: map/unmap host callbacks 142 * @inval_irq: provide a hw number in that host space that is always invalid 143 * --- 194 unchanged lines hidden --- |