On Tue, 17 Oct 2000, Linus Torvalds wrote:
> There's something else wrong in the config to make this be needed at all.
> You need to figure out what the real problem is, and what is causing the
> AGP symbols to not get version information. Probably a file is missing
> from the "export-objs" list..
There was no export-objs list at all ;)
I have only compile-tested the patch below with 2.4.0test10pre3 and
2.2.18pre16 (some fuzz on apply). Hope it's right, I can't test if it
fixes the MODVERSIONS+in kernel agp+in kernel drm case. I tested kernel
and module cases.
I don't actually see the point of get_module_symbol at all - what is a
valid use for it ? it is ugly to have a CONFIG_MODULES requirement for a
monolithic kernel, and it has an inaccurate name (since kernel_module
isn't a module ;)
john
diff -Nuar linux/drivers/char/agp/Makefile new/drivers/char/agp/Makefile
--- linux/drivers/char/agp/Makefile Tue Jan 4 17:41:45 2000
+++ new/drivers/char/agp/Makefile Wed Oct 18 13:55:59 2000
@@ -3,20 +3,28 @@
# space ioctl interface to use agp memory. It also adds a kernel interface
# that other drivers could use to manipulate agp memory.
-O_TARGET := agp.o
+O_TARGET := agp.o
-ifeq ($(CONFIG_AGP),y)
- O_OBJS += agpgart_fe.o
- OX_OBJS += agpgart_be.o
-else
- ifeq ($(CONFIG_AGP), m)
- MI_OBJS += agpgart_fe.o
- MIX_OBJS += agpgart_be.o
- M_OBJS += agpgart.o
- endif
-endif
+agpgart-objs := agpgart_be.o agpgart_fe.o
+
+export-objs := agpgart_be.o
+
+obj-$(CONFIG_AGP) += agpgart.o $(agpgart-objs)
+
+# Take module names out of obj-y and int-m
+
+obj-y := $(filter-out agpgart.o, $(obj-y))
+int-m := $(filter-out agpgart.o, $(obj-m))
+
+# Translate to Rules.make lists.
+
+O_OBJS := $(filter-out $(export-objs), $(obj-y))
+OX_OBJS := $(filter $(export-objs), $(obj-y))
+M_OBJS := $(sort $(filter agpgart.o, $(obj-m)))
+MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m)))
+MIX_OBJS := $(sort $(filter $(export-objs), $(int-m)))
include $(TOPDIR)/Rules.make
-agpgart.o: agpgart_be.o agpgart_fe.o
- $(LD) $(LD_RFLAG) -r -o $@ agpgart_be.o agpgart_fe.o
+agpgart.o: $(agpgart-objs)
+ $(LD) -r -o $@ $(agpgart-objs)
diff -Nuar linux/drivers/char/agp/agpgart_be.c new/drivers/char/agp/agpgart_be.c
--- linux/drivers/char/agp/agpgart_be.c Mon Aug 21 16:08:12 2000
+++ new/drivers/char/agp/agpgart_be.c Wed Oct 18 13:29:24 2000
@@ -421,7 +421,7 @@
/* Generic Agp routines - Start */
-static void agp_generic_agp_enable(u32 mode)
+static void __attribute__((unused)) agp_generic_agp_enable(u32 mode)
{
struct pci_dev *device = NULL;
u32 command, scratch, cap_id;
@@ -712,7 +712,7 @@
return 0;
}
-static int agp_generic_insert_memory(agp_memory * mem,
+static int __attribute__((unused)) agp_generic_insert_memory(agp_memory * mem,
off_t pg_start, int type)
{
int i, j, num_entries;
@@ -770,7 +770,7 @@
return 0;
}
-static int agp_generic_remove_memory(agp_memory * mem, off_t pg_start,
+static int __attribute__((unused)) agp_generic_remove_memory(agp_memory * mem, off_t
+pg_start,
int type)
{
int i;
@@ -788,12 +788,12 @@
return 0;
}
-static agp_memory *agp_generic_alloc_by_type(size_t page_count, int type)
+static agp_memory * __attribute__((unused)) agp_generic_alloc_by_type(size_t
+page_count, int type)
{
return NULL;
}
-static void agp_generic_free_by_type(agp_memory * curr)
+static void __attribute__((unused)) agp_generic_free_by_type(agp_memory * curr)
{
if (curr->memory != NULL) {
vfree(curr->memory);
diff -Nuar linux/drivers/char/drm/Config.in new/drivers/char/drm/Config.in
--- linux/drivers/char/drm/Config.in Tue Aug 8 17:27:33 2000
+++ new/drivers/char/drm/Config.in Wed Oct 18 13:08:01 2000
@@ -10,6 +10,6 @@
tristate ' 3dfx Banshee/Voodoo3+' CONFIG_DRM_TDFX
tristate ' 3dlabs GMX 2000' CONFIG_DRM_GAMMA
tristate ' ATI Rage 128' CONFIG_DRM_R128
- dep_tristate ' Intel I810' CONFIG_DRM_I810 $CONFIG_AGP
- dep_tristate ' Matrox g200/g400' CONFIG_DRM_MGA $CONFIG_AGP
+ dep_tristate ' Intel I810' CONFIG_DRM_I810 $CONFIG_AGP $CONFIG_MODULES
+ dep_tristate ' Matrox g200/g400' CONFIG_DRM_MGA $CONFIG_AGP $CONFIG_MODULES
fi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/