Commit 94af1875 authored by Ingo Molnar's avatar Ingo Molnar

x86, apic: get rid of *_APIC_ID_MASK definitions

Impact: cleanup

Remove the *_APIC_ID_MASK subarch definitions and move them straight
to the genapic driver initialization code.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 5b812727
#ifndef __ASM_MACH_APICDEF_H #ifndef __ASM_MACH_APICDEF_H
#define __ASM_MACH_APICDEF_H #define __ASM_MACH_APICDEF_H
#define BIGSMP_APIC_ID_MASK (0xFF<<24)
static inline unsigned bigsmp_get_apic_id(unsigned long x) static inline unsigned bigsmp_get_apic_id(unsigned long x)
{ {
return (x >> 24) & 0xFF; return (x >> 24) & 0xFF;
......
#ifndef __ASM_ES7000_APICDEF_H #ifndef __ASM_ES7000_APICDEF_H
#define __ASM_ES7000_APICDEF_H #define __ASM_ES7000_APICDEF_H
#define ES7000_APIC_ID_MASK (0xFF<<24)
static inline unsigned int es7000_get_apic_id(unsigned long x) static inline unsigned int es7000_get_apic_id(unsigned long x)
{ {
return (x >> 24) & 0xFF; return (x >> 24) & 0xFF;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
#define SET_APIC_ID(x) (apic->set_apic_id(x)) #define SET_APIC_ID(x) (apic->set_apic_id(x))
#else #else
#define DEFAULT_APIC_ID_MASK (0x0F<<24)
static inline unsigned default_get_apic_id(unsigned long x) static inline unsigned default_get_apic_id(unsigned long x)
{ {
......
#ifndef __ASM_NUMAQ_APICDEF_H #ifndef __ASM_NUMAQ_APICDEF_H
#define __ASM_NUMAQ_APICDEF_H #define __ASM_NUMAQ_APICDEF_H
#define NUMAQ_APIC_ID_MASK (0xF<<24)
static inline unsigned int numaq_get_apic_id(unsigned long x) static inline unsigned int numaq_get_apic_id(unsigned long x)
{ {
return (x >> 24) & 0x0F; return (x >> 24) & 0x0F;
......
#ifndef __ASM_SUMMIT_APICDEF_H #ifndef __ASM_SUMMIT_APICDEF_H
#define __ASM_SUMMIT_APICDEF_H #define __ASM_SUMMIT_APICDEF_H
#define SUMMIT_APIC_ID_MASK (0xFF<<24)
static inline unsigned summit_get_apic_id(unsigned long x) static inline unsigned summit_get_apic_id(unsigned long x)
{ {
return (x >> 24) & 0xFF; return (x >> 24) & 0xFF;
......
...@@ -92,7 +92,7 @@ struct genapic apic_bigsmp = { ...@@ -92,7 +92,7 @@ struct genapic apic_bigsmp = {
.get_apic_id = bigsmp_get_apic_id, .get_apic_id = bigsmp_get_apic_id,
.set_apic_id = NULL, .set_apic_id = NULL,
.apic_id_mask = BIGSMP_APIC_ID_MASK, .apic_id_mask = 0xFF << 24,
.cpu_mask_to_apicid = cpu_mask_to_apicid, .cpu_mask_to_apicid = cpu_mask_to_apicid,
.cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
......
...@@ -73,7 +73,7 @@ struct genapic apic_default = { ...@@ -73,7 +73,7 @@ struct genapic apic_default = {
.get_apic_id = default_get_apic_id, .get_apic_id = default_get_apic_id,
.set_apic_id = NULL, .set_apic_id = NULL,
.apic_id_mask = DEFAULT_APIC_ID_MASK, .apic_id_mask = 0x0F << 24,
.cpu_mask_to_apicid = cpu_mask_to_apicid, .cpu_mask_to_apicid = cpu_mask_to_apicid,
.cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
......
...@@ -128,7 +128,7 @@ struct genapic apic_es7000 = { ...@@ -128,7 +128,7 @@ struct genapic apic_es7000 = {
.get_apic_id = es7000_get_apic_id, .get_apic_id = es7000_get_apic_id,
.set_apic_id = NULL, .set_apic_id = NULL,
.apic_id_mask = ES7000_APIC_ID_MASK, .apic_id_mask = 0xFF << 24,
.cpu_mask_to_apicid = cpu_mask_to_apicid, .cpu_mask_to_apicid = cpu_mask_to_apicid,
.cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
......
...@@ -92,7 +92,7 @@ struct genapic apic_numaq = { ...@@ -92,7 +92,7 @@ struct genapic apic_numaq = {
.get_apic_id = numaq_get_apic_id, .get_apic_id = numaq_get_apic_id,
.set_apic_id = NULL, .set_apic_id = NULL,
.apic_id_mask = NUMAQ_APIC_ID_MASK, .apic_id_mask = 0x0F << 24,
.cpu_mask_to_apicid = cpu_mask_to_apicid, .cpu_mask_to_apicid = cpu_mask_to_apicid,
.cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
......
...@@ -72,7 +72,7 @@ struct genapic apic_summit = { ...@@ -72,7 +72,7 @@ struct genapic apic_summit = {
.get_apic_id = summit_get_apic_id, .get_apic_id = summit_get_apic_id,
.set_apic_id = NULL, .set_apic_id = NULL,
.apic_id_mask = SUMMIT_APIC_ID_MASK, .apic_id_mask = 0xFF << 24,
.cpu_mask_to_apicid = cpu_mask_to_apicid, .cpu_mask_to_apicid = cpu_mask_to_apicid,
.cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment