arch/m68k/atari/ataints.c
Source file repositories/reference/linux-study-clean/arch/m68k/atari/ataints.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/atari/ataints.c- Extension
.c- Size
- 10047 bytes
- Lines
- 387
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/kernel.hlinux/kernel_stat.hlinux/init.hlinux/seq_file.hlinux/module.hlinux/irq.hasm/traps.hasm/atarihw.hasm/atariints.hasm/atari_stdma.hasm/irq.hasm/entry.hasm/io.hatari.h
Detected Declarations
struct mfptimerbasefunction atari_irq_startupfunction atari_irq_shutdownfunction atari_irq_enablefunction atari_irq_disablefunction mfp_timer_d_handlerfunction atari_mfptimer_enablefunction atari_mfptimer_disablefunction atari_ethernat_startupfunction atari_ethernat_enablefunction atari_ethernat_disablefunction atari_ethernat_shutdownfunction atari_init_IRQfunction atari_register_vme_intfunction atari_unregister_vme_intexport atari_register_vme_intexport atari_unregister_vme_int
Annotated Snippet
struct mfptimerbase {
volatile struct MFP *mfp;
unsigned char mfp_mask, mfp_data;
unsigned short int_mask;
int handler_irq, mfptimer_irq, server_irq;
char *name;
} stmfp_base = {
.mfp = &st_mfp,
.int_mask = 0x0,
.handler_irq = IRQ_MFP_TIMD,
.mfptimer_irq = IRQ_MFP_TIMER1,
.name = "MFP Timer D"
};
static irqreturn_t mfp_timer_d_handler(int irq, void *dev_id)
{
struct mfptimerbase *base = dev_id;
int mach_irq;
unsigned char ints;
mach_irq = base->mfptimer_irq;
ints = base->int_mask;
for (; ints; mach_irq++, ints >>= 1) {
if (ints & 1)
generic_handle_irq(mach_irq);
}
return IRQ_HANDLED;
}
static void atari_mfptimer_enable(struct irq_data *data)
{
int mfp_num = data->irq - IRQ_MFP_TIMER1;
stmfp_base.int_mask |= 1 << mfp_num;
atari_enable_irq(IRQ_MFP_TIMD);
}
static void atari_mfptimer_disable(struct irq_data *data)
{
int mfp_num = data->irq - IRQ_MFP_TIMER1;
stmfp_base.int_mask &= ~(1 << mfp_num);
if (!stmfp_base.int_mask)
atari_disable_irq(IRQ_MFP_TIMD);
}
static struct irq_chip atari_mfptimer_chip = {
.name = "timer_d",
.irq_enable = atari_mfptimer_enable,
.irq_disable = atari_mfptimer_disable,
};
/*
* EtherNAT CPLD interrupt handling
* CPLD interrupt register is at phys. 0x80000023
* Need this mapped in at interrupt startup time
* Possibly need this mapped on demand anyway -
* EtherNAT USB driver needs to disable IRQ before
* startup!
*/
static unsigned char *enat_cpld;
static unsigned int atari_ethernat_startup(struct irq_data *data)
{
int enat_num = 140 - data->irq + 1;
m68k_irq_startup(data);
/*
* map CPLD interrupt register
*/
if (!enat_cpld)
enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2);
/*
* do _not_ enable the USB chip interrupt here - causes interrupt storm
* and triggers dead interrupt watchdog
* Need to reset the USB chip to a sane state in early startup before
* removing this hack
*/
if (enat_num == 1)
*enat_cpld |= 1 << enat_num;
return 0;
}
static void atari_ethernat_enable(struct irq_data *data)
{
int enat_num = 140 - data->irq + 1;
/*
* map CPLD interrupt register
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/kernel_stat.h`, `linux/init.h`, `linux/seq_file.h`, `linux/module.h`, `linux/irq.h`, `asm/traps.h`.
- Detected declarations: `struct mfptimerbase`, `function atari_irq_startup`, `function atari_irq_shutdown`, `function atari_irq_enable`, `function atari_irq_disable`, `function mfp_timer_d_handler`, `function atari_mfptimer_enable`, `function atari_mfptimer_disable`, `function atari_ethernat_startup`, `function atari_ethernat_enable`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.