Release 4.14 arch/x86/kernel/apic/x2apic_phys.c
// SPDX-License-Identifier: GPL-2.0
#include <linux/threads.h>
#include <linux/cpumask.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/dmar.h>
#include <asm/smp.h>
#include <asm/x2apic.h>
int x2apic_phys;
static struct apic apic_x2apic_phys;
static int set_x2apic_phys_mode(char *arg)
{
x2apic_phys = 1;
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yinghai Lu | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
early_param("x2apic_phys", set_x2apic_phys_mode);
static bool x2apic_fadt_phys(void)
{
#ifdef CONFIG_ACPI
if ((acpi_gbl_FADT.header.revision >= FADT2_REVISION_ID) &&
(acpi_gbl_FADT.flags & ACPI_FADT_APIC_PHYSICAL)) {
printk(KERN_DEBUG "System requires x2apic physical mode\n");
return true;
}
#endif
return false;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Greg Pearson | 28 | 59.57% | 1 | 25.00% |
Stoney Wang | 7 | 14.89% | 1 | 25.00% |
Yinghai Lu | 7 | 14.89% | 1 | 25.00% |
Jan Kiszka | 5 | 10.64% | 1 | 25.00% |
Total | 47 | 100.00% | 4 | 100.00% |
static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
return x2apic_enabled() && (x2apic_phys || x2apic_fadt_phys());
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Stoney Wang | 23 | 92.00% | 1 | 50.00% |
Yinghai Lu | 2 | 8.00% | 1 | 50.00% |
Total | 25 | 100.00% | 2 | 100.00% |
static void x2apic_send_IPI(int cpu, int vector)
{
u32 dest = per_cpu(x86_cpu_to_apicid, cpu);
x2apic_wrmsr_fence();
__x2apic_send_IPI_dest(dest, vector, APIC_DEST_PHYSICAL);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Thomas Gleixner | 34 | 100.00% | 1 | 100.00% |
Total | 34 | 100.00% | 1 | 100.00% |
static void
__x2apic_send_IPI_mask(const struct cpumask *mask, int vector, int apic_dest)
{
unsigned long query_cpu;
unsigned long this_cpu;
unsigned long flags;
x2apic_wrmsr_fence();
local_irq_save(flags);
this_cpu = smp_processor_id();
for_each_cpu(query_cpu, mask) {
if (apic_dest == APIC_DEST_ALLBUT && this_cpu == query_cpu)
continue;
__x2apic_send_IPI_dest(per_cpu(x86_cpu_to_apicid, query_cpu),
vector, APIC_DEST_PHYSICAL);
}
local_irq_restore(flags);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 74 | 91.36% | 3 | 50.00% |
Mike Travis | 5 | 6.17% | 2 | 33.33% |
Ingo Molnar | 2 | 2.47% | 1 | 16.67% |
Total | 81 | 100.00% | 6 | 100.00% |
static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector)
{
__x2apic_send_IPI_mask(mask, vector, APIC_DEST_ALLINC);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Mike Travis | 13 | 54.17% | 2 | 50.00% |
Suresh B. Siddha | 11 | 45.83% | 2 | 50.00% |
Total | 24 | 100.00% | 4 | 100.00% |
static void
x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, int vector)
{
__x2apic_send_IPI_mask(mask, vector, APIC_DEST_ALLBUT);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 21 | 87.50% | 2 | 66.67% |
Mike Travis | 3 | 12.50% | 1 | 33.33% |
Total | 24 | 100.00% | 3 | 100.00% |
static void x2apic_send_IPI_allbutself(int vector)
{
__x2apic_send_IPI_mask(cpu_online_mask, vector, APIC_DEST_ALLBUT);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 9 | 50.00% | 2 | 66.67% |
Mike Travis | 9 | 50.00% | 1 | 33.33% |
Total | 18 | 100.00% | 3 | 100.00% |
static void x2apic_send_IPI_all(int vector)
{
__x2apic_send_IPI_mask(cpu_online_mask, vector, APIC_DEST_ALLINC);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 17 | 94.44% | 2 | 66.67% |
Mike Travis | 1 | 5.56% | 1 | 33.33% |
Total | 18 | 100.00% | 3 | 100.00% |
static void init_x2apic_ldr(void)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 5 | 71.43% | 1 | 33.33% |
Ingo Molnar | 1 | 14.29% | 1 | 33.33% |
Jaswinder Singh Rajput | 1 | 14.29% | 1 | 33.33% |
Total | 7 | 100.00% | 3 | 100.00% |
static int x2apic_phys_probe(void)
{
if (x2apic_mode && (x2apic_phys || x2apic_fadt_phys()))
return 1;
return apic == &apic_x2apic_phys;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 23 | 82.14% | 1 | 50.00% |
Stoney Wang | 5 | 17.86% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
static struct apic apic_x2apic_phys __ro_after_init = {
.name = "physical x2apic",
.probe = x2apic_phys_probe,
.acpi_madt_oem_check = x2apic_acpi_madt_oem_check,
.apic_id_valid = x2apic_apic_id_valid,
.apic_id_registered = x2apic_apic_id_registered,
.irq_delivery_mode = dest_Fixed,
.irq_dest_mode = 0, /* physical */
.target_cpus = online_target_cpus,
.disable_esr = 0,
.dest_logical = 0,
.check_apicid_used = NULL,
.vector_allocation_domain = default_vector_allocation_domain,
.init_apic_ldr = init_x2apic_ldr,
.ioapic_phys_id_map = NULL,
.setup_apic_routing = NULL,
.cpu_present_to_apicid = default_cpu_present_to_apicid,
.apicid_to_cpu_present = NULL,
.check_phys_apicid_present = default_check_phys_apicid_present,
.phys_pkg_id = x2apic_phys_pkg_id,
.get_apic_id = x2apic_get_apic_id,
.set_apic_id = x2apic_set_apic_id,
.cpu_mask_to_apicid = default_cpu_mask_to_apicid,
.send_IPI = x2apic_send_IPI,
.send_IPI_mask = x2apic_send_IPI_mask,
.send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself,
.send_IPI_allbutself = x2apic_send_IPI_allbutself,
.send_IPI_all = x2apic_send_IPI_all,
.send_IPI_self = x2apic_send_IPI_self,
.inquire_remote_apic = NULL,
.read = native_apic_msr_read,
.write = native_apic_msr_write,
.eoi_write = native_apic_msr_eoi_write,
.icr_read = native_x2apic_icr_read,
.icr_write = native_x2apic_icr_write,
.wait_icr_idle = native_x2apic_wait_icr_idle,
.safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle,
};
apic_driver(apic_x2apic_phys);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Suresh B. Siddha | 241 | 43.27% | 6 | 16.22% |
Yinghai Lu | 81 | 14.54% | 3 | 8.11% |
Ingo Molnar | 76 | 13.64% | 10 | 27.03% |
Thomas Gleixner | 41 | 7.36% | 2 | 5.41% |
Stoney Wang | 35 | 6.28% | 1 | 2.70% |
Mike Travis | 32 | 5.75% | 3 | 8.11% |
Greg Pearson | 28 | 5.03% | 1 | 2.70% |
Michael S. Tsirkin | 5 | 0.90% | 2 | 5.41% |
Jan Kiszka | 5 | 0.90% | 1 | 2.70% |
Daniel J Blueman | 4 | 0.72% | 1 | 2.70% |
Cyrill V. Gorcunov | 3 | 0.54% | 1 | 2.70% |
Alexander Gordeev | 2 | 0.36% | 2 | 5.41% |
Kees Cook | 1 | 0.18% | 1 | 2.70% |
Steffen Persvold | 1 | 0.18% | 1 | 2.70% |
Greg Kroah-Hartman | 1 | 0.18% | 1 | 2.70% |
Jaswinder Singh Rajput | 1 | 0.18% | 1 | 2.70% |
Total | 557 | 100.00% | 37 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.