From patchwork Tue Jun 27 00:57:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Berger X-Patchwork-Id: 9810663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C0AC460383 for ; Tue, 27 Jun 2017 01:18:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 215E028437 for ; Tue, 27 Jun 2017 01:18:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1533028479; Tue, 27 Jun 2017 01:18:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9367828437 for ; Tue, 27 Jun 2017 01:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=vSzgvYkQY6TE3EIxBgRN1NgdEo0yBwiSAHt3EVkJcRo=; b=i2N fYBCnxAQ9wOL/q9nA40XsEqojPQTIK0eq42PyawMjU/zQa8x29oFHQZvvHN0qc8TtkjYWKaA4Lz1p ryrd4+M8NPBQrwnDH/ssqGakhNiRpV8I6pZ7LPWLxkbYiL8lz0b8m/ZKY15KNjt7lH1GPmlMIcN88 33ezEAoscA+XTBgTG1odbsDVrQzTOSHuozCrSjQvqNx/jzhuM83f3ZoKUYN6lgCc3NXehOHX/dtzY 5Y+SENkAztzKc8tdaDU68XSnopWFka5t9ahFrYFtOluyUnBRtU400g4tfbYl85M9lJpDxDynCw+pB FtlCimtB1pQGSs4NSv0y+PyW410uWGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dPf8m-0001SC-Va; Tue, 27 Jun 2017 01:18:04 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dPf8l-0001Nq-1Z for linux-arm-kernel@bombadil.infradead.org; Tue, 27 Jun 2017 01:18:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EXjsPI4h0a4aJQWBI96lSOVH5hY5ayO/khTZddZoxi8=; b=upCgz2KKuE4OvbzVHt8AYrJ9s CRKTVPHBPKorttHaUDAwU+P2nur0s2E44ZtvXjXFQQ7g3EjAnDZHnWaEfTy4Wk9Vj+dd7iOOf5B0s LbhG95PmjdCk+UfRpy2WTvAftTHaazFaE5YgYm+CWEFywfH0urkt09/zwNX14JH96OMF0etqlhftP Qdo19bKCmKade8AEuPjOYKRjuJgJ6XtklV+U4y/Ekn6xQ3MapsABfM2lByaJdvEaMkd+r5PcANnBZ ygurLKNmcbCM2YMOBAowpSwmDLlQYZXtefnV1VSRDjkic0VHkhK6cKFuo04c8y9qQA51Oju7Y6NeJ 8mX9wJFng==; Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dPepW-0007TP-Po for linux-arm-kernel@lists.infradead.org; Tue, 27 Jun 2017 00:58:12 +0000 Received: by mail-qk0-x244.google.com with SMTP id p21so2230111qke.0 for ; Mon, 26 Jun 2017 17:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EXjsPI4h0a4aJQWBI96lSOVH5hY5ayO/khTZddZoxi8=; b=fBI8w0vsz3Nr94fKvDvnK30nCEVCtWF6Aa9ciMLGgvHBDW4xHkLVeIMeE633BgNYpp IRKKH09Hn4KymFG8IzyzOEot3TEC1nxQ79+EX53xdFYtJUDmx7BVcKEVOUruNUJtUg9n DJBBCBsnl1/Sf6D5hFJyIO0WXPseuksUbHxpyKSpZ+2cedYCphvXMH0FLFgqLGn3dYL7 ZYFo/qdiCOxdfzEF841K0ifiQh2+Hwd58dWjjdWXHLNV8pgrzduLY9AVCGCNlnrxGaZn Cr6XUqH1pX/Kdk5/EPnn/U7wXSHYFq2UM0oxJtIFDPRIZIiSv2GSwqSBUf/0bZdBr+dn ayBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EXjsPI4h0a4aJQWBI96lSOVH5hY5ayO/khTZddZoxi8=; b=GrHnRjKEEheDm7JpSyocdU7/9lyJMyDqNOg7YiHwyEmxbAIN5c/x/p8EWfifpC6RBD B/gTdOF0UpRZedLA66v5sks2rRZNjKNmJqRaf5jMLwzGyPYFhRi/ZNILW54Mb/s3TKvS SebxN1KVuItvP5/pFXHPF5cs8BE2Bn9962lKNCv6gMsZzCnorqob84Y4+ISU0w7QLiRx F51WSJ5FzWhAtv6AnAfv528sc0jAcmUH/jv3dAXcwAkHhI5gcWBbE454ENP+QmjivxXu pG3PP1kbZVWGKwDORISJ33omcvCJjcKu81yvIAsfI+EQi14rdC3dGrZmhqrp23bsz1HS leXw== X-Gm-Message-State: AKS2vOyTR/7WQm/m3BgyTjHl1pkVs0MCMK589X2YwgV8VwebXckX2DY+ 2ySOm+m0yFS/9g== X-Received: by 10.55.97.148 with SMTP id v142mr3627731qkb.107.1498525068225; Mon, 26 Jun 2017 17:57:48 -0700 (PDT) Received: from stb-bld-02.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id z40sm1324171qth.64.2017.06.26.17.57.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 17:57:47 -0700 (PDT) From: Doug Berger To: Russell King Subject: [PATCH] ARM: small correction to early_ioremap support Date: Mon, 26 Jun 2017 17:57:29 -0700 Message-Id: <20170627005731.7869-1-opendmb@gmail.com> X-Mailer: git-send-email 2.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170627_015811_076973_A9A23376 X-CRM114-Status: GOOD ( 13.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , Jon Medhurst , Florian Fainelli , Kees Cook , Ard Biesheuvel , Marc Zyngier , open list , Doug Berger , Laura Abbott , "moderated list:ARM PORT" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The fixmap pages need to be on the same pmd page for the current implementation of arm early_fixmap. A build time bug check is used to ensure that. However, the worst case fixmap range is better represented by __end_of_fixed_addresses than by the value __end_of_early_ioremap_region. Fixes: 2937367b8a4b ("ARM: add support for generic early_ioremap/early_memremap") Signed-off-by: Doug Berger Acked-by: Ard Biesheuvel --- arch/arm/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 31af3cb59a60..74c0ed5c3b08 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -392,7 +392,7 @@ void __init early_fixmap_init(void) * The early fixmap range spans multiple pmds, for which * we are not prepared: */ - BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT) + BUILD_BUG_ON((__fix_to_virt(__end_of_fixed_addresses) >> PMD_SHIFT) != FIXADDR_TOP >> PMD_SHIFT); pmd = fixmap_pmd(FIXADDR_TOP);