#endif
#include <i386/acpi.h>
-#include <chud/chud_xnu.h>
-#include <chud/chud_xnu_private.h>
-
#include <sys/kdebug.h>
#include <console/serial_protos.h>
DBGLOG(cpu_handle,my_cpu,MP_TLB_FLUSH);
i_bit_clear(MP_TLB_FLUSH, my_word);
pmap_update_interrupt();
- } else if (i_bit(MP_CHUD, my_word)) {
- DBGLOG(cpu_handle,my_cpu,MP_CHUD);
- i_bit_clear(MP_CHUD, my_word);
- chudxnu_cpu_signal_handler();
} else if (i_bit(MP_CALL, my_word)) {
DBGLOG(cpu_handle,my_cpu,MP_CALL);
i_bit_clear(MP_CALL, my_word);
intrs_enabled = ml_set_interrupts_enabled(FALSE);
for (cpu = 0; cpu < real_ncpus; cpu++) {
- if (!cpu_datap(cpu)->cpu_running)
+ if (!cpu_is_running(cpu))
continue;
cpu_datap(cpu)->cpu_NMI_acknowledged = FALSE;
cpu_NMI_interrupt(cpu);
}
for (cpu = 0; cpu < (cpu_t) real_ncpus; cpu++) {
if (((cpu_to_cpumask(cpu) & cpus) == 0) ||
- !cpu_datap(cpu)->cpu_running)
+ !cpu_is_running(cpu))
continue;
tsc_spin_start = rdtsc64();
if (cpu == (cpu_t) cpu_number()) {
for (cpu = 0; cpu < (cpu_t) real_ncpus; cpu++) {
if ((cpu == (cpu_t) cpu_number())
|| ((cpu_to_cpumask(cpu) & cpus) == 0)
- || (!cpu_datap(cpu)->cpu_running))
+ || !cpu_is_running(cpu))
{
continue;
}
DBG("mp_kdp_enter() signaling other processors\n");
if (force_immediate_debugger_NMI == FALSE) {
for (cpu = 0; cpu < real_ncpus; cpu++) {
- if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
+ if (cpu == my_cpu || !cpu_is_running(cpu))
continue;
ncpus++;
i386_signal_cpu(cpu, MP_KDP, ASYNC);
NMIPI_enable(TRUE);
}
if (mp_kdp_ncpus != ncpus) {
+ cpumask_t cpus_NMI_pending = 0;
DBG("mp_kdp_enter() timed-out on cpu %d, NMI-ing\n", my_cpu);
for (cpu = 0; cpu < real_ncpus; cpu++) {
- if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
+ if (cpu == my_cpu || !cpu_is_running(cpu))
continue;
- if (cpu_signal_pending(cpu, MP_KDP))
+ if (cpu_signal_pending(cpu, MP_KDP)) {
+ cpus_NMI_pending |= cpu_to_cpumask(cpu);
cpu_NMI_interrupt(cpu);
+ }
}
/* Wait again for the same timeout */
tsc_timeout = rdtsc64() + (LockTimeOutTSC);
cpu_pause();
}
if (mp_kdp_ncpus != ncpus) {
- panic("mp_kdp_enter() timed-out waiting after NMI");
+ kdb_printf("mp_kdp_enter(): %llu, %lu, %u TIMED-OUT WAITING FOR NMI-ACK, PROCEEDING\n", cpus_NMI_pending, mp_kdp_ncpus, ncpus);
}
}
}
else
for (cpu = 0; cpu < real_ncpus; cpu++) {
- if (cpu == my_cpu || !cpu_datap(cpu)->cpu_running)
+ if (cpu == my_cpu || !cpu_is_running(cpu))
continue;
cpu_NMI_interrupt(cpu);
}
cpu < (cpu_t) real_ncpus && !machine_timeout_suspended();
cpu++) {
if ((cpu == (cpu_t) cpu_number()) ||
- (!cpu_datap(cpu)->cpu_running))
+ (!cpu_is_running(cpu)))
continue;
cpu_int_event_time = cpu_datap(cpu)->cpu_int_event_time;
if (cpu_int_event_time == 0)