Lines Matching +full:- +full:affinity
1 /* SPDX-License-Identifier: GPL-2.0 */
10 * Thanks. --rmk
36 * Bits 0-7 are the same as the IRQF_* bits in linux/interrupt.h
38 * IRQ_TYPE_NONE - default, unspecified type
39 * IRQ_TYPE_EDGE_RISING - rising edge triggered
40 * IRQ_TYPE_EDGE_FALLING - falling edge triggered
41 * IRQ_TYPE_EDGE_BOTH - rising and falling edge triggered
42 * IRQ_TYPE_LEVEL_HIGH - high level triggered
43 * IRQ_TYPE_LEVEL_LOW - low level triggered
44 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits
45 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits
46 * IRQ_TYPE_DEFAULT - For use by some PICs to ask irq_set_type
52 * IRQ_TYPE_PROBE - Special flag for probing in progress
55 * IRQ_LEVEL - Interrupt is level type. Will be also
58 * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect
59 * it from affinity setting
60 * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing
61 * IRQ_NOREQUEST - Interrupt cannot be requested via
63 * IRQ_NOTHREAD - Interrupt cannot be threaded
64 * IRQ_NOAUTOEN - Interrupt is not automatically enabled in
66 * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set)
67 * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context
68 * IRQ_NESTED_THREAD - Interrupt nests into another thread
69 * IRQ_PER_CPU_DEVID - Dev_id is a per-cpu variable
70 * IRQ_IS_POLLED - Always polled by another interrupt. Exclude
73 * IRQ_DISABLE_UNLAZY - Disable lazy irq disable
74 * IRQ_HIDDEN - Don't show up in /proc/interrupts
75 * IRQ_NO_DEBUG - Exclude from note_interrupt() debugging
115 * Return value for chip->irq_set_affinity()
117 * IRQ_SET_MASK_OK - OK, core updates irq_common_data.affinity
118 * IRQ_SET_MASK_NOCOPY - OK, chip did update irq_common_data.affinity
119 * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to
133 * struct irq_common_data - per irq data shared by all irqchips
137 * @handler_data: per-IRQ data for the irq_chip methods
138 * @affinity: IRQ affinity on SMP. If this is an IPI
141 * @effective_affinity: The effective IRQ affinity on SMP as some irq
143 * A subset of @affinity.
145 * @ipi_offset: Offset of first IPI target cpu in @affinity. Optional.
155 cpumask_var_t affinity; member
166 * struct irq_data - per irq chip data passed down to chip functions
176 * @chip_data: platform-specific per-chip private data for the chip
195 * IRQD_TRIGGER_MASK - Mask for the trigger type bits
196 * IRQD_SETAFFINITY_PENDING - Affinity setting is pending
197 * IRQD_ACTIVATED - Interrupt has already been activated
198 * IRQD_NO_BALANCING - Balancing disabled for this IRQ
199 * IRQD_PER_CPU - Interrupt is per cpu
200 * IRQD_AFFINITY_SET - Interrupt affinity was set
201 * IRQD_LEVEL - Interrupt is level triggered
202 * IRQD_WAKEUP_STATE - Interrupt is configured for wakeup
204 * IRQD_MOVE_PCNTXT - Interrupt can be moved in process
206 * IRQD_IRQ_DISABLED - Disabled state of the interrupt
207 * IRQD_IRQ_MASKED - Masked state of the interrupt
208 * IRQD_IRQ_INPROGRESS - In progress state of the interrupt
209 * IRQD_WAKEUP_ARMED - Wakeup mode armed
210 * IRQD_FORWARDED_TO_VCPU - The interrupt is forwarded to a VCPU
211 * IRQD_AFFINITY_MANAGED - Affinity is auto-managed by the kernel
212 * IRQD_IRQ_STARTED - Startup state of the interrupt
213 * IRQD_MANAGED_SHUTDOWN - Interrupt was shutdown due to empty affinity
214 * mask. Applies only to affinity managed irqs.
215 * IRQD_SINGLE_TARGET - IRQ allows only a single affinity target
216 * IRQD_DEFAULT_TRIGGER_SET - Expected trigger already been set
217 * IRQD_CAN_RESERVE - Can use reservation mode
218 * IRQD_HANDLE_ENFORCE_IRQCTX - Enforce that handle_irq_*() is only invoked
220 * IRQD_AFFINITY_ON_ACTIVATE - Affinity is set on activation. Don't call
222 * IRQD_IRQ_ENABLED_ON_SUSPEND - Interrupt is enabled on suspend by irq pm if
224 * IRQD_RESEND_WHEN_IN_PROGRESS - Interrupt may fire when already in progress in which
254 #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
450 return d->hwirq; in irqd_to_hwirq()
454 * struct irq_chip - hardware interrupt chip descriptor
457 * @irq_startup: start up the interrupt (defaults to ->enable if NULL)
458 * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL)
459 * @irq_enable: enable the interrupt (defaults to chip->unmask if NULL)
466 * @irq_set_affinity: Set the CPU affinity on SMP machines. If the force
468 * unconditionally apply the affinity setting. Sanity
469 * checks against the supplied affinity mask are not
474 * @irq_set_wake: enable/disable power-management wake-on of an IRQ
478 * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU
568 * IRQCHIP_AFFINITY_PRE_STARTUP: Default affinity update before startup
589 * Pick up the arch-dependent methods:
649 * Built-in IRQ handlers for various IRQ types,
650 * callable via desc->handle_irq()
707 /* Dummy irq-chip implementations: */
724 const struct cpumask *affinity);
726 struct cpumask *affinity);
818 return d ? d->chip : NULL; in irq_get_chip()
823 return d->chip; in irq_data_get_irq_chip()
829 return d ? d->chip_data : NULL; in irq_get_chip_data()
834 return d->chip_data; in irq_data_get_irq_chip_data()
840 return d ? d->common->handler_data : NULL; in irq_get_handler_data()
845 return d->common->handler_data; in irq_data_get_irq_handler_data()
851 return d ? d->common->msi_desc : NULL; in irq_get_msi_desc()
856 return d->common->msi_desc; in irq_data_get_msi_desc()
868 return d->node; in irq_common_data_get_node()
876 return irq_common_data_get_node(d->common); in irq_data_get_node()
883 return d->common->affinity; in irq_data_get_affinity_mask()
893 cpumask_copy(d->common->affinity, m); in irq_data_update_affinity()
908 return d->common->effective_affinity; in irq_data_get_effective_affinity_mask()
913 cpumask_copy(d->common->effective_affinity, m); in irq_data_update_effective_affinity()
939 const struct irq_affinity_desc *affinity);
943 const struct irq_affinity_desc *affinity);
950 irq_alloc_descs(-1, 1, 1, node)
956 irq_alloc_descs(-1, from, 1, node)
959 irq_alloc_descs(-1, from, cnt, node)
965 devm_irq_alloc_descs(dev, -1, 1, 1, node)
971 devm_irq_alloc_descs(dev, -1, from, 1, node)
974 devm_irq_alloc_descs(dev, -1, from, cnt, node)
987 * struct irq_chip_regs - register offsets for struct irq_gci
1005 * struct irq_chip_type - Generic interrupt chip instance for a flow type
1027 * struct irq_chip_generic - Generic irq chip data structure
1079 * enum irq_gc_flags - Initialization flags for generic irq chips
1085 * @IRQ_GC_NO_MASK: Do not calculate irq_data->mask
1086 * @IRQ_GC_BE_IO: Use big-endian register accesses (default: LE)
1097 * struct irq_domain_chip_generic - Generic irq chip data structure for irq domains
1117 * struct irq_domain_chip_generic_info - Generic chip information structure
1188 return -EINVAL; in irq_domain_alloc_generic_chips()
1222 return container_of(d->chip, struct irq_chip_type, chip); in irq_data_get_chip_type()
1225 #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX)
1230 raw_spin_lock(&gc->lock); in irq_gc_lock()
1235 raw_spin_unlock(&gc->lock); in irq_gc_unlock()
1247 raw_spin_lock_irqsave(&(gc)->lock, flags)
1250 raw_spin_unlock_irqrestore(&(gc)->lock, flags)
1255 if (gc->reg_writel) in irq_reg_writel()
1256 gc->reg_writel(val, gc->reg_base + reg_offset); in irq_reg_writel()
1258 writel(val, gc->reg_base + reg_offset); in irq_reg_writel()
1264 if (gc->reg_readl) in irq_reg_readl()
1265 return gc->reg_readl(gc->reg_base + reg_offset); in irq_reg_readl()
1267 return readl(gc->reg_base + reg_offset); in irq_reg_readl()
1306 * Registers a generic IRQ handling function as the top-level IRQ handler in
1308 * architecture-specific interrupt handler.
1310 * Returns 0 on success, or -EBUSY if an IRQ handler has already been
1317 * top-level IRQ handler.