]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/apic/vector.c
x86/apic: Move online masking to core code
[karo-tx-linux.git] / arch / x86 / kernel / apic / vector.c
index f3557a1eb562fbe6e46b2e3db3289ca8535b1b6c..0f94ddbb6beb0364d6f630c2a5e81813753400c0 100644 (file)
@@ -221,8 +221,11 @@ success:
         * Cache destination APIC IDs into cfg->dest_apicid. This cannot fail
         * as we already established, that mask & d->domain & cpu_online_mask
         * is not empty.
+        *
+        * vector_searchmask is a subset of d->domain and has the offline
+        * cpus masked out.
         */
-       BUG_ON(apic->cpu_mask_to_apicid_and(mask, d->domain,
+       BUG_ON(apic->cpu_mask_to_apicid_and(mask, vector_searchmask,
                                            &d->cfg.dest_apicid));
        return 0;
 }
@@ -429,11 +432,16 @@ static void init_legacy_irqs(void) { }
 
 int __init arch_early_irq_init(void)
 {
+       struct fwnode_handle *fn;
+
        init_legacy_irqs();
 
-       x86_vector_domain = irq_domain_add_tree(NULL, &x86_vector_domain_ops,
-                                               NULL);
+       fn = irq_domain_alloc_named_fwnode("VECTOR");
+       BUG_ON(!fn);
+       x86_vector_domain = irq_domain_create_tree(fn, &x86_vector_domain_ops,
+                                                  NULL);
        BUG_ON(x86_vector_domain == NULL);
+       irq_domain_free_fwnode(fn);
        irq_set_default_host(x86_vector_domain);
 
        arch_init_msi_domain(x86_vector_domain);
@@ -534,6 +542,7 @@ static int apic_set_affinity(struct irq_data *irq_data,
 }
 
 static struct irq_chip lapic_controller = {
+       .name                   = "APIC",
        .irq_ack                = apic_ack_edge,
        .irq_set_affinity       = apic_set_affinity,
        .irq_retrigger          = apic_retrigger_irq,