Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CD43C4321E for ; Mon, 15 Nov 2021 18:32:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DE1B6325D for ; Mon, 15 Nov 2021 18:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242250AbhKOSfB (ORCPT ); Mon, 15 Nov 2021 13:35:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:46728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238292AbhKOReT (ORCPT ); Mon, 15 Nov 2021 12:34:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 50D04632BA; Mon, 15 Nov 2021 17:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636996966; bh=ydl7419buwuTiF4nnMfcj7C1WMCbbwNPIVLyPGyTEus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AUFPBEbnfMM7n0Bj01eZIYCzP4bvIFhfZq5A/4GnoBuyhktaaj1Oz3PNjWGz6FI06 XW61bMF5tEBXP6V7fMn5vgJ0ezjflARIhAhoVWTAHZgDtPkOArbFLDlK/amzCxOnzh 2ytOK3HEqIZnd1TctH3s5lxzmLJ/c1uFEsG4kZ5Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , "Russell King (Oracle)" Subject: [PATCH 5.4 333/355] ARM: 9155/1: fix early early_iounmap() Date: Mon, 15 Nov 2021 18:04:17 +0100 Message-Id: <20211115165324.510272318@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165313.549179499@linuxfoundation.org> References: <20211115165313.549179499@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michał Mirosław commit 0d08e7bf0d0d1a29aff7b16ef516f7415eb1aa05 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: Fixes: b089c31c519c ("ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap") Acked-by: Ard Biesheuvel Signed-off-by: Michał Mirosław Signed-off-by: Russell King (Oracle) Signed-off-by: Greg Kroah-Hartman --- arch/arm/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -415,9 +415,9 @@ void __set_fixmap(enum fixed_addresses i FIXADDR_END); 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))