Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88783
b: refs/heads/master
c: 1af8a0c
h: refs/heads/master
i:
  88781: f52f620
  88779: 84c0bad
  88775: 33f6472
  88767: 904af2f
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Apr 17, 2008
1 parent ca71ec3 commit 68cf124
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: ba10485c2f5a9482d93b095960cbe7d865d59e04
refs/heads/master: 1af8a0c1b3b85b1007f49917ea6a351b7aeb7562
18 changes: 10 additions & 8 deletions trunk/arch/x86/kernel/smpboot_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ static void inquire_remote_apic(int apicid)
printk(KERN_CONT
"a previous APIC delivery may have failed\n");

apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(apicid));
apic_write(APIC_ICR, APIC_DM_REMRD | regs[i]);
apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(apicid));
apic_write_around(APIC_ICR, APIC_DM_REMRD | regs[i]);

timeout = 0;
do {
Expand Down Expand Up @@ -315,12 +315,12 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
/*
* Turn INIT on target chip
*/
apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));
apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));

/*
* Send IPI
*/
apic_write(APIC_ICR, APIC_INT_LEVELTRIG | APIC_INT_ASSERT
apic_write_around(APIC_ICR, APIC_INT_LEVELTRIG | APIC_INT_ASSERT
| APIC_DM_INIT);

Dprintk("Waiting for send to finish...\n");
Expand All @@ -331,10 +331,10 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
Dprintk("Deasserting INIT.\n");

/* Target chip */
apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));
apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));

/* Send IPI */
apic_write(APIC_ICR, APIC_INT_LEVELTRIG | APIC_DM_INIT);
apic_write_around(APIC_ICR, APIC_INT_LEVELTRIG | APIC_DM_INIT);

Dprintk("Waiting for send to finish...\n");
send_status = safe_apic_wait_icr_idle();
Expand All @@ -353,6 +353,7 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta

for (j = 1; j <= num_starts; j++) {
Dprintk("Sending STARTUP #%d.\n",j);
apic_read_around(APIC_SPIV);
apic_write(APIC_ESR, 0);
apic_read(APIC_ESR);
Dprintk("After apic_write.\n");
Expand All @@ -362,11 +363,11 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
*/

/* Target chip */
apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));
apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid));

/* Boot on the stack */
/* Kick the second */
apic_write(APIC_ICR, APIC_DM_STARTUP | (start_rip >> 12));
apic_write_around(APIC_ICR, APIC_DM_STARTUP | (start_rip>>12));

/*
* Give the other CPU some time to accept the IPI.
Expand All @@ -386,6 +387,7 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
* Due to the Pentium erratum 3AP.
*/
if (maxlvt > 3) {
apic_read_around(APIC_SPIV);
apic_write(APIC_ESR, 0);
}
accept_status = (apic_read(APIC_ESR) & 0xEF);
Expand Down

0 comments on commit 68cf124

Please sign in to comment.