arch/s390/include/asm/irqflags.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/irqflags.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/irqflags.h- Extension
.h- Size
- 2122 bytes
- Lines
- 90
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/types.h
Detected Declarations
function __arch_local_irq_ssmfunction arch_local_save_flagsfunction arch_local_irq_savefunction arch_local_irq_disablefunction arch_local_irq_enable_externalfunction arch_local_irq_enablefunction arch_local_irq_restorefunction arch_irqs_disabled_flagsfunction arch_irqs_disabled
Annotated Snippet
#ifndef __ASM_IRQFLAGS_H
#define __ASM_IRQFLAGS_H
#include <linux/types.h>
#define ARCH_IRQ_ENABLED (3UL << (BITS_PER_LONG - 8))
/* store then OR system mask. */
#define __arch_local_irq_stosm(__or) \
({ \
unsigned long __mask; \
asm volatile( \
" stosm %0,%1" \
: "=Q" (__mask) : "i" (__or) : "memory"); \
__mask; \
})
/* store then AND system mask. */
#define __arch_local_irq_stnsm(__and) \
({ \
unsigned long __mask; \
asm volatile( \
" stnsm %0,%1" \
: "=Q" (__mask) : "i" (__and) : "memory"); \
__mask; \
})
/* set system mask. */
static __always_inline void __arch_local_irq_ssm(unsigned long flags)
{
asm volatile("ssm %0" : : "Q" (flags) : "memory");
}
#ifdef CONFIG_KMSAN
#define arch_local_irq_attributes noinline notrace __no_sanitize_memory __maybe_unused
#else
#define arch_local_irq_attributes __always_inline
#endif
static arch_local_irq_attributes unsigned long arch_local_save_flags(void)
{
return __arch_local_irq_stnsm(0xff);
}
static arch_local_irq_attributes unsigned long arch_local_irq_save(void)
{
return __arch_local_irq_stnsm(0xfc);
}
static __always_inline void arch_local_irq_disable(void)
{
arch_local_irq_save();
}
static arch_local_irq_attributes void arch_local_irq_enable_external(void)
{
__arch_local_irq_stosm(0x01);
}
static arch_local_irq_attributes void arch_local_irq_enable(void)
{
__arch_local_irq_stosm(0x03);
}
/* This only restores external and I/O interrupt state */
static __always_inline void arch_local_irq_restore(unsigned long flags)
{
/* only disabled->disabled and disabled->enabled is valid */
if (flags & ARCH_IRQ_ENABLED)
arch_local_irq_enable();
}
static __always_inline bool arch_irqs_disabled_flags(unsigned long flags)
{
return !(flags & ARCH_IRQ_ENABLED);
}
static __always_inline bool arch_irqs_disabled(void)
{
return arch_irqs_disabled_flags(arch_local_save_flags());
}
#endif /* __ASM_IRQFLAGS_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `function __arch_local_irq_ssm`, `function arch_local_save_flags`, `function arch_local_irq_save`, `function arch_local_irq_disable`, `function arch_local_irq_enable_external`, `function arch_local_irq_enable`, `function arch_local_irq_restore`, `function arch_irqs_disabled_flags`, `function arch_irqs_disabled`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.