From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from blu0-omc4-s20.blu0.hotmail.com (blu0-omc4-s20.blu0.hotmail.com [65.55.111.159]) by ozlabs.org (Postfix) with ESMTP id 3EE08DE111 for ; Tue, 19 Aug 2008 09:38:26 +1000 (EST) Message-ID: From: "Mitesh R. Meswani" To: Subject: Finding cpuid in entry_64.S Date: Mon, 18 Aug 2008 17:33:26 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0128_01C90158.855CEFA0" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------=_NextPart_000_0128_01C90158.855CEFA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello=20 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.=20 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:=20 _switch return from system calls, and=20 _ret_from_except I can give line #s and the modified file itself.=20 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 .=20 Thanks,=20 Mitesh=20 ------=_NextPart_000_0128_01C90158.855CEFA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello
 
I am trying to find the cpuid when the = functions=20 that handle return from context switch and interrupts are called, based = on the=20 cpu the return code is executing on, I want to take some specific = actions.=20
 
I have been trying to use the following = code=20 segments :
       =20 LOAD_REG_IMMEDIATE(r13, paca)   /* Get base vaddr of paca = array =20 */
        = lhz    =20 r6,PACAHWCPUID(r13)     /* Load HW procid from=20 paca     =20 */
        cmpwi  =20 0,r6,7           &= nbsp;     =20 /* Compare to our=20 id            = ;=20 */
 
My kernel is 2.6.16.21
and I am inserting the above code = segments in the=20 file entry_64.S in the following functions:
_switch
return from system calls, and=20
_ret_from_except
 
I can give line #s and the = modified file=20 itself.
 
 
The problem is my kernel does not = boot and=20 halts at the point where it reads the command line boot parameters. Any = help=20 would be appreciated .
 
 
Thanks,
Mitesh =
 
------=_NextPart_000_0128_01C90158.855CEFA0--