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

D. Stimits stimits at attbi.com
Sat Jun 21 13:31:24 MDT 2003


Michael J. Hammel wrote:

> 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  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.
>
What hardware does this driver support? I assume it is packaged 
separately from the kernel and not part of the kernel source itself, but 
maybe it was packaged with a new kernel before testing it against 
changes (not all configurations can be tested, there are so many). If 
the driver is not part of the stock (or Redhat or other packager) 
kernel, and is a separate module, what kernel version did it originally 
go with?

D. Stimits, stimits AT attbi DOT com




More information about the LUG mailing list