From patchwork Mon Feb 22 20:54:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 62631 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1471567lbl; Mon, 22 Feb 2016 12:58:26 -0800 (PST) X-Received: by 10.98.67.92 with SMTP id q89mr41167012pfa.137.1456174706559; Mon, 22 Feb 2016 12:58:26 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id w83si41934109pfa.51.2016.02.22.12.58.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 12:58:26 -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 1aXxXF-0005Uz-6X; Mon, 22 Feb 2016 20:56:49 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXxVg-0003EA-Oq for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2016 20:55:13 +0000 Received: by mail-wm0-x22f.google.com with SMTP id c200so191055425wme.0 for ; Mon, 22 Feb 2016 12:54:52 -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=HUOjdOSWurqvA+Iv5QUMUVoCj8dw3BMQtwi6JkMSFQY=; b=jaadQKHr1/MxBSF0EE6/8SldmhCwYaPTveDdC5fHAOt6YC9LdPogyrMQYeNLULmeto rfxeHGfYz060Hji7W5vINQ+H0M8hNaKKtj/yREV6jfiZuG5sqvaVGtppSgzszWdsOZHw ykajLgnlB4OEYY2jtd1hqWVtPcG3VMy9whJ7U= 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=HUOjdOSWurqvA+Iv5QUMUVoCj8dw3BMQtwi6JkMSFQY=; b=NtzBBHMk/OdrkTFsZWHV7ME2y78dkymgO2Pf59Dl/Ehv+0zZvTIFqAatRbVu7N5dSh 7Wf28QcY8nWV3c+VxWaF96qlctVxkK6J8T1AZxn3XEYm2bbC831vRNYwFcENxOiku2AX 5CcQM9pdLpXqqSO7gph96Cq5NSSRNTXCSQypSt5ba1QOaT6xSOwDl1/mEIFAkHbPfLKF oTlekVWVGt0yXxFEOEuc4tMRXVpjG/OaT9HA+Eg0sWT0pGNrlDOtseN1L2/TLXQX/H22 SVo15kkOB+m1mCgdxgyFuqdaBQe/HZ/J7h2dadcIicy7kzNvjySKK+ZWHjLFRI/Wlnus DHIA== X-Gm-Message-State: AG10YOTeI2Wlg2MtMlb70guT9vhshLDeQeU54ac5FssnlLz9j8zr0BUScfE+sG3tY/rs7YZB X-Received: by 10.28.48.137 with SMTP id w131mr15165657wmw.73.1456174491020; Mon, 22 Feb 2016 12:54:51 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id k8sm15012530wjr.38.2016.02.22.12.54.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Feb 2016 12:54:50 -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 01/10] arm64: mm: move assignment of 'high_memory' before its first use Date: Mon, 22 Feb 2016 21:54:23 +0100 Message-Id: <1456174472-30028-2-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_125513_093025_1DFAECBE X-CRM114-Status: GOOD ( 10.84 ) 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:22f 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 The variable 'high_memory' ends up being referenced in the call to dma_contiguous_reserve(). So move the assignment before that call. Signed-off-by: Ard Biesheuvel --- arch/arm64/mm/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 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/mm/init.c b/arch/arm64/mm/init.c index e1f425fe5a81..017201982da3 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -235,6 +235,9 @@ void __init arm64_memblock_init(void) arm64_dma_phys_limit = max_zone_dma_phys(); else arm64_dma_phys_limit = PHYS_MASK + 1; + + high_memory = __va((memblock_end_of_DRAM() & PAGE_MASK) - 1) + 1; + dma_contiguous_reserve(arm64_dma_phys_limit); memblock_allow_resize(); @@ -259,7 +262,6 @@ void __init bootmem_init(void) sparse_init(); zone_sizes_init(min, max); - high_memory = __va((max << PAGE_SHIFT) - 1) + 1; max_pfn = max_low_pfn = max; }