Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30525
b: refs/heads/master
c: e77deac
h: refs/heads/master
i:
  30523: 19af4c0
v: v3
  • Loading branch information
Keith Owens authored and Linus Torvalds committed Jun 26, 2006
1 parent e97d6a9 commit f3bd14e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 704fc59e1d056de80beaf30174bc8e0b1682efbb
refs/heads/master: e77deacb7b078156fcadf27b838a4ce1a65eda04
25 changes: 16 additions & 9 deletions trunk/arch/x86_64/kernel/genapic_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,29 @@ static void flat_send_IPI_mask(cpumask_t cpumask, int vector)

static void flat_send_IPI_allbutself(int vector)
{
#ifndef CONFIG_HOTPLUG_CPU
if (((num_online_cpus()) - 1) >= 1)
__send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL);
#ifdef CONFIG_HOTPLUG_CPU
int hotplug = 1;
#else
cpumask_t allbutme = cpu_online_map;
int hotplug = 0;
#endif
if (hotplug || vector == NMI_VECTOR) {
cpumask_t allbutme = cpu_online_map;

cpu_clear(smp_processor_id(), allbutme);
cpu_clear(smp_processor_id(), allbutme);

if (!cpus_empty(allbutme))
flat_send_IPI_mask(allbutme, vector);
#endif
if (!cpus_empty(allbutme))
flat_send_IPI_mask(allbutme, vector);
} else if (num_online_cpus() > 1) {
__send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL);
}
}

static void flat_send_IPI_all(int vector)
{
__send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
if (vector == NMI_VECTOR)
flat_send_IPI_mask(cpu_online_map, vector);
else
__send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
}

static int flat_apic_id_registered(void)
Expand Down
7 changes: 5 additions & 2 deletions trunk/include/asm-i386/mach-default/mach_ipi.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef __ASM_MACH_IPI_H
#define __ASM_MACH_IPI_H

/* Avoid include hell */
#define NMI_VECTOR 0x02

void send_IPI_mask_bitmask(cpumask_t mask, int vector);
void __send_IPI_shortcut(unsigned int shortcut, int vector);

Expand All @@ -13,7 +16,7 @@ static inline void send_IPI_mask(cpumask_t mask, int vector)

static inline void __local_send_IPI_allbutself(int vector)
{
if (no_broadcast) {
if (no_broadcast || vector == NMI_VECTOR) {
cpumask_t mask = cpu_online_map;

cpu_clear(smp_processor_id(), mask);
Expand All @@ -24,7 +27,7 @@ static inline void __local_send_IPI_allbutself(int vector)

static inline void __local_send_IPI_all(int vector)
{
if (no_broadcast)
if (no_broadcast || vector == NMI_VECTOR)
send_IPI_mask(cpu_online_map, vector);
else
__send_IPI_shortcut(APIC_DEST_ALLINC, vector);
Expand Down

0 comments on commit f3bd14e

Please sign in to comment.