[PATCH] adjust BAT mapping according to max_low_mem

Tom Rini trini at kernel.crashing.org
Sun Feb 10 07:47:16 EST 2002


On Fri, Feb 08, 2002 at 01:36:04PM -0700, Val Henson wrote:

> I'm testing highmem by setting max_low_mem to 64MB and using 256MB RAM
> total (this does not trigger my SCSI bug).  I had to change a few
> things in adjust_total_lowmem to force it to _not_ BAT map of all the
> RAM.  I think the printout of residual is wrong but I'm not sure.

If I'm reading all of the code right, residual at this point should be
(total_lowmem (initial value) - ram mapped in BATs), so I think this:

> +	/* adjust BAT block size to max_low_mem */
> +	if (max_low_mem < bat_max)
> +		bat_max = max_low_mem;
> +
> +	/* adjust lowmem size to max_low_mem */
> +	if (max_low_mem < total_lowmem)
> +		total_lowmem = max_low_mem;
> +
> +	ram = total_lowmem;

Should be:
	/* adjust BAT block size to max_low_mem */
	if (max_low_mem < bat_max)
		bat_max = max_low_mem;

	/* adjust lowmem size to max_low_mem */
	if (max_low_mem < total_lowmem)
		ram = max_low_mem;
	else
		ram = total_lowmem;
	...

	printk(KERN_INFO "Memory BAT mapping: BAT2=%ldMb, BAT3=%ldMb, "
		"residual: %ldMb\n", __bat2 >> 20, __bat3 >> 20,
		(total_lowmem - ram) >> 20);

Does this sound right?

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list