Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58222
b: refs/heads/master
c: d25c1ba
h: refs/heads/master
v: v3
  • Loading branch information
Loic Prylli authored and Linus Torvalds committed Jul 6, 2007
1 parent fd76ae0 commit 0637712
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e2e99f0e4aa6363e8515ed17011c210c8f1b52a
refs/heads/master: d25c1ba2fa1a9a1a4f68bef8edb0efefd79f0012
4 changes: 4 additions & 0 deletions trunk/arch/i386/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ static void set_mtrr(unsigned int reg, unsigned long base,
data.smp_size = size;
data.smp_type = type;
atomic_set(&data.count, num_booting_cpus() - 1);
/* make sure data.count is visible before unleashing other CPUs */
smp_wmb();
atomic_set(&data.gate,0);

/* Start the ball rolling on other CPUs */
Expand All @@ -242,6 +244,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,

/* ok, reset count and toggle gate */
atomic_set(&data.count, num_booting_cpus() - 1);
smp_wmb();
atomic_set(&data.gate,1);

/* do our MTRR business */
Expand All @@ -260,6 +263,7 @@ static void set_mtrr(unsigned int reg, unsigned long base,
cpu_relax();

atomic_set(&data.count, num_booting_cpus() - 1);
smp_wmb();
atomic_set(&data.gate,0);

/*
Expand Down

0 comments on commit 0637712

Please sign in to comment.