Calling Bottom Half on IBM/390

Linas Vepstas (
Wed, 31 Mar 1999 11:00:52 -0600

Re: the IBM/390 port

OK, I finally discovered how the "bottom half" was getting invoked on
other architectures. The few I looked at seem to unwind the stack,
drop into assembler, build a stack, and then call a C routine to do the
bottom half. (I'm referring to how one gets to the "ret_from_syscall"
code). Why? Why not stay in C? Why not just enable interrupts, and
just call ret_from_syscal() in C?

On a related note, I note that some (most?) implementations use
system calls within the kernel. Why? By system call, I mean
issueing an SC/SVC instruction, taking the interrupt, building a
stack, and getting back into C. Why bother? Why not stay in C the entire

For example, both fork() and idle() do the above on PowerPC. Granted
fork() is special and subtle, but idle() seems not to be ...

I keep thinking I'm missing something obvious, but I can't figure out
what it would have been.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at