linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Finding cpuid in entry_64.S
@ 2008-08-18 23:33 Mitesh R. Meswani
  2008-08-19  1:59 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Mitesh R. Meswani @ 2008-08-18 23:33 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hello 

I am trying to find the cpuid when the functions that handle return from context switch and interrupts are called, based on the cpu the return code is executing on, I want to take some specific actions. 

I have been trying to use the following code segments :
        LOAD_REG_IMMEDIATE(r13, paca)   /* Get base vaddr of paca array  */
        lhz     r6,PACAHWCPUID(r13)     /* Load HW procid from paca      */
        cmpwi   0,r6,7                  /* Compare to our id             */


My kernel is 2.6.16.21
and I am inserting the above code segments in the file entry_64.S in the following functions: 
_switch
return from system calls, and 
_ret_from_except

I can give line #s and the modified file itself. 


The problem is my kernel does not boot and halts at the point where it reads the command line boot parameters. Any help would be appreciated . 


Thanks, 
Mitesh 

[-- Attachment #2: Type: text/html, Size: 2847 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-19  1:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18 23:33 Finding cpuid in entry_64.S Mitesh R. Meswani
2008-08-19  1:59 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).