aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 08:59:17 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:29 -0500
commit5b8127277bc4cdca78eda5ee900a314642822ace (patch)
tree07559a79f03be24bd5cc1df238233b2d63550c94 /arch
parentca6c8ed4646f8ccaa4f7db618bf69b8b8fb49767 (diff)
x86, apic: refactor ->apic_id_mask & APIC_ID_MASK
- spread out the namespace on a per driver basis - get rid of wrapper macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/bigsmp/apicdef.h2
-rw-r--r--arch/x86/include/asm/es7000/apicdef.h2
-rw-r--r--arch/x86/include/asm/mach-default/mach_apicdef.h3
-rw-r--r--arch/x86/include/asm/mach-generic/mach_apicdef.h2
-rw-r--r--arch/x86/include/asm/numaq/apicdef.h2
-rw-r--r--arch/x86/include/asm/summit/apicdef.h2
-rw-r--r--arch/x86/kernel/apic.c4
-rw-r--r--arch/x86/kernel/genapic_flat_64.c2
-rw-r--r--arch/x86/mach-generic/bigsmp.c2
-rw-r--r--arch/x86/mach-generic/default.c2
-rw-r--r--arch/x86/mach-generic/es7000.c2
-rw-r--r--arch/x86/mach-generic/numaq.c2
-rw-r--r--arch/x86/mach-generic/summit.c2
13 files changed, 13 insertions, 16 deletions
diff --git a/arch/x86/include/asm/bigsmp/apicdef.h b/arch/x86/include/asm/bigsmp/apicdef.h
index ed25dd6503b2..6e587818c7ed 100644
--- a/arch/x86/include/asm/bigsmp/apicdef.h
+++ b/arch/x86/include/asm/bigsmp/apicdef.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_MACH_APICDEF_H 1#ifndef __ASM_MACH_APICDEF_H
2#define __ASM_MACH_APICDEF_H 2#define __ASM_MACH_APICDEF_H
3 3
4#define APIC_ID_MASK (0xFF<<24) 4#define BIGSMP_APIC_ID_MASK (0xFF<<24)
5 5
6static inline unsigned bigsmp_get_apic_id(unsigned long x) 6static inline unsigned bigsmp_get_apic_id(unsigned long x)
7{ 7{
diff --git a/arch/x86/include/asm/es7000/apicdef.h b/arch/x86/include/asm/es7000/apicdef.h
index e23791762a19..476da0c7f5cc 100644
--- a/arch/x86/include/asm/es7000/apicdef.h
+++ b/arch/x86/include/asm/es7000/apicdef.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_ES7000_APICDEF_H 1#ifndef __ASM_ES7000_APICDEF_H
2#define __ASM_ES7000_APICDEF_H 2#define __ASM_ES7000_APICDEF_H
3 3
4#define APIC_ID_MASK (0xFF<<24) 4#define ES7000_APIC_ID_MASK (0xFF<<24)
5 5
6static inline unsigned int es7000_get_apic_id(unsigned long x) 6static inline unsigned int es7000_get_apic_id(unsigned long x)
7{ 7{
diff --git a/arch/x86/include/asm/mach-default/mach_apicdef.h b/arch/x86/include/asm/mach-default/mach_apicdef.h
index e84d437ba2b2..8318d121ea66 100644
--- a/arch/x86/include/asm/mach-default/mach_apicdef.h
+++ b/arch/x86/include/asm/mach-default/mach_apicdef.h
@@ -4,10 +4,9 @@
4#include <asm/apic.h> 4#include <asm/apic.h>
5 5
6#ifdef CONFIG_X86_64 6#ifdef CONFIG_X86_64
7#define APIC_ID_MASK (apic->apic_id_mask)
8#define SET_APIC_ID(x) (apic->set_apic_id(x)) 7#define SET_APIC_ID(x) (apic->set_apic_id(x))
9#else 8#else
10#define APIC_ID_MASK (0xF<<24) 9#define DEFAULT_APIC_ID_MASK (0x0F<<24)
11 10
12static inline unsigned default_get_apic_id(unsigned long x) 11static inline unsigned default_get_apic_id(unsigned long x)
13{ 12{
diff --git a/arch/x86/include/asm/mach-generic/mach_apicdef.h b/arch/x86/include/asm/mach-generic/mach_apicdef.h
index 645520bcd2c2..61caa65b13fb 100644
--- a/arch/x86/include/asm/mach-generic/mach_apicdef.h
+++ b/arch/x86/include/asm/mach-generic/mach_apicdef.h
@@ -3,8 +3,6 @@
3 3
4#ifndef APIC_DEFINITION 4#ifndef APIC_DEFINITION
5#include <asm/genapic.h> 5#include <asm/genapic.h>
6
7#define APIC_ID_MASK (apic->apic_id_mask)
8#endif 6#endif
9 7
10#endif /* _ASM_X86_MACH_GENERIC_MACH_APICDEF_H */ 8#endif /* _ASM_X86_MACH_GENERIC_MACH_APICDEF_H */
diff --git a/arch/x86/include/asm/numaq/apicdef.h b/arch/x86/include/asm/numaq/apicdef.h
index 29f5e3d34e5b..6f2cc5df0b15 100644
--- a/arch/x86/include/asm/numaq/apicdef.h
+++ b/arch/x86/include/asm/numaq/apicdef.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_NUMAQ_APICDEF_H 1#ifndef __ASM_NUMAQ_APICDEF_H
2#define __ASM_NUMAQ_APICDEF_H 2#define __ASM_NUMAQ_APICDEF_H
3 3
4#define APIC_ID_MASK (0xF<<24) 4#define NUMAQ_APIC_ID_MASK (0xF<<24)
5 5
6static inline unsigned int numaq_get_apic_id(unsigned long x) 6static inline unsigned int numaq_get_apic_id(unsigned long x)
7{ 7{
diff --git a/arch/x86/include/asm/summit/apicdef.h b/arch/x86/include/asm/summit/apicdef.h
index 4286528af7c6..0373f0c7b5db 100644
--- a/arch/x86/include/asm/summit/apicdef.h
+++ b/arch/x86/include/asm/summit/apicdef.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_SUMMIT_APICDEF_H 1#ifndef __ASM_SUMMIT_APICDEF_H
2#define __ASM_SUMMIT_APICDEF_H 2#define __ASM_SUMMIT_APICDEF_H
3 3
4#define APIC_ID_MASK (0xFF<<24) 4#define SUMMIT_APIC_ID_MASK (0xFF<<24)
5 5
6static inline unsigned summit_get_apic_id(unsigned long x) 6static inline unsigned summit_get_apic_id(unsigned long x)
7{ 7{
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 9d6374da4784..5f7f3a9a47ad 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1009,11 +1009,11 @@ int __init verify_local_APIC(void)
1009 */ 1009 */
1010 reg0 = apic_read(APIC_ID); 1010 reg0 = apic_read(APIC_ID);
1011 apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0); 1011 apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0);
1012 apic_write(APIC_ID, reg0 ^ APIC_ID_MASK); 1012 apic_write(APIC_ID, reg0 ^ apic->apic_id_mask);
1013 reg1 = apic_read(APIC_ID); 1013 reg1 = apic_read(APIC_ID);
1014 apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1); 1014 apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1);
1015 apic_write(APIC_ID, reg0); 1015 apic_write(APIC_ID, reg0);
1016 if (reg1 != (reg0 ^ APIC_ID_MASK)) 1016 if (reg1 != (reg0 ^ apic->apic_id_mask))
1017 return 0; 1017 return 0;
1018 1018
1019 /* 1019 /*
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index ab47091dac2b..78baa55cd0e9 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -352,7 +352,7 @@ struct genapic apic_physflat = {
352 352
353 .get_apic_id = flat_get_apic_id, 353 .get_apic_id = flat_get_apic_id,
354 .set_apic_id = set_apic_id, 354 .set_apic_id = set_apic_id,
355 .apic_id_mask = 0xFFu<<24, 355 .apic_id_mask = 0xFFu << 24,
356 356
357 .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid, 357 .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid,
358 .cpu_mask_to_apicid_and = physflat_cpu_mask_to_apicid_and, 358 .cpu_mask_to_apicid_and = physflat_cpu_mask_to_apicid_and,
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 9eca977227c4..1f4ad4f77022 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -92,7 +92,7 @@ struct genapic apic_bigsmp = {
92 92
93 .get_apic_id = bigsmp_get_apic_id, 93 .get_apic_id = bigsmp_get_apic_id,
94 .set_apic_id = NULL, 94 .set_apic_id = NULL,
95 .apic_id_mask = APIC_ID_MASK, 95 .apic_id_mask = BIGSMP_APIC_ID_MASK,
96 96
97 .cpu_mask_to_apicid = cpu_mask_to_apicid, 97 .cpu_mask_to_apicid = cpu_mask_to_apicid,
98 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, 98 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index d51a3f0335ae..239af25615b1 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -73,7 +73,7 @@ struct genapic apic_default = {
73 73
74 .get_apic_id = default_get_apic_id, 74 .get_apic_id = default_get_apic_id,
75 .set_apic_id = NULL, 75 .set_apic_id = NULL,
76 .apic_id_mask = APIC_ID_MASK, 76 .apic_id_mask = DEFAULT_APIC_ID_MASK,
77 77
78 .cpu_mask_to_apicid = cpu_mask_to_apicid, 78 .cpu_mask_to_apicid = cpu_mask_to_apicid,
79 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, 79 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 1944675db629..21fb33eea91b 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -128,7 +128,7 @@ struct genapic apic_es7000 = {
128 128
129 .get_apic_id = es7000_get_apic_id, 129 .get_apic_id = es7000_get_apic_id,
130 .set_apic_id = NULL, 130 .set_apic_id = NULL,
131 .apic_id_mask = APIC_ID_MASK, 131 .apic_id_mask = ES7000_APIC_ID_MASK,
132 132
133 .cpu_mask_to_apicid = cpu_mask_to_apicid, 133 .cpu_mask_to_apicid = cpu_mask_to_apicid,
134 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, 134 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index fcbba84c090f..27d2d1f2d6f0 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -92,7 +92,7 @@ struct genapic apic_numaq = {
92 92
93 .get_apic_id = numaq_get_apic_id, 93 .get_apic_id = numaq_get_apic_id,
94 .set_apic_id = NULL, 94 .set_apic_id = NULL,
95 .apic_id_mask = APIC_ID_MASK, 95 .apic_id_mask = NUMAQ_APIC_ID_MASK,
96 96
97 .cpu_mask_to_apicid = cpu_mask_to_apicid, 97 .cpu_mask_to_apicid = cpu_mask_to_apicid,
98 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, 98 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 5650eaf9061f..f24cba1b29da 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -72,7 +72,7 @@ struct genapic apic_summit = {
72 72
73 .get_apic_id = summit_get_apic_id, 73 .get_apic_id = summit_get_apic_id,
74 .set_apic_id = NULL, 74 .set_apic_id = NULL,
75 .apic_id_mask = APIC_ID_MASK, 75 .apic_id_mask = SUMMIT_APIC_ID_MASK,
76 76
77 .cpu_mask_to_apicid = cpu_mask_to_apicid, 77 .cpu_mask_to_apicid = cpu_mask_to_apicid,
78 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and, 78 .cpu_mask_to_apicid_and = cpu_mask_to_apicid_and,