Skip to content

Commit

Permalink
ARM: 9155/1: fix early early_iounmap()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michał Mirosław authored and Russell King (Oracle) committed Nov 12, 2021
1 parent 00568b8 commit 0d08e7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) < FIXADDR_START);
BUG_ON(idx >= __end_of_fixed_addresses);

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

if (pgprot_val(prot))
Expand Down

0 comments on commit 0d08e7b

Please sign in to comment.