[lug] pte_offset in a device driver isn't being found
Michael J. Hammel
mjhammel at graphics-muse.org
Sat Jun 21 14:40:23 MDT 2003
On Sat, 2003-06-21 at 12:00, Jonathan Corbet wrote:
> Good thinking - seeing as it's a macro, things will work poorly if you
> don't have the definition around. You'll not get your module to load.
Exactly. I dug through the headers but can't find a "pte_offset()"
macro - only a "__pte_offset()" and some pte_offset_xxx(), where xxx is
"kernel", "map" or "nested". pte_offset_kernel() seemed to match the
args so I switched to that, but I doubt that's correct.
> The macro, for the x86 architecture (is that what you're on?)
Yes, asm-i386.
> is defined in
> asm-i386/pgtable.h. It is inside an ifdef:
>
> #ifndef __ASSEMBLY__
>
> #endif
>
> But that *shouldn't* be a problem. Something to check, though.
I don't see any references to ASSEMBLY in the driver code.
> > I'm including /usr/include and /usr/src/linux-<uname -r>/include in the
> > header search path.
>
> For kernel builds, you really shouldn't be getting anything from
> /usr/include at all. Take it out of the path, it can only cause trouble.
I added it myself as a test, but the original Makefile used the kernel
dirs only. I can take it out but it doesn't change things. The problem
is that the pte_offset() macro doesn't appear to exist in the 2.4.20
kernel headers for i386. It *does* exist in the headers for other
platforms - I grep'd them and found it in other pgtable.h files for
those platforms. It's just not there in i386.
--
Michael J. Hammel The Graphics Muse
mjhammel at graphics-muse.org http://www.graphics-muse.com
------------------------------------------------------------------------------
Great spirits have always encountered violent opposition from mediocre
minds. -- Albert Einstein
More information about the LUG
mailing list