Lines Matching refs:apic

88 	int apic, pin;  member
267 static inline void io_apic_eoi(unsigned int apic, unsigned int vector) in io_apic_eoi() argument
269 struct io_apic __iomem *io_apic = io_apic_base(apic); in io_apic_eoi()
273 unsigned int native_io_apic_read(unsigned int apic, unsigned int reg) in native_io_apic_read() argument
275 struct io_apic __iomem *io_apic = io_apic_base(apic); in native_io_apic_read()
280 static void io_apic_write(unsigned int apic, unsigned int reg, in io_apic_write() argument
283 struct io_apic __iomem *io_apic = io_apic_base(apic); in io_apic_write()
294 static struct IO_APIC_route_entry __ioapic_read_entry(int apic, int pin) in __ioapic_read_entry() argument
298 eu.w1 = io_apic_read(apic, 0x10 + 2 * pin); in __ioapic_read_entry()
299 eu.w2 = io_apic_read(apic, 0x11 + 2 * pin); in __ioapic_read_entry()
304 static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) in ioapic_read_entry() argument
310 eu.entry = __ioapic_read_entry(apic, pin); in ioapic_read_entry()
322 static void __ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) in __ioapic_write_entry() argument
327 io_apic_write(apic, 0x11 + 2*pin, eu.w2); in __ioapic_write_entry()
328 io_apic_write(apic, 0x10 + 2*pin, eu.w1); in __ioapic_write_entry()
331 static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) in ioapic_write_entry() argument
336 __ioapic_write_entry(apic, pin, e); in ioapic_write_entry()
345 static void ioapic_mask_entry(int apic, int pin) in ioapic_mask_entry() argument
351 io_apic_write(apic, 0x10 + 2*pin, eu.w1); in ioapic_mask_entry()
352 io_apic_write(apic, 0x11 + 2*pin, eu.w2); in ioapic_mask_entry()
362 int node, int apic, int pin) in __add_pin_to_irq_node() argument
368 if (entry->apic == apic && entry->pin == pin) in __add_pin_to_irq_node()
374 node, apic, pin); in __add_pin_to_irq_node()
377 entry->apic = apic; in __add_pin_to_irq_node()
384 static void __remove_pin_from_irq(struct mp_chip_data *data, int apic, int pin) in __remove_pin_from_irq() argument
389 if (entry->apic == apic && entry->pin == pin) { in __remove_pin_from_irq()
397 int node, int apic, int pin) in add_pin_to_irq_node() argument
399 if (__add_pin_to_irq_node(data, node, apic, pin)) in add_pin_to_irq_node()
413 if (entry->apic == oldapic && entry->pin == oldpin) { in replace_pin_at_irq_node()
414 entry->apic = newapic; in replace_pin_at_irq_node()
438 io_apic_write(entry->apic, 0x10 + 2 * entry->pin, eu.w1); in io_apic_modify_irq()
452 io_apic = io_apic_base(entry->apic); in io_apic_sync()
497 static void __eoi_ioapic_pin(int apic, int pin, int vector) in __eoi_ioapic_pin() argument
499 if (mpc_ioapic_ver(apic) >= 0x20) { in __eoi_ioapic_pin()
500 io_apic_eoi(apic, vector); in __eoi_ioapic_pin()
504 entry = entry1 = __ioapic_read_entry(apic, pin); in __eoi_ioapic_pin()
512 __ioapic_write_entry(apic, pin, entry1); in __eoi_ioapic_pin()
517 __ioapic_write_entry(apic, pin, entry); in __eoi_ioapic_pin()
528 __eoi_ioapic_pin(entry->apic, entry->pin, vector); in eoi_ioapic_pin()
532 static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) in clear_IO_APIC_pin() argument
537 entry = ioapic_read_entry(apic, pin); in clear_IO_APIC_pin()
547 ioapic_write_entry(apic, pin, entry); in clear_IO_APIC_pin()
548 entry = ioapic_read_entry(apic, pin); in clear_IO_APIC_pin()
561 ioapic_write_entry(apic, pin, entry); in clear_IO_APIC_pin()
564 __eoi_ioapic_pin(apic, pin, entry.vector); in clear_IO_APIC_pin()
572 ioapic_mask_entry(apic, pin); in clear_IO_APIC_pin()
573 entry = ioapic_read_entry(apic, pin); in clear_IO_APIC_pin()
576 mpc_ioapic_id(apic), pin); in clear_IO_APIC_pin()
581 int apic, pin; in clear_IO_APIC() local
583 for_each_ioapic_pin(apic, pin) in clear_IO_APIC()
584 clear_IO_APIC_pin(apic, pin); in clear_IO_APIC()
630 int apic, pin; in save_ioapic_entries() local
633 for_each_ioapic(apic) { in save_ioapic_entries()
634 if (!ioapics[apic].saved_registers) { in save_ioapic_entries()
639 for_each_pin(apic, pin) in save_ioapic_entries()
640 ioapics[apic].saved_registers[pin] = in save_ioapic_entries()
641 ioapic_read_entry(apic, pin); in save_ioapic_entries()
652 int apic, pin; in mask_ioapic_entries() local
654 for_each_ioapic(apic) { in mask_ioapic_entries()
655 if (!ioapics[apic].saved_registers) in mask_ioapic_entries()
658 for_each_pin(apic, pin) { in mask_ioapic_entries()
661 entry = ioapics[apic].saved_registers[pin]; in mask_ioapic_entries()
664 ioapic_write_entry(apic, pin, entry); in mask_ioapic_entries()
675 int apic, pin; in restore_ioapic_entries() local
677 for_each_ioapic(apic) { in restore_ioapic_entries()
678 if (!ioapics[apic].saved_registers) in restore_ioapic_entries()
681 for_each_pin(apic, pin) in restore_ioapic_entries()
682 ioapic_write_entry(apic, pin, in restore_ioapic_entries()
683 ioapics[apic].saved_registers[pin]); in restore_ioapic_entries()
1220 static void io_apic_print_entries(unsigned int apic, unsigned int nr_entries) in io_apic_print_entries() argument
1227 printk(KERN_DEBUG "IOAPIC %d:\n", apic); in io_apic_print_entries()
1229 entry = ioapic_read_entry(apic, i); in io_apic_print_entries()
1343 pr_cont("-> %d:%d", entry->apic, entry->pin); in print_IO_APICs()
1351 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; member
1356 int apic, pin; in enable_IO_APIC() local
1364 for_each_ioapic_pin(apic, pin) { in enable_IO_APIC()
1366 struct IO_APIC_route_entry entry = ioapic_read_entry(apic, pin); in enable_IO_APIC()
1372 ioapic_i8259.apic = apic; in enable_IO_APIC()
1389 ioapic_i8259.apic = i8259_apic; in enable_IO_APIC()
1392 if (((ioapic_i8259.apic != i8259_apic) || (ioapic_i8259.pin != i8259_pin)) && in enable_IO_APIC()
1425 ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); in native_restore_boot_irq_mode()
1460 apic->ioapic_phys_id_map(&phys_cpu_present_map, &phys_id_present_map); in setup_ioapic_ids_from_mpc_nocheck()
1486 if (apic->check_apicid_used(&phys_id_present_map, in setup_ioapic_ids_from_mpc_nocheck()
1501 apic->apicid_to_cpu_present(mpc_ioapic_id(ioapic_idx), in setup_ioapic_ids_from_mpc_nocheck()
1703 reg = io_apic_read(entry->apic, 0x10 + pin*2); in io_apic_level_ack_pending()
1868 __ioapic_write_entry(entry->apic, entry->pin, mpd->entry); in ioapic_configure_entry()
1915 rentry = __ioapic_read_entry(p->apic, p->pin); in ioapic_irq_get_chip_state()
2027 int apic, pin, i; in unlock_ExtINT_logic() local
2036 apic = find_isa_irq_apic(8, mp_INT); in unlock_ExtINT_logic()
2037 if (apic == -1) { in unlock_ExtINT_logic()
2042 entry0 = ioapic_read_entry(apic, pin); in unlock_ExtINT_logic()
2043 clear_IO_APIC_pin(apic, pin); in unlock_ExtINT_logic()
2055 ioapic_write_entry(apic, pin, entry1); in unlock_ExtINT_logic()
2072 clear_IO_APIC_pin(apic, pin); in unlock_ExtINT_logic()
2074 ioapic_write_entry(apic, pin, entry0); in unlock_ExtINT_logic()
2148 apic2 = ioapic_i8259.apic; in check_timer()
2465 apic->ioapic_phys_id_map(&phys_cpu_present_map, &apic_id_map); in io_apic_get_unique_id()
2481 if (apic->check_apicid_used(&apic_id_map, apic_id)) { in io_apic_get_unique_id()
2484 if (!apic->check_apicid_used(&apic_id_map, i)) in io_apic_get_unique_id()
2497 apic->apicid_to_cpu_present(apic_id, &tmp); in io_apic_get_unique_id()
2951 entry->delivery_mode = apic->irq_delivery_mode; in mp_setup_entry()
2952 entry->dest_mode = apic->irq_dest_mode; in mp_setup_entry()