arch/openrisc/kernel/irq.c
Source file repositories/reference/linux-study-clean/arch/openrisc/kernel/irq.c
File Facts
- System
- Linux kernel
- Corpus path
arch/openrisc/kernel/irq.c- Extension
.c- Size
- 939 bytes
- Lines
- 39
- Domain
- Architecture Layer
- Bucket
- arch/openrisc
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/interrupt.hlinux/init.hlinux/ftrace.hlinux/irq.hlinux/irqchip.hlinux/export.hlinux/irqflags.h
Detected Declarations
function Copyrightfunction arch_local_irq_restorefunction init_IRQexport arch_local_save_flagsexport arch_local_irq_restore
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* OpenRISC irq.c
*
* Linux architectural port borrowing liberally from similar works of
* others. All original copyrights apply as per the original source
* declaration.
*
* Modifications for the OpenRISC architecture:
* Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
*/
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/ftrace.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/export.h>
#include <linux/irqflags.h>
/* read interrupt enabled status */
unsigned long arch_local_save_flags(void)
{
return mfspr(SPR_SR) & (SPR_SR_IEE|SPR_SR_TEE);
}
EXPORT_SYMBOL(arch_local_save_flags);
/* set interrupt enabled status */
void arch_local_irq_restore(unsigned long flags)
{
mtspr(SPR_SR, ((mfspr(SPR_SR) & ~(SPR_SR_IEE|SPR_SR_TEE)) | flags));
}
EXPORT_SYMBOL(arch_local_irq_restore);
void __init init_IRQ(void)
{
irqchip_init();
}
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/init.h`, `linux/ftrace.h`, `linux/irq.h`, `linux/irqchip.h`, `linux/export.h`, `linux/irqflags.h`.
- Detected declarations: `function Copyright`, `function arch_local_irq_restore`, `function init_IRQ`, `export arch_local_save_flags`, `export arch_local_irq_restore`.
- Atlas domain: Architecture Layer / arch/openrisc.
- Implementation status: integration 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.