diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 17:55:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-05 17:55:20 -0400 |
commit | ea62ccd00fd0b6720b033adfc9984f31130ce195 (patch) | |
tree | 9837b797b2466fffcb0af96c388b06eae9c3df18 /include/asm-x86_64/ipi.h | |
parent | 886a0768affe9a32f18c45f8e1393bca9ece5392 (diff) | |
parent | 35060b6a9a4e1c89bc6fbea61090e302dbc61847 (diff) |
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits)
[PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
[PATCH] i386: type may be unused
[PATCH] i386: Some additional chipset register values validation.
[PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
[PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
[PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
[PATCH] i386: white space fixes in i387.h
[PATCH] i386: Drop noisy e820 debugging printks
[PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
[PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
[PATCH] x86-64: Share identical video.S between i386 and x86-64
[PATCH] x86-64: Remove CONFIG_REORDER
[PATCH] x86-64: Print type and size correctly for unknown compat ioctls
[PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
[PATCH] i386: Little cleanups in smpboot.c
[PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
[PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
[PATCH] i386: Add X86_FEATURE_RDTSCP
[PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
[PATCH] i386: Implement alternative_io for i386
...
Fix up trivial conflict in include/linux/highmem.h manually.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-x86_64/ipi.h')
-rw-r--r-- | include/asm-x86_64/ipi.h | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/include/asm-x86_64/ipi.h b/include/asm-x86_64/ipi.h index 2a5c162b7d92..a7c75ea408a8 100644 --- a/include/asm-x86_64/ipi.h +++ b/include/asm-x86_64/ipi.h | |||
@@ -18,10 +18,8 @@ | |||
18 | * Subject to the GNU Public License, v.2 | 18 | * Subject to the GNU Public License, v.2 |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <asm/fixmap.h> | ||
22 | #include <asm/hw_irq.h> | 21 | #include <asm/hw_irq.h> |
23 | #include <asm/apicdef.h> | 22 | #include <asm/apic.h> |
24 | #include <asm/genapic.h> | ||
25 | 23 | ||
26 | /* | 24 | /* |
27 | * the following functions deal with sending IPIs between CPUs. | 25 | * the following functions deal with sending IPIs between CPUs. |
@@ -76,10 +74,42 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, unsign | |||
76 | apic_write(APIC_ICR, cfg); | 74 | apic_write(APIC_ICR, cfg); |
77 | } | 75 | } |
78 | 76 | ||
77 | /* | ||
78 | * This is used to send an IPI with no shorthand notation (the destination is | ||
79 | * specified in bits 56 to 63 of the ICR). | ||
80 | */ | ||
81 | static inline void __send_IPI_dest_field(unsigned int mask, int vector, unsigned int dest) | ||
82 | { | ||
83 | unsigned long cfg; | ||
84 | |||
85 | /* | ||
86 | * Wait for idle. | ||
87 | */ | ||
88 | if (unlikely(vector == NMI_VECTOR)) | ||
89 | safe_apic_wait_icr_idle(); | ||
90 | else | ||
91 | apic_wait_icr_idle(); | ||
92 | |||
93 | /* | ||
94 | * prepare target chip field | ||
95 | */ | ||
96 | cfg = __prepare_ICR2(mask); | ||
97 | apic_write(APIC_ICR2, cfg); | ||
98 | |||
99 | /* | ||
100 | * program the ICR | ||
101 | */ | ||
102 | cfg = __prepare_ICR(0, vector, dest); | ||
103 | |||
104 | /* | ||
105 | * Send the IPI. The write to APIC_ICR fires this off. | ||
106 | */ | ||
107 | apic_write(APIC_ICR, cfg); | ||
108 | } | ||
79 | 109 | ||
80 | static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | 110 | static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) |
81 | { | 111 | { |
82 | unsigned long cfg, flags; | 112 | unsigned long flags; |
83 | unsigned long query_cpu; | 113 | unsigned long query_cpu; |
84 | 114 | ||
85 | /* | 115 | /* |
@@ -88,28 +118,9 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
88 | * - mbligh | 118 | * - mbligh |
89 | */ | 119 | */ |
90 | local_irq_save(flags); | 120 | local_irq_save(flags); |
91 | |||
92 | for_each_cpu_mask(query_cpu, mask) { | 121 | for_each_cpu_mask(query_cpu, mask) { |
93 | /* | 122 | __send_IPI_dest_field(x86_cpu_to_apicid[query_cpu], |
94 | * Wait for idle. | 123 | vector, APIC_DEST_PHYSICAL); |
95 | */ | ||
96 | apic_wait_icr_idle(); | ||
97 | |||
98 | /* | ||
99 | * prepare target chip field | ||
100 | */ | ||
101 | cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]); | ||
102 | apic_write(APIC_ICR2, cfg); | ||
103 | |||
104 | /* | ||
105 | * program the ICR | ||
106 | */ | ||
107 | cfg = __prepare_ICR(0, vector, APIC_DEST_PHYSICAL); | ||
108 | |||
109 | /* | ||
110 | * Send the IPI. The write to APIC_ICR fires this off. | ||
111 | */ | ||
112 | apic_write(APIC_ICR, cfg); | ||
113 | } | 124 | } |
114 | local_irq_restore(flags); | 125 | local_irq_restore(flags); |
115 | } | 126 | } |