Skip to content

Commit 03f2578

Browse files
osctobegregkh
authored andcommitted
ARM: 9155/1: fix early early_iounmap()
commit 0d08e7b upstream. Currently __set_fixmap() bails out with a warning when called in early boot from early_iounmap(). Fix it, and while at it, make the comment a bit easier to understand. Cc: <stable@vger.kernel.org> Fixes: b089c31 ("ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap") Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ee79560 commit 03f2578

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/arm/mm/mmu.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
391391
FIXADDR_END);
392392
BUG_ON(idx >= __end_of_fixed_addresses);
393393

394-
/* we only support device mappings until pgprot_kernel has been set */
394+
/* We support only device mappings before pgprot_kernel is set. */
395395
if (WARN_ON(pgprot_val(prot) != pgprot_val(FIXMAP_PAGE_IO) &&
396-
pgprot_val(pgprot_kernel) == 0))
396+
pgprot_val(prot) && pgprot_val(pgprot_kernel) == 0))
397397
return;
398398

399399
if (pgprot_val(prot))

0 commit comments

Comments
 (0)