Problems with macros LOAD_REG_ADDR and LOAD_REG_IMMEDIATE

2008-09-22 Thread Mitesh R. Meswani
I am having issues using LOAD_REG_ADDR and LOAD_REG_IMMEDIATE macros on a ppc64 
kernel which I have tried on both 2.6.16 and 2.6.17 kernels. 

I noticed that these macros by default loading value 0 instead of the actual 
address. Is this a bug of the compiler that can be fixed, I noticed when I did 
objdump for head_64.S on the following function 
_GLOBAL(pSeries_secondary_smp_init) for the following instruction : 
LOAD_REG_IMMEDIATE(r13, paca)   /* Get base vaddr of paca array  */I 
noticed this in some calls, whereas some calls seem to get symbol address.   
Thanks 
*** 
   
Mitesh Meswani
"Success is a journey, Not a Destination "
Email : [EMAIL PROTECTED]
**

********
Mitesh R. Meswani
Research Associate
AHPCRC Research Group
Ph.D. Candidate
Department of Computer Science
University of Texas at El Paso
Tel: 915 747 6433 (O)
Email: [EMAIL PROTECTED]

 ___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Finding cpuid in entry_64.S

2008-08-18 Thread Mitesh R. Meswani
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 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev