License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6-block.git] / arch / x86 / include / asm / x2apic.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
79deb8e5
CG
2/*
3 * Common bits for X2APIC cluster/physical modes.
4 */
5
6#ifndef _ASM_X86_X2APIC_H
7#define _ASM_X86_X2APIC_H
8
9#include <asm/apic.h>
10#include <asm/ipi.h>
11#include <linux/cpumask.h>
12
b7157acf
SP
13static int x2apic_apic_id_valid(int apicid)
14{
15 return 1;
16}
17
79deb8e5
CG
18static int x2apic_apic_id_registered(void)
19{
20 return 1;
21}
22
79deb8e5
CG
23static void
24__x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest)
25{
26 unsigned long cfg = __prepare_ICR(0, vector, dest);
27 native_x2apic_icr_write(cfg, apicid);
28}
29
30static unsigned int x2apic_get_apic_id(unsigned long id)
31{
32 return id;
33}
34
35static unsigned long x2apic_set_apic_id(unsigned int id)
36{
37 return id;
38}
39
40static int x2apic_phys_pkg_id(int initial_apicid, int index_msb)
41{
42 return initial_apicid >> index_msb;
43}
44
45static void x2apic_send_IPI_self(int vector)
46{
47 apic_write(APIC_SELF_IPI, vector);
48}
49
50#endif /* _ASM_X86_X2APIC_H */