Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1060910pxb; Wed, 3 Nov 2021 17:38:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQiT0p22+MBqbXLcUJEzs9uipaUcfka8vw6uQvhU8K7oh/VMfoPbU3x2/g5OpyQ2ny6q7p X-Received: by 2002:a05:6e02:19ca:: with SMTP id r10mr33724509ill.319.1635986339289; Wed, 03 Nov 2021 17:38:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635986339; cv=none; d=google.com; s=arc-20160816; b=KQxPSIag3Uxe2pB0Gsv6ndsehle1YmGDNR+KaCH0UITlYHPpIRqcpV97wWcrFdXh6P u4oMpaCVEjEVik2+JBHrI5epON/XceXkO5eIjmAVjcllw2OybSGB8SdRoASQfbk9hr99 XktQgHcOy1ItkQrxLjnyRLboVN7oQg5bGs0o5NkQzJJq3LcqrJpSFA9Ne+vi6lOzY3HG jQCWMECP13h4WufzEfa0UsfgVR2V1tMxrI3W7cSsTh5QrCrTYaqNUNUueI90axA64LWL nSILDEBhq60fcmMtvVBqXk/1iRjTgVUdJWaViYhznxGwAaxp65Xbvmsz9gyqB0c7Eilp s0Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :subject:from:message-id:date:dkim-signature; bh=DITjhyvummD56rkP176iCZfgTEy4BjNcEV+528xxF6s=; b=X3D6r2d6lO77b34ePQgzWNliSpHAd5PbPZjXePf1yy0mypkXRzlsnuJc5oeC75WYcD AFZbCY4ft8FJD1tkIoXBqfsc+WWa0elZmersYBbfy3st477T/lSzwm1xla0PEGZiTs/E 17ZLOLDGCFvzyYDowE+99YAkyXD7m7/yQC3IPmlCl8QiX5w31f3AMflAMKxZNLvrIgVO xZUjZuCoEcd6MqGMMfBWKHwr6H9j3ZP5Gqi+CatPp3+My8rCCpDI4IyQE6RZeeScXb96 1RNl9RUbp2/3UAXbBXUHbFiikKrqupiigpIxtidsMU/tw6vQdWvfDNBVV2Y3G1p31DXH nQHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=ZWWGgfoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si7471943jak.129.2021.11.03.17.38.41; Wed, 03 Nov 2021 17:38:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=ZWWGgfoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbhKDAj5 (ORCPT + 99 others); Wed, 3 Nov 2021 20:39:57 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:43473 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbhKDAjz (ORCPT ); Wed, 3 Nov 2021 20:39:55 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4Hl4Tm5pg0z8K; Thu, 4 Nov 2021 01:37:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1635986237; bh=f5cqlw1tZGKFEiZUYL8xXBI9O4s1xQd9SM6Z/48bIuU=; h=Date:From:Subject:To:Cc:From; b=ZWWGgfoHpKwhWLJP7KsZ9iMZtK7ex8VxloRuus0sA9g/N3VyAztx7dS7ls5+SaazH 1cTVgmLkq2v7sWmhnu8qTu21vVEgwqK8uYuX1DogJA4MDqhHVMoU4p28iCaKTBPnK1 zd7fBKGRubcy1VJDgy3nhczM2B0UPwDETPymsoPn3gzlNuzbMxL7GUqBHAT0QAcfuV xASrCjdrE5ZFkL9z01ZWRwepXYlWUVQpug5kvUSgMQSeb2lZbvNT7NLwKRCLuKOvCL 7uP+2lgHTIow0PxlCdIj3RLLmJCEPVRgr68dGDfJTH/7O19cBtqKZsFtTgFdRcEnQ6 AfUlctQxIgdgg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at mail Date: Thu, 04 Nov 2021 01:37:15 +0100 Message-Id: <990f4427968071d59bcbb7411da73acc379d3ac4.1635986046.git.mirq-linux@rere.qmqm.pl> From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH] ARM: fix early early_iounmap() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Jon Medhurst , Ard Biesheuvel , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") Signed-off-by: Michał Mirosław --- arch/arm/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index a4e006005107..274e4f73fd33 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -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)) -- 2.30.2