Lines Matching refs:apic

86 	int apic, pin;  member
278 static inline void io_apic_eoi(unsigned int apic, unsigned int vector) in io_apic_eoi() argument
280 struct io_apic __iomem *io_apic = io_apic_base(apic); in io_apic_eoi()
284 unsigned int native_io_apic_read(unsigned int apic, unsigned int reg) in native_io_apic_read() argument
286 struct io_apic __iomem *io_apic = io_apic_base(apic); in native_io_apic_read()
291 static void io_apic_write(unsigned int apic, unsigned int reg, in io_apic_write() argument
294 struct io_apic __iomem *io_apic = io_apic_base(apic); in io_apic_write()
305 static struct IO_APIC_route_entry __ioapic_read_entry(int apic, int pin) in __ioapic_read_entry() argument
309 eu.w1 = io_apic_read(apic, 0x10 + 2 * pin); in __ioapic_read_entry()
310 eu.w2 = io_apic_read(apic, 0x11 + 2 * pin); in __ioapic_read_entry()
315 static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin) in ioapic_read_entry() argument
321 eu.entry = __ioapic_read_entry(apic, pin); in ioapic_read_entry()
333 static void __ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) in __ioapic_write_entry() argument
338 io_apic_write(apic, 0x11 + 2*pin, eu.w2); in __ioapic_write_entry()
339 io_apic_write(apic, 0x10 + 2*pin, eu.w1); in __ioapic_write_entry()
342 static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) in ioapic_write_entry() argument
347 __ioapic_write_entry(apic, pin, e); in ioapic_write_entry()
356 static void ioapic_mask_entry(int apic, int pin) in ioapic_mask_entry() argument
362 io_apic_write(apic, 0x10 + 2*pin, eu.w1); in ioapic_mask_entry()
363 io_apic_write(apic, 0x11 + 2*pin, eu.w2); in ioapic_mask_entry()
373 int node, int apic, int pin) in __add_pin_to_irq_node() argument
379 if (entry->apic == apic && entry->pin == pin) in __add_pin_to_irq_node()
385 node, apic, pin); in __add_pin_to_irq_node()
388 entry->apic = apic; in __add_pin_to_irq_node()
395 static void __remove_pin_from_irq(struct mp_chip_data *data, int apic, int pin) in __remove_pin_from_irq() argument
400 if (entry->apic == apic && entry->pin == pin) { in __remove_pin_from_irq()
408 int node, int apic, int pin) in add_pin_to_irq_node() argument
410 if (__add_pin_to_irq_node(data, node, apic, pin)) in add_pin_to_irq_node()
424 if (entry->apic == oldapic && entry->pin == oldpin) { in replace_pin_at_irq_node()
425 entry->apic = newapic; in replace_pin_at_irq_node()
449 io_apic_write(entry->apic, 0x10 + 2 * entry->pin, eu.w1); in io_apic_modify_irq()
463 io_apic = io_apic_base(entry->apic); in io_apic_sync()
508 static void __eoi_ioapic_pin(int apic, int pin, int vector) in __eoi_ioapic_pin() argument
510 if (mpc_ioapic_ver(apic) >= 0x20) { in __eoi_ioapic_pin()
511 io_apic_eoi(apic, vector); in __eoi_ioapic_pin()
515 entry = entry1 = __ioapic_read_entry(apic, pin); in __eoi_ioapic_pin()
523 __ioapic_write_entry(apic, pin, entry1); in __eoi_ioapic_pin()
528 __ioapic_write_entry(apic, pin, entry); in __eoi_ioapic_pin()
539 __eoi_ioapic_pin(entry->apic, entry->pin, vector); in eoi_ioapic_pin()
543 static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) in clear_IO_APIC_pin() argument
548 entry = ioapic_read_entry(apic, pin); in clear_IO_APIC_pin()
558 ioapic_write_entry(apic, pin, entry); in clear_IO_APIC_pin()
559 entry = ioapic_read_entry(apic, pin); in clear_IO_APIC_pin()
572 ioapic_write_entry(apic, pin, entry); in clear_IO_APIC_pin()
575 __eoi_ioapic_pin(apic, pin, entry.vector); in clear_IO_APIC_pin()
583 ioapic_mask_entry(apic, pin); in clear_IO_APIC_pin()
584 entry = ioapic_read_entry(apic, pin); in clear_IO_APIC_pin()
587 mpc_ioapic_id(apic), pin); in clear_IO_APIC_pin()
592 int apic, pin; in clear_IO_APIC() local
594 for_each_ioapic_pin(apic, pin) in clear_IO_APIC()
595 clear_IO_APIC_pin(apic, pin); in clear_IO_APIC()
641 int apic, pin; in save_ioapic_entries() local
644 for_each_ioapic(apic) { in save_ioapic_entries()
645 if (!ioapics[apic].saved_registers) { in save_ioapic_entries()
650 for_each_pin(apic, pin) in save_ioapic_entries()
651 ioapics[apic].saved_registers[pin] = in save_ioapic_entries()
652 ioapic_read_entry(apic, pin); in save_ioapic_entries()
663 int apic, pin; in mask_ioapic_entries() local
665 for_each_ioapic(apic) { in mask_ioapic_entries()
666 if (!ioapics[apic].saved_registers) in mask_ioapic_entries()
669 for_each_pin(apic, pin) { in mask_ioapic_entries()
672 entry = ioapics[apic].saved_registers[pin]; in mask_ioapic_entries()
675 ioapic_write_entry(apic, pin, entry); in mask_ioapic_entries()
686 int apic, pin; in restore_ioapic_entries() local
688 for_each_ioapic(apic) { in restore_ioapic_entries()
689 if (!ioapics[apic].saved_registers) in restore_ioapic_entries()
692 for_each_pin(apic, pin) in restore_ioapic_entries()
693 ioapic_write_entry(apic, pin, in restore_ioapic_entries()
694 ioapics[apic].saved_registers[pin]); in restore_ioapic_entries()
1206 int apic, idx, pin; in IO_APIC_irq_trigger() local
1208 for_each_ioapic_pin(apic, pin) { in IO_APIC_irq_trigger()
1209 idx = find_irq_entry(apic, pin, mp_INT); in IO_APIC_irq_trigger()
1210 if ((idx != -1) && (irq == pin_2_irq(idx, apic, pin, 0))) in IO_APIC_irq_trigger()
1249 static void io_apic_print_entries(unsigned int apic, unsigned int nr_entries) in io_apic_print_entries() argument
1256 printk(KERN_DEBUG "IOAPIC %d:\n", apic); in io_apic_print_entries()
1258 entry = ioapic_read_entry(apic, i); in io_apic_print_entries()
1372 pr_cont("-> %d:%d", entry->apic, entry->pin); in print_IO_APICs()
1380 static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; member
1385 int apic, pin; in enable_IO_APIC() local
1393 for_each_ioapic_pin(apic, pin) { in enable_IO_APIC()
1395 struct IO_APIC_route_entry entry = ioapic_read_entry(apic, pin); in enable_IO_APIC()
1401 ioapic_i8259.apic = apic; in enable_IO_APIC()
1418 ioapic_i8259.apic = i8259_apic; in enable_IO_APIC()
1421 if (((ioapic_i8259.apic != i8259_apic) || (ioapic_i8259.pin != i8259_pin)) && in enable_IO_APIC()
1454 ioapic_write_entry(ioapic_i8259.apic, ioapic_i8259.pin, entry); in native_disable_io_apic()
1497 apic->ioapic_phys_id_map(&phys_cpu_present_map, &phys_id_present_map); in setup_ioapic_ids_from_mpc_nocheck()
1523 if (apic->check_apicid_used(&phys_id_present_map, in setup_ioapic_ids_from_mpc_nocheck()
1538 apic->apicid_to_cpu_present(mpc_ioapic_id(ioapic_idx), in setup_ioapic_ids_from_mpc_nocheck()
1699 reg = io_apic_read(entry->apic, 0x10 + pin*2); in io_apic_level_ack_pending()
1862 __ioapic_write_entry(entry->apic, entry->pin, in ioapic_set_affinity()
1962 int apic, pin, i; in unlock_ExtINT_logic() local
1971 apic = find_isa_irq_apic(8, mp_INT); in unlock_ExtINT_logic()
1972 if (apic == -1) { in unlock_ExtINT_logic()
1977 entry0 = ioapic_read_entry(apic, pin); in unlock_ExtINT_logic()
1978 clear_IO_APIC_pin(apic, pin); in unlock_ExtINT_logic()
1990 ioapic_write_entry(apic, pin, entry1); in unlock_ExtINT_logic()
2007 clear_IO_APIC_pin(apic, pin); in unlock_ExtINT_logic()
2009 ioapic_write_entry(apic, pin, entry0); in unlock_ExtINT_logic()
2080 apic2 = ioapic_i8259.apic; in check_timer()
2365 apic->ioapic_phys_id_map(&phys_cpu_present_map, &apic_id_map); in io_apic_get_unique_id()
2381 if (apic->check_apicid_used(&apic_id_map, apic_id)) { in io_apic_get_unique_id()
2384 if (!apic->check_apicid_used(&apic_id_map, i)) in io_apic_get_unique_id()
2397 apic->apicid_to_cpu_present(apic_id, &tmp); in io_apic_get_unique_id()
2550 mask = apic->target_cpus(); in setup_ioapic_dest()
2892 entry->delivery_mode = apic->irq_delivery_mode; in mp_setup_entry()
2893 entry->dest_mode = apic->irq_dest_mode; in mp_setup_entry()
2993 __ioapic_write_entry(entry->apic, entry->pin, data->entry); in mp_irqdomain_activate()