Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4441982img; Tue, 26 Mar 2019 09:27:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoWlbQSBJccTkkt6a1U+wJ7XKOI7YIC9/rLegP4GZnAcViotidzQ1e3Si0rbryRmAJxroN X-Received: by 2002:aa7:814e:: with SMTP id d14mr6906348pfn.101.1553617653516; Tue, 26 Mar 2019 09:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553617653; cv=none; d=google.com; s=arc-20160816; b=i338lpF1xsf3pe9ZGbzCfB8jnnxqvtgl+C16yW3ioHBk8FeHHxU+ULFqSK/JmyFOTi MUVSS4HHFw0rrIL3VjKFhEwM0/zlLhv8eO0cVVCFfBR+IkZxOeEfHpmVyl45NQqBs5mL 0zbeglMmT1ld/Rtk8HmwktlJcsa1jG62oYuc/Tl+DvkESnP0hHC1hsdF7wzpaMGrDEBg bi+GFDRskyK7lHWT8JWjJJK7Or0Ybs7TmOvro9IxuV6KNjeHODJjUnOLOHXEdv3csb03 haup3LZ+kMT1CgUPYloSbtQ2uijebzS3/CY3lUGjthBou3X70xlQT0I8VVnYl28r1Tg+ FL9g== 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=kFLRUd4zZFszFgBPi0BS+MlRPT5wqsMQg6mMrC+A1n6NWBCmRm5IYceyqm/HWYYdEl +coCBKVsc7y7kA5FdGL2zOEN6B3MsVV9V6HIehsVlNzBUlEkk97svNO6xPoOiMGMasw7 1Em85Vgb5mCqO8g+EGyEs3DQExmsGiSL9IxlZhHAEVoRXuU6tkwN9T9HyRZ2mpJF/zpg JzQhTkRrt3bSJRyt2NwCDQI87YKSARi4Z48JjoqHoXtxU1cfOMWD4FNgwVzVu8XUDQ6P RXSzF5nt1z9i0CYJCDJK27fOZK+3HOhabHI4uDwZ+g72CfjcOYquVwFg2BZKJ8d41b46 TTAw== 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 q9si16004298pgq.173.2019.03.26.09.27.18; Tue, 26 Mar 2019 09:27:33 -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 S1731838AbfCZQ0l (ORCPT + 99 others); Tue, 26 Mar 2019 12:26:41 -0400 Received: from foss.arm.com ([217.140.101.70]:39518 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727492AbfCZQ0j (ORCPT ); Tue, 26 Mar 2019 12:26:39 -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 35E8015AB; Tue, 26 Mar 2019 09:26:39 -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 A661B3F614; Tue, 26 Mar 2019 09:26:35 -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" , Vineet Gupta , linux-snps-arc@lists.infradead.org Subject: [PATCH v6 01/19] arc: mm: Add p?d_large() definitions Date: Tue, 26 Mar 2019 16:26:06 +0000 Message-Id: <20190326162624.20736-2-steven.price@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190326162624.20736-1-steven.price@arm.com> References: <20190326162624.20736-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