162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef _SPARC64_PIL_H 362306a36Sopenharmony_ci#define _SPARC64_PIL_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* To avoid some locking problems, we hard allocate certain PILs 662306a36Sopenharmony_ci * for SMP cross call messages that must do a etrap/rtrap. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * A local_irq_disable() does not block the cross call delivery, so 962306a36Sopenharmony_ci * when SMP locking is an issue we reschedule the event into a PIL 1062306a36Sopenharmony_ci * interrupt which is blocked by local_irq_disable(). 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * In fact any XCALL which has to etrap/rtrap has a problem because 1362306a36Sopenharmony_ci * it is difficult to prevent rtrap from running BH's, and that would 1462306a36Sopenharmony_ci * need to be done if the XCALL arrived while %pil==PIL_NORMAL_MAX. 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * Finally, in order to handle profiling events even when a 1762306a36Sopenharmony_ci * local_irq_disable() is in progress, we only disable up to level 14 1862306a36Sopenharmony_ci * interrupts. Profile counter overflow interrupts arrive at level 1962306a36Sopenharmony_ci * 15. 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci#define PIL_SMP_CALL_FUNC 1 2262306a36Sopenharmony_ci#define PIL_SMP_RECEIVE_SIGNAL 2 2362306a36Sopenharmony_ci#define PIL_SMP_CAPTURE 3 2462306a36Sopenharmony_ci#define PIL_DEVICE_IRQ 5 2562306a36Sopenharmony_ci#define PIL_SMP_CALL_FUNC_SNGL 6 2662306a36Sopenharmony_ci#define PIL_DEFERRED_PCR_WORK 7 2762306a36Sopenharmony_ci#define PIL_KGDB_CAPTURE 8 2862306a36Sopenharmony_ci#define PIL_NORMAL_MAX 14 2962306a36Sopenharmony_ci#define PIL_NMI 15 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#endif /* !(_SPARC64_PIL_H) */ 32