Subject: pkg/18925: update sysutils/aperture for NetBSD 1.6K
To: None <gnats-bugs@gnats.netbsd.org>
From: None <stephenm@employees.org>
List: netbsd-bugs
Date: 11/04/2002 05:43:40
>Number: 18925
>Category: pkg
>Synopsis: update sysutils/aperture for NetBSD 1.6K
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 04 05:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Stephen Ma
>Release: NetBSD 1.6K 2002-11-03
>Organization:
People's Front for the correct spelling of the word "Organisation"
>Environment:
System: NetBSD whitewater.nowhere.org 1.6K NetBSD 1.6K (WHITEWATER) #38: Sun Nov 3 10:35:02 PST 2002 stephenm@whitewater.nowhere.org:/usr/src/sys/arch/i386/compile/WHITEWATER i386
Architecture: i386
Machine: i386
>Description:
After the merge of the i386 MP code into the main sources, the
aperture driver no longer loads, since it refers to two kernel
variables that were moved inside a new struct. This patch updates
the aperture driver package to handle this change.
>How-To-Repeat:
Load the xf86.o lkm into a 1.6K kernel.
>Fix:
$NetBSD: patch-ab,v 1.5 2002/09/15 19:25:38 tron Exp $
Replace patch-ab with:
--- module/xf86_mod.c.orig Fri Jul 5 01:36:35 2002
+++ module/xf86_mod.c Thu Oct 10 22:37:41 2002
@@ -17,9 +17,15 @@
#include "memrange.h"
/* Pull in the cpuid values from locore.s */
+#if __NetBSD_Version__ >= 106080000
+extern struct cpu_info cpu_info_primary;
+#define cpu_vendor ((char *)cpu_info_primary.ci_vendor)
+#define cpu_id cpu_info_primary.ci_signature
+#else
extern int cpu_id;
extern int cpu_feature;
extern char cpu_vendor[];
+#endif
extern struct mem_range_ops i686_mrops, k6_mrops;
@@ -31,7 +37,11 @@
0,
seltrue, xf86mmap, 0};
+#if __NetBSD_Version__ >= 106080000
+MOD_DEV("xf86", "xf86ap", NULL, -1, &newdev, -1)
+#else
MOD_DEV("xf86", LM_DT_CHAR, -1, &newdev)
+#endif
char *xf86_major_version = "2";
char *xf86_minor_version = "0";
@@ -76,7 +86,10 @@
case LKM_E_UNLOAD:
/* Free allocated memory */
- free(mem_range_softc.mr_desc, M_MEMDESC);
+ if (mem_range_softc.mr_desc != NULL) {
+ free(mem_range_softc.mr_desc, M_MEMDESC);
+ mem_range_softc.mr_desc = NULL;
+ }
break;
case LKM_E_STAT:
>Release-Note:
>Audit-Trail:
>Unformatted: