Re: [discuss] [OOPS] powernow on smp dual core amd64

From: Zachary Amsden
Date: Mon Jun 13 2005 - 18:27:52 EST


Tom Duffy wrote:

On Mon, 2005-06-13 at 16:47 -0500, Langsdorf, Mark wrote:


Okay, I think I have figured this out. During initialization,
the cpufreq infrastruture only initializes the first core of
each processor. When a request comes into the second core,
it's data structre is unitialized and we get the null point
dereference.

The solution is to assign the pointer to the data structure for
the first core to all the other cores.

Tom, could you try this patch and see if it helps?



Yes! It fixed the panic. I get much further.

Thanks!

Unfortunately, after starting cpuspeed daemon, I get this:

Starting cpuspeed: [ OK ]
Starting pcmcia: Starting PCMCIA services:
CPU 6: Machine Check Exception: 4 Bank 4: b200000000070f0f
TSC 4129a3d70d
Kernel panic - not syncing: Machine check
<1>Unable to handle kernel NULL pointer dereference at 00000000000000ff RIP:
[<00000000000000ff>]



asmlinkage void smp_call_function_interrupt(void)
{
void (*func) (void *info) = call_data->func;
void *info = call_data->info;
int wait = call_data->wait;

ack_APIC_irq();
/*
* Notify initiating CPU that I've grabbed the data and am
* about to execute the function
*/
mb();
atomic_inc(&call_data->started);
/*
* At this point the info structure may be out of scope unless wait==1
*/
irq_enter();
(*func)(info); <--- passed bogus data

Looks like you jumped through a bogus function pointer. I'm guessing it has something to do with an unitialized IRQ vector for the CPU speed on one of the cores (simply because it seems somewhat plausible):

extern u8 irq_vector[NR_IRQ_VECTORS];
#define IO_APIC_VECTOR(irq) (irq_vector[irq])
#define AUTO_ASSIGN -1

So irq_vector[AUTO_ASSIGN] = 0xff which could have somehow made it into your function pointer.

Just a theory.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/