Re: [PATCH] 2.4: export the symbol "mmu_cr4_features" for XFree86 DRM kernel drivers

From: Calum Mackay (calum.mackay@sun.com)
Date: Sat Aug 02 2003 - 06:54:25 EST


Christoph Hellwig wrote:
> Can you explain why they need it and why they magically need it
> because of vmap() ?

Sorry, of course.

[as Mitch has already pointed out privately] e.g the XFree86 DRM radeon
Makefile includes this:

[xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux]

        # Check for 4-argument vmap() in some 2.5.x and 2.4.x kernels
        VMAP := $(shell grep -A1 'vmap.*count,$$'
$(LINUXDIR)/include/linux/vmalloc.h | grep -c prot)

        ifneq ($(VMAP),0)
        EXTRA_CFLAGS += -DVMAP_4_ARGS
        endif

Christoph's vmap() backport introduced this reference in
linux/vmalloc.h, so the DRM module is now compiled with VMAP_4_ARGS defined.

The radeon kernel driver source includes (via drm_memory.h)
linux/vmalloc.h, iff VMAP_4_ARGS is defined. The latter includes (on
i386) asm/asm-i386/pgtable.h, which includes asm/asm-i386/processor.h.

processor.h defines some inline functions [set_in_cr4() &
clear_in_cr4()] which reference mmu_cr4_features.

mmu_cr4_features is currently declared in arch/i386/kernel/setup.c [and
also arch/x86_64/kernel/setup.c] but not currently exported.

[The problem is not restricted to the radeon kernel driver; I've just
used it as an example]

cheers,
Calum.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 07 2003 - 22:00:18 EST