arch/powerpc/platforms/ps3/interrupt.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/ps3/interrupt.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/ps3/interrupt.c- Extension
.c- Size
- 19517 bytes
- Lines
- 784
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/kernel.hlinux/export.hlinux/irq.hlinux/irqdomain.hasm/machdep.hasm/udbg.hasm/lv1call.hasm/smp.hplatform.h
Detected Declarations
struct ps3_bmpstruct ps3_privatefunction ps3_chip_maskfunction ps3_chip_unmaskfunction lv1_end_of_interrupt_extfunction irq_create_mappingfunction irq_dispose_mappingfunction ps3_irq_plug_setupfunction ps3_sb_event_receive_port_setupfunction lv1_connect_interrupt_event_receive_portfunction disconnect_interrupt_event_receive_portfunction ps3_send_event_locallyfunction ps3_sb_event_receive_port_setupfunction ps3_sb_event_receive_port_destroyfunction ps3_io_irq_setupfunction ps3_io_irq_destroyfunction ps3_vuart_irq_setupfunction ps3_vuart_irq_destroyfunction ps3_spe_irq_setupfunction ps3_spe_irq_destroyfunction _dump_64_bmpfunction _dump_256_bmpfunction _dump_bmpfunction _dump_maskfunction dump_bmpfunction ps3_host_mapfunction ps3_host_matchfunction ps3_register_ipi_debug_brkfunction ps3_register_ipi_irqfunction ps3_get_irqfunction ps3_init_IRQfunction for_each_possible_cpufunction ps3_shutdown_IRQexport ps3_irq_plug_setupexport ps3_irq_plug_destroyexport ps3_event_receive_port_setupexport ps3_sb_event_receive_port_setupexport ps3_sb_event_receive_port_destroyexport ps3_io_irq_setupexport ps3_io_irq_destroyexport ps3_vuart_irq_setupexport ps3_vuart_irq_destroy
Annotated Snippet
struct ps3_bmp {
struct {
u64 status;
u64 unused_1[3];
unsigned long mask;
u64 unused_2[3];
};
};
/**
* struct ps3_private - a per cpu data structure
* @bmp: ps3_bmp structure
* @bmp_lock: Synchronize access to bmp.
* @ipi_debug_brk_mask: Mask for debug break IPIs
* @ppe_id: HV logical_ppe_id
* @thread_id: HV thread_id
* @ipi_mask: Mask of IPI virqs
*/
struct ps3_private {
struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
spinlock_t bmp_lock;
u64 ppe_id;
u64 thread_id;
unsigned long ipi_debug_brk_mask;
unsigned long ipi_mask;
};
static DEFINE_PER_CPU(struct ps3_private, ps3_private);
/**
* ps3_chip_mask - Set an interrupt mask bit in ps3_bmp.
* @virq: The assigned Linux virq.
*
* Sets ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
*/
static void ps3_chip_mask(struct irq_data *d)
{
struct ps3_private *pd = irq_data_get_irq_chip_data(d);
unsigned long flags;
DBG("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
pd->thread_id, d->irq);
local_irq_save(flags);
clear_bit(63 - d->irq, &pd->bmp.mask);
lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
local_irq_restore(flags);
}
/**
* ps3_chip_unmask - Clear an interrupt mask bit in ps3_bmp.
* @virq: The assigned Linux virq.
*
* Clears ps3_bmp.mask and calls lv1_did_update_interrupt_mask().
*/
static void ps3_chip_unmask(struct irq_data *d)
{
struct ps3_private *pd = irq_data_get_irq_chip_data(d);
unsigned long flags;
DBG("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
pd->thread_id, d->irq);
local_irq_save(flags);
set_bit(63 - d->irq, &pd->bmp.mask);
lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
local_irq_restore(flags);
}
/**
* ps3_chip_eoi - HV end-of-interrupt.
* @virq: The assigned Linux virq.
*
* Calls lv1_end_of_interrupt_ext().
*/
static void ps3_chip_eoi(struct irq_data *d)
{
const struct ps3_private *pd = irq_data_get_irq_chip_data(d);
/* non-IPIs are EOIed here. */
if (!test_bit(63 - d->irq, &pd->ipi_mask))
lv1_end_of_interrupt_ext(pd->ppe_id, pd->thread_id, d->irq);
}
/**
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/export.h`, `linux/irq.h`, `linux/irqdomain.h`, `asm/machdep.h`, `asm/udbg.h`, `asm/lv1call.h`, `asm/smp.h`.
- Detected declarations: `struct ps3_bmp`, `struct ps3_private`, `function ps3_chip_mask`, `function ps3_chip_unmask`, `function lv1_end_of_interrupt_ext`, `function irq_create_mapping`, `function irq_dispose_mapping`, `function ps3_irq_plug_setup`, `function ps3_sb_event_receive_port_setup`, `function lv1_connect_interrupt_event_receive_port`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.