Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1434052pxb; Thu, 4 Nov 2021 02:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOULPu7xhXJWXkLFcXcjDSbK1EsvQ3SZ5ltlsxWdNZevupIDQYn01kUJOvbTEiq+qFctWb X-Received: by 2002:a17:906:2ed5:: with SMTP id s21mr61619244eji.30.1636017001106; Thu, 04 Nov 2021 02:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636017001; cv=none; d=google.com; s=arc-20160816; b=uKqemb6bZjycCTDZy5k2Ibe8RUAe5vgAsHoRoU0JJGvNL6MrEWEuWxeyu6UpDInbCL aR0+Wi1+prwFx3mVC17yqdSCE+ZtTPnpFdgSW6v/ZhefiwxxrZ8QJcCInYZlURp44ZTx uncipiOH98/sH2ytuc6ZJU43pVyVtY0NSOOUq0a2NlKVYQ+HSyIh9cytNUmtLWkLoBRm 2YI1GTYrprUnD1i7OL03BYLYGXIbyjRGFnipp/PPZ9WZx3K1bsf69DiTbAYyYBQHJwt6 i2PsdU2/fvVdxGumXWLt2Ts8mBXJyJPqmEwubdtR4AgtitVqwygGruRVK5M+6Qf3IyhR UfAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YSmd3mjTZiO5W9DOW9KHthsrw7DgvB994bAkJFK7co4=; b=pmh4KJ8Q9fDqu5u8k+uzoxv19T0lFQGhZ0VgUi3UKgeViK6XdY/g5b1nef/mTp9jJX Pm4UAsmXFxbnIkpihpm+2A1pTPhQWvI7H3m/Wvo6jOEOF8qJx3Tn89T4gaHAg5i44G7y 3r5lpbdhmgY/m/ZSgKh6z9RreiYztNStui8PO2znHThndnob4cfFtTYSm4eC6yULiGNq XFx2nc/Am6H+aQif9lvBTTCfTUYQtJ/q03WgrwdO1XbGI4j/zECHCW4Zqc41CJMa/86c /+gIrEn7jpJSrVK8oxhSqkYMOUP0fYbptUeeEG85wSquVx/yNsXohXwgrdn1/oz3E36t dfoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dw4U3bB0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y20si8956070edc.31.2021.11.04.02.09.35; Thu, 04 Nov 2021 02:10:01 -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=@kernel.org header.s=k20201202 header.b=dw4U3bB0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230445AbhKDJK0 (ORCPT + 99 others); Thu, 4 Nov 2021 05:10:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:33380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbhKDJKZ (ORCPT ); Thu, 4 Nov 2021 05:10:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 474746120F for ; Thu, 4 Nov 2021 09:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636016868; bh=R27FIfu7jHh5qwiMN++UMDXOmhpT/y+CHg7lzhq219M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dw4U3bB0ymILysfIXWK8vpcA+XA2+bV/vU8mel8F8THSsX+vvCa1RbDqb8E2vavY+ 7O1RGOWjWGAEKWg3xJ1v9ZOSFVrOOzYvkXO4NtwvTBlsY4Z4sSYfrPIXJedrJAGYdk NY77UNbvKRXRGp8O4P4b2Dhio0V22P2uFOjDuos8mIWbwGkocT5MsCxZGsh+YHdu0d E2JbUksN97kC84TWmM+WZpVc9GcPEfsQb7xYtcoPr5eOLONWgnoOx5ChK0fvfxsxIn uuCe0GtC+L/PRYz5X/HNn2I9lXgx2hDXHkDVnVgXOVinreR/QdB1dBDpeJKV+hZHlc pDZ5IqCCdR7ow== Received: by mail-ot1-f52.google.com with SMTP id l7-20020a0568302b0700b0055ae988dcc8so4177354otv.12 for ; Thu, 04 Nov 2021 02:07:48 -0700 (PDT) X-Gm-Message-State: AOAM530vJB/Z7LGly+ar+fhQCxtSyQJzfcn+rLwTx+P8lV5i4amLUAv5 f0xCPA1SHMaK8Vby5yDdfiF84c9LmMX2NrCFnnM= X-Received: by 2002:a05:6830:14c:: with SMTP id j12mr7351037otp.147.1636016867558; Thu, 04 Nov 2021 02:07:47 -0700 (PDT) MIME-Version: 1.0 References: <990f4427968071d59bcbb7411da73acc379d3ac4.1635986046.git.mirq-linux@rere.qmqm.pl> In-Reply-To: <990f4427968071d59bcbb7411da73acc379d3ac4.1635986046.git.mirq-linux@rere.qmqm.pl> From: Ard Biesheuvel Date: Thu, 4 Nov 2021 10:07:36 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: fix early early_iounmap() To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Jon Medhurst , Russell King , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Nov 2021 at 01:46, Micha=C5=82 Miros=C5=82aw wrote: > > Currently __set_fixmap() bails out with a warning when called in early bo= ot > from early_iounmap(). Fix it, and while at it, make the comment a bit eas= ier > to understand. > > Cc: > Fixes: b089c31c519c ("ARM: 8667/3: Fix memory attribute inconsistencies w= hen using fixmap") > Signed-off-by: Micha=C5=82 Miros=C5=82aw Acked-by: Ard Biesheuvel > --- > 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_ST= ART); > BUG_ON(idx >=3D __end_of_fixed_addresses); > > - /* we only support device mappings until pgprot_kernel has been s= et */ > + /* We support only device mappings before pgprot_kernel is set. *= / > if (WARN_ON(pgprot_val(prot) !=3D pgprot_val(FIXMAP_PAGE_IO) && > - pgprot_val(pgprot_kernel) =3D=3D 0)) > + pgprot_val(prot) && pgprot_val(pgprot_kernel) =3D=3D = 0)) > return; > > if (pgprot_val(prot)) > -- > 2.30.2 >