From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by ozlabs.org (Postfix) with ESMTP id BA8D8DDE41 for ; Tue, 17 Apr 2007 08:52:42 +1000 (EST) Received: by nz-out-0506.google.com with SMTP id l1so1608900nzf for ; Mon, 16 Apr 2007 15:52:41 -0700 (PDT) Message-ID: Date: Mon, 16 Apr 2007 23:52:41 +0100 From: "Phillip Lougher" To: "Siva Prasad" Subject: Re: Variable "current" in Linux kernel... In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed References: Cc: linuxppc-dev@ozlabs.org, linuxppc-embedded@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 4/16/07, Siva Prasad wrote: > > I would like to know where exactly the value of variable "current" gets > changed. current points to the task_struct structure of the currently running process. It, obviously, changes each time the scheduler schedules another process. > > > BTW=85 did any one tried before to run from a different location of memor= y > than the usual 0x00000000? What are the main problems you faced? I know t= his > is open ended question, but wanted to see if any one ever did that. > I changed the 2.4 PPC kernel to do this about 5 years ago (for Zarlink). Most of the issues relate to the PPC specific code, all functions which map from a va->pa, from a pte->va, and vice-versa have to be changed. The early start up assembly code has to be aware the kernel is not running at zero, specifically the code which creates the initial TLB entries. As far as I can recall, only one line of non-PPC specific code needed to be changed. It is, however, a difficult task which requires careful auditing of the code, and obviously knowledge of the vm and memory allocator systems. Phillip