Subject: Re: Do LKMs work *at*all* on powerpc platforms?
To: Wolfgang Solfrank <ws@tools.de>
From: David Edelsohn <dje@watson.ibm.com>
List: port-powerpc
Date: 08/02/2000 11:06:40
>>>>> Wolfgang Solfrank writes:

Wolfgang> No, LKMs probably don't work on any powerpc platform.

Wolfgang> The reason is that the C compiler uses the "bl" instruction to do
Wolfgang> (ordinary, i.e. not through a function pointer) subroutine calls.  Those
Wolfgang> instructions have limitations in that they can only reach destinations
Wolfgang> less than 32MB apart from the current location.  Due to the way the kernel
Wolfgang> lays out its memory, any LKM is too far away from the kernel text to be
Wolfgang> reachable by this instruction :-(.

	This cannot be arranged to pass in a function pointer or a
transfer vector of function pointers?  Branches to constant displacements
are limited in distance to within a segment, but branches via a pointer
through the CTR or LR registers have unlimited range.

David