Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 2014 15:34:29 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Sergey Matveychuk <sem@freebsd.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Fwd: panic after upgrade to 10
Message-ID:  <201402261534.29297.jhb@freebsd.org>
In-Reply-To: <201402261441.02262.jhb@freebsd.org>
References:  <5308B98C.6070807@semmy.ru> <530E3D85.8060906@FreeBSD.org> <201402261441.02262.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, February 26, 2014 2:41:02 pm John Baldwin wrote:
> On Wednesday, February 26, 2014 2:16:21 pm Sergey Matveychuk wrote:
> > Yes, no panic now.
> > For some reason agp0 is Intel 82855GM host to AGP bridge and agp1 is VGA 
> > controller itself.
> 
> Yes, on this machine we should probably only be using agp1 and not agp0.
> I'm guessing 8.x simply did not have 'device agp' in GENERIC which is why
> you didn't see this.  Right now my patch is preventing the panic, but
> /dev/agpgart probably isn't working quite right.  I guess you aren't
> running X on this though?

Actually, please try this patch instead.  It changes the agp devices
to create /dev/agpN and the first device should create a /dev/agpgart
symlink.  I think this means you can then move the symlink if needed,
so that in your case if you wanted to use X you could move it to /dev/agp1 
instead of /dev/agp0.

Index: sys/dev/agp/agp.c
===================================================================
--- agp.c	(revision 262488)
+++ agp.c	(working copy)
@@ -212,6 +212,7 @@ int
 agp_generic_attach(device_t dev)
 {
 	struct agp_softc *sc = device_get_softc(dev);
+	struct cdev *cdev;
 	int i;
 	u_int memsize;
 
@@ -232,7 +233,7 @@ agp_generic_attach(device_t dev)
 
 	/*
 	 * Work out an upper bound for agp memory allocation. This
-	 * uses a heurisitc table from the Linux driver.
+	 * uses a heuristic table from the Linux driver.
 	 */
 	memsize = ptoa(realmem) >> 20;
 	for (i = 0; i < agp_max_size; i++) {
@@ -257,8 +258,9 @@ agp_generic_attach(device_t dev)
 	sc->as_nextid = 1;
 
 	sc->as_devnode = make_dev(&agp_cdevsw,
-	    0, UID_ROOT, GID_WHEEL, 0600, "agpgart");
+	    0, UID_ROOT, GID_WHEEL, 0600, "%s", device_get_nameunit(dev));
 	sc->as_devnode->si_drv1 = dev;
+	make_dev_alias_p(MAKEDEV_CHECKNAME, &cdev, sc->as_devnode,  "agpgart");
 
 	return 0;
 }

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402261534.29297.jhb>