static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) { if (x2apic_phys) return x2apic_enabled(); else if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) && (acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL) && x2apic_enabled()) { printk(KERN_DEBUG "System requires x2apic physical mode\n"); return 1; } else return 0; }
static void irq_msi_compose_msg(struct irq_data *data, struct msi_msg *msg) { struct irq_cfg *cfg = irqd_cfg(data); msg->address_hi = MSI_ADDR_BASE_HI; if (x2apic_enabled()) msg->address_hi |= MSI_ADDR_EXT_DEST_ID(cfg->dest_apicid); msg->address_lo = MSI_ADDR_BASE_LO | ((apic->irq_dest_mode == 0) ? MSI_ADDR_DEST_MODE_PHYSICAL : MSI_ADDR_DEST_MODE_LOGICAL) | ((apic->irq_delivery_mode != dest_LowestPrio) ? MSI_ADDR_REDIRECTION_CPU : MSI_ADDR_REDIRECTION_LOWPRI) | MSI_ADDR_DEST_ID(cfg->dest_apicid); msg->data = MSI_DATA_TRIGGER_EDGE | MSI_DATA_LEVEL_ASSERT | ((apic->irq_delivery_mode != dest_LowestPrio) ? MSI_DATA_DELIVERY_FIXED : MSI_DATA_DELIVERY_LOWPRI) | MSI_DATA_VECTOR(cfg->vector); }
static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) { if (x2apic_phys) return x2apic_enabled(); else return 0; }
void check_x2apic(void) { if (x2apic_enabled()) { pr_info("x2apic enabled by BIOS, switching to x2apic ops\n"); x2apic_preenabled = x2apic_mode = 1; } }
static __init int setup_nox2apic(char *str) { if (x2apic_enabled()) { pr_warning("Bios already enabled x2apic, " "can't enforce nox2apic"); return 0; } setup_clear_cpu_cap(X86_FEATURE_X2APIC); return 0; }
static void __init jailhouse_x2apic_init(void) { #ifdef CONFIG_X86_X2APIC if (!x2apic_enabled()) return; /* * We do not have access to IR inside Jailhouse non-root cells. So * we have to run in physical mode. */ x2apic_phys = 1; /* * This will trigger the switch to apic_x2apic_phys. Empty OEM IDs * ensure that only this APIC driver picks up the call. */ default_acpi_madt_oem_check("", ""); #endif }
static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return x2apic_enabled(); }
static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return x2apic_enabled() && (x2apic_phys || x2apic_fadt_phys()); }