[lfs-support] Kernel bug involving physical to virtual remapping

Michael Shell list1 at michaelshell.org
Tue Jul 17 06:02:46 PDT 2018


On Tue, 17 Jul 2018 14:06:09 +0200
Frans de Boer <frans at fransdb.nl> wrote:


> Hazel, sorry but where should I remove phys_to_virt()? If I delete the 
> complete if statement in the iounmap function, and replace that with the 
> above code, i get compile errors.


  Frans,

You put (do not remove anything) the statement:

if (is_ISA_range(phys_addr, last_addr))
		return (__force void __iomem *)phys_to_virt(phys_addr);

around line 106 of arch/x86/mm/ioremap.c

just before the lines:

        /*
 	 * Don't allow anybody to remap normal RAM that we're using..
 	 */
 	pfn      = phys_addr >> PAGE_SHIFT;


You can how the older code was altered here:

https://patchwork.kernel.org/patch/9847859/


  Mike


More information about the lfs-support mailing list