Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp206083yba; Wed, 3 Apr 2019 07:18:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrHI6fRJGXvt0rSdHPL88wCNp8D9eFaXHFm494TrvLZD60nFXKGpvXEH07q+jOJlQv8r7y X-Received: by 2002:a17:902:1123:: with SMTP id d32mr175104pla.16.1554301094246; Wed, 03 Apr 2019 07:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554301094; cv=none; d=google.com; s=arc-20160816; b=qxEjRlJukz0L/1YLzDXP2mk/HpTuwi7SkUqET6Rnxbbm95EQ7exWL8qkkJb1hCX8Gn 8kvPBJOf+BSMoltkBXhli8ctxmYY0pza2smmJb1pLk2BeHclldPPRB2wkGa9N3IqrYLd 7kIQ1V3qIwW918XKP4FEkq0MzxGYipV+CjW2jrV+Hfv/kl3dNvxb2wAFXOQCihwiHKmK LsJGy5q8f5veeJ3CPjPCovDqNKZcsIPSC8zTOzXtTU6y++Xjl1LkdjzckVwRZ/yGNxQH 5fOawR6qAPat+UHAKn96aSLDGfNPMkDQ0Xfv5TLCCmSCdW5wqnmhmXCd+5CmHggDMNGs 3Zow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3GzvBNszJ2F9qzyq8uNQC4ioxjUcI3EqpQkesdmXCx4=; b=STgCGfy39djDFUWkc55REjKHZ4VzUdLH7hHOBYLWqo4TolUHeCzaKPqvMhW/mWFfXH mSF2DJvz+hkIpPRCHRNqXPQUO3y8l0r43oEoczXk8e5B4qEfLrXp3LKkEBMQ1wtS4yxP hf9r+dmU1rxnqzUsYf05481zcCuZrfcKkDdyc4fLNXqJzfSvwm9sOFWJrMxYZ2nHZdgd V6ee2BhUDIMQhM6OdIOU2o23uPuNqF9Uix/m6J+Ie3K/a9vW9n+uNRwiAxywa99WSMXM nmTzYltPQ2hM5irU2Uy9S+T32d8GseaF35PM688ghOMY5PciEgO0dY63saQg/Wt7X639 dm5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si13506791pfh.36.2019.04.03.07.17.58; Wed, 03 Apr 2019 07:18:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbfDCORQ (ORCPT + 99 others); Wed, 3 Apr 2019 10:17:16 -0400 Received: from foss.arm.com ([217.140.101.70]:41358 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbfDCORP (ORCPT ); Wed, 3 Apr 2019 10:17:15 -0400 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 6F9FEEBD; Wed, 3 Apr 2019 07:17:15 -0700 (PDT) Received: from e112269-lin.arm.com (e112269-lin.cambridge.arm.com [10.1.196.69]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BE3033F68F; Wed, 3 Apr 2019 07:17:11 -0700 (PDT) From: Steven Price To: linux-mm@kvack.org Cc: Steven Price , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Dave Hansen , Ingo Molnar , James Morse , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Peter Zijlstra , Thomas Gleixner , Will Deacon , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , "Liang, Kan" , Andrew Morton , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH v8 01/20] arc: mm: Add p?d_large() definitions Date: Wed, 3 Apr 2019 15:16:08 +0100 Message-Id: <20190403141627.11664-2-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190403141627.11664-1-steven.price@arm.com> References: <20190403141627.11664-1-steven.price@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information will be provided by the p?d_large() functions/macros. For arc, we only have two levels, so only pmd_large() is needed. CC: Vineet Gupta CC: linux-snps-arc@lists.infradead.org Signed-off-by: Steven Price Acked-by: Vineet Gupta --- arch/arc/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index cf4be70d5892..0edd27bc7018 100644 --- a/arch/arc/include/asm/pgtable.h +++ b/arch/arc/include/asm/pgtable.h @@ -277,6 +277,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep) #define pmd_none(x) (!pmd_val(x)) #define pmd_bad(x) ((pmd_val(x) & ~PAGE_MASK)) #define pmd_present(x) (pmd_val(x)) +#define pmd_large(x) (pmd_val(pmd) & _PAGE_HW_SZ) #define pmd_clear(xp) do { pmd_val(*(xp)) = 0; } while (0) #define pte_page(pte) pfn_to_page(pte_pfn(pte)) -- 2.20.1