summit.c 2.9 KB
Newer Older
1
/*
L
Linus Torvalds 已提交
2 3 4 5 6 7 8 9 10 11 12 13
 * APIC driver for the IBM "Summit" chipset.
 */
#define APIC_DEFINITION 1
#include <linux/threads.h>
#include <linux/cpumask.h>
#include <asm/mpspec.h>
#include <asm/genapic.h>
#include <asm/fixmap.h>
#include <asm/apicdef.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/init.h>
Y
Yinghai Lu 已提交
14
#include <asm/summit/apicdef.h>
15
#include <linux/smp.h>
Y
Yinghai Lu 已提交
16 17 18
#include <asm/summit/apic.h>
#include <asm/summit/ipi.h>
#include <asm/summit/mpparse.h>
19
#include <asm/mach-default/mach_wakecpu.h>
L
Linus Torvalds 已提交
20

21
static int probe_summit(void)
22
{
L
Linus Torvalds 已提交
23 24
	/* probed later in mptable/ACPI hooks */
	return 0;
25
}
L
Linus Torvalds 已提交
26

27
static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask)
28 29 30 31 32 33 34 35 36
{
	/* Careful. Some cpus do not strictly honor the set of cpus
	 * specified in the interrupt destination when using lowest
	 * priority interrupt delivery mode.
	 *
	 * In particular there was a hyperthreading cpu observed to
	 * deliver interrupts to the wrong hyperthread when only one
	 * hyperthread was specified in the interrupt desitination.
	 */
37
	*retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
38 39
}

40 41 42 43
struct genapic apic_summit = {

	.name				= "summit",
	.probe				= probe_summit,
44
	.acpi_madt_oem_check		= summit_acpi_madt_oem_check,
45
	.apic_id_registered		= summit_apic_id_registered,
46

47 48 49
	.irq_delivery_mode		= dest_LowestPrio,
	/* logical delivery broadcast to all CPUs: */
	.irq_dest_mode			= 1,
50

51
	.target_cpus			= summit_target_cpus,
52
	.disable_esr			= 1,
53
	.dest_logical			= APIC_DEST_LOGICAL,
54 55
	.check_apicid_used		= summit_check_apicid_used,
	.check_apicid_present		= summit_check_apicid_present,
56

57
	.vector_allocation_domain	= summit_vector_allocation_domain,
58
	.init_apic_ldr			= summit_init_apic_ldr,
59

60
	.ioapic_phys_id_map		= summit_ioapic_phys_id_map,
61
	.setup_apic_routing		= summit_setup_apic_routing,
62
	.multi_timer_check		= NULL,
63
	.apicid_to_node			= summit_apicid_to_node,
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
	.cpu_to_logical_apicid		= cpu_to_logical_apicid,
	.cpu_present_to_apicid		= cpu_present_to_apicid,
	.apicid_to_cpu_present		= apicid_to_cpu_present,
	.setup_portio_remap		= setup_portio_remap,
	.check_phys_apicid_present	= check_phys_apicid_present,
	.enable_apic_mode		= enable_apic_mode,
	.phys_pkg_id			= phys_pkg_id,
	.mps_oem_check			= mps_oem_check,

	.get_apic_id			= get_apic_id,
	.set_apic_id			= NULL,
	.apic_id_mask			= APIC_ID_MASK,

	.cpu_mask_to_apicid		= cpu_mask_to_apicid,
	.cpu_mask_to_apicid_and		= cpu_mask_to_apicid_and,

	.send_IPI_mask			= send_IPI_mask,
	.send_IPI_mask_allbutself	= NULL,
	.send_IPI_allbutself		= send_IPI_allbutself,
	.send_IPI_all			= send_IPI_all,
	.send_IPI_self			= NULL,

	.wakeup_cpu			= NULL,
	.trampoline_phys_low		= TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= TRAMPOLINE_PHYS_HIGH,
	.wait_for_init_deassert		= wait_for_init_deassert,
	.smp_callin_clear_local_apic	= smp_callin_clear_local_apic,
	.store_NMI_vector		= store_NMI_vector,
	.restore_NMI_vector		= restore_NMI_vector,
	.inquire_remote_apic		= inquire_remote_apic,
};