public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How could we get rid of saved_max_pfn for calgary iommu?
@ 2014-02-19  6:18 WANG Chao
  2014-02-20  0:04 ` Jon Mason
  2014-03-05  5:36 ` WANG Chao
  0 siblings, 2 replies; 13+ messages in thread
From: WANG Chao @ 2014-02-19  6:18 UTC (permalink / raw)
  To: Muli Ben-Yehuda, Jon D. Mason, Thomas Gleixner, H. Peter Anvin,
	Vivek Goyal, Yinghai Lu
  Cc: kexec, discuss, x86, linux-kernel

Hi, All

arch/x86/kernel/pci-calgary.c is the only user of saved_max_pfn today:

int __init detect_calgary(void)
{
	[..]
	specified_table_size = determine_tce_table_size((is_kdump_kernel() ?
					saved_max_pfn : max_pfn) * PAGE_SIZE);
	[..]
}

saved_max_pfn is the real mem size and is calculated by 1st kernel E820
memmap which is passed in by 2nd kernel's boot_params (done by kexec):

	saved_max_pfn = e820_end_of_ram_pfn();

After saved_max_pfn has been set, memmap=exactmap will reset the E820
provided by boot_params and use the user defined E820 instead.

Now we want to get rid of memmap=exactmap and directly pass the E820
memmap by boot_params for some reason (eg. exactmap may exceed the cmdline
size and also isn't compatible with kaslr).

However saved_max_pfn becomes the obstacle for obsoleting exactmap.
Because it needs two conditions: first kernel's E820 map and
memmap=exactmap cmdline.

So I'm wondering if it's possible to get rid of saved_max_pfn totally in
calgary code. Or we can get saved_max_pfn using a different way, for
example calculated in 1st kernel and passed in to 2nd kernel by cmdline.

Thanks
WANG Chao

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-03-11  5:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-19  6:18 How could we get rid of saved_max_pfn for calgary iommu? WANG Chao
2014-02-20  0:04 ` Jon Mason
2014-02-20  2:36   ` Vivek Goyal
2014-02-21  7:47     ` WANG Chao
2014-02-21  8:18   ` Baoquan He
2014-03-05  5:36 ` WANG Chao
2014-03-06  6:47   ` Muli Ben-Yehuda
2014-03-06  6:50     ` H. Peter Anvin
2014-03-06  7:00       ` Muli Ben-Yehuda
2014-03-06 14:46         ` Jon Mason
2014-03-09  7:06           ` Muli Ben-Yehuda
2014-03-11  5:20             ` Jon Mason
2014-03-06 16:05     ` Vivek Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox