/** * struct ps3_bmp - a per cpu irq status and mask bitmap structure * @status: 256 bit status bitmap indexed by plug * @unused_1: Alignment * @mask: 256 bit mask bitmap indexed by plug * @unused_2: Alignment * * The HV maintains per SMT thread mappings of HV outlet to HV plug on * behalf of the guest. These mappings are implemented as 256 bit guest * supplied bitmaps indexed by plug number. The addresses of the bitmaps * are registered with the HV through lv1_configure_irq_state_bitmap(). * The HV requires that the 512 bits of status + mask not cross a page * boundary. PS3_BMP_MINALIGN is used to define this minimal 64 byte * alignment. * * The HV supports 256 plugs per thread, assigned as {0..255}, for a total * of 512 plugs supported on a processor. To simplify the logic this * implementation equates HV plug value to Linux virq value, constrains each * interrupt to have a system wide unique plug number, and limits the range * of the plug values to map into the first dword of the bitmaps. This * gives a usable range of plug values of {NR_IRQS_LEGACY..63}. Note * that there is no constraint on how many in this set an individual thread * can acquire. * * The mask is declared as unsigned long so we can use set/clear_bit on it.
*/
/** * 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().
*/
/** * 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().
*/
/** * ps3_virq_setup - virq related setup. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @outlet: The HV outlet from the various create outlet routines. * @virq: The assigned Linux virq. * * Calls irq_create_mapping() to get a virq and sets the chip data to * ps3_private data.
*/
/** * ps3_virq_destroy - virq related teardown. * @virq: The assigned Linux virq. * * Clears chip data and calls irq_dispose_mapping() for the virq.
*/
/** * ps3_irq_plug_setup - Generic outlet and virq related setup. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @outlet: The HV outlet from the various create outlet routines. * @virq: The assigned Linux virq. * * Sets up virq and connects the irq plug.
*/
int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsignedlong outlet, unsignedint *virq)
{ int result; struct ps3_private *pd;
/** * ps3_irq_plug_destroy - Generic outlet and virq related teardown. * @virq: The assigned Linux virq. * * Disconnects the irq plug and tears down virq. * Do not call for system bus event interrupts setup with * ps3_sb_event_receive_port_setup().
*/
int ps3_irq_plug_destroy(unsignedint virq)
{ int result; conststruct ps3_private *pd = irq_get_chip_data(virq);
/** * ps3_event_receive_port_setup - Setup an event receive port. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @virq: The assigned Linux virq. * * The virq can be used with lv1_connect_interrupt_event_receive_port() to * arrange to receive interrupts from system-bus devices, or with * ps3_send_event_locally() to signal events.
*/
int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsignedint *virq)
{ int result;
u64 outlet;
result = lv1_construct_event_receive_port(&outlet);
/** * ps3_event_receive_port_destroy - Destroy an event receive port. * @virq: The assigned Linux virq. * * Since ps3_event_receive_port_destroy destroys the receive port outlet, * SB devices need to call disconnect_interrupt_event_receive_port() before * this.
*/
int ps3_event_receive_port_destroy(unsignedint virq)
{ int result;
int ps3_send_event_locally(unsignedint virq)
{ return lv1_send_event_locally(virq_to_hw(virq));
}
/** * ps3_sb_event_receive_port_setup - Setup a system bus event receive port. * @dev: The system bus device instance. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @virq: The assigned Linux virq. * * An event irq represents a virtual device interrupt. The interrupt_id * coresponds to the software interrupt number.
*/
int ps3_sb_event_receive_port_setup(struct ps3_system_bus_device *dev, enum ps3_cpu_binding cpu, unsignedint *virq)
{ /* this should go in system-bus.c */
int result;
result = ps3_event_receive_port_setup(cpu, virq);
if (result) return result;
result = lv1_connect_interrupt_event_receive_port(dev->bus_id,
dev->dev_id, virq_to_hw(*virq), dev->interrupt_id);
/** * ps3_io_irq_setup - Setup a system bus io irq. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @interrupt_id: The device interrupt id read from the system repository. * @virq: The assigned Linux virq. * * An io irq represents a non-virtualized device interrupt. interrupt_id * coresponds to the interrupt number of the interrupt controller.
*/
int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsignedint interrupt_id, unsignedint *virq)
{ int result;
u64 outlet;
result = lv1_construct_io_irq_outlet(interrupt_id, &outlet);
/** * ps3_vuart_irq_setup - Setup the system virtual uart virq. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @virt_addr_bmp: The caller supplied virtual uart interrupt bitmap. * @virq: The assigned Linux virq. * * The system supports only a single virtual uart, so multiple calls without * freeing the interrupt will return a wrong state error.
*/
int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp, unsignedint *virq)
{ int result;
u64 outlet;
u64 lpar_addr;
/** * ps3_spe_irq_setup - Setup an spe virq. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. * @spe_id: The spe_id returned from lv1_construct_logical_spe(). * @class: The spe interrupt class {0,1,2}. * @virq: The assigned Linux virq. *
*/
int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsignedlong spe_id, unsignedintclass, unsignedint *virq)
{ int result;
u64 outlet;
BUG_ON(class > 2);
result = lv1_get_spe_irq_outlet(spe_id, class, &outlet);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.