Lines Matching +full:no +full:- +full:reset +full:- +full:on +full:- +full:power +full:- +full:off

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
9 * Adapted for Power Macintosh by Paul Mackerras
39 #include <linux/radix-tree.h>
74 WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)); in next_interrupt()
79 * We are responding to the next interrupt, so interrupt-off in next_interrupt()
80 * latencies should be reset here. in next_interrupt()
90 if (local_paca->irq_happened & irq) { in irq_happened_test_and_clear()
91 local_paca->irq_happened &= ~irq; in irq_happened_test_and_clear()
108 WARN_ON(!(local_paca->irq_happened & PACA_IRQ_HARD_DIS)); in __replay_soft_interrupts()
109 WARN_ON(local_paca->irq_happened & PACA_IRQ_REPLAYING); in __replay_soft_interrupts()
117 local_paca->irq_happened |= PACA_IRQ_REPLAYING; in __replay_soft_interrupts()
124 * Force the delivery of pending soft-disabled interrupts on PS3. in __replay_soft_interrupts()
163 /* Book3E does not support soft-masking PMI interrupts */ in __replay_soft_interrupts()
171 local_paca->irq_happened &= ~PACA_IRQ_REPLAYING; in __replay_soft_interrupts()
189 * and re-locking AMR but we shouldn't get here in the first place, in replay_soft_interrupts_irqrestore()
210 /* Write the new soft-enabled value if it is a disable */ in arch_local_irq_restore()
219 WARN_ON_ONCE(local_paca->irq_happened & PACA_IRQ_REPLAYING); in arch_local_irq_restore()
224 * After the stb, interrupts are unmasked and there are no interrupts in arch_local_irq_restore()
226 * respect to soft-masked interrupts. If this was just a simple code in arch_local_irq_restore()
227 * sequence, a soft-masked interrupt could become pending right after in arch_local_irq_restore()
258 irq_happened = READ_ONCE(local_paca->irq_happened); in arch_local_irq_restore()
266 local_paca->irq_happened = 0; in arch_local_irq_restore()
282 irq_happened = READ_ONCE(local_paca->irq_happened); in arch_local_irq_restore()
287 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in arch_local_irq_restore()
307 * it here now to hold off softirqs until the below irq_exit(). If in arch_local_irq_restore()
323 if (unlikely(local_paca->irq_happened != PACA_IRQ_HARD_DIS)) { in arch_local_irq_restore()
336 local_paca->irq_happened = 0; in arch_local_irq_restore()
343 * This is a helper to use when about to go into idle low-power
344 * when the latter has the side effect of re-enabling interrupts
347 * You call this function with interrupts soft-disabled (this is
349 * will return whether to enter power save or just return.
354 * in arch_cpu_idle() will properly re-enable everything.
359 * First we need to hard disable to ensure no interrupt in prep_irq_for_idle()
360 * occurs before we effectively enter the low power state in prep_irq_for_idle()
363 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in prep_irq_for_idle()
366 * If anything happened while we were soft-disabled, in prep_irq_for_idle()
367 * we return now and do not enter the low power state. in prep_irq_for_idle()
373 * Mark interrupts as soft-enabled and clear the in prep_irq_for_idle()
376 * of entering the low power state. in prep_irq_for_idle()
378 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS; in prep_irq_for_idle()
381 /* Tell the caller to enter the low power state */ in prep_irq_for_idle()
387 * This is for idle sequences that return with IRQs off, but the
388 * idle state itself wakes on interrupt. Tell the irq tracer that
390 * off times. Must be paired with fini_irq_for_idle_irqsoff.
397 * First we need to hard disable to ensure no interrupt in prep_irq_for_idle_irqsoff()
398 * occurs before we effectively enter the low power state in prep_irq_for_idle_irqsoff()
401 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in prep_irq_for_idle_irqsoff()
404 * If anything happened while we were soft-disabled, in prep_irq_for_idle_irqsoff()
405 * we return now and do not enter the low power state. in prep_irq_for_idle_irqsoff()
410 /* Tell lockdep we are about to re-enable */ in prep_irq_for_idle_irqsoff()
420 * Sytem reset exceptions taken in idle state also come through here,
423 * with 0xff in the table. The Power ISA specifies 0100b as the system
424 * reset interrupt reason.
446 get_paca()->in_nmi = 1; in replay_system_reset()
448 get_paca()->in_nmi = 0; in replay_system_reset()
458 * Take the system reset now, which is immediately after registers in irq_set_pending_from_srr1()
460 * re-enabled before it is taken. in irq_set_pending_from_srr1()
469 * When doorbell triggers a system reset wakeup, the message in irq_set_pending_from_srr1()
483 * reason as returned by the idle code, which uses 0 to mean no in irq_set_pending_from_srr1()
487 * then a new index for no interrupt must be assigned. in irq_set_pending_from_srr1()
489 local_paca->irq_happened |= reason; in irq_set_pending_from_srr1()
494 * Force a replay of the external interrupt handler on this CPU.
499 * This must only be called with interrupts soft-disabled, in force_external_irq_replay()
500 * the replay will happen when re-enabling. in force_external_irq_replay()
510 local_paca->irq_happened |= PACA_IRQ_HARD_DIS; in force_external_irq_replay()
513 local_paca->irq_happened |= PACA_IRQ_EE; in force_external_irq_replay()