From patchwork Wed Oct 17 16:34:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 10645903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A00AD13B0 for ; Wed, 17 Oct 2018 16:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 908201FF82 for ; Wed, 17 Oct 2018 16:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 827B72851E; Wed, 17 Oct 2018 16:35:33 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A7B61FF82 for ; Wed, 17 Oct 2018 16:35:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 248FB6B026D; Wed, 17 Oct 2018 12:35:31 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1F9D36B026E; Wed, 17 Oct 2018 12:35:31 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 09AF26B026F; Wed, 17 Oct 2018 12:35:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by kanga.kvack.org (Postfix) with ESMTP id D84286B026D for ; Wed, 17 Oct 2018 12:35:30 -0400 (EDT) Received: by mail-oi1-f197.google.com with SMTP id u205-v6so2039596oie.5 for ; Wed, 17 Oct 2018 09:35:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=bFMoRGJYhwlJofsu69UJCc+41ttAzbYKc6tl0AmOdOY=; b=hhKkCn008xz/TWpvFkgmZTDwot88NHR0VqnwuN+UM7+2spSrjhl9WPrRN9VnnrMhuS 9ckfKNxSKXA9csDqQDac7RmTJPRlBS5/vwfoNzqJMRu01gd5I/tMXWgCG4zkOfCK4bcD f9KZGNwBWj3xEJgygPg2f5mHstB28G4lF85r9EganXuSWUdMDqMl8YThUFPXPsB3Lhhb 1w1iZM8k65ZQbXoE4H4w+84T0PXwU/monPRJ51Oe0VO6hwU9WhUAW5aAlqUXY1QJC/Em JdpLU1e2socBeItCynH3NxtCRgcuBG7X5IfWagodtyfuTIAzExF/cHskhNFLRn8xJ1B8 fxVg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of steve.capper@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steve.capper@arm.com X-Gm-Message-State: ABuFfog0vP413kN/4fD1bGeWFQ+G6S8ds/c92tWAEcvlnPyHu/GD8eJS tcwWiZMe5VoEYrlE8CufWabpyXDUk7tpyiRVg1w0SCQtOXi06Z77JeySgROx4yQMNeXB7cp/FeI Ey8chDXVObsunBXcO7vonpC35ubY5JupasVXOHdb1NsFQ+6oGX9kki2m1NNs5qetp0w== X-Received: by 2002:a9d:6014:: with SMTP id h20mr7193507otj.349.1539794130664; Wed, 17 Oct 2018 09:35:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV63CBgEp9H/OgtL9TjvmK3KG4+WODJHMkpFoh9LOWWTMH+ARq+O35B5ifZgFX768ew7sXM27 X-Received: by 2002:a9d:6014:: with SMTP id h20mr7193467otj.349.1539794129604; Wed, 17 Oct 2018 09:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539794129; cv=none; d=google.com; s=arc-20160816; b=yB95aGo7OUCDwFXXlIlbBcD3/xAr77CM4rqMZwhnrfZ1zW3AWsB58aELd255o77wCU XZiK72CF9oh/rou2PPl0R/S1R6NZbUE0jhht4BgJlo55kZxTeQtKMer4d4ceTpjx3/pp YRzCaHDQOrs2I4eZTP13F43M2goSOxOcloL0NBU/u5QeBzOnvJPhqN6YhonBn30uiJ6B s+dXxzM9H5dHKqAopA01lKRucFOBUS1fJp48XWm691PCv8ddL3Bc/ZxWk0ugP5xLEgrn rng2XX4ZMYikuvJfpkOeCUxuoGs0bDAclIxe0fms1ntgEj6TaZ2bvbr9mjvzyenO/DU/ NgKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=bFMoRGJYhwlJofsu69UJCc+41ttAzbYKc6tl0AmOdOY=; b=g7gjlli9bUIUwg5gosQDY4AQ+EanlxgPxGpHuAoJcZXXBdApaEbXIFd2Y03GDqNmHH 7Mv3rF0Z/Mt6vmknwz8zoXl3uIEMVKp5Hg6i0fdaEl8JFeXeKno33Aul1SXgIabh9Kui udQwZ+8nEGZnkO4nV4gwnK4gmj3Xw3eoJaAILdQsc0kcYtKHQdsO3X8ey5twG4U/0deI uh2J5jOvfrKVMu949S1TSBzf3D9W8xNq+7FDVPZ6fDtB6lYWlbsc4y5CE4Pn+Lj2oMO0 ti3kNLnIG1K5hfwMZXzadMFlx8DriytNpfl+IfQOsuFPgvEy9CPbLlbHII//Svd7JPcW jkvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of steve.capper@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steve.capper@arm.com Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id s83-v6si8716712oie.222.2018.10.17.09.35.29 for ; Wed, 17 Oct 2018 09:35:29 -0700 (PDT) Received-SPF: pass (google.com: domain of steve.capper@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of steve.capper@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=steve.capper@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 15E93165C; Wed, 17 Oct 2018 09:35:29 -0700 (PDT) Received: from capper-debian.emea.arm.com (unknown [10.32.102.177]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9FB083F71A; Wed, 17 Oct 2018 09:35:27 -0700 (PDT) From: Steve Capper To: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will.deacon@arm.com, ard.biesheuvel@linaro.org, jcm@redhat.com, Steve Capper Subject: [PATCH V2 3/4] arm64: mm: Define arch_get_mmap_end, arch_get_mmap_base Date: Wed, 17 Oct 2018 17:34:58 +0100 Message-Id: <20181017163459.20175-4-steve.capper@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181017163459.20175-1-steve.capper@arm.com> References: <20181017163459.20175-1-steve.capper@arm.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Now that we have DEFAULT_MAP_WINDOW defined, we can arch_get_mmap_end and arch_get_mmap_base helpers to allow for high addresses in mmap. Signed-off-by: Steve Capper --- arch/arm64/include/asm/processor.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 46c9d9ff028c..5afc0c5eb1cb 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -78,6 +78,13 @@ #define STACK_TOP STACK_TOP_MAX #endif /* CONFIG_COMPAT */ +#define arch_get_mmap_end(addr) ((addr > DEFAULT_MAP_WINDOW) ? TASK_SIZE :\ + DEFAULT_MAP_WINDOW) + +#define arch_get_mmap_base(addr, base) ((addr > DEFAULT_MAP_WINDOW) ? \ + base + TASK_SIZE - DEFAULT_MAP_WINDOW :\ + base) + extern phys_addr_t arm64_dma_phys_limit; #define ARCH_LOW_ADDRESS_LIMIT (arm64_dma_phys_limit - 1)