More fixups for kernel build: EXPORT_SYMTAB warning removal

put_module_symbol clean up of tdfx tdfx_cleanup routine Makefile.kernel
    fix
main
Rik Faith 2000-07-20 05:17:49 +00:00
parent 0bd1fa795a
commit b4722ec943
14 changed files with 58 additions and 12 deletions

View File

@ -66,7 +66,7 @@ ifeq ($(CONFIG_DRM_R128),y)
OX_OBJS += r128_drv.o
O_OBJS += r128_context.o r128_bufs.o r128_dma.o
else
ifeq ($(CONFIG_DRM_I810),m)
ifeq ($(CONFIG_DRM_R128),m)
MIX_OBJS += r128_drv.o
MI_OBJS += r128_context.o r128_bufs.o r128_dma.o
M_OBJS += r128.o
@ -102,7 +102,7 @@ i810.o: i810_drv.o i810_context.o i810_bufs.o i810_dma.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ i810_drv.o i810_bufs.o i810_dma.o \
i810_context.o $(L_OBJS)
r128.o: r128_drv.o r128_context.o r128_bufs.o $(L_OBJS)
r128.o: r128_drv.o r128_context.o r128_bufs.o r128_dma.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ r128_drv.o r128_bufs.o r128_dma.o \
r128_context.o $(L_OBJS)

View File

@ -728,6 +728,7 @@ extern void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle);
#ifdef DRM_AGP
/* AGP/GART support (agpsupport.c) */
extern drm_agp_head_t *drm_agp_init(void);
extern void drm_agp_uninit(void);
extern int drm_agp_acquire(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_release(struct inode *inode, struct file *filp,

View File

@ -30,7 +30,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "i810_drv.h"
@ -420,6 +422,7 @@ void i810_cleanup(void)
drm_ctxbitmap_cleanup(dev);
i810_takedown(dev);
if (dev->agp) {
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}

View File

@ -31,7 +31,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "mga_drv.h"
EXPORT_SYMBOL(mga_init);
@ -434,6 +436,7 @@ void mga_cleanup(void)
mga_takedown(dev);
if (dev->agp) {
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}

View File

@ -30,7 +30,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "r128_drv.h"
EXPORT_SYMBOL(r128_init);
@ -409,7 +411,7 @@ void r128_cleanup(void)
r128_takedown(dev);
#ifdef DRM_AGP
if (dev->agp) {
/* FIXME -- free other information, too */
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}

View File

@ -31,7 +31,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "tdfx_drv.h"
EXPORT_SYMBOL(tdfx_init);
@ -241,9 +243,7 @@ static int tdfx_takedown(drm_device_t *dev)
drm_free(temp, sizeof(*temp), DRM_MEM_AGPLISTS);
temp = temp_next;
}
if(dev->agp->acquired) (*drm_agp.release)();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
if (dev->agp->acquired) (*drm_agp.release)();
}
#endif
/* Clear vma list (only built for debugging) */
@ -368,6 +368,13 @@ void tdfx_cleanup(void)
}
drm_ctxbitmap_cleanup(dev);
tdfx_takedown(dev);
#ifdef DRM_AGP
if (dev->agp) {
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}
#endif
}
int tdfx_version(struct inode *inode, struct file *filp, unsigned int cmd,

View File

@ -66,7 +66,7 @@ ifeq ($(CONFIG_DRM_R128),y)
OX_OBJS += r128_drv.o
O_OBJS += r128_context.o r128_bufs.o r128_dma.o
else
ifeq ($(CONFIG_DRM_I810),m)
ifeq ($(CONFIG_DRM_R128),m)
MIX_OBJS += r128_drv.o
MI_OBJS += r128_context.o r128_bufs.o r128_dma.o
M_OBJS += r128.o
@ -102,7 +102,7 @@ i810.o: i810_drv.o i810_context.o i810_bufs.o i810_dma.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ i810_drv.o i810_bufs.o i810_dma.o \
i810_context.o $(L_OBJS)
r128.o: r128_drv.o r128_context.o r128_bufs.o $(L_OBJS)
r128.o: r128_drv.o r128_context.o r128_bufs.o r128_dma.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ r128_drv.o r128_bufs.o r128_dma.o \
r128_context.o $(L_OBJS)

View File

@ -313,3 +313,15 @@ drm_agp_head_t *drm_agp_init(void)
}
return head;
}
void drm_agp_uninit(void)
{
drm_agp_fill_t *fill;
for (fill = &drm_agp_fill[0]; fill->name; fill++) {
#if LINUX_VERSION_CODE >= 0x020400
if ((*fill->f).address) put_module_symbol((*fill->f).address);
#endif
(*fill->f).address = 0;
}
}

View File

@ -728,6 +728,7 @@ extern void drm_ctxbitmap_free(drm_device_t *dev, int ctx_handle);
#ifdef DRM_AGP
/* AGP/GART support (agpsupport.c) */
extern drm_agp_head_t *drm_agp_init(void);
extern void drm_agp_uninit(void);
extern int drm_agp_acquire(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg);
extern int drm_agp_release(struct inode *inode, struct file *filp,

View File

@ -30,7 +30,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "gamma_drv.h"
#include <linux/pci.h>

View File

@ -30,7 +30,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "i810_drv.h"
@ -420,6 +422,7 @@ void i810_cleanup(void)
drm_ctxbitmap_cleanup(dev);
i810_takedown(dev);
if (dev->agp) {
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}

View File

@ -31,7 +31,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "mga_drv.h"
EXPORT_SYMBOL(mga_init);
@ -434,6 +436,7 @@ void mga_cleanup(void)
mga_takedown(dev);
if (dev->agp) {
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}

View File

@ -30,7 +30,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "r128_drv.h"
EXPORT_SYMBOL(r128_init);
@ -409,7 +411,7 @@ void r128_cleanup(void)
r128_takedown(dev);
#ifdef DRM_AGP
if (dev->agp) {
/* FIXME -- free other information, too */
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}

View File

@ -31,7 +31,9 @@
*/
#include <linux/config.h>
#ifndef EXPORT_SYMTAB
#define EXPORT_SYMTAB
#endif
#include "drmP.h"
#include "tdfx_drv.h"
EXPORT_SYMBOL(tdfx_init);
@ -241,9 +243,7 @@ static int tdfx_takedown(drm_device_t *dev)
drm_free(temp, sizeof(*temp), DRM_MEM_AGPLISTS);
temp = temp_next;
}
if(dev->agp->acquired) (*drm_agp.release)();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
if (dev->agp->acquired) (*drm_agp.release)();
}
#endif
/* Clear vma list (only built for debugging) */
@ -368,6 +368,13 @@ void tdfx_cleanup(void)
}
drm_ctxbitmap_cleanup(dev);
tdfx_takedown(dev);
#ifdef DRM_AGP
if (dev->agp) {
drm_agp_uninit();
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;
}
#endif
}
int tdfx_version(struct inode *inode, struct file *filp, unsigned int cmd,