Finding cpuid in entry_64.S
Mitesh R. Meswani
mmeswani at miners.utep.edu
Tue Aug 19 09:33:26 EST 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080818/cc039fc5/attachment.htm>
More information about the Linuxppc-dev
mailing list