Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2018645img; Wed, 27 Feb 2019 09:07:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IYz+tAcQrISNjGc8lwOFEadjjeangKupYLNt6MAG4zb13prDlKK8xG35KliIJFwCruD9uis X-Received: by 2002:aa7:90c7:: with SMTP id k7mr2628536pfk.186.1551287254360; Wed, 27 Feb 2019 09:07:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551287254; cv=none; d=google.com; s=arc-20160816; b=b+llTzzmZEyVAW1aUUWWf5HaJ2fusAu6+OU5012tMA0RJKERY/Ml1deWZSGS2kkehm PLk5nGovWsxwUjVoQXjyxQhfoDDIPN7zatJpViK/0oneIHlrdIRrXjvaIqXJSIJWk5ZX v6qqQ6ffS8ztoHV1qbRfQRSIkSupWhqElwLMUX/SXVSP7M6v1uWNZKy5KUemLOLxSa4p U0gJSVdsezmZdT34LO2+s9HRuLaYFG+PtO6xRRtHhwN0akI9dv7z+2PpOqmQnVhreOA4 3opx3VPGrDM2FHukWqe9UkUdz4YOCEyYjs14Pagiht/Uur3zZgQAOfLcIiZivEaPeOHu BDCA== 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=64nlTJ5kHDNpXPvnMC77gIztv7iCOTrax7wYjYpzDA0=; b=nkWfRRhWbIoaLUSkrp2sRPbOaA4aHqSLWV8aPTgFWki0Zra/MoklN+FI0TkRzhUTbL XvyPS328rkffgj5ldN5S2CjbZx0wHAvWqKCJ+f5+EZKgjXGWdspGB+6VbYR8+E9QHWQc HrNSiJghPM6lj9gHTieZ8oMwzwJFJfX4A9UGpFOttyS76hqQWitTzq3FddBhwCsntv1r pzaZ1Ehezdkyb6TTT98SlNjr/FT8e3LpaJQJsL/hog7dVCqQfm0xgMbvReEi9jU89FYB ClSVNr3BYIz7MLXaDEl31MPnRHT3jWh0ZE+GeX/rTXHoI0CoTKItlONS9BBMiu7MZ/MX /KEw== 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 u27si15401752pgk.555.2019.02.27.09.07.04; Wed, 27 Feb 2019 09:07:34 -0800 (PST) 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 S1729558AbfB0RGh (ORCPT + 99 others); Wed, 27 Feb 2019 12:06:37 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35798 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfB0RGg (ORCPT ); Wed, 27 Feb 2019 12:06:36 -0500 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 EF507A78; Wed, 27 Feb 2019 09:06:35 -0800 (PST) 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 6E0723F738; Wed, 27 Feb 2019 09:06:32 -0800 (PST) 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" , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH v3 02/34] arc: mm: Add p?d_large() definitions Date: Wed, 27 Feb 2019 17:05:36 +0000 Message-Id: <20190227170608.27963-3-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190227170608.27963-1-steven.price@arm.com> References: <20190227170608.27963-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 --- 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