public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Tom Duffy <tduffy@sun.com>
Cc: "Langsdorf, Mark" <mark.langsdorf@amd.com>,
	discuss@x86-64.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [discuss] [OOPS] powernow on smp dual core amd64
Date: Mon, 13 Jun 2005 16:17:03 -0700	[thread overview]
Message-ID: <42AE13EF.8060105@vmware.com> (raw)
In-Reply-To: <1118701245.9114.23.camel@duffman>

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.

  parent reply	other threads:[~2005-06-13 23:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-13 21:47 [discuss] [OOPS] powernow on smp dual core amd64 Langsdorf, Mark
2005-06-13 22:20 ` Tom Duffy
2005-06-13 22:38   ` Andi Kleen
2005-06-13 23:17   ` Zachary Amsden [this message]
2005-06-13 23:34     ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2005-06-13 22:44 Langsdorf, Mark
2005-06-13 22:47 ` Andi Kleen
2005-06-13 22:58 ` Tom Duffy
2005-06-13 23:35   ` Andi Kleen
2005-06-14 18:19 ` Tom Duffy
     [not found] <84EA05E2CA77634C82730353CBE3A84301CFC14B@SAUSEXMB1.amd.com>
2005-06-13 21:27 ` Tom Duffy
2005-06-10 19:48 Langsdorf, Mark
2005-06-10 20:01 ` Andi Kleen
2005-06-09 23:46 Tom Duffy
2005-06-10 16:53 ` [discuss] " Andi Kleen
2005-06-10 18:46   ` Tom Duffy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42AE13EF.8060105@vmware.com \
    --to=zach@vmware.com \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    --cc=tduffy@sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox