From patchwork Fri Jul 22 17:32:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72636 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1128021qga; Fri, 22 Jul 2016 11:02:51 -0700 (PDT) X-Received: by 10.66.0.74 with SMTP id 10mr8551145pac.38.1469210571654; Fri, 22 Jul 2016 11:02:51 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id q8si16890284pac.287.2016.07.22.11.02.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Jul 2016 11:02:51 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bQele-0008HF-8O; Fri, 22 Jul 2016 18:01:46 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bQeJs-0001pp-Ie for linux-arm-kernel@lists.infradead.org; Fri, 22 Jul 2016 17:33:11 +0000 Received: by mail-wm0-x235.google.com with SMTP id f65so65468249wmi.0 for ; Fri, 22 Jul 2016 10:32:43 -0700 (PDT) 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=IJIYpiu7RSFmL7INyeRidRCAsN6MIH8gzclt5DKXayI=; b=MRupAUSHYj8yaZRjWT44dMJqubtzJinH7LRapeYurRtAHw/S3KWWHMYTlxiSukY6cJ 4BuWuPh42AhWV5S/0aTanVpFQYdHAHEJ5PVT8yjXYDZeSilaZKtZP6XnMBf6aj6AooiU DbzL4IG1wnCsB5iYfV6RPgQ+dwDao16zbsxig= 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=IJIYpiu7RSFmL7INyeRidRCAsN6MIH8gzclt5DKXayI=; b=iLKnYvg7OEE48emGpAOzX4hIEtjqGCSNNe9EyXHTw7gaa8x7OHhCLGD/RzY4VBVccK HF/Rz6rxMIfRvORYfzeZf/RTDOBzlgrGLVuXimph0RtCD3q/hKu3SfZPgSYIpHgD3/qE aEK7IWhx8yzWwF93GGbNie+PPM4IOdgC2eECixNi/T6i5F4e2UCIBf3wUHQqi1bF+uZE +eghJYig4VnIOO3XqI0t9P2SLa+obTOG806NKf6dMnY4ju0skuls4bf626PWGzLN86m0 ukaDUC9FFbT4/UIxR9zDPlYr6CFfOwz5WUEwpf45F72et8xa6VtWgyORbKT0oDayg9Pc bb0w== X-Gm-Message-State: ALyK8tLn25PRmSpw8M2JOxLNOmLfNOxH4yXCWYeTtakGjp6dgiIYvP+eoM3r6cS5GfMWUjp1 X-Received: by 10.28.35.193 with SMTP id j184mr25639053wmj.33.1469208762552; Fri, 22 Jul 2016 10:32:42 -0700 (PDT) Received: from localhost.localdomain (154.red-83-36-182.dynamicip.rima-tde.net. [83.36.182.154]) by smtp.gmail.com with ESMTPSA id q23sm13553098wme.17.2016.07.22.10.32.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jul 2016 10:32:42 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, sudeep.holla@arm.com, suzuki.poulose@arm.com Subject: [PATCH 1/2] arm64: mm: make create_mapping_late() non-allocating Date: Fri, 22 Jul 2016 19:32:24 +0200 Message-Id: <1469208745-6693-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469208745-6693-1-git-send-email-ard.biesheuvel@linaro.org> References: <1469208745-6693-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160722_103305_301328_893797BB X-CRM114-Status: UNSURE ( 9.27 ) X-CRM114-Notice: Please train this message. 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:235 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 Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: mark.rutland@arm.com, Ard Biesheuvel , labbott@fedoraproject.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The only purpose served by create_mapping_late() is to remap the already mapped .text and .rodata kernel segments with read-only permissions. Since we no longer allow block mappings to be split or merged, create_mapping_late() should not pass an allocation function pointer into __create_pgd_mapping(). So pass NULL instead. Signed-off-by: Ard Biesheuvel --- arch/arm64/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Mark Rutland diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index a96a2413fa18..33f36cede02d 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -312,7 +312,7 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt, } __create_pgd_mapping(init_mm.pgd, phys, virt, size, prot, - late_pgtable_alloc, !debug_pagealloc_enabled()); + NULL, !debug_pagealloc_enabled()); } static void __init __map_memblock(pgd_t *pgd, phys_addr_t start, phys_addr_t end)