Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Sep 2014 19:28:44 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 1200967 for review
Message-ID:  <201409301928.s8UJSieX087462@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1200967?ac=10

Change 1200967 by jhb@jhb_jhbbsd on 2014/09/30 19:27:58

	A patch I posted to the lists that probably isn't needed.  It
	tries to make agp handle multiple agp devices sanely, but that
	shouldn't really happen.

Affected files ...

.. //depot/projects/smpng/sys/dev/agp/agp.c#20 edit

Differences ...

==== //depot/projects/smpng/sys/dev/agp/agp.c#20 (text+ko) ====

@@ -212,6 +212,7 @@
 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 @@
 
 	/*
 	 * 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 @@
 	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;
 }



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