Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2004 09:53:51 -0400
From:      Gerrit Nagelhout <gnagelhout@sandvine.com>
To:        'John Baldwin' <jhb@FreeBSD.org>
Cc:        Julian Elischer <julian@elischer.org>
Subject:   RE: STI, HLT in acpi_cpu_idle_c1
Message-ID:  <FE045D4D9F7AED4CBFF1B3B813C85337054EC4E1@mail.sandvine.com>

next in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> Hmm, it appears it is consistently CPU1 that thinks that 
> IPI_HARDCLOCK is not 
> being EOI'd.  Can you try swapping the CPUs and see if the 
> lockup moves from 
> CPU1 to CPU3?
> 
> -- 

I added the following *HACK* to the idle code, and let it run
over the weekend (with halt on idle disabled).  It hit the function
isr_problem 9 times, but did not lockup anymore.  The problem
is that I don't know if the EOI just got lost, or whether the
interrupt was not handled at all.  I couldn't find any ill effects
from this code ... yet.

extern volatile lapic_t *lapic;
void isr_problem(void);
int isrProblem=0;
void isr_problem()
{
    isrProblem++;
    lapic->eoi = 0;
}

int
mp_grab_cpu_hlt(void)
{
	u_int mask = PCPU_GET(cpumask);
	int retval;

        if(lapic->isr7 != 0) {
            isr_problem();
        }

	retval = mask & hlt_cpus_mask;
	while (mask & hlt_cpus_mask)
		__asm __volatile("sti; hlt" : : : "memory");
	return (retval);
}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE045D4D9F7AED4CBFF1B3B813C85337054EC4E1>