[Cbe-oss-dev] Exit points for returning from kernel mode to user mode

Paul Mackerras paulus at samba.org
Wed Jun 25 09:22:30 EST 2008


Mitesh R. Meswani writes:

> I am trying to understand exit points from kernel mode to user
> mode. I believe this happens when the scheduler is invoked, there
> are interrupts, exceptions, or the kernel is executing system call
> in process context. 

The main exit points are ret_from_except, syscall_exit, and
fast_exception_return, as far as 64-bit kernels are concerned.

> Is there a single function which is called in the ppc kernel when
> the mode is switched back to user mode ? 

No.

> I have linux 2.6.16.21 kernel running on a 4-way p550 IBM pSeries
> with POWER5 processors. Everytime before a process begins executing
> in user mode I want to execute a special SMT thread priority
> assembler instruction. 
> 
> What code files should I be looking at, is there one place this can
> be done? Any tips are appreciated.

Look in head_64.S and entry_64.S in arch/powerpc/kernel.

Paul.




More information about the cbe-oss-dev mailing list