[lug] pte_offset in a device driver isn't being found

Michael J. Hammel mjhammel at graphics-muse.org
Sat Jun 21 08:50:01 MDT 2003


On Fri, 2003-06-20 at 22:59, D. Stimits wrote:
> Doing a grep in my 2.4.19 kernel I see it defined as a macro in the 
> kernel source tree, /usr/src/linux-2.4/include/asm/pgtable.h. I see the 
> same #define in /usr/include/asm/pgtable.h. My guess would be that you 
> still get this warning if the #include <asm/pgtable.h> does not occur 
> prior to the first use, so make sure it is #include'd within the 
> complaining file prior to the line that claims the need (which might 
> need other #include's to be after this #include). I didn't check out all 
> of the condition #ifdef type declarations in the header, so maybe some 
> other definition (or lack of) is going to cause it to fail.

I did a grep in the 2.4.20 source headers and didn't find it, though I
found a __pte_offset() and some pte_offset_xxx() functions in pgtable.h
that seem specific to different circumstances.  One in particular seemed
appropriate for this driver - pte_offset_kerne() - so I've changed it to
that for now.  The module compiles, but won't load because of other
errors now.

I think I still need pte_offset() anyway.  Something tells me that if it
is in 2.4.19 it should be in 2.4.20.  I doubt they'd change any API
stuff in a point release.

-- 
Michael J. Hammel           |
The Graphics Muse           |    I'm just working here till a good fast-food
mjhammel at graphics-muse.org  |    job opens up.
http://www.graphics-muse.com 



More information about the LUG mailing list