arch/m68k/kernel/ints.c
Source file repositories/reference/linux-study-clean/arch/m68k/kernel/ints.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/kernel/ints.c- Extension
.c- Size
- 4080 bytes
- Lines
- 172
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/types.hlinux/sched.hlinux/interrupt.hlinux/errno.hlinux/init.hlinux/irq.hasm/setup.hasm/irq.hasm/traps.hasm/page.hasm/machdep.hasm/cacheflush.hasm/irq_regs.hasm/q40ints.hints.h
Detected Declarations
function init_IRQfunction do_IRQfunction m68k_setup_user_interruptfunction m68k_setup_irq_controllerfunction m68k_irq_startup_irqfunction m68k_irq_startupfunction m68k_irq_shutdownfunction irq_canonicalizefunction handle_badintexport irq_canonicalize
Annotated Snippet
#include <linux/module.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/traps.h>
#include <asm/page.h>
#include <asm/machdep.h>
#include <asm/cacheflush.h>
#include <asm/irq_regs.h>
#ifdef CONFIG_Q40
#include <asm/q40ints.h>
#endif
#include "ints.h"
extern u32 auto_irqhandler_fixup[];
extern u16 user_irqvec_fixup[];
static int m68k_first_user_vec;
static struct irq_chip auto_irq_chip = {
.name = "auto",
.irq_startup = m68k_irq_startup,
.irq_shutdown = m68k_irq_shutdown,
};
static struct irq_chip user_irq_chip = {
.name = "user",
.irq_startup = m68k_irq_startup,
.irq_shutdown = m68k_irq_shutdown,
};
/*
* void init_IRQ(void)
*
* Parameters: None
*
* Returns: Nothing
*
* This function should be called during kernel startup to initialize
* the IRQ handling routines.
*/
void __init init_IRQ(void)
{
int i;
for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
mach_init_IRQ();
}
/**
* m68k_setup_auto_interrupt
* @handler: called from auto vector interrupts
*
* setup the handler to be called from auto vector interrupts instead of the
* standard do_IRQ(), it will be called with irq numbers in the range
* from IRQ_AUTO_1 - IRQ_AUTO_7.
*/
void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *))
{
if (handler)
*auto_irqhandler_fixup = (u32)handler;
flush_icache();
}
/**
* m68k_setup_user_interrupt
* @vec: first user vector interrupt to handle
* @cnt: number of active user vector interrupts
*
* setup user vector interrupts, this includes activating the specified range
* of interrupts, only then these interrupts can be requested (note: this is
* different from auto vector interrupts).
*/
void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt)
{
int i;
BUG_ON(IRQ_USER + cnt > NR_IRQS);
m68k_first_user_vec = vec;
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/sched.h`, `linux/interrupt.h`, `linux/errno.h`, `linux/init.h`, `linux/irq.h`, `asm/setup.h`.
- Detected declarations: `function init_IRQ`, `function do_IRQ`, `function m68k_setup_user_interrupt`, `function m68k_setup_irq_controller`, `function m68k_irq_startup_irq`, `function m68k_irq_startup`, `function m68k_irq_shutdown`, `function irq_canonicalize`, `function handle_badint`, `export irq_canonicalize`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.