From patchwork Mon Feb 22 20:54:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 62637 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1473115lbl; Mon, 22 Feb 2016 13:01:50 -0800 (PST) X-Received: by 10.66.220.162 with SMTP id px2mr41091773pac.15.1456174910417; Mon, 22 Feb 2016 13:01:50 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id i89si41962516pfj.228.2016.02.22.13.01.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 13:01:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXxb9-0001AE-W7; Mon, 22 Feb 2016 21:00:52 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXxWC-0004Rd-6M for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2016 20:55:46 +0000 Received: by mail-wm0-x236.google.com with SMTP id a4so181090469wme.1 for ; Mon, 22 Feb 2016 12:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ibDWHLGjE88m0L8o0XaSAg8pUG7+NGHY1ozbOGtltSI=; b=Bxa+NaN41BJDViqxFPE07B+in2f4/qvDYBWh+8X2qiVa2k2LUA5N/BO4sZg50TCjqi qZHIpQ33gprYVV3j+H5ivt0tsBcZGk34I6uiGSUEGF6UOsAe7t+3wAhXiAbz6XW3s21w YbZzYB2XDKAsaiW8847HE6ov8+gW7vgtZ+VIs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ibDWHLGjE88m0L8o0XaSAg8pUG7+NGHY1ozbOGtltSI=; b=Wr/r2ZsmQ2/n4NOV0anx5E37WLGyE1pTfgpeYcJC5lobUsGPbKWyUk9hMq6/OuXyY2 XbCc1Lsvuhxd4++9DAzITVb+ZQn6UA9PaNbx+fiQdwm5SIHwiXBoK9J1zm57c/Y/TkoP T5mIyGeuXHSctBenf/EQrsHi3XeEJv55Va7KzXTka7UKj+/pZClwmbGtYG6mNC87FRbw waLYWmQwlsZOhXWyO38BeDSlIbykrb4yRCH2m0kxdTdwTVMuWWBIn4JTzggFZghHlJ2Q 4WTzvJd70mgMjbdZamHHV7T63feR1BvM3aakdCcrwZSn74wPCrqd1T7L7qdceoYTGrxC zGGg== X-Gm-Message-State: AG10YOTQj9Canat8You1YiB4CEXLA2XA5X/VxHVPeIIFPVsxea2wNoRWijxXOB8Zl2uG42+t X-Received: by 10.28.99.136 with SMTP id x130mr15290253wmb.12.1456174522556; Mon, 22 Feb 2016 12:55:22 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id k8sm15012530wjr.38.2016.02.22.12.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 12:55:21 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com Subject: [RFC PATCH 07/10] arm64: mm: avoid __pa translations for idmap_pg_dir and swapper_pg_dir Date: Mon, 22 Feb 2016 21:54:29 +0100 Message-Id: <1456174472-30028-8-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456174472-30028-1-git-send-email-ard.biesheuvel@linaro.org> References: <1456174472-30028-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160222_125544_624268_823D250A X-CRM114-Status: GOOD ( 12.14 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:236 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org When taking the physical address of idmap_pg_dir or swapper_pg_dir, which are static kernel globals, use __pa_symbol() not __pa(). Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/mmu_context.h | 2 +- arch/arm64/mm/mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index b03272fc501e..a8ba62955a62 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -123,7 +123,7 @@ static inline void cpu_install_idmap(void) local_flush_tlb_all(); cpu_set_idmap_tcr_t0sz(); - cpu_switch_mm(idmap_pg_dir, &init_mm); + cpu_do_switch_mm(__pa_symbol(idmap_pg_dir), &init_mm); } /* diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 13517699bea6..980dd9cbdc19 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -557,7 +557,7 @@ void __init paging_init(void) * We only reuse the PGD from the swapper_pg_dir, not the pud + pmd * allocated with it. */ - memblock_free(__pa(swapper_pg_dir) + PAGE_SIZE, + memblock_free(__pa_symbol(swapper_pg_dir) + PAGE_SIZE, SWAPPER_DIR_SIZE - PAGE_SIZE); bootmem_init();