Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2012 09:45:52 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r238172 - head/sys/dev/agp
Message-ID:  <201207090945.52985.jhb@freebsd.org>
In-Reply-To: <2B1DDEF4-A048-45BD-9A7A-8CB148282475@xcllnt.net>
References:  <201207061557.q66Fv45N069464@svn.freebsd.org> <20120707083535.GR2338@deviant.kiev.zoral.com.ua> <2B1DDEF4-A048-45BD-9A7A-8CB148282475@xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, July 07, 2012 10:44:14 am Marcel Moolenaar wrote:
> The commit log states the motivation: developers tend to copy-n-paste without
> truly understanding the subtle differences and may use the Maxmem use in
> agp_i810.c as the wrong precedence. Secondly, also mentioned in the commit
> log, is the use of realmem in agp.c and then Maxmem in agp_i810.c which is
> likely to be confusing. So the change from Maxmem to realmem in agp_i810.c
> prioritizes the avoidance of confusion over pedantic correctness, which we
> all know isn't achievable anyway. Since agp_i810.c is only for amd64, i386
> and pc98, also stated in the commit log, and all of those have dense phys.
> memory, the discrepancy is still within the margin of error.

1GB is a rather large margin IMO.  If agp_i810.c actually cares about the
maximum PA and not the size of RAM, then it should use the correct variable
for this purpose.  The copy-n-paste thing works both ways.  You don't want
someone to use realmem instead of Maxmem elsewhere because they copy-n-paste
the wrong thing from agp_i810.c.  I think the solution is to fix things to
use what the actually need.  In the case of agp_i810.c it sounds like that is
Maxmem.

-- 
John Baldwin



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