Re: Why should I include highmem.h?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 11, 2004 at 18:17:01 -0500, Timur Tabi wrote:
> I have a driver that compiles with several different 2.4 and 2.6 
> kernels.  In one file, if I include <linux/highmem.h>, I sometimes get 
> strange compilation errors, like this one when I compile with Red Hat 
> Enterprise 3:
> 
> In file included from 
> /usr/ammasso/src/rhel3/2.4.21-4smp-32/include/asm/desc.h:9,
>                  from 
> /usr/ammasso/src/rhel3/2.4.21-4smp-32/include/asm/pgalloc.h:7,
>                  from 
> /usr/ammasso/src/rhel3/2.4.21-4smp-32/include/linux/highmem.h:5,
>                  from devccil_mm.c:17:
> /usr/ammasso/src/rhel3/2.4.21-4smp-32/include/asm/mmu.h:18: field `sem' 
> has incomplete type
> /usr/ammasso/src/rhel3/2.4.21-4smp-32/include/asm/mmu.h:22: confused by 
> earlier errors, bailing out
> 
> If I don't include highmem.h, everything compiles correctly.  So what is 
> the value of highmem.h?  What do I get by including it, and if I do need 
> it, how do I include it without generating these errors?

Headers should be included if symbols from them are used. If your module
does not need that header, you don't need to include it. In fact, it
should get included indirectly through some memory-related headers when
CONFIG_HIMEM is turned on (which is the only case when it actualy
needed).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux