Lines Matching +full:no +full:- +full:read +full:- +full:rollover

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
8 * Copyright (C) 1996-2001 Cort Dougan
19 * interrupt is _enabled_. As expected, IRQ0 is bit 0 in the 32-bit
47 #include <linux/radix-tree.h>
66 #include <asm/asm-prototypes.h>
115 /* This is called whenever we are re-enabling interrupts
120 * before soft-enabling interrupts, and from the exception exit
121 * path when returning from an interrupt from a soft-disabled to
126 * PACA irq_happened field since we can only re-emit one at a
136 unsigned char happened = local_paca->irq_happened; in __check_irq_replay()
139 * We are responding to the next interrupt, so interrupt-off in __check_irq_replay()
150 * expensive to read the TB. in __check_irq_replay()
159 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS; in __check_irq_replay()
163 * Check the decrementer register in case we had a rollover in __check_irq_replay()
168 local_paca->irq_happened |= PACA_IRQ_DEC; in __check_irq_replay()
175 local_paca->irq_happened &= ~PACA_IRQ_DEC; in __check_irq_replay()
180 local_paca->irq_happened &= ~PACA_IRQ_EE; in __check_irq_replay()
185 local_paca->irq_happened &= ~PACA_IRQ_DBELL; in __check_irq_replay()
190 BUG_ON(local_paca->irq_happened != 0); in __check_irq_replay()
196 * This is specifically called by assembly code to re-enable interrupts
202 * as such in paca->irq_happened, so we need to resync this.
207 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in restore_interrupts()
222 unsigned char happened = local_paca->irq_happened; in replay_soft_interrupts()
235 * Check the decrementer register in case we had a rollover in replay_soft_interrupts()
245 * Force the delivery of pending soft-disabled interrupts on PS3. in replay_soft_interrupts()
259 local_paca->irq_happened &= ~PACA_IRQ_HMI; in replay_soft_interrupts()
262 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)) in replay_soft_interrupts()
267 local_paca->irq_happened &= ~PACA_IRQ_DEC; in replay_soft_interrupts()
270 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)) in replay_soft_interrupts()
275 local_paca->irq_happened &= ~PACA_IRQ_EE; in replay_soft_interrupts()
278 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)) in replay_soft_interrupts()
283 local_paca->irq_happened &= ~PACA_IRQ_DBELL; in replay_soft_interrupts()
289 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)) in replay_soft_interrupts()
293 /* Book3E does not support soft-masking PMI interrupts */ in replay_soft_interrupts()
295 local_paca->irq_happened &= ~PACA_IRQ_PMI; in replay_soft_interrupts()
298 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)) in replay_soft_interrupts()
302 happened = local_paca->irq_happened; in replay_soft_interrupts()
305 * We are responding to the next interrupt, so interrupt-off in replay_soft_interrupts()
318 /* Write the new soft-enabled value */ in arch_local_irq_restore()
325 * etc... unless we got hard-disabled. We check if an event in arch_local_irq_restore()
333 * be hard-disabled, so there is no problem, we in arch_local_irq_restore()
361 local_paca->irq_happened = 0; in arch_local_irq_restore()
377 local_paca->irq_happened = 0; in arch_local_irq_restore()
387 * This is a helper to use when about to go into idle low-power
388 * when the latter has the side effect of re-enabling interrupts
391 * You call this function with interrupts soft-disabled (this is
396 * being re-enabled and generally sanitized the lazy irq state,
399 * in arch_cpu_idle() will properly re-enable everything.
404 * First we need to hard disable to ensure no interrupt in prep_irq_for_idle()
408 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in prep_irq_for_idle()
411 * If anything happened while we were soft-disabled, in prep_irq_for_idle()
417 /* Tell lockdep we are about to re-enable */ in prep_irq_for_idle()
421 * Mark interrupts as soft-enabled and clear the in prep_irq_for_idle()
426 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS; in prep_irq_for_idle()
445 * First we need to hard disable to ensure no interrupt in prep_irq_for_idle_irqsoff()
449 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in prep_irq_for_idle_irqsoff()
452 * If anything happened while we were soft-disabled, in prep_irq_for_idle_irqsoff()
458 /* Tell lockdep we are about to re-enable */ in prep_irq_for_idle_irqsoff()
494 get_paca()->in_nmi = 1; in replay_system_reset()
496 get_paca()->in_nmi = 0; in replay_system_reset()
508 * re-enabled before it is taken. in irq_set_pending_from_srr1()
531 * reason as returned by the idle code, which uses 0 to mean no in irq_set_pending_from_srr1()
535 * then a new index for no interrupt must be assigned. in irq_set_pending_from_srr1()
537 local_paca->irq_happened |= reason; in irq_set_pending_from_srr1()
547 * This must only be called with interrupts soft-disabled, in force_external_irq_replay()
548 * the replay will happen when re-enabling. in force_external_irq_replay()
558 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in force_external_irq_replay()
561 local_paca->irq_happened |= PACA_IRQ_EE; in force_external_irq_replay()
613 seq_printf(p, "%10u ", paca_ptrs[j]->hmi_irqs); in arch_show_interrupts()
627 seq_printf(p, " Watchdog soft-NMI interrupts\n"); in arch_show_interrupts()
655 sum += paca_ptrs[cpu]->hmi_irqs; in arch_irq_stat_cpu()
675 sp = current_stack_pointer & (THREAD_SIZE - 1); in check_stack_overflow()
719 cursp = (void *)(current_stack_pointer & ~(THREAD_SIZE - 1)); in do_IRQ()
780 return WARN_ON(!irq_data) ? 0 : irq_data->hwirq; in virq_to_hw()
794 /* Round-robin distribution... */ in irq_choose_cpu()