arm64 ioremap question

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Oct 15 11:52:16 EDT 2013


On Tue, Oct 15, 2013 at 11:20:04AM -0400, Mark Salter wrote:
> ioremap() has a test to prevent RAM from being remapped:
> 
> 	/*
> 	 * Don't allow RAM to be mapped.
> 	 */
> 	if (WARN_ON(pfn_valid(__phys_to_pfn(phys_addr))))
> 		return NULL;
> 
> 
> Is this really necessary even for reserved pages which are not being
> used for anything else?

It helps to stop the abuse of using ioremap() on normal memory, which has
happened soo much in Aarch32 for years.  Unfortuantely, bad habbits die
hard.

"Reserved pages not being used for anything else" are still mapped, and
still subject to speculative fetches.



More information about the linux-arm-kernel mailing list