|
@@ -281,8 +281,8 @@ static void inquire_remote_apic(int apicid)
|
|
printk(KERN_CONT
|
|
printk(KERN_CONT
|
|
"a previous APIC delivery may have failed\n");
|
|
"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;
|
|
timeout = 0;
|
|
do {
|
|
do {
|
|
@@ -315,12 +315,12 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
|
|
/*
|
|
/*
|
|
* Turn INIT on target chip
|
|
* 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
|
|
* 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);
|
|
| APIC_DM_INIT);
|
|
|
|
|
|
Dprintk("Waiting for send to finish...\n");
|
|
Dprintk("Waiting for send to finish...\n");
|
|
@@ -331,10 +331,10 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
|
|
Dprintk("Deasserting INIT.\n");
|
|
Dprintk("Deasserting INIT.\n");
|
|
|
|
|
|
/* Target chip */
|
|
/* 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 */
|
|
/* 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");
|
|
Dprintk("Waiting for send to finish...\n");
|
|
send_status = safe_apic_wait_icr_idle();
|
|
send_status = safe_apic_wait_icr_idle();
|
|
@@ -353,6 +353,7 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
|
|
|
|
|
|
for (j = 1; j <= num_starts; j++) {
|
|
for (j = 1; j <= num_starts; j++) {
|
|
Dprintk("Sending STARTUP #%d.\n",j);
|
|
Dprintk("Sending STARTUP #%d.\n",j);
|
|
|
|
+ apic_read_around(APIC_SPIV);
|
|
apic_write(APIC_ESR, 0);
|
|
apic_write(APIC_ESR, 0);
|
|
apic_read(APIC_ESR);
|
|
apic_read(APIC_ESR);
|
|
Dprintk("After apic_write.\n");
|
|
Dprintk("After apic_write.\n");
|
|
@@ -362,11 +363,11 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
|
|
*/
|
|
*/
|
|
|
|
|
|
/* Target chip */
|
|
/* 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 */
|
|
/* Boot on the stack */
|
|
/* Kick the second */
|
|
/* 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.
|
|
* Give the other CPU some time to accept the IPI.
|
|
@@ -386,6 +387,7 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta
|
|
* Due to the Pentium erratum 3AP.
|
|
* Due to the Pentium erratum 3AP.
|
|
*/
|
|
*/
|
|
if (maxlvt > 3) {
|
|
if (maxlvt > 3) {
|
|
|
|
+ apic_read_around(APIC_SPIV);
|
|
apic_write(APIC_ESR, 0);
|
|
apic_write(APIC_ESR, 0);
|
|
}
|
|
}
|
|
accept_status = (apic_read(APIC_ESR) & 0xEF);
|
|
accept_status = (apic_read(APIC_ESR) & 0xEF);
|